diff --git a/404.html b/404.html index 572d5752934..a515e5b2340 100644 --- a/404.html +++ b/404.html @@ -6,13 +6,13 @@ Page Not Found | Fiber - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/api/app/index.html b/api/app/index.html index b9f16c1d33d..610195c0ea6 100644 --- a/api/app/index.html +++ b/api/app/index.html @@ -6,13 +6,13 @@ 🚀 App | Fiber - - + +
-
Skip to main content
Version: v2.x

🚀 App

Static

Use the Static method to serve static files such as images, CSS, and JavaScript.

info

By default, Static will serve index.html files in response to a request on a directory.

Signature
func (app *App) Static(prefix, root string, config ...Static) Router

Use the following code to serve files in a directory named ./public

app.Static("/", "./public")

// => http://localhost:3000/hello.html
// => http://localhost:3000/js/jquery.js
// => http://localhost:3000/css/style.css
Examples
// Serve files from multiple directories
app.Static("/", "./public")

// Serve files from "./files" directory:
app.Static("/", "./files")

You can use any virtual path prefix (where the path does not actually exist in the file system) for files that are served by the Static method, specify a prefix path for the static directory, as shown below:

Examples
app.Static("/static", "./public")

// => http://localhost:3000/static/hello.html
// => http://localhost:3000/static/js/jquery.js
// => http://localhost:3000/static/css/style.css

If you want to have a little bit more control regarding the settings for serving static files. You could use the fiber.Static struct to enable specific settings.

fiber.Static{}
// Static defines configuration options when defining static assets.
type Static struct {
// When set to true, the server tries minimizing CPU usage by caching compressed files.
// This works differently than the github.com/gofiber/compression middleware.
// Optional. Default value false
Compress bool `json:"compress"`

// When set to true, enables byte range requests.
// Optional. Default value false
ByteRange bool `json:"byte_range"`

// When set to true, enables directory browsing.
// Optional. Default value false.
Browse bool `json:"browse"`

// When set to true, enables direct download.
// Optional. Default value false.
Download bool `json:"download"`

// The name of the index file for serving a directory.
// Optional. Default value "index.html".
Index string `json:"index"`

// Expiration duration for inactive file handlers.
// Use a negative time.Duration to disable it.
//
// Optional. Default value 10 * time.Second.
CacheDuration time.Duration `json:"cache_duration"`

// The value for the Cache-Control HTTP-header
// that is set on the file response. MaxAge is defined in seconds.
//
// Optional. Default value 0.
MaxAge int `json:"max_age"`

// ModifyResponse defines a function that allows you to alter the response.
//
// Optional. Default: nil
ModifyResponse Handler

// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *Ctx) bool
}
Example
// Custom config
app.Static("/", "./public", fiber.Static{
Compress: true,
ByteRange: true,
Browse: true,
Index: "john.html",
CacheDuration: 10 * time.Second,
MaxAge: 3600,
})

Route Handlers

Registers a route bound to a specific HTTP method.

Signatures
// HTTP methods
func (app *App) Get(path string, handlers ...Handler) Router
func (app *App) Head(path string, handlers ...Handler) Router
func (app *App) Post(path string, handlers ...Handler) Router
func (app *App) Put(path string, handlers ...Handler) Router
func (app *App) Delete(path string, handlers ...Handler) Router
func (app *App) Connect(path string, handlers ...Handler) Router
func (app *App) Options(path string, handlers ...Handler) Router
func (app *App) Trace(path string, handlers ...Handler) Router
func (app *App) Patch(path string, handlers ...Handler) Router

// Add allows you to specifiy a method as value
func (app *App) Add(method, path string, handlers ...Handler) Router

// All will register the route on all HTTP methods
// Almost the same as app.Use but not bound to prefixes
func (app *App) All(path string, handlers ...Handler) Router
Examples
// Simple GET handler
app.Get("/api/list", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")
})

// Simple POST handler
app.Post("/api/register", func(c *fiber.Ctx) error {
return c.SendString("I'm a POST request!")
})

Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc

Signature
func (app *App) Use(args ...interface{}) Router
Examples
// Match any request
app.Use(func(c *fiber.Ctx) error {
return c.Next()
})

// Match request starting with /api
app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})

// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})

// Attach multiple handlers
app.Use("/api", func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
return c.Next()
}, func(c *fiber.Ctx) error {
return c.Next()
})

Mount

You can Mount Fiber instance by creating a *Mount

Signature
func (a *App) Mount(prefix string, app *App) Router
Examples
func main() {
app := fiber.New()
micro := fiber.New()
app.Mount("/john", micro) // GET /john/doe -> 200 OK

micro.Get("/doe", func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

MountPath

The MountPath property contains one or more path patterns on which a sub-app was mounted.

Signature
func (app *App) MountPath() string
Examples
func main() {
app := fiber.New()
one := fiber.New()
two := fiber.New()
three := fiber.New()

two.Mount("/three", three)
one.Mount("/two", two)
app.Mount("/one", one)

one.MountPath() // "/one"
two.MountPath() // "/one/two"
three.MountPath() // "/one/two/three"
app.MountPath() // ""
}
caution

Mounting order is important for MountPath. If you want to get mount paths properly, you should start mounting from the deepest app.

Group

You can group routes by creating a *Group struct.

Signature
func (app *App) Group(prefix string, handlers ...Handler) Router
Examples
func main() {
app := fiber.New()

api := app.Group("/api", handler) // /api

v1 := api.Group("/v1", handler) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", handler) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

Route

You can define routes with a common prefix inside the common function.

Signature
func (app *App) Route(prefix string, fn func(router Router), name ...string) Router
Examples
func main() {
app := fiber.New()

app.Route("/test", func(api fiber.Router) {
api.Get("/foo", handler).Name("foo") // /test/foo (name: test.foo)
api.Get("/bar", handler).Name("bar") // /test/bar (name: test.bar)
}, "test.")

log.Fatal(app.Listen(":3000"))
}

Server

Server returns the underlying fasthttp server

Signature
func (app *App) Server() *fasthttp.Server
Examples
func main() {
app := fiber.New()

app.Server().MaxConnsPerIP = 1

// ...
}

Server Shutdown

Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waits indefinitely for all connections to return to idle before shutting down.

ShutdownWithTimeout will forcefully close any active connections after the timeout expires.

ShutdownWithContext shuts down the server including by force if the context's deadline is exceeded.

func (app *App) Shutdown() error
func (app *App) ShutdownWithTimeout(timeout time.Duration) error
func (app *App) ShutdownWithContext(ctx context.Context) error

HandlersCount

This method returns the amount of registered handlers.

Signature
func (app *App) HandlersCount() uint32

Stack

This method returns the original router stack

Signature
func (app *App) Stack() [][]*Route
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/john/:age", handler)
app.Post("/register", handler)

data, _ := json.MarshalIndent(app.Stack(), "", " ")
fmt.Println(string(data))

app.Listen(":3000")
}
Result
[
[
{
"method": "GET",
"path": "/john/:age",
"params": [
"age"
]
}
],
[
{
"method": "HEAD",
"path": "/john/:age",
"params": [
"age"
]
}
],
[
{
"method": "POST",
"path": "/register",
"params": null
}
]
]

Name

This method assigns the name of latest created route.

Signature
func (app *App) Name(name string) Router
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/", handler)
app.Name("index")

app.Get("/doe", handler).Name("home")

app.Trace("/tracer", handler).Name("tracert")

app.Delete("/delete", handler).Name("delete")

a := app.Group("/a")
a.Name("fd.")

a.Get("/test", handler).Name("test")

data, _ := json.MarshalIndent(app.Stack(), "", " ")
fmt.Print(string(data))

app.Listen(":3000")

}
Result
[
[
{
"method": "GET",
"name": "index",
"path": "/",
"params": null
},
{
"method": "GET",
"name": "home",
"path": "/doe",
"params": null
},
{
"method": "GET",
"name": "fd.test",
"path": "/a/test",
"params": null
}
],
[
{
"method": "HEAD",
"name": "",
"path": "/",
"params": null
},
{
"method": "HEAD",
"name": "",
"path": "/doe",
"params": null
},
{
"method": "HEAD",
"name": "",
"path": "/a/test",
"params": null
}
],
null,
null,
[
{
"method": "DELETE",
"name": "delete",
"path": "/delete",
"params": null
}
],
null,
null,
[
{
"method": "TRACE",
"name": "tracert",
"path": "/tracer",
"params": null
}
],
null
]

GetRoute

This method gets the route by name.

Signature
func (app *App) GetRoute(name string) Route
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/", handler).Name("index")

data, _ := json.MarshalIndent(app.GetRoute("index"), "", " ")
fmt.Print(string(data))


app.Listen(":3000")

}
Result
{
"method": "GET",
"name": "index",
"path": "/",
"params": null
}

GetRoutes

This method gets all routes.

Signature
func (app *App) GetRoutes(filterUseOption ...bool) []Route

When filterUseOption equal to true, it will filter the routes registered by the middleware.

Examples
func main() {
app := fiber.New()
app.Post("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
}).Name("index")
data, _ := json.MarshalIndent(app.GetRoutes(true), "", " ")
fmt.Print(string(data))
}
Result
[
{
"method": "POST",
"name": "index",
"path": "/",
"params": null
}
]

Config

Config returns the app config as value ( read-only ).

Signature
func (app *App) Config() Config

Handler

Handler returns the server handler that can be used to serve custom *fasthttp.RequestCtx requests.

Signature
func (app *App) Handler() fasthttp.RequestHandler

Listen

Listen serves HTTP requests from the given address.

Signature
func (app *App) Listen(addr string) error
Examples
// Listen on port :8080 
app.Listen(":8080")

// Custom host
app.Listen("127.0.0.1:8080")

ListenTLS

ListenTLS serves HTTPs requests from the given address using certFile and keyFile paths to as TLS certificate and key file.

Signature
func (app *App) ListenTLS(addr, certFile, keyFile string) error
Examples
app.ListenTLS(":443", "./cert.pem", "./cert.key");

Using ListenTLS defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
Certificates: []tls.Certificate{
cert,
},
}

ListenTLSWithCertificate

Signature
func (app *App) ListenTLS(addr string, cert tls.Certificate) error
Examples
app.ListenTLSWithCertificate(":443", cert);

Using ListenTLSWithCertificate defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
Certificates: []tls.Certificate{
cert,
},
}

ListenMutualTLS

ListenMutualTLS serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file

Signature
func (app *App) ListenMutualTLS(addr, certFile, keyFile, clientCertFile string) error
Examples
app.ListenMutualTLS(":443", "./cert.pem", "./cert.key", "./ca-chain-cert.pem");

Using ListenMutualTLS defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: clientCertPool,
Certificates: []tls.Certificate{
cert,
},
}

ListenMutualTLSWithCertificate

ListenMutualTLSWithCertificate serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file

Signature
func (app *App) ListenMutualTLSWithCertificate(addr string, cert tls.Certificate, clientCertPool *x509.CertPool) error
Examples
app.ListenMutualTLSWithCertificate(":443", cert, clientCertPool);

Using ListenMutualTLSWithCertificate defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: clientCertPool,
Certificates: []tls.Certificate{
cert,
},
}

Listener

You can pass your own net.Listener using the Listener method. This method can be used to enable TLS/HTTPS with a custom tls.Config.

Signature
func (app *App) Listener(ln net.Listener) error
Examples
ln, _ := net.Listen("tcp", ":3000")

cer, _:= tls.LoadX509KeyPair("server.crt", "server.key")

ln = tls.NewListener(ln, &tls.Config{Certificates: []tls.Certificate{cer}})

app.Listener(ln)

Test

Testing your application is done with the Test method. Use this method for creating _test.go files or when you need to debug your routing logic. The default timeout is 1s if you want to disable a timeout altogether, pass -1 as a second argument.

Signature
func (app *App) Test(req *http.Request, msTimeout ...int) (*http.Response, error)
Examples
// Create route with GET method for test:
app.Get("/", func(c *fiber.Ctx) error {
fmt.Println(c.BaseURL()) // => http://google.com
fmt.Println(c.Get("X-Custom-Header")) // => hi

return c.SendString("hello, World!")
})

// http.Request
req := httptest.NewRequest("GET", "http://google.com", nil)
req.Header.Set("X-Custom-Header", "hi")

// http.Response
resp, _ := app.Test(req)

// Do something with results:
if resp.StatusCode == fiber.StatusOK {
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body)) // => Hello, World!
}

Hooks

Hooks is a method to return hooks property.

Signature
func (app *App) Hooks() *Hooks
- - +
Skip to main content
Version: v2.x

🚀 App

Static

Use the Static method to serve static files such as images, CSS, and JavaScript.

info

By default, Static will serve index.html files in response to a request on a directory.

Signature
func (app *App) Static(prefix, root string, config ...Static) Router

Use the following code to serve files in a directory named ./public

app.Static("/", "./public")

// => http://localhost:3000/hello.html
// => http://localhost:3000/js/jquery.js
// => http://localhost:3000/css/style.css
Examples
// Serve files from multiple directories
app.Static("/", "./public")

// Serve files from "./files" directory:
app.Static("/", "./files")

You can use any virtual path prefix (where the path does not actually exist in the file system) for files that are served by the Static method, specify a prefix path for the static directory, as shown below:

Examples
app.Static("/static", "./public")

// => http://localhost:3000/static/hello.html
// => http://localhost:3000/static/js/jquery.js
// => http://localhost:3000/static/css/style.css

If you want to have a little bit more control regarding the settings for serving static files. You could use the fiber.Static struct to enable specific settings.

fiber.Static{}
// Static defines configuration options when defining static assets.
type Static struct {
// When set to true, the server tries minimizing CPU usage by caching compressed files.
// This works differently than the github.com/gofiber/compression middleware.
// Optional. Default value false
Compress bool `json:"compress"`

// When set to true, enables byte range requests.
// Optional. Default value false
ByteRange bool `json:"byte_range"`

// When set to true, enables directory browsing.
// Optional. Default value false.
Browse bool `json:"browse"`

// When set to true, enables direct download.
// Optional. Default value false.
Download bool `json:"download"`

// The name of the index file for serving a directory.
// Optional. Default value "index.html".
Index string `json:"index"`

// Expiration duration for inactive file handlers.
// Use a negative time.Duration to disable it.
//
// Optional. Default value 10 * time.Second.
CacheDuration time.Duration `json:"cache_duration"`

// The value for the Cache-Control HTTP-header
// that is set on the file response. MaxAge is defined in seconds.
//
// Optional. Default value 0.
MaxAge int `json:"max_age"`

// ModifyResponse defines a function that allows you to alter the response.
//
// Optional. Default: nil
ModifyResponse Handler

// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *Ctx) bool
}
Example
// Custom config
app.Static("/", "./public", fiber.Static{
Compress: true,
ByteRange: true,
Browse: true,
Index: "john.html",
CacheDuration: 10 * time.Second,
MaxAge: 3600,
})

Route Handlers

Registers a route bound to a specific HTTP method.

Signatures
// HTTP methods
func (app *App) Get(path string, handlers ...Handler) Router
func (app *App) Head(path string, handlers ...Handler) Router
func (app *App) Post(path string, handlers ...Handler) Router
func (app *App) Put(path string, handlers ...Handler) Router
func (app *App) Delete(path string, handlers ...Handler) Router
func (app *App) Connect(path string, handlers ...Handler) Router
func (app *App) Options(path string, handlers ...Handler) Router
func (app *App) Trace(path string, handlers ...Handler) Router
func (app *App) Patch(path string, handlers ...Handler) Router

// Add allows you to specifiy a method as value
func (app *App) Add(method, path string, handlers ...Handler) Router

// All will register the route on all HTTP methods
// Almost the same as app.Use but not bound to prefixes
func (app *App) All(path string, handlers ...Handler) Router
Examples
// Simple GET handler
app.Get("/api/list", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")
})

// Simple POST handler
app.Post("/api/register", func(c *fiber.Ctx) error {
return c.SendString("I'm a POST request!")
})

Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc

Signature
func (app *App) Use(args ...interface{}) Router
Examples
// Match any request
app.Use(func(c *fiber.Ctx) error {
return c.Next()
})

// Match request starting with /api
app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})

// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})

// Attach multiple handlers
app.Use("/api", func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
return c.Next()
}, func(c *fiber.Ctx) error {
return c.Next()
})

Mount

You can Mount Fiber instance by creating a *Mount

Signature
func (a *App) Mount(prefix string, app *App) Router
Examples
func main() {
app := fiber.New()
micro := fiber.New()
app.Mount("/john", micro) // GET /john/doe -> 200 OK

micro.Get("/doe", func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

MountPath

The MountPath property contains one or more path patterns on which a sub-app was mounted.

Signature
func (app *App) MountPath() string
Examples
func main() {
app := fiber.New()
one := fiber.New()
two := fiber.New()
three := fiber.New()

two.Mount("/three", three)
one.Mount("/two", two)
app.Mount("/one", one)

one.MountPath() // "/one"
two.MountPath() // "/one/two"
three.MountPath() // "/one/two/three"
app.MountPath() // ""
}
caution

Mounting order is important for MountPath. If you want to get mount paths properly, you should start mounting from the deepest app.

Group

You can group routes by creating a *Group struct.

Signature
func (app *App) Group(prefix string, handlers ...Handler) Router
Examples
func main() {
app := fiber.New()

api := app.Group("/api", handler) // /api

v1 := api.Group("/v1", handler) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", handler) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

Route

You can define routes with a common prefix inside the common function.

Signature
func (app *App) Route(prefix string, fn func(router Router), name ...string) Router
Examples
func main() {
app := fiber.New()

app.Route("/test", func(api fiber.Router) {
api.Get("/foo", handler).Name("foo") // /test/foo (name: test.foo)
api.Get("/bar", handler).Name("bar") // /test/bar (name: test.bar)
}, "test.")

log.Fatal(app.Listen(":3000"))
}

Server

Server returns the underlying fasthttp server

Signature
func (app *App) Server() *fasthttp.Server
Examples
func main() {
app := fiber.New()

app.Server().MaxConnsPerIP = 1

// ...
}

Server Shutdown

Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waits indefinitely for all connections to return to idle before shutting down.

ShutdownWithTimeout will forcefully close any active connections after the timeout expires.

ShutdownWithContext shuts down the server including by force if the context's deadline is exceeded.

func (app *App) Shutdown() error
func (app *App) ShutdownWithTimeout(timeout time.Duration) error
func (app *App) ShutdownWithContext(ctx context.Context) error

HandlersCount

This method returns the amount of registered handlers.

Signature
func (app *App) HandlersCount() uint32

Stack

This method returns the original router stack

Signature
func (app *App) Stack() [][]*Route
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/john/:age", handler)
app.Post("/register", handler)

data, _ := json.MarshalIndent(app.Stack(), "", " ")
fmt.Println(string(data))

app.Listen(":3000")
}
Result
[
[
{
"method": "GET",
"path": "/john/:age",
"params": [
"age"
]
}
],
[
{
"method": "HEAD",
"path": "/john/:age",
"params": [
"age"
]
}
],
[
{
"method": "POST",
"path": "/register",
"params": null
}
]
]

Name

This method assigns the name of latest created route.

Signature
func (app *App) Name(name string) Router
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/", handler)
app.Name("index")

app.Get("/doe", handler).Name("home")

app.Trace("/tracer", handler).Name("tracert")

app.Delete("/delete", handler).Name("delete")

a := app.Group("/a")
a.Name("fd.")

a.Get("/test", handler).Name("test")

data, _ := json.MarshalIndent(app.Stack(), "", " ")
fmt.Print(string(data))

app.Listen(":3000")

}
Result
[
[
{
"method": "GET",
"name": "index",
"path": "/",
"params": null
},
{
"method": "GET",
"name": "home",
"path": "/doe",
"params": null
},
{
"method": "GET",
"name": "fd.test",
"path": "/a/test",
"params": null
}
],
[
{
"method": "HEAD",
"name": "",
"path": "/",
"params": null
},
{
"method": "HEAD",
"name": "",
"path": "/doe",
"params": null
},
{
"method": "HEAD",
"name": "",
"path": "/a/test",
"params": null
}
],
null,
null,
[
{
"method": "DELETE",
"name": "delete",
"path": "/delete",
"params": null
}
],
null,
null,
[
{
"method": "TRACE",
"name": "tracert",
"path": "/tracer",
"params": null
}
],
null
]

GetRoute

This method gets the route by name.

Signature
func (app *App) GetRoute(name string) Route
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/", handler).Name("index")

data, _ := json.MarshalIndent(app.GetRoute("index"), "", " ")
fmt.Print(string(data))


app.Listen(":3000")

}
Result
{
"method": "GET",
"name": "index",
"path": "/",
"params": null
}

GetRoutes

This method gets all routes.

Signature
func (app *App) GetRoutes(filterUseOption ...bool) []Route

When filterUseOption equal to true, it will filter the routes registered by the middleware.

Examples
func main() {
app := fiber.New()
app.Post("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
}).Name("index")
data, _ := json.MarshalIndent(app.GetRoutes(true), "", " ")
fmt.Print(string(data))
}
Result
[
{
"method": "POST",
"name": "index",
"path": "/",
"params": null
}
]

Config

Config returns the app config as value ( read-only ).

Signature
func (app *App) Config() Config

Handler

Handler returns the server handler that can be used to serve custom *fasthttp.RequestCtx requests.

Signature
func (app *App) Handler() fasthttp.RequestHandler

Listen

Listen serves HTTP requests from the given address.

Signature
func (app *App) Listen(addr string) error
Examples
// Listen on port :8080 
app.Listen(":8080")

// Custom host
app.Listen("127.0.0.1:8080")

ListenTLS

ListenTLS serves HTTPs requests from the given address using certFile and keyFile paths to as TLS certificate and key file.

Signature
func (app *App) ListenTLS(addr, certFile, keyFile string) error
Examples
app.ListenTLS(":443", "./cert.pem", "./cert.key");

Using ListenTLS defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
Certificates: []tls.Certificate{
cert,
},
}

ListenTLSWithCertificate

Signature
func (app *App) ListenTLS(addr string, cert tls.Certificate) error
Examples
app.ListenTLSWithCertificate(":443", cert);

Using ListenTLSWithCertificate defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
Certificates: []tls.Certificate{
cert,
},
}

ListenMutualTLS

ListenMutualTLS serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file

Signature
func (app *App) ListenMutualTLS(addr, certFile, keyFile, clientCertFile string) error
Examples
app.ListenMutualTLS(":443", "./cert.pem", "./cert.key", "./ca-chain-cert.pem");

Using ListenMutualTLS defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: clientCertPool,
Certificates: []tls.Certificate{
cert,
},
}

ListenMutualTLSWithCertificate

ListenMutualTLSWithCertificate serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file

Signature
func (app *App) ListenMutualTLSWithCertificate(addr string, cert tls.Certificate, clientCertPool *x509.CertPool) error
Examples
app.ListenMutualTLSWithCertificate(":443", cert, clientCertPool);

Using ListenMutualTLSWithCertificate defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: clientCertPool,
Certificates: []tls.Certificate{
cert,
},
}

Listener

You can pass your own net.Listener using the Listener method. This method can be used to enable TLS/HTTPS with a custom tls.Config.

Signature
func (app *App) Listener(ln net.Listener) error
Examples
ln, _ := net.Listen("tcp", ":3000")

cer, _:= tls.LoadX509KeyPair("server.crt", "server.key")

ln = tls.NewListener(ln, &tls.Config{Certificates: []tls.Certificate{cer}})

app.Listener(ln)

Test

Testing your application is done with the Test method. Use this method for creating _test.go files or when you need to debug your routing logic. The default timeout is 1s if you want to disable a timeout altogether, pass -1 as a second argument.

Signature
func (app *App) Test(req *http.Request, msTimeout ...int) (*http.Response, error)
Examples
// Create route with GET method for test:
app.Get("/", func(c *fiber.Ctx) error {
fmt.Println(c.BaseURL()) // => http://google.com
fmt.Println(c.Get("X-Custom-Header")) // => hi

return c.SendString("hello, World!")
})

// http.Request
req := httptest.NewRequest("GET", "http://google.com", nil)
req.Header.Set("X-Custom-Header", "hi")

// http.Response
resp, _ := app.Test(req)

// Do something with results:
if resp.StatusCode == fiber.StatusOK {
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body)) // => Hello, World!
}

Hooks

Hooks is a method to return hooks property.

Signature
func (app *App) Hooks() *Hooks
+ + \ No newline at end of file diff --git a/api/client/index.html b/api/client/index.html index 77483dfac67..67c9d3a90ab 100644 --- a/api/client/index.html +++ b/api/client/index.html @@ -6,14 +6,14 @@ 🌎 Client | Fiber - - + +
Skip to main content
Version: v2.x

🌎 Client

Start request

Start a http request with http method and url.

Signatures
// Client http methods
func (c *Client) Get(url string) *Agent
func (c *Client) Head(url string) *Agent
func (c *Client) Post(url string) *Agent
func (c *Client) Put(url string) *Agent
func (c *Client) Patch(url string) *Agent
func (c *Client) Delete(url string) *Agent

✨ Agent

Agent is built on top of FastHTTP's HostClient which has lots of convenient helper methods such as dedicated methods for request methods.

Parse

Parse initializes a HostClient.

Parse
a := AcquireAgent()
req := a.Request()
req.Header.SetMethod(MethodGet)
req.SetRequestURI("http://example.com")

if err := a.Parse(); err != nil {
panic(err)
}

code, body, errs := a.Bytes() // ...

Set

Set sets the given key: value header.

Signature
func (a *Agent) Set(k, v string) *Agent
func (a *Agent) SetBytesK(k []byte, v string) *Agent
func (a *Agent) SetBytesV(k string, v []byte) *Agent
func (a *Agent) SetBytesKV(k []byte, v []byte) *Agent
Example
agent.Set("k1", "v1").
SetBytesK([]byte("k1"), "v1").
SetBytesV("k1", []byte("v1")).
SetBytesKV([]byte("k2"), []byte("v2"))
// ...

Add

Add adds the given key: value header. Multiple headers with the same key may be added with this function.

Signature
func (a *Agent) Add(k, v string) *Agent
func (a *Agent) AddBytesK(k []byte, v string) *Agent
func (a *Agent) AddBytesV(k string, v []byte) *Agent
func (a *Agent) AddBytesKV(k []byte, v []byte) *Agent
Example
agent.Add("k1", "v1").
AddBytesK([]byte("k1"), "v1").
AddBytesV("k1", []byte("v1")).
AddBytesKV([]byte("k2"), []byte("v2"))
// Headers:
// K1: v1
// K1: v1
// K1: v1
// K2: v2

ConnectionClose

ConnectionClose adds the Connection: close header.

Signature
func (a *Agent) ConnectionClose() *Agent
Example
agent.ConnectionClose()
// ...

UserAgent

UserAgent sets User-Agent header value.

Signature
func (a *Agent) UserAgent(userAgent string) *Agent
func (a *Agent) UserAgentBytes(userAgent []byte) *Agent
Example
agent.UserAgent("fiber")
// ...

Cookie sets a cookie in key: value form. Cookies can be used to set multiple cookies.

Signature
func (a *Agent) Cookie(key, value string) *Agent
func (a *Agent) CookieBytesK(key []byte, value string) *Agent
func (a *Agent) CookieBytesKV(key, value []byte) *Agent
func (a *Agent) Cookies(kv ...string) *Agent
func (a *Agent) CookiesBytesKV(kv ...[]byte) *Agent
Example
agent.Cookie("k", "v")
agent.Cookies("k1", "v1", "k2", "v2")
// ...

Referer

Referer sets the Referer header value.

Signature
func (a *Agent) Referer(referer string) *Agent
func (a *Agent) RefererBytes(referer []byte) *Agent
Example
agent.Referer("https://docs.gofiber.io")
// ...

ContentType

ContentType sets Content-Type header value.

Signature
func (a *Agent) ContentType(contentType string) *Agent
func (a *Agent) ContentTypeBytes(contentType []byte) *Agent
Example
agent.ContentType("custom-type")
// ...

Host

Host sets the Host header.

Signature
func (a *Agent) Host(host string) *Agent
func (a *Agent) HostBytes(host []byte) *Agent
Example
agent.Host("example.com")
// ...

QueryString

QueryString sets the URI query string.

Signature
func (a *Agent) QueryString(queryString string) *Agent
func (a *Agent) QueryStringBytes(queryString []byte) *Agent
Example
agent.QueryString("foo=bar")
// ...

BasicAuth

BasicAuth sets the URI username and password using HTTP Basic Auth.

Signature
func (a *Agent) BasicAuth(username, password string) *Agent
func (a *Agent) BasicAuthBytes(username, password []byte) *Agent
Example
agent.BasicAuth("foo", "bar")
// ...

Body

There are several ways to set request body.

Signature
func (a *Agent) BodyString(bodyString string) *Agent
func (a *Agent) Body(body []byte) *Agent

// BodyStream sets request body stream and, optionally body size.
//
// If bodySize is >= 0, then the bodyStream must provide exactly bodySize bytes
// before returning io.EOF.
//
// If bodySize < 0, then bodyStream is read until io.EOF.
//
// bodyStream.Close() is called after finishing reading all body data
// if it implements io.Closer.
//
// Note that GET and HEAD requests cannot have body.
func (a *Agent) BodyStream(bodyStream io.Reader, bodySize int) *Agent
Example
agent.BodyString("foo=bar")
agent.Body([]byte("bar=baz"))
agent.BodyStream(strings.NewReader("body=stream"), -1)
// ...

JSON

JSON sends a JSON request by setting the Content-Type header to application/json.

Signature
func (a *Agent) JSON(v interface{}) *Agent
Example
agent.JSON(fiber.Map{"success": true})
// ...

XML

XML sends an XML request by setting the Content-Type header to application/xml.

Signature
func (a *Agent) XML(v interface{}) *Agent
Example
agent.XML(fiber.Map{"success": true})
// ...

Form

Form sends a form request by setting the Content-Type header to application/x-www-form-urlencoded.

Signature
// Form sends form request with body if args is non-nil.
//
// It is recommended obtaining args via AcquireArgs and release it
// manually in performance-critical code.
func (a *Agent) Form(args *Args) *Agent
Example
args := AcquireArgs()
args.Set("foo", "bar")

agent.Form(args)
// ...
ReleaseArgs(args)

MultipartForm

MultipartForm sends multipart form request by setting the Content-Type header to multipart/form-data. These requests can include key-value's and files.

Signature
// MultipartForm sends multipart form request with k-v and files.
//
// It is recommended to obtain args via AcquireArgs and release it
// manually in performance-critical code.
func (a *Agent) MultipartForm(args *Args) *Agent
Example
args := AcquireArgs()
args.Set("foo", "bar")

agent.MultipartForm(args)
// ...
ReleaseArgs(args)

Fiber provides several methods for sending files. Note that they must be called before MultipartForm.

Boundary

Boundary sets boundary for multipart form request.

Signature
func (a *Agent) Boundary(boundary string) *Agent
Example
agent.Boundary("myBoundary")
.MultipartForm(nil)
// ...

SendFile(s)

SendFile read a file and appends it to a multipart form request. Sendfiles can be used to append multiple files.

Signature
func (a *Agent) SendFile(filename string, fieldname ...string) *Agent
func (a *Agent) SendFiles(filenamesAndFieldnames ...string) *Agent
Example
agent.SendFile("f", "field name")
.SendFiles("f1", "field name1", "f2").
.MultipartForm(nil)
// ...

FileData

FileData appends file data for multipart form request.

// FormFile represents multipart form file
type FormFile struct {
// Fieldname is form file's field name
Fieldname string
// Name is form file's name
Name string
// Content is form file's content
Content []byte
}
Signature
// FileData appends files for multipart form request.
//
// It is recommended obtaining formFile via AcquireFormFile and release it
// manually in performance-critical code.
func (a *Agent) FileData(formFiles ...*FormFile) *Agent
Example
ff1 := &FormFile{"filename1", "field name1", []byte("content")}
ff2 := &FormFile{"filename2", "field name2", []byte("content")}
agent.FileData(ff1, ff2).
MultipartForm(nil)
// ...

Debug

Debug mode enables logging request and response detail to io.writer(default is os.Stdout).

Signature
func (a *Agent) Debug(w ...io.Writer) *Agent
Example
agent.Debug()
// ...

Timeout

Timeout sets request timeout duration.

Signature
func (a *Agent) Timeout(timeout time.Duration) *Agent
Example
agent.Timeout(time.Second)
// ...

Reuse

Reuse enables the Agent instance to be used again after one request. If agent is reusable, then it should be released manually when it is no longer used.

Signature
func (a *Agent) Reuse() *Agent
Example
agent.Reuse()
// ...

InsecureSkipVerify

InsecureSkipVerify controls whether the Agent verifies the server certificate chain and host name.

Signature
func (a *Agent) InsecureSkipVerify() *Agent
Example
agent.InsecureSkipVerify()
// ...

TLSConfig

TLSConfig sets tls config.

Signature
func (a *Agent) TLSConfig(config *tls.Config) *Agent
Example
// Create tls certificate
cer, _ := tls.LoadX509KeyPair("pem", "key")

config := &tls.Config{
Certificates: []tls.Certificate{cer},
}

agent.TLSConfig(config)
// ...

MaxRedirectsCount

MaxRedirectsCount sets max redirect count for GET and HEAD.

Signature
func (a *Agent) MaxRedirectsCount(count int) *Agent
Example
agent.MaxRedirectsCount(7)
// ...

JSONEncoder

JSONEncoder sets custom json encoder.

Signature
func (a *Agent) JSONEncoder(jsonEncoder utils.JSONMarshal) *Agent
Example
agent.JSONEncoder(json.Marshal)
// ...

JSONDecoder

JSONDecoder sets custom json decoder.

Signature
func (a *Agent) JSONDecoder(jsonDecoder utils.JSONUnmarshal) *Agent
Example
agent.JSONDecoder(json.Unmarshal)
// ...

Request

Request returns Agent request instance.

Signature
func (a *Agent) Request() *Request
Example
req := agent.Request()
// ...

SetResponse

SetResponse sets custom response for the Agent instance. It is recommended obtaining custom response via AcquireResponse and release it manually in performance-critical code.

Signature
func (a *Agent) SetResponse(customResp *Response) *Agent
Example
resp := AcquireResponse()
agent.SetResponse(resp)
// ...
ReleaseResponse(resp)

Dest

Dest sets custom dest. The contents of dest will be replaced by the response body, if the dest is too small a new slice will be allocated.

Signature
func (a *Agent) Dest(dest []byte) *Agent {
Example
agent.Dest(nil)
// ...

Bytes

Bytes returns the status code, bytes body and errors of url.

Signature
func (a *Agent) Bytes() (code int, body []byte, errs []error)
Example
code, body, errs := agent.Bytes()
// ...

String

String returns the status code, string body and errors of url.

Signature
func (a *Agent) String() (int, string, []error)
Example
code, body, errs := agent.String()
// ...

Struct

Struct returns the status code, bytes body and errors of url. And bytes body will be unmarshalled to given v.

Signature
func (a *Agent) Struct(v interface{}) (code int, body []byte, errs []error)
Example
var d data
code, body, errs := agent.Struct(&d)
// ...

RetryIf

RetryIf controls whether a retry should be attempted after an error. -By default, will use isIdempotent function from fasthttp

Signature
func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent
Example
agent.Get("https://example.com").RetryIf(func (req *fiber.Request) bool {
return req.URI() == "https://example.com"
})
// ...
- - +By default, will use isIdempotent function from fasthttp

Signature
func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent
Example
agent.Get("https://example.com").RetryIf(func (req *fiber.Request) bool {
return req.URI() == "https://example.com"
})
// ...
+ + \ No newline at end of file diff --git a/api/constants/index.html b/api/constants/index.html index d4a3fa5328c..386d68707d6 100644 --- a/api/constants/index.html +++ b/api/constants/index.html @@ -6,13 +6,13 @@ 📋 Constants | Fiber - - + +
-
Skip to main content
Version: v2.x

📋 Constants

HTTP methods were copied from net/http.

const (
MethodGet = "GET" // RFC 7231, 4.3.1
MethodHead = "HEAD" // RFC 7231, 4.3.2
MethodPost = "POST" // RFC 7231, 4.3.3
MethodPut = "PUT" // RFC 7231, 4.3.4
MethodPatch = "PATCH" // RFC 5789
MethodDelete = "DELETE" // RFC 7231, 4.3.5
MethodConnect = "CONNECT" // RFC 7231, 4.3.6
MethodOptions = "OPTIONS" // RFC 7231, 4.3.7
MethodTrace = "TRACE" // RFC 7231, 4.3.8
methodUse = "USE"
)

MIME types that are commonly used

const (
MIMETextXML = "text/xml"
MIMETextHTML = "text/html"
MIMETextPlain = "text/plain"
MIMEApplicationXML = "application/xml"
MIMEApplicationJSON = "application/json"
MIMEApplicationJavaScript = "application/javascript"
MIMEApplicationForm = "application/x-www-form-urlencoded"
MIMEOctetStream = "application/octet-stream"
MIMEMultipartForm = "multipart/form-data"

MIMETextXMLCharsetUTF8 = "text/xml; charset=utf-8"
MIMETextHTMLCharsetUTF8 = "text/html; charset=utf-8"
MIMETextPlainCharsetUTF8 = "text/plain; charset=utf-8"
MIMEApplicationXMLCharsetUTF8 = "application/xml; charset=utf-8"
MIMEApplicationJSONCharsetUTF8 = "application/json; charset=utf-8"
MIMEApplicationJavaScriptCharsetUTF8 = "application/javascript; charset=utf-8"
)

HTTP status codes were copied from net/http.

const (
StatusContinue = 100 // RFC 7231, 6.2.1
StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2
StatusProcessing = 102 // RFC 2518, 10.1
StatusEarlyHints = 103 // RFC 8297
StatusOK = 200 // RFC 7231, 6.3.1
StatusCreated = 201 // RFC 7231, 6.3.2
StatusAccepted = 202 // RFC 7231, 6.3.3
StatusNonAuthoritativeInformation = 203 // RFC 7231, 6.3.4
StatusNoContent = 204 // RFC 7231, 6.3.5
StatusResetContent = 205 // RFC 7231, 6.3.6
StatusPartialContent = 206 // RFC 7233, 4.1
StatusMultiStatus = 207 // RFC 4918, 11.1
StatusAlreadyReported = 208 // RFC 5842, 7.1
StatusIMUsed = 226 // RFC 3229, 10.4.1
StatusMultipleChoices = 300 // RFC 7231, 6.4.1
StatusMovedPermanently = 301 // RFC 7231, 6.4.2
StatusFound = 302 // RFC 7231, 6.4.3
StatusSeeOther = 303 // RFC 7231, 6.4.4
StatusNotModified = 304 // RFC 7232, 4.1
StatusUseProxy = 305 // RFC 7231, 6.4.5
StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7
StatusPermanentRedirect = 308 // RFC 7538, 3
StatusBadRequest = 400 // RFC 7231, 6.5.1
StatusUnauthorized = 401 // RFC 7235, 3.1
StatusPaymentRequired = 402 // RFC 7231, 6.5.2
StatusForbidden = 403 // RFC 7231, 6.5.3
StatusNotFound = 404 // RFC 7231, 6.5.4
StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5
StatusNotAcceptable = 406 // RFC 7231, 6.5.6
StatusProxyAuthRequired = 407 // RFC 7235, 3.2
StatusRequestTimeout = 408 // RFC 7231, 6.5.7
StatusConflict = 409 // RFC 7231, 6.5.8
StatusGone = 410 // RFC 7231, 6.5.9
StatusLengthRequired = 411 // RFC 7231, 6.5.10
StatusPreconditionFailed = 412 // RFC 7232, 4.2
StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11
StatusRequestURITooLong = 414 // RFC 7231, 6.5.12
StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13
StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4
StatusExpectationFailed = 417 // RFC 7231, 6.5.14
StatusTeapot = 418 // RFC 7168, 2.3.3
StatusMisdirectedRequest = 421 // RFC 7540, 9.1.2
StatusUnprocessableEntity = 422 // RFC 4918, 11.2
StatusLocked = 423 // RFC 4918, 11.3
StatusFailedDependency = 424 // RFC 4918, 11.4
StatusTooEarly = 425 // RFC 8470, 5.2.
StatusUpgradeRequired = 426 // RFC 7231, 6.5.15
StatusPreconditionRequired = 428 // RFC 6585, 3
StatusTooManyRequests = 429 // RFC 6585, 4
StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5
StatusUnavailableForLegalReasons = 451 // RFC 7725, 3
StatusInternalServerError = 500 // RFC 7231, 6.6.1
StatusNotImplemented = 501 // RFC 7231, 6.6.2
StatusBadGateway = 502 // RFC 7231, 6.6.3
StatusServiceUnavailable = 503 // RFC 7231, 6.6.4
StatusGatewayTimeout = 504 // RFC 7231, 6.6.5
StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6
StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1
StatusInsufficientStorage = 507 // RFC 4918, 11.5
StatusLoopDetected = 508 // RFC 5842, 7.2
StatusNotExtended = 510 // RFC 2774, 7
StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6
)

Errors

var (
ErrBadRequest = NewError(StatusBadRequest) // RFC 7231, 6.5.1
ErrUnauthorized = NewError(StatusUnauthorized) // RFC 7235, 3.1
ErrPaymentRequired = NewError(StatusPaymentRequired) // RFC 7231, 6.5.2
ErrForbidden = NewError(StatusForbidden) // RFC 7231, 6.5.3
ErrNotFound = NewError(StatusNotFound) // RFC 7231, 6.5.4
ErrMethodNotAllowed = NewError(StatusMethodNotAllowed) // RFC 7231, 6.5.5
ErrNotAcceptable = NewError(StatusNotAcceptable) // RFC 7231, 6.5.6
ErrProxyAuthRequired = NewError(StatusProxyAuthRequired) // RFC 7235, 3.2
ErrRequestTimeout = NewError(StatusRequestTimeout) // RFC 7231, 6.5.7
ErrConflict = NewError(StatusConflict) // RFC 7231, 6.5.8
ErrGone = NewError(StatusGone) // RFC 7231, 6.5.9
ErrLengthRequired = NewError(StatusLengthRequired) // RFC 7231, 6.5.10
ErrPreconditionFailed = NewError(StatusPreconditionFailed) // RFC 7232, 4.2
ErrRequestEntityTooLarge = NewError(StatusRequestEntityTooLarge) // RFC 7231, 6.5.11
ErrRequestURITooLong = NewError(StatusRequestURITooLong) // RFC 7231, 6.5.12
ErrUnsupportedMediaType = NewError(StatusUnsupportedMediaType) // RFC 7231, 6.5.13
ErrRequestedRangeNotSatisfiable = NewError(StatusRequestedRangeNotSatisfiable) // RFC 7233, 4.4
ErrExpectationFailed = NewError(StatusExpectationFailed) // RFC 7231, 6.5.14
ErrTeapot = NewError(StatusTeapot) // RFC 7168, 2.3.3
ErrMisdirectedRequest = NewError(StatusMisdirectedRequest) // RFC 7540, 9.1.2
ErrUnprocessableEntity = NewError(StatusUnprocessableEntity) // RFC 4918, 11.2
ErrLocked = NewError(StatusLocked) // RFC 4918, 11.3
ErrFailedDependency = NewError(StatusFailedDependency) // RFC 4918, 11.4
ErrTooEarly = NewError(StatusTooEarly) // RFC 8470, 5.2.
ErrUpgradeRequired = NewError(StatusUpgradeRequired) // RFC 7231, 6.5.15
ErrPreconditionRequired = NewError(StatusPreconditionRequired) // RFC 6585, 3
ErrTooManyRequests = NewError(StatusTooManyRequests) // RFC 6585, 4
ErrRequestHeaderFieldsTooLarge = NewError(StatusRequestHeaderFieldsTooLarge) // RFC 6585, 5
ErrUnavailableForLegalReasons = NewError(StatusUnavailableForLegalReasons) // RFC 7725, 3
ErrInternalServerError = NewError(StatusInternalServerError) // RFC 7231, 6.6.1
ErrNotImplemented = NewError(StatusNotImplemented) // RFC 7231, 6.6.2
ErrBadGateway = NewError(StatusBadGateway) // RFC 7231, 6.6.3
ErrServiceUnavailable = NewError(StatusServiceUnavailable) // RFC 7231, 6.6.4
ErrGatewayTimeout = NewError(StatusGatewayTimeout) // RFC 7231, 6.6.5
ErrHTTPVersionNotSupported = NewError(StatusHTTPVersionNotSupported) // RFC 7231, 6.6.6
ErrVariantAlsoNegotiates = NewError(StatusVariantAlsoNegotiates) // RFC 2295, 8.1
ErrInsufficientStorage = NewError(StatusInsufficientStorage) // RFC 4918, 11.5
ErrLoopDetected = NewError(StatusLoopDetected) // RFC 5842, 7.2
ErrNotExtended = NewError(StatusNotExtended) // RFC 2774, 7
ErrNetworkAuthenticationRequired = NewError(StatusNetworkAuthenticationRequired) // RFC 6585, 6
)

HTTP Headers were copied from net/http.

const (
HeaderAuthorization = "Authorization"
HeaderProxyAuthenticate = "Proxy-Authenticate"
HeaderProxyAuthorization = "Proxy-Authorization"
HeaderWWWAuthenticate = "WWW-Authenticate"
HeaderAge = "Age"
HeaderCacheControl = "Cache-Control"
HeaderClearSiteData = "Clear-Site-Data"
HeaderExpires = "Expires"
HeaderPragma = "Pragma"
HeaderWarning = "Warning"
HeaderAcceptCH = "Accept-CH"
HeaderAcceptCHLifetime = "Accept-CH-Lifetime"
HeaderContentDPR = "Content-DPR"
HeaderDPR = "DPR"
HeaderEarlyData = "Early-Data"
HeaderSaveData = "Save-Data"
HeaderViewportWidth = "Viewport-Width"
HeaderWidth = "Width"
HeaderETag = "ETag"
HeaderIfMatch = "If-Match"
HeaderIfModifiedSince = "If-Modified-Since"
HeaderIfNoneMatch = "If-None-Match"
HeaderIfUnmodifiedSince = "If-Unmodified-Since"
HeaderLastModified = "Last-Modified"
HeaderVary = "Vary"
HeaderConnection = "Connection"
HeaderKeepAlive = "Keep-Alive"
HeaderAccept = "Accept"
HeaderAcceptCharset = "Accept-Charset"
HeaderAcceptEncoding = "Accept-Encoding"
HeaderAcceptLanguage = "Accept-Language"
HeaderCookie = "Cookie"
HeaderExpect = "Expect"
HeaderMaxForwards = "Max-Forwards"
HeaderSetCookie = "Set-Cookie"
HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"
HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers"
HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods"
HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin"
HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers"
HeaderAccessControlMaxAge = "Access-Control-Max-Age"
HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers"
HeaderAccessControlRequestMethod = "Access-Control-Request-Method"
HeaderOrigin = "Origin"
HeaderTimingAllowOrigin = "Timing-Allow-Origin"
HeaderXPermittedCrossDomainPolicies = "X-Permitted-Cross-Domain-Policies"
HeaderDNT = "DNT"
HeaderTk = "Tk"
HeaderContentDisposition = "Content-Disposition"
HeaderContentEncoding = "Content-Encoding"
HeaderContentLanguage = "Content-Language"
HeaderContentLength = "Content-Length"
HeaderContentLocation = "Content-Location"
HeaderContentType = "Content-Type"
HeaderForwarded = "Forwarded"
HeaderVia = "Via"
HeaderXForwardedFor = "X-Forwarded-For"
HeaderXForwardedHost = "X-Forwarded-Host"
HeaderXForwardedProto = "X-Forwarded-Proto"
HeaderXForwardedProtocol = "X-Forwarded-Protocol"
HeaderXForwardedSsl = "X-Forwarded-Ssl"
HeaderXUrlScheme = "X-Url-Scheme"
HeaderLocation = "Location"
HeaderFrom = "From"
HeaderHost = "Host"
HeaderReferer = "Referer"
HeaderReferrerPolicy = "Referrer-Policy"
HeaderUserAgent = "User-Agent"
HeaderAllow = "Allow"
HeaderServer = "Server"
HeaderAcceptRanges = "Accept-Ranges"
HeaderContentRange = "Content-Range"
HeaderIfRange = "If-Range"
HeaderRange = "Range"
HeaderContentSecurityPolicy = "Content-Security-Policy"
HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"
HeaderCrossOriginResourcePolicy = "Cross-Origin-Resource-Policy"
HeaderExpectCT = "Expect-CT"
HeaderFeaturePolicy = "Feature-Policy"
HeaderPublicKeyPins = "Public-Key-Pins"
HeaderPublicKeyPinsReportOnly = "Public-Key-Pins-Report-Only"
HeaderStrictTransportSecurity = "Strict-Transport-Security"
HeaderUpgradeInsecureRequests = "Upgrade-Insecure-Requests"
HeaderXContentTypeOptions = "X-Content-Type-Options"
HeaderXDownloadOptions = "X-Download-Options"
HeaderXFrameOptions = "X-Frame-Options"
HeaderXPoweredBy = "X-Powered-By"
HeaderXXSSProtection = "X-XSS-Protection"
HeaderLastEventID = "Last-Event-ID"
HeaderNEL = "NEL"
HeaderPingFrom = "Ping-From"
HeaderPingTo = "Ping-To"
HeaderReportTo = "Report-To"
HeaderTE = "TE"
HeaderTrailer = "Trailer"
HeaderTransferEncoding = "Transfer-Encoding"
HeaderSecWebSocketAccept = "Sec-WebSocket-Accept"
HeaderSecWebSocketExtensions = "Sec-WebSocket-Extensions"
HeaderSecWebSocketKey = "Sec-WebSocket-Key"
HeaderSecWebSocketProtocol = "Sec-WebSocket-Protocol"
HeaderSecWebSocketVersion = "Sec-WebSocket-Version"
HeaderAcceptPatch = "Accept-Patch"
HeaderAcceptPushPolicy = "Accept-Push-Policy"
HeaderAcceptSignature = "Accept-Signature"
HeaderAltSvc = "Alt-Svc"
HeaderDate = "Date"
HeaderIndex = "Index"
HeaderLargeAllocation = "Large-Allocation"
HeaderLink = "Link"
HeaderPushPolicy = "Push-Policy"
HeaderRetryAfter = "Retry-After"
HeaderServerTiming = "Server-Timing"
HeaderSignature = "Signature"
HeaderSignedHeaders = "Signed-Headers"
HeaderSourceMap = "SourceMap"
HeaderUpgrade = "Upgrade"
HeaderXDNSPrefetchControl = "X-DNS-Prefetch-Control"
HeaderXPingback = "X-Pingback"
HeaderXRequestID = "X-Request-ID"
HeaderXRequestedWith = "X-Requested-With"
HeaderXRobotsTag = "X-Robots-Tag"
HeaderXUACompatible = "X-UA-Compatible"
)
- - +
Skip to main content
Version: v2.x

📋 Constants

HTTP methods were copied from net/http.

const (
MethodGet = "GET" // RFC 7231, 4.3.1
MethodHead = "HEAD" // RFC 7231, 4.3.2
MethodPost = "POST" // RFC 7231, 4.3.3
MethodPut = "PUT" // RFC 7231, 4.3.4
MethodPatch = "PATCH" // RFC 5789
MethodDelete = "DELETE" // RFC 7231, 4.3.5
MethodConnect = "CONNECT" // RFC 7231, 4.3.6
MethodOptions = "OPTIONS" // RFC 7231, 4.3.7
MethodTrace = "TRACE" // RFC 7231, 4.3.8
methodUse = "USE"
)

MIME types that are commonly used

const (
MIMETextXML = "text/xml"
MIMETextHTML = "text/html"
MIMETextPlain = "text/plain"
MIMEApplicationXML = "application/xml"
MIMEApplicationJSON = "application/json"
MIMEApplicationJavaScript = "application/javascript"
MIMEApplicationForm = "application/x-www-form-urlencoded"
MIMEOctetStream = "application/octet-stream"
MIMEMultipartForm = "multipart/form-data"

MIMETextXMLCharsetUTF8 = "text/xml; charset=utf-8"
MIMETextHTMLCharsetUTF8 = "text/html; charset=utf-8"
MIMETextPlainCharsetUTF8 = "text/plain; charset=utf-8"
MIMEApplicationXMLCharsetUTF8 = "application/xml; charset=utf-8"
MIMEApplicationJSONCharsetUTF8 = "application/json; charset=utf-8"
MIMEApplicationJavaScriptCharsetUTF8 = "application/javascript; charset=utf-8"
)

HTTP status codes were copied from net/http.

const (
StatusContinue = 100 // RFC 7231, 6.2.1
StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2
StatusProcessing = 102 // RFC 2518, 10.1
StatusEarlyHints = 103 // RFC 8297
StatusOK = 200 // RFC 7231, 6.3.1
StatusCreated = 201 // RFC 7231, 6.3.2
StatusAccepted = 202 // RFC 7231, 6.3.3
StatusNonAuthoritativeInformation = 203 // RFC 7231, 6.3.4
StatusNoContent = 204 // RFC 7231, 6.3.5
StatusResetContent = 205 // RFC 7231, 6.3.6
StatusPartialContent = 206 // RFC 7233, 4.1
StatusMultiStatus = 207 // RFC 4918, 11.1
StatusAlreadyReported = 208 // RFC 5842, 7.1
StatusIMUsed = 226 // RFC 3229, 10.4.1
StatusMultipleChoices = 300 // RFC 7231, 6.4.1
StatusMovedPermanently = 301 // RFC 7231, 6.4.2
StatusFound = 302 // RFC 7231, 6.4.3
StatusSeeOther = 303 // RFC 7231, 6.4.4
StatusNotModified = 304 // RFC 7232, 4.1
StatusUseProxy = 305 // RFC 7231, 6.4.5
StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7
StatusPermanentRedirect = 308 // RFC 7538, 3
StatusBadRequest = 400 // RFC 7231, 6.5.1
StatusUnauthorized = 401 // RFC 7235, 3.1
StatusPaymentRequired = 402 // RFC 7231, 6.5.2
StatusForbidden = 403 // RFC 7231, 6.5.3
StatusNotFound = 404 // RFC 7231, 6.5.4
StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5
StatusNotAcceptable = 406 // RFC 7231, 6.5.6
StatusProxyAuthRequired = 407 // RFC 7235, 3.2
StatusRequestTimeout = 408 // RFC 7231, 6.5.7
StatusConflict = 409 // RFC 7231, 6.5.8
StatusGone = 410 // RFC 7231, 6.5.9
StatusLengthRequired = 411 // RFC 7231, 6.5.10
StatusPreconditionFailed = 412 // RFC 7232, 4.2
StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11
StatusRequestURITooLong = 414 // RFC 7231, 6.5.12
StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13
StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4
StatusExpectationFailed = 417 // RFC 7231, 6.5.14
StatusTeapot = 418 // RFC 7168, 2.3.3
StatusMisdirectedRequest = 421 // RFC 7540, 9.1.2
StatusUnprocessableEntity = 422 // RFC 4918, 11.2
StatusLocked = 423 // RFC 4918, 11.3
StatusFailedDependency = 424 // RFC 4918, 11.4
StatusTooEarly = 425 // RFC 8470, 5.2.
StatusUpgradeRequired = 426 // RFC 7231, 6.5.15
StatusPreconditionRequired = 428 // RFC 6585, 3
StatusTooManyRequests = 429 // RFC 6585, 4
StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5
StatusUnavailableForLegalReasons = 451 // RFC 7725, 3
StatusInternalServerError = 500 // RFC 7231, 6.6.1
StatusNotImplemented = 501 // RFC 7231, 6.6.2
StatusBadGateway = 502 // RFC 7231, 6.6.3
StatusServiceUnavailable = 503 // RFC 7231, 6.6.4
StatusGatewayTimeout = 504 // RFC 7231, 6.6.5
StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6
StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1
StatusInsufficientStorage = 507 // RFC 4918, 11.5
StatusLoopDetected = 508 // RFC 5842, 7.2
StatusNotExtended = 510 // RFC 2774, 7
StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6
)

Errors

var (
ErrBadRequest = NewError(StatusBadRequest) // RFC 7231, 6.5.1
ErrUnauthorized = NewError(StatusUnauthorized) // RFC 7235, 3.1
ErrPaymentRequired = NewError(StatusPaymentRequired) // RFC 7231, 6.5.2
ErrForbidden = NewError(StatusForbidden) // RFC 7231, 6.5.3
ErrNotFound = NewError(StatusNotFound) // RFC 7231, 6.5.4
ErrMethodNotAllowed = NewError(StatusMethodNotAllowed) // RFC 7231, 6.5.5
ErrNotAcceptable = NewError(StatusNotAcceptable) // RFC 7231, 6.5.6
ErrProxyAuthRequired = NewError(StatusProxyAuthRequired) // RFC 7235, 3.2
ErrRequestTimeout = NewError(StatusRequestTimeout) // RFC 7231, 6.5.7
ErrConflict = NewError(StatusConflict) // RFC 7231, 6.5.8
ErrGone = NewError(StatusGone) // RFC 7231, 6.5.9
ErrLengthRequired = NewError(StatusLengthRequired) // RFC 7231, 6.5.10
ErrPreconditionFailed = NewError(StatusPreconditionFailed) // RFC 7232, 4.2
ErrRequestEntityTooLarge = NewError(StatusRequestEntityTooLarge) // RFC 7231, 6.5.11
ErrRequestURITooLong = NewError(StatusRequestURITooLong) // RFC 7231, 6.5.12
ErrUnsupportedMediaType = NewError(StatusUnsupportedMediaType) // RFC 7231, 6.5.13
ErrRequestedRangeNotSatisfiable = NewError(StatusRequestedRangeNotSatisfiable) // RFC 7233, 4.4
ErrExpectationFailed = NewError(StatusExpectationFailed) // RFC 7231, 6.5.14
ErrTeapot = NewError(StatusTeapot) // RFC 7168, 2.3.3
ErrMisdirectedRequest = NewError(StatusMisdirectedRequest) // RFC 7540, 9.1.2
ErrUnprocessableEntity = NewError(StatusUnprocessableEntity) // RFC 4918, 11.2
ErrLocked = NewError(StatusLocked) // RFC 4918, 11.3
ErrFailedDependency = NewError(StatusFailedDependency) // RFC 4918, 11.4
ErrTooEarly = NewError(StatusTooEarly) // RFC 8470, 5.2.
ErrUpgradeRequired = NewError(StatusUpgradeRequired) // RFC 7231, 6.5.15
ErrPreconditionRequired = NewError(StatusPreconditionRequired) // RFC 6585, 3
ErrTooManyRequests = NewError(StatusTooManyRequests) // RFC 6585, 4
ErrRequestHeaderFieldsTooLarge = NewError(StatusRequestHeaderFieldsTooLarge) // RFC 6585, 5
ErrUnavailableForLegalReasons = NewError(StatusUnavailableForLegalReasons) // RFC 7725, 3
ErrInternalServerError = NewError(StatusInternalServerError) // RFC 7231, 6.6.1
ErrNotImplemented = NewError(StatusNotImplemented) // RFC 7231, 6.6.2
ErrBadGateway = NewError(StatusBadGateway) // RFC 7231, 6.6.3
ErrServiceUnavailable = NewError(StatusServiceUnavailable) // RFC 7231, 6.6.4
ErrGatewayTimeout = NewError(StatusGatewayTimeout) // RFC 7231, 6.6.5
ErrHTTPVersionNotSupported = NewError(StatusHTTPVersionNotSupported) // RFC 7231, 6.6.6
ErrVariantAlsoNegotiates = NewError(StatusVariantAlsoNegotiates) // RFC 2295, 8.1
ErrInsufficientStorage = NewError(StatusInsufficientStorage) // RFC 4918, 11.5
ErrLoopDetected = NewError(StatusLoopDetected) // RFC 5842, 7.2
ErrNotExtended = NewError(StatusNotExtended) // RFC 2774, 7
ErrNetworkAuthenticationRequired = NewError(StatusNetworkAuthenticationRequired) // RFC 6585, 6
)

HTTP Headers were copied from net/http.

const (
HeaderAuthorization = "Authorization"
HeaderProxyAuthenticate = "Proxy-Authenticate"
HeaderProxyAuthorization = "Proxy-Authorization"
HeaderWWWAuthenticate = "WWW-Authenticate"
HeaderAge = "Age"
HeaderCacheControl = "Cache-Control"
HeaderClearSiteData = "Clear-Site-Data"
HeaderExpires = "Expires"
HeaderPragma = "Pragma"
HeaderWarning = "Warning"
HeaderAcceptCH = "Accept-CH"
HeaderAcceptCHLifetime = "Accept-CH-Lifetime"
HeaderContentDPR = "Content-DPR"
HeaderDPR = "DPR"
HeaderEarlyData = "Early-Data"
HeaderSaveData = "Save-Data"
HeaderViewportWidth = "Viewport-Width"
HeaderWidth = "Width"
HeaderETag = "ETag"
HeaderIfMatch = "If-Match"
HeaderIfModifiedSince = "If-Modified-Since"
HeaderIfNoneMatch = "If-None-Match"
HeaderIfUnmodifiedSince = "If-Unmodified-Since"
HeaderLastModified = "Last-Modified"
HeaderVary = "Vary"
HeaderConnection = "Connection"
HeaderKeepAlive = "Keep-Alive"
HeaderAccept = "Accept"
HeaderAcceptCharset = "Accept-Charset"
HeaderAcceptEncoding = "Accept-Encoding"
HeaderAcceptLanguage = "Accept-Language"
HeaderCookie = "Cookie"
HeaderExpect = "Expect"
HeaderMaxForwards = "Max-Forwards"
HeaderSetCookie = "Set-Cookie"
HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"
HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers"
HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods"
HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin"
HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers"
HeaderAccessControlMaxAge = "Access-Control-Max-Age"
HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers"
HeaderAccessControlRequestMethod = "Access-Control-Request-Method"
HeaderOrigin = "Origin"
HeaderTimingAllowOrigin = "Timing-Allow-Origin"
HeaderXPermittedCrossDomainPolicies = "X-Permitted-Cross-Domain-Policies"
HeaderDNT = "DNT"
HeaderTk = "Tk"
HeaderContentDisposition = "Content-Disposition"
HeaderContentEncoding = "Content-Encoding"
HeaderContentLanguage = "Content-Language"
HeaderContentLength = "Content-Length"
HeaderContentLocation = "Content-Location"
HeaderContentType = "Content-Type"
HeaderForwarded = "Forwarded"
HeaderVia = "Via"
HeaderXForwardedFor = "X-Forwarded-For"
HeaderXForwardedHost = "X-Forwarded-Host"
HeaderXForwardedProto = "X-Forwarded-Proto"
HeaderXForwardedProtocol = "X-Forwarded-Protocol"
HeaderXForwardedSsl = "X-Forwarded-Ssl"
HeaderXUrlScheme = "X-Url-Scheme"
HeaderLocation = "Location"
HeaderFrom = "From"
HeaderHost = "Host"
HeaderReferer = "Referer"
HeaderReferrerPolicy = "Referrer-Policy"
HeaderUserAgent = "User-Agent"
HeaderAllow = "Allow"
HeaderServer = "Server"
HeaderAcceptRanges = "Accept-Ranges"
HeaderContentRange = "Content-Range"
HeaderIfRange = "If-Range"
HeaderRange = "Range"
HeaderContentSecurityPolicy = "Content-Security-Policy"
HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"
HeaderCrossOriginResourcePolicy = "Cross-Origin-Resource-Policy"
HeaderExpectCT = "Expect-CT"
HeaderFeaturePolicy = "Feature-Policy"
HeaderPublicKeyPins = "Public-Key-Pins"
HeaderPublicKeyPinsReportOnly = "Public-Key-Pins-Report-Only"
HeaderStrictTransportSecurity = "Strict-Transport-Security"
HeaderUpgradeInsecureRequests = "Upgrade-Insecure-Requests"
HeaderXContentTypeOptions = "X-Content-Type-Options"
HeaderXDownloadOptions = "X-Download-Options"
HeaderXFrameOptions = "X-Frame-Options"
HeaderXPoweredBy = "X-Powered-By"
HeaderXXSSProtection = "X-XSS-Protection"
HeaderLastEventID = "Last-Event-ID"
HeaderNEL = "NEL"
HeaderPingFrom = "Ping-From"
HeaderPingTo = "Ping-To"
HeaderReportTo = "Report-To"
HeaderTE = "TE"
HeaderTrailer = "Trailer"
HeaderTransferEncoding = "Transfer-Encoding"
HeaderSecWebSocketAccept = "Sec-WebSocket-Accept"
HeaderSecWebSocketExtensions = "Sec-WebSocket-Extensions"
HeaderSecWebSocketKey = "Sec-WebSocket-Key"
HeaderSecWebSocketProtocol = "Sec-WebSocket-Protocol"
HeaderSecWebSocketVersion = "Sec-WebSocket-Version"
HeaderAcceptPatch = "Accept-Patch"
HeaderAcceptPushPolicy = "Accept-Push-Policy"
HeaderAcceptSignature = "Accept-Signature"
HeaderAltSvc = "Alt-Svc"
HeaderDate = "Date"
HeaderIndex = "Index"
HeaderLargeAllocation = "Large-Allocation"
HeaderLink = "Link"
HeaderPushPolicy = "Push-Policy"
HeaderRetryAfter = "Retry-After"
HeaderServerTiming = "Server-Timing"
HeaderSignature = "Signature"
HeaderSignedHeaders = "Signed-Headers"
HeaderSourceMap = "SourceMap"
HeaderUpgrade = "Upgrade"
HeaderXDNSPrefetchControl = "X-DNS-Prefetch-Control"
HeaderXPingback = "X-Pingback"
HeaderXRequestID = "X-Request-ID"
HeaderXRequestedWith = "X-Requested-With"
HeaderXRobotsTag = "X-Robots-Tag"
HeaderXUACompatible = "X-UA-Compatible"
)
+ + \ No newline at end of file diff --git a/api/ctx/index.html b/api/ctx/index.html index 0cda6fa6edf..15de42767d1 100644 --- a/api/ctx/index.html +++ b/api/ctx/index.html @@ -6,8 +6,8 @@ 🧠 Ctx | Fiber - - + +
@@ -24,8 +24,8 @@ If the parameter is not a number, it is still tried to be converted and usually returned as 1.

info

Defaults to the integer zero (0), if the param doesn't exist.

Signature
func (c *Ctx) QueryInt(key string, defaultValue ...int) int
Example
// GET http://example.com/?name=alex&wanna_cake=2&id=

app.Get("/", func(c *fiber.Ctx) error {
c.QueryInt("wanna_cake", 1) // 2
c.QueryInt("name", 1) // 1
c.QueryInt("id", 1) // 1
c.QueryInt("id") // 0

// ...
})

QueryParser

This method is similar to BodyParser, but for query parameters. It is important to use the struct tag "query". For example, if you want to parse a query parameter with a field called Pass, you would use a struct field of query:"pass".

Signature
func (c *Ctx) QueryParser(out interface{}) error
Example
// Field names should start with an uppercase letter
type Person struct {
Name string `query:"name"`
Pass string `query:"pass"`
Products []string `query:"products"`
}

app.Get("/", func(c *fiber.Ctx) error {
p := new(Person)

if err := c.QueryParser(p); err != nil {
return err
}

log.Println(p.Name) // john
log.Println(p.Pass) // doe
log.Println(p.Products) // [shoe, hat]

// ...
})
// Run tests with the following curl command

// curl "http://localhost:3000/?name=john&pass=doe&products=shoe,hat"

Range

A struct containing the type and a slice of ranges will be returned.

Signature
func (c *Ctx) Range(size int) (Range, error)
Example
// Range: bytes=500-700, 700-900
app.Get("/", func(c *fiber.Ctx) error {
b := c.Range(1000)
if b.Type == "bytes" {
for r := range r.Ranges {
fmt.Println(r)
// [500, 700]
}
}
})

Redirect

Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code.

info

If not specified, status defaults to 302 Found.

Signature
func (c *Ctx) Redirect(location string, status ...int) error
Example
app.Get("/coffee", func(c *fiber.Ctx) error {
return c.Redirect("/teapot")
})

app.Get("/teapot", func(c *fiber.Ctx) error {
return c.Status(fiber.StatusTeapot).Send("🍵 short and stout 🍵")
})
More examples
app.Get("/", func(c *fiber.Ctx) error {
return c.Redirect("/foo/bar")
return c.Redirect("../login")
return c.Redirect("http://example.com")
return c.Redirect("http://example.com", 301)
})

RedirectToRoute

Redirects to the specific route along with the parameters and with specified status, a positive integer that corresponds to an HTTP status code.

info

If not specified, status defaults to 302 Found.

info

If you want to send queries to route, you must add "queries" key typed as map[string]string to params.

Signature
func (c *Ctx) RedirectToRoute(routeName string, params fiber.Map, status ...int) error
Example
app.Get("/", func(c *fiber.Ctx) error {
// /user/fiber
return c.RedirectToRoute("user", fiber.Map{
"name": "fiber"
})
})

app.Get("/with-queries", func(c *fiber.Ctx) error {
// /user/fiber?data[0][name]=john&data[0][age]=10&test=doe
return c.RedirectToRoute("user", fiber.Map{
"name": "fiber",
"queries": map[string]string{"data[0][name]": "john", "data[0][age]": "10", "test": "doe"},
})
})

app.Get("/user/:name", func(c *fiber.Ctx) error {
return c.SendString(c.Params("name"))
}).Name("user")

RedirectBack

Redirects back to refer URL. It redirects to fallback URL if refer header doesn't exists, with specified status, a positive integer that corresponds to an HTTP status code.

info

If not specified, status defaults to 302 Found.

Signature
func (c *Ctx) RedirectBack(fallback string, status ...int) error
Example
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Home page")
})
app.Get("/test", func(c *fiber.Ctx) error {
c.Set("Content-Type", "text/html")
return c.SendString(`<a href="/back">Back</a>`)
})

app.Get("/back", func(c *fiber.Ctx) error {
return c.RedirectBack("/")
})

Render

Renders a view with data and sends a text/html response. By default Render uses the default Go Template engine. If you want to use another View engine, please take a look at our Template middleware.

Signature
func (c *Ctx) Render(name string, bind interface{}, layouts ...string) error

Request

Request return the *fasthttp.Request pointer

Signature
func (c *Ctx) Request() *fasthttp.Request
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Request().Header.Method()
// => []byte("GET")
})

ReqHeaderParser

This method is similar to BodyParser, but for request headers. It is important to use the struct tag "reqHeader". For example, if you want to parse a request header with a field called Pass, you would use a struct field of reqHeader:"pass".

Signature
func (c *Ctx) ReqHeaderParser(out interface{}) error
Example
// Field names should start with an uppercase letter
type Person struct {
Name string `reqHeader:"name"`
Pass string `reqHeader:"pass"`
Products []string `reqHeader:"products"`
}

app.Get("/", func(c *fiber.Ctx) error {
p := new(Person)

if err := c.ReqHeaderParser(p); err != nil {
return err
}

log.Println(p.Name) // john
log.Println(p.Pass) // doe
log.Println(p.Products) // [shoe, hat]

// ...
})
// Run tests with the following curl command

// curl "http://localhost:3000/" -H "name: john" -H "pass: doe" -H "products: shoe,hat"

Response

Response return the *fasthttp.Response pointer

Signature
func (c *Ctx) Response() *fasthttp.Response
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Response().BodyWriter().Write([]byte("Hello, World!"))
// => "Hello, World!"
return nil
})

RestartRouting

Instead of executing the next method when calling Next, RestartRouting restarts execution from the first method that matches the current route. This may be helpful after overriding the path, i. e. an internal redirect. Note that handlers might be executed again which could result in an infinite loop.

Signature
func (c *Ctx) RestartRouting() error
Example
app.Get("/new", func(c *fiber.Ctx) error {
return c.SendString("From /new")
})

app.Get("/old", func(c *fiber.Ctx) error {
c.Path("/new")
return c.RestartRouting()
})

Route

Returns the matched Route struct.

Signature
func (c *Ctx) Route() *Route
Example
// http://localhost:8080/hello


app.Get("/hello/:name", func(c *fiber.Ctx) error {
r := c.Route()
fmt.Println(r.Method, r.Path, r.Params, r.Handlers)
// GET /hello/:name handler [name]

// ...
})
caution

Do not rely on c.Route() in middlewares before calling c.Next() - c.Route() returns the last executed route.

Example
func MyMiddleware() fiber.Handler {
return func(c *fiber.Ctx) error {
beforeNext := c.Route().Path // Will be '/'
err := c.Next()
afterNext := c.Route().Path // Will be '/hello/:name'
return err
}
}

SaveFile

Method is used to save any multipart file to disk.

Signature
func (c *Ctx) SaveFile(fh *multipart.FileHeader, path string) error
Example
app.Post("/", func(c *fiber.Ctx) error {
// Parse the multipart form:
if form, err := c.MultipartForm(); err == nil {
// => *multipart.Form

// Get all files from "documents" key:
files := form.File["documents"]
// => []*multipart.FileHeader

// Loop through files:
for _, file := range files {
fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])
// => "tutorial.pdf" 360641 "application/pdf"

// Save the files to disk:
if err := c.SaveFile(file, fmt.Sprintf("./%s", file.Filename)); err != nil {
return err
}
}
return err
}
})

SaveFileToStorage

Method is used to save any multipart file to an external storage system.

Signature
func (c *Ctx) SaveFileToStorage(fileheader *multipart.FileHeader, path string, storage Storage) error
Example
storage := memory.New()

app.Post("/", func(c *fiber.Ctx) error {
// Parse the multipart form:
if form, err := c.MultipartForm(); err == nil {
// => *multipart.Form

// Get all files from "documents" key:
files := form.File["documents"]
// => []*multipart.FileHeader

// Loop through files:
for _, file := range files {
fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])
// => "tutorial.pdf" 360641 "application/pdf"

// Save the files to storage:
if err := c.SaveFileToStorage(file, fmt.Sprintf("./%s", file.Filename), storage); err != nil {
return err
}
}
return err
}
})

Secure

A boolean property that is true , if a TLS connection is established.

Signature
func (c *Ctx) Secure() bool
Example
// Secure() method is equivalent to:
c.Protocol() == "https"

Send

Sets the HTTP response body.

Signature
func (c *Ctx) Send(body []byte) error
Example
app.Get("/", func(c *fiber.Ctx) error {
return c.Send([]byte("Hello, World!")) // => "Hello, World!"
})

Fiber also provides SendString and SendStream methods for raw inputs.

tip

Use this if you don't need type assertion, recommended for faster performance.

Signature
func (c *Ctx) SendString(body string) error
func (c *Ctx) SendStream(stream io.Reader, size ...int) error
Example
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
// => "Hello, World!"

return c.SendStream(bytes.NewReader([]byte("Hello, World!")))
// => "Hello, World!"
})

SendFile

Transfers the file from the given path. Sets the Content-Type response HTTP header field based on the filenames extension.

caution

Method doesn´t use gzipping by default, set it to true to enable.

Signature
func (c *Ctx) SendFile(file string, compress ...bool) error
Example
app.Get("/not-found", func(c *fiber.Ctx) error {
return c.SendFile("./public/404.html");

// Disable compression
return c.SendFile("./static/index.html", false);
})
info

If the file contains an url specific character you have to escape it before passing the file path into the sendFile function.

Example
app.Get("/file-with-url-chars", func(c *fiber.Ctx) error {
return c.SendFile(url.PathEscape("hash_sign_#.txt"))
})

SendStatus

Sets the status code and the correct status message in the body, if the response body is empty.

tip

You can find all used status codes and messages here.

Signature
func (c *Ctx) SendStatus(status int) error
Example
app.Get("/not-found", func(c *fiber.Ctx) error {
return c.SendStatus(415)
// => 415 "Unsupported Media Type"

c.SendString("Hello, World!")
return c.SendStatus(415)
// => 415 "Hello, World!"
})

Set

Sets the response’s HTTP header field to the specified key, value.

Signature
func (c *Ctx) Set(key string, val string)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Set("Content-Type", "text/plain")
// => "Content-type: text/plain"

// ...
})

SetParserDecoder

Allow you to config BodyParser/QueryParser decoder, base on schema's options, providing possibility to add custom type for pausing.

Signature
func SetParserDecoder(parserConfig fiber.ParserConfig{
IgnoreUnknownKeys bool,
ParserType []fiber.ParserType{
Customtype interface{},
Converter func(string) reflect.Value,
},
ZeroEmpty bool,
SetAliasTag string,
})
Example

type CustomTime time.Time

// String() returns the time in string
func (ct *CustomTime) String() string {
t := time.Time(*ct).String()
return t
}

// Register the converter for CustomTime type format as 2006-01-02
var timeConverter = func(value string) reflect.Value {
fmt.Println("timeConverter", value)
if v, err := time.Parse("2006-01-02", value); err == nil {
return reflect.ValueOf(v)
}
return reflect.Value{}
}

customTime := fiber.ParserType{
Customtype: CustomTime{},
Converter: timeConverter,
}

// Add setting to the Decoder
fiber.SetParserDecoder(fiber.ParserConfig{
IgnoreUnknownKeys: true,
ParserType: []fiber.ParserType{customTime},
ZeroEmpty: true,
})

// Example to use CustomType, you pause custom time format not in RFC3339
type Demo struct {
Date CustomTime `form:"date" query:"date"`
Title string `form:"title" query:"title"`
Body string `form:"body" query:"body"`
}

app.Post("/body", func(c *fiber.Ctx) error {
var d Demo
c.BodyParser(&d)
fmt.Println("d.Date", d.Date.String())
return c.JSON(d)
})

app.Get("/query", func(c *fiber.Ctx) error {
var d Demo
c.QueryParser(&d)
fmt.Println("d.Date", d.Date.String())
return c.JSON(d)
})

// curl -X POST -F title=title -F body=body -F date=2021-10-20 http://localhost:3000/body

// curl -X GET "http://localhost:3000/query?title=title&body=body&date=2021-10-20"

SetUserContext

Sets the user specified implementation for context interface.

Signature
func (c *Ctx) SetUserContext(ctx context.Context)
Example
app.Get("/", func(c *fiber.Ctx) error {
ctx := context.Background()
c.SetUserContext(ctx)
// Here ctx could be any context implementation

// ...
})

Stale

https://expressjs.com/en/4x/api.html#req.stale

Signature
func (c *Ctx) Stale() bool

Status

Sets the HTTP status for the response.

info

Method is a chainable.

Signature
func (c *Ctx) Status(status int) *Ctx
Example
app.Get("/fiber", func(c *fiber.Ctx) error {
c.Status(fiber.StatusOK)
return nil
}

app.Get("/hello", func(c *fiber.Ctx) error {
return c.Status(fiber.StatusBadRequest).SendString("Bad Request")
}

app.Get("/world", func(c *fiber.Ctx) error {
return c.Status(fiber.StatusNotFound).SendFile("./public/gopher.png")
})

Subdomains

Returns a string slice of subdomains in the domain name of the request.

The application property subdomain offset, which defaults to 2, is used for determining the beginning of the subdomain segments.

Signature
func (c *Ctx) Subdomains(offset ...int) []string
Example
// Host: "tobi.ferrets.example.com"

app.Get("/", func(c *fiber.Ctx) error {
c.Subdomains() // ["ferrets", "tobi"]
c.Subdomains(1) // ["tobi"]

// ...
})

Type

Sets the Content-Type HTTP header to the MIME type listed here specified by the file extension.

Signature
func (c *Ctx) Type(ext string, charset ...string) *Ctx
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Type(".html") // => "text/html"
c.Type("html") // => "text/html"
c.Type("png") // => "image/png"

c.Type("json", "utf-8") // => "application/json; charset=utf-8"

// ...
})

UserContext

UserContext returns a context implementation that was set by user earlier -or returns a non-nil, empty context, if it was not set earlier.

Signature
func (c *Ctx) UserContext() context.Context
Example
app.Get("/", func(c *fiber.Ctx) error {
ctx := c.UserContext()
// ctx is context implementation set by user

// ...
})

Vary

Adds the given header field to the Vary response header. This will append the header, if not already listed, otherwise leaves it listed in the current location.

info

Multiple fields are allowed.

Signature
func (c *Ctx) Vary(fields ...string)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Vary("Origin") // => Vary: Origin
c.Vary("User-Agent") // => Vary: Origin, User-Agent

// No duplicates
c.Vary("Origin") // => Vary: Origin, User-Agent

c.Vary("Accept-Encoding", "Accept")
// => Vary: Origin, User-Agent, Accept-Encoding, Accept

// ...
})

Write

Write adopts the Writer interface

Signature
func (c *Ctx) Write(p []byte) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Write([]byte("Hello, World!")) // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

Writef

Writef adopts the string with variables

Signature
func (c *Ctx) Writef(f string, a ...interface{}) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
world := "World!"
c.Writef("Hello, %s", world) // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

WriteString

WriteString adopts the string

Signature
func (c *Ctx) WriteString(s string) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.WriteString("Hello, World!") // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

XHR

A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery).

Signature
func (c *Ctx) XHR() bool
Example
// X-Requested-With: XMLHttpRequest

app.Get("/", func(c *fiber.Ctx) error {
c.XHR() // true

// ...
})

XML

Converts any interface or string to XML using the standard encoding/xml package.

info

XML also sets the content header to application/xml.

Signature
func (c *Ctx) XML(data interface{}) error 
Example
type SomeStruct struct {
XMLName xml.Name `xml:"Fiber"`
Name string `xml:"Name"`
Age uint8 `xml:"Age"`
}

app.Get("/", func(c *fiber.Ctx) error {
// Create data struct:
data := SomeStruct{
Name: "Grame",
Age: 20,
}

return c.XML(data)
// <Fiber>
// <Name>Grame</Name>
// <Age>20</Age>
// </Fiber>
})
- - +or returns a non-nil, empty context, if it was not set earlier.

Signature
func (c *Ctx) UserContext() context.Context
Example
app.Get("/", func(c *fiber.Ctx) error {
ctx := c.UserContext()
// ctx is context implementation set by user

// ...
})

Vary

Adds the given header field to the Vary response header. This will append the header, if not already listed, otherwise leaves it listed in the current location.

info

Multiple fields are allowed.

Signature
func (c *Ctx) Vary(fields ...string)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Vary("Origin") // => Vary: Origin
c.Vary("User-Agent") // => Vary: Origin, User-Agent

// No duplicates
c.Vary("Origin") // => Vary: Origin, User-Agent

c.Vary("Accept-Encoding", "Accept")
// => Vary: Origin, User-Agent, Accept-Encoding, Accept

// ...
})

Write

Write adopts the Writer interface

Signature
func (c *Ctx) Write(p []byte) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Write([]byte("Hello, World!")) // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

Writef

Writef adopts the string with variables

Signature
func (c *Ctx) Writef(f string, a ...interface{}) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
world := "World!"
c.Writef("Hello, %s", world) // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

WriteString

WriteString adopts the string

Signature
func (c *Ctx) WriteString(s string) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.WriteString("Hello, World!") // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

XHR

A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery).

Signature
func (c *Ctx) XHR() bool
Example
// X-Requested-With: XMLHttpRequest

app.Get("/", func(c *fiber.Ctx) error {
c.XHR() // true

// ...
})

XML

Converts any interface or string to XML using the standard encoding/xml package.

info

XML also sets the content header to application/xml.

Signature
func (c *Ctx) XML(data interface{}) error 
Example
type SomeStruct struct {
XMLName xml.Name `xml:"Fiber"`
Name string `xml:"Name"`
Age uint8 `xml:"Age"`
}

app.Get("/", func(c *fiber.Ctx) error {
// Create data struct:
data := SomeStruct{
Name: "Grame",
Age: 20,
}

return c.XML(data)
// <Fiber>
// <Name>Grame</Name>
// <Age>20</Age>
// </Fiber>
})
+ + \ No newline at end of file diff --git a/api/fiber/index.html b/api/fiber/index.html index 05c70e4dbfd..656053cb21c 100644 --- a/api/fiber/index.html +++ b/api/fiber/index.html @@ -6,13 +6,13 @@ 📦 Fiber | Fiber - - + +
-
Skip to main content
Version: v2.x

📦 Fiber

New

This method creates a new App named instance. You can pass optional config when creating a new instance.

Signature
func New(config ...Config) *App
Example
// Default config
app := fiber.New()

// ...

Config

You can pass an optional Config when creating a new Fiber instance.

Example
// Custom config
app := fiber.New(fiber.Config{
Prefork: true,
CaseSensitive: true,
StrictRouting: true,
ServerHeader: "Fiber",
AppName: "Test App v1.0.1"
})

// ...

Config fields

PropertyTypeDescriptionDefault
AppNamestringThis allows to setup app name for the app""
BodyLimitintSets 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
CaseSensitiveboolWhen enabled, /Foo and /foo are different routes. When disabled, /Fooand /foo are treated the same.false
ColorSchemeColorsYou can define custom color scheme. They'll be used for startup message, route list and some middlewares.DefaultColors
CompressedFileSuffixstringAdds a suffix to the original file name and tries saving the resulting compressed file under the new file name.".fiber.gz"
ConcurrencyintMaximum number of concurrent connections.256 * 1024
DisableDefaultContentTypeboolWhen set to true, causes the default Content-Type header to be excluded from the Response.false
DisableDefaultDateboolWhen set to true causes the default date header to be excluded from the response.false
DisableHeaderNormalizingboolBy default all header names are normalized: conteNT-tYPE -> Content-Typefalse
DisableKeepaliveboolDisable keep-alive connections, the server will close incoming connections after sending the first response to the clientfalse
DisablePreParseMultipartFormboolWill not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data.false
DisableStartupMessageboolWhen set to true, it will not print out debug informationfalse
ETagboolEnable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method (CRC-32). Weak ETags are the default when enabled.false
EnableIPValidationboolIf set to true, c.IP() and c.IPs() will validate IP addresses before returning them. Also, c.IP() will return only the first valid IP rather than just the raw header value that may be a comma seperated string.

WARNING: There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header.
false
EnablePrintRoutesboolEnablePrintRoutes enables print all routes with their method, path, name and handler..false
EnableTrustedProxyCheckboolWhen set to true, fiber will check whether proxy is trusted, using TrustedProxies list.

By default c.Protocol() will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, c.IP() will get value from ProxyHeader header, c.Hostname() will get value from X-Forwarded-Host header.
If EnableTrustedProxyCheck is true, and RemoteIP is in the list of TrustedProxies c.Protocol(), c.IP(), and c.Hostname() will have the same behaviour when EnableTrustedProxyCheck disabled, if RemoteIP isn't in the list, c.Protocol() will return https in case when tls connection is handled by the app, or http otherwise, c.IP() will return RemoteIP() from fasthttp context, c.Hostname() will return fasthttp.Request.URI().Host()
false
ErrorHandlerErrorHandlerErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests.DefaultErrorHandler
GETOnlyboolRejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set.false
IdleTimeouttime.DurationThe 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
ImmutableboolWhen enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue #185.false
JSONDecoderutils.JSONUnmarshalAllowing for flexibility in using another json library for decoding.json.Unmarshal
JSONEncoderutils.JSONMarshalAllowing for flexibility in using another json library for encoding.json.Marshal
NetworkstringKnown networks are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only)

WARNING: When prefork is set to true, only "tcp4" and "tcp6" can be chosen.
NetworkTCP4
PassLocalsToViewsboolPassLocalsToViews Enables passing of the locals set on a fiber.Ctx to the template engine. See our Template Middleware for supported engines.false
PreforkboolEnables use of theSO_REUSEPORTsocket option. This will spawn multiple Go processes listening on the same port. learn more about socket sharding. NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with CMD ./app or CMD ["sh", "-c", "/app"]. For more info, see this issue comment.false
ProxyHeaderstringThis will enable c.IP() to return the value of the given header key. By default c.IP()will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. X-Forwarded-*.""
ReadBufferSizeintper-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies).4096
ReadTimeouttime.DurationThe amount of time allowed to read the full request, including the body. The default timeout is unlimited.nil
RequestMethods[]stringRequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish.DefaultMethods
ServerHeaderstringEnables the Server HTTP header with the given value.""
StreamRequestBodyboolStreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit.false
StrictRoutingboolWhen enabled, the router treats /foo and /foo/ as different. Otherwise, the router treats /foo and /foo/ as the same.false
TrustedProxies[]stringContains the list of trusted proxy IP's. Look at EnableTrustedProxyCheck doc.

It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses.
[]string*__*
UnescapePathboolConverts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special charactersfalse
ViewsViewsViews is the interface that wraps the Render function. See our Template Middleware for supported engines.nil
ViewsLayoutstringViews Layout is the global layout for all template render until override on Render function. See our Template Middleware for supported engines.""
WriteBufferSizeintPer-connection buffer size for responses' writing.4096
WriteTimeouttime.DurationThe maximum duration before timing out writes of the response. The default timeout is unlimited.nil
XMLEncoderutils.XMLMarshalAllowing for flexibility in using another XML library for encoding.xml.Marshal

NewError

NewError creates a new HTTPError instance with an optional message.

Signature
func NewError(code int, message ...string) *Error
Example
app.Get("/", func(c *fiber.Ctx) error {
return fiber.NewError(782, "Custom error message")
})

IsChild

IsChild determines if the current process is a result of Prefork.

Signature
func IsChild() bool
Example
// Prefork will spawn child processes
app := fiber.New(fiber.Config{
Prefork: true,
})

if !fiber.IsChild() {
fmt.Println("I'm the parent process")
} else {
fmt.Println("I'm a child process")
}

// ...
- - +
Skip to main content
Version: v2.x

📦 Fiber

New

This method creates a new App named instance. You can pass optional config when creating a new instance.

Signature
func New(config ...Config) *App
Example
// Default config
app := fiber.New()

// ...

Config

You can pass an optional Config when creating a new Fiber instance.

Example
// Custom config
app := fiber.New(fiber.Config{
Prefork: true,
CaseSensitive: true,
StrictRouting: true,
ServerHeader: "Fiber",
AppName: "Test App v1.0.1"
})

// ...

Config fields

PropertyTypeDescriptionDefault
AppNamestringThis allows to setup app name for the app""
BodyLimitintSets 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
CaseSensitiveboolWhen enabled, /Foo and /foo are different routes. When disabled, /Fooand /foo are treated the same.false
ColorSchemeColorsYou can define custom color scheme. They'll be used for startup message, route list and some middlewares.DefaultColors
CompressedFileSuffixstringAdds a suffix to the original file name and tries saving the resulting compressed file under the new file name.".fiber.gz"
ConcurrencyintMaximum number of concurrent connections.256 * 1024
DisableDefaultContentTypeboolWhen set to true, causes the default Content-Type header to be excluded from the Response.false
DisableDefaultDateboolWhen set to true causes the default date header to be excluded from the response.false
DisableHeaderNormalizingboolBy default all header names are normalized: conteNT-tYPE -> Content-Typefalse
DisableKeepaliveboolDisable keep-alive connections, the server will close incoming connections after sending the first response to the clientfalse
DisablePreParseMultipartFormboolWill not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data.false
DisableStartupMessageboolWhen set to true, it will not print out debug informationfalse
ETagboolEnable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method (CRC-32). Weak ETags are the default when enabled.false
EnableIPValidationboolIf set to true, c.IP() and c.IPs() will validate IP addresses before returning them. Also, c.IP() will return only the first valid IP rather than just the raw header value that may be a comma seperated string.

WARNING: There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header.
false
EnablePrintRoutesboolEnablePrintRoutes enables print all routes with their method, path, name and handler..false
EnableTrustedProxyCheckboolWhen set to true, fiber will check whether proxy is trusted, using TrustedProxies list.

By default c.Protocol() will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, c.IP() will get value from ProxyHeader header, c.Hostname() will get value from X-Forwarded-Host header.
If EnableTrustedProxyCheck is true, and RemoteIP is in the list of TrustedProxies c.Protocol(), c.IP(), and c.Hostname() will have the same behaviour when EnableTrustedProxyCheck disabled, if RemoteIP isn't in the list, c.Protocol() will return https in case when tls connection is handled by the app, or http otherwise, c.IP() will return RemoteIP() from fasthttp context, c.Hostname() will return fasthttp.Request.URI().Host()
false
ErrorHandlerErrorHandlerErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests.DefaultErrorHandler
GETOnlyboolRejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set.false
IdleTimeouttime.DurationThe 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
ImmutableboolWhen enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue #185.false
JSONDecoderutils.JSONUnmarshalAllowing for flexibility in using another json library for decoding.json.Unmarshal
JSONEncoderutils.JSONMarshalAllowing for flexibility in using another json library for encoding.json.Marshal
NetworkstringKnown networks are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only)

WARNING: When prefork is set to true, only "tcp4" and "tcp6" can be chosen.
NetworkTCP4
PassLocalsToViewsboolPassLocalsToViews Enables passing of the locals set on a fiber.Ctx to the template engine. See our Template Middleware for supported engines.false
PreforkboolEnables use of theSO_REUSEPORTsocket option. This will spawn multiple Go processes listening on the same port. learn more about socket sharding. NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with CMD ./app or CMD ["sh", "-c", "/app"]. For more info, see this issue comment.false
ProxyHeaderstringThis will enable c.IP() to return the value of the given header key. By default c.IP()will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. X-Forwarded-*.""
ReadBufferSizeintper-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies).4096
ReadTimeouttime.DurationThe amount of time allowed to read the full request, including the body. The default timeout is unlimited.nil
RequestMethods[]stringRequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish.DefaultMethods
ServerHeaderstringEnables the Server HTTP header with the given value.""
StreamRequestBodyboolStreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit.false
StrictRoutingboolWhen enabled, the router treats /foo and /foo/ as different. Otherwise, the router treats /foo and /foo/ as the same.false
TrustedProxies[]stringContains the list of trusted proxy IP's. Look at EnableTrustedProxyCheck doc.

It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses.
[]string*__*
UnescapePathboolConverts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special charactersfalse
ViewsViewsViews is the interface that wraps the Render function. See our Template Middleware for supported engines.nil
ViewsLayoutstringViews Layout is the global layout for all template render until override on Render function. See our Template Middleware for supported engines.""
WriteBufferSizeintPer-connection buffer size for responses' writing.4096
WriteTimeouttime.DurationThe maximum duration before timing out writes of the response. The default timeout is unlimited.nil
XMLEncoderutils.XMLMarshalAllowing for flexibility in using another XML library for encoding.xml.Marshal

NewError

NewError creates a new HTTPError instance with an optional message.

Signature
func NewError(code int, message ...string) *Error
Example
app.Get("/", func(c *fiber.Ctx) error {
return fiber.NewError(782, "Custom error message")
})

IsChild

IsChild determines if the current process is a result of Prefork.

Signature
func IsChild() bool
Example
// Prefork will spawn child processes
app := fiber.New(fiber.Config{
Prefork: true,
})

if !fiber.IsChild() {
fmt.Println("I'm the parent process")
} else {
fmt.Println("I'm a child process")
}

// ...
+ + \ No newline at end of file diff --git a/api/middleware/adaptor/index.html b/api/middleware/adaptor/index.html index 02e886e1426..ab61c87a130 100644 --- a/api/middleware/adaptor/index.html +++ b/api/middleware/adaptor/index.html @@ -6,13 +6,13 @@ Adaptor | Fiber - - + +
-
Skip to main content
Version: v2.x

Adaptor

Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!

Signatures

NameSignatureDescription
HTTPHandlerHTTPHandler(h http.Handler) fiber.Handlerhttp.Handler -> fiber.Handler
HTTPHandlerFuncHTTPHandlerFunc(h http.HandlerFunc) fiber.Handlerhttp.HandlerFunc -> fiber.Handler
HTTPMiddlewareHTTPHandlerFunc(mw func(http.Handler) http.Handler) fiber.Handlerfunc(http.Handler) http.Handler -> fiber.Handler
FiberHandlerFiberHandler(h fiber.Handler) http.Handlerfiber.Handler -> http.Handler
FiberHandlerFuncFiberHandlerFunc(h fiber.Handler) http.HandlerFuncfiber.Handler -> http.HandlerFunc
FiberAppFiberApp(app *fiber.App) http.HandlerFuncFiber app -> http.HandlerFunc
ConvertRequestConvertRequest(c *fiber.Ctx, forServer bool) (*http.Request, error)fiber.Ctx -> http.Request
CopyContextToFiberContextCopyContextToFiberContext(context interface{}, requestContext *fasthttp.RequestCtx)context.Context -> fasthttp.RequestCtx

Examples

net/http to Fiber

package main

import (
"fmt"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// New fiber app
app := fiber.New()

// http.Handler -> fiber.Handler
app.Get("/", adaptor.HTTPHandler(handler(greet)))

// http.HandlerFunc -> fiber.Handler
app.Get("/func", adaptor.HTTPHandlerFunc(greet))

// Listen on port 3000
app.Listen(":3000")
}

func handler(f http.HandlerFunc) http.Handler {
return http.HandlerFunc(f)
}

func greet(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello World!")
}

net/http middleware to Fiber

package main

import (
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// New fiber app
app := fiber.New()

// http middleware -> fiber.Handler
app.Use(adaptor.HTTPMiddleware(logMiddleware))

// Listen on port 3000
app.Listen(":3000")
}

func logMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
log.Println("log middleware")
next.ServeHTTP(w, r)
})
}

Fiber Handler to net/http

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// fiber.Handler -> http.Handler
http.Handle("/", adaptor.FiberHandler(greet))

// fiber.Handler -> http.HandlerFunc
http.HandleFunc("/func", adaptor.FiberHandlerFunc(greet))

// Listen on port 3000
http.ListenAndServe(":3000", nil)
}

func greet(c *fiber.Ctx) error {
return c.SendString("Hello World!")
}

Fiber App to net/http

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
app := fiber.New()

app.Get("/greet", greet)

// Listen on port 3000
http.ListenAndServe(":3000", adaptor.FiberApp(app))
}

func greet(c *fiber.Ctx) error {
return c.SendString("Hello World!")
}

Fiber Context to (net/http).Request

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
app := fiber.New()

app.Get("/greet", greetWithHTTPReq)

// Listen on port 3000
http.ListenAndServe(":3000", adaptor.FiberApp(app))
}

func greetWithHTTPReq(c *fiber.Ctx) error {
httpReq, err := adaptor.ConvertRequest(c, false)
if err != nil {
return err
}

return c.SendString("Request URL: " + httpReq.URL.String())
}
- - +
Skip to main content
Version: v2.x

Adaptor

Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!

Signatures

NameSignatureDescription
HTTPHandlerHTTPHandler(h http.Handler) fiber.Handlerhttp.Handler -> fiber.Handler
HTTPHandlerFuncHTTPHandlerFunc(h http.HandlerFunc) fiber.Handlerhttp.HandlerFunc -> fiber.Handler
HTTPMiddlewareHTTPHandlerFunc(mw func(http.Handler) http.Handler) fiber.Handlerfunc(http.Handler) http.Handler -> fiber.Handler
FiberHandlerFiberHandler(h fiber.Handler) http.Handlerfiber.Handler -> http.Handler
FiberHandlerFuncFiberHandlerFunc(h fiber.Handler) http.HandlerFuncfiber.Handler -> http.HandlerFunc
FiberAppFiberApp(app *fiber.App) http.HandlerFuncFiber app -> http.HandlerFunc
ConvertRequestConvertRequest(c *fiber.Ctx, forServer bool) (*http.Request, error)fiber.Ctx -> http.Request
CopyContextToFiberContextCopyContextToFiberContext(context interface{}, requestContext *fasthttp.RequestCtx)context.Context -> fasthttp.RequestCtx

Examples

net/http to Fiber

package main

import (
"fmt"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// New fiber app
app := fiber.New()

// http.Handler -> fiber.Handler
app.Get("/", adaptor.HTTPHandler(handler(greet)))

// http.HandlerFunc -> fiber.Handler
app.Get("/func", adaptor.HTTPHandlerFunc(greet))

// Listen on port 3000
app.Listen(":3000")
}

func handler(f http.HandlerFunc) http.Handler {
return http.HandlerFunc(f)
}

func greet(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello World!")
}

net/http middleware to Fiber

package main

import (
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// New fiber app
app := fiber.New()

// http middleware -> fiber.Handler
app.Use(adaptor.HTTPMiddleware(logMiddleware))

// Listen on port 3000
app.Listen(":3000")
}

func logMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
log.Println("log middleware")
next.ServeHTTP(w, r)
})
}

Fiber Handler to net/http

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// fiber.Handler -> http.Handler
http.Handle("/", adaptor.FiberHandler(greet))

// fiber.Handler -> http.HandlerFunc
http.HandleFunc("/func", adaptor.FiberHandlerFunc(greet))

// Listen on port 3000
http.ListenAndServe(":3000", nil)
}

func greet(c *fiber.Ctx) error {
return c.SendString("Hello World!")
}

Fiber App to net/http

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
app := fiber.New()

app.Get("/greet", greet)

// Listen on port 3000
http.ListenAndServe(":3000", adaptor.FiberApp(app))
}

func greet(c *fiber.Ctx) error {
return c.SendString("Hello World!")
}

Fiber Context to (net/http).Request

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
app := fiber.New()

app.Get("/greet", greetWithHTTPReq)

// Listen on port 3000
http.ListenAndServe(":3000", adaptor.FiberApp(app))
}

func greetWithHTTPReq(c *fiber.Ctx) error {
httpReq, err := adaptor.ConvertRequest(c, false)
if err != nil {
return err
}

return c.SendString("Request URL: " + httpReq.URL.String())
}
+ + \ No newline at end of file diff --git a/api/middleware/basicauth/index.html b/api/middleware/basicauth/index.html index dd536f22552..3c7db40fed5 100644 --- a/api/middleware/basicauth/index.html +++ b/api/middleware/basicauth/index.html @@ -6,13 +6,13 @@ BasicAuth | Fiber - - + +
-
Skip to main content
Version: v2.x

BasicAuth

Basic Authentication middleware for Fiber that provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized or a custom response for missing or invalid credentials.

Signatures

func New(config Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/basicauth"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
app.Use(basicauth.New(basicauth.Config{
Users: map[string]string{
"john": "doe",
"admin": "123456",
},
}))

// Or extend your config for customization
app.Use(basicauth.New(basicauth.Config{
Users: map[string]string{
"john": "doe",
"admin": "123456",
},
Realm: "Forbidden",
Authorizer: func(user, pass string) bool {
if user == "john" && pass == "doe" {
return true
}
if user == "admin" && pass == "123456" {
return true
}
return false
},
Unauthorized: func(c *fiber.Ctx) error {
return c.SendFile("./unauthorized.html")
},
ContextUsername: "_user",
ContextPassword: "_pass",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Users defines the allowed credentials
//
// Required. Default: map[string]string{}
Users map[string]string

// Realm is a string to define realm attribute of BasicAuth.
// the realm identifies the system to authenticate against
// and can be used by clients to save credentials
//
// Optional. Default: "Restricted".
Realm string

// Authorizer defines a function you can pass
// to check the credentials however you want.
// It will be called with a username and password
// and is expected to return true or false to indicate
// that the credentials were approved or not.
//
// Optional. Default: nil.
Authorizer func(string, string) bool

// Unauthorized defines the response body for unauthorized responses.
// By default it will return with a 401 Unauthorized and the correct WWW-Auth header
//
// Optional. Default: nil
Unauthorized fiber.Handler

// ContextUser is the key to store the username in Locals
//
// Optional. Default: "username"
ContextUsername string

// ContextPass is the key to store the password in Locals
//
// Optional. Default: "password"
ContextPassword string
}

Default Config

var ConfigDefault = Config{
Next: nil,
Users: map[string]string{},
Realm: "Restricted",
Authorizer: nil,
Unauthorized: nil,
ContextUsername: "username",
ContextPassword: "password",
}
- - +
Skip to main content
Version: v2.x

BasicAuth

Basic Authentication middleware for Fiber that provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized or a custom response for missing or invalid credentials.

Signatures

func New(config Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/basicauth"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
app.Use(basicauth.New(basicauth.Config{
Users: map[string]string{
"john": "doe",
"admin": "123456",
},
}))

// Or extend your config for customization
app.Use(basicauth.New(basicauth.Config{
Users: map[string]string{
"john": "doe",
"admin": "123456",
},
Realm: "Forbidden",
Authorizer: func(user, pass string) bool {
if user == "john" && pass == "doe" {
return true
}
if user == "admin" && pass == "123456" {
return true
}
return false
},
Unauthorized: func(c *fiber.Ctx) error {
return c.SendFile("./unauthorized.html")
},
ContextUsername: "_user",
ContextPassword: "_pass",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Users defines the allowed credentials
//
// Required. Default: map[string]string{}
Users map[string]string

// Realm is a string to define realm attribute of BasicAuth.
// the realm identifies the system to authenticate against
// and can be used by clients to save credentials
//
// Optional. Default: "Restricted".
Realm string

// Authorizer defines a function you can pass
// to check the credentials however you want.
// It will be called with a username and password
// and is expected to return true or false to indicate
// that the credentials were approved or not.
//
// Optional. Default: nil.
Authorizer func(string, string) bool

// Unauthorized defines the response body for unauthorized responses.
// By default it will return with a 401 Unauthorized and the correct WWW-Auth header
//
// Optional. Default: nil
Unauthorized fiber.Handler

// ContextUser is the key to store the username in Locals
//
// Optional. Default: "username"
ContextUsername string

// ContextPass is the key to store the password in Locals
//
// Optional. Default: "password"
ContextPassword string
}

Default Config

var ConfigDefault = Config{
Next: nil,
Users: map[string]string{},
Realm: "Restricted",
Authorizer: nil,
Unauthorized: nil,
ContextUsername: "username",
ContextPassword: "password",
}
+ + \ No newline at end of file diff --git a/api/middleware/cache/index.html b/api/middleware/cache/index.html index ce4d7405a2f..92fdf8990be 100644 --- a/api/middleware/cache/index.html +++ b/api/middleware/cache/index.html @@ -6,15 +6,15 @@ Cache | Fiber - - + +
Skip to main content
Version: v2.x

Cache

Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core!

Request Directives
Cache-Control: no-cache will return the up-to-date response but still caches it. You will always get a miss cache status.
-Cache-Control: no-store will refrain from caching. You will always get the up-to-date response.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cache"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(cache.New())

// Or extend your config for customization
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return c.Query("refresh") == "true"
},
Expiration: 30 * time.Minute,
CacheControl: true,
}))

Or you can custom key and expire time like this:

app.Use(cache.New(cache.Config{
ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration {
newCacheTime, _ := strconv.Atoi(c.GetRespHeader("Cache-Time", "600"))
return time.Second * time.Duration(newCacheTime)
},
KeyGenerator: func(c *fiber.Ctx) string {
return utils.CopyString(c.Path())
},
}))

app.Get("/", func(c *fiber.Ctx) error {
c.Response().Header.Add("Cache-Time", "6000")
return c.SendString("hi")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Expiration is the time that an cached response will live
//
// Optional. Default: 1 * time.Minute
Expiration time.Duration

// CacheHeader header on response header, indicate cache status, with the following possible return value
//
// hit, miss, unreachable
//
// Optional. Default: X-Cache
CacheHeader string

// CacheControl enables client side caching if set to true
//
// Optional. Default: false
CacheControl bool

// Key allows you to generate custom keys, by default c.Path() is used
//
// Default: func(c *fiber.Ctx) string {
// return utils.CopyString(c.Path())
// }
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

// Store is used to store the state of the middleware
//
// Default: an in memory store for this process only
Storage fiber.Storage

// allows you to store additional headers generated by next middlewares & handler
//
// Default: false
StoreResponseHeaders bool

// Max number of bytes of response bodies simultaneously stored in cache. When limit is reached,
// entries with the nearest expiration are deleted to make room for new.
// 0 means no limit
//
// Default: 0
MaxBytes uint

// You can specify HTTP methods to cache.
// The middleware just caches the routes of its methods in this slice.
//
// Default: []string{fiber.MethodGet, fiber.MethodHead}
Methods []string
}

Default Config

var ConfigDefault = Config{
Next: nil,
Expiration: 1 * time.Minute,
CacheHeader: "X-Cache",
CacheControl: false,
KeyGenerator: func(c *fiber.Ctx) string {
return utils.CopyString(c.Path())
},
ExpirationGenerator: nil,
StoreResponseHeaders: false,
Storage: nil,
MaxBytes: 0,
Methods: []string{fiber.MethodGet, fiber.MethodHead},
}
- - +Cache-Control: no-store will refrain from caching. You will always get the up-to-date response.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cache"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(cache.New())

// Or extend your config for customization
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return c.Query("refresh") == "true"
},
Expiration: 30 * time.Minute,
CacheControl: true,
}))

Or you can custom key and expire time like this:

app.Use(cache.New(cache.Config{
ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration {
newCacheTime, _ := strconv.Atoi(c.GetRespHeader("Cache-Time", "600"))
return time.Second * time.Duration(newCacheTime)
},
KeyGenerator: func(c *fiber.Ctx) string {
return utils.CopyString(c.Path())
},
}))

app.Get("/", func(c *fiber.Ctx) error {
c.Response().Header.Add("Cache-Time", "6000")
return c.SendString("hi")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Expiration is the time that an cached response will live
//
// Optional. Default: 1 * time.Minute
Expiration time.Duration

// CacheHeader header on response header, indicate cache status, with the following possible return value
//
// hit, miss, unreachable
//
// Optional. Default: X-Cache
CacheHeader string

// CacheControl enables client side caching if set to true
//
// Optional. Default: false
CacheControl bool

// Key allows you to generate custom keys, by default c.Path() is used
//
// Default: func(c *fiber.Ctx) string {
// return utils.CopyString(c.Path())
// }
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

// Store is used to store the state of the middleware
//
// Default: an in memory store for this process only
Storage fiber.Storage

// allows you to store additional headers generated by next middlewares & handler
//
// Default: false
StoreResponseHeaders bool

// Max number of bytes of response bodies simultaneously stored in cache. When limit is reached,
// entries with the nearest expiration are deleted to make room for new.
// 0 means no limit
//
// Default: 0
MaxBytes uint

// You can specify HTTP methods to cache.
// The middleware just caches the routes of its methods in this slice.
//
// Default: []string{fiber.MethodGet, fiber.MethodHead}
Methods []string
}

Default Config

var ConfigDefault = Config{
Next: nil,
Expiration: 1 * time.Minute,
CacheHeader: "X-Cache",
CacheControl: false,
KeyGenerator: func(c *fiber.Ctx) string {
return utils.CopyString(c.Path())
},
ExpirationGenerator: nil,
StoreResponseHeaders: false,
Storage: nil,
MaxBytes: 0,
Methods: []string{fiber.MethodGet, fiber.MethodHead},
}
+ + \ No newline at end of file diff --git a/api/middleware/compress/index.html b/api/middleware/compress/index.html index f2a7c8af474..4518fd3719a 100644 --- a/api/middleware/compress/index.html +++ b/api/middleware/compress/index.html @@ -6,13 +6,13 @@ Compress | Fiber - - + +
-
Skip to main content
Version: v2.x

Compress

Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/compress"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(compress.New())

// Or extend your config for customization
app.Use(compress.New(compress.Config{
Level: compress.LevelBestSpeed, // 1
}))

// Skip middleware for specific routes
app.Use(compress.New(compress.Config{
Next: func(c *fiber.Ctx) bool {
return c.Path() == "/dont_compress"
},
Level: compress.LevelBestSpeed, // 1
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Level determines the compression algoritm
//
// Optional. Default: LevelDefault
// LevelDisabled: -1
// LevelDefault: 0
// LevelBestSpeed: 1
// LevelBestCompression: 2
Level int
}

Default Config

var ConfigDefault = Config{
Next: nil,
Level: LevelDefault,
}

Constants

// Compression levels
const (
LevelDisabled = -1
LevelDefault = 0
LevelBestSpeed = 1
LevelBestCompression = 2
)
- - +
Skip to main content
Version: v2.x

Compress

Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/compress"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(compress.New())

// Or extend your config for customization
app.Use(compress.New(compress.Config{
Level: compress.LevelBestSpeed, // 1
}))

// Skip middleware for specific routes
app.Use(compress.New(compress.Config{
Next: func(c *fiber.Ctx) bool {
return c.Path() == "/dont_compress"
},
Level: compress.LevelBestSpeed, // 1
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Level determines the compression algoritm
//
// Optional. Default: LevelDefault
// LevelDisabled: -1
// LevelDefault: 0
// LevelBestSpeed: 1
// LevelBestCompression: 2
Level int
}

Default Config

var ConfigDefault = Config{
Next: nil,
Level: LevelDefault,
}

Constants

// Compression levels
const (
LevelDisabled = -1
LevelDefault = 0
LevelBestSpeed = 1
LevelBestCompression = 2
)
+ + \ No newline at end of file diff --git a/api/middleware/cors/index.html b/api/middleware/cors/index.html index c536f41c99c..dbadc670c15 100644 --- a/api/middleware/cors/index.html +++ b/api/middleware/cors/index.html @@ -6,13 +6,13 @@ CORS | Fiber - - + +
-
Skip to main content
Version: v2.x

CORS

CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(cors.New())

// Or extend your config for customization
app.Use(cors.New(cors.Config{
AllowOrigins: "https://gofiber.io, https://gofiber.net",
AllowHeaders: "Origin, Content-Type, Accept",
}))

Using the AllowOriginsFunc function. In this example any origin will be allowed via CORS.

For example, if a browser running on http://localhost:3000 sends a request, this will be accepted and the access-control-allow-origin response header will be set to http://localhost:3000.

Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via AllowOrigins.

app.Use(cors.New())

app.Use(cors.New(cors.Config{
AllowOriginsFunc: func(origin string) bool {
return os.Getenv("ENVIRONMENT") == "development"
},
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// AllowOriginsFunc defines a function that will set the 'access-control-allow-origin'
// response header to the 'origin' request header when returned true.
//
// Note: Using this feature is discouraged in production and it's best practice to explicitly
// set CORS origins via 'AllowOrigins'
//
// Optional. Default: nil
AllowOriginsFunc func(origin string) bool

// AllowOrigin defines a list of origins that may access the resource.
//
// Optional. Default value "*"
AllowOrigins string

// AllowMethods defines a list methods allowed when accessing the resource.
// This is used in response to a preflight request.
//
// Optional. Default value "GET,POST,HEAD,PUT,DELETE,PATCH"
AllowMethods string

// AllowHeaders defines a list of request headers that can be used when
// making the actual request. This is in response to a preflight request.
//
// Optional. Default value "".
AllowHeaders string

// AllowCredentials indicates whether or not the response to the request
// can be exposed when the credentials flag is true. When used as part of
// a response to a preflight request, this indicates whether or not the
// actual request can be made using credentials.
//
// Optional. Default value false.
AllowCredentials bool

// ExposeHeaders defines a whitelist headers that clients are allowed to
// access.
//
// Optional. Default value "".
ExposeHeaders string

// MaxAge indicates how long (in seconds) the results of a preflight request
// can be cached.
//
// Optional. Default value 0.
MaxAge int
}

Default Config

var ConfigDefault = Config{
Next: nil,
AllowOriginsFunc: nil,
AllowOrigins: "*",
AllowMethods: strings.Join([]string{
fiber.MethodGet,
fiber.MethodPost,
fiber.MethodHead,
fiber.MethodPut,
fiber.MethodDelete,
fiber.MethodPatch,
}, ","),
AllowHeaders: "",
AllowCredentials: false,
ExposeHeaders: "",
MaxAge: 0,
}
- - +
Skip to main content
Version: v2.x

CORS

CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(cors.New())

// Or extend your config for customization
app.Use(cors.New(cors.Config{
AllowOrigins: "https://gofiber.io, https://gofiber.net",
AllowHeaders: "Origin, Content-Type, Accept",
}))

Using the AllowOriginsFunc function. In this example any origin will be allowed via CORS.

For example, if a browser running on http://localhost:3000 sends a request, this will be accepted and the access-control-allow-origin response header will be set to http://localhost:3000.

Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via AllowOrigins.

app.Use(cors.New())

app.Use(cors.New(cors.Config{
AllowOriginsFunc: func(origin string) bool {
return os.Getenv("ENVIRONMENT") == "development"
},
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// AllowOriginsFunc defines a function that will set the 'access-control-allow-origin'
// response header to the 'origin' request header when returned true.
//
// Note: Using this feature is discouraged in production and it's best practice to explicitly
// set CORS origins via 'AllowOrigins'
//
// Optional. Default: nil
AllowOriginsFunc func(origin string) bool

// AllowOrigin defines a list of origins that may access the resource.
//
// Optional. Default value "*"
AllowOrigins string

// AllowMethods defines a list methods allowed when accessing the resource.
// This is used in response to a preflight request.
//
// Optional. Default value "GET,POST,HEAD,PUT,DELETE,PATCH"
AllowMethods string

// AllowHeaders defines a list of request headers that can be used when
// making the actual request. This is in response to a preflight request.
//
// Optional. Default value "".
AllowHeaders string

// AllowCredentials indicates whether or not the response to the request
// can be exposed when the credentials flag is true. When used as part of
// a response to a preflight request, this indicates whether or not the
// actual request can be made using credentials.
//
// Optional. Default value false.
AllowCredentials bool

// ExposeHeaders defines a whitelist headers that clients are allowed to
// access.
//
// Optional. Default value "".
ExposeHeaders string

// MaxAge indicates how long (in seconds) the results of a preflight request
// can be cached.
//
// Optional. Default value 0.
MaxAge int
}

Default Config

var ConfigDefault = Config{
Next: nil,
AllowOriginsFunc: nil,
AllowOrigins: "*",
AllowMethods: strings.Join([]string{
fiber.MethodGet,
fiber.MethodPost,
fiber.MethodHead,
fiber.MethodPut,
fiber.MethodDelete,
fiber.MethodPatch,
}, ","),
AllowHeaders: "",
AllowCredentials: false,
ExposeHeaders: "",
MaxAge: 0,
}
+ + \ No newline at end of file diff --git a/api/middleware/csrf/index.html b/api/middleware/csrf/index.html index 57970a2d18a..7aff4528799 100644 --- a/api/middleware/csrf/index.html +++ b/api/middleware/csrf/index.html @@ -6,13 +6,13 @@ CSRF | Fiber - - + +
-
Skip to main content
Version: v2.x

CSRF

CSRF middleware for Fiber that provides Cross-site request forgery protection by passing a csrf token via cookies. This cookie value will be used to compare against the client csrf token on requests, other than those defined as "safe" by RFC7231 (GET, HEAD, OPTIONS, or TRACE). When the csrf token is invalid, this middleware will return the fiber.ErrForbidden error.

CSRF Tokens are generated on GET requests. You can retrieve the CSRF token with c.Locals(contextKey), where contextKey is the string you set in the config (see Custom Config below).

When no csrf_ cookie is set, or the token has expired, a new token will be generated and csrf_ cookie set.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/csrf"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(csrf.New())

// Or extend your config for customization
app.Use(csrf.New(csrf.Config{
KeyLookup: "header:X-Csrf-Token",
CookieName: "csrf_",
CookieSameSite: "Lax",
Expiration: 1 * time.Hour,
KeyGenerator: utils.UUID,
Extractor: func(c *fiber.Ctx) (string, error) { ... },
}))
note

KeyLookup will be ignored if Extractor is explicitly set.

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// KeyLookup is a string in the form of "<source>:<key>" that is used
// to create an Extractor that extracts the token from the request.
// Possible values:
// - "header:<name>"
// - "query:<name>"
// - "param:<name>"
// - "form:<name>"
// - "cookie:<name>"
//
// Ignored if an Extractor is explicitly set.
//
// Optional. Default: "header:X-CSRF-Token"
KeyLookup string

// Name of the session cookie. This cookie will store session key.
// Optional. Default value "csrf_".
CookieName string

// Domain of the CSRF cookie.
// Optional. Default value "".
CookieDomain string

// Path of the CSRF cookie.
// Optional. Default value "".
CookiePath string

// Indicates if CSRF cookie is secure.
// Optional. Default value false.
CookieSecure bool

// Indicates if CSRF cookie is HTTP only.
// Optional. Default value false.
CookieHTTPOnly bool

// Indicates if CSRF cookie is requested by SameSite.
// Optional. Default value "Lax".
CookieSameSite string

// Decides whether cookie should last for only the browser sesison.
// Ignores Expiration if set to true
CookieSessionOnly bool

// Expiration is the duration before csrf token will expire
//
// Optional. Default: 1 * time.Hour
Expiration time.Duration

// Store is used to store the state of the middleware
//
// Optional. Default: memory.New()
Storage fiber.Storage

// Context key to store generated CSRF token into context.
// If left empty, token will not be stored in context.
//
// Optional. Default: ""
ContextKey string

// KeyGenerator creates a new CSRF token
//
// Optional. Default: utils.UUID
KeyGenerator func() string

// Extractor returns the csrf token
//
// If set this will be used in place of an Extractor based on KeyLookup.
//
// Optional. Default will create an Extractor based on KeyLookup.
Extractor func(c *fiber.Ctx) (string, error)
}

Default Config

var ConfigDefault = Config{
KeyLookup: "header:" + HeaderName,
CookieName: "csrf_",
CookieSameSite: "Lax",
Expiration: 1 * time.Hour,
KeyGenerator: utils.UUID,
ErrorHandler: defaultErrorHandler,
Extractor: CsrfFromHeader(HeaderName),
}

Constants

const (
HeaderName = "X-Csrf-Token"
)

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
app.Use(csrf.New(csrf.Config{
Storage: storage,
}))
- - +
Skip to main content
Version: v2.x

CSRF

CSRF middleware for Fiber that provides Cross-site request forgery protection by passing a csrf token via cookies. This cookie value will be used to compare against the client csrf token on requests, other than those defined as "safe" by RFC7231 (GET, HEAD, OPTIONS, or TRACE). When the csrf token is invalid, this middleware will return the fiber.ErrForbidden error.

CSRF Tokens are generated on GET requests. You can retrieve the CSRF token with c.Locals(contextKey), where contextKey is the string you set in the config (see Custom Config below).

When no csrf_ cookie is set, or the token has expired, a new token will be generated and csrf_ cookie set.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/csrf"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(csrf.New())

// Or extend your config for customization
app.Use(csrf.New(csrf.Config{
KeyLookup: "header:X-Csrf-Token",
CookieName: "csrf_",
CookieSameSite: "Lax",
Expiration: 1 * time.Hour,
KeyGenerator: utils.UUID,
Extractor: func(c *fiber.Ctx) (string, error) { ... },
}))
note

KeyLookup will be ignored if Extractor is explicitly set.

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// KeyLookup is a string in the form of "<source>:<key>" that is used
// to create an Extractor that extracts the token from the request.
// Possible values:
// - "header:<name>"
// - "query:<name>"
// - "param:<name>"
// - "form:<name>"
// - "cookie:<name>"
//
// Ignored if an Extractor is explicitly set.
//
// Optional. Default: "header:X-CSRF-Token"
KeyLookup string

// Name of the session cookie. This cookie will store session key.
// Optional. Default value "csrf_".
CookieName string

// Domain of the CSRF cookie.
// Optional. Default value "".
CookieDomain string

// Path of the CSRF cookie.
// Optional. Default value "".
CookiePath string

// Indicates if CSRF cookie is secure.
// Optional. Default value false.
CookieSecure bool

// Indicates if CSRF cookie is HTTP only.
// Optional. Default value false.
CookieHTTPOnly bool

// Indicates if CSRF cookie is requested by SameSite.
// Optional. Default value "Lax".
CookieSameSite string

// Decides whether cookie should last for only the browser sesison.
// Ignores Expiration if set to true
CookieSessionOnly bool

// Expiration is the duration before csrf token will expire
//
// Optional. Default: 1 * time.Hour
Expiration time.Duration

// Store is used to store the state of the middleware
//
// Optional. Default: memory.New()
Storage fiber.Storage

// Context key to store generated CSRF token into context.
// If left empty, token will not be stored in context.
//
// Optional. Default: ""
ContextKey string

// KeyGenerator creates a new CSRF token
//
// Optional. Default: utils.UUID
KeyGenerator func() string

// Extractor returns the csrf token
//
// If set this will be used in place of an Extractor based on KeyLookup.
//
// Optional. Default will create an Extractor based on KeyLookup.
Extractor func(c *fiber.Ctx) (string, error)
}

Default Config

var ConfigDefault = Config{
KeyLookup: "header:" + HeaderName,
CookieName: "csrf_",
CookieSameSite: "Lax",
Expiration: 1 * time.Hour,
KeyGenerator: utils.UUID,
ErrorHandler: defaultErrorHandler,
Extractor: CsrfFromHeader(HeaderName),
}

Constants

const (
HeaderName = "X-Csrf-Token"
)

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
app.Use(csrf.New(csrf.Config{
Storage: storage,
}))
+ + \ No newline at end of file diff --git a/api/middleware/earlydata/index.html b/api/middleware/earlydata/index.html index 920fce78df6..ac86341fedf 100644 --- a/api/middleware/earlydata/index.html +++ b/api/middleware/earlydata/index.html @@ -6,15 +6,15 @@ EarlyData | Fiber - - + +
Skip to main content
Version: v2.x

EarlyData

The Early Data middleware for Fiber adds support for TLS 1.3's early data ("0-RTT") feature. Citing RFC 8446, when a client and server share a PSK, TLS 1.3 allows clients to send data on the first flight ("early data") to speed up the request, effectively reducing the regular 1-RTT request to a 0-RTT request.

Make sure to enable fiber's EnableTrustedProxyCheck config option before using this middleware in order to not trust bogus HTTP request headers of the client.

Also be aware that enabling support for early data in your reverse proxy (e.g. nginx, as done with a simple ssl_early_data on;) makes requests replayable. Refer to the following documents before continuing:

By default, this middleware allows early data requests on safe HTTP request methods only and rejects the request otherwise, i.e. aborts the request before executing your handler. This behavior can be controlled by the AllowEarlyData config option. -Safe HTTP methods — GET, HEAD, OPTIONS and TRACE — should not modify a state on the server.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/earlydata"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(earlydata.New())

// Or extend your config for customization
app.Use(earlydata.New(earlydata.Config{
Error: fiber.ErrTooEarly,
// ...
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// IsEarlyData returns whether the request is an early-data request.
//
// Optional. Default: a function which checks if the "Early-Data" request header equals "1".
IsEarlyData func(c *fiber.Ctx) bool

// AllowEarlyData returns whether the early-data request should be allowed or rejected.
//
// Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods.
AllowEarlyData func(c *fiber.Ctx) bool

// Error is returned in case an early-data request is rejected.
//
// Optional. Default: fiber.ErrTooEarly.
Error error
}

Default Config

var ConfigDefault = Config{
IsEarlyData: func(c *fiber.Ctx) bool {
return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue
},

AllowEarlyData: func(c *fiber.Ctx) bool {
return fiber.IsMethodSafe(c.Method())
},

Error: fiber.ErrTooEarly,
}

Constants

const (
DefaultHeaderName = "Early-Data"
DefaultHeaderTrueValue = "1"
)
- - +Safe HTTP methods — GET, HEAD, OPTIONS and TRACE — should not modify a state on the server.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/earlydata"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(earlydata.New())

// Or extend your config for customization
app.Use(earlydata.New(earlydata.Config{
Error: fiber.ErrTooEarly,
// ...
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// IsEarlyData returns whether the request is an early-data request.
//
// Optional. Default: a function which checks if the "Early-Data" request header equals "1".
IsEarlyData func(c *fiber.Ctx) bool

// AllowEarlyData returns whether the early-data request should be allowed or rejected.
//
// Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods.
AllowEarlyData func(c *fiber.Ctx) bool

// Error is returned in case an early-data request is rejected.
//
// Optional. Default: fiber.ErrTooEarly.
Error error
}

Default Config

var ConfigDefault = Config{
IsEarlyData: func(c *fiber.Ctx) bool {
return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue
},

AllowEarlyData: func(c *fiber.Ctx) bool {
return fiber.IsMethodSafe(c.Method())
},

Error: fiber.ErrTooEarly,
}

Constants

const (
DefaultHeaderName = "Early-Data"
DefaultHeaderTrueValue = "1"
)
+ + \ No newline at end of file diff --git a/api/middleware/encryptcookie/index.html b/api/middleware/encryptcookie/index.html index 125bb7a9938..26deb67b0bf 100644 --- a/api/middleware/encryptcookie/index.html +++ b/api/middleware/encryptcookie/index.html @@ -6,13 +6,13 @@ Encrypt Cookie | Fiber - - + +
-
Skip to main content
Version: v2.x

Encrypt Cookie

Encrypt middleware for Fiber which encrypts cookie values. Note: this middleware does not encrypt cookie names.

Signatures

// Intitializes the middleware
func New(config ...Config) fiber.Handler

// Returns a random 32 character long string
func GenerateKey() string

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/encryptcookie"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
// `Key` must be a 32 character string. It's used to encrypt the values, so make sure it is random and keep it secret.
// You can run `openssl rand -base64 32` or call `encryptcookie.GenerateKey()` to create a random key for you.
// Make sure not to set `Key` to `encryptcookie.GenerateKey()` because that will create a new key every run.
app.Use(encryptcookie.New(encryptcookie.Config{
Key: "secret-thirty-2-character-string",
}))

// Get / reading out the encrypted cookie
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("value=" + c.Cookies("test"))
})

// Post / create the encrypted cookie
app.Post("/", func(c *fiber.Ctx) error {
c.Cookie(&fiber.Cookie{
Name: "test",
Value: "SomeThing",
})
return nil
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Array of cookie keys that should not be encrypted.
//
// Optional. Default: ["csrf_"]
Except []string

// Base64 encoded unique key to encode & decode cookies.
//
// Required. The key should be 32 bytes of random data in base64-encoded form.
// You may run `openssl rand -base64 32` or use `encryptcookie.GenerateKey()` to generate a new key.
Key string

// Custom function to encrypt cookies.
//
// Optional. Default: EncryptCookie
Encryptor func(decryptedString, key string) (string, error)

// Custom function to decrypt cookies.
//
// Optional. Default: DecryptCookie
Decryptor func(encryptedString, key string) (string, error)
}

Default Config

var ConfigDefault = Config{
Next: nil,
Except: []string{"csrf_"},
Key: "",
Encryptor: EncryptCookie,
Decryptor: DecryptCookie,
}

Normally, encryptcookie middleware skips csrf_ cookies. However, it won't work when you use custom cookie names for CSRF. You should update Except config to avoid this problem. For example:

app.Use(encryptcookie.New(encryptcookie.Config{
Key: "secret-thirty-2-character-string",
Except: []string{"csrf_1"}, // exclude CSRF cookie
}))
app.Use(csrf.New(csrf.Config{
KeyLookup: "form:test",
CookieName: "csrf_1",
CookieHTTPOnly: true,
}))
- - +
Skip to main content
Version: v2.x

Encrypt Cookie

Encrypt middleware for Fiber which encrypts cookie values. Note: this middleware does not encrypt cookie names.

Signatures

// Intitializes the middleware
func New(config ...Config) fiber.Handler

// Returns a random 32 character long string
func GenerateKey() string

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/encryptcookie"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
// `Key` must be a 32 character string. It's used to encrypt the values, so make sure it is random and keep it secret.
// You can run `openssl rand -base64 32` or call `encryptcookie.GenerateKey()` to create a random key for you.
// Make sure not to set `Key` to `encryptcookie.GenerateKey()` because that will create a new key every run.
app.Use(encryptcookie.New(encryptcookie.Config{
Key: "secret-thirty-2-character-string",
}))

// Get / reading out the encrypted cookie
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("value=" + c.Cookies("test"))
})

// Post / create the encrypted cookie
app.Post("/", func(c *fiber.Ctx) error {
c.Cookie(&fiber.Cookie{
Name: "test",
Value: "SomeThing",
})
return nil
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Array of cookie keys that should not be encrypted.
//
// Optional. Default: ["csrf_"]
Except []string

// Base64 encoded unique key to encode & decode cookies.
//
// Required. The key should be 32 bytes of random data in base64-encoded form.
// You may run `openssl rand -base64 32` or use `encryptcookie.GenerateKey()` to generate a new key.
Key string

// Custom function to encrypt cookies.
//
// Optional. Default: EncryptCookie
Encryptor func(decryptedString, key string) (string, error)

// Custom function to decrypt cookies.
//
// Optional. Default: DecryptCookie
Decryptor func(encryptedString, key string) (string, error)
}

Default Config

var ConfigDefault = Config{
Next: nil,
Except: []string{"csrf_"},
Key: "",
Encryptor: EncryptCookie,
Decryptor: DecryptCookie,
}

Normally, encryptcookie middleware skips csrf_ cookies. However, it won't work when you use custom cookie names for CSRF. You should update Except config to avoid this problem. For example:

app.Use(encryptcookie.New(encryptcookie.Config{
Key: "secret-thirty-2-character-string",
Except: []string{"csrf_1"}, // exclude CSRF cookie
}))
app.Use(csrf.New(csrf.Config{
KeyLookup: "form:test",
CookieName: "csrf_1",
CookieHTTPOnly: true,
}))
+ + \ No newline at end of file diff --git a/api/middleware/envvar/index.html b/api/middleware/envvar/index.html index 5384e0405c4..130bece08e2 100644 --- a/api/middleware/envvar/index.html +++ b/api/middleware/envvar/index.html @@ -6,13 +6,13 @@ EnvVar | Fiber - - + +
-
Skip to main content
Version: v2.x

EnvVar

EnvVar middleware for Fiber that can be used to expose environment variables with various options.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/envvar"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use("/expose/envvars", envvar.New())

// Or extend your config for customization
app.Use("/expose/envvars", envvar.New(
envvar.Config{
ExportVars: map[string]string{"testKey": "", "testDefaultKey": "testDefaultVal"},
ExcludeVars: map[string]string{"excludeKey": ""},
}),
)
note

You will need to provide a path to use the envvar middleware.

Response

Http response contract:

{
"vars": {
"someEnvVariable": "someValue",
"anotherEnvVariable": "anotherValue",
}
}

Config

// Config defines the config for middleware.
type Config struct {
// ExportVars specifies the environment variables that should export
ExportVars map[string]string
// ExcludeVars specifies the environment variables that should not export
ExcludeVars map[string]string
}

Default Config

Config{}
- - +
Skip to main content
Version: v2.x

EnvVar

EnvVar middleware for Fiber that can be used to expose environment variables with various options.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/envvar"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use("/expose/envvars", envvar.New())

// Or extend your config for customization
app.Use("/expose/envvars", envvar.New(
envvar.Config{
ExportVars: map[string]string{"testKey": "", "testDefaultKey": "testDefaultVal"},
ExcludeVars: map[string]string{"excludeKey": ""},
}),
)
note

You will need to provide a path to use the envvar middleware.

Response

Http response contract:

{
"vars": {
"someEnvVariable": "someValue",
"anotherEnvVariable": "anotherValue",
}
}

Config

// Config defines the config for middleware.
type Config struct {
// ExportVars specifies the environment variables that should export
ExportVars map[string]string
// ExcludeVars specifies the environment variables that should not export
ExcludeVars map[string]string
}

Default Config

Config{}
+ + \ No newline at end of file diff --git a/api/middleware/etag/index.html b/api/middleware/etag/index.html index 630f4af05d7..ef63f135bf6 100644 --- a/api/middleware/etag/index.html +++ b/api/middleware/etag/index.html @@ -6,13 +6,13 @@ ETag | Fiber - - + +
-
Skip to main content
Version: v2.x

ETag

ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/etag"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(etag.New())

// Get / receives Etag: "13-1831710635" in response header
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

// Or extend your config for customization
app.Use(etag.New(etag.Config{
Weak: true,
}))

// Get / receives Etag: "W/"13-1831710635" in response header
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Weak indicates that a weak validator is used. Weak etags are easy
// to generate, but are far less useful for comparisons. Strong
// validators are ideal for comparisons but can be very difficult
// to generate efficiently. Weak ETag values of two representations
// of the same resources might be semantically equivalent, but not
// byte-for-byte identical. This means weak etags prevent caching
// when byte range requests are used, but strong etags mean range
// requests can still be cached.
Weak bool
}

Default Config

var ConfigDefault = Config{
Next: nil,
Weak: false,
}
- - +
Skip to main content
Version: v2.x

ETag

ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/etag"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(etag.New())

// Get / receives Etag: "13-1831710635" in response header
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

// Or extend your config for customization
app.Use(etag.New(etag.Config{
Weak: true,
}))

// Get / receives Etag: "W/"13-1831710635" in response header
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Weak indicates that a weak validator is used. Weak etags are easy
// to generate, but are far less useful for comparisons. Strong
// validators are ideal for comparisons but can be very difficult
// to generate efficiently. Weak ETag values of two representations
// of the same resources might be semantically equivalent, but not
// byte-for-byte identical. This means weak etags prevent caching
// when byte range requests are used, but strong etags mean range
// requests can still be cached.
Weak bool
}

Default Config

var ConfigDefault = Config{
Next: nil,
Weak: false,
}
+ + \ No newline at end of file diff --git a/api/middleware/expvar/index.html b/api/middleware/expvar/index.html index 38e2729dfee..d6708085c1d 100644 --- a/api/middleware/expvar/index.html +++ b/api/middleware/expvar/index.html @@ -6,13 +6,13 @@ ExpVar | Fiber - - + +
-
Skip to main content
Version: v2.x

ExpVar

Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.

Signatures

func New() fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
expvarmw "github.com/gofiber/fiber/v2/middleware/expvar"
)

After you initiate your Fiber app, you can use the following possibilities:

var count = expvar.NewInt("count")

app.Use(expvarmw.New())
app.Get("/", func(c *fiber.Ctx) error {
count.Add(1)

return c.SendString(fmt.Sprintf("hello expvar count %d", count.Value()))
})

Visit path /debug/vars to see all vars and use query r=key to filter exposed variables.

curl 127.0.0.1:3000
hello expvar count 1

curl 127.0.0.1:3000/debug/vars
{
"cmdline": ["xxx"],
"count": 1,
"expvarHandlerCalls": 33,
"expvarRegexpErrors": 0,
"memstats": {...}
}

curl 127.0.0.1:3000/debug/vars?r=c
{
"cmdline": ["xxx"],
"count": 1
}

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool
}

Default Config

var ConfigDefault = Config{
Next: nil,
}
- - +
Skip to main content
Version: v2.x

ExpVar

Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.

Signatures

func New() fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
expvarmw "github.com/gofiber/fiber/v2/middleware/expvar"
)

After you initiate your Fiber app, you can use the following possibilities:

var count = expvar.NewInt("count")

app.Use(expvarmw.New())
app.Get("/", func(c *fiber.Ctx) error {
count.Add(1)

return c.SendString(fmt.Sprintf("hello expvar count %d", count.Value()))
})

Visit path /debug/vars to see all vars and use query r=key to filter exposed variables.

curl 127.0.0.1:3000
hello expvar count 1

curl 127.0.0.1:3000/debug/vars
{
"cmdline": ["xxx"],
"count": 1,
"expvarHandlerCalls": 33,
"expvarRegexpErrors": 0,
"memstats": {...}
}

curl 127.0.0.1:3000/debug/vars?r=c
{
"cmdline": ["xxx"],
"count": 1
}

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool
}

Default Config

var ConfigDefault = Config{
Next: nil,
}
+ + \ No newline at end of file diff --git a/api/middleware/favicon/index.html b/api/middleware/favicon/index.html index 7b892688551..bef177fdda1 100644 --- a/api/middleware/favicon/index.html +++ b/api/middleware/favicon/index.html @@ -6,13 +6,13 @@ Favicon | Fiber - - + +
-
Skip to main content
Version: v2.x

Favicon

Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware.

note

This middleware is exclusively for serving the default, implicit favicon, which is GET /favicon.ico or custom favicon URL.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/favicon"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(favicon.New())

// Or extend your config for customization
app.Use(favicon.New(favicon.Config{
File: "./favicon.ico",
URL: "/favicon.ico",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// File holds the path to an actual favicon that will be cached
//
// Optional. Default: ""
File string

// URL for favicon handler
//
// Optional. Default: "/favicon.ico"
URL string

// FileSystem is an optional alternate filesystem to search for the favicon in.
// An example of this could be an embedded or network filesystem
//
// Optional. Default: nil
FileSystem http.FileSystem

// CacheControl defines how the Cache-Control header in the response should be set
//
// Optional. Default: "public, max-age=31536000"
CacheControl string
}

Default Config

var ConfigDefault = Config{
Next: nil,
File: "",
URL: fPath,
CacheControl: "public, max-age=31536000",
}
- - +
Skip to main content
Version: v2.x

Favicon

Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware.

note

This middleware is exclusively for serving the default, implicit favicon, which is GET /favicon.ico or custom favicon URL.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/favicon"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(favicon.New())

// Or extend your config for customization
app.Use(favicon.New(favicon.Config{
File: "./favicon.ico",
URL: "/favicon.ico",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// File holds the path to an actual favicon that will be cached
//
// Optional. Default: ""
File string

// URL for favicon handler
//
// Optional. Default: "/favicon.ico"
URL string

// FileSystem is an optional alternate filesystem to search for the favicon in.
// An example of this could be an embedded or network filesystem
//
// Optional. Default: nil
FileSystem http.FileSystem

// CacheControl defines how the Cache-Control header in the response should be set
//
// Optional. Default: "public, max-age=31536000"
CacheControl string
}

Default Config

var ConfigDefault = Config{
Next: nil,
File: "",
URL: fPath,
CacheControl: "public, max-age=31536000",
}
+ + \ No newline at end of file diff --git a/api/middleware/filesystem/index.html b/api/middleware/filesystem/index.html index ab9e53b4915..5218c9af019 100644 --- a/api/middleware/filesystem/index.html +++ b/api/middleware/filesystem/index.html @@ -6,13 +6,13 @@ FileSystem | Fiber - - + +
-
Skip to main content
Version: v2.x

FileSystem

Filesystem middleware for Fiber that enables you to serve files from a directory.

caution

:params & :optionals? within the prefix path are not supported!

To handle paths with spaces (or other url encoded values) make sure to set fiber.Config{ UnescapePath: true }

Signatures

func New(config Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
app.Use(filesystem.New(filesystem.Config{
Root: http.Dir("./assets"),
}))

// Or extend your config for customization
app.Use(filesystem.New(filesystem.Config{
Root: http.Dir("./assets"),
Browse: true,
Index: "index.html",
NotFoundFile: "404.html",
MaxAge: 3600,
}))

If your environment (Go 1.16+) supports it, we recommend using Go Embed instead of the other solutions listed as this one is native to Go and the easiest to use.

embed

Embed is the native method to embed files in a Golang excecutable. Introduced in Go 1.16.

package main

import (
"embed"
"io/fs"
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)

// Embed a single file
//go:embed index.html
var f embed.FS

// Embed a directory
//go:embed static/*
var embedDirStatic embed.FS

func main() {
app := fiber.New()

app.Use("/", filesystem.New(filesystem.Config{
Root: http.FS(f),
}))

// Access file "image.png" under `static/` directory via URL: `http://<server>/static/image.png`.
// Without `PathPrefix`, you have to access it via URL:
// `http://<server>/static/static/image.png`.
app.Use("/static", filesystem.New(filesystem.Config{
Root: http.FS(embedDirStatic),
PathPrefix: "static",
Browse: true,
}))

log.Fatal(app.Listen(":3000"))
}

pkger

https://github.com/markbates/pkger

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/markbates/pkger"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: pkger.Dir("/assets"),
}))

log.Fatal(app.Listen(":3000"))
}

packr

https://github.com/gobuffalo/packr

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/gobuffalo/packr/v2"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: packr.New("Assets Box", "/assets"),
}))

log.Fatal(app.Listen(":3000"))
}

go.rice

https://github.com/GeertJohan/go.rice

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/GeertJohan/go.rice"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: rice.MustFindBox("assets").HTTPBox(),
}))

log.Fatal(app.Listen(":3000"))
}

fileb0x

https://github.com/UnnoTed/fileb0x

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"<Your go module>/myEmbeddedFiles"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: myEmbeddedFiles.HTTP,
}))

log.Fatal(app.Listen(":3000"))
}

statik

https://github.com/rakyll/statik

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

// Use blank to invoke init function and register data to statik
_ "<Your go module>/statik"
"github.com/rakyll/statik/fs"
)

func main() {
statikFS, err := fs.New()
if err != nil {
panic(err)
}

app := fiber.New()

app.Use("/", filesystem.New(filesystem.Config{
Root: statikFS,
}))

log.Fatal(app.Listen(":3000"))
}

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Root is a FileSystem that provides access
// to a collection of files and directories.
//
// Required. Default: nil
Root http.FileSystem `json:"-"`

// PathPrefix defines a prefix to be added to a filepath when
// reading a file from the FileSystem.
//
// Use when using Go 1.16 embed.FS
//
// Optional. Default ""
PathPrefix string `json:"path_prefix"`

// Enable directory browsing.
//
// Optional. Default: false
Browse bool `json:"browse"`

// Index file for serving a directory.
//
// Optional. Default: "index.html"
Index string `json:"index"`

// The value for the Cache-Control HTTP-header
// that is set on the file response. MaxAge is defined in seconds.
//
// Optional. Default value 0.
MaxAge int `json:"max_age"`

// File to return if path is not found. Useful for SPA's.
//
// Optional. Default: ""
NotFoundFile string `json:"not_found_file"`

// The value for the Content-Type HTTP-header
// that is set on the file response
//
// Optional. Default: ""
ContentTypeCharset string `json:"content_type_charset"`
}

Default Config

var ConfigDefault = Config{
Next: nil,
Root: nil,
PathPrefix: "",
Browse: false,
Index: "/index.html",
MaxAge: 0,
ContentTypeCharset: "",
}
- - +
Skip to main content
Version: v2.x

FileSystem

Filesystem middleware for Fiber that enables you to serve files from a directory.

caution

:params & :optionals? within the prefix path are not supported!

To handle paths with spaces (or other url encoded values) make sure to set fiber.Config{ UnescapePath: true }

Signatures

func New(config Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
app.Use(filesystem.New(filesystem.Config{
Root: http.Dir("./assets"),
}))

// Or extend your config for customization
app.Use(filesystem.New(filesystem.Config{
Root: http.Dir("./assets"),
Browse: true,
Index: "index.html",
NotFoundFile: "404.html",
MaxAge: 3600,
}))

If your environment (Go 1.16+) supports it, we recommend using Go Embed instead of the other solutions listed as this one is native to Go and the easiest to use.

embed

Embed is the native method to embed files in a Golang excecutable. Introduced in Go 1.16.

package main

import (
"embed"
"io/fs"
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)

// Embed a single file
//go:embed index.html
var f embed.FS

// Embed a directory
//go:embed static/*
var embedDirStatic embed.FS

func main() {
app := fiber.New()

app.Use("/", filesystem.New(filesystem.Config{
Root: http.FS(f),
}))

// Access file "image.png" under `static/` directory via URL: `http://<server>/static/image.png`.
// Without `PathPrefix`, you have to access it via URL:
// `http://<server>/static/static/image.png`.
app.Use("/static", filesystem.New(filesystem.Config{
Root: http.FS(embedDirStatic),
PathPrefix: "static",
Browse: true,
}))

log.Fatal(app.Listen(":3000"))
}

pkger

https://github.com/markbates/pkger

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/markbates/pkger"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: pkger.Dir("/assets"),
}))

log.Fatal(app.Listen(":3000"))
}

packr

https://github.com/gobuffalo/packr

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/gobuffalo/packr/v2"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: packr.New("Assets Box", "/assets"),
}))

log.Fatal(app.Listen(":3000"))
}

go.rice

https://github.com/GeertJohan/go.rice

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/GeertJohan/go.rice"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: rice.MustFindBox("assets").HTTPBox(),
}))

log.Fatal(app.Listen(":3000"))
}

fileb0x

https://github.com/UnnoTed/fileb0x

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"<Your go module>/myEmbeddedFiles"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: myEmbeddedFiles.HTTP,
}))

log.Fatal(app.Listen(":3000"))
}

statik

https://github.com/rakyll/statik

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

// Use blank to invoke init function and register data to statik
_ "<Your go module>/statik"
"github.com/rakyll/statik/fs"
)

func main() {
statikFS, err := fs.New()
if err != nil {
panic(err)
}

app := fiber.New()

app.Use("/", filesystem.New(filesystem.Config{
Root: statikFS,
}))

log.Fatal(app.Listen(":3000"))
}

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Root is a FileSystem that provides access
// to a collection of files and directories.
//
// Required. Default: nil
Root http.FileSystem `json:"-"`

// PathPrefix defines a prefix to be added to a filepath when
// reading a file from the FileSystem.
//
// Use when using Go 1.16 embed.FS
//
// Optional. Default ""
PathPrefix string `json:"path_prefix"`

// Enable directory browsing.
//
// Optional. Default: false
Browse bool `json:"browse"`

// Index file for serving a directory.
//
// Optional. Default: "index.html"
Index string `json:"index"`

// The value for the Cache-Control HTTP-header
// that is set on the file response. MaxAge is defined in seconds.
//
// Optional. Default value 0.
MaxAge int `json:"max_age"`

// File to return if path is not found. Useful for SPA's.
//
// Optional. Default: ""
NotFoundFile string `json:"not_found_file"`

// The value for the Content-Type HTTP-header
// that is set on the file response
//
// Optional. Default: ""
ContentTypeCharset string `json:"content_type_charset"`
}

Default Config

var ConfigDefault = Config{
Next: nil,
Root: nil,
PathPrefix: "",
Browse: false,
Index: "/index.html",
MaxAge: 0,
ContentTypeCharset: "",
}
+ + \ No newline at end of file diff --git a/api/middleware/helmet/index.html b/api/middleware/helmet/index.html index 4b9f5a45f74..49dde523f88 100644 --- a/api/middleware/helmet/index.html +++ b/api/middleware/helmet/index.html @@ -6,13 +6,13 @@ Helmet | Fiber - - + +
-
Skip to main content
Version: v2.x

Helmet

Helmet middleware helps secure your apps by setting various HTTP headers.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/helmet"
)

func main() {
app := fiber.New()

app.Use(helmet.New())

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome!")
})

app.Listen(":3000")
}

Test:

curl -I http://localhost:3000

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// XSSProtection
// Optional. Default value "0".
XSSProtection string

// ContentTypeNosniff
// Optional. Default value "nosniff".
ContentTypeNosniff string

// XFrameOptions
// Optional. Default value "SAMEORIGIN".
// Possible values: "SAMEORIGIN", "DENY", "ALLOW-FROM uri"
XFrameOptions string

// HSTSMaxAge
// Optional. Default value 0.
HSTSMaxAge int

// HSTSExcludeSubdomains
// Optional. Default value false.
HSTSExcludeSubdomains bool

// ContentSecurityPolicy
// Optional. Default value "".
ContentSecurityPolicy string

// CSPReportOnly
// Optional. Default value false.
CSPReportOnly bool

// HSTSPreloadEnabled
// Optional. Default value false.
HSTSPreloadEnabled bool

// ReferrerPolicy
// Optional. Default value "ReferrerPolicy".
ReferrerPolicy string

// Permissions-Policy
// Optional. Default value "".
PermissionPolicy string

// Cross-Origin-Embedder-Policy
// Optional. Default value "require-corp".
CrossOriginEmbedderPolicy string

// Cross-Origin-Opener-Policy
// Optional. Default value "same-origin".
CrossOriginOpenerPolicy string

// Cross-Origin-Resource-Policy
// Optional. Default value "same-origin".
CrossOriginResourcePolicy string

// Origin-Agent-Cluster
// Optional. Default value "?1".
OriginAgentCluster string

// X-DNS-Prefetch-Control
// Optional. Default value "off".
XDNSPrefetchControl string

// X-Download-Options
// Optional. Default value "noopen".
XDownloadOptions string

// X-Permitted-Cross-Domain-Policies
// Optional. Default value "none".
XPermittedCrossDomain string
}

Default Config

var ConfigDefault = Config{
XSSProtection: "0",
ContentTypeNosniff: "nosniff",
XFrameOptions: "SAMEORIGIN",
ReferrerPolicy: "no-referrer",
CrossOriginEmbedderPolicy: "require-corp",
CrossOriginOpenerPolicy: "same-origin",
CrossOriginResourcePolicy: "same-origin",
OriginAgentCluster: "?1",
XDNSPrefetchControl: "off",
XDownloadOptions: "noopen",
XPermittedCrossDomain: "none",
}
- - +
Skip to main content
Version: v2.x

Helmet

Helmet middleware helps secure your apps by setting various HTTP headers.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/helmet"
)

func main() {
app := fiber.New()

app.Use(helmet.New())

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome!")
})

app.Listen(":3000")
}

Test:

curl -I http://localhost:3000

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// XSSProtection
// Optional. Default value "0".
XSSProtection string

// ContentTypeNosniff
// Optional. Default value "nosniff".
ContentTypeNosniff string

// XFrameOptions
// Optional. Default value "SAMEORIGIN".
// Possible values: "SAMEORIGIN", "DENY", "ALLOW-FROM uri"
XFrameOptions string

// HSTSMaxAge
// Optional. Default value 0.
HSTSMaxAge int

// HSTSExcludeSubdomains
// Optional. Default value false.
HSTSExcludeSubdomains bool

// ContentSecurityPolicy
// Optional. Default value "".
ContentSecurityPolicy string

// CSPReportOnly
// Optional. Default value false.
CSPReportOnly bool

// HSTSPreloadEnabled
// Optional. Default value false.
HSTSPreloadEnabled bool

// ReferrerPolicy
// Optional. Default value "ReferrerPolicy".
ReferrerPolicy string

// Permissions-Policy
// Optional. Default value "".
PermissionPolicy string

// Cross-Origin-Embedder-Policy
// Optional. Default value "require-corp".
CrossOriginEmbedderPolicy string

// Cross-Origin-Opener-Policy
// Optional. Default value "same-origin".
CrossOriginOpenerPolicy string

// Cross-Origin-Resource-Policy
// Optional. Default value "same-origin".
CrossOriginResourcePolicy string

// Origin-Agent-Cluster
// Optional. Default value "?1".
OriginAgentCluster string

// X-DNS-Prefetch-Control
// Optional. Default value "off".
XDNSPrefetchControl string

// X-Download-Options
// Optional. Default value "noopen".
XDownloadOptions string

// X-Permitted-Cross-Domain-Policies
// Optional. Default value "none".
XPermittedCrossDomain string
}

Default Config

var ConfigDefault = Config{
XSSProtection: "0",
ContentTypeNosniff: "nosniff",
XFrameOptions: "SAMEORIGIN",
ReferrerPolicy: "no-referrer",
CrossOriginEmbedderPolicy: "require-corp",
CrossOriginOpenerPolicy: "same-origin",
CrossOriginResourcePolicy: "same-origin",
OriginAgentCluster: "?1",
XDNSPrefetchControl: "off",
XDownloadOptions: "noopen",
XPermittedCrossDomain: "none",
}
+ + \ No newline at end of file diff --git a/api/middleware/idempotency/index.html b/api/middleware/idempotency/index.html index 177261b5f0f..c0998ecd139 100644 --- a/api/middleware/idempotency/index.html +++ b/api/middleware/idempotency/index.html @@ -6,13 +6,13 @@ Idempotency | Fiber - - + +
-
Skip to main content
Version: v2.x

Idempotency

Idempotency middleware for Fiber allows for fault-tolerant APIs where duplicate requests — for example due to networking issues on the client-side — do not erroneously cause the same action performed multiple times on the server-side.

Refer to https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-02 for a better understanding.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/idempotency"
)

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(idempotency.New())

Custom Config

app.Use(idempotency.New(idempotency.Config{
Lifetime: 42 * time.Minute,
// ...
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: a function which skips the middleware on safe HTTP request method.
Next func(c *fiber.Ctx) bool

// Lifetime is the maximum lifetime of an idempotency key.
//
// Optional. Default: 30 * time.Minute
Lifetime time.Duration

// KeyHeader is the name of the header that contains the idempotency key.
//
// Optional. Default: X-Idempotency-Key
KeyHeader string
// KeyHeaderValidate defines a function to validate the syntax of the idempotency header.
//
// Optional. Default: a function which ensures the header is 36 characters long (the size of an UUID).
KeyHeaderValidate func(string) error

// KeepResponseHeaders is a list of headers that should be kept from the original response.
//
// Optional. Default: nil (to keep all headers)
KeepResponseHeaders []string

// Lock locks an idempotency key.
//
// Optional. Default: an in-memory locker for this process only.
Lock Locker

// Storage stores response data by idempotency key.
//
// Optional. Default: an in-memory storage for this process only.
Storage fiber.Storage
}

Default Config

var ConfigDefault = Config{
Next: func(c *fiber.Ctx) bool {
// Skip middleware if the request was done using a safe HTTP method
return fiber.IsMethodSafe(c.Method())
},

Lifetime: 30 * time.Minute,

KeyHeader: "X-Idempotency-Key",
KeyHeaderValidate: func(k string) error {
if l, wl := len(k), 36; l != wl { // UUID length is 36 chars
return fmt.Errorf("%w: invalid length: %d != %d", ErrInvalidIdempotencyKey, l, wl)
}

return nil
},

KeepResponseHeaders: nil,

Lock: nil, // Set in configDefault so we don't allocate data here.

Storage: nil, // Set in configDefault so we don't allocate data here.
}
- - +
Skip to main content
Version: v2.x

Idempotency

Idempotency middleware for Fiber allows for fault-tolerant APIs where duplicate requests — for example due to networking issues on the client-side — do not erroneously cause the same action performed multiple times on the server-side.

Refer to https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-02 for a better understanding.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/idempotency"
)

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(idempotency.New())

Custom Config

app.Use(idempotency.New(idempotency.Config{
Lifetime: 42 * time.Minute,
// ...
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: a function which skips the middleware on safe HTTP request method.
Next func(c *fiber.Ctx) bool

// Lifetime is the maximum lifetime of an idempotency key.
//
// Optional. Default: 30 * time.Minute
Lifetime time.Duration

// KeyHeader is the name of the header that contains the idempotency key.
//
// Optional. Default: X-Idempotency-Key
KeyHeader string
// KeyHeaderValidate defines a function to validate the syntax of the idempotency header.
//
// Optional. Default: a function which ensures the header is 36 characters long (the size of an UUID).
KeyHeaderValidate func(string) error

// KeepResponseHeaders is a list of headers that should be kept from the original response.
//
// Optional. Default: nil (to keep all headers)
KeepResponseHeaders []string

// Lock locks an idempotency key.
//
// Optional. Default: an in-memory locker for this process only.
Lock Locker

// Storage stores response data by idempotency key.
//
// Optional. Default: an in-memory storage for this process only.
Storage fiber.Storage
}

Default Config

var ConfigDefault = Config{
Next: func(c *fiber.Ctx) bool {
// Skip middleware if the request was done using a safe HTTP method
return fiber.IsMethodSafe(c.Method())
},

Lifetime: 30 * time.Minute,

KeyHeader: "X-Idempotency-Key",
KeyHeaderValidate: func(k string) error {
if l, wl := len(k), 36; l != wl { // UUID length is 36 chars
return fmt.Errorf("%w: invalid length: %d != %d", ErrInvalidIdempotencyKey, l, wl)
}

return nil
},

KeepResponseHeaders: nil,

Lock: nil, // Set in configDefault so we don't allocate data here.

Storage: nil, // Set in configDefault so we don't allocate data here.
}
+ + \ No newline at end of file diff --git a/api/middleware/keyauth/index.html b/api/middleware/keyauth/index.html index ca714dc0946..2acdb98ef8d 100644 --- a/api/middleware/keyauth/index.html +++ b/api/middleware/keyauth/index.html @@ -6,13 +6,13 @@ Keyauth | Fiber - - + +
-
Skip to main content
Version: v2.x

Keyauth

Key auth middleware provides a key based authentication.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
)

var (
apiKey = "correct horse battery staple"
)

func validateAPIKey(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
}

func main() {
app := fiber.New()

// note that the keyauth middleware needs to be defined before the routes are defined!
app.Use(keyauth.New(keyauth.Config{
KeyLookup: "cookie:access_token",
Validator: validateAPIKey,
}))

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})

app.Listen(":3000")
}

Test:

# No api-key specified -> 400 missing 
curl http://localhost:3000
#> missing or malformed API Key

curl --cookie "access_token=correct horse battery staple" http://localhost:3000
#> Successfully authenticated!

curl --cookie "access_token=Clearly A Wrong Key" http://localhost:3000
#> missing or malformed API Key

For a more detailed example, see also the github.com/gofiber/recipes repository and specifically the fiber-envoy-extauthz repository and the keyauth example code.

Authenticate only certain endpoints

If you want to authenticate only certain endpoints, you can use the Config of keyauth and apply a filter function (eg. authFilter) like so

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
"regexp"
"strings"
)

var (
apiKey = "correct horse battery staple"
protectedURLs = []*regexp.Regexp{
regexp.MustCompile("^/authenticated$"),
regexp.MustCompile("^/auth2$"),
}
)

func validateAPIKey(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
}

func authFilter(c *fiber.Ctx) bool {
originalURL := strings.ToLower(c.OriginalURL())

for _, pattern := range protectedURLs {
if pattern.MatchString(originalURL) {
return false
}
}
return true
}

func main() {
app := fiber.New()

app.Use(keyauth.New(keyauth.Config{
Next: authFilter,
KeyLookup: "cookie:access_token",
Validator: validateAPIKey,
}))

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome")
})
app.Get("/authenticated", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})
app.Get("/auth2", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated 2!")
})

app.Listen(":3000")
}

Which results in this

# / does not need to be authenticated
curl http://localhost:3000
#> Welcome

# /authenticated needs to be authenticated
curl --cookie "access_token=correct horse battery staple" http://localhost:3000/authenticated
#> Successfully authenticated!

# /auth2 needs to be authenticated too
curl --cookie "access_token=correct horse battery staple" http://localhost:3000/auth2
#> Successfully authenticated 2!

Specifying middleware in the handler

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
)

const (
apiKey = "my-super-secret-key"
)

func main() {
app := fiber.New()

authMiddleware := keyauth.New(keyauth.Config{
Validator: func(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
},
})

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome")
})

app.Get("/allowed", authMiddleware, func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})

app.Listen(":3000")
}

Which results in this

# / does not need to be authenticated
curl http://localhost:3000
#> Welcome

# /allowed needs to be authenticated too
curl --header "Authorization: Bearer my-super-secret-key" http://localhost:3000/allowed
#> Successfully authenticated!

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// SuccessHandler defines a function which is executed for a valid key.
// Optional. Default: nil
SuccessHandler fiber.Handler

// ErrorHandler defines a function which is executed for an invalid key.
// It may be used to define a custom error.
// Optional. Default: 401 Invalid or expired key
ErrorHandler fiber.ErrorHandler

// KeyLookup is a string in the form of "<source>:<name>" that is used
// to extract key from the request.
// Optional. Default value "header:Authorization".
// Possible values:
// - "header:<name>"
// - "query:<name>"
// - "form:<name>"
// - "param:<name>"
// - "cookie:<name>"
KeyLookup string

// AuthScheme to be used in the Authorization header.
// Optional. Default value "Bearer".
AuthScheme string

// Validator is a function to validate key.
Validator func(*fiber.Ctx, string) (bool, error)

// Context key to store the bearertoken from the token into context.
// Optional. Default: "token".
ContextKey string
}

Default Config

var ConfigDefault = Config{
SuccessHandler: func(c *fiber.Ctx) error {
return c.Next()
},
ErrorHandler: func(c *fiber.Ctx, err error) error {
if err == ErrMissingOrMalformedAPIKey {
return c.Status(fiber.StatusUnauthorized).SendString(err.Error())
}
return c.Status(fiber.StatusUnauthorized).SendString("Invalid or expired API Key")
},
KeyLookup: "header:" + fiber.HeaderAuthorization,
AuthScheme: "Bearer",
ContextKey: "token",
}
- - +
Skip to main content
Version: v2.x

Keyauth

Key auth middleware provides a key based authentication.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
)

var (
apiKey = "correct horse battery staple"
)

func validateAPIKey(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
}

func main() {
app := fiber.New()

// note that the keyauth middleware needs to be defined before the routes are defined!
app.Use(keyauth.New(keyauth.Config{
KeyLookup: "cookie:access_token",
Validator: validateAPIKey,
}))

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})

app.Listen(":3000")
}

Test:

# No api-key specified -> 400 missing 
curl http://localhost:3000
#> missing or malformed API Key

curl --cookie "access_token=correct horse battery staple" http://localhost:3000
#> Successfully authenticated!

curl --cookie "access_token=Clearly A Wrong Key" http://localhost:3000
#> missing or malformed API Key

For a more detailed example, see also the github.com/gofiber/recipes repository and specifically the fiber-envoy-extauthz repository and the keyauth example code.

Authenticate only certain endpoints

If you want to authenticate only certain endpoints, you can use the Config of keyauth and apply a filter function (eg. authFilter) like so

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
"regexp"
"strings"
)

var (
apiKey = "correct horse battery staple"
protectedURLs = []*regexp.Regexp{
regexp.MustCompile("^/authenticated$"),
regexp.MustCompile("^/auth2$"),
}
)

func validateAPIKey(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
}

func authFilter(c *fiber.Ctx) bool {
originalURL := strings.ToLower(c.OriginalURL())

for _, pattern := range protectedURLs {
if pattern.MatchString(originalURL) {
return false
}
}
return true
}

func main() {
app := fiber.New()

app.Use(keyauth.New(keyauth.Config{
Next: authFilter,
KeyLookup: "cookie:access_token",
Validator: validateAPIKey,
}))

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome")
})
app.Get("/authenticated", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})
app.Get("/auth2", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated 2!")
})

app.Listen(":3000")
}

Which results in this

# / does not need to be authenticated
curl http://localhost:3000
#> Welcome

# /authenticated needs to be authenticated
curl --cookie "access_token=correct horse battery staple" http://localhost:3000/authenticated
#> Successfully authenticated!

# /auth2 needs to be authenticated too
curl --cookie "access_token=correct horse battery staple" http://localhost:3000/auth2
#> Successfully authenticated 2!

Specifying middleware in the handler

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
)

const (
apiKey = "my-super-secret-key"
)

func main() {
app := fiber.New()

authMiddleware := keyauth.New(keyauth.Config{
Validator: func(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
},
})

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome")
})

app.Get("/allowed", authMiddleware, func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})

app.Listen(":3000")
}

Which results in this

# / does not need to be authenticated
curl http://localhost:3000
#> Welcome

# /allowed needs to be authenticated too
curl --header "Authorization: Bearer my-super-secret-key" http://localhost:3000/allowed
#> Successfully authenticated!

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// SuccessHandler defines a function which is executed for a valid key.
// Optional. Default: nil
SuccessHandler fiber.Handler

// ErrorHandler defines a function which is executed for an invalid key.
// It may be used to define a custom error.
// Optional. Default: 401 Invalid or expired key
ErrorHandler fiber.ErrorHandler

// KeyLookup is a string in the form of "<source>:<name>" that is used
// to extract key from the request.
// Optional. Default value "header:Authorization".
// Possible values:
// - "header:<name>"
// - "query:<name>"
// - "form:<name>"
// - "param:<name>"
// - "cookie:<name>"
KeyLookup string

// AuthScheme to be used in the Authorization header.
// Optional. Default value "Bearer".
AuthScheme string

// Validator is a function to validate key.
Validator func(*fiber.Ctx, string) (bool, error)

// Context key to store the bearertoken from the token into context.
// Optional. Default: "token".
ContextKey string
}

Default Config

var ConfigDefault = Config{
SuccessHandler: func(c *fiber.Ctx) error {
return c.Next()
},
ErrorHandler: func(c *fiber.Ctx, err error) error {
if err == ErrMissingOrMalformedAPIKey {
return c.Status(fiber.StatusUnauthorized).SendString(err.Error())
}
return c.Status(fiber.StatusUnauthorized).SendString("Invalid or expired API Key")
},
KeyLookup: "header:" + fiber.HeaderAuthorization,
AuthScheme: "Bearer",
ContextKey: "token",
}
+ + \ No newline at end of file diff --git a/api/middleware/limiter/index.html b/api/middleware/limiter/index.html index 299f631ce4c..3415e8f8191 100644 --- a/api/middleware/limiter/index.html +++ b/api/middleware/limiter/index.html @@ -6,13 +6,13 @@ Limiter | Fiber - - + +
-
Skip to main content
Version: v2.x

Limiter

Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

note

This module does not share state with other processes/servers by default.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/limiter"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(limiter.New())

// Or extend your config for customization
app.Use(limiter.New(limiter.Config{
Next: func(c *fiber.Ctx) bool {
return c.IP() == "127.0.0.1"
},
Max: 20,
Expiration: 30 * time.Second,
KeyGenerator: func(c *fiber.Ctx) string {
return c.Get("x-forwarded-for")
},
LimitReached: func(c *fiber.Ctx) error {
return c.SendFile("./toofast.html")
},
Storage: myCustomStorage{},
}))

Sliding window

Instead of using the standard fixed window algorithm, you can enable the sliding window algorithm.

A example of such configuration is:

app.Use(limiter.New(limiter.Config{
Max: 20,
Expiration: 30 * time.Second,
LimiterMiddleware: limiter.SlidingWindow{},
}))

This means that every window will take into account the previous window(if there was any). The given formula for the rate is:

weightOfPreviousWindpw = previous window's amount request * (whenNewWindow / Expiration)
rate = weightOfPreviousWindpw + current window's amount request.

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Max number of recent connections during `Duration` seconds before sending a 429 response
//
// Default: 5
Max int

// KeyGenerator allows you to generate custom keys, by default c.IP() is used
//
// Default: func(c *fiber.Ctx) string {
// return c.IP()
// }
KeyGenerator func(*fiber.Ctx) string

// Expiration is the time on how long to keep records of requests in memory
//
// Default: 1 * time.Minute
Expiration time.Duration

// LimitReached is called when a request hits the limit
//
// Default: func(c *fiber.Ctx) error {
// return c.SendStatus(fiber.StatusTooManyRequests)
// }
LimitReached fiber.Handler

// When set to true, requests with StatusCode >= 400 won't be counted.
//
// Default: false
SkipFailedRequests bool

// When set to true, requests with StatusCode < 400 won't be counted.
//
// Default: false
SkipSuccessfulRequests bool

// Store is used to store the state of the middleware
//
// Default: an in memory store for this process only
Storage fiber.Storage

// LimiterMiddleware is the struct that implements limiter middleware.
//
// Default: a new Fixed Window Rate Limiter
LimiterMiddleware LimiterHandler
}
note

A custom store can be used if it implements the Storage interface - more details and an example can be found in store.go.

Default Config

var ConfigDefault = Config{
Max: 5,
Expiration: 1 * time.Minute,
KeyGenerator: func(c *fiber.Ctx) string {
return c.IP()
},
LimitReached: func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusTooManyRequests)
},
SkipFailedRequests: false,
SkipSuccessfulRequests: false,
LimiterMiddleware: FixedWindow{},
}

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
app.Use(limiter.New(limiter.Config{
Storage: storage,
}))
- - +
Skip to main content
Version: v2.x

Limiter

Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

note

This module does not share state with other processes/servers by default.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/limiter"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(limiter.New())

// Or extend your config for customization
app.Use(limiter.New(limiter.Config{
Next: func(c *fiber.Ctx) bool {
return c.IP() == "127.0.0.1"
},
Max: 20,
Expiration: 30 * time.Second,
KeyGenerator: func(c *fiber.Ctx) string {
return c.Get("x-forwarded-for")
},
LimitReached: func(c *fiber.Ctx) error {
return c.SendFile("./toofast.html")
},
Storage: myCustomStorage{},
}))

Sliding window

Instead of using the standard fixed window algorithm, you can enable the sliding window algorithm.

A example of such configuration is:

app.Use(limiter.New(limiter.Config{
Max: 20,
Expiration: 30 * time.Second,
LimiterMiddleware: limiter.SlidingWindow{},
}))

This means that every window will take into account the previous window(if there was any). The given formula for the rate is:

weightOfPreviousWindpw = previous window's amount request * (whenNewWindow / Expiration)
rate = weightOfPreviousWindpw + current window's amount request.

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Max number of recent connections during `Duration` seconds before sending a 429 response
//
// Default: 5
Max int

// KeyGenerator allows you to generate custom keys, by default c.IP() is used
//
// Default: func(c *fiber.Ctx) string {
// return c.IP()
// }
KeyGenerator func(*fiber.Ctx) string

// Expiration is the time on how long to keep records of requests in memory
//
// Default: 1 * time.Minute
Expiration time.Duration

// LimitReached is called when a request hits the limit
//
// Default: func(c *fiber.Ctx) error {
// return c.SendStatus(fiber.StatusTooManyRequests)
// }
LimitReached fiber.Handler

// When set to true, requests with StatusCode >= 400 won't be counted.
//
// Default: false
SkipFailedRequests bool

// When set to true, requests with StatusCode < 400 won't be counted.
//
// Default: false
SkipSuccessfulRequests bool

// Store is used to store the state of the middleware
//
// Default: an in memory store for this process only
Storage fiber.Storage

// LimiterMiddleware is the struct that implements limiter middleware.
//
// Default: a new Fixed Window Rate Limiter
LimiterMiddleware LimiterHandler
}
note

A custom store can be used if it implements the Storage interface - more details and an example can be found in store.go.

Default Config

var ConfigDefault = Config{
Max: 5,
Expiration: 1 * time.Minute,
KeyGenerator: func(c *fiber.Ctx) string {
return c.IP()
},
LimitReached: func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusTooManyRequests)
},
SkipFailedRequests: false,
SkipSuccessfulRequests: false,
LimiterMiddleware: FixedWindow{},
}

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
app.Use(limiter.New(limiter.Config{
Storage: storage,
}))
+ + \ No newline at end of file diff --git a/api/middleware/logger/index.html b/api/middleware/logger/index.html index 4c6cea285b5..4a5ece43f0f 100644 --- a/api/middleware/logger/index.html +++ b/api/middleware/logger/index.html @@ -6,14 +6,14 @@ Logger | Fiber - - + +
Skip to main content
Version: v2.x

Logger

Logger middleware for Fiber that logs HTTP request/response details.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/logger"
)
tip

The order of registration plays a role. Only all routes that are registered after this one will be logged. -The middleware should therefore be one of the first to be registered.

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(logger.New())

// Or extend your config for customization
// Logging remote IP and Port
app.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))

// Logging Request ID
app.Use(requestid.New())
app.Use(logger.New(logger.Config{
// For more options, see the Config section
Format: "${pid} ${locals:requestid} ${status} - ${method} ${path}​\n",
}))

// Changing TimeZone & TimeFormat
app.Use(logger.New(logger.Config{
Format: "${pid} ${status} - ${method} ${path}\n",
TimeFormat: "02-Jan-2006",
TimeZone: "America/New_York",
}))

// Custom File Writer
file, err := os.OpenFile("./123.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
log.Fatalf("error opening file: %v", err)
}
defer file.Close()
app.Use(logger.New(logger.Config{
Output: file,
}))

// Add Custom Tags
app.Use(logger.New(logger.Config{
CustomTags: map[string]logger.LogFunc{
"custom_tag": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) {
return output.WriteString("it is a custom tag")
},
},
}))

// Callback after log is written
app.Use(logger.New(logger.Config{
TimeFormat: time.RFC3339Nano,
TimeZone: "Asia/Shanghai",
Done: func(c *fiber.Ctx, logString []byte) {
if c.Response().StatusCode() != fiber.StatusOK {
reporter.SendToSlack(logString)
}
},
}))

// Disable colors when outputting to default format
app.Use(logger.New(logger.Config{
DisableColors: true,
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Done is a function that is called after the log string for a request is written to Output,
// and pass the log string as parameter.
//
// Optional. Default: nil
Done func(c *fiber.Ctx, logString []byte)

// tagFunctions defines the custom tag action
//
// Optional. Default: map[string]LogFunc
CustomTags map[string]LogFunc

// Format defines the logging tags
//
// Optional. Default: [${time}] ${status} - ${latency} ${method} ${path}\n
Format string

// TimeFormat https://programming.guide/go/format-parse-string-time-date-example.html
//
// Optional. Default: 15:04:05
TimeFormat string

// TimeZone can be specified, such as "UTC" and "America/New_York" and "Asia/Chongqing", etc
//
// Optional. Default: "Local"
TimeZone string

// TimeInterval is the delay before the timestamp is updated
//
// Optional. Default: 500 * time.Millisecond
TimeInterval time.Duration

// Output is a writer where logs are written
//
// Default: os.Stdout
Output io.Writer

// DisableColors defines if the logs output should be colorized
//
// Default: false
DisableColors bool

enableColors bool
enableLatency bool
timeZoneLocation *time.Location
}
type LogFunc func(buf logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error)

Default Config

var ConfigDefault = Config{
Next: nil,
Done: nil,
Format: "[${time}] ${status} - ${latency} ${method} ${path}\n",
TimeFormat: "15:04:05",
TimeZone: "Local",
TimeInterval: 500 * time.Millisecond,
Output: os.Stdout,
DisableColors: true,
}

Constants

// Logger variables
const (
TagPid = "pid"
TagTime = "time"
TagReferer = "referer"
TagProtocol = "protocol"
TagPort = "port"
TagIP = "ip"
TagIPs = "ips"
TagHost = "host"
TagMethod = "method"
TagPath = "path"
TagURL = "url"
TagUA = "ua"
TagLatency = "latency"
TagStatus = "status" // response status
TagResBody = "resBody" // response body
TagReqHeaders = "reqHeaders"
TagQueryStringParams = "queryParams" // request query parameters
TagBody = "body" // request body
TagBytesSent = "bytesSent"
TagBytesReceived = "bytesReceived"
TagRoute = "route"
TagError = "error"
// DEPRECATED: Use TagReqHeader instead
TagHeader = "header:" // request header
TagReqHeader = "reqHeader:" // request header
TagRespHeader = "respHeader:" // response header
TagQuery = "query:" // request query
TagForm = "form:" // request form
TagCookie = "cookie:" // request cookie
TagLocals = "locals:"
// colors
TagBlack = "black"
TagRed = "red"
TagGreen = "green"
TagYellow = "yellow"
TagBlue = "blue"
TagMagenta = "magenta"
TagCyan = "cyan"
TagWhite = "white"
TagReset = "reset"
)
- - +The middleware should therefore be one of the first to be registered.

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(logger.New())

// Or extend your config for customization
// Logging remote IP and Port
app.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))

// Logging Request ID
app.Use(requestid.New())
app.Use(logger.New(logger.Config{
// For more options, see the Config section
Format: "${pid} ${locals:requestid} ${status} - ${method} ${path}​\n",
}))

// Changing TimeZone & TimeFormat
app.Use(logger.New(logger.Config{
Format: "${pid} ${status} - ${method} ${path}\n",
TimeFormat: "02-Jan-2006",
TimeZone: "America/New_York",
}))

// Custom File Writer
file, err := os.OpenFile("./123.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
log.Fatalf("error opening file: %v", err)
}
defer file.Close()
app.Use(logger.New(logger.Config{
Output: file,
}))

// Add Custom Tags
app.Use(logger.New(logger.Config{
CustomTags: map[string]logger.LogFunc{
"custom_tag": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) {
return output.WriteString("it is a custom tag")
},
},
}))

// Callback after log is written
app.Use(logger.New(logger.Config{
TimeFormat: time.RFC3339Nano,
TimeZone: "Asia/Shanghai",
Done: func(c *fiber.Ctx, logString []byte) {
if c.Response().StatusCode() != fiber.StatusOK {
reporter.SendToSlack(logString)
}
},
}))

// Disable colors when outputting to default format
app.Use(logger.New(logger.Config{
DisableColors: true,
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Done is a function that is called after the log string for a request is written to Output,
// and pass the log string as parameter.
//
// Optional. Default: nil
Done func(c *fiber.Ctx, logString []byte)

// tagFunctions defines the custom tag action
//
// Optional. Default: map[string]LogFunc
CustomTags map[string]LogFunc

// Format defines the logging tags
//
// Optional. Default: [${time}] ${status} - ${latency} ${method} ${path}\n
Format string

// TimeFormat https://programming.guide/go/format-parse-string-time-date-example.html
//
// Optional. Default: 15:04:05
TimeFormat string

// TimeZone can be specified, such as "UTC" and "America/New_York" and "Asia/Chongqing", etc
//
// Optional. Default: "Local"
TimeZone string

// TimeInterval is the delay before the timestamp is updated
//
// Optional. Default: 500 * time.Millisecond
TimeInterval time.Duration

// Output is a writer where logs are written
//
// Default: os.Stdout
Output io.Writer

// DisableColors defines if the logs output should be colorized
//
// Default: false
DisableColors bool

enableColors bool
enableLatency bool
timeZoneLocation *time.Location
}
type LogFunc func(buf logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error)

Default Config

var ConfigDefault = Config{
Next: nil,
Done: nil,
Format: "[${time}] ${status} - ${latency} ${method} ${path}\n",
TimeFormat: "15:04:05",
TimeZone: "Local",
TimeInterval: 500 * time.Millisecond,
Output: os.Stdout,
DisableColors: true,
}

Constants

// Logger variables
const (
TagPid = "pid"
TagTime = "time"
TagReferer = "referer"
TagProtocol = "protocol"
TagPort = "port"
TagIP = "ip"
TagIPs = "ips"
TagHost = "host"
TagMethod = "method"
TagPath = "path"
TagURL = "url"
TagUA = "ua"
TagLatency = "latency"
TagStatus = "status" // response status
TagResBody = "resBody" // response body
TagReqHeaders = "reqHeaders"
TagQueryStringParams = "queryParams" // request query parameters
TagBody = "body" // request body
TagBytesSent = "bytesSent"
TagBytesReceived = "bytesReceived"
TagRoute = "route"
TagError = "error"
// DEPRECATED: Use TagReqHeader instead
TagHeader = "header:" // request header
TagReqHeader = "reqHeader:" // request header
TagRespHeader = "respHeader:" // response header
TagQuery = "query:" // request query
TagForm = "form:" // request form
TagCookie = "cookie:" // request cookie
TagLocals = "locals:"
// colors
TagBlack = "black"
TagRed = "red"
TagGreen = "green"
TagYellow = "yellow"
TagBlue = "blue"
TagMagenta = "magenta"
TagCyan = "cyan"
TagWhite = "white"
TagReset = "reset"
)
+ + \ No newline at end of file diff --git a/api/middleware/monitor/index.html b/api/middleware/monitor/index.html index 9b785825f88..5b074521e49 100644 --- a/api/middleware/monitor/index.html +++ b/api/middleware/monitor/index.html @@ -6,14 +6,14 @@ Monitor | Fiber - - + +
Skip to main content
Version: v2.x

Monitor

Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor

caution

Monitor is still in beta, API might change in the future!

Signatures

func New() fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/monitor"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config (Assign the middleware to /metrics)
app.Get("/metrics", monitor.New())

// Or extend your config for customization
// Assign the middleware to /metrics
// and change the Title to `MyService Metrics Page`
app.Get("/metrics", monitor.New(monitor.Config{Title: "MyService Metrics Page"}))

You can also access the API endpoint with -curl -X GET -H "Accept: application/json" http://localhost:3000/metrics which returns:

{"pid":{ "cpu":0.4568381746582226, "ram":20516864,   "conns":3 },
"os": { "cpu":8.759124087593099, "ram":3997155328, "conns":44,
"total_ram":8245489664, "load_avg":0.51 }}

Config

// Config defines the config for middleware.
type Config struct {
// Metrics page title
//
// Optional. Default: "Fiber Monitor"
Title string

// Refresh period
//
// Optional. Default: 3 seconds
Refresh time.Duration

// Whether the service should expose only the monitoring API.
//
// Optional. Default: false
APIOnly bool

// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Custom HTML Code to Head Section(Before End)
//
// Optional. Default: empty
CustomHead string

// FontURL for specify font resource path or URL . also you can use relative path
//
// Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap
FontURL string

// ChartJsURL for specify ChartJS library path or URL . also you can use relative path
//
// Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js
ChartJsURL string

index string
}

Default Config

var ConfigDefault = Config{
Title: defaultTitle,
Refresh: defaultRefresh,
FontURL: defaultFontURL,
ChartJsURL: defaultChartJSURL,
CustomHead: defaultCustomHead,
APIOnly: false,
Next: nil,
index: newIndex(viewBag{
defaultTitle,
defaultRefresh,
defaultFontURL,
defaultChartJSURL,
defaultCustomHead,
}),
}
- - +curl -X GET -H "Accept: application/json" http://localhost:3000/metrics which returns:

{"pid":{ "cpu":0.4568381746582226, "ram":20516864,   "conns":3 },
"os": { "cpu":8.759124087593099, "ram":3997155328, "conns":44,
"total_ram":8245489664, "load_avg":0.51 }}

Config

// Config defines the config for middleware.
type Config struct {
// Metrics page title
//
// Optional. Default: "Fiber Monitor"
Title string

// Refresh period
//
// Optional. Default: 3 seconds
Refresh time.Duration

// Whether the service should expose only the monitoring API.
//
// Optional. Default: false
APIOnly bool

// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Custom HTML Code to Head Section(Before End)
//
// Optional. Default: empty
CustomHead string

// FontURL for specify font resource path or URL . also you can use relative path
//
// Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap
FontURL string

// ChartJsURL for specify ChartJS library path or URL . also you can use relative path
//
// Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js
ChartJsURL string

index string
}

Default Config

var ConfigDefault = Config{
Title: defaultTitle,
Refresh: defaultRefresh,
FontURL: defaultFontURL,
ChartJsURL: defaultChartJSURL,
CustomHead: defaultCustomHead,
APIOnly: false,
Next: nil,
index: newIndex(viewBag{
defaultTitle,
defaultRefresh,
defaultFontURL,
defaultChartJSURL,
defaultCustomHead,
}),
}
+ + \ No newline at end of file diff --git a/api/middleware/pprof/index.html b/api/middleware/pprof/index.html index b1d75c4ab18..0604f759cf0 100644 --- a/api/middleware/pprof/index.html +++ b/api/middleware/pprof/index.html @@ -6,13 +6,13 @@ Pprof | Fiber - - + +
-
Skip to main content
Version: v2.x

Pprof

Pprof middleware for Fiber that serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.

Signatures

func New() fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/pprof"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(pprof.New())

// Or extend your config for customization

// For example, in systems where you have multiple ingress endpoints, it is common to add a URL prefix, like so:
app.Use(pprof.New(pprof.Config{Prefix: "/endpoint-prefix"}))

// This prefix will be added to the default path of "/debug/pprof/", for a resulting URL of: "/endpoint-prefix/debug/pprof/".

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Prefix defines a URL prefix added before "/debug/pprof".
// Note that it should start with (but not end with) a slash.
// Example: "/federated-fiber"
//
// Optional. Default: ""
Prefix string
}

Default Config

var ConfigDefault = Config{
Next: nil,
}
- - +
Skip to main content
Version: v2.x

Pprof

Pprof middleware for Fiber that serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.

Signatures

func New() fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/pprof"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(pprof.New())

// Or extend your config for customization

// For example, in systems where you have multiple ingress endpoints, it is common to add a URL prefix, like so:
app.Use(pprof.New(pprof.Config{Prefix: "/endpoint-prefix"}))

// This prefix will be added to the default path of "/debug/pprof/", for a resulting URL of: "/endpoint-prefix/debug/pprof/".

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Prefix defines a URL prefix added before "/debug/pprof".
// Note that it should start with (but not end with) a slash.
// Example: "/federated-fiber"
//
// Optional. Default: ""
Prefix string
}

Default Config

var ConfigDefault = Config{
Next: nil,
}
+ + \ No newline at end of file diff --git a/api/middleware/proxy/index.html b/api/middleware/proxy/index.html index 65fc8abf3cf..93b973c98d6 100644 --- a/api/middleware/proxy/index.html +++ b/api/middleware/proxy/index.html @@ -6,13 +6,13 @@ Proxy | Fiber - - + +
-
Skip to main content
Version: v2.x

Proxy

Proxy middleware for Fiber that allows you to proxy requests to multiple servers.

Signatures

// Balancer create a load balancer among multiple upstrem servers.
func Balancer(config Config) fiber.Handler
// Forward performs the given http request and fills the given http response.
func Forward(addr string, clients ...*fasthttp.Client) fiber.Handler
// Do performs the given http request and fills the given http response.
func Do(c *fiber.Ctx, addr string, clients ...*fasthttp.Client) error
// DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects.
func DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error
// DoDeadline performs the given request and waits for response until the given deadline.
func DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error
// DoTimeout performs the given request and waits for response during the given timeout duration.
func DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error
// DomainForward the given http request based on the given domain and fills the given http response
func DomainForward(hostname string, addr string, clients ...*fasthttp.Client) fiber.Handler
// BalancerForward performs the given http request based round robin balancer and fills the given http response
func BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/proxy"
)

After you initiate your Fiber app, you can use the following possibilities:

// if target https site uses a self-signed certificate, you should
// call WithTlsConfig before Do and Forward
proxy.WithTlsConfig(&tls.Config{
InsecureSkipVerify: true,
})
// if you need to use global self-custom client, you should use proxy.WithClient.
proxy.WithClient(&fasthttp.Client{
NoDefaultUserAgentHeader: true,
DisablePathNormalizing: true,
})

// Forward to url
app.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif"))

// If you want to forward with a specific domain. You have to use proxy.DomainForward.
app.Get("/payments", proxy.DomainForward("docs.gofiber.io", "http://localhost:8000"))

// Forward to url with local custom client
app.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif", &fasthttp.Client{
NoDefaultUserAgentHeader: true,
DisablePathNormalizing: true,
}))

// Make request within handler
app.Get("/:id", func(c *fiber.Ctx) error {
url := "https://i.imgur.com/"+c.Params("id")+".gif"
if err := proxy.Do(c, url); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests while following redirects
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoRedirects(c, "http://google.com", 3); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests and wait up to 5 seconds before timing out
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoTimeout(c, "http://localhost:3000", time.Second * 5); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests, timeout a minute from now
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoDeadline(c, "http://localhost", time.Now().Add(time.Minute)); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Minimal round robin balancer
app.Use(proxy.Balancer(proxy.Config{
Servers: []string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
},
}))

// Or extend your balancer for customization
app.Use(proxy.Balancer(proxy.Config{
Servers: []string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
},
ModifyRequest: func(c *fiber.Ctx) error {
c.Request().Header.Add("X-Real-IP", c.IP())
return nil
},
ModifyResponse: func(c *fiber.Ctx) error {
c.Response().Header.Del(fiber.HeaderServer)
return nil
},
}))

// Or this way if the balancer is using https and the destination server is only using http.
app.Use(proxy.BalancerForward([]string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Servers defines a list of <scheme>://<host> HTTP servers,
//
// which are used in a round-robin manner.
// i.e.: "https://foobar.com, http://www.foobar.com"
//
// Required
Servers []string

// ModifyRequest allows you to alter the request
//
// Optional. Default: nil
ModifyRequest fiber.Handler

// ModifyResponse allows you to alter the response
//
// Optional. Default: nil
ModifyResponse fiber.Handler

// Timeout is the request timeout used when calling the proxy client
//
// Optional. Default: 1 second
Timeout time.Duration

// Per-connection buffer size for requests' reading.
// This also limits the maximum header size.
// Increase this buffer if your clients send multi-KB RequestURIs
// and/or multi-KB headers (for example, BIG cookies).
ReadBufferSize int

// Per-connection buffer size for responses' writing.
WriteBufferSize int

// tls config for the http client.
TlsConfig *tls.Config

// Client is custom client when client config is complex.
// Note that Servers, Timeout, WriteBufferSize, ReadBufferSize and TlsConfig
// will not be used if the client are set.
Client *fasthttp.LBClient
}

Default Config

var ConfigDefault = Config{
Next: nil,
ModifyRequest: nil,
ModifyResponse: nil,
Timeout: fasthttp.DefaultLBClientTimeout,
}
- - +
Skip to main content
Version: v2.x

Proxy

Proxy middleware for Fiber that allows you to proxy requests to multiple servers.

Signatures

// Balancer create a load balancer among multiple upstrem servers.
func Balancer(config Config) fiber.Handler
// Forward performs the given http request and fills the given http response.
func Forward(addr string, clients ...*fasthttp.Client) fiber.Handler
// Do performs the given http request and fills the given http response.
func Do(c *fiber.Ctx, addr string, clients ...*fasthttp.Client) error
// DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects.
func DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error
// DoDeadline performs the given request and waits for response until the given deadline.
func DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error
// DoTimeout performs the given request and waits for response during the given timeout duration.
func DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error
// DomainForward the given http request based on the given domain and fills the given http response
func DomainForward(hostname string, addr string, clients ...*fasthttp.Client) fiber.Handler
// BalancerForward performs the given http request based round robin balancer and fills the given http response
func BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/proxy"
)

After you initiate your Fiber app, you can use the following possibilities:

// if target https site uses a self-signed certificate, you should
// call WithTlsConfig before Do and Forward
proxy.WithTlsConfig(&tls.Config{
InsecureSkipVerify: true,
})
// if you need to use global self-custom client, you should use proxy.WithClient.
proxy.WithClient(&fasthttp.Client{
NoDefaultUserAgentHeader: true,
DisablePathNormalizing: true,
})

// Forward to url
app.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif"))

// If you want to forward with a specific domain. You have to use proxy.DomainForward.
app.Get("/payments", proxy.DomainForward("docs.gofiber.io", "http://localhost:8000"))

// Forward to url with local custom client
app.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif", &fasthttp.Client{
NoDefaultUserAgentHeader: true,
DisablePathNormalizing: true,
}))

// Make request within handler
app.Get("/:id", func(c *fiber.Ctx) error {
url := "https://i.imgur.com/"+c.Params("id")+".gif"
if err := proxy.Do(c, url); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests while following redirects
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoRedirects(c, "http://google.com", 3); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests and wait up to 5 seconds before timing out
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoTimeout(c, "http://localhost:3000", time.Second * 5); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests, timeout a minute from now
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoDeadline(c, "http://localhost", time.Now().Add(time.Minute)); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Minimal round robin balancer
app.Use(proxy.Balancer(proxy.Config{
Servers: []string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
},
}))

// Or extend your balancer for customization
app.Use(proxy.Balancer(proxy.Config{
Servers: []string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
},
ModifyRequest: func(c *fiber.Ctx) error {
c.Request().Header.Add("X-Real-IP", c.IP())
return nil
},
ModifyResponse: func(c *fiber.Ctx) error {
c.Response().Header.Del(fiber.HeaderServer)
return nil
},
}))

// Or this way if the balancer is using https and the destination server is only using http.
app.Use(proxy.BalancerForward([]string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Servers defines a list of <scheme>://<host> HTTP servers,
//
// which are used in a round-robin manner.
// i.e.: "https://foobar.com, http://www.foobar.com"
//
// Required
Servers []string

// ModifyRequest allows you to alter the request
//
// Optional. Default: nil
ModifyRequest fiber.Handler

// ModifyResponse allows you to alter the response
//
// Optional. Default: nil
ModifyResponse fiber.Handler

// Timeout is the request timeout used when calling the proxy client
//
// Optional. Default: 1 second
Timeout time.Duration

// Per-connection buffer size for requests' reading.
// This also limits the maximum header size.
// Increase this buffer if your clients send multi-KB RequestURIs
// and/or multi-KB headers (for example, BIG cookies).
ReadBufferSize int

// Per-connection buffer size for responses' writing.
WriteBufferSize int

// tls config for the http client.
TlsConfig *tls.Config

// Client is custom client when client config is complex.
// Note that Servers, Timeout, WriteBufferSize, ReadBufferSize and TlsConfig
// will not be used if the client are set.
Client *fasthttp.LBClient
}

Default Config

var ConfigDefault = Config{
Next: nil,
ModifyRequest: nil,
ModifyResponse: nil,
Timeout: fasthttp.DefaultLBClientTimeout,
}
+ + \ No newline at end of file diff --git a/api/middleware/recover/index.html b/api/middleware/recover/index.html index 175201da86e..6a5808ce842 100644 --- a/api/middleware/recover/index.html +++ b/api/middleware/recover/index.html @@ -6,13 +6,13 @@ Recover | Fiber - - + +
-
Skip to main content
Version: v2.x

Recover

Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/recover"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(recover.New())

// This panic will be caught by the middleware
app.Get("/", func(c *fiber.Ctx) error {
panic("I'm an error")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// EnableStackTrace enables handling stack trace
//
// Optional. Default: false
EnableStackTrace bool

// StackTraceHandler defines a function to handle stack trace
//
// Optional. Default: defaultStackTraceHandler
StackTraceHandler func(c *fiber.Ctx, e interface{})
}

Default Config

var ConfigDefault = Config{
Next: nil,
EnableStackTrace: false,
StackTraceHandler: defaultStackTraceHandler,
}
- - +
Skip to main content
Version: v2.x

Recover

Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/recover"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(recover.New())

// This panic will be caught by the middleware
app.Get("/", func(c *fiber.Ctx) error {
panic("I'm an error")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// EnableStackTrace enables handling stack trace
//
// Optional. Default: false
EnableStackTrace bool

// StackTraceHandler defines a function to handle stack trace
//
// Optional. Default: defaultStackTraceHandler
StackTraceHandler func(c *fiber.Ctx, e interface{})
}

Default Config

var ConfigDefault = Config{
Next: nil,
EnableStackTrace: false,
StackTraceHandler: defaultStackTraceHandler,
}
+ + \ No newline at end of file diff --git a/api/middleware/redirect/index.html b/api/middleware/redirect/index.html index c1da10b8d77..45426743f14 100644 --- a/api/middleware/redirect/index.html +++ b/api/middleware/redirect/index.html @@ -6,13 +6,13 @@ Redirect | Fiber - - + +
-
Skip to main content
Version: v2.x

Redirect

Redirection middleware for Fiber.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/redirect"
)

func main() {
app := fiber.New()

app.Use(redirect.New(redirect.Config{
Rules: map[string]string{
"/old": "/new",
"/old/*": "/new/$1",
},
StatusCode: 301,
}))

app.Get("/new", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
app.Get("/new/*", func(c *fiber.Ctx) error {
return c.SendString("Wildcard: " + c.Params("*"))
})

app.Listen(":3000")
}

Test:

curl http://localhost:3000/old
curl http://localhost:3000/old/hello

Config

// Config defines the config for middleware.
type Config struct {
// Filter defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// Rules defines the URL path rewrite rules. The values captured in asterisk can be
// retrieved by index e.g. $1, $2 and so on.
// Required. Example:
// "/old": "/new",
// "/api/*": "/$1",
// "/js/*": "/public/javascripts/$1",
// "/users/*/orders/*": "/user/$1/order/$2",
Rules map[string]string

// The status code when redirecting
// This is ignored if Redirect is disabled
// Optional. Default: 302 (fiber.StatusFound)
StatusCode int

rulesRegex map[*regexp.Regexp]string
}

Default Config

var ConfigDefault = Config{
StatusCode: fiber.StatusFound,
}
- - +
Skip to main content
Version: v2.x

Redirect

Redirection middleware for Fiber.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/redirect"
)

func main() {
app := fiber.New()

app.Use(redirect.New(redirect.Config{
Rules: map[string]string{
"/old": "/new",
"/old/*": "/new/$1",
},
StatusCode: 301,
}))

app.Get("/new", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
app.Get("/new/*", func(c *fiber.Ctx) error {
return c.SendString("Wildcard: " + c.Params("*"))
})

app.Listen(":3000")
}

Test:

curl http://localhost:3000/old
curl http://localhost:3000/old/hello

Config

// Config defines the config for middleware.
type Config struct {
// Filter defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// Rules defines the URL path rewrite rules. The values captured in asterisk can be
// retrieved by index e.g. $1, $2 and so on.
// Required. Example:
// "/old": "/new",
// "/api/*": "/$1",
// "/js/*": "/public/javascripts/$1",
// "/users/*/orders/*": "/user/$1/order/$2",
Rules map[string]string

// The status code when redirecting
// This is ignored if Redirect is disabled
// Optional. Default: 302 (fiber.StatusFound)
StatusCode int

rulesRegex map[*regexp.Regexp]string
}

Default Config

var ConfigDefault = Config{
StatusCode: fiber.StatusFound,
}
+ + \ No newline at end of file diff --git a/api/middleware/requestid/index.html b/api/middleware/requestid/index.html index a60aa3ffcfc..cf84a5bd291 100644 --- a/api/middleware/requestid/index.html +++ b/api/middleware/requestid/index.html @@ -6,15 +6,15 @@ RequestID | Fiber - - + +
Skip to main content
Version: v2.x

RequestID

RequestID middleware for Fiber that adds an indentifier to the response.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/requestid"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(requestid.New())

// Or extend your config for customization
app.Use(requestid.New(requestid.Config{
Header: "X-Custom-Header",
Generator: func() string {
return "static-id"
},
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Header is the header key where to get/set the unique request ID
//
// Optional. Default: "X-Request-ID"
Header string

// Generator defines a function to generate the unique identifier.
//
// Optional. Default: utils.UUID
Generator func() string

// ContextKey defines the key used when storing the request ID in
// the locals for a specific request.
//
// Optional. Default: requestid
ContextKey interface{}
}

Default Config

The default config uses a fast UUID generator which will expose the number of requests made to the server. To conceal this value for better privacy, use the -utils.UUIDv4 generator.

var ConfigDefault = Config{
Next: nil,
Header: fiber.HeaderXRequestID,
Generator: utils.UUID,
ContextKey: "requestid",
}
- - +utils.UUIDv4 generator.

var ConfigDefault = Config{
Next: nil,
Header: fiber.HeaderXRequestID,
Generator: utils.UUID,
ContextKey: "requestid",
}
+ + \ No newline at end of file diff --git a/api/middleware/rewrite/index.html b/api/middleware/rewrite/index.html index 2684b7b9ff1..6d4dcde49b9 100644 --- a/api/middleware/rewrite/index.html +++ b/api/middleware/rewrite/index.html @@ -6,13 +6,13 @@ Rewrite | Fiber - - + +
-
Skip to main content
Version: v2.x

Rewrite

Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/rewrite"
)

func main() {
app := fiber.New()

app.Use(rewrite.New(rewrite.Config{
Rules: map[string]string{
"/old": "/new",
"/old/*": "/new/$1",
},
}))

app.Get("/new", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
app.Get("/new/*", func(c *fiber.Ctx) error {
return c.SendString("Wildcard: " + c.Params("*"))
})

app.Listen(":3000")
}

Test:

curl http://localhost:3000/old
curl http://localhost:3000/old/hello
- - +
Skip to main content
Version: v2.x

Rewrite

Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/rewrite"
)

func main() {
app := fiber.New()

app.Use(rewrite.New(rewrite.Config{
Rules: map[string]string{
"/old": "/new",
"/old/*": "/new/$1",
},
}))

app.Get("/new", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
app.Get("/new/*", func(c *fiber.Ctx) error {
return c.SendString("Wildcard: " + c.Params("*"))
})

app.Listen(":3000")
}

Test:

curl http://localhost:3000/old
curl http://localhost:3000/old/hello
+ + \ No newline at end of file diff --git a/api/middleware/session/index.html b/api/middleware/session/index.html index ec5cafa7c76..7df45877f3b 100644 --- a/api/middleware/session/index.html +++ b/api/middleware/session/index.html @@ -6,13 +6,13 @@ Session | Fiber - - + +
-
Skip to main content
Version: v2.x

Session

Session middleware for Fiber.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

Signatures

func New(config ...Config) *Store
func (s *Store) RegisterType(i interface{})
func (s *Store) Get(c *fiber.Ctx) (*Session, error)
func (s *Store) Reset() error

func (s *Session) Get(key string) interface{}
func (s *Session) Set(key string, val interface{})
func (s *Session) Delete(key string)
func (s *Session) Destroy() error
func (s *Session) Regenerate() error
func (s *Session) Save() error
func (s *Session) Fresh() bool
func (s *Session) ID() string
func (s *Session) Keys() []string
caution

Storing interface{} values are limited to built-ins Go types.

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/session"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
// This stores all of your app's sessions
store := session.New()

app.Get("/", func(c *fiber.Ctx) error {
// Get session from storage
sess, err := store.Get(c)
if err != nil {
panic(err)
}

// Get value
name := sess.Get("name")

// Set key/value
sess.Set("name", "john")

// Get all Keys
keys := sess.Keys()

// Delete key
sess.Delete("name")

// Destroy session
if err := sess.Destroy(); err != nil {
panic(err)
}

// Sets a specific expiration for this session
sess.SetExpiry(time.Second * 2)

// Save session
if err := sess.Save(); err != nil {
panic(err)
}

return c.SendString(fmt.Sprintf("Welcome %v", name))
})

Config

// Config defines the config for middleware.
type Config struct {
// Allowed session duration
// Optional. Default value 24 * time.Hour
Expiration time.Duration

// Storage interface to store the session data
// Optional. Default value memory.New()
Storage fiber.Storage

// KeyLookup is a string in the form of "<source>:<name>" that is used
// to extract session id from the request.
// Possible values: "header:<name>", "query:<name>" or "cookie:<name>"
// Optional. Default value "cookie:session_id".
KeyLookup string

// Domain of the CSRF cookie.
// Optional. Default value "".
CookieDomain string

// Path of the CSRF cookie.
// Optional. Default value "".
CookiePath string

// Indicates if CSRF cookie is secure.
// Optional. Default value false.
CookieSecure bool

// Indicates if CSRF cookie is HTTP only.
// Optional. Default value false.
CookieHTTPOnly bool

// Value of SameSite cookie.
// Optional. Default value "Lax".
CookieSameSite string

// Decides whether cookie should last for only the browser sesison.
// Ignores Expiration if set to true
// Optional. Default value false.
CookieSessionOnly bool

// KeyGenerator generates the session key.
// Optional. Default value utils.UUIDv4
KeyGenerator func() string

// Deprecated: Please use KeyLookup
CookieName string

// Source defines where to obtain the session id
source Source

// The session name
sessionName string
}

Default Config

var ConfigDefault = Config{
Expiration: 24 * time.Hour,
KeyLookup: "cookie:session_id",
KeyGenerator: utils.UUIDv4,
source: "cookie",
sessionName: "session_id",
}

Constants

const (
SourceCookie Source = "cookie"
SourceHeader Source = "header"
SourceURLQuery Source = "query"
)

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
store := session.New(session.Config{
Storage: storage,
})

To use the store, see the Examples.

- - +
Skip to main content
Version: v2.x

Session

Session middleware for Fiber.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

Signatures

func New(config ...Config) *Store
func (s *Store) RegisterType(i interface{})
func (s *Store) Get(c *fiber.Ctx) (*Session, error)
func (s *Store) Reset() error

func (s *Session) Get(key string) interface{}
func (s *Session) Set(key string, val interface{})
func (s *Session) Delete(key string)
func (s *Session) Destroy() error
func (s *Session) Regenerate() error
func (s *Session) Save() error
func (s *Session) Fresh() bool
func (s *Session) ID() string
func (s *Session) Keys() []string
caution

Storing interface{} values are limited to built-ins Go types.

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/session"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
// This stores all of your app's sessions
store := session.New()

app.Get("/", func(c *fiber.Ctx) error {
// Get session from storage
sess, err := store.Get(c)
if err != nil {
panic(err)
}

// Get value
name := sess.Get("name")

// Set key/value
sess.Set("name", "john")

// Get all Keys
keys := sess.Keys()

// Delete key
sess.Delete("name")

// Destroy session
if err := sess.Destroy(); err != nil {
panic(err)
}

// Sets a specific expiration for this session
sess.SetExpiry(time.Second * 2)

// Save session
if err := sess.Save(); err != nil {
panic(err)
}

return c.SendString(fmt.Sprintf("Welcome %v", name))
})

Config

// Config defines the config for middleware.
type Config struct {
// Allowed session duration
// Optional. Default value 24 * time.Hour
Expiration time.Duration

// Storage interface to store the session data
// Optional. Default value memory.New()
Storage fiber.Storage

// KeyLookup is a string in the form of "<source>:<name>" that is used
// to extract session id from the request.
// Possible values: "header:<name>", "query:<name>" or "cookie:<name>"
// Optional. Default value "cookie:session_id".
KeyLookup string

// Domain of the CSRF cookie.
// Optional. Default value "".
CookieDomain string

// Path of the CSRF cookie.
// Optional. Default value "".
CookiePath string

// Indicates if CSRF cookie is secure.
// Optional. Default value false.
CookieSecure bool

// Indicates if CSRF cookie is HTTP only.
// Optional. Default value false.
CookieHTTPOnly bool

// Value of SameSite cookie.
// Optional. Default value "Lax".
CookieSameSite string

// Decides whether cookie should last for only the browser sesison.
// Ignores Expiration if set to true
// Optional. Default value false.
CookieSessionOnly bool

// KeyGenerator generates the session key.
// Optional. Default value utils.UUIDv4
KeyGenerator func() string

// Deprecated: Please use KeyLookup
CookieName string

// Source defines where to obtain the session id
source Source

// The session name
sessionName string
}

Default Config

var ConfigDefault = Config{
Expiration: 24 * time.Hour,
KeyLookup: "cookie:session_id",
KeyGenerator: utils.UUIDv4,
source: "cookie",
sessionName: "session_id",
}

Constants

const (
SourceCookie Source = "cookie"
SourceHeader Source = "header"
SourceURLQuery Source = "query"
)

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
store := session.New(session.Config{
Storage: storage,
})

To use the store, see the Examples.

+ + \ No newline at end of file diff --git a/api/middleware/skip/index.html b/api/middleware/skip/index.html index 067867c2335..dc8ad0860f2 100644 --- a/api/middleware/skip/index.html +++ b/api/middleware/skip/index.html @@ -6,13 +6,13 @@ Skip | Fiber - - + +
-
Skip to main content
Version: v2.x

Skip

Skip middleware for Fiber that skips a wrapped handler if a predicate is true.

Signatures

func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/skip"
)

After you initiate your Fiber app, you can use the following possibilities:

func main() {
app := fiber.New()

app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool {
return ctx.Method() == fiber.MethodGet
}))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendString("It was a GET request!")
})

log.Fatal(app.Listen(":3000"))
}

func BasicHandler(ctx *fiber.Ctx) error {
return ctx.SendString("It was not a GET request!")
}
tip

app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.

- - +
Skip to main content
Version: v2.x

Skip

Skip middleware for Fiber that skips a wrapped handler if a predicate is true.

Signatures

func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/skip"
)

After you initiate your Fiber app, you can use the following possibilities:

func main() {
app := fiber.New()

app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool {
return ctx.Method() == fiber.MethodGet
}))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendString("It was a GET request!")
})

log.Fatal(app.Listen(":3000"))
}

func BasicHandler(ctx *fiber.Ctx) error {
return ctx.SendString("It was not a GET request!")
}
tip

app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.

+ + \ No newline at end of file diff --git a/api/middleware/timeout/index.html b/api/middleware/timeout/index.html index 3b43dcac987..b8aca04684f 100644 --- a/api/middleware/timeout/index.html +++ b/api/middleware/timeout/index.html @@ -6,13 +6,13 @@ Timeout | Fiber - - + +
-
Skip to main content
Version: v2.x

Timeout

There exist two distinct implementations of timeout middleware Fiber.

New

Wraps a fiber.Handler with a timeout. If the handler takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler.

caution

This has been deprecated since it raises race conditions.

NewWithContext

As a fiber.Handler wrapper, it creates a context with context.WithTimeout and pass it in UserContext.

If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler.

It does not cancel long running executions. Underlying executions must handle timeout by using context.Context parameter.

Signatures

func New(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler
func NewWithContext(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/timeout"
)

After you initiate your Fiber app, you can use the following possibilities:

func main() {
app := fiber.New()

h := func(c *fiber.Ctx) error {
sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")
if err := sleepWithContext(c.UserContext(), sleepTime); err != nil {
return fmt.Errorf("%w: execution error", err)
}
return nil
}

app.Get("/foo/:sleepTime", timeout.New(h, 2*time.Second))
log.Fatal(app.Listen(":3000"))
}

func sleepWithContext(ctx context.Context, d time.Duration) error {
timer := time.NewTimer(d)

select {
case <-ctx.Done():
if !timer.Stop() {
<-timer.C
}
return context.DeadlineExceeded
case <-timer.C:
}
return nil
}

Test http 200 with curl:

curl --location -I --request GET 'http://localhost:3000/foo/1000' 

Test http 408 with curl:

curl --location -I --request GET 'http://localhost:3000/foo/3000' 

Use with custom error:

var ErrFooTimeOut = errors.New("foo context canceled")

func main() {
app := fiber.New()
h := func(c *fiber.Ctx) error {
sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")
if err := sleepWithContextWithCustomError(c.UserContext(), sleepTime); err != nil {
return fmt.Errorf("%w: execution error", err)
}
return nil
}

app.Get("/foo/:sleepTime", timeout.NewWithContext(h, 2*time.Second, ErrFooTimeOut))
log.Fatal(app.Listen(":3000"))
}

func sleepWithContextWithCustomError(ctx context.Context, d time.Duration) error {
timer := time.NewTimer(d)
select {
case <-ctx.Done():
if !timer.Stop() {
<-timer.C
}
return ErrFooTimeOut
case <-timer.C:
}
return nil
}

Sample usage with a DB call:

func main() {
app := fiber.New()
db, _ := gorm.Open(postgres.Open("postgres://localhost/foodb"), &gorm.Config{})

handler := func(ctx *fiber.Ctx) error {
tran := db.WithContext(ctx.UserContext()).Begin()

if tran = tran.Exec("SELECT pg_sleep(50)"); tran.Error != nil {
return tran.Error
}

if tran = tran.Commit(); tran.Error != nil {
return tran.Error
}

return nil
}

app.Get("/foo", timeout.NewWithContext(handler, 10*time.Second))
log.Fatal(app.Listen(":3000"))
}
- - +
Skip to main content
Version: v2.x

Timeout

There exist two distinct implementations of timeout middleware Fiber.

New

Wraps a fiber.Handler with a timeout. If the handler takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler.

caution

This has been deprecated since it raises race conditions.

NewWithContext

As a fiber.Handler wrapper, it creates a context with context.WithTimeout and pass it in UserContext.

If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler.

It does not cancel long running executions. Underlying executions must handle timeout by using context.Context parameter.

Signatures

func New(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler
func NewWithContext(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/timeout"
)

After you initiate your Fiber app, you can use the following possibilities:

func main() {
app := fiber.New()

h := func(c *fiber.Ctx) error {
sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")
if err := sleepWithContext(c.UserContext(), sleepTime); err != nil {
return fmt.Errorf("%w: execution error", err)
}
return nil
}

app.Get("/foo/:sleepTime", timeout.New(h, 2*time.Second))
log.Fatal(app.Listen(":3000"))
}

func sleepWithContext(ctx context.Context, d time.Duration) error {
timer := time.NewTimer(d)

select {
case <-ctx.Done():
if !timer.Stop() {
<-timer.C
}
return context.DeadlineExceeded
case <-timer.C:
}
return nil
}

Test http 200 with curl:

curl --location -I --request GET 'http://localhost:3000/foo/1000' 

Test http 408 with curl:

curl --location -I --request GET 'http://localhost:3000/foo/3000' 

Use with custom error:

var ErrFooTimeOut = errors.New("foo context canceled")

func main() {
app := fiber.New()
h := func(c *fiber.Ctx) error {
sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")
if err := sleepWithContextWithCustomError(c.UserContext(), sleepTime); err != nil {
return fmt.Errorf("%w: execution error", err)
}
return nil
}

app.Get("/foo/:sleepTime", timeout.NewWithContext(h, 2*time.Second, ErrFooTimeOut))
log.Fatal(app.Listen(":3000"))
}

func sleepWithContextWithCustomError(ctx context.Context, d time.Duration) error {
timer := time.NewTimer(d)
select {
case <-ctx.Done():
if !timer.Stop() {
<-timer.C
}
return ErrFooTimeOut
case <-timer.C:
}
return nil
}

Sample usage with a DB call:

func main() {
app := fiber.New()
db, _ := gorm.Open(postgres.Open("postgres://localhost/foodb"), &gorm.Config{})

handler := func(ctx *fiber.Ctx) error {
tran := db.WithContext(ctx.UserContext()).Begin()

if tran = tran.Exec("SELECT pg_sleep(50)"); tran.Error != nil {
return tran.Error
}

if tran = tran.Commit(); tran.Error != nil {
return tran.Error
}

return nil
}

app.Get("/foo", timeout.NewWithContext(handler, 10*time.Second))
log.Fatal(app.Listen(":3000"))
}
+ + \ No newline at end of file diff --git a/assets/js/044897a3.149dbfe7.js b/assets/js/044897a3.149dbfe7.js new file mode 100644 index 00000000000..2ec0fe90ff1 --- /dev/null +++ b/assets/js/044897a3.149dbfe7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7316],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>f});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=r.createContext({}),c=function(e){var n=r.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},s=function(e){var n=c(e.components);return r.createElement(u.Provider,{value:n},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},h=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,u=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),d=c(t),h=a,f=d["".concat(u,".").concat(h)]||d[h]||p[h]||i;return t?r.createElement(f,o(o({ref:n},s),{},{components:t})):r.createElement(f,o({ref:n},s))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=h;var l={};for(var u in n)hasOwnProperty.call(n,u)&&(l[u]=n[u]);l.originalType=e,l[d]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=t(87462),a=(t(67294),t(3905));const i={id:"keyauth",title:"Keyauth"},o=void 0,l={unversionedId:"api/middleware/keyauth",id:"api/middleware/keyauth",title:"Keyauth",description:"Key auth middleware provides a key based authentication.",source:"@site/docs/core/api/middleware/keyauth.md",sourceDirName:"api/middleware",slug:"/api/middleware/keyauth",permalink:"/next/api/middleware/keyauth",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/keyauth.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"keyauth",title:"Keyauth"},sidebar:"tutorialSidebar",previous:{title:"Idempotency",permalink:"/next/api/middleware/idempotency"},next:{title:"Limiter",permalink:"/next/api/middleware/limiter"}},u={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Authenticate only certain endpoints",id:"authenticate-only-certain-endpoints",level:3},{value:"Specifying middleware in the handler",id:"specifying-middleware-in-the-handler",level:3},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],s={toc:c},d="wrapper";function p(e){let{components:n,...t}=e;return(0,a.kt)(d,(0,r.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Key auth middleware provides a key based authentication."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n)\n\nvar (\n apiKey = "correct horse battery staple"\n)\n\nfunc validateAPIKey(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n}\n\nfunc main() {\n app := fiber.New()\n\n // note that the keyauth middleware needs to be defined before the routes are defined!\n app.Use(keyauth.New(keyauth.Config{\n KeyLookup: "cookie:access_token",\n Validator: validateAPIKey,\n }))\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Test:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# No api-key specified -> 400 missing \ncurl http://localhost:3000\n#> missing or malformed API Key\n\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000\n#> Successfully authenticated!\n\ncurl --cookie "access_token=Clearly A Wrong Key" http://localhost:3000\n#> missing or malformed API Key\n')),(0,a.kt)("p",null,"For a more detailed example, see also the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/recipes"},(0,a.kt)("inlineCode",{parentName:"a"},"github.com/gofiber/recipes"))," repository and specifically the ",(0,a.kt)("inlineCode",{parentName:"p"},"fiber-envoy-extauthz")," repository and the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/recipes/blob/master/fiber-envoy-extauthz/authz/main.go"},(0,a.kt)("inlineCode",{parentName:"a"},"keyauth example"))," code."),(0,a.kt)("h3",{id:"authenticate-only-certain-endpoints"},"Authenticate only certain endpoints"),(0,a.kt)("p",null,"If you want to authenticate only certain endpoints, you can use the ",(0,a.kt)("inlineCode",{parentName:"p"},"Config")," of keyauth and apply a filter function (eg. ",(0,a.kt)("inlineCode",{parentName:"p"},"authFilter"),") like so"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n "regexp"\n "strings"\n)\n\nvar (\n apiKey = "correct horse battery staple"\n protectedURLs = []*regexp.Regexp{\n regexp.MustCompile("^/authenticated$"),\n regexp.MustCompile("^/auth2$"),\n }\n)\n\nfunc validateAPIKey(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n}\n\nfunc authFilter(c *fiber.Ctx) bool {\n originalURL := strings.ToLower(c.OriginalURL())\n\n for _, pattern := range protectedURLs {\n if pattern.MatchString(originalURL) {\n return false\n }\n }\n return true\n}\n\nfunc main() {\n app := fiber.New()\n\n app.Use(keyauth.New(keyauth.Config{\n Next: authFilter,\n KeyLookup: "cookie:access_token",\n Validator: validateAPIKey,\n }))\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome")\n })\n app.Get("/authenticated", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n app.Get("/auth2", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated 2!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,"Which results in this"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# / does not need to be authenticated\ncurl http://localhost:3000\n#> Welcome\n\n# /authenticated needs to be authenticated\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000/authenticated\n#> Successfully authenticated!\n\n# /auth2 needs to be authenticated too\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000/auth2\n#> Successfully authenticated 2!\n')),(0,a.kt)("h3",{id:"specifying-middleware-in-the-handler"},"Specifying middleware in the handler"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n)\n\nconst (\n apiKey = "my-super-secret-key"\n)\n\nfunc main() {\n app := fiber.New()\n\n authMiddleware := keyauth.New(keyauth.Config{\n Validator: func(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n },\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome")\n })\n\n app.Get("/allowed", authMiddleware, func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,"Which results in this"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# / does not need to be authenticated\ncurl http://localhost:3000\n#> Welcome\n\n# /allowed needs to be authenticated too\ncurl --header "Authorization: Bearer my-super-secret-key" http://localhost:3000/allowed\n#> Successfully authenticated!\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip middleware.\n // Optional. Default: nil\n Next func(*fiber.Ctx) bool\n\n // SuccessHandler defines a function which is executed for a valid key.\n // Optional. Default: nil\n SuccessHandler fiber.Handler\n\n // ErrorHandler defines a function which is executed for an invalid key.\n // It may be used to define a custom error.\n // Optional. Default: 401 Invalid or expired key\n ErrorHandler fiber.ErrorHandler\n\n // KeyLookup is a string in the form of ":" that is used\n // to extract key from the request.\n // Optional. Default value "header:Authorization".\n // Possible values:\n // - "header:"\n // - "query:"\n // - "form:"\n // - "param:"\n // - "cookie:"\n KeyLookup string\n\n // AuthScheme to be used in the Authorization header.\n // Optional. Default value "Bearer".\n AuthScheme string\n\n // Validator is a function to validate key.\n Validator func(*fiber.Ctx, string) (bool, error)\n\n // Context key to store the bearertoken from the token into context.\n // Optional. Default: "token".\n ContextKey string\n}\n')),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n SuccessHandler: func(c *fiber.Ctx) error {\n return c.Next()\n },\n ErrorHandler: func(c *fiber.Ctx, err error) error {\n if err == ErrMissingOrMalformedAPIKey {\n return c.Status(fiber.StatusUnauthorized).SendString(err.Error())\n }\n return c.Status(fiber.StatusUnauthorized).SendString("Invalid or expired API Key")\n },\n KeyLookup: "header:" + fiber.HeaderAuthorization,\n AuthScheme: "Bearer",\n ContextKey: "token",\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/044897a3.d41a5bae.js b/assets/js/044897a3.d41a5bae.js deleted file mode 100644 index a4129fb268e..00000000000 --- a/assets/js/044897a3.d41a5bae.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7316],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>f});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=r.createContext({}),c=function(e){var n=r.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},s=function(e){var n=c(e.components);return r.createElement(u.Provider,{value:n},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},h=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,u=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),d=c(t),h=a,f=d["".concat(u,".").concat(h)]||d[h]||p[h]||i;return t?r.createElement(f,o(o({ref:n},s),{},{components:t})):r.createElement(f,o({ref:n},s))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=h;var l={};for(var u in n)hasOwnProperty.call(n,u)&&(l[u]=n[u]);l.originalType=e,l[d]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=t(7462),a=(t(7294),t(3905));const i={id:"keyauth",title:"Keyauth"},o=void 0,l={unversionedId:"api/middleware/keyauth",id:"api/middleware/keyauth",title:"Keyauth",description:"Key auth middleware provides a key based authentication.",source:"@site/docs/core/api/middleware/keyauth.md",sourceDirName:"api/middleware",slug:"/api/middleware/keyauth",permalink:"/next/api/middleware/keyauth",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/keyauth.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"keyauth",title:"Keyauth"},sidebar:"tutorialSidebar",previous:{title:"Idempotency",permalink:"/next/api/middleware/idempotency"},next:{title:"Limiter",permalink:"/next/api/middleware/limiter"}},u={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Authenticate only certain endpoints",id:"authenticate-only-certain-endpoints",level:3},{value:"Specifying middleware in the handler",id:"specifying-middleware-in-the-handler",level:3},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],s={toc:c},d="wrapper";function p(e){let{components:n,...t}=e;return(0,a.kt)(d,(0,r.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Key auth middleware provides a key based authentication."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n)\n\nvar (\n apiKey = "correct horse battery staple"\n)\n\nfunc validateAPIKey(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n}\n\nfunc main() {\n app := fiber.New()\n\n // note that the keyauth middleware needs to be defined before the routes are defined!\n app.Use(keyauth.New(keyauth.Config{\n KeyLookup: "cookie:access_token",\n Validator: validateAPIKey,\n }))\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Test:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# No api-key specified -> 400 missing \ncurl http://localhost:3000\n#> missing or malformed API Key\n\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000\n#> Successfully authenticated!\n\ncurl --cookie "access_token=Clearly A Wrong Key" http://localhost:3000\n#> missing or malformed API Key\n')),(0,a.kt)("p",null,"For a more detailed example, see also the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/recipes"},(0,a.kt)("inlineCode",{parentName:"a"},"github.com/gofiber/recipes"))," repository and specifically the ",(0,a.kt)("inlineCode",{parentName:"p"},"fiber-envoy-extauthz")," repository and the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/recipes/blob/master/fiber-envoy-extauthz/authz/main.go"},(0,a.kt)("inlineCode",{parentName:"a"},"keyauth example"))," code."),(0,a.kt)("h3",{id:"authenticate-only-certain-endpoints"},"Authenticate only certain endpoints"),(0,a.kt)("p",null,"If you want to authenticate only certain endpoints, you can use the ",(0,a.kt)("inlineCode",{parentName:"p"},"Config")," of keyauth and apply a filter function (eg. ",(0,a.kt)("inlineCode",{parentName:"p"},"authFilter"),") like so"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n "regexp"\n "strings"\n)\n\nvar (\n apiKey = "correct horse battery staple"\n protectedURLs = []*regexp.Regexp{\n regexp.MustCompile("^/authenticated$"),\n regexp.MustCompile("^/auth2$"),\n }\n)\n\nfunc validateAPIKey(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n}\n\nfunc authFilter(c *fiber.Ctx) bool {\n originalURL := strings.ToLower(c.OriginalURL())\n\n for _, pattern := range protectedURLs {\n if pattern.MatchString(originalURL) {\n return false\n }\n }\n return true\n}\n\nfunc main() {\n app := fiber.New()\n\n app.Use(keyauth.New(keyauth.Config{\n Next: authFilter,\n KeyLookup: "cookie:access_token",\n Validator: validateAPIKey,\n }))\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome")\n })\n app.Get("/authenticated", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n app.Get("/auth2", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated 2!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,"Which results in this"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# / does not need to be authenticated\ncurl http://localhost:3000\n#> Welcome\n\n# /authenticated needs to be authenticated\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000/authenticated\n#> Successfully authenticated!\n\n# /auth2 needs to be authenticated too\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000/auth2\n#> Successfully authenticated 2!\n')),(0,a.kt)("h3",{id:"specifying-middleware-in-the-handler"},"Specifying middleware in the handler"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n)\n\nconst (\n apiKey = "my-super-secret-key"\n)\n\nfunc main() {\n app := fiber.New()\n\n authMiddleware := keyauth.New(keyauth.Config{\n Validator: func(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n },\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome")\n })\n\n app.Get("/allowed", authMiddleware, func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,"Which results in this"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# / does not need to be authenticated\ncurl http://localhost:3000\n#> Welcome\n\n# /allowed needs to be authenticated too\ncurl --header "Authorization: Bearer my-super-secret-key" http://localhost:3000/allowed\n#> Successfully authenticated!\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip middleware.\n // Optional. Default: nil\n Next func(*fiber.Ctx) bool\n\n // SuccessHandler defines a function which is executed for a valid key.\n // Optional. Default: nil\n SuccessHandler fiber.Handler\n\n // ErrorHandler defines a function which is executed for an invalid key.\n // It may be used to define a custom error.\n // Optional. Default: 401 Invalid or expired key\n ErrorHandler fiber.ErrorHandler\n\n // KeyLookup is a string in the form of ":" that is used\n // to extract key from the request.\n // Optional. Default value "header:Authorization".\n // Possible values:\n // - "header:"\n // - "query:"\n // - "form:"\n // - "param:"\n // - "cookie:"\n KeyLookup string\n\n // AuthScheme to be used in the Authorization header.\n // Optional. Default value "Bearer".\n AuthScheme string\n\n // Validator is a function to validate key.\n Validator func(*fiber.Ctx, string) (bool, error)\n\n // Context key to store the bearertoken from the token into context.\n // Optional. Default: "token".\n ContextKey string\n}\n')),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n SuccessHandler: func(c *fiber.Ctx) error {\n return c.Next()\n },\n ErrorHandler: func(c *fiber.Ctx, err error) error {\n if err == ErrMissingOrMalformedAPIKey {\n return c.Status(fiber.StatusUnauthorized).SendString(err.Error())\n }\n return c.Status(fiber.StatusUnauthorized).SendString("Invalid or expired API Key")\n },\n KeyLookup: "header:" + fiber.HeaderAuthorization,\n AuthScheme: "Bearer",\n ContextKey: "token",\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0451c1a5.750dd9d1.js b/assets/js/0451c1a5.750dd9d1.js deleted file mode 100644 index 36fc15a5352..00000000000 --- a/assets/js/0451c1a5.750dd9d1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8210],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>h});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),c=p(n),d=a,h=c["".concat(s,".").concat(d)]||c[d]||u[d]||i;return n?r.createElement(h,l(l({ref:t},m),{},{components:n})):r.createElement(h,l({ref:t},m))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:a,l[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const i={id:"mustache",title:"Mustache"},l=void 0,o={unversionedId:"mustache/mustache",id:"version-slim_v2.x.x/mustache/mustache",title:"Mustache",description:"Release",source:"@site/template_versioned_docs/version-slim_v2.x.x/mustache/README.md",sourceDirName:"mustache",slug:"/mustache/",permalink:"/template/mustache/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/mustache/README.md",tags:[],version:"slim_v2.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mustache",title:"Mustache"},sidebar:"tutorialSidebar",previous:{title:"Jet",permalink:"/template/jet/"},next:{title:"Pug",permalink:"/template/pug/"}},s={},p=[{value:"Basic Example",id:"basic-example",level:3}],m={toc:p},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Mustache is a template engine created by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cbroglie/mustache"},"hoisie/cbroglie"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://mustache.github.io/mustache.5.html"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"{{> views/partials/header }}\n\n

{{Title}}

\n\n{{> views/partials/footer }}\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Header

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Footer

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"\n\n\n\n Main\n\n\n\n {{{embed}}}\n\n\n\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n \n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/mustache/v2"\n)\n\nfunc main() {\n // Create a new engine\n engine := mustache.New("./views", ".mustache")\n\n // Or from an embedded system\n // Note that with an embedded system the partials included from template files must be\n // specified relative to the filesystem\'s root, not the current working directory\n // engine := mustache.NewFileSystem(http.Dir("./views", ".mustache"), ".mustache")\n\n // Pass the engine to the Views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0451c1a5.9c9e7dd0.js b/assets/js/0451c1a5.9c9e7dd0.js new file mode 100644 index 00000000000..f5884728746 --- /dev/null +++ b/assets/js/0451c1a5.9c9e7dd0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8210],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),c=p(n),d=a,h=c["".concat(s,".").concat(d)]||c[d]||u[d]||i;return n?r.createElement(h,l(l({ref:t},m),{},{components:n})):r.createElement(h,l({ref:t},m))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:a,l[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const i={id:"mustache",title:"Mustache"},l=void 0,o={unversionedId:"mustache/mustache",id:"version-slim_v2.x.x/mustache/mustache",title:"Mustache",description:"Release",source:"@site/template_versioned_docs/version-slim_v2.x.x/mustache/README.md",sourceDirName:"mustache",slug:"/mustache/",permalink:"/template/mustache/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/mustache/README.md",tags:[],version:"slim_v2.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mustache",title:"Mustache"},sidebar:"tutorialSidebar",previous:{title:"Jet",permalink:"/template/jet/"},next:{title:"Pug",permalink:"/template/pug/"}},s={},p=[{value:"Basic Example",id:"basic-example",level:3}],m={toc:p},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Mustache is a template engine created by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cbroglie/mustache"},"hoisie/cbroglie"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://mustache.github.io/mustache.5.html"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"{{> views/partials/header }}\n\n

{{Title}}

\n\n{{> views/partials/footer }}\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Header

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Footer

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"\n\n\n\n Main\n\n\n\n {{{embed}}}\n\n\n\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n \n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/mustache/v2"\n)\n\nfunc main() {\n // Create a new engine\n engine := mustache.New("./views", ".mustache")\n\n // Or from an embedded system\n // Note that with an embedded system the partials included from template files must be\n // specified relative to the filesystem\'s root, not the current working directory\n // engine := mustache.NewFileSystem(http.Dir("./views", ".mustache"), ".mustache")\n\n // Pass the engine to the Views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/04b03e77.61376a74.js b/assets/js/04b03e77.61376a74.js new file mode 100644 index 00000000000..98851fbefef --- /dev/null +++ b/assets/js/04b03e77.61376a74.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5163],{3905:(e,r,t)=>{t.d(r,{Zo:()=>d,kt:()=>m});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=n.createContext({}),p=function(e){var r=n.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):o(o({},r),e)),t},d=function(e){var r=p(e.components);return n.createElement(c.Provider,{value:r},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},s=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),f=p(t),s=a,m=f["".concat(c,".").concat(s)]||f[s]||u[s]||i;return t?n.createElement(m,o(o({ref:r},d),{},{components:t})):n.createElement(m,o({ref:r},d))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=s;var l={};for(var c in r)hasOwnProperty.call(r,c)&&(l[c]=r[c]);l.originalType=e,l[f]="string"==typeof e?e:a,o[1]=l;for(var p=2;p{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var n=t(87462),a=(t(67294),t(3905));const i={id:"recover",title:"Recover"},o=void 0,l={unversionedId:"api/middleware/recover",id:"api/middleware/recover",title:"Recover",description:"Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.",source:"@site/docs/core/api/middleware/recover.md",sourceDirName:"api/middleware",slug:"/api/middleware/recover",permalink:"/next/api/middleware/recover",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/recover.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"recover",title:"Recover"},sidebar:"tutorialSidebar",previous:{title:"Proxy",permalink:"/next/api/middleware/proxy"},next:{title:"Redirect",permalink:"/next/api/middleware/redirect"}},c={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],d={toc:p},f="wrapper";function u(e){let{components:r,...t}=e;return(0,a.kt)(f,(0,n.Z)({},d,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Recover middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that recovers from panics anywhere in the stack chain and handles the control to the centralized ",(0,a.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/error-handling"},"ErrorHandler"),"."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/recover"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(recover.New())\n\n// This panic will be caught by the middleware\napp.Get("/", func(c *fiber.Ctx) error {\n panic("I\'m an error")\n})\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // EnableStackTrace enables handling stack trace\n //\n // Optional. Default: false\n EnableStackTrace bool\n\n // StackTraceHandler defines a function to handle stack trace\n //\n // Optional. Default: defaultStackTraceHandler\n StackTraceHandler func(c *fiber.Ctx, e interface{})\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n EnableStackTrace: false,\n StackTraceHandler: defaultStackTraceHandler,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/04b03e77.94bd55df.js b/assets/js/04b03e77.94bd55df.js deleted file mode 100644 index 63494bd12e9..00000000000 --- a/assets/js/04b03e77.94bd55df.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5163],{3905:(e,r,t)=>{t.d(r,{Zo:()=>d,kt:()=>m});var n=t(7294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=n.createContext({}),p=function(e){var r=n.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):o(o({},r),e)),t},d=function(e){var r=p(e.components);return n.createElement(c.Provider,{value:r},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},s=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),f=p(t),s=a,m=f["".concat(c,".").concat(s)]||f[s]||u[s]||i;return t?n.createElement(m,o(o({ref:r},d),{},{components:t})):n.createElement(m,o({ref:r},d))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=s;var l={};for(var c in r)hasOwnProperty.call(r,c)&&(l[c]=r[c]);l.originalType=e,l[f]="string"==typeof e?e:a,o[1]=l;for(var p=2;p{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var n=t(7462),a=(t(7294),t(3905));const i={id:"recover",title:"Recover"},o=void 0,l={unversionedId:"api/middleware/recover",id:"api/middleware/recover",title:"Recover",description:"Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.",source:"@site/docs/core/api/middleware/recover.md",sourceDirName:"api/middleware",slug:"/api/middleware/recover",permalink:"/next/api/middleware/recover",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/recover.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"recover",title:"Recover"},sidebar:"tutorialSidebar",previous:{title:"Proxy",permalink:"/next/api/middleware/proxy"},next:{title:"Redirect",permalink:"/next/api/middleware/redirect"}},c={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],d={toc:p},f="wrapper";function u(e){let{components:r,...t}=e;return(0,a.kt)(f,(0,n.Z)({},d,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Recover middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that recovers from panics anywhere in the stack chain and handles the control to the centralized ",(0,a.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/error-handling"},"ErrorHandler"),"."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/recover"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(recover.New())\n\n// This panic will be caught by the middleware\napp.Get("/", func(c *fiber.Ctx) error {\n panic("I\'m an error")\n})\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // EnableStackTrace enables handling stack trace\n //\n // Optional. Default: false\n EnableStackTrace bool\n\n // StackTraceHandler defines a function to handle stack trace\n //\n // Optional. Default: defaultStackTraceHandler\n StackTraceHandler func(c *fiber.Ctx, e interface{})\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n EnableStackTrace: false,\n StackTraceHandler: defaultStackTraceHandler,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/04ddcfba.1f2423a8.js b/assets/js/04ddcfba.1f2423a8.js new file mode 100644 index 00000000000..dc19637c34b --- /dev/null +++ b/assets/js/04ddcfba.1f2423a8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3765],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(n),g=r,m=u["".concat(s,".").concat(g)]||u[g]||f[g]||i;return n?a.createElement(m,o(o({ref:t},c),{},{components:n})):a.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const i={id:"sqlite3",title:"SQLite3"},o=void 0,l={unversionedId:"sqlite3/sqlite3",id:"version-etcd_v1.x.x/sqlite3/sqlite3",title:"SQLite3",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/sqlite3/README.md",sourceDirName:"sqlite3",slug:"/sqlite3/",permalink:"/storage/etcd_v1.x.x/sqlite3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/sqlite3/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"sqlite3",title:"SQLite3"},sidebar:"tutorialSidebar",previous:{title:"S3",permalink:"/storage/etcd_v1.x.x/s3/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:p},u="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=sqlite3*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A SQLite3 storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/mattn/go-sqlite3"},"mattn/go-sqlite3"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"SQLite3 is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the sqlite3 implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/sqlite3\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/sqlite3"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := sqlite3.New()\n\n// Initialize custom config\nstore := sqlite3.New(sqlite3.Config{\n Database: "./fiber.sqlite3",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n MaxOpenConns: 100,\n MaxIdleConns: 100,\n ConnMaxLifetime: 1 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // //////////////////////////////////\n // Adaptor related config options //\n // //////////////////////////////////\n\n // MaxIdleConns sets the maximum number of connections in the idle connection pool.\n //\n // Optional. Default is 100.\n MaxIdleConns int\n\n // MaxOpenConns sets the maximum number of open connections to the database.\n //\n // Optional. Default is 100.\n MaxOpenConns int\n\n // ConnMaxLifetime sets the maximum amount of time a connection may be reused.\n //\n // Optional. Default is 1 second.\n ConnMaxLifetime time.Duration\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Database: "./fiber.sqlite3",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n MaxOpenConns: 100,\n MaxIdleConns: 100,\n ConnMaxLifetime: 1 * time.Second,\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/054c93da.1a771626.js b/assets/js/054c93da.1a771626.js deleted file mode 100644 index ec9fba31660..00000000000 --- a/assets/js/054c93da.1a771626.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5987],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>m});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),c=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=c(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=c(r),f=a,m=u["".concat(p,".").concat(f)]||u[f]||d[f]||i;return r?n.createElement(m,o(o({ref:t},s),{},{components:r})):n.createElement(m,o({ref:t},s))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var n=r(7462),a=(r(7294),r(3905));const i={id:"expvar",title:"ExpVar"},o=void 0,l={unversionedId:"api/middleware/expvar",id:"api/middleware/expvar",title:"ExpVar",description:"Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.",source:"@site/docs/core/api/middleware/expvar.md",sourceDirName:"api/middleware",slug:"/api/middleware/expvar",permalink:"/next/api/middleware/expvar",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/expvar.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"expvar",title:"ExpVar"},sidebar:"tutorialSidebar",previous:{title:"ETag",permalink:"/next/api/middleware/etag"},next:{title:"Favicon",permalink:"/next/api/middleware/favicon"}},p={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],s={toc:c},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Expvar middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is ",(0,a.kt)("inlineCode",{parentName:"p"},"/debug/vars"),"."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New() fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n expvarmw "github.com/gofiber/fiber/v2/middleware/expvar"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var count = expvar.NewInt("count")\n\napp.Use(expvarmw.New())\napp.Get("/", func(c *fiber.Ctx) error {\n count.Add(1)\n\n return c.SendString(fmt.Sprintf("hello expvar count %d", count.Value()))\n})\n')),(0,a.kt)("p",null,"Visit path ",(0,a.kt)("inlineCode",{parentName:"p"},"/debug/vars")," to see all vars and use query ",(0,a.kt)("inlineCode",{parentName:"p"},"r=key")," to filter exposed variables."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'curl 127.0.0.1:3000\nhello expvar count 1\n\ncurl 127.0.0.1:3000/debug/vars\n{\n "cmdline": ["xxx"],\n "count": 1,\n "expvarHandlerCalls": 33,\n "expvarRegexpErrors": 0,\n "memstats": {...}\n}\n\ncurl 127.0.0.1:3000/debug/vars?r=c\n{\n "cmdline": ["xxx"],\n "count": 1\n}\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct { \n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n}\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/054c93da.c5e1362c.js b/assets/js/054c93da.c5e1362c.js new file mode 100644 index 00000000000..2299aafc8fc --- /dev/null +++ b/assets/js/054c93da.c5e1362c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5987],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),c=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=c(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=c(r),f=a,m=u["".concat(p,".").concat(f)]||u[f]||d[f]||i;return r?n.createElement(m,o(o({ref:t},s),{},{components:r})):n.createElement(m,o({ref:t},s))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var n=r(87462),a=(r(67294),r(3905));const i={id:"expvar",title:"ExpVar"},o=void 0,l={unversionedId:"api/middleware/expvar",id:"api/middleware/expvar",title:"ExpVar",description:"Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.",source:"@site/docs/core/api/middleware/expvar.md",sourceDirName:"api/middleware",slug:"/api/middleware/expvar",permalink:"/next/api/middleware/expvar",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/expvar.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"expvar",title:"ExpVar"},sidebar:"tutorialSidebar",previous:{title:"ETag",permalink:"/next/api/middleware/etag"},next:{title:"Favicon",permalink:"/next/api/middleware/favicon"}},p={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],s={toc:c},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Expvar middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is ",(0,a.kt)("inlineCode",{parentName:"p"},"/debug/vars"),"."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New() fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n expvarmw "github.com/gofiber/fiber/v2/middleware/expvar"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var count = expvar.NewInt("count")\n\napp.Use(expvarmw.New())\napp.Get("/", func(c *fiber.Ctx) error {\n count.Add(1)\n\n return c.SendString(fmt.Sprintf("hello expvar count %d", count.Value()))\n})\n')),(0,a.kt)("p",null,"Visit path ",(0,a.kt)("inlineCode",{parentName:"p"},"/debug/vars")," to see all vars and use query ",(0,a.kt)("inlineCode",{parentName:"p"},"r=key")," to filter exposed variables."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'curl 127.0.0.1:3000\nhello expvar count 1\n\ncurl 127.0.0.1:3000/debug/vars\n{\n "cmdline": ["xxx"],\n "count": 1,\n "expvarHandlerCalls": 33,\n "expvarRegexpErrors": 0,\n "memstats": {...}\n}\n\ncurl 127.0.0.1:3000/debug/vars?r=c\n{\n "cmdline": ["xxx"],\n "count": 1\n}\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct { \n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n}\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/05a04cc8.38675c90.js b/assets/js/05a04cc8.38675c90.js new file mode 100644 index 00000000000..0d3498954ab --- /dev/null +++ b/assets/js/05a04cc8.38675c90.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8403],{36122:e=>{e.exports=JSON.parse('{"title":"Extra","description":"Extra contents for Fiber.","slug":"/category/extra","permalink":"/category/extra","navigation":{"previous":{"title":"\u26a1 Make Fiber Faster","permalink":"/guide/faster-fiber"},"next":{"title":"\ud83e\udd14 FAQ","permalink":"/extra/faq"}}}')}}]); \ No newline at end of file diff --git a/assets/js/05a04cc8.f70d38fb.js b/assets/js/05a04cc8.f70d38fb.js deleted file mode 100644 index 69e84f5df12..00000000000 --- a/assets/js/05a04cc8.f70d38fb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8403],{6122:e=>{e.exports=JSON.parse('{"title":"Extra","description":"Extra contents for Fiber.","slug":"/category/extra","permalink":"/category/extra","navigation":{"previous":{"title":"\u26a1 Make Fiber Faster","permalink":"/guide/faster-fiber"},"next":{"title":"\ud83e\udd14 FAQ","permalink":"/extra/faq"}}}')}}]); \ No newline at end of file diff --git a/assets/js/06122e25.34f70c6a.js b/assets/js/06122e25.34f70c6a.js deleted file mode 100644 index fdf08cee87a..00000000000 --- a/assets/js/06122e25.34f70c6a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4986],{7870:e=>{e.exports=JSON.parse('{"pluginId":"storage","version":"memcache_v1.x.x","label":"memcache_v1.x.x","banner":null,"badge":true,"noIndex":false,"className":"docs-version-memcache_v1.x.x","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/storage/","docId":"README"},{"type":"link","label":"ArangoDB","href":"/storage/arangodb/","docId":"arangodb/arangodb"},{"type":"link","label":"Azure Blob","href":"/storage/azureblob/","docId":"azureblob/azureblob"},{"type":"link","label":"Badger","href":"/storage/badger/","docId":"badger/badger"},{"type":"link","label":"Bbolt","href":"/storage/bbolt/","docId":"bbolt/bbolt"},{"type":"link","label":"Couchbase","href":"/storage/couchbase/","docId":"couchbase/couchbase"},{"type":"link","label":"DynamoDB","href":"/storage/dynamodb/","docId":"dynamodb/dynamodb"},{"type":"link","label":"Etcd","href":"/storage/etcd/","docId":"etcd/etcd"},{"type":"link","label":"Memcache","href":"/storage/memcache/","docId":"memcache/memcache"},{"type":"link","label":"Memory","href":"/storage/memory/","docId":"memory/memory"},{"type":"link","label":"MongoDB","href":"/storage/mongodb/","docId":"mongodb/mongodb"},{"type":"link","label":"MSSQL","href":"/storage/mssql/","docId":"mssql/mssql"},{"type":"link","label":"MySQL","href":"/storage/mysql/","docId":"mysql/mysql"},{"type":"link","label":"Pebble","href":"/storage/pebble/","docId":"pebble/pebble"},{"type":"link","label":"Postgres","href":"/storage/postgres/","docId":"postgres/postgres"},{"type":"link","label":"Redis","href":"/storage/redis/","docId":"redis/redis"},{"type":"link","label":"Ristretto","href":"/storage/ristretto/","docId":"ristretto/ristretto"},{"type":"link","label":"S3","href":"/storage/s3/","docId":"s3/s3"},{"type":"link","label":"SQLite3","href":"/storage/sqlite3/","docId":"sqlite3/sqlite3"}]},"docs":{"arangodb/arangodb":{"id":"arangodb/arangodb","title":"ArangoDB","description":"Release","sidebar":"tutorialSidebar"},"azureblob/azureblob":{"id":"azureblob/azureblob","title":"Azure Blob","description":"Release","sidebar":"tutorialSidebar"},"badger/badger":{"id":"badger/badger","title":"Badger","description":"Release","sidebar":"tutorialSidebar"},"bbolt/bbolt":{"id":"bbolt/bbolt","title":"Bbolt","description":"Release","sidebar":"tutorialSidebar"},"couchbase/couchbase":{"id":"couchbase/couchbase","title":"Couchbase","description":"Release","sidebar":"tutorialSidebar"},"dynamodb/dynamodb":{"id":"dynamodb/dynamodb","title":"DynamoDB","description":"Release","sidebar":"tutorialSidebar"},"etcd/etcd":{"id":"etcd/etcd","title":"Etcd","description":"Release","sidebar":"tutorialSidebar"},"memcache/memcache":{"id":"memcache/memcache","title":"Memcache","description":"Release","sidebar":"tutorialSidebar"},"memory/memory":{"id":"memory/memory","title":"Memory","description":"Release","sidebar":"tutorialSidebar"},"mongodb/mongodb":{"id":"mongodb/mongodb","title":"MongoDB","description":"Release","sidebar":"tutorialSidebar"},"mssql/mssql":{"id":"mssql/mssql","title":"MSSQL","description":"Release","sidebar":"tutorialSidebar"},"mysql/mysql":{"id":"mysql/mysql","title":"MySQL","description":"Release","sidebar":"tutorialSidebar"},"pebble/pebble":{"id":"pebble/pebble","title":"Pebble","description":"Release","sidebar":"tutorialSidebar"},"postgres/postgres":{"id":"postgres/postgres","title":"Postgres","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.","sidebar":"tutorialSidebar"},"redis/redis":{"id":"redis/redis","title":"Redis","description":"Release","sidebar":"tutorialSidebar"},"ristretto/ristretto":{"id":"ristretto/ristretto","title":"Ristretto","description":"Release","sidebar":"tutorialSidebar"},"s3/s3":{"id":"s3/s3","title":"S3","description":"Release","sidebar":"tutorialSidebar"},"sqlite3/sqlite3":{"id":"sqlite3/sqlite3","title":"SQLite3","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/06122e25.a5d58f8d.js b/assets/js/06122e25.a5d58f8d.js new file mode 100644 index 00000000000..13e0a070263 --- /dev/null +++ b/assets/js/06122e25.a5d58f8d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4986],{37870:e=>{e.exports=JSON.parse('{"pluginId":"storage","version":"memcache_v1.x.x","label":"memcache_v1.x.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-memcache_v1.x.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/storage/memcache_v1.x.x/","docId":"README"},{"type":"link","label":"ArangoDB","href":"/storage/memcache_v1.x.x/arangodb/","docId":"arangodb/arangodb"},{"type":"link","label":"Azure Blob","href":"/storage/memcache_v1.x.x/azureblob/","docId":"azureblob/azureblob"},{"type":"link","label":"Badger","href":"/storage/memcache_v1.x.x/badger/","docId":"badger/badger"},{"type":"link","label":"Bbolt","href":"/storage/memcache_v1.x.x/bbolt/","docId":"bbolt/bbolt"},{"type":"link","label":"Couchbase","href":"/storage/memcache_v1.x.x/couchbase/","docId":"couchbase/couchbase"},{"type":"link","label":"DynamoDB","href":"/storage/memcache_v1.x.x/dynamodb/","docId":"dynamodb/dynamodb"},{"type":"link","label":"Etcd","href":"/storage/memcache_v1.x.x/etcd/","docId":"etcd/etcd"},{"type":"link","label":"Memcache","href":"/storage/memcache_v1.x.x/memcache/","docId":"memcache/memcache"},{"type":"link","label":"Memory","href":"/storage/memcache_v1.x.x/memory/","docId":"memory/memory"},{"type":"link","label":"MongoDB","href":"/storage/memcache_v1.x.x/mongodb/","docId":"mongodb/mongodb"},{"type":"link","label":"MSSQL","href":"/storage/memcache_v1.x.x/mssql/","docId":"mssql/mssql"},{"type":"link","label":"MySQL","href":"/storage/memcache_v1.x.x/mysql/","docId":"mysql/mysql"},{"type":"link","label":"Pebble","href":"/storage/memcache_v1.x.x/pebble/","docId":"pebble/pebble"},{"type":"link","label":"Postgres","href":"/storage/memcache_v1.x.x/postgres/","docId":"postgres/postgres"},{"type":"link","label":"Redis","href":"/storage/memcache_v1.x.x/redis/","docId":"redis/redis"},{"type":"link","label":"Ristretto","href":"/storage/memcache_v1.x.x/ristretto/","docId":"ristretto/ristretto"},{"type":"link","label":"S3","href":"/storage/memcache_v1.x.x/s3/","docId":"s3/s3"},{"type":"link","label":"SQLite3","href":"/storage/memcache_v1.x.x/sqlite3/","docId":"sqlite3/sqlite3"}]},"docs":{"arangodb/arangodb":{"id":"arangodb/arangodb","title":"ArangoDB","description":"Release","sidebar":"tutorialSidebar"},"azureblob/azureblob":{"id":"azureblob/azureblob","title":"Azure Blob","description":"Release","sidebar":"tutorialSidebar"},"badger/badger":{"id":"badger/badger","title":"Badger","description":"Release","sidebar":"tutorialSidebar"},"bbolt/bbolt":{"id":"bbolt/bbolt","title":"Bbolt","description":"Release","sidebar":"tutorialSidebar"},"couchbase/couchbase":{"id":"couchbase/couchbase","title":"Couchbase","description":"Release","sidebar":"tutorialSidebar"},"dynamodb/dynamodb":{"id":"dynamodb/dynamodb","title":"DynamoDB","description":"Release","sidebar":"tutorialSidebar"},"etcd/etcd":{"id":"etcd/etcd","title":"Etcd","description":"Release","sidebar":"tutorialSidebar"},"memcache/memcache":{"id":"memcache/memcache","title":"Memcache","description":"Release","sidebar":"tutorialSidebar"},"memory/memory":{"id":"memory/memory","title":"Memory","description":"Release","sidebar":"tutorialSidebar"},"mongodb/mongodb":{"id":"mongodb/mongodb","title":"MongoDB","description":"Release","sidebar":"tutorialSidebar"},"mssql/mssql":{"id":"mssql/mssql","title":"MSSQL","description":"Release","sidebar":"tutorialSidebar"},"mysql/mysql":{"id":"mysql/mysql","title":"MySQL","description":"Release","sidebar":"tutorialSidebar"},"pebble/pebble":{"id":"pebble/pebble","title":"Pebble","description":"Release","sidebar":"tutorialSidebar"},"postgres/postgres":{"id":"postgres/postgres","title":"Postgres","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.","sidebar":"tutorialSidebar"},"redis/redis":{"id":"redis/redis","title":"Redis","description":"Release","sidebar":"tutorialSidebar"},"ristretto/ristretto":{"id":"ristretto/ristretto","title":"Ristretto","description":"Release","sidebar":"tutorialSidebar"},"s3/s3":{"id":"s3/s3","title":"S3","description":"Release","sidebar":"tutorialSidebar"},"sqlite3/sqlite3":{"id":"sqlite3/sqlite3","title":"SQLite3","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/068d482b.1438be64.js b/assets/js/068d482b.1438be64.js new file mode 100644 index 00000000000..e1c60ee209c --- /dev/null +++ b/assets/js/068d482b.1438be64.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6491],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),f=c(n),b=i,d=f["".concat(l,".").concat(b)]||f[b]||u[b]||a;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=b;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[f]="string"==typeof e?e:i,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var r=n(87462),i=(n(67294),n(3905));const a={id:"fibersentry",title:"Fibersentry"},o=void 0,s={unversionedId:"fibersentry/fibersentry",id:"version-fiberzerolog_v0.x.x/fibersentry/fibersentry",title:"Fibersentry",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/fibersentry/README.md",sourceDirName:"fibersentry",slug:"/fibersentry/",permalink:"/contrib/fibersentry/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fibersentry/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fibersentry",title:"Fibersentry"},sidebar:"tutorialSidebar",previous:{title:"Fibernewrelic",permalink:"/contrib/fibernewrelic/"},next:{title:"Fiberzap",permalink:"/contrib/fiberzap/"}},l={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Accessing Context in BeforeSend callback",id:"accessing-context-in-beforesend-callback",level:3}],p={toc:c},f="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(f,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fibersentry*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://sentry.io/"},"Sentry")," support for Fiber."),(0,i.kt)("h3",{id:"install"},"Install"),(0,i.kt)("p",null,"This middleware supports Fiber v2."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fibersentry\ngo get -u github.com/getsentry/sentry-go\n")),(0,i.kt)("h3",{id:"signature"},"Signature"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"fibersentry.New(config ...Config) fiber.Handler\n")),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic configures whether Sentry should repanic after recovery. Set to true, if ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery configures whether you want to block the request before moving forward with the response. If ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used, it's safe to either skip this option or set it to false."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout for the event delivery requests."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Second * 2"))))),(0,i.kt)("h3",{id:"usage"},"Usage"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry")," attaches an instance of ",(0,i.kt)("inlineCode",{parentName:"p"},"*sentry.Hub")," (",(0,i.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/getsentry/sentry-go#Hub"},"https://godoc.org/github.com/getsentry/sentry-go#Hub"),") to the request's context, which makes it available throughout the rest of the request's lifetime.\nYou can access it by using the ",(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry.GetHubFromContext()")," method on the context itself in any of your proceeding middleware and routes.\nAnd it should be used instead of the global ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureMessage"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureException"),", or any other calls, as it keeps the separation of data between the requests."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Keep in mind that ",(0,i.kt)("inlineCode",{parentName:"strong"},"*sentry.Hub")," won't be available in middleware attached before to ",(0,i.kt)("inlineCode",{parentName:"strong"},"fibersentry"),"!")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "log"\n\n "github.com/getsentry/sentry-go"\n "github.com/gofiber/contrib/fibersentry"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/utils"\n)\n\nfunc main() {\n _ = sentry.Init(sentry.ClientOptions{\n Dsn: "",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(utils.ImmutableString(c.Hostname()))\n }\n }\n fmt.Println(event)\n return event\n },\n Debug: true,\n AttachStacktrace: true,\n })\n\n app := fiber.New()\n\n app.Use(fibersentry.New(fibersentry.Config{\n Repanic: true,\n WaitForDelivery: true,\n }))\n\n enhanceSentryEvent := func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")\n }\n return c.Next()\n }\n\n app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {\n panic("y tho")\n })\n\n app.All("/", func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.WithScope(func(scope *sentry.Scope) {\n scope.SetExtra("unwantedQuery", "someQueryDataMaybe")\n hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")\n })\n }\n return c.SendStatus(fiber.StatusOK)\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,i.kt)("h3",{id:"accessing-context-in-beforesend-callback"},"Accessing Context in ",(0,i.kt)("inlineCode",{parentName:"h3"},"BeforeSend")," callback"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'sentry.Init(sentry.ClientOptions{\n Dsn: "your-public-dsn",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(c.Hostname())\n }\n }\n return event\n },\n})\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/068d482b.daeb7e0c.js b/assets/js/068d482b.daeb7e0c.js deleted file mode 100644 index 198a7fa9d33..00000000000 --- a/assets/js/068d482b.daeb7e0c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6491],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),f=c(n),b=i,d=f["".concat(l,".").concat(b)]||f[b]||u[b]||a;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=b;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[f]="string"==typeof e?e:i,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var r=n(7462),i=(n(7294),n(3905));const a={id:"fibersentry",title:"Fibersentry"},o=void 0,s={unversionedId:"fibersentry/fibersentry",id:"version-fiberzerolog_v0.x.x/fibersentry/fibersentry",title:"Fibersentry",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/fibersentry/README.md",sourceDirName:"fibersentry",slug:"/fibersentry/",permalink:"/contrib/fibersentry/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fibersentry/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fibersentry",title:"Fibersentry"},sidebar:"tutorialSidebar",previous:{title:"Fibernewrelic",permalink:"/contrib/fibernewrelic/"},next:{title:"Fiberzap",permalink:"/contrib/fiberzap/"}},l={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Accessing Context in BeforeSend callback",id:"accessing-context-in-beforesend-callback",level:3}],p={toc:c},f="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(f,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fibersentry*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://sentry.io/"},"Sentry")," support for Fiber."),(0,i.kt)("h3",{id:"install"},"Install"),(0,i.kt)("p",null,"This middleware supports Fiber v2."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fibersentry\ngo get -u github.com/getsentry/sentry-go\n")),(0,i.kt)("h3",{id:"signature"},"Signature"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"fibersentry.New(config ...Config) fiber.Handler\n")),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic configures whether Sentry should repanic after recovery. Set to true, if ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery configures whether you want to block the request before moving forward with the response. If ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used, it's safe to either skip this option or set it to false."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout for the event delivery requests."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Second * 2"))))),(0,i.kt)("h3",{id:"usage"},"Usage"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry")," attaches an instance of ",(0,i.kt)("inlineCode",{parentName:"p"},"*sentry.Hub")," (",(0,i.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/getsentry/sentry-go#Hub"},"https://godoc.org/github.com/getsentry/sentry-go#Hub"),") to the request's context, which makes it available throughout the rest of the request's lifetime.\nYou can access it by using the ",(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry.GetHubFromContext()")," method on the context itself in any of your proceeding middleware and routes.\nAnd it should be used instead of the global ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureMessage"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureException"),", or any other calls, as it keeps the separation of data between the requests."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Keep in mind that ",(0,i.kt)("inlineCode",{parentName:"strong"},"*sentry.Hub")," won't be available in middleware attached before to ",(0,i.kt)("inlineCode",{parentName:"strong"},"fibersentry"),"!")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "log"\n\n "github.com/getsentry/sentry-go"\n "github.com/gofiber/contrib/fibersentry"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/utils"\n)\n\nfunc main() {\n _ = sentry.Init(sentry.ClientOptions{\n Dsn: "",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(utils.ImmutableString(c.Hostname()))\n }\n }\n fmt.Println(event)\n return event\n },\n Debug: true,\n AttachStacktrace: true,\n })\n\n app := fiber.New()\n\n app.Use(fibersentry.New(fibersentry.Config{\n Repanic: true,\n WaitForDelivery: true,\n }))\n\n enhanceSentryEvent := func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")\n }\n return c.Next()\n }\n\n app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {\n panic("y tho")\n })\n\n app.All("/", func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.WithScope(func(scope *sentry.Scope) {\n scope.SetExtra("unwantedQuery", "someQueryDataMaybe")\n hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")\n })\n }\n return c.SendStatus(fiber.StatusOK)\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,i.kt)("h3",{id:"accessing-context-in-beforesend-callback"},"Accessing Context in ",(0,i.kt)("inlineCode",{parentName:"h3"},"BeforeSend")," callback"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'sentry.Init(sentry.ClientOptions{\n Dsn: "your-public-dsn",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(c.Hostname())\n }\n }\n return event\n },\n})\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/069c048f.9294eb92.js b/assets/js/069c048f.9294eb92.js new file mode 100644 index 00000000000..cb2d43900f5 --- /dev/null +++ b/assets/js/069c048f.9294eb92.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7566],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>g});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},b="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),b=l(r),d=o,g=b["".concat(s,".").concat(d)]||b[d]||f[d]||a;return r?n.createElement(g,i(i({ref:t},p),{},{components:r})):n.createElement(g,i({ref:t},p))}));function g(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[b]="string"==typeof e?e:o,i[1]=c;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var n=r(87462),o=(r(67294),r(3905));const a={id:"websocket",title:"Websocket"},i=void 0,c={unversionedId:"websocket/websocket",id:"version-fibersentry_v1.x.x/websocket/websocket",title:"Websocket",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/websocket/README.md",sourceDirName:"websocket",slug:"/websocket/",permalink:"/contrib/fibersentry_v1.x.x/websocket/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/websocket/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"websocket",title:"Websocket"},sidebar:"tutorialSidebar",previous:{title:"Swagger",permalink:"/contrib/fibersentry_v1.x.x/swagger/"}},s={},l=[{value:"Install",id:"install",level:3},{value:"Example",id:"example",level:3},{value:"Note with cache middleware",id:"note-with-cache-middleware",level:3}],p={toc:l},b="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=websocket*",alt:"Release"}),"\n",(0,o.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,o.kt)("p",null,"Based on ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/fasthttp/websocket"},"Fasthttp WebSocket")," for ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," with available ",(0,o.kt)("inlineCode",{parentName:"p"},"*fiber.Ctx")," methods like ",(0,o.kt)("a",{parentName:"p",href:"http://docs.gofiber.io/ctx#locals"},"Locals"),", ",(0,o.kt)("a",{parentName:"p",href:"http://docs.gofiber.io/ctx#params"},"Params"),", ",(0,o.kt)("a",{parentName:"p",href:"http://docs.gofiber.io/ctx#query"},"Query")," and ",(0,o.kt)("a",{parentName:"p",href:"http://docs.gofiber.io/ctx#cookies"},"Cookies"),"."),(0,o.kt)("h3",{id:"install"},"Install"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/websocket\n")),(0,o.kt)("h3",{id:"example"},"Example"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/websocket"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/ws", func(c *fiber.Ctx) error {\n // IsWebSocketUpgrade returns true if the client\n // requested upgrade to the WebSocket protocol.\n if websocket.IsWebSocketUpgrade(c) {\n c.Locals("allowed", true)\n return c.Next()\n }\n return fiber.ErrUpgradeRequired\n })\n\n app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {\n // c.Locals is added to the *websocket.Conn\n log.Println(c.Locals("allowed")) // true\n log.Println(c.Params("id")) // 123\n log.Println(c.Query("v")) // 1.0\n log.Println(c.Cookies("session")) // ""\n\n // websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index\n var (\n mt int\n msg []byte\n err error\n )\n for {\n if mt, msg, err = c.ReadMessage(); err != nil {\n log.Println("read:", err)\n break\n }\n log.Printf("recv: %s", msg)\n\n if err = c.WriteMessage(mt, msg); err != nil {\n log.Println("write:", err)\n break\n }\n }\n\n }))\n\n log.Fatal(app.Listen(":3000"))\n // Access the websocket server: ws://localhost:3000/ws/123?v=1.0\n // https://www.websocket.org/echo.html\n}\n\n')),(0,o.kt)("h3",{id:"note-with-cache-middleware"},"Note with cache middleware"),(0,o.kt)("p",null,"If you get the error ",(0,o.kt)("inlineCode",{parentName:"p"},"websocket: bad handshake")," when using the ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware/cache"},"cache middleware"),", please use ",(0,o.kt)("inlineCode",{parentName:"p"},"config.Next")," to skip websocket path."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'app := fiber.New()\napp.Use(cache.New(cache.Config{\n Next: func(c *fiber.Ctx) bool {\n return strings.Contains(c.Route().Path, "/ws")\n },\n}))\n\napp.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {}))\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/069c048f.97d37f82.js b/assets/js/069c048f.97d37f82.js deleted file mode 100644 index 8dfa2ccd962..00000000000 --- a/assets/js/069c048f.97d37f82.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7566],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>g});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},b="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),b=l(r),d=o,g=b["".concat(s,".").concat(d)]||b[d]||f[d]||a;return r?n.createElement(g,i(i({ref:t},p),{},{components:r})):n.createElement(g,i({ref:t},p))}));function g(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[b]="string"==typeof e?e:o,i[1]=c;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var n=r(7462),o=(r(7294),r(3905));const a={id:"websocket",title:"Websocket"},i=void 0,c={unversionedId:"websocket/websocket",id:"version-fibersentry_v1.x.x/websocket/websocket",title:"Websocket",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/websocket/README.md",sourceDirName:"websocket",slug:"/websocket/",permalink:"/contrib/fibersentry_v1.x.x/websocket/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/websocket/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"websocket",title:"Websocket"},sidebar:"tutorialSidebar",previous:{title:"Swagger",permalink:"/contrib/fibersentry_v1.x.x/swagger/"}},s={},l=[{value:"Install",id:"install",level:3},{value:"Example",id:"example",level:3},{value:"Note with cache middleware",id:"note-with-cache-middleware",level:3}],p={toc:l},b="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(b,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=websocket*",alt:"Release"}),"\n",(0,o.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,o.kt)("p",null,"Based on ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/fasthttp/websocket"},"Fasthttp WebSocket")," for ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," with available ",(0,o.kt)("inlineCode",{parentName:"p"},"*fiber.Ctx")," methods like ",(0,o.kt)("a",{parentName:"p",href:"http://docs.gofiber.io/ctx#locals"},"Locals"),", ",(0,o.kt)("a",{parentName:"p",href:"http://docs.gofiber.io/ctx#params"},"Params"),", ",(0,o.kt)("a",{parentName:"p",href:"http://docs.gofiber.io/ctx#query"},"Query")," and ",(0,o.kt)("a",{parentName:"p",href:"http://docs.gofiber.io/ctx#cookies"},"Cookies"),"."),(0,o.kt)("h3",{id:"install"},"Install"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/websocket\n")),(0,o.kt)("h3",{id:"example"},"Example"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/websocket"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/ws", func(c *fiber.Ctx) error {\n // IsWebSocketUpgrade returns true if the client\n // requested upgrade to the WebSocket protocol.\n if websocket.IsWebSocketUpgrade(c) {\n c.Locals("allowed", true)\n return c.Next()\n }\n return fiber.ErrUpgradeRequired\n })\n\n app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {\n // c.Locals is added to the *websocket.Conn\n log.Println(c.Locals("allowed")) // true\n log.Println(c.Params("id")) // 123\n log.Println(c.Query("v")) // 1.0\n log.Println(c.Cookies("session")) // ""\n\n // websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index\n var (\n mt int\n msg []byte\n err error\n )\n for {\n if mt, msg, err = c.ReadMessage(); err != nil {\n log.Println("read:", err)\n break\n }\n log.Printf("recv: %s", msg)\n\n if err = c.WriteMessage(mt, msg); err != nil {\n log.Println("write:", err)\n break\n }\n }\n\n }))\n\n log.Fatal(app.Listen(":3000"))\n // Access the websocket server: ws://localhost:3000/ws/123?v=1.0\n // https://www.websocket.org/echo.html\n}\n\n')),(0,o.kt)("h3",{id:"note-with-cache-middleware"},"Note with cache middleware"),(0,o.kt)("p",null,"If you get the error ",(0,o.kt)("inlineCode",{parentName:"p"},"websocket: bad handshake")," when using the ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware/cache"},"cache middleware"),", please use ",(0,o.kt)("inlineCode",{parentName:"p"},"config.Next")," to skip websocket path."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'app := fiber.New()\napp.Use(cache.New(cache.Config{\n Next: func(c *fiber.Ctx) bool {\n return strings.Contains(c.Route().Path, "/ws")\n },\n}))\n\napp.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {}))\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/072282c6.23421e5e.js b/assets/js/072282c6.23421e5e.js deleted file mode 100644 index d78c920a025..00000000000 --- a/assets/js/072282c6.23421e5e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1625],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>m});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},g=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),u=c(n),f=r,m=u["".concat(l,".").concat(f)]||u[f]||p[f]||s;return n?a.createElement(m,o(o({ref:t},g),{},{components:n})):a.createElement(m,o({ref:t},g))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var a=n(7462),r=(n(7294),n(3905));const s={id:"mssql",title:"MSSQL"},o=void 0,i={unversionedId:"mssql/mssql",id:"version-etcd_v1.x.x/mssql/mssql",title:"MSSQL",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/mssql/README.md",sourceDirName:"mssql",slug:"/mssql/",permalink:"/storage/etcd_v1.x.x/mssql/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mssql/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mssql",title:"MSSQL"},sidebar:"tutorialSidebar",previous:{title:"MongoDB",permalink:"/storage/etcd_v1.x.x/mongodb/"},next:{title:"MySQL",permalink:"/storage/etcd_v1.x.x/mysql/"}},l={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:c},u="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mssql*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MSSQL storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/microsoft/go-mssqldb"},"microsoft/go-mssqldb"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MSSQL is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mssql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mssql\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mssql"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mssql.New()\n\n// Initialize custom config\nstore := mssql.New(mssql.Config{\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n})\n\n// Initialize custom config using connection string\nstore := mssql.New(mssql.Config{\n ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 1433\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Instance name\n //\n // Optional. Default is ""\n Instance string\n \n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SslMode string\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/072282c6.e8e9de8e.js b/assets/js/072282c6.e8e9de8e.js new file mode 100644 index 00000000000..36801c11879 --- /dev/null +++ b/assets/js/072282c6.e8e9de8e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1625],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},g=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),u=c(n),f=r,m=u["".concat(l,".").concat(f)]||u[f]||p[f]||s;return n?a.createElement(m,o(o({ref:t},g),{},{components:n})):a.createElement(m,o({ref:t},g))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:r,o[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));const s={id:"mssql",title:"MSSQL"},o=void 0,i={unversionedId:"mssql/mssql",id:"version-etcd_v1.x.x/mssql/mssql",title:"MSSQL",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/mssql/README.md",sourceDirName:"mssql",slug:"/mssql/",permalink:"/storage/etcd_v1.x.x/mssql/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mssql/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mssql",title:"MSSQL"},sidebar:"tutorialSidebar",previous:{title:"MongoDB",permalink:"/storage/etcd_v1.x.x/mongodb/"},next:{title:"MySQL",permalink:"/storage/etcd_v1.x.x/mysql/"}},l={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:c},u="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mssql*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MSSQL storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/microsoft/go-mssqldb"},"microsoft/go-mssqldb"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MSSQL is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mssql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mssql\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mssql"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mssql.New()\n\n// Initialize custom config\nstore := mssql.New(mssql.Config{\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n})\n\n// Initialize custom config using connection string\nstore := mssql.New(mssql.Config{\n ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 1433\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Instance name\n //\n // Optional. Default is ""\n Instance string\n \n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SslMode string\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/077bad16.255dffdb.js b/assets/js/077bad16.255dffdb.js deleted file mode 100644 index 7c6d73a6010..00000000000 --- a/assets/js/077bad16.255dffdb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1014],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),c=u(r),g=a,m=c["".concat(l,".").concat(g)]||c[g]||f[g]||o;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:a,i[1]=s;for(var u=2;u{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var n=r(7462),a=(r(7294),r(3905));const o={id:"ristretto",title:"Ristretto"},i=void 0,s={unversionedId:"ristretto/ristretto",id:"version-mysql_v1.x.x/ristretto/ristretto",title:"Ristretto",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/ristretto/README.md",sourceDirName:"ristretto",slug:"/ristretto/",permalink:"/storage/mysql_v1.x.x/ristretto/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/ristretto/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"ristretto",title:"Ristretto"},sidebar:"tutorialSidebar",previous:{title:"Redis",permalink:"/storage/mysql_v1.x.x/redis/"},next:{title:"S3",permalink:"/storage/mysql_v1.x.x/s3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:u},c="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=ristretto*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-ristretto.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Memory-bound storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/dgraph-io/ristretto"},(0,a.kt)("inlineCode",{parentName:"a"},"dgraph-io/ristretto")),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *ristretto.Cache\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Ristretto is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the ristretto implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/ristretto\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/ristretto"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := ristretto.New()\n\n// Initialize custom config\nstore := ristretto.New(ristretto.Config{\n NumCounters: 1e7, // number of keys to track frequency of (10M).\n MaxCost: 1 << 30, // maximum cost of cache (1GB).\n BufferItems: 64, // number of keys per Get buffer.\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // NumCounters number of keys to track frequency of (10M).\n NumCounters int64\n\n // MaxCost maximum cost of cache (1GB).\n MaxCost int64\n\n // BufferItems number of keys per Get buffer.\n BufferItems int64\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n NumCounters: 1e7,\n MaxCost: 1 << 30,\n BufferItems: 64,\n DefaultCost: 1,\n}\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/077bad16.caf9fd0c.js b/assets/js/077bad16.caf9fd0c.js new file mode 100644 index 00000000000..4f6d23df677 --- /dev/null +++ b/assets/js/077bad16.caf9fd0c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1014],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),c=u(r),g=a,m=c["".concat(l,".").concat(g)]||c[g]||f[g]||o;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:a,i[1]=s;for(var u=2;u{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var n=r(87462),a=(r(67294),r(3905));const o={id:"ristretto",title:"Ristretto"},i=void 0,s={unversionedId:"ristretto/ristretto",id:"version-mysql_v1.x.x/ristretto/ristretto",title:"Ristretto",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/ristretto/README.md",sourceDirName:"ristretto",slug:"/ristretto/",permalink:"/storage/mysql_v1.x.x/ristretto/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/ristretto/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"ristretto",title:"Ristretto"},sidebar:"tutorialSidebar",previous:{title:"Redis",permalink:"/storage/mysql_v1.x.x/redis/"},next:{title:"S3",permalink:"/storage/mysql_v1.x.x/s3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:u},c="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=ristretto*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-ristretto.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Memory-bound storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/dgraph-io/ristretto"},(0,a.kt)("inlineCode",{parentName:"a"},"dgraph-io/ristretto")),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *ristretto.Cache\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Ristretto is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the ristretto implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/ristretto\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/ristretto"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := ristretto.New()\n\n// Initialize custom config\nstore := ristretto.New(ristretto.Config{\n NumCounters: 1e7, // number of keys to track frequency of (10M).\n MaxCost: 1 << 30, // maximum cost of cache (1GB).\n BufferItems: 64, // number of keys per Get buffer.\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // NumCounters number of keys to track frequency of (10M).\n NumCounters int64\n\n // MaxCost maximum cost of cache (1GB).\n MaxCost int64\n\n // BufferItems number of keys per Get buffer.\n BufferItems int64\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n NumCounters: 1e7,\n MaxCost: 1 << 30,\n BufferItems: 64,\n DefaultCost: 1,\n}\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/08224c27.8cea0f9b.js b/assets/js/08224c27.8cea0f9b.js deleted file mode 100644 index c10868ff4be..00000000000 --- a/assets/js/08224c27.8cea0f9b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1554],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),g=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=g(e.components);return a.createElement(l.Provider,{value:t},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=g(n),m=r,f=c["".concat(l,".").concat(m)]||c[m]||p[m]||s;return n?a.createElement(f,o(o({ref:t},u),{},{components:n})):a.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:r,o[1]=i;for(var g=2;g{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>g});var a=n(7462),r=(n(7294),n(3905));const s={id:"mssql",title:"MSSQL"},o=void 0,i={unversionedId:"mssql/mssql",id:"version-mysql_v1.x.x/mssql/mssql",title:"MSSQL",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/mssql/README.md",sourceDirName:"mssql",slug:"/mssql/",permalink:"/storage/mysql_v1.x.x/mssql/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mssql/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mssql",title:"MSSQL"},sidebar:"tutorialSidebar",previous:{title:"MongoDB",permalink:"/storage/mysql_v1.x.x/mongodb/"},next:{title:"MySQL",permalink:"/storage/mysql_v1.x.x/mysql/"}},l={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:g},c="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(c,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mssql*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MSSQL storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/microsoft/go-mssqldb"},"microsoft/go-mssqldb"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MSSQL is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mssql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mssql\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mssql"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mssql.New()\n\n// Initialize custom config\nstore := mssql.New(mssql.Config{\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n})\n\n// Initialize custom config using connection string\nstore := mssql.New(mssql.Config{\n ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 1433\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Instance name\n //\n // Optional. Default is ""\n Instance string\n \n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SslMode string\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/08224c27.cb8a8b8a.js b/assets/js/08224c27.cb8a8b8a.js new file mode 100644 index 00000000000..199f9af481d --- /dev/null +++ b/assets/js/08224c27.cb8a8b8a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1554],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),g=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=g(e.components);return a.createElement(l.Provider,{value:t},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=g(n),m=r,f=c["".concat(l,".").concat(m)]||c[m]||p[m]||s;return n?a.createElement(f,o(o({ref:t},u),{},{components:n})):a.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:r,o[1]=i;for(var g=2;g{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>g});var a=n(87462),r=(n(67294),n(3905));const s={id:"mssql",title:"MSSQL"},o=void 0,i={unversionedId:"mssql/mssql",id:"version-mysql_v1.x.x/mssql/mssql",title:"MSSQL",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/mssql/README.md",sourceDirName:"mssql",slug:"/mssql/",permalink:"/storage/mysql_v1.x.x/mssql/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mssql/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mssql",title:"MSSQL"},sidebar:"tutorialSidebar",previous:{title:"MongoDB",permalink:"/storage/mysql_v1.x.x/mongodb/"},next:{title:"MySQL",permalink:"/storage/mysql_v1.x.x/mysql/"}},l={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:g},c="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(c,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mssql*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MSSQL storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/microsoft/go-mssqldb"},"microsoft/go-mssqldb"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MSSQL is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mssql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mssql\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mssql"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mssql.New()\n\n// Initialize custom config\nstore := mssql.New(mssql.Config{\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n})\n\n// Initialize custom config using connection string\nstore := mssql.New(mssql.Config{\n ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 1433\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Instance name\n //\n // Optional. Default is ""\n Instance string\n \n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SslMode string\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/09303bcf.588f7aa7.js b/assets/js/09303bcf.588f7aa7.js deleted file mode 100644 index 512ddd5cb3c..00000000000 --- a/assets/js/09303bcf.588f7aa7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7620],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>h});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),d=s(r),g=a,h=d["".concat(l,".").concat(g)]||d[g]||c[g]||i;return r?n.createElement(h,o(o({ref:t},u),{},{components:r})):n.createElement(h,o({ref:t},u))}));function h(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=g;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[d]="string"==typeof e?e:a,o[1]=p;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>p,toc:()=>s});var n=r(7462),a=(r(7294),r(3905));const i={id:"grouping",title:"\ud83c\udfad Grouping",sidebar_position:2},o=void 0,p={unversionedId:"guide/grouping",id:"guide/grouping",title:"\ud83c\udfad Grouping",description:"In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.",source:"@site/docs/core/guide/grouping.md",sourceDirName:"guide",slug:"/guide/grouping",permalink:"/next/guide/grouping",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/grouping.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:2,frontMatter:{id:"grouping",title:"\ud83c\udfad Grouping",sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udd0c Routing",permalink:"/next/guide/routing"},next:{title:"\ud83d\udcdd Templates",permalink:"/next/guide/templates"}},l={},s=[{value:"Paths",id:"paths",level:2},{value:"Group Handlers",id:"group-handlers",level:2}],u={toc:s},d="wrapper";function c(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.")),(0,a.kt)("h2",{id:"paths"},"Paths"),(0,a.kt)("p",null,"Like ",(0,a.kt)("strong",{parentName:"p"},"Routing"),", groups can also have paths that belong to a cluster."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api", middleware) // /api\n\n v1 := api.Group("/v1", middleware) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2", middleware) // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("p",null,"A ",(0,a.kt)("strong",{parentName:"p"},"Group")," of paths can have an optional handler."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api") // /api\n\n v1 := api.Group("/v1") // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2") // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"Running ",(0,a.kt)("strong",{parentName:"p"},"/api"),", ",(0,a.kt)("strong",{parentName:"p"},"/v1")," or ",(0,a.kt)("strong",{parentName:"p"},"/v2")," will result in ",(0,a.kt)("strong",{parentName:"p"},"404")," error, make sure you have the errors set.")),(0,a.kt)("h2",{id:"group-handlers"},"Group Handlers"),(0,a.kt)("p",null,"Group handlers can also be used as a routing path but they must have ",(0,a.kt)("strong",{parentName:"p"},"Next")," added to them so that the flow can continue."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n handler := func(c *fiber.Ctx) error {\n return c.SendStatus(fiber.StatusOK)\n }\n api := app.Group("/api") // /api\n\n v1 := api.Group("/v1", func(c *fiber.Ctx) error { // middleware for /api/v1\n c.Set("Version", "v1")\n return c.Next()\n })\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n log.Fatal(app.Listen(":3000"))\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/09303bcf.5ebc424a.js b/assets/js/09303bcf.5ebc424a.js new file mode 100644 index 00000000000..82cc96cde3c --- /dev/null +++ b/assets/js/09303bcf.5ebc424a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7620],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>h});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),d=s(r),g=a,h=d["".concat(l,".").concat(g)]||d[g]||c[g]||i;return r?n.createElement(h,o(o({ref:t},u),{},{components:r})):n.createElement(h,o({ref:t},u))}));function h(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=g;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[d]="string"==typeof e?e:a,o[1]=p;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>p,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));const i={id:"grouping",title:"\ud83c\udfad Grouping",sidebar_position:2},o=void 0,p={unversionedId:"guide/grouping",id:"guide/grouping",title:"\ud83c\udfad Grouping",description:"In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.",source:"@site/docs/core/guide/grouping.md",sourceDirName:"guide",slug:"/guide/grouping",permalink:"/next/guide/grouping",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/grouping.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:2,frontMatter:{id:"grouping",title:"\ud83c\udfad Grouping",sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udd0c Routing",permalink:"/next/guide/routing"},next:{title:"\ud83d\udcdd Templates",permalink:"/next/guide/templates"}},l={},s=[{value:"Paths",id:"paths",level:2},{value:"Group Handlers",id:"group-handlers",level:2}],u={toc:s},d="wrapper";function c(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.")),(0,a.kt)("h2",{id:"paths"},"Paths"),(0,a.kt)("p",null,"Like ",(0,a.kt)("strong",{parentName:"p"},"Routing"),", groups can also have paths that belong to a cluster."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api", middleware) // /api\n\n v1 := api.Group("/v1", middleware) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2", middleware) // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("p",null,"A ",(0,a.kt)("strong",{parentName:"p"},"Group")," of paths can have an optional handler."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api") // /api\n\n v1 := api.Group("/v1") // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2") // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"Running ",(0,a.kt)("strong",{parentName:"p"},"/api"),", ",(0,a.kt)("strong",{parentName:"p"},"/v1")," or ",(0,a.kt)("strong",{parentName:"p"},"/v2")," will result in ",(0,a.kt)("strong",{parentName:"p"},"404")," error, make sure you have the errors set.")),(0,a.kt)("h2",{id:"group-handlers"},"Group Handlers"),(0,a.kt)("p",null,"Group handlers can also be used as a routing path but they must have ",(0,a.kt)("strong",{parentName:"p"},"Next")," added to them so that the flow can continue."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n handler := func(c *fiber.Ctx) error {\n return c.SendStatus(fiber.StatusOK)\n }\n api := app.Group("/api") // /api\n\n v1 := api.Group("/v1", func(c *fiber.Ctx) error { // middleware for /api/v1\n c.Set("Version", "v1")\n return c.Next()\n })\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n log.Fatal(app.Listen(":3000"))\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/09fe6722.87fad4b9.js b/assets/js/09fe6722.87fad4b9.js deleted file mode 100644 index 386c189d383..00000000000 --- a/assets/js/09fe6722.87fad4b9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4114],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),g=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=g(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=g(r),f=n,m=p["".concat(l,".").concat(f)]||p[f]||u[f]||o;return r?a.createElement(m,i(i({ref:t},c),{},{components:r})):a.createElement(m,i({ref:t},c))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:n,i[1]=s;for(var g=2;g{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>g});var a=r(7462),n=(r(7294),r(3905));const o={id:"swagger",title:"Swagger"},i=void 0,s={unversionedId:"swagger/swagger",id:"version-swagger_v1.x.x/swagger/swagger",title:"Swagger",description:"Release",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/swagger/README.md",sourceDirName:"swagger",slug:"/swagger/",permalink:"/contrib/swagger_v1.x.x/swagger/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/swagger/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"swagger",title:"Swagger"},sidebar:"tutorialSidebar",previous:{title:"Paseto",permalink:"/contrib/swagger_v1.x.x/paseto/"},next:{title:"Websocket",permalink:"/contrib/swagger_v1.x.x/websocket/"}},l={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Examples",id:"examples",level:3},{value:"Default Config",id:"default-config",level:3},{value:"Custom Config",id:"custom-config",level:3}],c={toc:g},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=swagger*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,n.kt)("p",null,"Swagger middleware for ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),". The middleware handles Swagger UI. "),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/swagger"\n)\n')),(0,n.kt)("p",null,"Then create a Fiber app with app := fiber.New()."),(0,n.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"app.Use(swagger.New(cfg))\n")),(0,n.kt)("h3",{id:"custom-config"},"Custom Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'cfg := swagger.Config{\n BasePath: "/", //swagger ui base path\n FilePath: "./docs/swagger.json",\n}\n\napp.Use(swagger.New(cfg))\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/09fe6722.be5264e0.js b/assets/js/09fe6722.be5264e0.js new file mode 100644 index 00000000000..b3b15eb1e88 --- /dev/null +++ b/assets/js/09fe6722.be5264e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4114],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),g=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=g(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=g(r),f=n,m=p["".concat(l,".").concat(f)]||p[f]||u[f]||o;return r?a.createElement(m,i(i({ref:t},c),{},{components:r})):a.createElement(m,i({ref:t},c))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:n,i[1]=s;for(var g=2;g{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>g});var a=r(87462),n=(r(67294),r(3905));const o={id:"swagger",title:"Swagger"},i=void 0,s={unversionedId:"swagger/swagger",id:"version-swagger_v1.x.x/swagger/swagger",title:"Swagger",description:"Release",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/swagger/README.md",sourceDirName:"swagger",slug:"/swagger/",permalink:"/contrib/swagger_v1.x.x/swagger/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/swagger/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"swagger",title:"Swagger"},sidebar:"tutorialSidebar",previous:{title:"Paseto",permalink:"/contrib/swagger_v1.x.x/paseto/"},next:{title:"Websocket",permalink:"/contrib/swagger_v1.x.x/websocket/"}},l={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Examples",id:"examples",level:3},{value:"Default Config",id:"default-config",level:3},{value:"Custom Config",id:"custom-config",level:3}],c={toc:g},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=swagger*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,n.kt)("p",null,"Swagger middleware for ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),". The middleware handles Swagger UI. "),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/swagger"\n)\n')),(0,n.kt)("p",null,"Then create a Fiber app with app := fiber.New()."),(0,n.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"app.Use(swagger.New(cfg))\n")),(0,n.kt)("h3",{id:"custom-config"},"Custom Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'cfg := swagger.Config{\n BasePath: "/", //swagger ui base path\n FilePath: "./docs/swagger.json",\n}\n\napp.Use(swagger.New(cfg))\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0b4ecf95.81bbc04d.js b/assets/js/0b4ecf95.81bbc04d.js new file mode 100644 index 00000000000..c5b6eac81c3 --- /dev/null +++ b/assets/js/0b4ecf95.81bbc04d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6385],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=m(r),g=a,f=p["".concat(s,".").concat(g)]||p[g]||u[g]||o;return r?n.createElement(f,i(i({ref:t},c),{},{components:r})):n.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var m=2;m{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(87462),a=(r(67294),r(3905));const o={id:"memory",title:"Memory"},i=void 0,l={unversionedId:"memory/memory",id:"version-memcache_v1.x.x/memory/memory",title:"Memory",description:"Release",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/memory/README.md",sourceDirName:"memory",slug:"/memory/",permalink:"/storage/memcache_v1.x.x/memory/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memory/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memory",title:"Memory"},sidebar:"tutorialSidebar",previous:{title:"Memcache",permalink:"/storage/memcache_v1.x.x/memcache/"},next:{title:"MongoDB",permalink:"/storage/memcache_v1.x.x/mongodb/"}},s={},m=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:m},p="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memory*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"An in-memory storage driver."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() map[string]entry\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Memory is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the memory implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memory"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := memory.New()\n\n// Initialize custom config\nstore := memory.New(memory.Config{\n GCInterval: 10 * time.Second,\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Time before deleting expired keys\n //\n // Default is 10 * time.Second\n GCInterval time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n GCInterval: 10 * time.Second,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0b4ecf95.8e634b0b.js b/assets/js/0b4ecf95.8e634b0b.js deleted file mode 100644 index 3b69f8d52e9..00000000000 --- a/assets/js/0b4ecf95.8e634b0b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6385],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=m(r),g=a,f=p["".concat(s,".").concat(g)]||p[g]||u[g]||o;return r?n.createElement(f,i(i({ref:t},c),{},{components:r})):n.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var m=2;m{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(7462),a=(r(7294),r(3905));const o={id:"memory",title:"Memory"},i=void 0,l={unversionedId:"memory/memory",id:"version-memcache_v1.x.x/memory/memory",title:"Memory",description:"Release",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/memory/README.md",sourceDirName:"memory",slug:"/memory/",permalink:"/storage/memory/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memory/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memory",title:"Memory"},sidebar:"tutorialSidebar",previous:{title:"Memcache",permalink:"/storage/memcache/"},next:{title:"MongoDB",permalink:"/storage/mongodb/"}},s={},m=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:m},p="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memory*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"An in-memory storage driver."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() map[string]entry\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Memory is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the memory implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memory"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := memory.New()\n\n// Initialize custom config\nstore := memory.New(memory.Config{\n GCInterval: 10 * time.Second,\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Time before deleting expired keys\n //\n // Default is 10 * time.Second\n GCInterval time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n GCInterval: 10 * time.Second,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0c35ae3f.822a640c.js b/assets/js/0c35ae3f.822a640c.js new file mode 100644 index 00000000000..abad2ea17eb --- /dev/null +++ b/assets/js/0c35ae3f.822a640c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6600,7554],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>g});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),p=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(o.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),c=p(n),m=r,g=c["".concat(o,".").concat(m)]||c[m]||d[m]||i;return n?a.createElement(g,l(l({ref:t},u),{},{components:n})):a.createElement(g,l({ref:t},u))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[c]="string"==typeof e?e:r,l[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>m,frontMatter:()=>l,metadata:()=>o,toc:()=>u});var a=n(87462),r=(n(67294),n(3905)),i=n(36074);const l={id:"app",title:"\ud83d\ude80 App",description:"The app instance conventionally denotes the Fiber application.",sidebar_position:2},s=void 0,o={unversionedId:"api/app",id:"version-v2.x/api/app",title:"\ud83d\ude80 App",description:"The app instance conventionally denotes the Fiber application.",source:"@site/versioned_docs/version-v2.x/api/app.md",sourceDirName:"api",slug:"/api/app",permalink:"/api/app",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:2,frontMatter:{id:"app",title:"\ud83d\ude80 App",description:"The app instance conventionally denotes the Fiber application.",sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udce6 Fiber",permalink:"/api/fiber"},next:{title:"\ud83e\udde0 Ctx",permalink:"/api/ctx"}},p={},u=[{value:"Static",id:"static",level:2},{value:"Route Handlers",id:"route-handlers",level:2},{value:"Mount",id:"mount",level:2},{value:"MountPath",id:"mountpath",level:2},{value:"Group",id:"group",level:2},{value:"Route",id:"route",level:2},{value:"Server",id:"server",level:2},{value:"Server Shutdown",id:"server-shutdown",level:2},{value:"HandlersCount",id:"handlerscount",level:2},{value:"Stack",id:"stack",level:2},{value:"Name",id:"name",level:2},{value:"GetRoute",id:"getroute",level:2},{value:"GetRoutes",id:"getroutes",level:2},{value:"Config",id:"config",level:2},{value:"Handler",id:"handler",level:2},{value:"Listen",id:"listen",level:2},{value:"ListenTLS",id:"listentls",level:2},{value:"ListenTLSWithCertificate",id:"listentlswithcertificate",level:2},{value:"ListenMutualTLS",id:"listenmutualtls",level:2},{value:"ListenMutualTLSWithCertificate",id:"listenmutualtlswithcertificate",level:2},{value:"Listener",id:"listener",level:2},{value:"Test",id:"test",level:2},{value:"Hooks",id:"hooks",level:2}],c={toc:u},d="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"static"},"Static"),(0,r.kt)("p",null,"Use the ",(0,r.kt)("strong",{parentName:"p"},"Static")," method to serve static files such as ",(0,r.kt)("strong",{parentName:"p"},"images"),", ",(0,r.kt)("strong",{parentName:"p"},"CSS,")," and ",(0,r.kt)("strong",{parentName:"p"},"JavaScript"),"."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"By default, ",(0,r.kt)("strong",{parentName:"p"},"Static")," will serve ",(0,r.kt)("inlineCode",{parentName:"p"},"index.html")," files in response to a request on a directory.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Static(prefix, root string, config ...Static) Router\n")),(0,r.kt)("p",null,"Use the following code to serve files in a directory named ",(0,r.kt)("inlineCode",{parentName:"p"},"./public")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Static("/", "./public")\n\n// => http://localhost:3000/hello.html\n// => http://localhost:3000/js/jquery.js\n// => http://localhost:3000/css/style.css\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Serve files from multiple directories\napp.Static("/", "./public")\n\n// Serve files from "./files" directory:\napp.Static("/", "./files")\n')),(0,r.kt)("p",null,"You can use any virtual path prefix ","(",(0,r.kt)("em",{parentName:"p"},"where the path does not actually exist in the file system"),")"," for files that are served by the ",(0,r.kt)("strong",{parentName:"p"},"Static")," method, specify a prefix path for the static directory, as shown below:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'app.Static("/static", "./public")\n\n// => http://localhost:3000/static/hello.html\n// => http://localhost:3000/static/js/jquery.js\n// => http://localhost:3000/static/css/style.css\n')),(0,r.kt)("p",null,"If you want to have a little bit more control regarding the settings for serving static files. You could use the ",(0,r.kt)("inlineCode",{parentName:"p"},"fiber.Static")," struct to enable specific settings."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="fiber.Static{}"',title:'"fiber.Static{}"'},'// Static defines configuration options when defining static assets.\ntype Static struct {\n // When set to true, the server tries minimizing CPU usage by caching compressed files.\n // This works differently than the github.com/gofiber/compression middleware.\n // Optional. Default value false\n Compress bool `json:"compress"`\n\n // When set to true, enables byte range requests.\n // Optional. Default value false\n ByteRange bool `json:"byte_range"`\n\n // When set to true, enables directory browsing.\n // Optional. Default value false.\n Browse bool `json:"browse"`\n\n // When set to true, enables direct download.\n // Optional. Default value false.\n Download bool `json:"download"`\n\n // The name of the index file for serving a directory.\n // Optional. Default value "index.html".\n Index string `json:"index"`\n\n // Expiration duration for inactive file handlers.\n // Use a negative time.Duration to disable it.\n //\n // Optional. Default value 10 * time.Second.\n CacheDuration time.Duration `json:"cache_duration"`\n\n // The value for the Cache-Control HTTP-header\n // that is set on the file response. MaxAge is defined in seconds.\n //\n // Optional. Default value 0.\n MaxAge int `json:"max_age"`\n\n // ModifyResponse defines a function that allows you to alter the response.\n //\n // Optional. Default: nil\n ModifyResponse Handler\n\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *Ctx) bool\n}\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Custom config\napp.Static("/", "./public", fiber.Static{\n Compress: true,\n ByteRange: true,\n Browse: true,\n Index: "john.html",\n CacheDuration: 10 * time.Second,\n MaxAge: 3600,\n})\n')),(0,r.kt)("h2",{id:"route-handlers"},"Route Handlers"),(0,r.kt)(i.default,{mdxType:"RoutingHandler"}),(0,r.kt)("h2",{id:"mount"},"Mount"),(0,r.kt)("p",null,"You can Mount Fiber instance by creating a ",(0,r.kt)("inlineCode",{parentName:"p"},"*Mount")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *App) Mount(prefix string, app *App) Router\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'func main() {\n app := fiber.New()\n micro := fiber.New()\n app.Mount("/john", micro) // GET /john/doe -> 200 OK\n\n micro.Get("/doe", func(c *fiber.Ctx) error {\n return c.SendStatus(fiber.StatusOK)\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,r.kt)("h2",{id:"mountpath"},"MountPath"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"MountPath")," property contains one or more path patterns on which a sub-app was mounted."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) MountPath() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'func main() {\n app := fiber.New()\n one := fiber.New()\n two := fiber.New()\n three := fiber.New()\n\n two.Mount("/three", three)\n one.Mount("/two", two)\n app.Mount("/one", one)\n \n one.MountPath() // "/one"\n two.MountPath() // "/one/two"\n three.MountPath() // "/one/two/three"\n app.MountPath() // ""\n}\n')),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Mounting order is important for MountPath. If you want to get mount paths properly, you should start mounting from the deepest app.")),(0,r.kt)("h2",{id:"group"},"Group"),(0,r.kt)("p",null,"You can group routes by creating a ",(0,r.kt)("inlineCode",{parentName:"p"},"*Group")," struct."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Group(prefix string, handlers ...Handler) Router\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'func main() {\n app := fiber.New()\n\n api := app.Group("/api", handler) // /api\n\n v1 := api.Group("/v1", handler) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2", handler) // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,r.kt)("h2",{id:"route"},"Route"),(0,r.kt)("p",null,"You can define routes with a common prefix inside the common function."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Route(prefix string, fn func(router Router), name ...string) Router\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'func main() {\n app := fiber.New()\n\n app.Route("/test", func(api fiber.Router) {\n api.Get("/foo", handler).Name("foo") // /test/foo (name: test.foo)\n api.Get("/bar", handler).Name("bar") // /test/bar (name: test.bar)\n }, "test.")\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,r.kt)("h2",{id:"server"},"Server"),(0,r.kt)("p",null,"Server returns the underlying ",(0,r.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/valyala/fasthttp#Server"},"fasthttp server")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Server() *fasthttp.Server\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},"func main() {\n app := fiber.New()\n\n app.Server().MaxConnsPerIP = 1\n\n // ...\n}\n")),(0,r.kt)("h2",{id:"server-shutdown"},"Server Shutdown"),(0,r.kt)("p",null,"Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waits indefinitely for all connections to return to idle before shutting down."),(0,r.kt)("p",null,"ShutdownWithTimeout will forcefully close any active connections after the timeout expires."),(0,r.kt)("p",null,"ShutdownWithContext shuts down the server including by force if the context's deadline is exceeded."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func (app *App) Shutdown() error\nfunc (app *App) ShutdownWithTimeout(timeout time.Duration) error\nfunc (app *App) ShutdownWithContext(ctx context.Context) error\n")),(0,r.kt)("h2",{id:"handlerscount"},"HandlersCount"),(0,r.kt)("p",null,"This method returns the amount of registered handlers."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) HandlersCount() uint32\n")),(0,r.kt)("h2",{id:"stack"},"Stack"),(0,r.kt)("p",null,"This method returns the original router stack"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Stack() [][]*Route\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'var handler = func(c *fiber.Ctx) error { return nil }\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/john/:age", handler)\n app.Post("/register", handler)\n\n data, _ := json.MarshalIndent(app.Stack(), "", " ")\n fmt.Println(string(data))\n\n app.Listen(":3000")\n}\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:'title="Result"',title:'"Result"'},'[\n [\n {\n "method": "GET",\n "path": "/john/:age",\n "params": [\n "age"\n ]\n }\n ],\n [\n {\n "method": "HEAD",\n "path": "/john/:age",\n "params": [\n "age"\n ]\n }\n ],\n [\n {\n "method": "POST",\n "path": "/register",\n "params": null\n }\n ]\n]\n')),(0,r.kt)("h2",{id:"name"},"Name"),(0,r.kt)("p",null,"This method assigns the name of latest created route."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Name(name string) Router\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'var handler = func(c *fiber.Ctx) error { return nil }\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/", handler)\n app.Name("index")\n\n app.Get("/doe", handler).Name("home")\n\n app.Trace("/tracer", handler).Name("tracert")\n\n app.Delete("/delete", handler).Name("delete")\n\n a := app.Group("/a")\n a.Name("fd.")\n\n a.Get("/test", handler).Name("test")\n\n data, _ := json.MarshalIndent(app.Stack(), "", " ")\n fmt.Print(string(data))\n\n app.Listen(":3000")\n\n}\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:'title="Result"',title:'"Result"'},'[\n [\n {\n "method": "GET",\n "name": "index",\n "path": "/",\n "params": null\n },\n {\n "method": "GET",\n "name": "home",\n "path": "/doe",\n "params": null\n },\n {\n "method": "GET",\n "name": "fd.test",\n "path": "/a/test",\n "params": null\n }\n ],\n [\n {\n "method": "HEAD",\n "name": "",\n "path": "/",\n "params": null\n },\n {\n "method": "HEAD",\n "name": "",\n "path": "/doe",\n "params": null\n },\n {\n "method": "HEAD",\n "name": "",\n "path": "/a/test",\n "params": null\n }\n ],\n null,\n null,\n [\n {\n "method": "DELETE",\n "name": "delete",\n "path": "/delete",\n "params": null\n }\n ],\n null,\n null,\n [\n {\n "method": "TRACE",\n "name": "tracert",\n "path": "/tracer",\n "params": null\n }\n ],\n null\n]\n')),(0,r.kt)("h2",{id:"getroute"},"GetRoute"),(0,r.kt)("p",null,"This method gets the route by name."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) GetRoute(name string) Route\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'var handler = func(c *fiber.Ctx) error { return nil }\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/", handler).Name("index")\n \n data, _ := json.MarshalIndent(app.GetRoute("index"), "", " ")\n fmt.Print(string(data))\n\n\n app.Listen(":3000")\n\n}\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:'title="Result"',title:'"Result"'},'{\n "method": "GET",\n "name": "index",\n "path": "/",\n "params": null\n}\n')),(0,r.kt)("h2",{id:"getroutes"},"GetRoutes"),(0,r.kt)("p",null,"This method gets all routes."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) GetRoutes(filterUseOption ...bool) []Route\n")),(0,r.kt)("p",null,"When filterUseOption equal to true, it will filter the routes registered by the middleware."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'func main() {\n app := fiber.New()\n app.Post("/", func (c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n }).Name("index")\n data, _ := json.MarshalIndent(app.GetRoutes(true), "", " ")\n fmt.Print(string(data))\n}\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-javascript",metastring:'title="Result"',title:'"Result"'},'[\n {\n "method": "POST",\n "name": "index",\n "path": "/",\n "params": null\n }\n]\n')),(0,r.kt)("h2",{id:"config"},"Config"),(0,r.kt)("p",null,"Config returns the app config as value ","("," read-only ",")","."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Config() Config\n")),(0,r.kt)("h2",{id:"handler"},"Handler"),(0,r.kt)("p",null,"Handler returns the server handler that can be used to serve custom ","*","fasthttp.RequestCtx requests."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Handler() fasthttp.RequestHandler\n")),(0,r.kt)("h2",{id:"listen"},"Listen"),(0,r.kt)("p",null,"Listen serves HTTP requests from the given address."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Listen(addr string) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Listen on port :8080 \napp.Listen(":8080")\n\n// Custom host\napp.Listen("127.0.0.1:8080")\n')),(0,r.kt)("h2",{id:"listentls"},"ListenTLS"),(0,r.kt)("p",null,"ListenTLS serves HTTPs requests from the given address using certFile and keyFile paths to as TLS certificate and key file."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) ListenTLS(addr, certFile, keyFile string) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'app.ListenTLS(":443", "./cert.pem", "./cert.key");\n')),(0,r.kt)("p",null,"Using ",(0,r.kt)("inlineCode",{parentName:"p"},"ListenTLS")," defaults to the following config ","("," use ",(0,r.kt)("inlineCode",{parentName:"p"},"Listener")," to provide your own config ",")"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Default *tls.Config"',title:'"Default','*tls.Config"':!0},"&tls.Config{\n MinVersion: tls.VersionTLS12,\n Certificates: []tls.Certificate{\n cert,\n },\n}\n")),(0,r.kt)("h2",{id:"listentlswithcertificate"},"ListenTLSWithCertificate"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) ListenTLS(addr string, cert tls.Certificate) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'app.ListenTLSWithCertificate(":443", cert);\n')),(0,r.kt)("p",null,"Using ",(0,r.kt)("inlineCode",{parentName:"p"},"ListenTLSWithCertificate")," defaults to the following config ","("," use ",(0,r.kt)("inlineCode",{parentName:"p"},"Listener")," to provide your own config ",")"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Default *tls.Config"',title:'"Default','*tls.Config"':!0},"&tls.Config{\n MinVersion: tls.VersionTLS12,\n Certificates: []tls.Certificate{\n cert,\n },\n}\n")),(0,r.kt)("h2",{id:"listenmutualtls"},"ListenMutualTLS"),(0,r.kt)("p",null,"ListenMutualTLS serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) ListenMutualTLS(addr, certFile, keyFile, clientCertFile string) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'app.ListenMutualTLS(":443", "./cert.pem", "./cert.key", "./ca-chain-cert.pem");\n')),(0,r.kt)("p",null,"Using ",(0,r.kt)("inlineCode",{parentName:"p"},"ListenMutualTLS")," defaults to the following config ","("," use ",(0,r.kt)("inlineCode",{parentName:"p"},"Listener")," to provide your own config ",")"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Default *tls.Config"',title:'"Default','*tls.Config"':!0},"&tls.Config{\n MinVersion: tls.VersionTLS12,\n ClientAuth: tls.RequireAndVerifyClientCert,\n ClientCAs: clientCertPool,\n Certificates: []tls.Certificate{\n cert,\n },\n}\n")),(0,r.kt)("h2",{id:"listenmutualtlswithcertificate"},"ListenMutualTLSWithCertificate"),(0,r.kt)("p",null,"ListenMutualTLSWithCertificate serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) ListenMutualTLSWithCertificate(addr string, cert tls.Certificate, clientCertPool *x509.CertPool) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'app.ListenMutualTLSWithCertificate(":443", cert, clientCertPool);\n')),(0,r.kt)("p",null,"Using ",(0,r.kt)("inlineCode",{parentName:"p"},"ListenMutualTLSWithCertificate")," defaults to the following config ","("," use ",(0,r.kt)("inlineCode",{parentName:"p"},"Listener")," to provide your own config ",")"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Default *tls.Config"',title:'"Default','*tls.Config"':!0},"&tls.Config{\n MinVersion: tls.VersionTLS12,\n ClientAuth: tls.RequireAndVerifyClientCert,\n ClientCAs: clientCertPool,\n Certificates: []tls.Certificate{\n cert,\n },\n}\n")),(0,r.kt)("h2",{id:"listener"},"Listener"),(0,r.kt)("p",null,"You can pass your own ",(0,r.kt)("a",{parentName:"p",href:"https://pkg.go.dev/net/#Listener"},(0,r.kt)("inlineCode",{parentName:"a"},"net.Listener"))," using the ",(0,r.kt)("inlineCode",{parentName:"p"},"Listener")," method. This method can be used to enable ",(0,r.kt)("strong",{parentName:"p"},"TLS/HTTPS")," with a custom tls.Config."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Listener(ln net.Listener) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'ln, _ := net.Listen("tcp", ":3000")\n\ncer, _:= tls.LoadX509KeyPair("server.crt", "server.key")\n\nln = tls.NewListener(ln, &tls.Config{Certificates: []tls.Certificate{cer}})\n\napp.Listener(ln)\n')),(0,r.kt)("h2",{id:"test"},"Test"),(0,r.kt)("p",null,"Testing your application is done with the ",(0,r.kt)("strong",{parentName:"p"},"Test")," method. Use this method for creating ",(0,r.kt)("inlineCode",{parentName:"p"},"_test.go")," files or when you need to debug your routing logic. The default timeout is ",(0,r.kt)("inlineCode",{parentName:"p"},"1s")," if you want to disable a timeout altogether, pass ",(0,r.kt)("inlineCode",{parentName:"p"},"-1")," as a second argument."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Test(req *http.Request, msTimeout ...int) (*http.Response, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Create route with GET method for test:\napp.Get("/", func(c *fiber.Ctx) error {\n fmt.Println(c.BaseURL()) // => http://google.com\n fmt.Println(c.Get("X-Custom-Header")) // => hi\n\n return c.SendString("hello, World!")\n})\n\n// http.Request\nreq := httptest.NewRequest("GET", "http://google.com", nil)\nreq.Header.Set("X-Custom-Header", "hi")\n\n// http.Response\nresp, _ := app.Test(req)\n\n// Do something with results:\nif resp.StatusCode == fiber.StatusOK {\n body, _ := ioutil.ReadAll(resp.Body)\n fmt.Println(string(body)) // => Hello, World!\n}\n')),(0,r.kt)("h2",{id:"hooks"},"Hooks"),(0,r.kt)("p",null,"Hooks is a method to return ",(0,r.kt)("a",{parentName:"p",href:"/guide/hooks"},"hooks")," property."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Hooks() *Hooks\n")))}m.isMDXComponent=!0},36074:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const i={id:"route-handlers",title:"Route Handlers"},l=void 0,s={unversionedId:"partials/routing/route-handlers",id:"version-v2.x/partials/routing/route-handlers",title:"Route Handlers",description:"Registers a route bound to a specific HTTP method.",source:"@site/versioned_docs/version-v2.x/partials/routing/handler.md",sourceDirName:"partials/routing",slug:"/partials/routing/route-handlers",permalink:"/partials/routing/route-handlers",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"route-handlers",title:"Route Handlers"}},o={},p=[],u={toc:p},c="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(c,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Registers a route bound to a specific ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods"},"HTTP method"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signatures"',title:'"Signatures"'},"// HTTP methods\nfunc (app *App) Get(path string, handlers ...Handler) Router\nfunc (app *App) Head(path string, handlers ...Handler) Router\nfunc (app *App) Post(path string, handlers ...Handler) Router\nfunc (app *App) Put(path string, handlers ...Handler) Router\nfunc (app *App) Delete(path string, handlers ...Handler) Router\nfunc (app *App) Connect(path string, handlers ...Handler) Router\nfunc (app *App) Options(path string, handlers ...Handler) Router\nfunc (app *App) Trace(path string, handlers ...Handler) Router\nfunc (app *App) Patch(path string, handlers ...Handler) Router\n\n// Add allows you to specifiy a method as value\nfunc (app *App) Add(method, path string, handlers ...Handler) Router\n\n// All will register the route on all HTTP methods\n// Almost the same as app.Use but not bound to prefixes\nfunc (app *App) All(path string, handlers ...Handler) Router\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Simple GET handler\napp.Get("/api/list", func(c *fiber.Ctx) error {\n return c.SendString("I\'m a GET request!")\n})\n\n// Simple POST handler\napp.Post("/api/register", func(c *fiber.Ctx) error {\n return c.SendString("I\'m a POST request!")\n})\n')),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Use")," can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. ",(0,r.kt)("inlineCode",{parentName:"p"},"/john")," will match ",(0,r.kt)("inlineCode",{parentName:"p"},"/john/doe"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"/johnnnnn")," etc"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Use(args ...interface{}) Router\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Match any request\napp.Use(func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Match request starting with /api\napp.Use("/api", func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Match requests starting with /api or /home (multiple-prefix support)\napp.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Attach multiple handlers \napp.Use("/api", func(c *fiber.Ctx) error {\n c.Set("X-Custom-Header", random.String(32))\n return c.Next()\n}, func(c *fiber.Ctx) error {\n return c.Next()\n})\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0eaa9332.2cb3290a.js b/assets/js/0eaa9332.2cb3290a.js new file mode 100644 index 00000000000..8e143fa2351 --- /dev/null +++ b/assets/js/0eaa9332.2cb3290a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[323],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>b});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),c=p(n),u=a,b=c["".concat(s,".").concat(u)]||c[u]||d[u]||l;return n?r.createElement(b,i(i({ref:t},m),{},{components:n})):r.createElement(b,i({ref:t},m))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=u;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:a,i[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const l={id:"handlebars",title:"Handlebars"},i=void 0,o={unversionedId:"handlebars/handlebars",id:"version-slim_v2.x.x/handlebars/handlebars",title:"Handlebars",description:"Release",source:"@site/template_versioned_docs/version-slim_v2.x.x/handlebars/README.md",sourceDirName:"handlebars",slug:"/handlebars/",permalink:"/template/handlebars/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/handlebars/README.md",tags:[],version:"slim_v2.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"handlebars",title:"Handlebars"},sidebar:"tutorialSidebar",previous:{title:"Django",permalink:"/template/django/"},next:{title:"HTML",permalink:"/template/html/"}},s={},p=[{value:"Basic Example",id:"basic-example",level:3}],m={toc:p},c="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Handlebars is a template engine create by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aymerick/raymond"},"aymerick"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aymerick/raymond#table-of-contents"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.hbs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"{{> 'partials/header' }}\n\n

{{Title}}

\n\n{{> 'partials/footer' }}\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.hbs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Header

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.hbs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Footer

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.hbs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"\n\n\n\n Main\n\n\n\n {{embed}}\n\n\n\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n \n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/handlebars/v2"\n)\n\nfunc main() {\n // Create a new engine\n engine := handlebars.New("./views", ".hbs")\n\n // Or from an embedded system\n // See github.com/gofiber/embed for examples\n // engine := html.NewFileSystem(http.Dir("./views", ".hbs"))\n\n // Pass the engine to the Views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0eaa9332.6f0b8331.js b/assets/js/0eaa9332.6f0b8331.js deleted file mode 100644 index 74fc48df9ef..00000000000 --- a/assets/js/0eaa9332.6f0b8331.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[323],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>b});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),c=p(n),u=a,b=c["".concat(s,".").concat(u)]||c[u]||d[u]||l;return n?r.createElement(b,i(i({ref:t},m),{},{components:n})):r.createElement(b,i({ref:t},m))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=u;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:a,i[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const l={id:"handlebars",title:"Handlebars"},i=void 0,o={unversionedId:"handlebars/handlebars",id:"version-slim_v2.x.x/handlebars/handlebars",title:"Handlebars",description:"Release",source:"@site/template_versioned_docs/version-slim_v2.x.x/handlebars/README.md",sourceDirName:"handlebars",slug:"/handlebars/",permalink:"/template/handlebars/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/handlebars/README.md",tags:[],version:"slim_v2.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"handlebars",title:"Handlebars"},sidebar:"tutorialSidebar",previous:{title:"Django",permalink:"/template/django/"},next:{title:"HTML",permalink:"/template/html/"}},s={},p=[{value:"Basic Example",id:"basic-example",level:3}],m={toc:p},c="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Handlebars is a template engine create by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aymerick/raymond"},"aymerick"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aymerick/raymond#table-of-contents"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.hbs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"{{> 'partials/header' }}\n\n

{{Title}}

\n\n{{> 'partials/footer' }}\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.hbs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Header

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.hbs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Footer

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.hbs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"\n\n\n\n Main\n\n\n\n {{embed}}\n\n\n\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n \n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/handlebars/v2"\n)\n\nfunc main() {\n // Create a new engine\n engine := handlebars.New("./views", ".hbs")\n\n // Or from an embedded system\n // See github.com/gofiber/embed for examples\n // engine := html.NewFileSystem(http.Dir("./views", ".hbs"))\n\n // Pass the engine to the Views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0ed78b03.55dcae12.js b/assets/js/0ed78b03.55dcae12.js deleted file mode 100644 index e5b0cf5b830..00000000000 --- a/assets/js/0ed78b03.55dcae12.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3327],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),g=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=g(e.components);return o.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=g(n),m=r,f=p["".concat(s,".").concat(m)]||p[m]||c[m]||a;return n?o.createElement(f,i(i({ref:t},u),{},{components:n})):o.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,i[1]=l;for(var g=2;g{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>a,metadata:()=>l,toc:()=>g});var o=n(7462),r=(n(7294),n(3905));const a={id:"mongodb",title:"MongoDB"},i=void 0,l={unversionedId:"mongodb/mongodb",id:"version-sqlite3_v1.x.x/mongodb/mongodb",title:"MongoDB",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/mongodb/README.md",sourceDirName:"mongodb",slug:"/mongodb/",permalink:"/storage/sqlite3_v1.x.x/mongodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mongodb/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mongodb",title:"MongoDB"},sidebar:"tutorialSidebar",previous:{title:"Memory",permalink:"/storage/sqlite3_v1.x.x/memory/"},next:{title:"MSSQL",permalink:"/storage/sqlite3_v1.x.x/mssql/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:g},p="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mongodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MongoDB storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/mongodb/mongo-go-driver"},"mongodb/mongo-go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mongo.Database\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MongoDB is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mongodb implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mongodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mongodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mongodb.New()\n\n// Initialize custom config\nstore := mongodb.New(mongodb.Config{\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n// Initialize custom config using connection string\nstore := mongodb.New(mongodb.Config{\n ConnectionURI: "mongodb://user:password@127.0.0.1:27017",\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 27017\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0ed78b03.ef837cb2.js b/assets/js/0ed78b03.ef837cb2.js new file mode 100644 index 00000000000..c1353512fc2 --- /dev/null +++ b/assets/js/0ed78b03.ef837cb2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3327],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),g=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=g(e.components);return o.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=g(n),m=r,f=p["".concat(s,".").concat(m)]||p[m]||c[m]||a;return n?o.createElement(f,i(i({ref:t},u),{},{components:n})):o.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,i[1]=l;for(var g=2;g{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>a,metadata:()=>l,toc:()=>g});var o=n(87462),r=(n(67294),n(3905));const a={id:"mongodb",title:"MongoDB"},i=void 0,l={unversionedId:"mongodb/mongodb",id:"version-sqlite3_v1.x.x/mongodb/mongodb",title:"MongoDB",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/mongodb/README.md",sourceDirName:"mongodb",slug:"/mongodb/",permalink:"/storage/sqlite3_v1.x.x/mongodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mongodb/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mongodb",title:"MongoDB"},sidebar:"tutorialSidebar",previous:{title:"Memory",permalink:"/storage/sqlite3_v1.x.x/memory/"},next:{title:"MSSQL",permalink:"/storage/sqlite3_v1.x.x/mssql/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:g},p="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mongodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MongoDB storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/mongodb/mongo-go-driver"},"mongodb/mongo-go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mongo.Database\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MongoDB is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mongodb implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mongodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mongodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mongodb.New()\n\n// Initialize custom config\nstore := mongodb.New(mongodb.Config{\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n// Initialize custom config using connection string\nstore := mongodb.New(mongodb.Config{\n ConnectionURI: "mongodb://user:password@127.0.0.1:27017",\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 27017\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0f17a9fe.a4ab29b0.js b/assets/js/0f17a9fe.a4ab29b0.js deleted file mode 100644 index fb1aa37cb28..00000000000 --- a/assets/js/0f17a9fe.a4ab29b0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5373],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>f});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var p=n.createContext({}),u=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},s=function(e){var t=u(e.components);return n.createElement(p.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=u(r),d=i,f=c["".concat(p,".").concat(d)]||c[d]||m[d]||o;return r?n.createElement(f,a(a({ref:t},s),{},{components:r})):n.createElement(f,a({ref:t},s))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=d;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[c]="string"==typeof e?e:i,a[1]=l;for(var u=2;u{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>u});var n=r(7462),i=(r(7294),r(3905));const o={id:"timeout",title:"Timeout"},a=void 0,l={unversionedId:"api/middleware/timeout",id:"version-v2.x/api/middleware/timeout",title:"Timeout",description:"There exist two distinct implementations of timeout middleware Fiber.",source:"@site/versioned_docs/version-v2.x/api/middleware/timeout.md",sourceDirName:"api/middleware",slug:"/api/middleware/timeout",permalink:"/api/middleware/timeout",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"timeout",title:"Timeout"},sidebar:"tutorialSidebar",previous:{title:"Skip",permalink:"/api/middleware/skip"},next:{title:"Guide",permalink:"/category/guide"}},p={},u=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2}],s={toc:u},c="wrapper";function m(e){let{components:t,...r}=e;return(0,i.kt)(c,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"There exist two distinct implementations of timeout middleware ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),"."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"New")),(0,i.kt)("p",null,"Wraps a ",(0,i.kt)("inlineCode",{parentName:"p"},"fiber.Handler")," with a timeout. If the handler takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ",(0,i.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/error-handling"},"ErrorHandler"),"."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"This has been deprecated since it raises race conditions.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"NewWithContext")),(0,i.kt)("p",null,"As a ",(0,i.kt)("inlineCode",{parentName:"p"},"fiber.Handler")," wrapper, it creates a context with ",(0,i.kt)("inlineCode",{parentName:"p"},"context.WithTimeout")," and pass it in ",(0,i.kt)("inlineCode",{parentName:"p"},"UserContext"),". "),(0,i.kt)("p",null,"If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ",(0,i.kt)("inlineCode",{parentName:"p"},"ErrorHandler"),"."),(0,i.kt)("p",null,"It does not cancel long running executions. Underlying executions must handle timeout by using ",(0,i.kt)("inlineCode",{parentName:"p"},"context.Context")," parameter."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler\nfunc NewWithContext(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/timeout"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n h := func(c *fiber.Ctx) error {\n sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")\n if err := sleepWithContext(c.UserContext(), sleepTime); err != nil {\n return fmt.Errorf("%w: execution error", err)\n }\n return nil\n }\n\n app.Get("/foo/:sleepTime", timeout.New(h, 2*time.Second))\n log.Fatal(app.Listen(":3000"))\n}\n\nfunc sleepWithContext(ctx context.Context, d time.Duration) error {\n timer := time.NewTimer(d)\n\n select {\n case <-ctx.Done():\n if !timer.Stop() {\n <-timer.C\n }\n return context.DeadlineExceeded\n case <-timer.C:\n }\n return nil\n}\n')),(0,i.kt)("p",null,"Test http 200 with curl:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"curl --location -I --request GET 'http://localhost:3000/foo/1000' \n")),(0,i.kt)("p",null,"Test http 408 with curl:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"curl --location -I --request GET 'http://localhost:3000/foo/3000' \n")),(0,i.kt)("p",null,"Use with custom error:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ErrFooTimeOut = errors.New("foo context canceled")\n\nfunc main() {\n app := fiber.New()\n h := func(c *fiber.Ctx) error {\n sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")\n if err := sleepWithContextWithCustomError(c.UserContext(), sleepTime); err != nil {\n return fmt.Errorf("%w: execution error", err)\n }\n return nil\n }\n\n app.Get("/foo/:sleepTime", timeout.NewWithContext(h, 2*time.Second, ErrFooTimeOut))\n log.Fatal(app.Listen(":3000"))\n}\n\nfunc sleepWithContextWithCustomError(ctx context.Context, d time.Duration) error {\n timer := time.NewTimer(d)\n select {\n case <-ctx.Done():\n if !timer.Stop() {\n <-timer.C\n }\n return ErrFooTimeOut\n case <-timer.C:\n }\n return nil\n}\n')),(0,i.kt)("p",null,"Sample usage with a DB call:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n db, _ := gorm.Open(postgres.Open("postgres://localhost/foodb"), &gorm.Config{})\n\n handler := func(ctx *fiber.Ctx) error {\n tran := db.WithContext(ctx.UserContext()).Begin()\n \n if tran = tran.Exec("SELECT pg_sleep(50)"); tran.Error != nil {\n return tran.Error\n }\n \n if tran = tran.Commit(); tran.Error != nil {\n return tran.Error\n }\n\n return nil\n }\n\n app.Get("/foo", timeout.NewWithContext(handler, 10*time.Second))\n log.Fatal(app.Listen(":3000"))\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0f17a9fe.c72f1dfc.js b/assets/js/0f17a9fe.c72f1dfc.js new file mode 100644 index 00000000000..15e8f325b84 --- /dev/null +++ b/assets/js/0f17a9fe.c72f1dfc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5373],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>f});var n=r(67294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var p=n.createContext({}),u=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},s=function(e){var t=u(e.components);return n.createElement(p.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=u(r),d=i,f=c["".concat(p,".").concat(d)]||c[d]||m[d]||o;return r?n.createElement(f,a(a({ref:t},s),{},{components:r})):n.createElement(f,a({ref:t},s))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=d;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[c]="string"==typeof e?e:i,a[1]=l;for(var u=2;u{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>u});var n=r(87462),i=(r(67294),r(3905));const o={id:"timeout",title:"Timeout"},a=void 0,l={unversionedId:"api/middleware/timeout",id:"version-v2.x/api/middleware/timeout",title:"Timeout",description:"There exist two distinct implementations of timeout middleware Fiber.",source:"@site/versioned_docs/version-v2.x/api/middleware/timeout.md",sourceDirName:"api/middleware",slug:"/api/middleware/timeout",permalink:"/api/middleware/timeout",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"timeout",title:"Timeout"},sidebar:"tutorialSidebar",previous:{title:"Skip",permalink:"/api/middleware/skip"},next:{title:"Guide",permalink:"/category/guide"}},p={},u=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2}],s={toc:u},c="wrapper";function m(e){let{components:t,...r}=e;return(0,i.kt)(c,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"There exist two distinct implementations of timeout middleware ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),"."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"New")),(0,i.kt)("p",null,"Wraps a ",(0,i.kt)("inlineCode",{parentName:"p"},"fiber.Handler")," with a timeout. If the handler takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ",(0,i.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/error-handling"},"ErrorHandler"),"."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"This has been deprecated since it raises race conditions.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"NewWithContext")),(0,i.kt)("p",null,"As a ",(0,i.kt)("inlineCode",{parentName:"p"},"fiber.Handler")," wrapper, it creates a context with ",(0,i.kt)("inlineCode",{parentName:"p"},"context.WithTimeout")," and pass it in ",(0,i.kt)("inlineCode",{parentName:"p"},"UserContext"),". "),(0,i.kt)("p",null,"If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ",(0,i.kt)("inlineCode",{parentName:"p"},"ErrorHandler"),"."),(0,i.kt)("p",null,"It does not cancel long running executions. Underlying executions must handle timeout by using ",(0,i.kt)("inlineCode",{parentName:"p"},"context.Context")," parameter."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler\nfunc NewWithContext(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/timeout"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n h := func(c *fiber.Ctx) error {\n sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")\n if err := sleepWithContext(c.UserContext(), sleepTime); err != nil {\n return fmt.Errorf("%w: execution error", err)\n }\n return nil\n }\n\n app.Get("/foo/:sleepTime", timeout.New(h, 2*time.Second))\n log.Fatal(app.Listen(":3000"))\n}\n\nfunc sleepWithContext(ctx context.Context, d time.Duration) error {\n timer := time.NewTimer(d)\n\n select {\n case <-ctx.Done():\n if !timer.Stop() {\n <-timer.C\n }\n return context.DeadlineExceeded\n case <-timer.C:\n }\n return nil\n}\n')),(0,i.kt)("p",null,"Test http 200 with curl:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"curl --location -I --request GET 'http://localhost:3000/foo/1000' \n")),(0,i.kt)("p",null,"Test http 408 with curl:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"curl --location -I --request GET 'http://localhost:3000/foo/3000' \n")),(0,i.kt)("p",null,"Use with custom error:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ErrFooTimeOut = errors.New("foo context canceled")\n\nfunc main() {\n app := fiber.New()\n h := func(c *fiber.Ctx) error {\n sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")\n if err := sleepWithContextWithCustomError(c.UserContext(), sleepTime); err != nil {\n return fmt.Errorf("%w: execution error", err)\n }\n return nil\n }\n\n app.Get("/foo/:sleepTime", timeout.NewWithContext(h, 2*time.Second, ErrFooTimeOut))\n log.Fatal(app.Listen(":3000"))\n}\n\nfunc sleepWithContextWithCustomError(ctx context.Context, d time.Duration) error {\n timer := time.NewTimer(d)\n select {\n case <-ctx.Done():\n if !timer.Stop() {\n <-timer.C\n }\n return ErrFooTimeOut\n case <-timer.C:\n }\n return nil\n}\n')),(0,i.kt)("p",null,"Sample usage with a DB call:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n db, _ := gorm.Open(postgres.Open("postgres://localhost/foodb"), &gorm.Config{})\n\n handler := func(ctx *fiber.Ctx) error {\n tran := db.WithContext(ctx.UserContext()).Begin()\n \n if tran = tran.Exec("SELECT pg_sleep(50)"); tran.Error != nil {\n return tran.Error\n }\n \n if tran = tran.Commit(); tran.Error != nil {\n return tran.Error\n }\n\n return nil\n }\n\n app.Get("/foo", timeout.NewWithContext(handler, 10*time.Second))\n log.Fatal(app.Listen(":3000"))\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0faeb6cb.ac01fd04.js b/assets/js/0faeb6cb.ac01fd04.js deleted file mode 100644 index db460bca2ea..00000000000 --- a/assets/js/0faeb6cb.ac01fd04.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9908],{4142:e=>{e.exports=JSON.parse('{"title":"Guide","description":"Guides for Fiber.","slug":"/category/guide","permalink":"/v1.x/category/guide","navigation":{"previous":{"title":"\ud83e\uddec Middleware","permalink":"/v1.x/api/middleware"},"next":{"title":"\ud83d\udd0c Routing","permalink":"/v1.x/guide/routing"}}}')}}]); \ No newline at end of file diff --git a/assets/js/0faeb6cb.bc6553ab.js b/assets/js/0faeb6cb.bc6553ab.js new file mode 100644 index 00000000000..8383158858d --- /dev/null +++ b/assets/js/0faeb6cb.bc6553ab.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9908],{84142:e=>{e.exports=JSON.parse('{"title":"Guide","description":"Guides for Fiber.","slug":"/category/guide","permalink":"/v1.x/category/guide","navigation":{"previous":{"title":"\ud83e\uddec Middleware","permalink":"/v1.x/api/middleware"},"next":{"title":"\ud83d\udd0c Routing","permalink":"/v1.x/guide/routing"}}}')}}]); \ No newline at end of file diff --git a/assets/js/0fb7e018.79cb1452.js b/assets/js/0fb7e018.79cb1452.js deleted file mode 100644 index 09acbf34b81..00000000000 --- a/assets/js/0fb7e018.79cb1452.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8781],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>d});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),m=p(n),h=a,d=m["".concat(s,".").concat(h)]||m[h]||u[h]||i;return n?r.createElement(d,l(l({ref:t},c),{},{components:n})):r.createElement(d,l({ref:t},c))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=h;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[m]="string"==typeof e?e:a,l[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const i={id:"mustache",title:"Mustache"},l=void 0,o={unversionedId:"mustache/mustache",id:"mustache/mustache",title:"Mustache",description:"Release",source:"@site/docs/template/mustache/README.md",sourceDirName:"mustache",slug:"/mustache/",permalink:"/template/next/mustache/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/mustache/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mustache",title:"Mustache"},sidebar:"tutorialSidebar",previous:{title:"Jet",permalink:"/template/next/jet/"},next:{title:"Pug",permalink:"/template/next/pug/"}},s={},p=[{value:"Basic Example",id:"basic-example",level:3}],c={toc:p},m="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Mustache is a template engine created by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cbroglie/mustache"},"hoisie/cbroglie"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://mustache.github.io/mustache.5.html"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"{{> views/partials/header }}\n\n

{{Title}}

\n\n{{> views/partials/footer }}\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Header

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Footer

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"\n\n\n\n Main\n\n\n\n {{{embed}}}\n\n\n\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n \n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/mustache/v2"\n)\n\nfunc main() {\n // Create a new engine\n engine := mustache.New("./views", ".mustache")\n\n // Or from an embedded system\n // Note that with an embedded system the partials included from template files must be\n // specified relative to the filesystem\'s root, not the current working directory\n // engine := mustache.NewFileSystem(http.Dir("./views", ".mustache"), ".mustache")\n\n // Pass the engine to the Views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0fb7e018.f43d6d01.js b/assets/js/0fb7e018.f43d6d01.js new file mode 100644 index 00000000000..7a5e8246ff2 --- /dev/null +++ b/assets/js/0fb7e018.f43d6d01.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8781],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),m=p(n),h=a,d=m["".concat(s,".").concat(h)]||m[h]||u[h]||i;return n?r.createElement(d,l(l({ref:t},c),{},{components:n})):r.createElement(d,l({ref:t},c))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=h;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[m]="string"==typeof e?e:a,l[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const i={id:"mustache",title:"Mustache"},l=void 0,o={unversionedId:"mustache/mustache",id:"mustache/mustache",title:"Mustache",description:"Release",source:"@site/docs/template/mustache/README.md",sourceDirName:"mustache",slug:"/mustache/",permalink:"/template/next/mustache/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/mustache/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mustache",title:"Mustache"},sidebar:"tutorialSidebar",previous:{title:"Jet",permalink:"/template/next/jet/"},next:{title:"Pug",permalink:"/template/next/pug/"}},s={},p=[{value:"Basic Example",id:"basic-example",level:3}],c={toc:p},m="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Mustache is a template engine created by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cbroglie/mustache"},"hoisie/cbroglie"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://mustache.github.io/mustache.5.html"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"{{> views/partials/header }}\n\n

{{Title}}

\n\n{{> views/partials/footer }}\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Header

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Footer

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.mustache"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"\n\n\n\n Main\n\n\n\n {{{embed}}}\n\n\n\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n \n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/mustache/v2"\n)\n\nfunc main() {\n // Create a new engine\n engine := mustache.New("./views", ".mustache")\n\n // Or from an embedded system\n // Note that with an embedded system the partials included from template files must be\n // specified relative to the filesystem\'s root, not the current working directory\n // engine := mustache.NewFileSystem(http.Dir("./views", ".mustache"), ".mustache")\n\n // Pass the engine to the Views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/105f1242.5fe7245c.js b/assets/js/105f1242.5fe7245c.js deleted file mode 100644 index 25becdee81e..00000000000 --- a/assets/js/105f1242.5fe7245c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[509],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),u=s(r),f=a,m=u["".concat(l,".").concat(f)]||u[f]||d[f]||i;return r?n.createElement(m,o(o({ref:t},c),{},{components:r})):n.createElement(m,o({ref:t},c))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[u]="string"==typeof e?e:a,o[1]=p;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>p,toc:()=>s});var n=r(7462),a=(r(7294),r(3905));const i={id:"skip",title:"Skip"},o=void 0,p={unversionedId:"api/middleware/skip",id:"version-v2.x/api/middleware/skip",title:"Skip",description:"Skip middleware for Fiber that skips a wrapped handler if a predicate is true.",source:"@site/versioned_docs/version-v2.x/api/middleware/skip.md",sourceDirName:"api/middleware",slug:"/api/middleware/skip",permalink:"/api/middleware/skip",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"skip",title:"Skip"},sidebar:"tutorialSidebar",previous:{title:"Session",permalink:"/api/middleware/session"},next:{title:"Timeout",permalink:"/api/middleware/timeout"}},l={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2}],c={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Skip middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that skips a wrapped handler if a predicate is true."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/skip"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool {\n return ctx.Method() == fiber.MethodGet\n }))\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendString("It was a GET request!")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\nfunc BasicHandler(ctx *fiber.Ctx) error {\n return ctx.SendString("It was not a GET request!")\n}\n')),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/105f1242.b0639fad.js b/assets/js/105f1242.b0639fad.js new file mode 100644 index 00000000000..08bd1637ba0 --- /dev/null +++ b/assets/js/105f1242.b0639fad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[509],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),u=s(r),f=a,m=u["".concat(l,".").concat(f)]||u[f]||d[f]||i;return r?n.createElement(m,o(o({ref:t},c),{},{components:r})):n.createElement(m,o({ref:t},c))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[u]="string"==typeof e?e:a,o[1]=p;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>p,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));const i={id:"skip",title:"Skip"},o=void 0,p={unversionedId:"api/middleware/skip",id:"version-v2.x/api/middleware/skip",title:"Skip",description:"Skip middleware for Fiber that skips a wrapped handler if a predicate is true.",source:"@site/versioned_docs/version-v2.x/api/middleware/skip.md",sourceDirName:"api/middleware",slug:"/api/middleware/skip",permalink:"/api/middleware/skip",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"skip",title:"Skip"},sidebar:"tutorialSidebar",previous:{title:"Session",permalink:"/api/middleware/session"},next:{title:"Timeout",permalink:"/api/middleware/timeout"}},l={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2}],c={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Skip middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that skips a wrapped handler if a predicate is true."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/skip"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool {\n return ctx.Method() == fiber.MethodGet\n }))\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendString("It was a GET request!")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\nfunc BasicHandler(ctx *fiber.Ctx) error {\n return ctx.SendString("It was not a GET request!")\n}\n')),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/117bedbe.46bf307a.js b/assets/js/117bedbe.46bf307a.js new file mode 100644 index 00000000000..9e9f1ea18a2 --- /dev/null +++ b/assets/js/117bedbe.46bf307a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5736],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>c});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),d=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},g=function(e){var t=d(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),p=d(n),f=i,c=p["".concat(l,".").concat(f)]||p[f]||u[f]||a;return n?r.createElement(c,s(s({ref:t},g),{},{components:n})):r.createElement(c,s({ref:t},g))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,s=new Array(a);s[0]=f;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[p]="string"==typeof e?e:i,s[1]=o;for(var d=2;d{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var r=n(87462),i=(n(67294),n(3905));const a={id:"redis",title:"Redis"},s=void 0,o={unversionedId:"redis/redis",id:"version-mysql_v1.x.x/redis/redis",title:"Redis",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/redis/README.md",sourceDirName:"redis",slug:"/redis/",permalink:"/storage/mysql_v1.x.x/redis/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/redis/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"redis",title:"Redis"},sidebar:"tutorialSidebar",previous:{title:"Postgres",permalink:"/storage/mysql_v1.x.x/postgres/"},next:{title:"Ristretto",permalink:"/storage/mysql_v1.x.x/ristretto/"}},l={},d=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=redis*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?label=Tests",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,i.kt)("p",null,"A Redis storage driver using ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-redis/redis"},"go-redis/redis"),"."),(0,i.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() redis.UniversalClient\n")),(0,i.kt)("h3",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Redis is tested on the 2 last ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,i.kt)("p",null,"And then install the redis implementation:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/redis/v2\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the storage package."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/redis/v2"\n')),(0,i.kt)("p",null,"You can use the one of the following options to create a Redis Storage:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := redis.New()\n\n// Initialize custom config\nstore := redis.New(redis.Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n})\n\n// Initialize Redis Failover Client\nstore := redis.New(redis.Config{\n MasterName: "master-name",\n Addrs: []string{":6379"},\n})\n\n// Initialize Redis Cluster Client\nstore := redis.New(redis.Config{\n Addrs: []string{":6379", ":6380"},\n})\n\n// Create a client with support for TLS\ncer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")\nif err != nil {\n log.Println(err)\n return\n}\ntlsCfg := &tls.Config{\n MinVersion: tls.VersionTLS12,\n InsecureSkipVerify: true,\n Certificates: []tls.Certificate{cer},\n}\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n TLSConfig: tlsCfg,\n Reset: false,\n})\n\n// Create a client with a Redis URL with all information.\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n Reset: false,\n})\n')),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 6379\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database to be selected after connecting to the server.\n //\n // Optional. Default is 0\n Database int\n\n // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.\n //\n // Example: redis://:@localhost:6379/\n // Optional. Default is ""\n URL string\n\n // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient\n //\n // Optional. Default is []string{}\n Addrs []string\n\n // MasterName is the sentinel master\'s name\n //\n // Optional. Default is ""\n MasterName string\n\n // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.\n //\n // Optional. Default is ""\n ClientName string\n\n // SentinelUsername\n //\n // Optional. Default is ""\n SentinelUsername string\n\n // SentinelPassword\n //\n // Optional. Default is ""\n SentinelPassword string\n\n // Reset clears any existing keys in existing Collection\n //\n // Optional. Default is false\n Reset bool\n\n // TLS Config to use. When set TLS will be negotiated.\n //\n // Optional. Default is nil\n TLSConfig *tls.Config\n\n // Maximum number of socket connections.\n //\n // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.\n PoolSize int\n}\n')),(0,i.kt)("h3",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n URL: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n Addrs: []string{},\n MasterName: "",\n ClientName: "",\n SentinelUsername: "",\n SentinelPassword: "",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/117bedbe.e5d9cdb0.js b/assets/js/117bedbe.e5d9cdb0.js deleted file mode 100644 index 7b05e819502..00000000000 --- a/assets/js/117bedbe.e5d9cdb0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5736],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>c});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),d=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},g=function(e){var t=d(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),p=d(n),f=i,c=p["".concat(l,".").concat(f)]||p[f]||u[f]||a;return n?r.createElement(c,s(s({ref:t},g),{},{components:n})):r.createElement(c,s({ref:t},g))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,s=new Array(a);s[0]=f;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[p]="string"==typeof e?e:i,s[1]=o;for(var d=2;d{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var r=n(7462),i=(n(7294),n(3905));const a={id:"redis",title:"Redis"},s=void 0,o={unversionedId:"redis/redis",id:"version-mysql_v1.x.x/redis/redis",title:"Redis",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/redis/README.md",sourceDirName:"redis",slug:"/redis/",permalink:"/storage/mysql_v1.x.x/redis/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/redis/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"redis",title:"Redis"},sidebar:"tutorialSidebar",previous:{title:"Postgres",permalink:"/storage/mysql_v1.x.x/postgres/"},next:{title:"Ristretto",permalink:"/storage/mysql_v1.x.x/ristretto/"}},l={},d=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=redis*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?label=Tests",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,i.kt)("p",null,"A Redis storage driver using ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-redis/redis"},"go-redis/redis"),"."),(0,i.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() redis.UniversalClient\n")),(0,i.kt)("h3",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Redis is tested on the 2 last ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,i.kt)("p",null,"And then install the redis implementation:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/redis/v2\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the storage package."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/redis/v2"\n')),(0,i.kt)("p",null,"You can use the one of the following options to create a Redis Storage:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := redis.New()\n\n// Initialize custom config\nstore := redis.New(redis.Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n})\n\n// Initialize Redis Failover Client\nstore := redis.New(redis.Config{\n MasterName: "master-name",\n Addrs: []string{":6379"},\n})\n\n// Initialize Redis Cluster Client\nstore := redis.New(redis.Config{\n Addrs: []string{":6379", ":6380"},\n})\n\n// Create a client with support for TLS\ncer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")\nif err != nil {\n log.Println(err)\n return\n}\ntlsCfg := &tls.Config{\n MinVersion: tls.VersionTLS12,\n InsecureSkipVerify: true,\n Certificates: []tls.Certificate{cer},\n}\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n TLSConfig: tlsCfg,\n Reset: false,\n})\n\n// Create a client with a Redis URL with all information.\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n Reset: false,\n})\n')),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 6379\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database to be selected after connecting to the server.\n //\n // Optional. Default is 0\n Database int\n\n // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.\n //\n // Example: redis://:@localhost:6379/\n // Optional. Default is ""\n URL string\n\n // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient\n //\n // Optional. Default is []string{}\n Addrs []string\n\n // MasterName is the sentinel master\'s name\n //\n // Optional. Default is ""\n MasterName string\n\n // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.\n //\n // Optional. Default is ""\n ClientName string\n\n // SentinelUsername\n //\n // Optional. Default is ""\n SentinelUsername string\n\n // SentinelPassword\n //\n // Optional. Default is ""\n SentinelPassword string\n\n // Reset clears any existing keys in existing Collection\n //\n // Optional. Default is false\n Reset bool\n\n // TLS Config to use. When set TLS will be negotiated.\n //\n // Optional. Default is nil\n TLSConfig *tls.Config\n\n // Maximum number of socket connections.\n //\n // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.\n PoolSize int\n}\n')),(0,i.kt)("h3",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n URL: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n Addrs: []string{},\n MasterName: "",\n ClientName: "",\n SentinelUsername: "",\n SentinelPassword: "",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/11ab8220.1528de5f.js b/assets/js/11ab8220.1528de5f.js deleted file mode 100644 index fde05f3c10c..00000000000 --- a/assets/js/11ab8220.1528de5f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6763],{3905:(e,r,t)=>{t.d(r,{Zo:()=>f,kt:()=>m});var n=t(7294);function i(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=n.createContext({}),p=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):a(a({},r),e)),t},f=function(e){var r=p(e.components);return n.createElement(l.Provider,{value:r},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,f=s(e,["components","mdxType","originalType","parentName"]),u=p(t),d=i,m=u["".concat(l,".").concat(d)]||u[d]||c[d]||o;return t?n.createElement(m,a(a({ref:r},f),{},{components:t})):n.createElement(m,a({ref:r},f))}));function m(e,r){var t=arguments,i=r&&r.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var s={};for(var l in r)hasOwnProperty.call(r,l)&&(s[l]=r[l]);s.originalType=e,s[u]="string"==typeof e?e:i,a[1]=s;for(var p=2;p{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>a,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var n=t(7462),i=(t(7294),t(3905));const o={id:"proxy",title:"Proxy"},a=void 0,s={unversionedId:"api/middleware/proxy",id:"api/middleware/proxy",title:"Proxy",description:"Proxy middleware for Fiber that allows you to proxy requests to multiple servers.",source:"@site/docs/core/api/middleware/proxy.md",sourceDirName:"api/middleware",slug:"/api/middleware/proxy",permalink:"/next/api/middleware/proxy",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/proxy.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"proxy",title:"Proxy"},sidebar:"tutorialSidebar",previous:{title:"Pprof",permalink:"/next/api/middleware/pprof"},next:{title:"Recover",permalink:"/next/api/middleware/recover"}},l={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],f={toc:p},u="wrapper";function c(e){let{components:r,...t}=e;return(0,i.kt)(u,(0,n.Z)({},f,t,{components:r,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Proxy middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that allows you to proxy requests to multiple servers."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"// Balancer create a load balancer among multiple upstrem servers.\nfunc Balancer(config Config) fiber.Handler\n// Forward performs the given http request and fills the given http response.\nfunc Forward(addr string, clients ...*fasthttp.Client) fiber.Handler\n// Do performs the given http request and fills the given http response.\nfunc Do(c *fiber.Ctx, addr string, clients ...*fasthttp.Client) error\n// DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects.\nfunc DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error\n// DoDeadline performs the given request and waits for response until the given deadline.\nfunc DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error\n// DoTimeout performs the given request and waits for response during the given timeout duration.\nfunc DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error\n// DomainForward the given http request based on the given domain and fills the given http response\nfunc DomainForward(hostname string, addr string, clients ...*fasthttp.Client) fiber.Handler\n// BalancerForward performs the given http request based round robin balancer and fills the given http response\nfunc BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/proxy"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// if target https site uses a self-signed certificate, you should\n// call WithTlsConfig before Do and Forward\nproxy.WithTlsConfig(&tls.Config{\n InsecureSkipVerify: true,\n})\n// if you need to use global self-custom client, you should use proxy.WithClient.\nproxy.WithClient(&fasthttp.Client{\n NoDefaultUserAgentHeader: true, \n DisablePathNormalizing: true,\n})\n\n// Forward to url\napp.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif"))\n\n// If you want to forward with a specific domain. You have to use proxy.DomainForward.\napp.Get("/payments", proxy.DomainForward("docs.gofiber.io", "http://localhost:8000"))\n\n// Forward to url with local custom client\napp.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif", &fasthttp.Client{\n NoDefaultUserAgentHeader: true, \n DisablePathNormalizing: true,\n}))\n\n// Make request within handler\napp.Get("/:id", func(c *fiber.Ctx) error {\n url := "https://i.imgur.com/"+c.Params("id")+".gif"\n if err := proxy.Do(c, url); err != nil {\n return err\n }\n // Remove Server header from response\n c.Response().Header.Del(fiber.HeaderServer)\n return nil\n})\n\n// Make proxy requests while following redirects\napp.Get("/proxy", func(c *fiber.Ctx) error {\n if err := proxy.DoRedirects(c, "http://google.com", 3); err != nil {\n return err\n }\n // Remove Server header from response\n c.Response().Header.Del(fiber.HeaderServer)\n return nil\n})\n\n// Make proxy requests and wait up to 5 seconds before timing out\napp.Get("/proxy", func(c *fiber.Ctx) error {\n if err := proxy.DoTimeout(c, "http://localhost:3000", time.Second * 5); err != nil {\n return err\n }\n // Remove Server header from response\n c.Response().Header.Del(fiber.HeaderServer)\n return nil\n})\n\n// Make proxy requests, timeout a minute from now\napp.Get("/proxy", func(c *fiber.Ctx) error {\n if err := proxy.DoDeadline(c, "http://localhost", time.Now().Add(time.Minute)); err != nil {\n return err\n }\n // Remove Server header from response\n c.Response().Header.Del(fiber.HeaderServer)\n return nil\n})\n\n// Minimal round robin balancer\napp.Use(proxy.Balancer(proxy.Config{\n Servers: []string{\n "http://localhost:3001",\n "http://localhost:3002",\n "http://localhost:3003",\n },\n}))\n\n// Or extend your balancer for customization\napp.Use(proxy.Balancer(proxy.Config{\n Servers: []string{\n "http://localhost:3001",\n "http://localhost:3002",\n "http://localhost:3003",\n },\n ModifyRequest: func(c *fiber.Ctx) error {\n c.Request().Header.Add("X-Real-IP", c.IP())\n return nil\n },\n ModifyResponse: func(c *fiber.Ctx) error {\n c.Response().Header.Del(fiber.HeaderServer)\n return nil\n },\n}))\n\n// Or this way if the balancer is using https and the destination server is only using http.\napp.Use(proxy.BalancerForward([]string{\n "http://localhost:3001",\n "http://localhost:3002",\n "http://localhost:3003",\n}))\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Servers defines a list of :// HTTP servers,\n //\n // which are used in a round-robin manner.\n // i.e.: \"https://foobar.com, http://www.foobar.com\"\n //\n // Required\n Servers []string\n\n // ModifyRequest allows you to alter the request\n //\n // Optional. Default: nil\n ModifyRequest fiber.Handler\n\n // ModifyResponse allows you to alter the response\n //\n // Optional. Default: nil\n ModifyResponse fiber.Handler\n \n // Timeout is the request timeout used when calling the proxy client\n //\n // Optional. Default: 1 second\n Timeout time.Duration\n\n // Per-connection buffer size for requests' reading.\n // This also limits the maximum header size.\n // Increase this buffer if your clients send multi-KB RequestURIs\n // and/or multi-KB headers (for example, BIG cookies).\n ReadBufferSize int\n \n // Per-connection buffer size for responses' writing.\n WriteBufferSize int\n\n // tls config for the http client.\n TlsConfig *tls.Config \n \n // Client is custom client when client config is complex. \n // Note that Servers, Timeout, WriteBufferSize, ReadBufferSize and TlsConfig \n // will not be used if the client are set.\n Client *fasthttp.LBClient\n}\n")),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n ModifyRequest: nil,\n ModifyResponse: nil,\n Timeout: fasthttp.DefaultLBClientTimeout,\n}\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/11ab8220.975ed907.js b/assets/js/11ab8220.975ed907.js new file mode 100644 index 00000000000..894543c788f --- /dev/null +++ b/assets/js/11ab8220.975ed907.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6763],{3905:(e,r,t)=>{t.d(r,{Zo:()=>f,kt:()=>m});var n=t(67294);function i(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=n.createContext({}),p=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):a(a({},r),e)),t},f=function(e){var r=p(e.components);return n.createElement(l.Provider,{value:r},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},d=n.forwardRef((function(e,r){var t=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,f=s(e,["components","mdxType","originalType","parentName"]),u=p(t),d=i,m=u["".concat(l,".").concat(d)]||u[d]||c[d]||o;return t?n.createElement(m,a(a({ref:r},f),{},{components:t})):n.createElement(m,a({ref:r},f))}));function m(e,r){var t=arguments,i=r&&r.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var s={};for(var l in r)hasOwnProperty.call(r,l)&&(s[l]=r[l]);s.originalType=e,s[u]="string"==typeof e?e:i,a[1]=s;for(var p=2;p{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>a,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var n=t(87462),i=(t(67294),t(3905));const o={id:"proxy",title:"Proxy"},a=void 0,s={unversionedId:"api/middleware/proxy",id:"api/middleware/proxy",title:"Proxy",description:"Proxy middleware for Fiber that allows you to proxy requests to multiple servers.",source:"@site/docs/core/api/middleware/proxy.md",sourceDirName:"api/middleware",slug:"/api/middleware/proxy",permalink:"/next/api/middleware/proxy",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/proxy.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"proxy",title:"Proxy"},sidebar:"tutorialSidebar",previous:{title:"Pprof",permalink:"/next/api/middleware/pprof"},next:{title:"Recover",permalink:"/next/api/middleware/recover"}},l={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],f={toc:p},u="wrapper";function c(e){let{components:r,...t}=e;return(0,i.kt)(u,(0,n.Z)({},f,t,{components:r,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Proxy middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that allows you to proxy requests to multiple servers."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"// Balancer create a load balancer among multiple upstrem servers.\nfunc Balancer(config Config) fiber.Handler\n// Forward performs the given http request and fills the given http response.\nfunc Forward(addr string, clients ...*fasthttp.Client) fiber.Handler\n// Do performs the given http request and fills the given http response.\nfunc Do(c *fiber.Ctx, addr string, clients ...*fasthttp.Client) error\n// DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects.\nfunc DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error\n// DoDeadline performs the given request and waits for response until the given deadline.\nfunc DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error\n// DoTimeout performs the given request and waits for response during the given timeout duration.\nfunc DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error\n// DomainForward the given http request based on the given domain and fills the given http response\nfunc DomainForward(hostname string, addr string, clients ...*fasthttp.Client) fiber.Handler\n// BalancerForward performs the given http request based round robin balancer and fills the given http response\nfunc BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/proxy"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// if target https site uses a self-signed certificate, you should\n// call WithTlsConfig before Do and Forward\nproxy.WithTlsConfig(&tls.Config{\n InsecureSkipVerify: true,\n})\n// if you need to use global self-custom client, you should use proxy.WithClient.\nproxy.WithClient(&fasthttp.Client{\n NoDefaultUserAgentHeader: true, \n DisablePathNormalizing: true,\n})\n\n// Forward to url\napp.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif"))\n\n// If you want to forward with a specific domain. You have to use proxy.DomainForward.\napp.Get("/payments", proxy.DomainForward("docs.gofiber.io", "http://localhost:8000"))\n\n// Forward to url with local custom client\napp.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif", &fasthttp.Client{\n NoDefaultUserAgentHeader: true, \n DisablePathNormalizing: true,\n}))\n\n// Make request within handler\napp.Get("/:id", func(c *fiber.Ctx) error {\n url := "https://i.imgur.com/"+c.Params("id")+".gif"\n if err := proxy.Do(c, url); err != nil {\n return err\n }\n // Remove Server header from response\n c.Response().Header.Del(fiber.HeaderServer)\n return nil\n})\n\n// Make proxy requests while following redirects\napp.Get("/proxy", func(c *fiber.Ctx) error {\n if err := proxy.DoRedirects(c, "http://google.com", 3); err != nil {\n return err\n }\n // Remove Server header from response\n c.Response().Header.Del(fiber.HeaderServer)\n return nil\n})\n\n// Make proxy requests and wait up to 5 seconds before timing out\napp.Get("/proxy", func(c *fiber.Ctx) error {\n if err := proxy.DoTimeout(c, "http://localhost:3000", time.Second * 5); err != nil {\n return err\n }\n // Remove Server header from response\n c.Response().Header.Del(fiber.HeaderServer)\n return nil\n})\n\n// Make proxy requests, timeout a minute from now\napp.Get("/proxy", func(c *fiber.Ctx) error {\n if err := proxy.DoDeadline(c, "http://localhost", time.Now().Add(time.Minute)); err != nil {\n return err\n }\n // Remove Server header from response\n c.Response().Header.Del(fiber.HeaderServer)\n return nil\n})\n\n// Minimal round robin balancer\napp.Use(proxy.Balancer(proxy.Config{\n Servers: []string{\n "http://localhost:3001",\n "http://localhost:3002",\n "http://localhost:3003",\n },\n}))\n\n// Or extend your balancer for customization\napp.Use(proxy.Balancer(proxy.Config{\n Servers: []string{\n "http://localhost:3001",\n "http://localhost:3002",\n "http://localhost:3003",\n },\n ModifyRequest: func(c *fiber.Ctx) error {\n c.Request().Header.Add("X-Real-IP", c.IP())\n return nil\n },\n ModifyResponse: func(c *fiber.Ctx) error {\n c.Response().Header.Del(fiber.HeaderServer)\n return nil\n },\n}))\n\n// Or this way if the balancer is using https and the destination server is only using http.\napp.Use(proxy.BalancerForward([]string{\n "http://localhost:3001",\n "http://localhost:3002",\n "http://localhost:3003",\n}))\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Servers defines a list of :// HTTP servers,\n //\n // which are used in a round-robin manner.\n // i.e.: \"https://foobar.com, http://www.foobar.com\"\n //\n // Required\n Servers []string\n\n // ModifyRequest allows you to alter the request\n //\n // Optional. Default: nil\n ModifyRequest fiber.Handler\n\n // ModifyResponse allows you to alter the response\n //\n // Optional. Default: nil\n ModifyResponse fiber.Handler\n \n // Timeout is the request timeout used when calling the proxy client\n //\n // Optional. Default: 1 second\n Timeout time.Duration\n\n // Per-connection buffer size for requests' reading.\n // This also limits the maximum header size.\n // Increase this buffer if your clients send multi-KB RequestURIs\n // and/or multi-KB headers (for example, BIG cookies).\n ReadBufferSize int\n \n // Per-connection buffer size for responses' writing.\n WriteBufferSize int\n\n // tls config for the http client.\n TlsConfig *tls.Config \n \n // Client is custom client when client config is complex. \n // Note that Servers, Timeout, WriteBufferSize, ReadBufferSize and TlsConfig \n // will not be used if the client are set.\n Client *fasthttp.LBClient\n}\n")),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n ModifyRequest: nil,\n ModifyResponse: nil,\n Timeout: fasthttp.DefaultLBClientTimeout,\n}\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/12c533ea.11b0dd54.js b/assets/js/12c533ea.11b0dd54.js deleted file mode 100644 index 894e0d64f5e..00000000000 --- a/assets/js/12c533ea.11b0dd54.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3557],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>c});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),g=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=g(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=g(a),f=n,c=u["".concat(s,".").concat(f)]||u[f]||d[f]||o;return a?r.createElement(c,i(i({ref:t},p),{},{components:a})):r.createElement(c,i({ref:t},p))}));function c(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:n,i[1]=l;for(var g=2;g{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var r=a(7462),n=(a(7294),a(3905));const o={id:"badger",title:"Badger"},i=void 0,l={unversionedId:"badger/badger",id:"version-mysql_v1.x.x/badger/badger",title:"Badger",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/badger/README.md",sourceDirName:"badger",slug:"/badger/",permalink:"/storage/mysql_v1.x.x/badger/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/badger/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"badger",title:"Badger"},sidebar:"tutorialSidebar",previous:{title:"Azure Blob",permalink:"/storage/mysql_v1.x.x/azureblob/"},next:{title:"Bbolt",permalink:"/storage/mysql_v1.x.x/bbolt/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:g},u="wrapper";function d(e){let{components:t,...a}=e;return(0,n.kt)(u,(0,r.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=badger*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?label=Tests",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,n.kt)("p",null,"A fast key-value DB using ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/dgraph-io/badger"},"dgraph-io/badger")),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,n.kt)("h3",{id:"installation"},"Installation"),(0,n.kt)("p",null,"Badger is tested on the 2 last ",(0,n.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,n.kt)("p",null,"And then install the badger implementation:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/badger\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the storage package."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/badger"\n')),(0,n.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := badger.New()\n\n// Initialize custom config\nstore := badger.New(badger.Config{\n Database: "./fiber.badger",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,n.kt)("h3",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./fiber.badger"\n Database string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // BadgerOptions is a way to set options in badger\n //\n // Optional. Default is badger.DefaultOptions("./fiber.badger")\n BadgerOptions badger.Options\n\n // Logger is the default logger used by badger\n //\n // Optional. Default is nil\n Logger badger.Logger\n\n // UseLogger define if any logger will be used\n //\n // Optional. Default is false\n UseLogger bool\n}\n')),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Database: "./fiber.badger",\n Reset: false,\n GCInterval: 10 * time.Second,\n BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),\n Logger: nil,\n UseLogger: false,\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/12c533ea.916b7568.js b/assets/js/12c533ea.916b7568.js new file mode 100644 index 00000000000..80149e8265d --- /dev/null +++ b/assets/js/12c533ea.916b7568.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3557],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>c});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),g=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=g(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=g(a),f=n,c=u["".concat(s,".").concat(f)]||u[f]||d[f]||o;return a?r.createElement(c,i(i({ref:t},p),{},{components:a})):r.createElement(c,i({ref:t},p))}));function c(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:n,i[1]=l;for(var g=2;g{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var r=a(87462),n=(a(67294),a(3905));const o={id:"badger",title:"Badger"},i=void 0,l={unversionedId:"badger/badger",id:"version-mysql_v1.x.x/badger/badger",title:"Badger",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/badger/README.md",sourceDirName:"badger",slug:"/badger/",permalink:"/storage/mysql_v1.x.x/badger/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/badger/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"badger",title:"Badger"},sidebar:"tutorialSidebar",previous:{title:"Azure Blob",permalink:"/storage/mysql_v1.x.x/azureblob/"},next:{title:"Bbolt",permalink:"/storage/mysql_v1.x.x/bbolt/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:g},u="wrapper";function d(e){let{components:t,...a}=e;return(0,n.kt)(u,(0,r.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=badger*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?label=Tests",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,n.kt)("p",null,"A fast key-value DB using ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/dgraph-io/badger"},"dgraph-io/badger")),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,n.kt)("h3",{id:"installation"},"Installation"),(0,n.kt)("p",null,"Badger is tested on the 2 last ",(0,n.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,n.kt)("p",null,"And then install the badger implementation:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/badger\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the storage package."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/badger"\n')),(0,n.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := badger.New()\n\n// Initialize custom config\nstore := badger.New(badger.Config{\n Database: "./fiber.badger",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,n.kt)("h3",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./fiber.badger"\n Database string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // BadgerOptions is a way to set options in badger\n //\n // Optional. Default is badger.DefaultOptions("./fiber.badger")\n BadgerOptions badger.Options\n\n // Logger is the default logger used by badger\n //\n // Optional. Default is nil\n Logger badger.Logger\n\n // UseLogger define if any logger will be used\n //\n // Optional. Default is false\n UseLogger bool\n}\n')),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Database: "./fiber.badger",\n Reset: false,\n GCInterval: 10 * time.Second,\n BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),\n Logger: nil,\n UseLogger: false,\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/13fb3f7d.8d86f8c1.js b/assets/js/13fb3f7d.8d86f8c1.js deleted file mode 100644 index f95b2393909..00000000000 --- a/assets/js/13fb3f7d.8d86f8c1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4721],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=p(n),b=a,f=u["".concat(s,".").concat(b)]||u[b]||g[b]||l;return n?r.createElement(f,o(o({ref:t},c),{},{components:n})):r.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=b;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:a,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const l={id:"pebble",title:"Pebble"},o=void 0,i={unversionedId:"pebble/pebble",id:"version-etcd_v1.x.x/pebble/pebble",title:"Pebble",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/pebble/README.md",sourceDirName:"pebble",slug:"/pebble/",permalink:"/storage/etcd_v1.x.x/pebble/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/pebble/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"pebble",title:"Pebble"},sidebar:"tutorialSidebar",previous:{title:"MySQL",permalink:"/storage/etcd_v1.x.x/mysql/"},next:{title:"Postgres",permalink:"/storage/etcd_v1.x.x/postgres/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:p},u="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=pebble*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A fast key-value DB using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cockroachdb/pebble"},"cockroachdb/pebble")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Pebble is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"Note: This step is only required if you don't have an existing module."),(0,a.kt)("p",null,"And then install the Pebble implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/pebble\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/pebble"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := pebble.New()\n\n// Initialize custom config\nstore := pebble.New(pebble.Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./db"\n Path string\n\n // Pass write options during write operations\n //\n // Optional. Default is nil\n WriteOptions &pebble.WriteOptions{}\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/13fb3f7d.9d9b5c26.js b/assets/js/13fb3f7d.9d9b5c26.js new file mode 100644 index 00000000000..b2d20c08fa0 --- /dev/null +++ b/assets/js/13fb3f7d.9d9b5c26.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4721],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=p(n),b=a,f=u["".concat(s,".").concat(b)]||u[b]||g[b]||l;return n?r.createElement(f,o(o({ref:t},c),{},{components:n})):r.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=b;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:a,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const l={id:"pebble",title:"Pebble"},o=void 0,i={unversionedId:"pebble/pebble",id:"version-etcd_v1.x.x/pebble/pebble",title:"Pebble",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/pebble/README.md",sourceDirName:"pebble",slug:"/pebble/",permalink:"/storage/etcd_v1.x.x/pebble/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/pebble/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"pebble",title:"Pebble"},sidebar:"tutorialSidebar",previous:{title:"MySQL",permalink:"/storage/etcd_v1.x.x/mysql/"},next:{title:"Postgres",permalink:"/storage/etcd_v1.x.x/postgres/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:p},u="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=pebble*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A fast key-value DB using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cockroachdb/pebble"},"cockroachdb/pebble")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Pebble is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"Note: This step is only required if you don't have an existing module."),(0,a.kt)("p",null,"And then install the Pebble implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/pebble\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/pebble"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := pebble.New()\n\n// Initialize custom config\nstore := pebble.New(pebble.Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./db"\n Path string\n\n // Pass write options during write operations\n //\n // Optional. Default is nil\n WriteOptions &pebble.WriteOptions{}\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/14a7e971.c5151565.js b/assets/js/14a7e971.c5151565.js new file mode 100644 index 00000000000..fbadd6ba80d --- /dev/null +++ b/assets/js/14a7e971.c5151565.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2369],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},l="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),l=u(n),m=a,f=l["".concat(s,".").concat(m)]||l[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},c),{},{components:n})):r.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[l]="string"==typeof e?e:a,i[1]=p;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>p,toc:()=>u});var r=n(87462),a=(n(67294),n(3905));const o={id:"routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",sidebar_position:1},i=void 0,p={unversionedId:"guide/routing",id:"version-v1.x/guide/routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",source:"@site/versioned_docs/version-v1.x/guide/routing.md",sourceDirName:"guide",slug:"/guide/routing",permalink:"/v1.x/guide/routing",draft:!1,tags:[],version:"v1.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{id:"routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Guide",permalink:"/v1.x/category/guide"},next:{title:"\ud83c\udfad Grouping",permalink:"/v1.x/guide/grouping"}},s={},u=[{value:"Paths",id:"paths",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Middleware",id:"middleware",level:2},{value:"Grouping",id:"grouping",level:2}],c={toc:u},l="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"paths"},"Paths"),(0,a.kt)("p",null,"Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be ",(0,a.kt)("strong",{parentName:"p"},"strings")," or ",(0,a.kt)("strong",{parentName:"p"},"string patterns"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Examples of route paths based on strings")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// This route path will match requests to the root route, "/":\napp.Get("/", func(c *fiber.Ctx) {\n c.Send("root")\n})\n\n// This route path will match requests to "/about":\napp.Get("/about", func(c *fiber.Ctx) {\n c.Send("about")\n})\n\n// This route path will match requests to "/random.txt":\napp.Get("/random.txt", func(c *fiber.Ctx) {\n c.Send("random.txt")\n})\n')),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)("p",null,"Route parameters are ",(0,a.kt)("strong",{parentName:"p"},"named URL segments")," that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the ",(0,a.kt)("a",{parentName:"p",href:"https://fiber.wiki/context#params"},"Params")," function, with the name of the route parameter specified in the path as their respective keys."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"The name of the route parameter must be made up of ",(0,a.kt)("strong",{parentName:"p"},"characters")," ","(",(0,a.kt)("inlineCode",{parentName:"p"},"[A-Za-z0-9_]"),")",".")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Example of define routes with route parameters")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Parameters\napp.Get("/user/:name/books/:title", func(c *fiber.Ctx) {\n c.Write(c.Params("name"))\n c.Write(c.Params("title"))\n})\n// Wildcard\napp.Get("/user/*", func(c *fiber.Ctx) {\n c.Send(c.Params("*"))\n})\n// Optional parameter\napp.Get("/user/:name?", func(c *fiber.Ctx) {\n c.Send(c.Params("name"))\n})\n')),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Since the hyphen ","(",(0,a.kt)("inlineCode",{parentName:"p"},"-"),")"," and the dot ","(",(0,a.kt)("inlineCode",{parentName:"p"},"."),")"," are interpreted literally, they can be used along with route parameters for useful purposes.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// http://localhost:3000/plantae/prunus.persica\napp.Get("/plantae/:genus.:species", func(c *fiber.Ctx) {\n c.Params("genus") // prunus\n c.Params("species") // persica\n})\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// http://localhost:3000/flights/LAX-SFO\napp.Get("/flights/:from-:to", func(c *fiber.Ctx) {\n c.Params("from") // LAX\n c.Params("to") // SFO\n})\n')),(0,a.kt)("h2",{id:"middleware"},"Middleware"),(0,a.kt)("p",null,"Functions that are designed to make changes to the request or response are called ",(0,a.kt)("strong",{parentName:"p"},"middleware functions"),". The ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/docs/tree/34729974f7d6c1d8363076e7e88cd71edc34a2ac/context/README.md#next"},"Next")," is a ",(0,a.kt)("strong",{parentName:"p"},"Fiber")," router function, when called, executes the ",(0,a.kt)("strong",{parentName:"p"},"next")," function that ",(0,a.kt)("strong",{parentName:"p"},"matches")," the current route."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Example of a middleware function")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(func(c *fiber.Ctx) {\n // Set some security headers:\n c.Set("X-XSS-Protection", "1; mode=block")\n c.Set("X-Content-Type-Options", "nosniff")\n c.Set("X-Download-Options", "noopen")\n c.Set("Strict-Transport-Security", "max-age=5184000")\n c.Set("X-Frame-Options", "SAMEORIGIN")\n c.Set("X-DNS-Prefetch-Control", "off")\n\n // Go to next middleware:\n c.Next()\n\n // End of the chain\n fmt.Println("Bye \ud83d\udc4b!")\n})\n\napp.Get("/", func(c *fiber.Ctx) {\n c.Send("Hello, World!")\n})\n')),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"Use")," method path is a ",(0,a.kt)("strong",{parentName:"p"},"mount"),", or ",(0,a.kt)("strong",{parentName:"p"},"prefix")," path, and limits middleware to only apply to any paths requested that begin with it."),(0,a.kt)("h2",{id:"grouping"},"Grouping"),(0,a.kt)("p",null,"If you have many endpoints, you can organize your routes using ",(0,a.kt)("inlineCode",{parentName:"p"},"Group"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api", cors()) // /api\n\n v1 := api.Group("/v1", mysql()) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2", mongodb()) // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n app.Listen(3000)\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/14a7e971.e7b22df4.js b/assets/js/14a7e971.e7b22df4.js deleted file mode 100644 index 16a44f6d77a..00000000000 --- a/assets/js/14a7e971.e7b22df4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2369],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},l="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),l=u(n),m=a,f=l["".concat(s,".").concat(m)]||l[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},c),{},{components:n})):r.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[l]="string"==typeof e?e:a,i[1]=p;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>p,toc:()=>u});var r=n(7462),a=(n(7294),n(3905));const o={id:"routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",sidebar_position:1},i=void 0,p={unversionedId:"guide/routing",id:"version-v1.x/guide/routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",source:"@site/versioned_docs/version-v1.x/guide/routing.md",sourceDirName:"guide",slug:"/guide/routing",permalink:"/v1.x/guide/routing",draft:!1,tags:[],version:"v1.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{id:"routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Guide",permalink:"/v1.x/category/guide"},next:{title:"\ud83c\udfad Grouping",permalink:"/v1.x/guide/grouping"}},s={},u=[{value:"Paths",id:"paths",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Middleware",id:"middleware",level:2},{value:"Grouping",id:"grouping",level:2}],c={toc:u},l="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"paths"},"Paths"),(0,a.kt)("p",null,"Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be ",(0,a.kt)("strong",{parentName:"p"},"strings")," or ",(0,a.kt)("strong",{parentName:"p"},"string patterns"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Examples of route paths based on strings")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// This route path will match requests to the root route, "/":\napp.Get("/", func(c *fiber.Ctx) {\n c.Send("root")\n})\n\n// This route path will match requests to "/about":\napp.Get("/about", func(c *fiber.Ctx) {\n c.Send("about")\n})\n\n// This route path will match requests to "/random.txt":\napp.Get("/random.txt", func(c *fiber.Ctx) {\n c.Send("random.txt")\n})\n')),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)("p",null,"Route parameters are ",(0,a.kt)("strong",{parentName:"p"},"named URL segments")," that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the ",(0,a.kt)("a",{parentName:"p",href:"https://fiber.wiki/context#params"},"Params")," function, with the name of the route parameter specified in the path as their respective keys."),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"The name of the route parameter must be made up of ",(0,a.kt)("strong",{parentName:"p"},"characters")," ","(",(0,a.kt)("inlineCode",{parentName:"p"},"[A-Za-z0-9_]"),")",".")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Example of define routes with route parameters")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Parameters\napp.Get("/user/:name/books/:title", func(c *fiber.Ctx) {\n c.Write(c.Params("name"))\n c.Write(c.Params("title"))\n})\n// Wildcard\napp.Get("/user/*", func(c *fiber.Ctx) {\n c.Send(c.Params("*"))\n})\n// Optional parameter\napp.Get("/user/:name?", func(c *fiber.Ctx) {\n c.Send(c.Params("name"))\n})\n')),(0,a.kt)("admonition",{type:"info"},(0,a.kt)("p",{parentName:"admonition"},"Since the hyphen ","(",(0,a.kt)("inlineCode",{parentName:"p"},"-"),")"," and the dot ","(",(0,a.kt)("inlineCode",{parentName:"p"},"."),")"," are interpreted literally, they can be used along with route parameters for useful purposes.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// http://localhost:3000/plantae/prunus.persica\napp.Get("/plantae/:genus.:species", func(c *fiber.Ctx) {\n c.Params("genus") // prunus\n c.Params("species") // persica\n})\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// http://localhost:3000/flights/LAX-SFO\napp.Get("/flights/:from-:to", func(c *fiber.Ctx) {\n c.Params("from") // LAX\n c.Params("to") // SFO\n})\n')),(0,a.kt)("h2",{id:"middleware"},"Middleware"),(0,a.kt)("p",null,"Functions that are designed to make changes to the request or response are called ",(0,a.kt)("strong",{parentName:"p"},"middleware functions"),". The ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/docs/tree/34729974f7d6c1d8363076e7e88cd71edc34a2ac/context/README.md#next"},"Next")," is a ",(0,a.kt)("strong",{parentName:"p"},"Fiber")," router function, when called, executes the ",(0,a.kt)("strong",{parentName:"p"},"next")," function that ",(0,a.kt)("strong",{parentName:"p"},"matches")," the current route."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Example of a middleware function")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(func(c *fiber.Ctx) {\n // Set some security headers:\n c.Set("X-XSS-Protection", "1; mode=block")\n c.Set("X-Content-Type-Options", "nosniff")\n c.Set("X-Download-Options", "noopen")\n c.Set("Strict-Transport-Security", "max-age=5184000")\n c.Set("X-Frame-Options", "SAMEORIGIN")\n c.Set("X-DNS-Prefetch-Control", "off")\n\n // Go to next middleware:\n c.Next()\n\n // End of the chain\n fmt.Println("Bye \ud83d\udc4b!")\n})\n\napp.Get("/", func(c *fiber.Ctx) {\n c.Send("Hello, World!")\n})\n')),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"Use")," method path is a ",(0,a.kt)("strong",{parentName:"p"},"mount"),", or ",(0,a.kt)("strong",{parentName:"p"},"prefix")," path, and limits middleware to only apply to any paths requested that begin with it."),(0,a.kt)("h2",{id:"grouping"},"Grouping"),(0,a.kt)("p",null,"If you have many endpoints, you can organize your routes using ",(0,a.kt)("inlineCode",{parentName:"p"},"Group"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api", cors()) // /api\n\n v1 := api.Group("/v1", mysql()) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2", mongodb()) // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n app.Listen(3000)\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/14eb3368.624122a3.js b/assets/js/14eb3368.624122a3.js new file mode 100644 index 00000000000..e73041907e5 --- /dev/null +++ b/assets/js/14eb3368.624122a3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9817,7918],{1310:(e,t,n)=>{n.d(t,{Z:()=>E});var a=n(87462),r=n(67294),i=n(86010),l=n(35281),c=n(53438),s=n(48596),o=n(39960),m=n(95999),d=n(44996);function u(e){return r.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},e),r.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const b={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,d.Z)("/");return r.createElement("li",{className:"breadcrumbs__item"},r.createElement(o.Z,{"aria-label":(0,m.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},r.createElement(u,{className:b.breadcrumbHomeIcon})))}const v={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function g(e){let{children:t,href:n,isLast:a}=e;const i="breadcrumbs__link";return a?r.createElement("span",{className:i,itemProp:"name"},t):n?r.createElement(o.Z,{className:i,href:n,itemProp:"item"},r.createElement("span",{itemProp:"name"},t)):r.createElement("span",{className:i},t)}function p(e){let{children:t,active:n,index:l,addMicrodata:c}=e;return r.createElement("li",(0,a.Z)({},c&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,i.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),t,r.createElement("meta",{itemProp:"position",content:String(l+1)}))}function E(){const e=(0,c.s1)(),t=(0,s.Ns)();return e?r.createElement("nav",{className:(0,i.Z)(l.k.docs.docBreadcrumbs,v.breadcrumbsContainer),"aria-label":(0,m.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},r.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&r.createElement(h,null),e.map(((t,n)=>{const a=n===e.length-1;return r.createElement(p,{key:n,active:a,index:n,addMicrodata:!!t.href},r.createElement(g,{href:t.href,isLast:a},t.label))})))):null}},63676:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var a=n(67294),r=n(1944),i=n(53438),l=n(44996),c=n(86010),s=n(39960),o=n(13919),m=n(95999);const d={cardContainer:"cardContainer_S8oU",cardTitle:"cardTitle_HoSo",cardDescription:"cardDescription_c27F"};function u(e){return/^\p{So}/u.test(e)}function b(e){let{href:t,children:n}=e;return a.createElement(s.Z,{href:t,className:(0,c.Z)("card padding--lg",d.cardContainer)},n)}function h(e){let{href:t,icon:n,title:r,description:i}=e;return a.createElement(b,{href:t},a.createElement("h2",{className:(0,c.Z)("text--truncate",d.cardTitle),title:r},""!==n?n+" ":"",r),i&&a.createElement("p",{className:(0,c.Z)("text--truncate",d.cardDescription),title:i},i))}function v(e){let{item:t}=e;const n=(0,i.Wl)(t);return n?a.createElement(h,{href:n,icon:u(t.label)?"":"\ud83d\uddc3\ufe0f",title:t.label,description:(0,m.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function g(e){let{item:t}=e;const n=(0,o.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,i.xz)(t.docId??void 0);return a.createElement(h,{href:t.href,icon:u(t.label)?"":n,title:t.label,description:r?.description})}function p(e){let{item:t}=e;switch(t.type){case"link":return a.createElement(g,{item:t});case"category":return a.createElement(v,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function E(e){let{className:t}=e;const n=(0,i.jA)();return a.createElement(f,{items:n.items,className:t})}function f(e){const{items:t,className:n}=e;if(!t)return a.createElement(E,e);const r=(0,i.MN)(t);return a.createElement("section",{className:(0,c.Z)("row",n)},r.map(((e,t)=>a.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},a.createElement(p,{item:e})))))}var N=n(4966),Z=n(19408),k=n(44364),_=n(1310),L=n(92503);const T={generatedIndexPage:"generatedIndexPage_vN6x",list:"list_eTzJ",title:"title_kItE"};function I(e){let{categoryGeneratedIndex:t}=e;return a.createElement(r.d,{title:t.title,description:t.description,keywords:t.keywords,image:(0,l.Z)(t.image)})}function x(e){let{categoryGeneratedIndex:t}=e;const n=(0,i.jA)();return a.createElement("div",{className:T.generatedIndexPage},a.createElement(Z.Z,null),a.createElement(_.Z,null),a.createElement(k.Z,null),a.createElement("header",null,a.createElement(L.Z,{as:"h1",className:T.title},t.title),t.description&&a.createElement("p",null,t.description)),a.createElement("article",{className:"margin-top--lg"},a.createElement(f,{items:n.items,className:T.list})),a.createElement("footer",{className:"margin-top--lg"},a.createElement(N.Z,{previous:t.navigation.previous,next:t.navigation.next})))}function y(e){return a.createElement(a.Fragment,null,a.createElement(I,e),a.createElement(x,e))}},4966:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(87462),r=n(67294),i=n(95999),l=n(86010),c=n(39960);function s(e){const{permalink:t,title:n,subLabel:a,isNext:i}=e;return r.createElement(c.Z,{className:(0,l.Z)("pagination-nav__link",i?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},a&&r.createElement("div",{className:"pagination-nav__sublabel"},a),r.createElement("div",{className:"pagination-nav__label"},n))}function o(e){const{previous:t,next:n}=e;return r.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,i.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"})},t&&r.createElement(s,(0,a.Z)({},t,{subLabel:r.createElement(i.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),n&&r.createElement(s,(0,a.Z)({},n,{subLabel:r.createElement(i.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}},44364:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(67294),r=n(86010),i=n(95999),l=n(35281),c=n(74477);function s(e){let{className:t}=e;const n=(0,c.E)();return n.badge?a.createElement("span",{className:(0,r.Z)(t,l.k.docs.docVersionBadge,"badge badge--secondary")},a.createElement(i.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label}},"Version: {versionLabel}")):null}},23120:(e,t,n)=>{n.d(t,{Z:()=>g});var a=n(67294),r=n(86010),i=n(52263),l=n(39960),c=n(95999),s=n(80143),o=n(35281),m=n(60373),d=n(74477);const u={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(c.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(c.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function b(e){const t=u[e.versionMetadata.banner];return a.createElement(t,e)}function h(e){let{versionLabel:t,to:n,onClick:r}=e;return a.createElement(c.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:a.createElement("b",null,a.createElement(l.Z,{to:n,onClick:r},a.createElement(c.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function v(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:l}}=(0,i.Z)(),{pluginId:c}=(0,s.gA)({failfast:!0}),{savePreferredVersionName:d}=(0,m.J)(c),{latestDocSuggestion:u,latestVersionSuggestion:v}=(0,s.Jo)(c),g=u??(p=v).docs.find((e=>e.id===p.mainDocId));var p;return a.createElement("div",{className:(0,r.Z)(t,o.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},a.createElement("div",null,a.createElement(b,{siteTitle:l,versionMetadata:n})),a.createElement("div",{className:"margin-top--md"},a.createElement(h,{versionLabel:v.label,to:g.path,onClick:()=>d(v.name)})))}function g(e){let{className:t}=e;const n=(0,d.E)();return n.banner?a.createElement(v,{className:t,versionMetadata:n}):null}},92503:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(87462),r=n(67294),i=n(86010),l=n(95999),c=n(86668),s=n(39960);const o={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};function m(e){let{as:t,id:n,...m}=e;const{navbar:{hideOnScroll:d}}=(0,c.L)();if("h1"===t||!n)return r.createElement(t,(0,a.Z)({},m,{id:void 0}));const u=(0,l.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof m.children?m.children:n});return r.createElement(t,(0,a.Z)({},m,{className:(0,i.Z)("anchor",d?o.anchorWithHideOnScrollNavbar:o.anchorWithStickyNavbar,m.className),id:n}),m.children,r.createElement(s.Z,{className:"hash-link",to:`#${n}`,"aria-label":u,title:u},"\u200b"))}},19408:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(67294),r=n(23120),i=n(80143);function l(e){const t=(0,i.gA)();return"default"!==t?.pluginId&&"current"!==(0,i.Iw)(t.pluginId)?.activeVersion?.name?null:a.createElement(a.Fragment,null,a.createElement(r.Z,e))}}}]); \ No newline at end of file diff --git a/assets/js/14eb3368.fabd9a92.js b/assets/js/14eb3368.fabd9a92.js deleted file mode 100644 index ad695c7a92c..00000000000 --- a/assets/js/14eb3368.fabd9a92.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9817,7918],{7456:(e,t,n)=>{n.d(t,{Z:()=>E});var a=n(7462),r=n(7294),i=n(6010),l=n(5281),c=n(3438),s=n(8596),o=n(9960),m=n(5999),d=n(4996);function u(e){return r.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},e),r.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const b={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,d.Z)("/");return r.createElement("li",{className:"breadcrumbs__item"},r.createElement(o.Z,{"aria-label":(0,m.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},r.createElement(u,{className:b.breadcrumbHomeIcon})))}const v={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function g(e){let{children:t,href:n,isLast:a}=e;const i="breadcrumbs__link";return a?r.createElement("span",{className:i,itemProp:"name"},t):n?r.createElement(o.Z,{className:i,href:n,itemProp:"item"},r.createElement("span",{itemProp:"name"},t)):r.createElement("span",{className:i},t)}function p(e){let{children:t,active:n,index:l,addMicrodata:c}=e;return r.createElement("li",(0,a.Z)({},c&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,i.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),t,r.createElement("meta",{itemProp:"position",content:String(l+1)}))}function E(){const e=(0,c.s1)(),t=(0,s.Ns)();return e?r.createElement("nav",{className:(0,i.Z)(l.k.docs.docBreadcrumbs,v.breadcrumbsContainer),"aria-label":(0,m.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},r.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&r.createElement(h,null),e.map(((t,n)=>{const a=n===e.length-1;return r.createElement(p,{key:n,active:a,index:n,addMicrodata:!!t.href},r.createElement(g,{href:t.href,isLast:a},t.label))})))):null}},3676:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var a=n(7294),r=n(1944),i=n(3438),l=n(4996),c=n(6010),s=n(9960),o=n(3919),m=n(5999);const d={cardContainer:"cardContainer_S8oU",cardTitle:"cardTitle_HoSo",cardDescription:"cardDescription_c27F"};function u(e){return/^\p{So}/u.test(e)}function b(e){let{href:t,children:n}=e;return a.createElement(s.Z,{href:t,className:(0,c.Z)("card padding--lg",d.cardContainer)},n)}function h(e){let{href:t,icon:n,title:r,description:i}=e;return a.createElement(b,{href:t},a.createElement("h2",{className:(0,c.Z)("text--truncate",d.cardTitle),title:r},""!==n?n+" ":"",r),i&&a.createElement("p",{className:(0,c.Z)("text--truncate",d.cardDescription),title:i},i))}function v(e){let{item:t}=e;const n=(0,i.Wl)(t);return n?a.createElement(h,{href:n,icon:u(t.label)?"":"\ud83d\uddc3\ufe0f",title:t.label,description:(0,m.I)({message:"{count} items",id:"theme.docs.DocCard.categoryDescription",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t.items.length})}):null}function g(e){let{item:t}=e;const n=(0,o.Z)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,i.xz)(t.docId??void 0);return a.createElement(h,{href:t.href,icon:u(t.label)?"":n,title:t.label,description:r?.description})}function p(e){let{item:t}=e;switch(t.type){case"link":return a.createElement(g,{item:t});case"category":return a.createElement(v,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function E(e){let{className:t}=e;const n=(0,i.jA)();return a.createElement(f,{items:n.items,className:t})}function f(e){const{items:t,className:n}=e;if(!t)return a.createElement(E,e);const r=(0,i.MN)(t);return a.createElement("section",{className:(0,c.Z)("row",n)},r.map(((e,t)=>a.createElement("article",{key:t,className:"col col--6 margin-bottom--lg"},a.createElement(p,{item:e})))))}var N=n(4966),Z=n(9408),k=n(4364),_=n(7456),L=n(2503);const T={generatedIndexPage:"generatedIndexPage_vN6x",list:"list_eTzJ",title:"title_kItE"};function I(e){let{categoryGeneratedIndex:t}=e;return a.createElement(r.d,{title:t.title,description:t.description,keywords:t.keywords,image:(0,l.Z)(t.image)})}function x(e){let{categoryGeneratedIndex:t}=e;const n=(0,i.jA)();return a.createElement("div",{className:T.generatedIndexPage},a.createElement(Z.Z,null),a.createElement(_.Z,null),a.createElement(k.Z,null),a.createElement("header",null,a.createElement(L.Z,{as:"h1",className:T.title},t.title),t.description&&a.createElement("p",null,t.description)),a.createElement("article",{className:"margin-top--lg"},a.createElement(f,{items:n.items,className:T.list})),a.createElement("footer",{className:"margin-top--lg"},a.createElement(N.Z,{previous:t.navigation.previous,next:t.navigation.next})))}function y(e){return a.createElement(a.Fragment,null,a.createElement(I,e),a.createElement(x,e))}},4966:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(7462),r=n(7294),i=n(5999),l=n(6010),c=n(9960);function s(e){const{permalink:t,title:n,subLabel:a,isNext:i}=e;return r.createElement(c.Z,{className:(0,l.Z)("pagination-nav__link",i?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},a&&r.createElement("div",{className:"pagination-nav__sublabel"},a),r.createElement("div",{className:"pagination-nav__label"},n))}function o(e){const{previous:t,next:n}=e;return r.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,i.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"})},t&&r.createElement(s,(0,a.Z)({},t,{subLabel:r.createElement(i.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),n&&r.createElement(s,(0,a.Z)({},n,{subLabel:r.createElement(i.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}},4364:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(7294),r=n(6010),i=n(5999),l=n(5281),c=n(4477);function s(e){let{className:t}=e;const n=(0,c.E)();return n.badge?a.createElement("span",{className:(0,r.Z)(t,l.k.docs.docVersionBadge,"badge badge--secondary")},a.createElement(i.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label}},"Version: {versionLabel}")):null}},3120:(e,t,n)=>{n.d(t,{Z:()=>g});var a=n(7294),r=n(6010),i=n(2263),l=n(9960),c=n(5999),s=n(143),o=n(5281),m=n(373),d=n(4477);const u={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(c.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(c.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function b(e){const t=u[e.versionMetadata.banner];return a.createElement(t,e)}function h(e){let{versionLabel:t,to:n,onClick:r}=e;return a.createElement(c.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:a.createElement("b",null,a.createElement(l.Z,{to:n,onClick:r},a.createElement(c.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function v(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:l}}=(0,i.Z)(),{pluginId:c}=(0,s.gA)({failfast:!0}),{savePreferredVersionName:d}=(0,m.J)(c),{latestDocSuggestion:u,latestVersionSuggestion:v}=(0,s.Jo)(c),g=u??(p=v).docs.find((e=>e.id===p.mainDocId));var p;return a.createElement("div",{className:(0,r.Z)(t,o.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},a.createElement("div",null,a.createElement(b,{siteTitle:l,versionMetadata:n})),a.createElement("div",{className:"margin-top--md"},a.createElement(h,{versionLabel:v.label,to:g.path,onClick:()=>d(v.name)})))}function g(e){let{className:t}=e;const n=(0,d.E)();return n.banner?a.createElement(v,{className:t,versionMetadata:n}):null}},2503:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(7462),r=n(7294),i=n(6010),l=n(5999),c=n(6668),s=n(9960);const o={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};function m(e){let{as:t,id:n,...m}=e;const{navbar:{hideOnScroll:d}}=(0,c.L)();if("h1"===t||!n)return r.createElement(t,(0,a.Z)({},m,{id:void 0}));const u=(0,l.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof m.children?m.children:n});return r.createElement(t,(0,a.Z)({},m,{className:(0,i.Z)("anchor",d?o.anchorWithHideOnScrollNavbar:o.anchorWithStickyNavbar,m.className),id:n}),m.children,r.createElement(s.Z,{className:"hash-link",to:`#${n}`,"aria-label":u,title:u},"\u200b"))}},9408:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(7294),r=n(3120),i=n(143);function l(e){const t=(0,i.gA)();return"default"!==t?.pluginId&&"current"!==(0,i.Iw)(t.pluginId)?.activeVersion?.name?null:a.createElement(a.Fragment,null,a.createElement(r.Z,e))}}}]); \ No newline at end of file diff --git a/assets/js/1553f4e9.69d88aeb.js b/assets/js/1553f4e9.69d88aeb.js new file mode 100644 index 00000000000..0615c264c15 --- /dev/null +++ b/assets/js/1553f4e9.69d88aeb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8540],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var o=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=o.createContext({}),c=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},p="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,f=p["".concat(l,".").concat(m)]||p[m]||g[m]||r;return n?o.createElement(f,i(i({ref:t},u),{},{components:n})):o.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>g,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var o=n(87462),a=(n(67294),n(3905));const r={id:"couchbase",title:"Couchbase"},i=void 0,s={unversionedId:"couchbase/couchbase",id:"version-sqlite3_v1.x.x/couchbase/couchbase",title:"Couchbase",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/couchbase/README.md",sourceDirName:"couchbase",slug:"/couchbase/",permalink:"/storage/sqlite3_v1.x.x/couchbase/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/couchbase/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"couchbase",title:"Couchbase"},sidebar:"tutorialSidebar",previous:{title:"Bbolt",permalink:"/storage/sqlite3_v1.x.x/bbolt/"},next:{title:"DynamoDB",permalink:"/storage/sqlite3_v1.x.x/dynamodb/"}},l={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:c},p="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=couchbase*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Couchbase storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/couchbase/gocb"},"couchbase/gocb"),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *gocb.Cluster\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Couchbase is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the Couchbase implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/couchbase\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/couchbase"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := couchbase.New()\n\n// Initialize Couchbase storage with custom config\nstore := couchbase.New(couchbase.Config{\n Host: "127.0.0.1:8091",\n Username: "",\n Password: "",\n Bucket: 0,\n ConnectionTimeout: 3* time.Second,\n KVTimeout: 1* time.Second,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // The application username to Connect to the Couchbase cluster\n Username string\n // The application password to Connect to the Couchbase cluster\n Password string\n // The connection string for the Couchbase cluster\n Host string\n // The name of the bucket to Connect to\n Bucket string\n // The timeout for connecting to the Couchbase cluster\n ConnectionTimeout time.Duration\n // The timeout for performing operations on the Couchbase cluster\n KVTimeout time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Host: "127.0.0.1:8091",\n Username: "admin",\n Password: "123456",\n Bucket: "fiber_storage",\n ConnectionTimeout: 3 * time.Second,\n KVTimeout: 1 * time.Second,\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1553f4e9.944c10f1.js b/assets/js/1553f4e9.944c10f1.js deleted file mode 100644 index 84c2185a7c5..00000000000 --- a/assets/js/1553f4e9.944c10f1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8540],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var o=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=o.createContext({}),c=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},p="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,f=p["".concat(l,".").concat(m)]||p[m]||g[m]||r;return n?o.createElement(f,i(i({ref:t},u),{},{components:n})):o.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>g,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var o=n(7462),a=(n(7294),n(3905));const r={id:"couchbase",title:"Couchbase"},i=void 0,s={unversionedId:"couchbase/couchbase",id:"version-sqlite3_v1.x.x/couchbase/couchbase",title:"Couchbase",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/couchbase/README.md",sourceDirName:"couchbase",slug:"/couchbase/",permalink:"/storage/sqlite3_v1.x.x/couchbase/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/couchbase/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"couchbase",title:"Couchbase"},sidebar:"tutorialSidebar",previous:{title:"Bbolt",permalink:"/storage/sqlite3_v1.x.x/bbolt/"},next:{title:"DynamoDB",permalink:"/storage/sqlite3_v1.x.x/dynamodb/"}},l={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:c},p="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=couchbase*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Couchbase storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/couchbase/gocb"},"couchbase/gocb"),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *gocb.Cluster\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Couchbase is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the Couchbase implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/couchbase\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/couchbase"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := couchbase.New()\n\n// Initialize Couchbase storage with custom config\nstore := couchbase.New(couchbase.Config{\n Host: "127.0.0.1:8091",\n Username: "",\n Password: "",\n Bucket: 0,\n ConnectionTimeout: 3* time.Second,\n KVTimeout: 1* time.Second,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // The application username to Connect to the Couchbase cluster\n Username string\n // The application password to Connect to the Couchbase cluster\n Password string\n // The connection string for the Couchbase cluster\n Host string\n // The name of the bucket to Connect to\n Bucket string\n // The timeout for connecting to the Couchbase cluster\n ConnectionTimeout time.Duration\n // The timeout for performing operations on the Couchbase cluster\n KVTimeout time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Host: "127.0.0.1:8091",\n Username: "admin",\n Password: "123456",\n Bucket: "fiber_storage",\n ConnectionTimeout: 3 * time.Second,\n KVTimeout: 1 * time.Second,\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/155ac106.42ea3161.js b/assets/js/155ac106.42ea3161.js deleted file mode 100644 index 8ba3d6f555f..00000000000 --- a/assets/js/155ac106.42ea3161.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3176],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),g=u(n),f=a,m=g["".concat(l,".").concat(f)]||g[f]||p[f]||i;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[g]="string"==typeof e?e:a,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var r=n(7462),a=(n(7294),n(3905));const i={id:"s3",title:"S3"},o=void 0,s={unversionedId:"s3/s3",id:"version-sqlite3_v1.x.x/s3/s3",title:"S3",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/s3/README.md",sourceDirName:"s3",slug:"/s3/",permalink:"/storage/sqlite3_v1.x.x/s3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/s3/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"s3",title:"S3"},sidebar:"tutorialSidebar",previous:{title:"Ristretto",permalink:"/storage/sqlite3_v1.x.x/ristretto/"},next:{title:"SQLite3",permalink:"/storage/sqlite3_v1.x.x/sqlite3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=s3*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A S3 storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,a.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *s3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"S3 is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the s3 implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/s3\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/s3"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := s3.New()\n\n// Initialize custom config\nstore := s3.New(s3.Config{\n Bucket: "my-bucket-url",\n Endpoint: "my-endpoint",\n Region: "my-region",\n Reset: false,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for storage.\ntype Config struct {\n // S3 bucket name\n Bucket string\n\n // AWS endpoint\n Endpoint string\n\n // AWS region\n Region string\n\n // Request timeout\n //\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("p",null,"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Bucket: "",\n Region: "",\n Endpoint: "",\n Credentials: Credentials{},\n MaxAttempts: 3,\n RequestTimeout: 0,\n Reset: false,\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/155ac106.866742b4.js b/assets/js/155ac106.866742b4.js new file mode 100644 index 00000000000..b83fccb250e --- /dev/null +++ b/assets/js/155ac106.866742b4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3176],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),g=u(n),f=a,m=g["".concat(l,".").concat(f)]||g[f]||p[f]||i;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[g]="string"==typeof e?e:a,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var r=n(87462),a=(n(67294),n(3905));const i={id:"s3",title:"S3"},o=void 0,s={unversionedId:"s3/s3",id:"version-sqlite3_v1.x.x/s3/s3",title:"S3",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/s3/README.md",sourceDirName:"s3",slug:"/s3/",permalink:"/storage/sqlite3_v1.x.x/s3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/s3/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"s3",title:"S3"},sidebar:"tutorialSidebar",previous:{title:"Ristretto",permalink:"/storage/sqlite3_v1.x.x/ristretto/"},next:{title:"SQLite3",permalink:"/storage/sqlite3_v1.x.x/sqlite3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=s3*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A S3 storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,a.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *s3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"S3 is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the s3 implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/s3\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/s3"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := s3.New()\n\n// Initialize custom config\nstore := s3.New(s3.Config{\n Bucket: "my-bucket-url",\n Endpoint: "my-endpoint",\n Region: "my-region",\n Reset: false,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for storage.\ntype Config struct {\n // S3 bucket name\n Bucket string\n\n // AWS endpoint\n Endpoint string\n\n // AWS region\n Region string\n\n // Request timeout\n //\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("p",null,"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Bucket: "",\n Region: "",\n Endpoint: "",\n Credentials: Credentials{},\n MaxAttempts: 3,\n RequestTimeout: 0,\n Reset: false,\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/15d8a732.6bbc03e4.js b/assets/js/15d8a732.6bbc03e4.js new file mode 100644 index 00000000000..82777434247 --- /dev/null +++ b/assets/js/15d8a732.6bbc03e4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8099],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),g=c(n),f=a,d=g["".concat(l,".").concat(f)]||g[f]||p[f]||i;return n?r.createElement(d,o(o({ref:t},u),{},{components:n})):r.createElement(d,o({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[g]="string"==typeof e?e:a,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));const i={id:"s3",title:"S3"},o=void 0,s={unversionedId:"s3/s3",id:"version-etcd_v1.x.x/s3/s3",title:"S3",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/s3/README.md",sourceDirName:"s3",slug:"/s3/",permalink:"/storage/etcd_v1.x.x/s3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/s3/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"s3",title:"S3"},sidebar:"tutorialSidebar",previous:{title:"Ristretto",permalink:"/storage/etcd_v1.x.x/ristretto/"},next:{title:"SQLite3",permalink:"/storage/etcd_v1.x.x/sqlite3/"}},l={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:c},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=s3*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A S3 storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,a.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *s3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"S3 is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the s3 implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/s3\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/s3"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := s3.New()\n\n// Initialize custom config\nstore := s3.New(s3.Config{\n Bucket: "my-bucket-url",\n Endpoint: "my-endpoint",\n Region: "my-region",\n Reset: false,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for storage.\ntype Config struct {\n // S3 bucket name\n Bucket string\n\n // AWS endpoint\n Endpoint string\n\n // AWS region\n Region string\n\n // Request timeout\n //\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("p",null,"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Bucket: "",\n Region: "",\n Endpoint: "",\n Credentials: Credentials{},\n MaxAttempts: 3,\n RequestTimeout: 0,\n Reset: false,\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/15d8a732.7f856e1d.js b/assets/js/15d8a732.7f856e1d.js deleted file mode 100644 index bb0abedef1f..00000000000 --- a/assets/js/15d8a732.7f856e1d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8099],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),g=c(n),f=a,d=g["".concat(l,".").concat(f)]||g[f]||p[f]||i;return n?r.createElement(d,o(o({ref:t},u),{},{components:n})):r.createElement(d,o({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[g]="string"==typeof e?e:a,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var r=n(7462),a=(n(7294),n(3905));const i={id:"s3",title:"S3"},o=void 0,s={unversionedId:"s3/s3",id:"version-etcd_v1.x.x/s3/s3",title:"S3",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/s3/README.md",sourceDirName:"s3",slug:"/s3/",permalink:"/storage/etcd_v1.x.x/s3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/s3/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"s3",title:"S3"},sidebar:"tutorialSidebar",previous:{title:"Ristretto",permalink:"/storage/etcd_v1.x.x/ristretto/"},next:{title:"SQLite3",permalink:"/storage/etcd_v1.x.x/sqlite3/"}},l={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:c},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=s3*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A S3 storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,a.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *s3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"S3 is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the s3 implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/s3\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/s3"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := s3.New()\n\n// Initialize custom config\nstore := s3.New(s3.Config{\n Bucket: "my-bucket-url",\n Endpoint: "my-endpoint",\n Region: "my-region",\n Reset: false,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for storage.\ntype Config struct {\n // S3 bucket name\n Bucket string\n\n // AWS endpoint\n Endpoint string\n\n // AWS region\n Region string\n\n // Request timeout\n //\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("p",null,"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Bucket: "",\n Region: "",\n Endpoint: "",\n Credentials: Credentials{},\n MaxAttempts: 3,\n RequestTimeout: 0,\n Reset: false,\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/15eed0c8.175fbad5.js b/assets/js/15eed0c8.175fbad5.js deleted file mode 100644 index 0c721eaa213..00000000000 --- a/assets/js/15eed0c8.175fbad5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9778],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>c});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),g=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=g(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=g(a),f=r,c=u["".concat(s,".").concat(f)]||u[f]||d[f]||o;return a?n.createElement(c,i(i({ref:t},p),{},{components:a})):n.createElement(c,i({ref:t},p))}));function c(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var g=2;g{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var n=a(7462),r=(a(7294),a(3905));const o={id:"badger",title:"Badger"},i=void 0,l={unversionedId:"badger/badger",id:"badger/badger",title:"Badger",description:"Release",source:"@site/docs/storage/badger/README.md",sourceDirName:"badger",slug:"/badger/",permalink:"/storage/next/badger/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/badger/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"badger",title:"Badger"},sidebar:"tutorialSidebar",previous:{title:"Azure Blob",permalink:"/storage/next/azureblob/"},next:{title:"Bbolt",permalink:"/storage/next/bbolt/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:g},u="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(u,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=badger*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A fast key-value DB using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/dgraph-io/badger"},"dgraph-io/badger")),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"Badger is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the badger implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/badger\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/badger"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := badger.New()\n\n// Initialize custom config\nstore := badger.New(badger.Config{\n Database: "./fiber.badger",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./fiber.badger"\n Database string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // BadgerOptions is a way to set options in badger\n //\n // Optional. Default is badger.DefaultOptions("./fiber.badger")\n BadgerOptions badger.Options\n\n // Logger is the default logger used by badger\n //\n // Optional. Default is nil\n Logger badger.Logger\n\n // UseLogger define if any logger will be used\n //\n // Optional. Default is false\n UseLogger bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Database: "./fiber.badger",\n Reset: false,\n GCInterval: 10 * time.Second,\n BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),\n Logger: nil,\n UseLogger: false,\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/15eed0c8.664bac74.js b/assets/js/15eed0c8.664bac74.js new file mode 100644 index 00000000000..063590784f2 --- /dev/null +++ b/assets/js/15eed0c8.664bac74.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9778],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>c});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),g=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=g(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=g(a),f=r,c=u["".concat(s,".").concat(f)]||u[f]||d[f]||o;return a?n.createElement(c,i(i({ref:t},p),{},{components:a})):n.createElement(c,i({ref:t},p))}));function c(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var g=2;g{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var n=a(87462),r=(a(67294),a(3905));const o={id:"badger",title:"Badger"},i=void 0,l={unversionedId:"badger/badger",id:"badger/badger",title:"Badger",description:"Release",source:"@site/docs/storage/badger/README.md",sourceDirName:"badger",slug:"/badger/",permalink:"/storage/next/badger/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/badger/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"badger",title:"Badger"},sidebar:"tutorialSidebar",previous:{title:"Azure Blob",permalink:"/storage/next/azureblob/"},next:{title:"Bbolt",permalink:"/storage/next/bbolt/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:g},u="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(u,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=badger*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A fast key-value DB using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/dgraph-io/badger"},"dgraph-io/badger")),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"Badger is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the badger implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/badger\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/badger"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := badger.New()\n\n// Initialize custom config\nstore := badger.New(badger.Config{\n Database: "./fiber.badger",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./fiber.badger"\n Database string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // BadgerOptions is a way to set options in badger\n //\n // Optional. Default is badger.DefaultOptions("./fiber.badger")\n BadgerOptions badger.Options\n\n // Logger is the default logger used by badger\n //\n // Optional. Default is nil\n Logger badger.Logger\n\n // UseLogger define if any logger will be used\n //\n // Optional. Default is false\n UseLogger bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Database: "./fiber.badger",\n Reset: false,\n GCInterval: 10 * time.Second,\n BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),\n Logger: nil,\n UseLogger: false,\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/168749b0.6a493a4d.js b/assets/js/168749b0.6a493a4d.js new file mode 100644 index 00000000000..f99e9016539 --- /dev/null +++ b/assets/js/168749b0.6a493a4d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7839],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),c=s(n),d=a,f=c["".concat(p,".").concat(d)]||c[d]||u[d]||i;return n?r.createElement(f,l(l({ref:t},m),{},{components:n})):r.createElement(f,l({ref:t},m))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[c]="string"==typeof e?e:a,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));const i={id:"jet",title:"Jet"},l=void 0,o={unversionedId:"jet/jet",id:"version-slim_v2.x.x/jet/jet",title:"Jet",description:"Release",source:"@site/template_versioned_docs/version-slim_v2.x.x/jet/README.md",sourceDirName:"jet",slug:"/jet/",permalink:"/template/jet/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/jet/README.md",tags:[],version:"slim_v2.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"jet",title:"Jet"},sidebar:"tutorialSidebar",previous:{title:"Golang Templates Cheatsheet",permalink:"/template/html/TEMPLATES_CHEATSHEET"},next:{title:"Mustache",permalink:"/template/mustache/"}},p={},s=[{value:"Basic Example",id:"basic-example",level:3}],m={toc:s},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Jet is a template engine create by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/CloudyKit/jet"},"cloudykit"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/CloudyKit/jet/wiki/3.-Jet-template-syntax"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},'{{include "partials/header"}}\n\n

{{ Title }}

\n\n{{include "partials/footer"}}\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Header

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Footer

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"\n\n\n\n Title\n\n\n\n {{ embed() }}\n\n\n\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n \n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/jet/v2"\n)\n\nfunc main() {\n // Create a new engine\n engine := jet.New("./views", ".jet")\n\n // Or from an embedded system\n // See github.com/gofiber/embed for examples\n // engine := jet.NewFileSystem(http.Dir("./views", ".jet"))\n\n // Pass the engine to the views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/168749b0.fc20fca5.js b/assets/js/168749b0.fc20fca5.js deleted file mode 100644 index b5a024dae8a..00000000000 --- a/assets/js/168749b0.fc20fca5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7839],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),c=s(n),d=a,f=c["".concat(p,".").concat(d)]||c[d]||u[d]||i;return n?r.createElement(f,l(l({ref:t},m),{},{components:n})):r.createElement(f,l({ref:t},m))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[c]="string"==typeof e?e:a,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var r=n(7462),a=(n(7294),n(3905));const i={id:"jet",title:"Jet"},l=void 0,o={unversionedId:"jet/jet",id:"version-slim_v2.x.x/jet/jet",title:"Jet",description:"Release",source:"@site/template_versioned_docs/version-slim_v2.x.x/jet/README.md",sourceDirName:"jet",slug:"/jet/",permalink:"/template/jet/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/jet/README.md",tags:[],version:"slim_v2.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"jet",title:"Jet"},sidebar:"tutorialSidebar",previous:{title:"Golang Templates Cheatsheet",permalink:"/template/html/TEMPLATES_CHEATSHEET"},next:{title:"Mustache",permalink:"/template/mustache/"}},p={},s=[{value:"Basic Example",id:"basic-example",level:3}],m={toc:s},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Jet is a template engine create by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/CloudyKit/jet"},"cloudykit"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/CloudyKit/jet/wiki/3.-Jet-template-syntax"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},'{{include "partials/header"}}\n\n

{{ Title }}

\n\n{{include "partials/footer"}}\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Header

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Footer

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"\n\n\n\n Title\n\n\n\n {{ embed() }}\n\n\n\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n \n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/jet/v2"\n)\n\nfunc main() {\n // Create a new engine\n engine := jet.New("./views", ".jet")\n\n // Or from an embedded system\n // See github.com/gofiber/embed for examples\n // engine := jet.NewFileSystem(http.Dir("./views", ".jet"))\n\n // Pass the engine to the views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/169061e7.bcd122e2.js b/assets/js/169061e7.bcd122e2.js new file mode 100644 index 00000000000..499d8421638 --- /dev/null +++ b/assets/js/169061e7.bcd122e2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1881],{96150:e=>{e.exports=JSON.parse('{"pluginId":"contrib","version":"fiberzerolog_v0.x.x","label":"fiberzerolog_v0.x.x","banner":null,"badge":true,"noIndex":false,"className":"docs-version-fiberzerolog_v0.x.x","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/contrib/","docId":"README"},{"type":"link","label":"Casbin","href":"/contrib/casbin/","docId":"casbin/casbin"},{"type":"link","label":"Fiberi18n","href":"/contrib/fiberi18n/","docId":"fiberi18n/fiberi18n"},{"type":"link","label":"Fibernewrelic","href":"/contrib/fibernewrelic/","docId":"fibernewrelic/fibernewrelic"},{"type":"link","label":"Fibersentry","href":"/contrib/fibersentry/","docId":"fibersentry/fibersentry"},{"type":"link","label":"Fiberzap","href":"/contrib/fiberzap/","docId":"fiberzap/fiberzap"},{"type":"link","label":"Fiberzerolog","href":"/contrib/fiberzerolog/","docId":"fiberzerolog/fiberzerolog"},{"type":"link","label":"JWT","href":"/contrib/jwt/","docId":"jwt/jwt"},{"type":"link","label":"Opafiber","href":"/contrib/opafiber/","docId":"opafiber/opafiber"},{"type":"category","label":"Otelfiber","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Example","href":"/contrib/otelfiber/example/","docId":"otelfiber/example/otelfiber-example"}],"href":"/contrib/otelfiber/"},{"type":"link","label":"Paseto","href":"/contrib/paseto/","docId":"paseto/paseto"},{"type":"link","label":"Swagger","href":"/contrib/swagger/","docId":"swagger/swagger"},{"type":"link","label":"Websocket","href":"/contrib/websocket/","docId":"websocket/websocket"}]},"docs":{"casbin/casbin":{"id":"casbin/casbin","title":"Casbin","description":"Release","sidebar":"tutorialSidebar"},"fiberi18n/fiberi18n":{"id":"fiberi18n/fiberi18n","title":"Fiberi18n","description":"Release","sidebar":"tutorialSidebar"},"fibernewrelic/fibernewrelic":{"id":"fibernewrelic/fibernewrelic","title":"Fibernewrelic","description":"Release","sidebar":"tutorialSidebar"},"fibersentry/fibersentry":{"id":"fibersentry/fibersentry","title":"Fibersentry","description":"Release","sidebar":"tutorialSidebar"},"fiberzap/fiberzap":{"id":"fiberzap/fiberzap","title":"Fiberzap","description":"Release","sidebar":"tutorialSidebar"},"fiberzerolog/fiberzerolog":{"id":"fiberzerolog/fiberzerolog","title":"Fiberzerolog","description":"Release","sidebar":"tutorialSidebar"},"jwt/jwt":{"id":"jwt/jwt","title":"JWT","description":"Release","sidebar":"tutorialSidebar"},"opafiber/opafiber":{"id":"opafiber/opafiber","title":"Opafiber","description":"Release","sidebar":"tutorialSidebar"},"otelfiber/example/otelfiber-example":{"id":"otelfiber/example/otelfiber-example","title":"Example","description":"An HTTP server using gofiber fiber and instrumentation. The server has a","sidebar":"tutorialSidebar"},"otelfiber/otelfiber":{"id":"otelfiber/otelfiber","title":"Otelfiber","description":"Release","sidebar":"tutorialSidebar"},"paseto/paseto":{"id":"paseto/paseto","title":"Paseto","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"Discord","sidebar":"tutorialSidebar"},"swagger/swagger":{"id":"swagger/swagger","title":"Swagger","description":"Release","sidebar":"tutorialSidebar"},"websocket/websocket":{"id":"websocket/websocket","title":"Websocket","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/169061e7.f8139a54.js b/assets/js/169061e7.f8139a54.js deleted file mode 100644 index e510437b0b7..00000000000 --- a/assets/js/169061e7.f8139a54.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1881],{6150:e=>{e.exports=JSON.parse('{"pluginId":"contrib","version":"fiberzerolog_v0.x.x","label":"fiberzerolog_v0.x.x","banner":null,"badge":true,"noIndex":false,"className":"docs-version-fiberzerolog_v0.x.x","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/contrib/","docId":"README"},{"type":"link","label":"Casbin","href":"/contrib/casbin/","docId":"casbin/casbin"},{"type":"link","label":"Fiberi18n","href":"/contrib/fiberi18n/","docId":"fiberi18n/fiberi18n"},{"type":"link","label":"Fibernewrelic","href":"/contrib/fibernewrelic/","docId":"fibernewrelic/fibernewrelic"},{"type":"link","label":"Fibersentry","href":"/contrib/fibersentry/","docId":"fibersentry/fibersentry"},{"type":"link","label":"Fiberzap","href":"/contrib/fiberzap/","docId":"fiberzap/fiberzap"},{"type":"link","label":"Fiberzerolog","href":"/contrib/fiberzerolog/","docId":"fiberzerolog/fiberzerolog"},{"type":"link","label":"JWT","href":"/contrib/jwt/","docId":"jwt/jwt"},{"type":"link","label":"Opafiber","href":"/contrib/opafiber/","docId":"opafiber/opafiber"},{"type":"category","label":"Otelfiber","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Example","href":"/contrib/otelfiber/example/","docId":"otelfiber/example/otelfiber-example"}],"href":"/contrib/otelfiber/"},{"type":"link","label":"Paseto","href":"/contrib/paseto/","docId":"paseto/paseto"},{"type":"link","label":"Swagger","href":"/contrib/swagger/","docId":"swagger/swagger"},{"type":"link","label":"Websocket","href":"/contrib/websocket/","docId":"websocket/websocket"}]},"docs":{"casbin/casbin":{"id":"casbin/casbin","title":"Casbin","description":"Release","sidebar":"tutorialSidebar"},"fiberi18n/fiberi18n":{"id":"fiberi18n/fiberi18n","title":"Fiberi18n","description":"Release","sidebar":"tutorialSidebar"},"fibernewrelic/fibernewrelic":{"id":"fibernewrelic/fibernewrelic","title":"Fibernewrelic","description":"Release","sidebar":"tutorialSidebar"},"fibersentry/fibersentry":{"id":"fibersentry/fibersentry","title":"Fibersentry","description":"Release","sidebar":"tutorialSidebar"},"fiberzap/fiberzap":{"id":"fiberzap/fiberzap","title":"Fiberzap","description":"Release","sidebar":"tutorialSidebar"},"fiberzerolog/fiberzerolog":{"id":"fiberzerolog/fiberzerolog","title":"Fiberzerolog","description":"Release","sidebar":"tutorialSidebar"},"jwt/jwt":{"id":"jwt/jwt","title":"JWT","description":"Release","sidebar":"tutorialSidebar"},"opafiber/opafiber":{"id":"opafiber/opafiber","title":"Opafiber","description":"Release","sidebar":"tutorialSidebar"},"otelfiber/example/otelfiber-example":{"id":"otelfiber/example/otelfiber-example","title":"Example","description":"An HTTP server using gofiber fiber and instrumentation. The server has a","sidebar":"tutorialSidebar"},"otelfiber/otelfiber":{"id":"otelfiber/otelfiber","title":"Otelfiber","description":"Release","sidebar":"tutorialSidebar"},"paseto/paseto":{"id":"paseto/paseto","title":"Paseto","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"Discord","sidebar":"tutorialSidebar"},"swagger/swagger":{"id":"swagger/swagger","title":"Swagger","description":"Release","sidebar":"tutorialSidebar"},"websocket/websocket":{"id":"websocket/websocket","title":"Websocket","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/16a87a21.217d99f4.js b/assets/js/16a87a21.217d99f4.js deleted file mode 100644 index ba29afa7313..00000000000 --- a/assets/js/16a87a21.217d99f4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1305],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=m(r),g=a,f=c["".concat(s,".").concat(g)]||c[g]||u[g]||o;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var m=2;m{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(7462),a=(r(7294),r(3905));const o={id:"memory",title:"Memory"},i=void 0,l={unversionedId:"memory/memory",id:"version-ristretto_v1.x.x/memory/memory",title:"Memory",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/memory/README.md",sourceDirName:"memory",slug:"/memory/",permalink:"/storage/ristretto_v1.x.x/memory/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memory/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memory",title:"Memory"},sidebar:"tutorialSidebar",previous:{title:"Memcache",permalink:"/storage/ristretto_v1.x.x/memcache/"},next:{title:"MongoDB",permalink:"/storage/ristretto_v1.x.x/mongodb/"}},s={},m=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:m},c="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memory*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"An in-memory storage driver."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() map[string]entry\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Memory is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the memory implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memory"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := memory.New()\n\n// Initialize custom config\nstore := memory.New(memory.Config{\n GCInterval: 10 * time.Second,\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Time before deleting expired keys\n //\n // Default is 10 * time.Second\n GCInterval time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n GCInterval: 10 * time.Second,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/16a87a21.bc85fd5a.js b/assets/js/16a87a21.bc85fd5a.js new file mode 100644 index 00000000000..bde2486035d --- /dev/null +++ b/assets/js/16a87a21.bc85fd5a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1305],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=m(r),g=a,f=c["".concat(s,".").concat(g)]||c[g]||u[g]||o;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var m=2;m{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(87462),a=(r(67294),r(3905));const o={id:"memory",title:"Memory"},i=void 0,l={unversionedId:"memory/memory",id:"version-ristretto_v1.x.x/memory/memory",title:"Memory",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/memory/README.md",sourceDirName:"memory",slug:"/memory/",permalink:"/storage/ristretto_v1.x.x/memory/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memory/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memory",title:"Memory"},sidebar:"tutorialSidebar",previous:{title:"Memcache",permalink:"/storage/ristretto_v1.x.x/memcache/"},next:{title:"MongoDB",permalink:"/storage/ristretto_v1.x.x/mongodb/"}},s={},m=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:m},c="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memory*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"An in-memory storage driver."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() map[string]entry\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Memory is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the memory implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memory"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := memory.New()\n\n// Initialize custom config\nstore := memory.New(memory.Config{\n GCInterval: 10 * time.Second,\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Time before deleting expired keys\n //\n // Default is 10 * time.Second\n GCInterval time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n GCInterval: 10 * time.Second,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/176e278d.ca91b8b5.js b/assets/js/176e278d.ca91b8b5.js deleted file mode 100644 index 0516ff5562d..00000000000 --- a/assets/js/176e278d.ca91b8b5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[370],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>c});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),d=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},g=function(e){var t=d(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),p=d(n),f=i,c=p["".concat(l,".").concat(f)]||p[f]||u[f]||a;return n?r.createElement(c,s(s({ref:t},g),{},{components:n})):r.createElement(c,s({ref:t},g))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,s=new Array(a);s[0]=f;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[p]="string"==typeof e?e:i,s[1]=o;for(var d=2;d{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var r=n(7462),i=(n(7294),n(3905));const a={id:"redis",title:"Redis"},s=void 0,o={unversionedId:"redis/redis",id:"version-ristretto_v1.x.x/redis/redis",title:"Redis",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/redis/README.md",sourceDirName:"redis",slug:"/redis/",permalink:"/storage/ristretto_v1.x.x/redis/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/redis/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"redis",title:"Redis"},sidebar:"tutorialSidebar",previous:{title:"Postgres",permalink:"/storage/ristretto_v1.x.x/postgres/"},next:{title:"Ristretto",permalink:"/storage/ristretto_v1.x.x/ristretto/"}},l={},d=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=redis*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?label=Tests",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,i.kt)("p",null,"A Redis storage driver using ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-redis/redis"},"go-redis/redis"),"."),(0,i.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() redis.UniversalClient\n")),(0,i.kt)("h3",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Redis is tested on the 2 last ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,i.kt)("p",null,"And then install the redis implementation:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/redis/v2\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the storage package."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/redis/v2"\n')),(0,i.kt)("p",null,"You can use the one of the following options to create a Redis Storage:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := redis.New()\n\n// Initialize custom config\nstore := redis.New(redis.Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n})\n\n// Initialize Redis Failover Client\nstore := redis.New(redis.Config{\n MasterName: "master-name",\n Addrs: []string{":6379"},\n})\n\n// Initialize Redis Cluster Client\nstore := redis.New(redis.Config{\n Addrs: []string{":6379", ":6380"},\n})\n\n// Create a client with support for TLS\ncer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")\nif err != nil {\n log.Println(err)\n return\n}\ntlsCfg := &tls.Config{\n MinVersion: tls.VersionTLS12,\n InsecureSkipVerify: true,\n Certificates: []tls.Certificate{cer},\n}\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n TLSConfig: tlsCfg,\n Reset: false,\n})\n\n// Create a client with a Redis URL with all information.\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n Reset: false,\n})\n')),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 6379\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database to be selected after connecting to the server.\n //\n // Optional. Default is 0\n Database int\n\n // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.\n //\n // Example: redis://:@localhost:6379/\n // Optional. Default is ""\n URL string\n\n // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient\n //\n // Optional. Default is []string{}\n Addrs []string\n\n // MasterName is the sentinel master\'s name\n //\n // Optional. Default is ""\n MasterName string\n\n // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.\n //\n // Optional. Default is ""\n ClientName string\n\n // SentinelUsername\n //\n // Optional. Default is ""\n SentinelUsername string\n\n // SentinelPassword\n //\n // Optional. Default is ""\n SentinelPassword string\n\n // Reset clears any existing keys in existing Collection\n //\n // Optional. Default is false\n Reset bool\n\n // TLS Config to use. When set TLS will be negotiated.\n //\n // Optional. Default is nil\n TLSConfig *tls.Config\n\n // Maximum number of socket connections.\n //\n // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.\n PoolSize int\n}\n')),(0,i.kt)("h3",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n URL: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n Addrs: []string{},\n MasterName: "",\n ClientName: "",\n SentinelUsername: "",\n SentinelPassword: "",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/176e278d.eb8c7c2a.js b/assets/js/176e278d.eb8c7c2a.js new file mode 100644 index 00000000000..658f9a85adf --- /dev/null +++ b/assets/js/176e278d.eb8c7c2a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[370],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>c});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),d=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},g=function(e){var t=d(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),p=d(n),f=i,c=p["".concat(l,".").concat(f)]||p[f]||u[f]||a;return n?r.createElement(c,s(s({ref:t},g),{},{components:n})):r.createElement(c,s({ref:t},g))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,s=new Array(a);s[0]=f;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[p]="string"==typeof e?e:i,s[1]=o;for(var d=2;d{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var r=n(87462),i=(n(67294),n(3905));const a={id:"redis",title:"Redis"},s=void 0,o={unversionedId:"redis/redis",id:"version-ristretto_v1.x.x/redis/redis",title:"Redis",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/redis/README.md",sourceDirName:"redis",slug:"/redis/",permalink:"/storage/ristretto_v1.x.x/redis/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/redis/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"redis",title:"Redis"},sidebar:"tutorialSidebar",previous:{title:"Postgres",permalink:"/storage/ristretto_v1.x.x/postgres/"},next:{title:"Ristretto",permalink:"/storage/ristretto_v1.x.x/ristretto/"}},l={},d=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=redis*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?label=Tests",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,i.kt)("p",null,"A Redis storage driver using ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-redis/redis"},"go-redis/redis"),"."),(0,i.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() redis.UniversalClient\n")),(0,i.kt)("h3",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Redis is tested on the 2 last ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,i.kt)("p",null,"And then install the redis implementation:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/redis/v2\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the storage package."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/redis/v2"\n')),(0,i.kt)("p",null,"You can use the one of the following options to create a Redis Storage:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := redis.New()\n\n// Initialize custom config\nstore := redis.New(redis.Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n})\n\n// Initialize Redis Failover Client\nstore := redis.New(redis.Config{\n MasterName: "master-name",\n Addrs: []string{":6379"},\n})\n\n// Initialize Redis Cluster Client\nstore := redis.New(redis.Config{\n Addrs: []string{":6379", ":6380"},\n})\n\n// Create a client with support for TLS\ncer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")\nif err != nil {\n log.Println(err)\n return\n}\ntlsCfg := &tls.Config{\n MinVersion: tls.VersionTLS12,\n InsecureSkipVerify: true,\n Certificates: []tls.Certificate{cer},\n}\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n TLSConfig: tlsCfg,\n Reset: false,\n})\n\n// Create a client with a Redis URL with all information.\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n Reset: false,\n})\n')),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 6379\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database to be selected after connecting to the server.\n //\n // Optional. Default is 0\n Database int\n\n // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.\n //\n // Example: redis://:@localhost:6379/\n // Optional. Default is ""\n URL string\n\n // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient\n //\n // Optional. Default is []string{}\n Addrs []string\n\n // MasterName is the sentinel master\'s name\n //\n // Optional. Default is ""\n MasterName string\n\n // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.\n //\n // Optional. Default is ""\n ClientName string\n\n // SentinelUsername\n //\n // Optional. Default is ""\n SentinelUsername string\n\n // SentinelPassword\n //\n // Optional. Default is ""\n SentinelPassword string\n\n // Reset clears any existing keys in existing Collection\n //\n // Optional. Default is false\n Reset bool\n\n // TLS Config to use. When set TLS will be negotiated.\n //\n // Optional. Default is nil\n TLSConfig *tls.Config\n\n // Maximum number of socket connections.\n //\n // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.\n PoolSize int\n}\n')),(0,i.kt)("h3",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n URL: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n Addrs: []string{},\n MasterName: "",\n ClientName: "",\n SentinelUsername: "",\n SentinelPassword: "",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/17896441.5ae1596f.js b/assets/js/17896441.5ae1596f.js deleted file mode 100644 index 767618db7f5..00000000000 --- a/assets/js/17896441.5ae1596f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7918],{9408:(e,n,t)=>{t.d(n,{Z:()=>l});var r=t(7294),u=t(3120),c=t(143);function l(e){const n=(0,c.gA)();return"default"!==n?.pluginId&&"current"!==(0,c.Iw)(n.pluginId)?.activeVersion?.name?null:r.createElement(r.Fragment,null,r.createElement(u.Z,e))}}}]); \ No newline at end of file diff --git a/assets/js/17896441.d5d54bdb.js b/assets/js/17896441.d5d54bdb.js new file mode 100644 index 00000000000..cc9c1e2479f --- /dev/null +++ b/assets/js/17896441.d5d54bdb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7918],{19408:(e,n,t)=>{t.d(n,{Z:()=>l});var r=t(67294),u=t(23120),c=t(80143);function l(e){const n=(0,c.gA)();return"default"!==n?.pluginId&&"current"!==(0,c.Iw)(n.pluginId)?.activeVersion?.name?null:r.createElement(r.Fragment,null,r.createElement(u.Z,e))}}}]); \ No newline at end of file diff --git a/assets/js/187263b9.0358fff5.js b/assets/js/187263b9.0358fff5.js deleted file mode 100644 index d025f37c025..00000000000 --- a/assets/js/187263b9.0358fff5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[425],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),g=u(n),f=a,m=g["".concat(l,".").concat(f)]||g[f]||p[f]||i;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[g]="string"==typeof e?e:a,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var r=n(7462),a=(n(7294),n(3905));const i={id:"s3",title:"S3"},o=void 0,s={unversionedId:"s3/s3",id:"s3/s3",title:"S3",description:"Release",source:"@site/docs/storage/s3/README.md",sourceDirName:"s3",slug:"/s3/",permalink:"/storage/next/s3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/s3/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"s3",title:"S3"},sidebar:"tutorialSidebar",previous:{title:"Ristretto",permalink:"/storage/next/ristretto/"},next:{title:"SQLite3",permalink:"/storage/next/sqlite3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=s3*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A S3 storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,a.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *s3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"S3 is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the s3 implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/s3\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/s3"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := s3.New()\n\n// Initialize custom config\nstore := s3.New(s3.Config{\n Bucket: "my-bucket-url",\n Endpoint: "my-endpoint",\n Region: "my-region",\n Reset: false,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for storage.\ntype Config struct {\n // S3 bucket name\n Bucket string\n\n // AWS endpoint\n Endpoint string\n\n // AWS region\n Region string\n\n // Request timeout\n //\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("p",null,"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Bucket: "",\n Region: "",\n Endpoint: "",\n Credentials: Credentials{},\n MaxAttempts: 3,\n RequestTimeout: 0,\n Reset: false,\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/187263b9.4d27771a.js b/assets/js/187263b9.4d27771a.js new file mode 100644 index 00000000000..6904b1d6cd2 --- /dev/null +++ b/assets/js/187263b9.4d27771a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[425],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),g=u(n),f=a,m=g["".concat(l,".").concat(f)]||g[f]||p[f]||i;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[g]="string"==typeof e?e:a,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var r=n(87462),a=(n(67294),n(3905));const i={id:"s3",title:"S3"},o=void 0,s={unversionedId:"s3/s3",id:"s3/s3",title:"S3",description:"Release",source:"@site/docs/storage/s3/README.md",sourceDirName:"s3",slug:"/s3/",permalink:"/storage/next/s3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/s3/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"s3",title:"S3"},sidebar:"tutorialSidebar",previous:{title:"Ristretto",permalink:"/storage/next/ristretto/"},next:{title:"SQLite3",permalink:"/storage/next/sqlite3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=s3*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A S3 storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,a.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *s3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"S3 is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the s3 implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/s3\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/s3"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := s3.New()\n\n// Initialize custom config\nstore := s3.New(s3.Config{\n Bucket: "my-bucket-url",\n Endpoint: "my-endpoint",\n Region: "my-region",\n Reset: false,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for storage.\ntype Config struct {\n // S3 bucket name\n Bucket string\n\n // AWS endpoint\n Endpoint string\n\n // AWS region\n Region string\n\n // Request timeout\n //\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("p",null,"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Bucket: "",\n Region: "",\n Endpoint: "",\n Credentials: Credentials{},\n MaxAttempts: 3,\n RequestTimeout: 0,\n Reset: false,\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/18fc6999.052e2b80.js b/assets/js/18fc6999.052e2b80.js new file mode 100644 index 00000000000..7ccc16973a2 --- /dev/null +++ b/assets/js/18fc6999.052e2b80.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6429],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>g});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),d=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=d(e.components);return n.createElement(p.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=d(r),m=a,g=c["".concat(p,".").concat(m)]||c[m]||f[m]||i;return r?n.createElement(g,o(o({ref:t},s),{},{components:r})):n.createElement(g,o({ref:t},s))}));function g(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var n=r(87462),a=(r(67294),r(3905));const i={id:"otelfiber",title:"Otelfiber"},o=void 0,l={unversionedId:"otelfiber/otelfiber",id:"version-fiberzerolog_v0.x.x/otelfiber/otelfiber",title:"Otelfiber",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/otelfiber/README.md",sourceDirName:"otelfiber",slug:"/otelfiber/",permalink:"/contrib/otelfiber/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/otelfiber/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"otelfiber",title:"Otelfiber"},sidebar:"tutorialSidebar",previous:{title:"Opafiber",permalink:"/contrib/opafiber/"},next:{title:"Example",permalink:"/contrib/otelfiber/example/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Example",id:"example",level:3}],s={toc:d},c="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=otelfiber*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," support for Fiber."),(0,a.kt)("p",null,"Can be found on ",(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/registry/instrumentation-go-fiber/"},"OpenTelemetry Registry"),"."),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("p",null,"This middleware supports Fiber v2."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/contrib/otelfiber\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"otelfiber.Middleware(opts ...Option) fiber.Handler\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Next"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Define a function to skip this middleware when returned trueRequired - Rego quer"),(0,a.kt)("td",{parentName:"tr",align:"left"},"nil")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"TracerProvider"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"oteltrace.TracerProvider")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Specifies a tracer provider to use for creating a tracer"),(0,a.kt)("td",{parentName:"tr",align:"left"},"nil - the global tracer provider is used")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"MeterProvider"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"otelmetric.MeterProvider")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Specifies a meter provider to use for reporting"),(0,a.kt)("td",{parentName:"tr",align:"left"},"nil - the global meter provider is used")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Port"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"*int")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Specifies the value to use when setting the ",(0,a.kt)("inlineCode",{parentName:"td"},"net.host.port")," attribute on metrics/spans"),(0,a.kt)("td",{parentName:"tr",align:"left"},"Required: If not default (",(0,a.kt)("inlineCode",{parentName:"td"},"80")," for ",(0,a.kt)("inlineCode",{parentName:"td"},"http"),", ",(0,a.kt)("inlineCode",{parentName:"td"},"443")," for ",(0,a.kt)("inlineCode",{parentName:"td"},"https"),")")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Propagators"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"propagation.TextMapPropagator")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Specifies propagators to use for extracting information from the HTTP requests"),(0,a.kt)("td",{parentName:"tr",align:"left"},"If none are specified, global ones will be used")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"ServerName"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"*string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"specifies the value to use when setting the ",(0,a.kt)("inlineCode",{parentName:"td"},"http.server_name")," attribute on metrics/spans"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SpanNameFormatter"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Takes a function that will be called on every request and the returned string will become the Span Name"),(0,a.kt)("td",{parentName:"tr",align:"left"},"default formatter returns the route pathRaw")))),(0,a.kt)("h3",{id:"usage"},"Usage"),(0,a.kt)("p",null,"Please refer to ",(0,a.kt)("a",{parentName:"p",href:"./example"},"example")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "context"\n "errors"\n "log"\n\n "go.opentelemetry.io/otel/sdk/resource"\n\n "github.com/gofiber/fiber/v2"\n\n "github.com/gofiber/contrib/otelfiber"\n "go.opentelemetry.io/otel"\n "go.opentelemetry.io/otel/attribute"\n stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"\n\n //"go.opentelemetry.io/otel/exporters/jaeger"\n "go.opentelemetry.io/otel/propagation"\n sdktrace "go.opentelemetry.io/otel/sdk/trace"\n semconv "go.opentelemetry.io/otel/semconv/v1.4.0"\n oteltrace "go.opentelemetry.io/otel/trace"\n)\n\nvar tracer = otel.Tracer("fiber-server")\n\nfunc main() {\n tp := initTracer()\n defer func() {\n if err := tp.Shutdown(context.Background()); err != nil {\n log.Printf("Error shutting down tracer provider: %v", err)\n }\n }()\n\n app := fiber.New()\n\n app.Use(otelfiber.Middleware())\n\n app.Get("/error", func(ctx *fiber.Ctx) error {\n return errors.New("abc")\n })\n\n app.Get("/users/:id", func(c *fiber.Ctx) error {\n id := c.Params("id")\n name := getUser(c.UserContext(), id)\n return c.JSON(fiber.Map{"id": id, name: name})\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\nfunc initTracer() *sdktrace.TracerProvider {\n exporter, err := stdout.New(stdout.WithPrettyPrint())\n if err != nil {\n log.Fatal(err)\n }\n tp := sdktrace.NewTracerProvider(\n sdktrace.WithSampler(sdktrace.AlwaysSample()),\n sdktrace.WithBatcher(exporter),\n sdktrace.WithResource(\n resource.NewWithAttributes(\n semconv.SchemaURL,\n semconv.ServiceNameKey.String("my-service"),\n )),\n )\n otel.SetTracerProvider(tp)\n otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))\n return tp\n}\n\nfunc getUser(ctx context.Context, id string) string {\n _, span := tracer.Start(ctx, "getUser", oteltrace.WithAttributes(attribute.String("id", id)))\n defer span.End()\n if id == "123" {\n return "otelfiber tester"\n }\n return "unknown"\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/18fc6999.83952775.js b/assets/js/18fc6999.83952775.js deleted file mode 100644 index 056b32e928f..00000000000 --- a/assets/js/18fc6999.83952775.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6429],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>g});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),d=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=d(e.components);return n.createElement(p.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=d(r),m=a,g=c["".concat(p,".").concat(m)]||c[m]||f[m]||i;return r?n.createElement(g,o(o({ref:t},s),{},{components:r})):n.createElement(g,o({ref:t},s))}));function g(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var n=r(7462),a=(r(7294),r(3905));const i={id:"otelfiber",title:"Otelfiber"},o=void 0,l={unversionedId:"otelfiber/otelfiber",id:"version-fiberzerolog_v0.x.x/otelfiber/otelfiber",title:"Otelfiber",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/otelfiber/README.md",sourceDirName:"otelfiber",slug:"/otelfiber/",permalink:"/contrib/otelfiber/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/otelfiber/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"otelfiber",title:"Otelfiber"},sidebar:"tutorialSidebar",previous:{title:"Opafiber",permalink:"/contrib/opafiber/"},next:{title:"Example",permalink:"/contrib/otelfiber/example/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Example",id:"example",level:3}],s={toc:d},c="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=otelfiber*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," support for Fiber."),(0,a.kt)("p",null,"Can be found on ",(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/registry/instrumentation-go-fiber/"},"OpenTelemetry Registry"),"."),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("p",null,"This middleware supports Fiber v2."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/contrib/otelfiber\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"otelfiber.Middleware(opts ...Option) fiber.Handler\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Next"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Define a function to skip this middleware when returned trueRequired - Rego quer"),(0,a.kt)("td",{parentName:"tr",align:"left"},"nil")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"TracerProvider"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"oteltrace.TracerProvider")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Specifies a tracer provider to use for creating a tracer"),(0,a.kt)("td",{parentName:"tr",align:"left"},"nil - the global tracer provider is used")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"MeterProvider"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"otelmetric.MeterProvider")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Specifies a meter provider to use for reporting"),(0,a.kt)("td",{parentName:"tr",align:"left"},"nil - the global meter provider is used")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Port"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"*int")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Specifies the value to use when setting the ",(0,a.kt)("inlineCode",{parentName:"td"},"net.host.port")," attribute on metrics/spans"),(0,a.kt)("td",{parentName:"tr",align:"left"},"Required: If not default (",(0,a.kt)("inlineCode",{parentName:"td"},"80")," for ",(0,a.kt)("inlineCode",{parentName:"td"},"http"),", ",(0,a.kt)("inlineCode",{parentName:"td"},"443")," for ",(0,a.kt)("inlineCode",{parentName:"td"},"https"),")")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Propagators"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"propagation.TextMapPropagator")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Specifies propagators to use for extracting information from the HTTP requests"),(0,a.kt)("td",{parentName:"tr",align:"left"},"If none are specified, global ones will be used")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"ServerName"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"*string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"specifies the value to use when setting the ",(0,a.kt)("inlineCode",{parentName:"td"},"http.server_name")," attribute on metrics/spans"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SpanNameFormatter"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Takes a function that will be called on every request and the returned string will become the Span Name"),(0,a.kt)("td",{parentName:"tr",align:"left"},"default formatter returns the route pathRaw")))),(0,a.kt)("h3",{id:"usage"},"Usage"),(0,a.kt)("p",null,"Please refer to ",(0,a.kt)("a",{parentName:"p",href:"./example"},"example")),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "context"\n "errors"\n "log"\n\n "go.opentelemetry.io/otel/sdk/resource"\n\n "github.com/gofiber/fiber/v2"\n\n "github.com/gofiber/contrib/otelfiber"\n "go.opentelemetry.io/otel"\n "go.opentelemetry.io/otel/attribute"\n stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"\n\n //"go.opentelemetry.io/otel/exporters/jaeger"\n "go.opentelemetry.io/otel/propagation"\n sdktrace "go.opentelemetry.io/otel/sdk/trace"\n semconv "go.opentelemetry.io/otel/semconv/v1.4.0"\n oteltrace "go.opentelemetry.io/otel/trace"\n)\n\nvar tracer = otel.Tracer("fiber-server")\n\nfunc main() {\n tp := initTracer()\n defer func() {\n if err := tp.Shutdown(context.Background()); err != nil {\n log.Printf("Error shutting down tracer provider: %v", err)\n }\n }()\n\n app := fiber.New()\n\n app.Use(otelfiber.Middleware())\n\n app.Get("/error", func(ctx *fiber.Ctx) error {\n return errors.New("abc")\n })\n\n app.Get("/users/:id", func(c *fiber.Ctx) error {\n id := c.Params("id")\n name := getUser(c.UserContext(), id)\n return c.JSON(fiber.Map{"id": id, name: name})\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\nfunc initTracer() *sdktrace.TracerProvider {\n exporter, err := stdout.New(stdout.WithPrettyPrint())\n if err != nil {\n log.Fatal(err)\n }\n tp := sdktrace.NewTracerProvider(\n sdktrace.WithSampler(sdktrace.AlwaysSample()),\n sdktrace.WithBatcher(exporter),\n sdktrace.WithResource(\n resource.NewWithAttributes(\n semconv.SchemaURL,\n semconv.ServiceNameKey.String("my-service"),\n )),\n )\n otel.SetTracerProvider(tp)\n otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))\n return tp\n}\n\nfunc getUser(ctx context.Context, id string) string {\n _, span := tracer.Start(ctx, "getUser", oteltrace.WithAttributes(attribute.String("id", id)))\n defer span.End()\n if id == "123" {\n return "otelfiber tester"\n }\n return "unknown"\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/19323918.21060c17.js b/assets/js/19323918.21060c17.js deleted file mode 100644 index fefad36ef41..00000000000 --- a/assets/js/19323918.21060c17.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2650],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>c});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},g=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),p=u(n),f=i,c=p["".concat(l,".").concat(f)]||p[f]||d[f]||a;return n?r.createElement(c,s(s({ref:t},g),{},{components:n})):r.createElement(c,s({ref:t},g))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,s=new Array(a);s[0]=f;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[p]="string"==typeof e?e:i,s[1]=o;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>u});var r=n(7462),i=(n(7294),n(3905));const a={id:"redis",title:"Redis"},s=void 0,o={unversionedId:"redis/redis",id:"redis/redis",title:"Redis",description:"Release",source:"@site/docs/storage/redis/README.md",sourceDirName:"redis",slug:"/redis/",permalink:"/storage/next/redis/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/redis/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"redis",title:"Redis"},sidebar:"tutorialSidebar",previous:{title:"Postgres",permalink:"/storage/next/postgres/"},next:{title:"Ristretto",permalink:"/storage/next/ristretto/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:u},p="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=redis*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?label=Tests",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,i.kt)("p",null,"A Redis storage driver using ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-redis/redis"},"go-redis/redis"),"."),(0,i.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() redis.UniversalClient\n")),(0,i.kt)("h3",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Redis is tested on the 2 last ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,i.kt)("p",null,"And then install the redis implementation:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/redis/v2\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the storage package."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/redis/v2"\n')),(0,i.kt)("p",null,"You can use the one of the following options to create a Redis Storage:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := redis.New()\n\n// Initialize custom config\nstore := redis.New(redis.Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n})\n\n// Initialize Redis Failover Client\nstore := redis.New(redis.Config{\n MasterName: "master-name",\n Addrs: []string{":6379"},\n})\n\n// Initialize Redis Cluster Client\nstore := redis.New(redis.Config{\n Addrs: []string{":6379", ":6380"},\n})\n\n// Create a client with support for TLS\ncer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")\nif err != nil {\n log.Println(err)\n return\n}\ntlsCfg := &tls.Config{\n MinVersion: tls.VersionTLS12,\n InsecureSkipVerify: true,\n Certificates: []tls.Certificate{cer},\n}\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n TLSConfig: tlsCfg,\n Reset: false,\n})\n\n// Create a client with a Redis URL with all information.\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n Reset: false,\n})\n')),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 6379\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database to be selected after connecting to the server.\n //\n // Optional. Default is 0\n Database int\n\n // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.\n //\n // Example: redis://:@localhost:6379/\n // Optional. Default is ""\n URL string\n\n // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient\n //\n // Optional. Default is []string{}\n Addrs []string\n\n // MasterName is the sentinel master\'s name\n //\n // Optional. Default is ""\n MasterName string\n\n // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.\n //\n // Optional. Default is ""\n ClientName string\n\n // SentinelUsername\n //\n // Optional. Default is ""\n SentinelUsername string\n\n // SentinelPassword\n //\n // Optional. Default is ""\n SentinelPassword string\n\n // Reset clears any existing keys in existing Collection\n //\n // Optional. Default is false\n Reset bool\n\n // TLS Config to use. When set TLS will be negotiated.\n //\n // Optional. Default is nil\n TLSConfig *tls.Config\n\n // Maximum number of socket connections.\n //\n // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.\n PoolSize int\n}\n')),(0,i.kt)("h3",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n URL: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n Addrs: []string{},\n MasterName: "",\n ClientName: "",\n SentinelUsername: "",\n SentinelPassword: "",\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/19323918.a51d8e36.js b/assets/js/19323918.a51d8e36.js new file mode 100644 index 00000000000..0e6d53237f6 --- /dev/null +++ b/assets/js/19323918.a51d8e36.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2650],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>c});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},g=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),p=u(n),f=i,c=p["".concat(l,".").concat(f)]||p[f]||d[f]||a;return n?r.createElement(c,s(s({ref:t},g),{},{components:n})):r.createElement(c,s({ref:t},g))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,s=new Array(a);s[0]=f;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[p]="string"==typeof e?e:i,s[1]=o;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>u});var r=n(87462),i=(n(67294),n(3905));const a={id:"redis",title:"Redis"},s=void 0,o={unversionedId:"redis/redis",id:"redis/redis",title:"Redis",description:"Release",source:"@site/docs/storage/redis/README.md",sourceDirName:"redis",slug:"/redis/",permalink:"/storage/next/redis/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/redis/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"redis",title:"Redis"},sidebar:"tutorialSidebar",previous:{title:"Postgres",permalink:"/storage/next/postgres/"},next:{title:"Ristretto",permalink:"/storage/next/ristretto/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:u},p="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=redis*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?label=Tests",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,i.kt)("p",null,"A Redis storage driver using ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-redis/redis"},"go-redis/redis"),"."),(0,i.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() redis.UniversalClient\n")),(0,i.kt)("h3",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Redis is tested on the 2 last ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,i.kt)("p",null,"And then install the redis implementation:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/redis/v2\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the storage package."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/redis/v2"\n')),(0,i.kt)("p",null,"You can use the one of the following options to create a Redis Storage:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := redis.New()\n\n// Initialize custom config\nstore := redis.New(redis.Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n})\n\n// Initialize Redis Failover Client\nstore := redis.New(redis.Config{\n MasterName: "master-name",\n Addrs: []string{":6379"},\n})\n\n// Initialize Redis Cluster Client\nstore := redis.New(redis.Config{\n Addrs: []string{":6379", ":6380"},\n})\n\n// Create a client with support for TLS\ncer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")\nif err != nil {\n log.Println(err)\n return\n}\ntlsCfg := &tls.Config{\n MinVersion: tls.VersionTLS12,\n InsecureSkipVerify: true,\n Certificates: []tls.Certificate{cer},\n}\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n TLSConfig: tlsCfg,\n Reset: false,\n})\n\n// Create a client with a Redis URL with all information.\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n Reset: false,\n})\n')),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 6379\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database to be selected after connecting to the server.\n //\n // Optional. Default is 0\n Database int\n\n // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.\n //\n // Example: redis://:@localhost:6379/\n // Optional. Default is ""\n URL string\n\n // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient\n //\n // Optional. Default is []string{}\n Addrs []string\n\n // MasterName is the sentinel master\'s name\n //\n // Optional. Default is ""\n MasterName string\n\n // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.\n //\n // Optional. Default is ""\n ClientName string\n\n // SentinelUsername\n //\n // Optional. Default is ""\n SentinelUsername string\n\n // SentinelPassword\n //\n // Optional. Default is ""\n SentinelPassword string\n\n // Reset clears any existing keys in existing Collection\n //\n // Optional. Default is false\n Reset bool\n\n // TLS Config to use. When set TLS will be negotiated.\n //\n // Optional. Default is nil\n TLSConfig *tls.Config\n\n // Maximum number of socket connections.\n //\n // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.\n PoolSize int\n}\n')),(0,i.kt)("h3",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n URL: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n Addrs: []string{},\n MasterName: "",\n ClientName: "",\n SentinelUsername: "",\n SentinelPassword: "",\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/19e7c5f6.685bf749.js b/assets/js/19e7c5f6.685bf749.js deleted file mode 100644 index 3097adbd8a9..00000000000 --- a/assets/js/19e7c5f6.685bf749.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4856],{3905:(e,t,n)=>{n.d(t,{Zo:()=>f,kt:()=>d});var i=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=i.createContext({}),p=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},f=function(e){var t=p(e.components);return i.createElement(l.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},u=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,f=s(e,["components","mdxType","originalType","parentName"]),m=p(n),u=a,d=m["".concat(l,".").concat(u)]||m[u]||c[u]||r;return n?i.createElement(d,o(o({ref:t},f),{},{components:n})):i.createElement(d,o({ref:t},f))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[m]="string"==typeof e?e:a,o[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var i=n(7462),a=(n(7294),n(3905));const r={id:"filesystem",title:"FileSystem"},o=void 0,s={unversionedId:"api/middleware/filesystem",id:"version-v2.x/api/middleware/filesystem",title:"FileSystem",description:"Filesystem middleware for Fiber that enables you to serve files from a directory.",source:"@site/versioned_docs/version-v2.x/api/middleware/filesystem.md",sourceDirName:"api/middleware",slug:"/api/middleware/filesystem",permalink:"/api/middleware/filesystem",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"filesystem",title:"FileSystem"},sidebar:"tutorialSidebar",previous:{title:"Favicon",permalink:"/api/middleware/favicon"},next:{title:"Helmet",permalink:"/api/middleware/helmet"}},l={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"embed",id:"embed",level:2},{value:"pkger",id:"pkger",level:2},{value:"packr",id:"packr",level:2},{value:"go.rice",id:"gorice",level:2},{value:"fileb0x",id:"fileb0x",level:2},{value:"statik",id:"statik",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],f={toc:p},m="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,i.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Filesystem middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that enables you to serve files from a directory."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("inlineCode",{parentName:"strong"},":params")," & ",(0,a.kt)("inlineCode",{parentName:"strong"},":optionals?")," within the prefix path are not supported!")),(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("strong",{parentName:"p"},"To handle paths with spaces (or other url encoded values) make sure to set ",(0,a.kt)("inlineCode",{parentName:"strong"},"fiber.Config{ UnescapePath: true }")))),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Provide a minimal config\napp.Use(filesystem.New(filesystem.Config{\n Root: http.Dir("./assets"),\n}))\n\n// Or extend your config for customization\napp.Use(filesystem.New(filesystem.Config{\n Root: http.Dir("./assets"),\n Browse: true,\n Index: "index.html",\n NotFoundFile: "404.html",\n MaxAge: 3600,\n}))\n')),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"If your environment (Go 1.16+) supports it, we recommend using Go Embed instead of the other solutions listed as this one is native to Go and the easiest to use.")),(0,a.kt)("h2",{id:"embed"},"embed"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://golang.org/pkg/embed/"},"Embed")," is the native method to embed files in a Golang excecutable. Introduced in Go 1.16."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "embed"\n "io/fs"\n "log"\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n)\n\n// Embed a single file\n//go:embed index.html\nvar f embed.FS\n\n// Embed a directory\n//go:embed static/*\nvar embedDirStatic embed.FS\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/", filesystem.New(filesystem.Config{\n Root: http.FS(f),\n }))\n\n // Access file "image.png" under `static/` directory via URL: `http:///static/image.png`.\n // Without `PathPrefix`, you have to access it via URL:\n // `http:///static/static/image.png`.\n app.Use("/static", filesystem.New(filesystem.Config{\n Root: http.FS(embedDirStatic),\n PathPrefix: "static",\n Browse: true,\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"pkger"},"pkger"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/markbates/pkger"},"https://github.com/markbates/pkger")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n\n "github.com/markbates/pkger"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/assets", filesystem.New(filesystem.Config{\n Root: pkger.Dir("/assets"),\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"packr"},"packr"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/gobuffalo/packr"},"https://github.com/gobuffalo/packr")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n\n "github.com/gobuffalo/packr/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/assets", filesystem.New(filesystem.Config{\n Root: packr.New("Assets Box", "/assets"),\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"gorice"},"go.rice"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/GeertJohan/go.rice"},"https://github.com/GeertJohan/go.rice")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n\n "github.com/GeertJohan/go.rice"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/assets", filesystem.New(filesystem.Config{\n Root: rice.MustFindBox("assets").HTTPBox(),\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"fileb0x"},"fileb0x"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/UnnoTed/fileb0x"},"https://github.com/UnnoTed/fileb0x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n\n "/myEmbeddedFiles"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/assets", filesystem.New(filesystem.Config{\n Root: myEmbeddedFiles.HTTP,\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"statik"},"statik"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/rakyll/statik"},"https://github.com/rakyll/statik")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n\n // Use blank to invoke init function and register data to statik\n _ "/statik" \n "github.com/rakyll/statik/fs"\n)\n\nfunc main() {\n statikFS, err := fs.New()\n if err != nil {\n panic(err)\n }\n\n app := fiber.New()\n\n app.Use("/", filesystem.New(filesystem.Config{\n Root: statikFS,\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Root is a FileSystem that provides access\n // to a collection of files and directories.\n //\n // Required. Default: nil\n Root http.FileSystem `json:"-"`\n\n // PathPrefix defines a prefix to be added to a filepath when\n // reading a file from the FileSystem.\n //\n // Use when using Go 1.16 embed.FS\n //\n // Optional. Default ""\n PathPrefix string `json:"path_prefix"`\n\n // Enable directory browsing.\n //\n // Optional. Default: false\n Browse bool `json:"browse"`\n\n // Index file for serving a directory.\n //\n // Optional. Default: "index.html"\n Index string `json:"index"`\n\n // The value for the Cache-Control HTTP-header\n // that is set on the file response. MaxAge is defined in seconds.\n //\n // Optional. Default value 0.\n MaxAge int `json:"max_age"`\n\n // File to return if path is not found. Useful for SPA\'s.\n //\n // Optional. Default: ""\n NotFoundFile string `json:"not_found_file"`\n \n // The value for the Content-Type HTTP-header\n // that is set on the file response\n //\n // Optional. Default: ""\n ContentTypeCharset string `json:"content_type_charset"`\n}\n')),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n Root: nil,\n PathPrefix: "",\n Browse: false,\n Index: "/index.html",\n MaxAge: 0,\n ContentTypeCharset: "",\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/19e7c5f6.964dc6c3.js b/assets/js/19e7c5f6.964dc6c3.js new file mode 100644 index 00000000000..2cfa85a2dac --- /dev/null +++ b/assets/js/19e7c5f6.964dc6c3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4856],{3905:(e,t,n)=>{n.d(t,{Zo:()=>f,kt:()=>d});var i=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=i.createContext({}),p=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},f=function(e){var t=p(e.components);return i.createElement(l.Provider,{value:t},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},u=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,f=s(e,["components","mdxType","originalType","parentName"]),m=p(n),u=a,d=m["".concat(l,".").concat(u)]||m[u]||c[u]||r;return n?i.createElement(d,o(o({ref:t},f),{},{components:n})):i.createElement(d,o({ref:t},f))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[m]="string"==typeof e?e:a,o[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var i=n(87462),a=(n(67294),n(3905));const r={id:"filesystem",title:"FileSystem"},o=void 0,s={unversionedId:"api/middleware/filesystem",id:"version-v2.x/api/middleware/filesystem",title:"FileSystem",description:"Filesystem middleware for Fiber that enables you to serve files from a directory.",source:"@site/versioned_docs/version-v2.x/api/middleware/filesystem.md",sourceDirName:"api/middleware",slug:"/api/middleware/filesystem",permalink:"/api/middleware/filesystem",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"filesystem",title:"FileSystem"},sidebar:"tutorialSidebar",previous:{title:"Favicon",permalink:"/api/middleware/favicon"},next:{title:"Helmet",permalink:"/api/middleware/helmet"}},l={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"embed",id:"embed",level:2},{value:"pkger",id:"pkger",level:2},{value:"packr",id:"packr",level:2},{value:"go.rice",id:"gorice",level:2},{value:"fileb0x",id:"fileb0x",level:2},{value:"statik",id:"statik",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],f={toc:p},m="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,i.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Filesystem middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that enables you to serve files from a directory."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("strong",{parentName:"p"},(0,a.kt)("inlineCode",{parentName:"strong"},":params")," & ",(0,a.kt)("inlineCode",{parentName:"strong"},":optionals?")," within the prefix path are not supported!")),(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("strong",{parentName:"p"},"To handle paths with spaces (or other url encoded values) make sure to set ",(0,a.kt)("inlineCode",{parentName:"strong"},"fiber.Config{ UnescapePath: true }")))),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Provide a minimal config\napp.Use(filesystem.New(filesystem.Config{\n Root: http.Dir("./assets"),\n}))\n\n// Or extend your config for customization\napp.Use(filesystem.New(filesystem.Config{\n Root: http.Dir("./assets"),\n Browse: true,\n Index: "index.html",\n NotFoundFile: "404.html",\n MaxAge: 3600,\n}))\n')),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"If your environment (Go 1.16+) supports it, we recommend using Go Embed instead of the other solutions listed as this one is native to Go and the easiest to use.")),(0,a.kt)("h2",{id:"embed"},"embed"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://golang.org/pkg/embed/"},"Embed")," is the native method to embed files in a Golang excecutable. Introduced in Go 1.16."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "embed"\n "io/fs"\n "log"\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n)\n\n// Embed a single file\n//go:embed index.html\nvar f embed.FS\n\n// Embed a directory\n//go:embed static/*\nvar embedDirStatic embed.FS\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/", filesystem.New(filesystem.Config{\n Root: http.FS(f),\n }))\n\n // Access file "image.png" under `static/` directory via URL: `http:///static/image.png`.\n // Without `PathPrefix`, you have to access it via URL:\n // `http:///static/static/image.png`.\n app.Use("/static", filesystem.New(filesystem.Config{\n Root: http.FS(embedDirStatic),\n PathPrefix: "static",\n Browse: true,\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"pkger"},"pkger"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/markbates/pkger"},"https://github.com/markbates/pkger")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n\n "github.com/markbates/pkger"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/assets", filesystem.New(filesystem.Config{\n Root: pkger.Dir("/assets"),\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"packr"},"packr"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/gobuffalo/packr"},"https://github.com/gobuffalo/packr")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n\n "github.com/gobuffalo/packr/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/assets", filesystem.New(filesystem.Config{\n Root: packr.New("Assets Box", "/assets"),\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"gorice"},"go.rice"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/GeertJohan/go.rice"},"https://github.com/GeertJohan/go.rice")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n\n "github.com/GeertJohan/go.rice"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/assets", filesystem.New(filesystem.Config{\n Root: rice.MustFindBox("assets").HTTPBox(),\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"fileb0x"},"fileb0x"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/UnnoTed/fileb0x"},"https://github.com/UnnoTed/fileb0x")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n\n "/myEmbeddedFiles"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use("/assets", filesystem.New(filesystem.Config{\n Root: myEmbeddedFiles.HTTP,\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"statik"},"statik"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/rakyll/statik"},"https://github.com/rakyll/statik")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/filesystem"\n\n // Use blank to invoke init function and register data to statik\n _ "/statik" \n "github.com/rakyll/statik/fs"\n)\n\nfunc main() {\n statikFS, err := fs.New()\n if err != nil {\n panic(err)\n }\n\n app := fiber.New()\n\n app.Use("/", filesystem.New(filesystem.Config{\n Root: statikFS,\n }))\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Root is a FileSystem that provides access\n // to a collection of files and directories.\n //\n // Required. Default: nil\n Root http.FileSystem `json:"-"`\n\n // PathPrefix defines a prefix to be added to a filepath when\n // reading a file from the FileSystem.\n //\n // Use when using Go 1.16 embed.FS\n //\n // Optional. Default ""\n PathPrefix string `json:"path_prefix"`\n\n // Enable directory browsing.\n //\n // Optional. Default: false\n Browse bool `json:"browse"`\n\n // Index file for serving a directory.\n //\n // Optional. Default: "index.html"\n Index string `json:"index"`\n\n // The value for the Cache-Control HTTP-header\n // that is set on the file response. MaxAge is defined in seconds.\n //\n // Optional. Default value 0.\n MaxAge int `json:"max_age"`\n\n // File to return if path is not found. Useful for SPA\'s.\n //\n // Optional. Default: ""\n NotFoundFile string `json:"not_found_file"`\n \n // The value for the Content-Type HTTP-header\n // that is set on the file response\n //\n // Optional. Default: ""\n ContentTypeCharset string `json:"content_type_charset"`\n}\n')),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n Root: nil,\n PathPrefix: "",\n Browse: false,\n Index: "/index.html",\n MaxAge: 0,\n ContentTypeCharset: "",\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1a1f40ab.04452c93.js b/assets/js/1a1f40ab.04452c93.js new file mode 100644 index 00000000000..7dd2a4c84aa --- /dev/null +++ b/assets/js/1a1f40ab.04452c93.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3391],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>s});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),g=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=g(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),u=g(n),c=r,s=u["".concat(p,".").concat(c)]||u[c]||m[c]||i;return n?a.createElement(s,l(l({ref:t},d),{},{components:n})):a.createElement(s,l({ref:t},d))}));function s(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var g=2;g{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>g});var a=n(87462),r=(n(67294),n(3905));const i={id:"fiberi18n",title:"Fiberi18n"},l=void 0,o={unversionedId:"fiberi18n/fiberi18n",id:"version-swagger_v1.x.x/fiberi18n/fiberi18n",title:"Fiberi18n",description:"Release",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/fiberi18n/README.md",sourceDirName:"fiberi18n",slug:"/fiberi18n/",permalink:"/contrib/swagger_v1.x.x/fiberi18n/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fiberi18n/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fiberi18n",title:"Fiberi18n"},sidebar:"tutorialSidebar",previous:{title:"Casbin",permalink:"/contrib/swagger_v1.x.x/casbin/"},next:{title:"Fibernewrelic",permalink:"/contrib/swagger_v1.x.x/fibernewrelic/"}},p={},g=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Example",id:"example",level:3}],d={toc:g},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fiberi18n*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/nicksnyder/go-i18n"},"go-i18n")," support for Fiber."),(0,r.kt)("h3",{id:"install"},"Install"),(0,r.kt)("p",null,"This middleware supports Fiber v2."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fiberi18n\n")),(0,r.kt)("h3",{id:"signature"},"Signature"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"fiberi18n.New(config ...*Config) fiber.Handler\n")),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Property"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Next"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(c *fiber.Ctx) bool")),(0,r.kt)("td",{parentName:"tr",align:null},"A function to skip this middleware when returned ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"RootPath"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The i18n template folder path."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"./example/localize"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"AcceptLanguages"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"A collection of languages that can be processed."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag{language.Chinese, language.English}"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"FormatBundleFile"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The type of the template file."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"yaml"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DefaultLanguage"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"The default returned language type."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.English"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Loader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Loader")),(0,r.kt)("td",{parentName:"tr",align:null},"The implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"LoaderFunc(os.ReadFile)"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"UnmarshalFunc"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"i18n.UnmarshalFunc")),(0,r.kt)("td",{parentName:"tr",align:null},"The function used for decoding template files."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"yaml.Unmarshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"LangHandler"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(ctx *fiber.Ctx, defaultLang string) string")),(0,r.kt)("td",{parentName:"tr",align:null},"Used to get the kind of language handled by *fiber.Ctx and defaultLang."),(0,r.kt)("td",{parentName:"tr",align:null},"Retrieved from the request header ",(0,r.kt)("inlineCode",{parentName:"td"},"Accept-Language")," or query parameter ",(0,r.kt)("inlineCode",{parentName:"td"},"lang"),".")))),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/contrib/fiberi18n"\n "github.com/gofiber/fiber/v2"\n "github.com/nicksnyder/go-i18n/v2/i18n"\n "golang.org/x/text/language"\n)\n\nfunc main() {\n app := fiber.New()\n app.Use(\n fiberi18n.New(&fiberi18n.Config{\n RootPath: "./example/localize",\n AcceptLanguages: []language.Tag{language.Chinese, language.English},\n DefaultLanguage: language.Chinese,\n }),\n )\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString(fiberi18n.MustGetMessage("welcome"))\n })\n app.Get("/:name", func(ctx *fiber.Ctx) error {\n return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{\n MessageID: "welcomeWithName",\n TemplateData: map[string]string{\n "name": ctx.Params("name"),\n },\n }))\n })\n app.Listen("127.0.0.1:3000")\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1a1f40ab.712763ce.js b/assets/js/1a1f40ab.712763ce.js deleted file mode 100644 index ecb7ba3b405..00000000000 --- a/assets/js/1a1f40ab.712763ce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3391],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>s});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),g=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=g(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),u=g(n),c=r,s=u["".concat(p,".").concat(c)]||u[c]||m[c]||i;return n?a.createElement(s,l(l({ref:t},d),{},{components:n})):a.createElement(s,l({ref:t},d))}));function s(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var g=2;g{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>g});var a=n(7462),r=(n(7294),n(3905));const i={id:"fiberi18n",title:"Fiberi18n"},l=void 0,o={unversionedId:"fiberi18n/fiberi18n",id:"version-swagger_v1.x.x/fiberi18n/fiberi18n",title:"Fiberi18n",description:"Release",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/fiberi18n/README.md",sourceDirName:"fiberi18n",slug:"/fiberi18n/",permalink:"/contrib/swagger_v1.x.x/fiberi18n/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fiberi18n/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fiberi18n",title:"Fiberi18n"},sidebar:"tutorialSidebar",previous:{title:"Casbin",permalink:"/contrib/swagger_v1.x.x/casbin/"},next:{title:"Fibernewrelic",permalink:"/contrib/swagger_v1.x.x/fibernewrelic/"}},p={},g=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Example",id:"example",level:3}],d={toc:g},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fiberi18n*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/nicksnyder/go-i18n"},"go-i18n")," support for Fiber."),(0,r.kt)("h3",{id:"install"},"Install"),(0,r.kt)("p",null,"This middleware supports Fiber v2."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fiberi18n\n")),(0,r.kt)("h3",{id:"signature"},"Signature"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"fiberi18n.New(config ...*Config) fiber.Handler\n")),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Property"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Next"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(c *fiber.Ctx) bool")),(0,r.kt)("td",{parentName:"tr",align:null},"A function to skip this middleware when returned ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"RootPath"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The i18n template folder path."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"./example/localize"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"AcceptLanguages"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"A collection of languages that can be processed."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag{language.Chinese, language.English}"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"FormatBundleFile"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The type of the template file."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"yaml"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DefaultLanguage"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"The default returned language type."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.English"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Loader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Loader")),(0,r.kt)("td",{parentName:"tr",align:null},"The implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"LoaderFunc(os.ReadFile)"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"UnmarshalFunc"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"i18n.UnmarshalFunc")),(0,r.kt)("td",{parentName:"tr",align:null},"The function used for decoding template files."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"yaml.Unmarshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"LangHandler"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(ctx *fiber.Ctx, defaultLang string) string")),(0,r.kt)("td",{parentName:"tr",align:null},"Used to get the kind of language handled by *fiber.Ctx and defaultLang."),(0,r.kt)("td",{parentName:"tr",align:null},"Retrieved from the request header ",(0,r.kt)("inlineCode",{parentName:"td"},"Accept-Language")," or query parameter ",(0,r.kt)("inlineCode",{parentName:"td"},"lang"),".")))),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/contrib/fiberi18n"\n "github.com/gofiber/fiber/v2"\n "github.com/nicksnyder/go-i18n/v2/i18n"\n "golang.org/x/text/language"\n)\n\nfunc main() {\n app := fiber.New()\n app.Use(\n fiberi18n.New(&fiberi18n.Config{\n RootPath: "./example/localize",\n AcceptLanguages: []language.Tag{language.Chinese, language.English},\n DefaultLanguage: language.Chinese,\n }),\n )\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString(fiberi18n.MustGetMessage("welcome"))\n })\n app.Get("/:name", func(ctx *fiber.Ctx) error {\n return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{\n MessageID: "welcomeWithName",\n TemplateData: map[string]string{\n "name": ctx.Params("name"),\n },\n }))\n })\n app.Listen("127.0.0.1:3000")\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.944b9380.js b/assets/js/1a4e3797.944b9380.js new file mode 100644 index 00000000000..777f94796a3 --- /dev/null +++ b/assets/js/1a4e3797.944b9380.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7920],{42027:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var a=r(67294),n=r(52263),l=r(46375),s=r(35742),c=r(39960),o=r(95999);const u=["zero","one","two","few","many","other"];function m(e){return u.filter((t=>e.includes(t)))}const h={locale:"en",pluralForms:m(["one","other"]),select:e=>1===e?"one":"other"};function i(){const{i18n:{currentLocale:e}}=(0,n.Z)();return(0,a.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:m(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),h}}),[e])}function p(){const e=i();return{selectMessage:(t,r)=>function(e,t,r){const a=e.split("|");if(1===a.length)return a[0];a.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${a.length}: ${e}`);const n=r.select(t),l=r.pluralForms.indexOf(n);return a[Math.min(l,a.length-1)]}(r,t,e)}}var g=r(86010),d=r(16550),f=r(10412);const y="q",E="ctx",S="version";const C=function(){const e=(0,d.k6)(),t=(0,d.TH)(),{siteConfig:{baseUrl:r}}=(0,n.Z)(),a=f.Z.canUseDOM?new URLSearchParams(t.search):null,l=a?.get(y)||"",s=a?.get(E)||"",c=a?.get(S)||"",o=e=>{const r=new URLSearchParams(t.search);return e?r.set(y,e):r.delete(y),r};return{searchValue:l,searchContext:s,searchVersion:c,updateSearchPath:t=>{const r=o(t);e.replace({search:r.toString()})},updateSearchContext:r=>{const a=new URLSearchParams(t.search);a.set(E,r),e.replace({search:a.toString()})},generateSearchPageLink:e=>{const t=o(e);return`${r}search?${t.toString()}`}}};var I=r(90022),x=r(98202),v=r(82539),w=r(10726),R=r(91073),P=r(80311),b=r(73926),_=r(61029);const F={searchContextInput:"searchContextInput_mXoe",searchQueryInput:"searchQueryInput_CFBF",searchResultItem:"searchResultItem_U687",searchResultItemPath:"searchResultItemPath_uIbk",searchResultItemSummary:"searchResultItemSummary_oZHr",searchQueryColumn:"searchQueryColumn_q7nx",searchContextColumn:"searchContextColumn_oWAF"};function k(){const{siteConfig:{baseUrl:e}}=(0,n.Z)(),{selectMessage:t}=p(),{searchValue:r,searchContext:l,searchVersion:c,updateSearchPath:u,updateSearchContext:m}=C(),[h,i]=(0,a.useState)(r),[d,f]=(0,a.useState)(),[y,E]=(0,a.useState)(),S=`${e}${c}`,v=(0,a.useMemo)((()=>h?(0,o.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:h}):(0,o.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})),[h]);(0,a.useEffect)((()=>{u(h),d&&(h?d(h,(e=>{E(e)})):E(void 0))}),[h,d]);const w=(0,a.useCallback)((e=>{i(e.target.value)}),[]);return(0,a.useEffect)((()=>{r&&r!==h&&i(r)}),[r]),(0,a.useEffect)((()=>{!async function(){const{wrappedIndexes:e,zhDictionary:t}=await(0,I.w)(S,l);f((()=>(0,x.v)(e,t,100)))}()}),[l,S]),a.createElement(a.Fragment,null,a.createElement(s.Z,null,a.createElement("meta",{property:"robots",content:"noindex, follow"}),a.createElement("title",null,v)),a.createElement("div",{className:"container margin-vert--lg"},a.createElement("h1",null,v),a.createElement("div",{className:"row"},a.createElement("div",{className:(0,g.Z)("col",{[F.searchQueryColumn]:Array.isArray(_.Kc),"col--9":Array.isArray(_.Kc),"col--12":!Array.isArray(_.Kc)})},a.createElement("input",{type:"search",name:"q",className:F.searchQueryInput,"aria-label":"Search",onChange:w,value:h,autoComplete:"off",autoFocus:!0})),Array.isArray(_.Kc)?a.createElement("div",{className:(0,g.Z)("col","col--3","padding-left--none",F.searchContextColumn)},a.createElement("select",{name:"search-context",className:F.searchContextInput,id:"context-selector",value:l,onChange:e=>m(e.target.value)},a.createElement("option",{value:""},_.pQ?(0,o.I)({id:"theme.SearchPage.searchContext.everywhere",message:"everywhere"}):""),_.Kc.map((e=>a.createElement("option",{key:e,value:e},e))))):null),!d&&h&&a.createElement("div",null,a.createElement(P.Z,null)),y&&(y.length>0?a.createElement("p",null,t(y.length,(0,o.I)({id:"theme.SearchPage.documentsFound.plurals",message:"1 document found|{count} documents found",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)'},{count:y.length}))):a.createElement("p",null,(0,o.I)({id:"theme.SearchPage.noResultsText",message:"No documents were found",description:"The paragraph for empty search result"}))),a.createElement("section",null,y&&y.map((e=>a.createElement($,{key:e.document.i,searchResult:e}))))))}function $(e){let{searchResult:{document:t,type:r,page:n,tokens:l,metadata:s}}=e;const o=0===r,u=2===r,m=(o?t.b:n.b).slice(),h=u?t.s:t.t;o||m.push(n.t);let i="";if(_.vc&&l.length>0){const e=new URLSearchParams;for(const t of l)e.append("_highlight",t);i=`?${e.toString()}`}return a.createElement("article",{className:F.searchResultItem},a.createElement("h2",null,a.createElement(c.Z,{to:t.u+i+(t.h||""),dangerouslySetInnerHTML:{__html:u?(0,v.C)(h,l):(0,w.o)(h,(0,R.m)(s,"t"),l,100)}})),m.length>0&&a.createElement("p",{className:F.searchResultItemPath},(0,b.e)(m)),u&&a.createElement("p",{className:F.searchResultItemSummary,dangerouslySetInnerHTML:{__html:(0,w.o)(t.t,(0,R.m)(s,"t"),l,100)}}))}const Z=function(){return a.createElement(l.Z,null,a.createElement(k,null))}}}]); \ No newline at end of file diff --git a/assets/js/1a4e3797.c58ef580.js b/assets/js/1a4e3797.c58ef580.js deleted file mode 100644 index 6db4a6118ba..00000000000 --- a/assets/js/1a4e3797.c58ef580.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7920],{2027:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var a=r(7294),n=r(2263),l=r(6375),s=r(5742),c=r(9960),o=r(5999);const u=["zero","one","two","few","many","other"];function m(e){return u.filter((t=>e.includes(t)))}const h={locale:"en",pluralForms:m(["one","other"]),select:e=>1===e?"one":"other"};function i(){const{i18n:{currentLocale:e}}=(0,n.Z)();return(0,a.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:m(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),h}}),[e])}function p(){const e=i();return{selectMessage:(t,r)=>function(e,t,r){const a=e.split("|");if(1===a.length)return a[0];a.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${a.length}: ${e}`);const n=r.select(t),l=r.pluralForms.indexOf(n);return a[Math.min(l,a.length-1)]}(r,t,e)}}var g=r(6010),d=r(6550),f=r(412);const y="q",E="ctx",S="version";const C=function(){const e=(0,d.k6)(),t=(0,d.TH)(),{siteConfig:{baseUrl:r}}=(0,n.Z)(),a=f.Z.canUseDOM?new URLSearchParams(t.search):null,l=a?.get(y)||"",s=a?.get(E)||"",c=a?.get(S)||"",o=e=>{const r=new URLSearchParams(t.search);return e?r.set(y,e):r.delete(y),r};return{searchValue:l,searchContext:s,searchVersion:c,updateSearchPath:t=>{const r=o(t);e.replace({search:r.toString()})},updateSearchContext:r=>{const a=new URLSearchParams(t.search);a.set(E,r),e.replace({search:a.toString()})},generateSearchPageLink:e=>{const t=o(e);return`${r}search?${t.toString()}`}}};var I=r(22),x=r(8202),v=r(2539),w=r(726),R=r(1073),P=r(311),b=r(3926),_=r(1029);const F={searchContextInput:"searchContextInput_mXoe",searchQueryInput:"searchQueryInput_CFBF",searchResultItem:"searchResultItem_U687",searchResultItemPath:"searchResultItemPath_uIbk",searchResultItemSummary:"searchResultItemSummary_oZHr",searchQueryColumn:"searchQueryColumn_q7nx",searchContextColumn:"searchContextColumn_oWAF"};function k(){const{siteConfig:{baseUrl:e}}=(0,n.Z)(),{selectMessage:t}=p(),{searchValue:r,searchContext:l,searchVersion:c,updateSearchPath:u,updateSearchContext:m}=C(),[h,i]=(0,a.useState)(r),[d,f]=(0,a.useState)(),[y,E]=(0,a.useState)(),S=`${e}${c}`,v=(0,a.useMemo)((()=>h?(0,o.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:h}):(0,o.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})),[h]);(0,a.useEffect)((()=>{u(h),d&&(h?d(h,(e=>{E(e)})):E(void 0))}),[h,d]);const w=(0,a.useCallback)((e=>{i(e.target.value)}),[]);return(0,a.useEffect)((()=>{r&&r!==h&&i(r)}),[r]),(0,a.useEffect)((()=>{!async function(){const{wrappedIndexes:e,zhDictionary:t}=await(0,I.w)(S,l);f((()=>(0,x.v)(e,t,100)))}()}),[l,S]),a.createElement(a.Fragment,null,a.createElement(s.Z,null,a.createElement("meta",{property:"robots",content:"noindex, follow"}),a.createElement("title",null,v)),a.createElement("div",{className:"container margin-vert--lg"},a.createElement("h1",null,v),a.createElement("div",{className:"row"},a.createElement("div",{className:(0,g.Z)("col",{[F.searchQueryColumn]:Array.isArray(_.Kc),"col--9":Array.isArray(_.Kc),"col--12":!Array.isArray(_.Kc)})},a.createElement("input",{type:"search",name:"q",className:F.searchQueryInput,"aria-label":"Search",onChange:w,value:h,autoComplete:"off",autoFocus:!0})),Array.isArray(_.Kc)?a.createElement("div",{className:(0,g.Z)("col","col--3","padding-left--none",F.searchContextColumn)},a.createElement("select",{name:"search-context",className:F.searchContextInput,id:"context-selector",value:l,onChange:e=>m(e.target.value)},a.createElement("option",{value:""},_.pQ?(0,o.I)({id:"theme.SearchPage.searchContext.everywhere",message:"everywhere"}):""),_.Kc.map((e=>a.createElement("option",{key:e,value:e},e))))):null),!d&&h&&a.createElement("div",null,a.createElement(P.Z,null)),y&&(y.length>0?a.createElement("p",null,t(y.length,(0,o.I)({id:"theme.SearchPage.documentsFound.plurals",message:"1 document found|{count} documents found",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)'},{count:y.length}))):a.createElement("p",null,(0,o.I)({id:"theme.SearchPage.noResultsText",message:"No documents were found",description:"The paragraph for empty search result"}))),a.createElement("section",null,y&&y.map((e=>a.createElement($,{key:e.document.i,searchResult:e}))))))}function $(e){let{searchResult:{document:t,type:r,page:n,tokens:l,metadata:s}}=e;const o=0===r,u=2===r,m=(o?t.b:n.b).slice(),h=u?t.s:t.t;o||m.push(n.t);let i="";if(_.vc&&l.length>0){const e=new URLSearchParams;for(const t of l)e.append("_highlight",t);i=`?${e.toString()}`}return a.createElement("article",{className:F.searchResultItem},a.createElement("h2",null,a.createElement(c.Z,{to:t.u+i+(t.h||""),dangerouslySetInnerHTML:{__html:u?(0,v.C)(h,l):(0,w.o)(h,(0,R.m)(s,"t"),l,100)}})),m.length>0&&a.createElement("p",{className:F.searchResultItemPath},(0,b.e)(m)),u&&a.createElement("p",{className:F.searchResultItemSummary,dangerouslySetInnerHTML:{__html:(0,w.o)(t.t,(0,R.m)(s,"t"),l,100)}}))}const Z=function(){return a.createElement(l.Z,null,a.createElement(k,null))}}}]); \ No newline at end of file diff --git a/assets/js/1a56c576.00685b60.js b/assets/js/1a56c576.00685b60.js new file mode 100644 index 00000000000..340d28613a3 --- /dev/null +++ b/assets/js/1a56c576.00685b60.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2330],{3905:(e,r,t)=>{t.d(r,{Zo:()=>c,kt:()=>m});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=n.createContext({}),u=function(e){var r=n.useContext(s),t=r;return e&&(t="function"==typeof e?e(r):l(l({},r),e)),t},c=function(e){var r=u(e.components);return n.createElement(s.Provider,{value:r},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=u(t),f=a,m=d["".concat(s,".").concat(f)]||d[f]||p[f]||o;return t?n.createElement(m,l(l({ref:r},c),{},{components:t})):n.createElement(m,l({ref:r},c))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var o=t.length,l=new Array(o);l[0]=f;var i={};for(var s in r)hasOwnProperty.call(r,s)&&(i[s]=r[s]);i.originalType=e,i[d]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{t.d(r,{Z:()=>l});var n=t(67294),a=t(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:r,hidden:t,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:t},r)}},74866:(e,r,t)=>{t.d(r,{Z:()=>E});var n=t(87462),a=t(67294),o=t(86010),l=t(12466),i=t(16550),s=t(91980),u=t(67392),c=t(50012);function d(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:r}=e;return!!r&&"object"==typeof r&&"value"in r}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:r,label:t,attributes:n,default:a}}=e;return{value:r,label:t,attributes:n,default:a}}))}function p(e){const{values:r,children:t}=e;return(0,a.useMemo)((()=>{const e=r??d(t);return function(e){const r=(0,u.l)(e,((e,r)=>e.value===r.value));if(r.length>0)throw new Error(`Docusaurus error: Duplicate values "${r.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[r,t])}function f(e){let{value:r,tabValues:t}=e;return t.some((e=>e.value===r))}function m(e){let{queryString:r=!1,groupId:t}=e;const n=(0,i.k6)(),o=function(e){let{queryString:r=!1,groupId:t}=e;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:r,groupId:t});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const r=new URLSearchParams(n.location.search);r.set(o,e),n.replace({...n.location,search:r.toString()})}),[o,n])]}function h(e){const{defaultValue:r,queryString:t=!1,groupId:n}=e,o=p(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:r,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!f({value:r,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${r}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return r}const n=t.find((e=>e.default))??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:r,tabValues:o}))),[s,u]=m({queryString:t,groupId:n}),[d,h]=function(e){let{groupId:r}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(r),[n,o]=(0,c.Nk)(t);return[n,(0,a.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:n}),b=(()=>{const e=s??d;return f({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{b&&i(b)}),[b]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!f({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),h(e)}),[u,h,o]),tabValues:o}}var b=t(72389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:r,block:t,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,l.o5)(),p=e=>{const r=e.currentTarget,t=c.indexOf(r),n=u[t].value;n!==i&&(d(r),s(n))},f=e=>{let r=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;r=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;r=c[t]??c[c.length-1];break}}r?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},r)},u.map((e=>{let{value:r,label:t,attributes:l}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===r?0:-1,"aria-selected":i===r,key:r,ref:e=>c.push(e),onKeyDown:f,onClick:p},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===r})}),t??r)})))}function y(e){let{lazy:r,children:t,selectedValue:n}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(r){const e=o.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,r)=>(0,a.cloneElement)(e,{key:r,hidden:e.props.value!==n}))))}function k(e){const r=h(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},a.createElement(v,(0,n.Z)({},e,r)),a.createElement(y,(0,n.Z)({},e,r)))}function E(e){const r=(0,b.Z)();return a.createElement(k,(0,n.Z)({key:String(r)},e))}},38520:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>s,default:()=>m,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var n=t(87462),a=(t(67294),t(3905)),o=t(74866),l=t(85162);const i={id:"error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",sidebar_position:4},s=void 0,u={unversionedId:"guide/error-handling",id:"version-v2.x/guide/error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",source:"@site/versioned_docs/version-v2.x/guide/error-handling.md",sourceDirName:"guide",slug:"/guide/error-handling",permalink:"/guide/error-handling",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:4,frontMatter:{id:"error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcdd Templates",permalink:"/guide/templates"},next:{title:"\ud83d\udd0e Validation",permalink:"/guide/validation"}},c={},d=[{value:"Catching Errors",id:"catching-errors",level:2},{value:"Default Error Handler",id:"default-error-handler",level:2},{value:"Custom Error Handler",id:"custom-error-handler",level:2}],p={toc:d},f="wrapper";function m(e){let{components:r,...t}=e;return(0,a.kt)(f,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"catching-errors"},"Catching Errors"),(0,a.kt)("p",null,"It\u2019s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them."),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(l.Z,{value:"example",label:"Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/", func(c *fiber.Ctx) error {\n // Pass error to Fiber\n return c.SendFile("file-does-not-exist")\n})\n')))),(0,a.kt)("p",null,"Fiber does not handle ",(0,a.kt)("a",{parentName:"p",href:"https://go.dev/blog/defer-panic-and-recover"},"panics")," by default. To recover from a panic thrown by any handler in the stack, you need to include the ",(0,a.kt)("inlineCode",{parentName:"p"},"Recover")," middleware below:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/recover"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use(recover.New())\n\n app.Get("/", func(c *fiber.Ctx) error {\n panic("This panic is caught by fiber")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("p",null,"You could use Fiber's custom error struct to pass an additional ",(0,a.kt)("inlineCode",{parentName:"p"},"status code")," using ",(0,a.kt)("inlineCode",{parentName:"p"},"fiber.NewError()"),". It's optional to pass a message; if this is left empty, it will default to the status code message ","(",(0,a.kt)("inlineCode",{parentName:"p"},"404")," equals ",(0,a.kt)("inlineCode",{parentName:"p"},"Not Found"),")","."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // 503 Service Unavailable\n return fiber.ErrServiceUnavailable\n\n // 503 On vacation!\n return fiber.NewError(fiber.StatusServiceUnavailable, "On vacation!")\n})\n')),(0,a.kt)("h2",{id:"default-error-handler"},"Default Error Handler"),(0,a.kt)("p",null,"Fiber provides an error handler by default. For a standard error, the response is sent as ",(0,a.kt)("strong",{parentName:"p"},"500 Internal Server Error"),". If the error is of type ",(0,a.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/gofiber/fiber#Error"},"fiber.Error"),", the response is sent with the provided status code and message."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"// Default error handler\nvar DefaultErrorHandler = func(c *fiber.Ctx, err error) error {\n // Status code defaults to 500\n code := fiber.StatusInternalServerError\n\n // Retrieve the custom status code if it's a *fiber.Error\n var e *fiber.Error\n if errors.As(err, &e) {\n code = e.Code\n }\n\n // Set Content-Type: text/plain; charset=utf-8\n c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)\n\n // Return status code with error message\n return c.Status(code).SendString(err.Error())\n}\n")),(0,a.kt)("h2",{id:"custom-error-handler"},"Custom Error Handler"),(0,a.kt)("p",null,"A custom error handler can be set using a ",(0,a.kt)("a",{parentName:"p",href:"/api/fiber#config"},"Config "),"when initializing a ",(0,a.kt)("a",{parentName:"p",href:"/api/fiber#new"},"Fiber instance"),"."),(0,a.kt)("p",null,"In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response."),(0,a.kt)("p",null,"The following example shows how to display error pages for different types of errors."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Create a new fiber instance with custom config\napp := fiber.New(fiber.Config{\n // Override default error handler\n ErrorHandler: func(ctx *fiber.Ctx, err error) error {\n // Status code defaults to 500\n code := fiber.StatusInternalServerError\n\n // Retrieve the custom status code if it\'s a *fiber.Error\n var e *fiber.Error\n if errors.As(err, &e) {\n code = e.Code\n }\n\n // Send custom error page\n err = ctx.Status(code).SendFile(fmt.Sprintf("./%d.html", code))\n if err != nil {\n // In case the SendFile fails\n return ctx.Status(fiber.StatusInternalServerError).SendString("Internal Server Error")\n }\n\n // Return from handler\n return nil\n },\n})\n\n// ...\n')),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Special thanks to the ",(0,a.kt)("a",{parentName:"p",href:"https://echo.labstack.com/"},"Echo")," & ",(0,a.kt)("a",{parentName:"p",href:"https://expressjs.com/"},"Express")," framework for inspiration regarding error handling.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1a56c576.83243328.js b/assets/js/1a56c576.83243328.js deleted file mode 100644 index e266054d772..00000000000 --- a/assets/js/1a56c576.83243328.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2330],{3905:(e,r,t)=>{t.d(r,{Zo:()=>c,kt:()=>m});var n=t(7294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=n.createContext({}),u=function(e){var r=n.useContext(s),t=r;return e&&(t="function"==typeof e?e(r):l(l({},r),e)),t},c=function(e){var r=u(e.components);return n.createElement(s.Provider,{value:r},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=u(t),f=a,m=d["".concat(s,".").concat(f)]||d[f]||p[f]||o;return t?n.createElement(m,l(l({ref:r},c),{},{components:t})):n.createElement(m,l({ref:r},c))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var o=t.length,l=new Array(o);l[0]=f;var i={};for(var s in r)hasOwnProperty.call(r,s)&&(i[s]=r[s]);i.originalType=e,i[d]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{t.d(r,{Z:()=>l});var n=t(7294),a=t(6010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:r,hidden:t,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:t},r)}},4866:(e,r,t)=>{t.d(r,{Z:()=>E});var n=t(7462),a=t(7294),o=t(6010),l=t(2466),i=t(6550),s=t(1980),u=t(7392),c=t(12);function d(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:r}=e;return!!r&&"object"==typeof r&&"value"in r}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:r,label:t,attributes:n,default:a}}=e;return{value:r,label:t,attributes:n,default:a}}))}function p(e){const{values:r,children:t}=e;return(0,a.useMemo)((()=>{const e=r??d(t);return function(e){const r=(0,u.l)(e,((e,r)=>e.value===r.value));if(r.length>0)throw new Error(`Docusaurus error: Duplicate values "${r.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[r,t])}function f(e){let{value:r,tabValues:t}=e;return t.some((e=>e.value===r))}function m(e){let{queryString:r=!1,groupId:t}=e;const n=(0,i.k6)(),o=function(e){let{queryString:r=!1,groupId:t}=e;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:r,groupId:t});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const r=new URLSearchParams(n.location.search);r.set(o,e),n.replace({...n.location,search:r.toString()})}),[o,n])]}function h(e){const{defaultValue:r,queryString:t=!1,groupId:n}=e,o=p(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:r,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!f({value:r,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${r}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return r}const n=t.find((e=>e.default))??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:r,tabValues:o}))),[s,u]=m({queryString:t,groupId:n}),[d,h]=function(e){let{groupId:r}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(r),[n,o]=(0,c.Nk)(t);return[n,(0,a.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:n}),b=(()=>{const e=s??d;return f({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{b&&i(b)}),[b]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!f({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),h(e)}),[u,h,o]),tabValues:o}}var b=t(2389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:r,block:t,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,l.o5)(),p=e=>{const r=e.currentTarget,t=c.indexOf(r),n=u[t].value;n!==i&&(d(r),s(n))},f=e=>{let r=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;r=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;r=c[t]??c[c.length-1];break}}r?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},r)},u.map((e=>{let{value:r,label:t,attributes:l}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===r?0:-1,"aria-selected":i===r,key:r,ref:e=>c.push(e),onKeyDown:f,onClick:p},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===r})}),t??r)})))}function y(e){let{lazy:r,children:t,selectedValue:n}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(r){const e=o.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,r)=>(0,a.cloneElement)(e,{key:r,hidden:e.props.value!==n}))))}function k(e){const r=h(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},a.createElement(v,(0,n.Z)({},e,r)),a.createElement(y,(0,n.Z)({},e,r)))}function E(e){const r=(0,b.Z)();return a.createElement(k,(0,n.Z)({key:String(r)},e))}},8520:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>s,default:()=>m,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var n=t(7462),a=(t(7294),t(3905)),o=t(4866),l=t(5162);const i={id:"error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",sidebar_position:4},s=void 0,u={unversionedId:"guide/error-handling",id:"version-v2.x/guide/error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",source:"@site/versioned_docs/version-v2.x/guide/error-handling.md",sourceDirName:"guide",slug:"/guide/error-handling",permalink:"/guide/error-handling",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:4,frontMatter:{id:"error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcdd Templates",permalink:"/guide/templates"},next:{title:"\ud83d\udd0e Validation",permalink:"/guide/validation"}},c={},d=[{value:"Catching Errors",id:"catching-errors",level:2},{value:"Default Error Handler",id:"default-error-handler",level:2},{value:"Custom Error Handler",id:"custom-error-handler",level:2}],p={toc:d},f="wrapper";function m(e){let{components:r,...t}=e;return(0,a.kt)(f,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"catching-errors"},"Catching Errors"),(0,a.kt)("p",null,"It\u2019s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them."),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(l.Z,{value:"example",label:"Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/", func(c *fiber.Ctx) error {\n // Pass error to Fiber\n return c.SendFile("file-does-not-exist")\n})\n')))),(0,a.kt)("p",null,"Fiber does not handle ",(0,a.kt)("a",{parentName:"p",href:"https://go.dev/blog/defer-panic-and-recover"},"panics")," by default. To recover from a panic thrown by any handler in the stack, you need to include the ",(0,a.kt)("inlineCode",{parentName:"p"},"Recover")," middleware below:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/recover"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use(recover.New())\n\n app.Get("/", func(c *fiber.Ctx) error {\n panic("This panic is caught by fiber")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("p",null,"You could use Fiber's custom error struct to pass an additional ",(0,a.kt)("inlineCode",{parentName:"p"},"status code")," using ",(0,a.kt)("inlineCode",{parentName:"p"},"fiber.NewError()"),". It's optional to pass a message; if this is left empty, it will default to the status code message ","(",(0,a.kt)("inlineCode",{parentName:"p"},"404")," equals ",(0,a.kt)("inlineCode",{parentName:"p"},"Not Found"),")","."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // 503 Service Unavailable\n return fiber.ErrServiceUnavailable\n\n // 503 On vacation!\n return fiber.NewError(fiber.StatusServiceUnavailable, "On vacation!")\n})\n')),(0,a.kt)("h2",{id:"default-error-handler"},"Default Error Handler"),(0,a.kt)("p",null,"Fiber provides an error handler by default. For a standard error, the response is sent as ",(0,a.kt)("strong",{parentName:"p"},"500 Internal Server Error"),". If the error is of type ",(0,a.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/gofiber/fiber#Error"},"fiber.Error"),", the response is sent with the provided status code and message."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"// Default error handler\nvar DefaultErrorHandler = func(c *fiber.Ctx, err error) error {\n // Status code defaults to 500\n code := fiber.StatusInternalServerError\n\n // Retrieve the custom status code if it's a *fiber.Error\n var e *fiber.Error\n if errors.As(err, &e) {\n code = e.Code\n }\n\n // Set Content-Type: text/plain; charset=utf-8\n c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)\n\n // Return status code with error message\n return c.Status(code).SendString(err.Error())\n}\n")),(0,a.kt)("h2",{id:"custom-error-handler"},"Custom Error Handler"),(0,a.kt)("p",null,"A custom error handler can be set using a ",(0,a.kt)("a",{parentName:"p",href:"/api/fiber#config"},"Config "),"when initializing a ",(0,a.kt)("a",{parentName:"p",href:"/api/fiber#new"},"Fiber instance"),"."),(0,a.kt)("p",null,"In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response."),(0,a.kt)("p",null,"The following example shows how to display error pages for different types of errors."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Create a new fiber instance with custom config\napp := fiber.New(fiber.Config{\n // Override default error handler\n ErrorHandler: func(ctx *fiber.Ctx, err error) error {\n // Status code defaults to 500\n code := fiber.StatusInternalServerError\n\n // Retrieve the custom status code if it\'s a *fiber.Error\n var e *fiber.Error\n if errors.As(err, &e) {\n code = e.Code\n }\n\n // Send custom error page\n err = ctx.Status(code).SendFile(fmt.Sprintf("./%d.html", code))\n if err != nil {\n // In case the SendFile fails\n return ctx.Status(fiber.StatusInternalServerError).SendString("Internal Server Error")\n }\n\n // Return from handler\n return nil\n },\n})\n\n// ...\n')),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Special thanks to the ",(0,a.kt)("a",{parentName:"p",href:"https://echo.labstack.com/"},"Echo")," & ",(0,a.kt)("a",{parentName:"p",href:"https://expressjs.com/"},"Express")," framework for inspiration regarding error handling.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1a6451b0.92f79cb3.js b/assets/js/1a6451b0.92f79cb3.js deleted file mode 100644 index 4263771acbd..00000000000 --- a/assets/js/1a6451b0.92f79cb3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2248],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=s(r),f=a,m=u["".concat(p,".").concat(f)]||u[f]||d[f]||i;return r?n.createElement(m,o(o({ref:t},c),{},{components:r})):n.createElement(m,o({ref:t},c))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(7462),a=(r(7294),r(3905));const i={id:"envvar",title:"EnvVar"},o=void 0,l={unversionedId:"api/middleware/envvar",id:"api/middleware/envvar",title:"EnvVar",description:"EnvVar middleware for Fiber that can be used to expose environment variables with various options.",source:"@site/docs/core/api/middleware/envvar.md",sourceDirName:"api/middleware",slug:"/api/middleware/envvar",permalink:"/next/api/middleware/envvar",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/envvar.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"envvar",title:"EnvVar"},sidebar:"tutorialSidebar",previous:{title:"Encrypt Cookie",permalink:"/next/api/middleware/encryptcookie"},next:{title:"ETag",permalink:"/next/api/middleware/etag"}},p={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Response",id:"response",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],c={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"EnvVar middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that can be used to expose environment variables with various options."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/envvar"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use("/expose/envvars", envvar.New())\n\n// Or extend your config for customization\napp.Use("/expose/envvars", envvar.New(\n envvar.Config{\n ExportVars: map[string]string{"testKey": "", "testDefaultKey": "testDefaultVal"},\n ExcludeVars: map[string]string{"excludeKey": ""},\n }),\n)\n')),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"You will need to provide a path to use the envvar middleware.")),(0,a.kt)("h2",{id:"response"},"Response"),(0,a.kt)("p",null,"Http response contract:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'{\n "vars": {\n "someEnvVariable": "someValue",\n "anotherEnvVariable": "anotherValue",\n }\n}\n\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // ExportVars specifies the environment variables that should export\n ExportVars map[string]string\n // ExcludeVars specifies the environment variables that should not export\n ExcludeVars map[string]string\n}\n\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"Config{}\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1a6451b0.b756d443.js b/assets/js/1a6451b0.b756d443.js new file mode 100644 index 00000000000..809ec2232ae --- /dev/null +++ b/assets/js/1a6451b0.b756d443.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2248],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=s(r),f=a,m=u["".concat(p,".").concat(f)]||u[f]||d[f]||i;return r?n.createElement(m,o(o({ref:t},c),{},{components:r})):n.createElement(m,o({ref:t},c))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));const i={id:"envvar",title:"EnvVar"},o=void 0,l={unversionedId:"api/middleware/envvar",id:"api/middleware/envvar",title:"EnvVar",description:"EnvVar middleware for Fiber that can be used to expose environment variables with various options.",source:"@site/docs/core/api/middleware/envvar.md",sourceDirName:"api/middleware",slug:"/api/middleware/envvar",permalink:"/next/api/middleware/envvar",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/envvar.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"envvar",title:"EnvVar"},sidebar:"tutorialSidebar",previous:{title:"Encrypt Cookie",permalink:"/next/api/middleware/encryptcookie"},next:{title:"ETag",permalink:"/next/api/middleware/etag"}},p={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Response",id:"response",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],c={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"EnvVar middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that can be used to expose environment variables with various options."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/envvar"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use("/expose/envvars", envvar.New())\n\n// Or extend your config for customization\napp.Use("/expose/envvars", envvar.New(\n envvar.Config{\n ExportVars: map[string]string{"testKey": "", "testDefaultKey": "testDefaultVal"},\n ExcludeVars: map[string]string{"excludeKey": ""},\n }),\n)\n')),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"You will need to provide a path to use the envvar middleware.")),(0,a.kt)("h2",{id:"response"},"Response"),(0,a.kt)("p",null,"Http response contract:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'{\n "vars": {\n "someEnvVariable": "someValue",\n "anotherEnvVariable": "anotherValue",\n }\n}\n\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // ExportVars specifies the environment variables that should export\n ExportVars map[string]string\n // ExcludeVars specifies the environment variables that should not export\n ExcludeVars map[string]string\n}\n\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"Config{}\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1af20617.17e94fdc.js b/assets/js/1af20617.17e94fdc.js new file mode 100644 index 00000000000..1cee5bec83c --- /dev/null +++ b/assets/js/1af20617.17e94fdc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[363],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=p(n),b=a,f=c["".concat(s,".").concat(b)]||c[b]||g[b]||l;return n?r.createElement(f,o(o({ref:t},u),{},{components:n})):r.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=b;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:a,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const l={id:"pebble",title:"Pebble"},o=void 0,i={unversionedId:"pebble/pebble",id:"pebble/pebble",title:"Pebble",description:"Release",source:"@site/docs/storage/pebble/README.md",sourceDirName:"pebble",slug:"/pebble/",permalink:"/storage/next/pebble/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/pebble/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"pebble",title:"Pebble"},sidebar:"tutorialSidebar",previous:{title:"MySQL",permalink:"/storage/next/mysql/"},next:{title:"Postgres",permalink:"/storage/next/postgres/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:p},c="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=pebble*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A fast key-value DB using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cockroachdb/pebble"},"cockroachdb/pebble")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Pebble is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"Note: This step is only required if you don't have an existing module."),(0,a.kt)("p",null,"And then install the Pebble implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/pebble\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/pebble"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := pebble.New()\n\n// Initialize custom config\nstore := pebble.New(pebble.Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./db"\n Path string\n\n // Pass write options during write operations\n //\n // Optional. Default is nil\n WriteOptions &pebble.WriteOptions{}\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1af20617.fb88a6e2.js b/assets/js/1af20617.fb88a6e2.js deleted file mode 100644 index ff4dd88bed1..00000000000 --- a/assets/js/1af20617.fb88a6e2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[363],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=p(n),b=a,f=c["".concat(s,".").concat(b)]||c[b]||g[b]||l;return n?r.createElement(f,o(o({ref:t},u),{},{components:n})):r.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=b;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:a,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const l={id:"pebble",title:"Pebble"},o=void 0,i={unversionedId:"pebble/pebble",id:"pebble/pebble",title:"Pebble",description:"Release",source:"@site/docs/storage/pebble/README.md",sourceDirName:"pebble",slug:"/pebble/",permalink:"/storage/next/pebble/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/pebble/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"pebble",title:"Pebble"},sidebar:"tutorialSidebar",previous:{title:"MySQL",permalink:"/storage/next/mysql/"},next:{title:"Postgres",permalink:"/storage/next/postgres/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:p},c="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=pebble*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A fast key-value DB using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cockroachdb/pebble"},"cockroachdb/pebble")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Pebble is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"Note: This step is only required if you don't have an existing module."),(0,a.kt)("p",null,"And then install the Pebble implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/pebble\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/pebble"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := pebble.New()\n\n// Initialize custom config\nstore := pebble.New(pebble.Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./db"\n Path string\n\n // Pass write options during write operations\n //\n // Optional. Default is nil\n WriteOptions &pebble.WriteOptions{}\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1b545511.379a1697.js b/assets/js/1b545511.379a1697.js deleted file mode 100644 index 860ca6903e6..00000000000 --- a/assets/js/1b545511.379a1697.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1252],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>m});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(t),d=i,m=c["".concat(s,".").concat(d)]||c[d]||f[d]||o;return t?r.createElement(m,a(a({ref:n},u),{},{components:t})):r.createElement(m,a({ref:n},u))}));function m(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:i,a[1]=l;for(var p=2;p{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>a,default:()=>f,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=t(7462),i=(t(7294),t(3905));const o={id:"helmet",title:"Helmet"},a=void 0,l={unversionedId:"api/middleware/helmet",id:"api/middleware/helmet",title:"Helmet",description:"Helmet middleware helps secure your apps by setting various HTTP headers.",source:"@site/docs/core/api/middleware/helmet.md",sourceDirName:"api/middleware",slug:"/api/middleware/helmet",permalink:"/next/api/middleware/helmet",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/helmet.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"helmet",title:"Helmet"},sidebar:"tutorialSidebar",previous:{title:"FileSystem",permalink:"/next/api/middleware/filesystem"},next:{title:"Idempotency",permalink:"/next/api/middleware/idempotency"}},s={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],u={toc:p},c="wrapper";function f(e){let{components:n,...t}=e;return(0,i.kt)(c,(0,r.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Helmet middleware helps secure your apps by setting various HTTP headers."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/helmet"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use(helmet.New())\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome!")\n })\n\n app.Listen(":3000")\n}\n')),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Test:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-curl"},"curl -I http://localhost:3000\n")),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip middleware.\n // Optional. Default: nil\n Next func(*fiber.Ctx) bool\n\n // XSSProtection\n // Optional. Default value "0".\n XSSProtection string\n\n // ContentTypeNosniff\n // Optional. Default value "nosniff".\n ContentTypeNosniff string\n\n // XFrameOptions\n // Optional. Default value "SAMEORIGIN".\n // Possible values: "SAMEORIGIN", "DENY", "ALLOW-FROM uri"\n XFrameOptions string\n\n // HSTSMaxAge\n // Optional. Default value 0.\n HSTSMaxAge int\n\n // HSTSExcludeSubdomains\n // Optional. Default value false.\n HSTSExcludeSubdomains bool\n\n // ContentSecurityPolicy\n // Optional. Default value "".\n ContentSecurityPolicy string\n\n // CSPReportOnly\n // Optional. Default value false.\n CSPReportOnly bool\n\n // HSTSPreloadEnabled\n // Optional. Default value false.\n HSTSPreloadEnabled bool\n\n // ReferrerPolicy\n // Optional. Default value "ReferrerPolicy".\n ReferrerPolicy string\n\n // Permissions-Policy\n // Optional. Default value "".\n PermissionPolicy string\n\n // Cross-Origin-Embedder-Policy\n // Optional. Default value "require-corp".\n CrossOriginEmbedderPolicy string\n\n // Cross-Origin-Opener-Policy\n // Optional. Default value "same-origin".\n CrossOriginOpenerPolicy string\n\n // Cross-Origin-Resource-Policy\n // Optional. Default value "same-origin".\n CrossOriginResourcePolicy string\n\n // Origin-Agent-Cluster\n // Optional. Default value "?1".\n OriginAgentCluster string\n\n // X-DNS-Prefetch-Control\n // Optional. Default value "off".\n XDNSPrefetchControl string\n\n // X-Download-Options\n // Optional. Default value "noopen".\n XDownloadOptions string\n\n // X-Permitted-Cross-Domain-Policies\n // Optional. Default value "none".\n XPermittedCrossDomain string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n XSSProtection: "0",\n ContentTypeNosniff: "nosniff",\n XFrameOptions: "SAMEORIGIN",\n ReferrerPolicy: "no-referrer",\n CrossOriginEmbedderPolicy: "require-corp",\n CrossOriginOpenerPolicy: "same-origin",\n CrossOriginResourcePolicy: "same-origin",\n OriginAgentCluster: "?1",\n XDNSPrefetchControl: "off",\n XDownloadOptions: "noopen",\n XPermittedCrossDomain: "none",\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1b545511.ac98f5b5.js b/assets/js/1b545511.ac98f5b5.js new file mode 100644 index 00000000000..5e6c252aafb --- /dev/null +++ b/assets/js/1b545511.ac98f5b5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1252],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>m});var r=t(67294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(t),d=i,m=c["".concat(s,".").concat(d)]||c[d]||f[d]||o;return t?r.createElement(m,a(a({ref:n},u),{},{components:t})):r.createElement(m,a({ref:n},u))}));function m(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:i,a[1]=l;for(var p=2;p{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>a,default:()=>f,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=t(87462),i=(t(67294),t(3905));const o={id:"helmet",title:"Helmet"},a=void 0,l={unversionedId:"api/middleware/helmet",id:"api/middleware/helmet",title:"Helmet",description:"Helmet middleware helps secure your apps by setting various HTTP headers.",source:"@site/docs/core/api/middleware/helmet.md",sourceDirName:"api/middleware",slug:"/api/middleware/helmet",permalink:"/next/api/middleware/helmet",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/helmet.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"helmet",title:"Helmet"},sidebar:"tutorialSidebar",previous:{title:"FileSystem",permalink:"/next/api/middleware/filesystem"},next:{title:"Idempotency",permalink:"/next/api/middleware/idempotency"}},s={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],u={toc:p},c="wrapper";function f(e){let{components:n,...t}=e;return(0,i.kt)(c,(0,r.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Helmet middleware helps secure your apps by setting various HTTP headers."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/helmet"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use(helmet.New())\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome!")\n })\n\n app.Listen(":3000")\n}\n')),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Test:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-curl"},"curl -I http://localhost:3000\n")),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip middleware.\n // Optional. Default: nil\n Next func(*fiber.Ctx) bool\n\n // XSSProtection\n // Optional. Default value "0".\n XSSProtection string\n\n // ContentTypeNosniff\n // Optional. Default value "nosniff".\n ContentTypeNosniff string\n\n // XFrameOptions\n // Optional. Default value "SAMEORIGIN".\n // Possible values: "SAMEORIGIN", "DENY", "ALLOW-FROM uri"\n XFrameOptions string\n\n // HSTSMaxAge\n // Optional. Default value 0.\n HSTSMaxAge int\n\n // HSTSExcludeSubdomains\n // Optional. Default value false.\n HSTSExcludeSubdomains bool\n\n // ContentSecurityPolicy\n // Optional. Default value "".\n ContentSecurityPolicy string\n\n // CSPReportOnly\n // Optional. Default value false.\n CSPReportOnly bool\n\n // HSTSPreloadEnabled\n // Optional. Default value false.\n HSTSPreloadEnabled bool\n\n // ReferrerPolicy\n // Optional. Default value "ReferrerPolicy".\n ReferrerPolicy string\n\n // Permissions-Policy\n // Optional. Default value "".\n PermissionPolicy string\n\n // Cross-Origin-Embedder-Policy\n // Optional. Default value "require-corp".\n CrossOriginEmbedderPolicy string\n\n // Cross-Origin-Opener-Policy\n // Optional. Default value "same-origin".\n CrossOriginOpenerPolicy string\n\n // Cross-Origin-Resource-Policy\n // Optional. Default value "same-origin".\n CrossOriginResourcePolicy string\n\n // Origin-Agent-Cluster\n // Optional. Default value "?1".\n OriginAgentCluster string\n\n // X-DNS-Prefetch-Control\n // Optional. Default value "off".\n XDNSPrefetchControl string\n\n // X-Download-Options\n // Optional. Default value "noopen".\n XDownloadOptions string\n\n // X-Permitted-Cross-Domain-Policies\n // Optional. Default value "none".\n XPermittedCrossDomain string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n XSSProtection: "0",\n ContentTypeNosniff: "nosniff",\n XFrameOptions: "SAMEORIGIN",\n ReferrerPolicy: "no-referrer",\n CrossOriginEmbedderPolicy: "require-corp",\n CrossOriginOpenerPolicy: "same-origin",\n CrossOriginResourcePolicy: "same-origin",\n OriginAgentCluster: "?1",\n XDNSPrefetchControl: "off",\n XDownloadOptions: "noopen",\n XPermittedCrossDomain: "none",\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1be78505.6952f309.js b/assets/js/1be78505.6952f309.js new file mode 100644 index 00000000000..ffbeb54046a --- /dev/null +++ b/assets/js/1be78505.6952f309.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9514,4972],{19963:(e,t,n)=>{n.r(t),n.d(t,{default:()=>he});var a=n(67294),l=n(86010),o=n(1944),r=n(35281),i=n(43320),c=n(53438),s=n(74477),d=n(1116),m=n(46375),u=n(95999),b=n(12466),p=n(85936);const h={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};function E(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,l]=(0,a.useState)(!1),o=(0,a.useRef)(!1),{startScroll:r,cancelScroll:i}=(0,b.Ct)();return(0,b.RF)(((e,n)=>{let{scrollY:a}=e;const r=n?.scrollY;r&&(o.current?o.current=!1:a>=r?(i(),l(!1)):a{e.location.hash&&(o.current=!0,l(!1))})),{shown:n,scrollToTop:()=>r(0)}}({threshold:300});return a.createElement("button",{"aria-label":(0,u.I)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,l.Z)("clean-btn",r.k.common.backToTopButton,h.backToTopButton,e&&h.backToTopButtonShow),type:"button",onClick:t})}var f=n(91442),g=n(16550),k=n(87524),v=n(86668),_=n(21327),C=n(87462);function S(e){return a.createElement("svg",(0,C.Z)({width:"20",height:"20","aria-hidden":"true"},e),a.createElement("g",{fill:"#7a7a7a"},a.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),a.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}const I={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function N(e){let{onClick:t}=e;return a.createElement("button",{type:"button",title:(0,u.I)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,l.Z)("button button--secondary button--outline",I.collapseSidebarButton),onClick:t},a.createElement(S,{className:I.collapseSidebarButtonIcon}))}var T=n(59689),Z=n(902);const x=Symbol("EmptyContext"),B=a.createContext(x);function y(e){let{children:t}=e;const[n,l]=(0,a.useState)(null),o=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:l})),[n]);return a.createElement(B.Provider,{value:o},t)}var L=n(86043),w=n(48596),A=n(39960),H=n(72389);function M(e){let{categoryLabel:t,onClick:n}=e;return a.createElement("button",{"aria-label":(0,u.I)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function F(e){let{item:t,onItemClick:n,activePath:o,level:i,index:s,...d}=e;const{items:m,label:u,collapsible:b,className:p,href:h}=t,{docs:{sidebar:{autoCollapseCategories:E}}}=(0,v.L)(),f=function(e){const t=(0,H.Z)();return(0,a.useMemo)((()=>e.href?e.href:!t&&e.collapsible?(0,c.Wl)(e):void 0),[e,t])}(t),g=(0,c._F)(t,o),k=(0,w.Mg)(h,o),{collapsed:_,setCollapsed:S}=(0,L.u)({initialState:()=>!!b&&(!g&&t.collapsed)}),{expandedItem:I,setExpandedItem:N}=function(){const e=(0,a.useContext)(B);if(e===x)throw new Z.i6("DocSidebarItemsExpandedStateProvider");return e}(),T=function(e){void 0===e&&(e=!_),N(e?null:s),S(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:l}=e;const o=(0,Z.D9)(t);(0,a.useEffect)((()=>{t&&!o&&n&&l(!1)}),[t,o,n,l])}({isActive:g,collapsed:_,updateCollapsed:T}),(0,a.useEffect)((()=>{b&&null!=I&&I!==s&&E&&S(!0)}),[b,I,s,S,E]),a.createElement("li",{className:(0,l.Z)(r.k.docs.docSidebarItemCategory,r.k.docs.docSidebarItemCategoryLevel(i),"menu__list-item",{"menu__list-item--collapsed":_},p)},a.createElement("div",{className:(0,l.Z)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":k})},a.createElement(A.Z,(0,C.Z)({className:(0,l.Z)("menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!h&&b,"menu__link--active":g}),onClick:b?e=>{n?.(t),h?T(!1):(e.preventDefault(),T())}:()=>{n?.(t)},"aria-current":k?"page":void 0,"aria-expanded":b?!_:void 0,href:b?f??"#":f},d),u),h&&b&&a.createElement(M,{categoryLabel:u,onClick:e=>{e.preventDefault(),T()}})),a.createElement(L.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:_},a.createElement(j,{items:m,tabIndex:_?-1:0,onItemClick:n,activePath:o,level:i+1})))}var W=n(13919),P=n(39471);const D={menuExternalLink:"menuExternalLink_NmtK"};function R(e){let{item:t,onItemClick:n,activePath:o,level:i,index:s,...d}=e;const{href:m,label:u,className:b,autoAddBaseUrl:p}=t,h=(0,c._F)(t,o),E=(0,W.Z)(m);return a.createElement("li",{className:(0,l.Z)(r.k.docs.docSidebarItemLink,r.k.docs.docSidebarItemLinkLevel(i),"menu__list-item",b),key:u},a.createElement(A.Z,(0,C.Z)({className:(0,l.Z)("menu__link",!E&&D.menuExternalLink,{"menu__link--active":h}),autoAddBaseUrl:p,"aria-current":h?"page":void 0,to:m},E&&{onClick:n?()=>n(t):void 0},d),u,!E&&a.createElement(P.Z,null)))}const V={menuHtmlItem:"menuHtmlItem_M9Kj"};function z(e){let{item:t,level:n,index:o}=e;const{value:i,defaultStyle:c,className:s}=t;return a.createElement("li",{className:(0,l.Z)(r.k.docs.docSidebarItemLink,r.k.docs.docSidebarItemLinkLevel(n),c&&[V.menuHtmlItem,"menu__list-item"],s),key:o,dangerouslySetInnerHTML:{__html:i}})}function U(e){let{item:t,...n}=e;switch(t.type){case"category":return a.createElement(F,(0,C.Z)({item:t},n));case"html":return a.createElement(z,(0,C.Z)({item:t},n));default:return a.createElement(R,(0,C.Z)({item:t},n))}}function K(e){let{items:t,...n}=e;return a.createElement(y,null,t.map(((e,t)=>a.createElement(U,(0,C.Z)({key:t,item:e,index:t},n)))))}const j=(0,a.memo)(K),G={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function Y(e){let{path:t,sidebar:n,className:o}=e;const i=function(){const{isActive:e}=(0,T.nT)(),[t,n]=(0,a.useState)(e);return(0,b.RF)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return a.createElement("nav",{"aria-label":(0,u.I)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,l.Z)("menu thin-scrollbar",G.menu,i&&G.menuWithAnnouncementBar,o)},a.createElement("ul",{className:(0,l.Z)(r.k.docs.docSidebarMenu,"menu__list")},a.createElement(j,{items:n,activePath:t,level:1})))}const q={sidebar:"sidebar_njMd",sidebarWithHideableNavbar:"sidebarWithHideableNavbar_wUlq",sidebarHidden:"sidebarHidden_VK0M",sidebarLogo:"sidebarLogo_isFc"};function O(e){let{path:t,sidebar:n,onCollapse:o,isHidden:r}=e;const{navbar:{hideOnScroll:i},docs:{sidebar:{hideable:c}}}=(0,v.L)();return a.createElement("div",{className:(0,l.Z)(q.sidebar,i&&q.sidebarWithHideableNavbar,r&&q.sidebarHidden)},i&&a.createElement(_.Z,{tabIndex:-1,className:q.sidebarLogo}),a.createElement(Y,{path:t,sidebar:n}),c&&a.createElement(N,{onClick:o}))}const X=a.memo(O);var J=n(13102),Q=n(93163);const $=e=>{let{sidebar:t,path:n}=e;const o=(0,Q.e)();return a.createElement("ul",{className:(0,l.Z)(r.k.docs.docSidebarMenu,"menu__list")},a.createElement(j,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&o.toggle(),"link"===e.type&&o.toggle()},level:1}))};function ee(e){return a.createElement(J.Zo,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,k.i)(),n="desktop"===t||"ssr"===t,l="mobile"===t;return a.createElement(a.Fragment,null,n&&a.createElement(X,e),l&&a.createElement(te,e))}const ae={expandButton:"expandButton_m80_",expandButtonIcon:"expandButtonIcon_BlDH"};function le(e){let{toggleSidebar:t}=e;return a.createElement("div",{className:ae.expandButton,title:(0,u.I)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t},a.createElement(S,{className:ae.expandButtonIcon}))}const oe={docSidebarContainer:"docSidebarContainer_b6E3",docSidebarContainerHidden:"docSidebarContainerHidden_b3ry",sidebarViewport:"sidebarViewport_Xe31"};function re(e){let{children:t}=e;const n=(0,d.V)();return a.createElement(a.Fragment,{key:n?.name??"noSidebar"},t)}function ie(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:o}=e;const{pathname:i}=(0,g.TH)(),[c,s]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{c&&s(!1),!c&&(0,f.n)()&&s(!0),o((e=>!e))}),[o,c]);return a.createElement("aside",{className:(0,l.Z)(r.k.docs.docSidebarContainer,oe.docSidebarContainer,n&&oe.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(oe.docSidebarContainer)&&n&&s(!0)}},a.createElement(re,null,a.createElement("div",{className:(0,l.Z)(oe.sidebarViewport,c&&oe.sidebarViewportHidden)},a.createElement(ne,{sidebar:t,path:i,onCollapse:d,isHidden:c}),c&&a.createElement(le,{toggleSidebar:d}))))}const ce={docMainContainer:"docMainContainer_gTbr",docMainContainerEnhanced:"docMainContainerEnhanced_Uz_u",docItemWrapperEnhanced:"docItemWrapperEnhanced_czyv"};function se(e){let{hiddenSidebarContainer:t,children:n}=e;const o=(0,d.V)();return a.createElement("main",{className:(0,l.Z)(ce.docMainContainer,(t||!o)&&ce.docMainContainerEnhanced)},a.createElement("div",{className:(0,l.Z)("container padding-top--md padding-bottom--lg",ce.docItemWrapper,t&&ce.docItemWrapperEnhanced)},n))}const de={docPage:"docPage__5DB",docsWrapper:"docsWrapper_BCFX"};function me(e){let{children:t}=e;const n=(0,d.V)(),[l,o]=(0,a.useState)(!1);return a.createElement(m.Z,{wrapperClassName:de.docsWrapper},a.createElement(E,null),a.createElement("div",{className:de.docPage},n&&a.createElement(ie,{sidebar:n.items,hiddenSidebarContainer:l,setHiddenSidebarContainer:o}),a.createElement(se,{hiddenSidebarContainer:l},t)))}var ue=n(4972),be=n(90197);function pe(e){const{versionMetadata:t}=e;return a.createElement(a.Fragment,null,a.createElement(be.Z,{version:t.version,tag:(0,i.os)(t.pluginId,t.version)}),a.createElement(o.d,null,t.noIndex&&a.createElement("meta",{name:"robots",content:"noindex, nofollow"})))}function he(e){const{versionMetadata:t}=e,n=(0,c.hI)(e);if(!n)return a.createElement(ue.default,null);const{docElement:i,sidebarName:m,sidebarItems:u}=n;return a.createElement(a.Fragment,null,a.createElement(pe,e),a.createElement(o.FG,{className:(0,l.Z)(r.k.wrapper.docsPages,r.k.page.docsDocPage,e.versionMetadata.className)},a.createElement(s.q,{version:t},a.createElement(d.b,{name:m,items:u},a.createElement(me,null,i)))))}},4972:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var a=n(67294),l=n(95999),o=n(1944),r=n(46375);function i(){return a.createElement(a.Fragment,null,a.createElement(o.d,{title:(0,l.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file diff --git a/assets/js/1be78505.ed99298b.js b/assets/js/1be78505.ed99298b.js deleted file mode 100644 index eae3fcff669..00000000000 --- a/assets/js/1be78505.ed99298b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9514,4972],{9963:(e,t,n)=>{n.r(t),n.d(t,{default:()=>he});var a=n(7294),l=n(6010),o=n(1944),r=n(5281),i=n(3320),c=n(3438),s=n(4477),d=n(1116),m=n(6375),u=n(5999),b=n(2466),p=n(5936);const h={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};function E(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,l]=(0,a.useState)(!1),o=(0,a.useRef)(!1),{startScroll:r,cancelScroll:i}=(0,b.Ct)();return(0,b.RF)(((e,n)=>{let{scrollY:a}=e;const r=n?.scrollY;r&&(o.current?o.current=!1:a>=r?(i(),l(!1)):a{e.location.hash&&(o.current=!0,l(!1))})),{shown:n,scrollToTop:()=>r(0)}}({threshold:300});return a.createElement("button",{"aria-label":(0,u.I)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,l.Z)("clean-btn",r.k.common.backToTopButton,h.backToTopButton,e&&h.backToTopButtonShow),type:"button",onClick:t})}var f=n(1442),g=n(6550),k=n(7524),v=n(6668),_=n(1327),C=n(7462);function S(e){return a.createElement("svg",(0,C.Z)({width:"20",height:"20","aria-hidden":"true"},e),a.createElement("g",{fill:"#7a7a7a"},a.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),a.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}const I={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function N(e){let{onClick:t}=e;return a.createElement("button",{type:"button",title:(0,u.I)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,l.Z)("button button--secondary button--outline",I.collapseSidebarButton),onClick:t},a.createElement(S,{className:I.collapseSidebarButtonIcon}))}var T=n(9689),Z=n(902);const x=Symbol("EmptyContext"),B=a.createContext(x);function y(e){let{children:t}=e;const[n,l]=(0,a.useState)(null),o=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:l})),[n]);return a.createElement(B.Provider,{value:o},t)}var L=n(6043),w=n(8596),A=n(9960),H=n(2389);function M(e){let{categoryLabel:t,onClick:n}=e;return a.createElement("button",{"aria-label":(0,u.I)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function F(e){let{item:t,onItemClick:n,activePath:o,level:i,index:s,...d}=e;const{items:m,label:u,collapsible:b,className:p,href:h}=t,{docs:{sidebar:{autoCollapseCategories:E}}}=(0,v.L)(),f=function(e){const t=(0,H.Z)();return(0,a.useMemo)((()=>e.href?e.href:!t&&e.collapsible?(0,c.Wl)(e):void 0),[e,t])}(t),g=(0,c._F)(t,o),k=(0,w.Mg)(h,o),{collapsed:_,setCollapsed:S}=(0,L.u)({initialState:()=>!!b&&(!g&&t.collapsed)}),{expandedItem:I,setExpandedItem:N}=function(){const e=(0,a.useContext)(B);if(e===x)throw new Z.i6("DocSidebarItemsExpandedStateProvider");return e}(),T=function(e){void 0===e&&(e=!_),N(e?null:s),S(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:l}=e;const o=(0,Z.D9)(t);(0,a.useEffect)((()=>{t&&!o&&n&&l(!1)}),[t,o,n,l])}({isActive:g,collapsed:_,updateCollapsed:T}),(0,a.useEffect)((()=>{b&&null!=I&&I!==s&&E&&S(!0)}),[b,I,s,S,E]),a.createElement("li",{className:(0,l.Z)(r.k.docs.docSidebarItemCategory,r.k.docs.docSidebarItemCategoryLevel(i),"menu__list-item",{"menu__list-item--collapsed":_},p)},a.createElement("div",{className:(0,l.Z)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":k})},a.createElement(A.Z,(0,C.Z)({className:(0,l.Z)("menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!h&&b,"menu__link--active":g}),onClick:b?e=>{n?.(t),h?T(!1):(e.preventDefault(),T())}:()=>{n?.(t)},"aria-current":k?"page":void 0,"aria-expanded":b?!_:void 0,href:b?f??"#":f},d),u),h&&b&&a.createElement(M,{categoryLabel:u,onClick:e=>{e.preventDefault(),T()}})),a.createElement(L.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:_},a.createElement(j,{items:m,tabIndex:_?-1:0,onItemClick:n,activePath:o,level:i+1})))}var W=n(3919),P=n(9471);const D={menuExternalLink:"menuExternalLink_NmtK"};function R(e){let{item:t,onItemClick:n,activePath:o,level:i,index:s,...d}=e;const{href:m,label:u,className:b,autoAddBaseUrl:p}=t,h=(0,c._F)(t,o),E=(0,W.Z)(m);return a.createElement("li",{className:(0,l.Z)(r.k.docs.docSidebarItemLink,r.k.docs.docSidebarItemLinkLevel(i),"menu__list-item",b),key:u},a.createElement(A.Z,(0,C.Z)({className:(0,l.Z)("menu__link",!E&&D.menuExternalLink,{"menu__link--active":h}),autoAddBaseUrl:p,"aria-current":h?"page":void 0,to:m},E&&{onClick:n?()=>n(t):void 0},d),u,!E&&a.createElement(P.Z,null)))}const V={menuHtmlItem:"menuHtmlItem_M9Kj"};function z(e){let{item:t,level:n,index:o}=e;const{value:i,defaultStyle:c,className:s}=t;return a.createElement("li",{className:(0,l.Z)(r.k.docs.docSidebarItemLink,r.k.docs.docSidebarItemLinkLevel(n),c&&[V.menuHtmlItem,"menu__list-item"],s),key:o,dangerouslySetInnerHTML:{__html:i}})}function U(e){let{item:t,...n}=e;switch(t.type){case"category":return a.createElement(F,(0,C.Z)({item:t},n));case"html":return a.createElement(z,(0,C.Z)({item:t},n));default:return a.createElement(R,(0,C.Z)({item:t},n))}}function K(e){let{items:t,...n}=e;return a.createElement(y,null,t.map(((e,t)=>a.createElement(U,(0,C.Z)({key:t,item:e,index:t},n)))))}const j=(0,a.memo)(K),G={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function Y(e){let{path:t,sidebar:n,className:o}=e;const i=function(){const{isActive:e}=(0,T.nT)(),[t,n]=(0,a.useState)(e);return(0,b.RF)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return a.createElement("nav",{"aria-label":(0,u.I)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,l.Z)("menu thin-scrollbar",G.menu,i&&G.menuWithAnnouncementBar,o)},a.createElement("ul",{className:(0,l.Z)(r.k.docs.docSidebarMenu,"menu__list")},a.createElement(j,{items:n,activePath:t,level:1})))}const q={sidebar:"sidebar_njMd",sidebarWithHideableNavbar:"sidebarWithHideableNavbar_wUlq",sidebarHidden:"sidebarHidden_VK0M",sidebarLogo:"sidebarLogo_isFc"};function O(e){let{path:t,sidebar:n,onCollapse:o,isHidden:r}=e;const{navbar:{hideOnScroll:i},docs:{sidebar:{hideable:c}}}=(0,v.L)();return a.createElement("div",{className:(0,l.Z)(q.sidebar,i&&q.sidebarWithHideableNavbar,r&&q.sidebarHidden)},i&&a.createElement(_.Z,{tabIndex:-1,className:q.sidebarLogo}),a.createElement(Y,{path:t,sidebar:n}),c&&a.createElement(N,{onClick:o}))}const X=a.memo(O);var J=n(3102),Q=n(3163);const $=e=>{let{sidebar:t,path:n}=e;const o=(0,Q.e)();return a.createElement("ul",{className:(0,l.Z)(r.k.docs.docSidebarMenu,"menu__list")},a.createElement(j,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&o.toggle(),"link"===e.type&&o.toggle()},level:1}))};function ee(e){return a.createElement(J.Zo,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,k.i)(),n="desktop"===t||"ssr"===t,l="mobile"===t;return a.createElement(a.Fragment,null,n&&a.createElement(X,e),l&&a.createElement(te,e))}const ae={expandButton:"expandButton_m80_",expandButtonIcon:"expandButtonIcon_BlDH"};function le(e){let{toggleSidebar:t}=e;return a.createElement("div",{className:ae.expandButton,title:(0,u.I)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t},a.createElement(S,{className:ae.expandButtonIcon}))}const oe={docSidebarContainer:"docSidebarContainer_b6E3",docSidebarContainerHidden:"docSidebarContainerHidden_b3ry",sidebarViewport:"sidebarViewport_Xe31"};function re(e){let{children:t}=e;const n=(0,d.V)();return a.createElement(a.Fragment,{key:n?.name??"noSidebar"},t)}function ie(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:o}=e;const{pathname:i}=(0,g.TH)(),[c,s]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{c&&s(!1),!c&&(0,f.n)()&&s(!0),o((e=>!e))}),[o,c]);return a.createElement("aside",{className:(0,l.Z)(r.k.docs.docSidebarContainer,oe.docSidebarContainer,n&&oe.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(oe.docSidebarContainer)&&n&&s(!0)}},a.createElement(re,null,a.createElement("div",{className:(0,l.Z)(oe.sidebarViewport,c&&oe.sidebarViewportHidden)},a.createElement(ne,{sidebar:t,path:i,onCollapse:d,isHidden:c}),c&&a.createElement(le,{toggleSidebar:d}))))}const ce={docMainContainer:"docMainContainer_gTbr",docMainContainerEnhanced:"docMainContainerEnhanced_Uz_u",docItemWrapperEnhanced:"docItemWrapperEnhanced_czyv"};function se(e){let{hiddenSidebarContainer:t,children:n}=e;const o=(0,d.V)();return a.createElement("main",{className:(0,l.Z)(ce.docMainContainer,(t||!o)&&ce.docMainContainerEnhanced)},a.createElement("div",{className:(0,l.Z)("container padding-top--md padding-bottom--lg",ce.docItemWrapper,t&&ce.docItemWrapperEnhanced)},n))}const de={docPage:"docPage__5DB",docsWrapper:"docsWrapper_BCFX"};function me(e){let{children:t}=e;const n=(0,d.V)(),[l,o]=(0,a.useState)(!1);return a.createElement(m.Z,{wrapperClassName:de.docsWrapper},a.createElement(E,null),a.createElement("div",{className:de.docPage},n&&a.createElement(ie,{sidebar:n.items,hiddenSidebarContainer:l,setHiddenSidebarContainer:o}),a.createElement(se,{hiddenSidebarContainer:l},t)))}var ue=n(4972),be=n(197);function pe(e){const{versionMetadata:t}=e;return a.createElement(a.Fragment,null,a.createElement(be.Z,{version:t.version,tag:(0,i.os)(t.pluginId,t.version)}),a.createElement(o.d,null,t.noIndex&&a.createElement("meta",{name:"robots",content:"noindex, nofollow"})))}function he(e){const{versionMetadata:t}=e,n=(0,c.hI)(e);if(!n)return a.createElement(ue.default,null);const{docElement:i,sidebarName:m,sidebarItems:u}=n;return a.createElement(a.Fragment,null,a.createElement(pe,e),a.createElement(o.FG,{className:(0,l.Z)(r.k.wrapper.docsPages,r.k.page.docsDocPage,e.versionMetadata.className)},a.createElement(s.q,{version:t},a.createElement(d.b,{name:m,items:u},a.createElement(me,null,i)))))}},4972:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var a=n(7294),l=n(5999),o=n(1944),r=n(6375);function i(){return a.createElement(a.Fragment,null,a.createElement(o.d,{title:(0,l.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file diff --git a/assets/js/1db45628.882d9be7.js b/assets/js/1db45628.882d9be7.js new file mode 100644 index 00000000000..d2c017944ac --- /dev/null +++ b/assets/js/1db45628.882d9be7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1883],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>c});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),g=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=g(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),s=g(r),m=a,c=s["".concat(p,".").concat(m)]||s[m]||f[m]||i;return r?n.createElement(c,l(l({ref:t},d),{},{components:r})):n.createElement(c,l({ref:t},d))}));function c(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,l=new Array(i);l[0]=m;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[s]="string"==typeof e?e:a,l[1]=o;for(var g=2;g{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>f,frontMatter:()=>i,metadata:()=>o,toc:()=>g});var n=r(87462),a=(r(67294),r(3905));const i={id:"fiberzap",title:"Fiberzap"},l=void 0,o={unversionedId:"fiberzap/fiberzap",id:"version-swagger_v1.x.x/fiberzap/fiberzap",title:"Fiberzap",description:"Release",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/fiberzap/README.md",sourceDirName:"fiberzap",slug:"/fiberzap/",permalink:"/contrib/swagger_v1.x.x/fiberzap/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fiberzap/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fiberzap",title:"Fiberzap"},sidebar:"tutorialSidebar",previous:{title:"Fibersentry",permalink:"/contrib/swagger_v1.x.x/fibersentry/"},next:{title:"Fiberzerolog",permalink:"/contrib/swagger_v1.x.x/fiberzerolog/"}},p={},g=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Example",id:"example",level:3}],d={toc:g},s="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(s,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fiberzap*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/uber-go/zap"},"Zap")," logging support for Fiber."),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("p",null,"This middleware supports Fiber v2."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fiberzap\ngo get -u go.uber.org/zap\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"fiberzap.New(config ...Config) fiber.Handler\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Next"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*Ctx) bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Define a function to skip this middleware when returned true"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Logger"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"*zap.Logger")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Add custom zap logger."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"zap.NewDevelopment()"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Fields"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Add fields what you want see."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'[]string{"latency", "status", "method", "url"}'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Messages"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Custom response messages."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'[]string{"Server error", "Client error", "Success"}'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Levels"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]zapcore.Level")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Custom response levels."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel}"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SkipURIs"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Skip logging these URI."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string{}"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"GetResBody"),(0,a.kt)("td",{parentName:"tr",align:"left"},"func(c *fiber.Ctx) []byte"),(0,a.kt)("td",{parentName:"tr",align:"left"},"Define a function to get response body when return non-nil.",(0,a.kt)("br",null),"eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/fiberzap"\n "go.uber.org/zap"\n)\n\nfunc main() {\n app := fiber.New()\n logger, _ := zap.NewProduction()\n\n app.Use(fiberzap.New(fiberzap.Config{\n Logger: logger,\n }))\n\n app.Get("/", func (c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1db45628.b3fe5fc9.js b/assets/js/1db45628.b3fe5fc9.js deleted file mode 100644 index a7eb64b402d..00000000000 --- a/assets/js/1db45628.b3fe5fc9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1883],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>c});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),g=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=g(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),s=g(r),m=a,c=s["".concat(p,".").concat(m)]||s[m]||f[m]||i;return r?n.createElement(c,l(l({ref:t},d),{},{components:r})):n.createElement(c,l({ref:t},d))}));function c(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,l=new Array(i);l[0]=m;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[s]="string"==typeof e?e:a,l[1]=o;for(var g=2;g{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>f,frontMatter:()=>i,metadata:()=>o,toc:()=>g});var n=r(7462),a=(r(7294),r(3905));const i={id:"fiberzap",title:"Fiberzap"},l=void 0,o={unversionedId:"fiberzap/fiberzap",id:"version-swagger_v1.x.x/fiberzap/fiberzap",title:"Fiberzap",description:"Release",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/fiberzap/README.md",sourceDirName:"fiberzap",slug:"/fiberzap/",permalink:"/contrib/swagger_v1.x.x/fiberzap/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fiberzap/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fiberzap",title:"Fiberzap"},sidebar:"tutorialSidebar",previous:{title:"Fibersentry",permalink:"/contrib/swagger_v1.x.x/fibersentry/"},next:{title:"Fiberzerolog",permalink:"/contrib/swagger_v1.x.x/fiberzerolog/"}},p={},g=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Example",id:"example",level:3}],d={toc:g},s="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(s,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fiberzap*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/uber-go/zap"},"Zap")," logging support for Fiber."),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("p",null,"This middleware supports Fiber v2."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fiberzap\ngo get -u go.uber.org/zap\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"fiberzap.New(config ...Config) fiber.Handler\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Next"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*Ctx) bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Define a function to skip this middleware when returned true"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Logger"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"*zap.Logger")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Add custom zap logger."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"zap.NewDevelopment()"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Fields"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Add fields what you want see."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'[]string{"latency", "status", "method", "url"}'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Messages"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Custom response messages."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'[]string{"Server error", "Client error", "Success"}'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Levels"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]zapcore.Level")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Custom response levels."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel}"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SkipURIs"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Skip logging these URI."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string{}"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"GetResBody"),(0,a.kt)("td",{parentName:"tr",align:"left"},"func(c *fiber.Ctx) []byte"),(0,a.kt)("td",{parentName:"tr",align:"left"},"Define a function to get response body when return non-nil.",(0,a.kt)("br",null),"eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/fiberzap"\n "go.uber.org/zap"\n)\n\nfunc main() {\n app := fiber.New()\n logger, _ := zap.NewProduction()\n\n app.Use(fiberzap.New(fiberzap.Config{\n Logger: logger,\n }))\n\n app.Get("/", func (c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1ed4c90d.09f95fa3.js b/assets/js/1ed4c90d.09f95fa3.js new file mode 100644 index 00000000000..c9be5ca4775 --- /dev/null +++ b/assets/js/1ed4c90d.09f95fa3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6570],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=u(r),d=a,f=c["".concat(s,".").concat(d)]||c[d]||m[d]||l;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=r.length,i=new Array(l);i[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:a,i[1]=o;for(var u=2;u{r.d(t,{Z:()=>i});var n=r(67294),a=r(86010);const l={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:r,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,i),hidden:r},t)}},74866:(e,t,r)=>{r.d(t,{Z:()=>N});var n=r(87462),a=r(67294),l=r(86010),i=r(12466),o=r(16550),s=r(91980),u=r(67392),p=r(50012);function c(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}function m(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=t??c(r);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function d(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:r}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,l=m(e),[i,o]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=f({queryString:r,groupId:n}),[c,b]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,p.Nk)(r);return[n,(0,a.useCallback)((e=>{r&&l.set(e)}),[r,l])]}({groupId:n}),g=(()=>{const e=s??c;return d({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{g&&o(g)}),[g]);return{selectedValue:i,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var g=r(72389);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:t,block:r,selectedValue:o,selectValue:s,tabValues:u}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),m=e=>{const t=e.currentTarget,r=p.indexOf(t),n=u[r].value;n!==o&&(c(t),s(n))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const r=p.indexOf(e.currentTarget)+1;t=p[r]??p[0];break}case"ArrowLeft":{const r=p.indexOf(e.currentTarget)-1;t=p[r]??p[p.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":r},t)},u.map((e=>{let{value:t,label:r,attributes:i}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>p.push(e),onKeyDown:d,onClick:m},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),r??t)})))}function k(e){let{lazy:t,children:r,selectedValue:n}=e;const l=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=b(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},a.createElement(v,(0,n.Z)({},e,t)),a.createElement(k,(0,n.Z)({},e,t)))}function N(e){const t=(0,g.Z)();return a.createElement(y,(0,n.Z)({key:String(t)},e))}},38426:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>f,frontMatter:()=>o,metadata:()=>u,toc:()=>c});var n=r(87462),a=(r(67294),r(3905)),l=r(74866),i=r(85162);const o={id:"templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",sidebar_position:3},s=void 0,u={unversionedId:"guide/templates",id:"version-v1.x/guide/templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",source:"@site/versioned_docs/version-v1.x/guide/templates.md",sourceDirName:"guide",slug:"/guide/templates",permalink:"/v1.x/guide/templates",draft:!1,tags:[],version:"v1.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:3,frontMatter:{id:"templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"\ud83c\udfad Grouping",permalink:"/v1.x/guide/grouping"},next:{title:"\ud83d\udd0e Validating",permalink:"/v1.x/guide/validating"}},p={},c=[{value:"Template interfaces",id:"template-interfaces",level:2},{value:"Engines",id:"engines",level:2}],m={toc:c},d="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"template-interfaces"},"Template interfaces"),(0,a.kt)("p",null,"Fiber provides a Views interface to provide your own template engine:"),(0,a.kt)(l.Z,{mdxType:"Tabs"},(0,a.kt)(i.Z,{value:"views",label:"Views",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Views interface {\n Load() error\n Render(io.Writer, string, interface{}, ...string) error\n}\n")))),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"Views")," interface contains a ",(0,a.kt)("inlineCode",{parentName:"p"},"Load")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"Render")," method, ",(0,a.kt)("inlineCode",{parentName:"p"},"Load")," is executed by Fiber on app initialization to load/parse the templates."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Pass engine to Fiber's Views Engine\napp := fiber.New(&fiber.Settings{\n Views: engine,\n})\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"Render")," method is linked to the ",(0,a.kt)("a",{parentName:"p",href:"../api/ctx#render"},(0,a.kt)("strong",{parentName:"a"},"ctx.Render","(",")"))," function that accepts a template name and binding data."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/", func(c *fiber.Ctx) error {\n return c.Render("index", fiber.Map{\n "hello": "world",\n });\n})\n')),(0,a.kt)("h2",{id:"engines"},"Engines"),(0,a.kt)("p",null,"Fiber team maintains ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/template"},"templates")," package that provides wrappers for multiple template engines:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/html"},"html")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/ace"},"ace")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/amber"},"amber")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/django"},"django")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/handlebars"},"handlebars")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/jet"},"jet")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/mustache"},"mustache")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/pug"},"pug"))),(0,a.kt)(l.Z,{mdxType:"Tabs"},(0,a.kt)(i.Z,{value:"example",label:"Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber"\n "github.com/gofiber/template/html"\n)\n\nfunc main() {\n // Initialize standard Go html template engine\n engine := html.New("./views", ".html")\n\n app := fiber.New(&fiber.Settings{\n Views: engine,\n })\n app.Get("/", func(c *fiber.Ctx) {\n // Render index template\n _ = c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Listen(3000)\n}\n'))),(0,a.kt)(i.Z,{value:"index",label:"views/index.html",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-markup"},"\n\n

{{.Title}}

\n\n\n")))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1ed4c90d.a9dabf3a.js b/assets/js/1ed4c90d.a9dabf3a.js deleted file mode 100644 index 91d9cf53853..00000000000 --- a/assets/js/1ed4c90d.a9dabf3a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6570],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=u(r),d=a,f=c["".concat(s,".").concat(d)]||c[d]||m[d]||l;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=r.length,i=new Array(l);i[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:a,i[1]=o;for(var u=2;u{r.d(t,{Z:()=>i});var n=r(7294),a=r(6010);const l={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:r,className:i}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,i),hidden:r},t)}},4866:(e,t,r)=>{r.d(t,{Z:()=>N});var n=r(7462),a=r(7294),l=r(6010),i=r(2466),o=r(6550),s=r(1980),u=r(7392),p=r(12);function c(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}function m(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=t??c(r);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function d(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:r}=e;const n=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function b(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,l=m(e),[i,o]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[s,u]=f({queryString:r,groupId:n}),[c,b]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,p.Nk)(r);return[n,(0,a.useCallback)((e=>{r&&l.set(e)}),[r,l])]}({groupId:n}),g=(()=>{const e=s??c;return d({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{g&&o(g)}),[g]);return{selectedValue:i,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var g=r(2389);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:t,block:r,selectedValue:o,selectValue:s,tabValues:u}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),m=e=>{const t=e.currentTarget,r=p.indexOf(t),n=u[r].value;n!==o&&(c(t),s(n))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const r=p.indexOf(e.currentTarget)+1;t=p[r]??p[0];break}case"ArrowLeft":{const r=p.indexOf(e.currentTarget)-1;t=p[r]??p[p.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":r},t)},u.map((e=>{let{value:t,label:r,attributes:i}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>p.push(e),onKeyDown:d,onClick:m},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),r??t)})))}function k(e){let{lazy:t,children:r,selectedValue:n}=e;const l=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function y(e){const t=b(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},a.createElement(v,(0,n.Z)({},e,t)),a.createElement(k,(0,n.Z)({},e,t)))}function N(e){const t=(0,g.Z)();return a.createElement(y,(0,n.Z)({key:String(t)},e))}},8426:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>f,frontMatter:()=>o,metadata:()=>u,toc:()=>c});var n=r(7462),a=(r(7294),r(3905)),l=r(4866),i=r(5162);const o={id:"templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",sidebar_position:3},s=void 0,u={unversionedId:"guide/templates",id:"version-v1.x/guide/templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",source:"@site/versioned_docs/version-v1.x/guide/templates.md",sourceDirName:"guide",slug:"/guide/templates",permalink:"/v1.x/guide/templates",draft:!1,tags:[],version:"v1.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:3,frontMatter:{id:"templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"\ud83c\udfad Grouping",permalink:"/v1.x/guide/grouping"},next:{title:"\ud83d\udd0e Validating",permalink:"/v1.x/guide/validating"}},p={},c=[{value:"Template interfaces",id:"template-interfaces",level:2},{value:"Engines",id:"engines",level:2}],m={toc:c},d="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"template-interfaces"},"Template interfaces"),(0,a.kt)("p",null,"Fiber provides a Views interface to provide your own template engine:"),(0,a.kt)(l.Z,{mdxType:"Tabs"},(0,a.kt)(i.Z,{value:"views",label:"Views",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Views interface {\n Load() error\n Render(io.Writer, string, interface{}, ...string) error\n}\n")))),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"Views")," interface contains a ",(0,a.kt)("inlineCode",{parentName:"p"},"Load")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"Render")," method, ",(0,a.kt)("inlineCode",{parentName:"p"},"Load")," is executed by Fiber on app initialization to load/parse the templates."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Pass engine to Fiber's Views Engine\napp := fiber.New(&fiber.Settings{\n Views: engine,\n})\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"Render")," method is linked to the ",(0,a.kt)("a",{parentName:"p",href:"../api/ctx#render"},(0,a.kt)("strong",{parentName:"a"},"ctx.Render","(",")"))," function that accepts a template name and binding data."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/", func(c *fiber.Ctx) error {\n return c.Render("index", fiber.Map{\n "hello": "world",\n });\n})\n')),(0,a.kt)("h2",{id:"engines"},"Engines"),(0,a.kt)("p",null,"Fiber team maintains ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/template"},"templates")," package that provides wrappers for multiple template engines:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/html"},"html")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/ace"},"ace")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/amber"},"amber")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/django"},"django")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/handlebars"},"handlebars")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/jet"},"jet")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/mustache"},"mustache")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/template/tree/master/pug"},"pug"))),(0,a.kt)(l.Z,{mdxType:"Tabs"},(0,a.kt)(i.Z,{value:"example",label:"Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber"\n "github.com/gofiber/template/html"\n)\n\nfunc main() {\n // Initialize standard Go html template engine\n engine := html.New("./views", ".html")\n\n app := fiber.New(&fiber.Settings{\n Views: engine,\n })\n app.Get("/", func(c *fiber.Ctx) {\n // Render index template\n _ = c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Listen(3000)\n}\n'))),(0,a.kt)(i.Z,{value:"index",label:"views/index.html",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-markup"},"\n\n

{{.Title}}

\n\n\n")))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/201075ae.b3578f02.js b/assets/js/201075ae.b3578f02.js new file mode 100644 index 00000000000..6da55d49fb6 --- /dev/null +++ b/assets/js/201075ae.b3578f02.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[698],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},g=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,g=s(e,["components","mdxType","originalType","parentName"]),u=p(n),f=a,m=u["".concat(l,".").concat(f)]||u[f]||c[f]||o;return n?r.createElement(m,i(i({ref:t},g),{},{components:n})):r.createElement(m,i({ref:t},g))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const o={id:"postgres",title:"Postgres"},i=void 0,s={unversionedId:"postgres/postgres",id:"version-mysql_v1.x.x/postgres/postgres",title:"Postgres",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/postgres/README.md",sourceDirName:"postgres",slug:"/postgres/",permalink:"/storage/mysql_v1.x.x/postgres/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/postgres/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"postgres",title:"Postgres"},sidebar:"tutorialSidebar",previous:{title:"Pebble",permalink:"/storage/mysql_v1.x.x/pebble/"},next:{title:"Redis",permalink:"/storage/mysql_v1.x.x/redis/"}},l={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:p},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=postgres*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Postgres storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/jackc/pgx"},"jackc/pgx"),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *pgxpool.Pool\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Postgres is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the postgres implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/postgres/v2\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/postgres/v2"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := postgres.New()\n\n// Initialize custom config\nstore := postgres.New(postgres.Config{\n Db: dbPool,\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // DB pgxpool.Pool object will override connection uri and other connection fields\n //\n // Optional. Default is nil\n DB *pgxpool.Pool\n\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 5432\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SSLMode string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 5432,\n Database: "fiber",\n Table: "fiber_storage",\n SSLMode: "disable",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/201075ae.f977b0d0.js b/assets/js/201075ae.f977b0d0.js deleted file mode 100644 index 9f4f2ff40c7..00000000000 --- a/assets/js/201075ae.f977b0d0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[698],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>m});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},g=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,g=s(e,["components","mdxType","originalType","parentName"]),u=p(n),f=a,m=u["".concat(l,".").concat(f)]||u[f]||c[f]||o;return n?r.createElement(m,i(i({ref:t},g),{},{components:n})):r.createElement(m,i({ref:t},g))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const o={id:"postgres",title:"Postgres"},i=void 0,s={unversionedId:"postgres/postgres",id:"version-mysql_v1.x.x/postgres/postgres",title:"Postgres",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/postgres/README.md",sourceDirName:"postgres",slug:"/postgres/",permalink:"/storage/mysql_v1.x.x/postgres/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/postgres/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"postgres",title:"Postgres"},sidebar:"tutorialSidebar",previous:{title:"Pebble",permalink:"/storage/mysql_v1.x.x/pebble/"},next:{title:"Redis",permalink:"/storage/mysql_v1.x.x/redis/"}},l={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:p},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=postgres*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Postgres storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/jackc/pgx"},"jackc/pgx"),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *pgxpool.Pool\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Postgres is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the postgres implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/postgres/v2\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/postgres/v2"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := postgres.New()\n\n// Initialize custom config\nstore := postgres.New(postgres.Config{\n Db: dbPool,\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // DB pgxpool.Pool object will override connection uri and other connection fields\n //\n // Optional. Default is nil\n DB *pgxpool.Pool\n\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 5432\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SSLMode string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 5432,\n Database: "fiber",\n Table: "fiber_storage",\n SSLMode: "disable",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/20b2a36a.01b2f9ab.js b/assets/js/20b2a36a.01b2f9ab.js deleted file mode 100644 index 9b4fc0081b1..00000000000 --- a/assets/js/20b2a36a.01b2f9ab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6050],{3905:(t,e,n)=>{n.d(e,{Zo:()=>s,kt:()=>k});var a=n(7294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function o(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var p=a.createContext({}),d=function(t){var e=a.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},s=function(t){var e=d(t.components);return a.createElement(p.Provider,{value:e},t.children)},c="mdxType",m={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},u=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,p=t.parentName,s=l(t,["components","mdxType","originalType","parentName"]),c=d(n),u=r,k=c["".concat(p,".").concat(u)]||c[u]||m[u]||i;return n?a.createElement(k,o(o({ref:e},s),{},{components:n})):a.createElement(k,o({ref:e},s))}));function k(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,o=new Array(i);o[0]=u;var l={};for(var p in e)hasOwnProperty.call(e,p)&&(l[p]=e[p]);l.originalType=t,l[c]="string"==typeof t?t:r,o[1]=l;for(var d=2;d{n.r(e),n.d(e,{assets:()=>p,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var a=n(7462),r=(n(7294),n(3905));const i={id:"paseto",title:"Paseto"},o=void 0,l={unversionedId:"paseto/paseto",id:"paseto/paseto",title:"Paseto",description:"Release",source:"@site/docs/contrib/paseto/README.md",sourceDirName:"paseto",slug:"/paseto/",permalink:"/contrib/next/paseto/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/paseto/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"paseto",title:"Paseto"},sidebar:"tutorialSidebar",previous:{title:"Example",permalink:"/contrib/next/otelfiber/example/"},next:{title:"Swagger",permalink:"/contrib/next/swagger/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Instructions",id:"instructions",level:3}],s={toc:d},c="wrapper";function m(t){let{components:e,...n}=t;return(0,r.kt)(c,(0,a.Z)({},s,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=paseto*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,r.kt)("p",null,"PASETO returns a Web Token (PASETO) auth middleware."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"For valid token, it sets the payload data in Ctx.Locals and calls next handler."),(0,r.kt)("li",{parentName:"ul"},'For invalid token, it returns "401 - Unauthorized" error.'),(0,r.kt)("li",{parentName:"ul"},'For missing token, it returns "400 - BadRequest" error.')),(0,r.kt)("h3",{id:"install"},"Install"),(0,r.kt)("p",null,"This middleware supports Fiber v2."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/paseto\ngo get -u github.com/o1egl/paseto\n")),(0,r.kt)("h3",{id:"signature"},"Signature"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error\n")),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"Next"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"func(*Ctx) bool")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Defines a function to skip middleware"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"SuccessHandler"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) error")),(0,r.kt)("td",{parentName:"tr",align:"left"},"SuccessHandler defines a function which is executed for a valid token."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"c.Next()"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"ErrorHandler"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx, error) error")),(0,r.kt)("td",{parentName:"tr",align:"left"},"ErrorHandler defines a function which is executed for an invalid token."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"401 Invalid or expired PASETO"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"Validate"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"PayloadValidator")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Defines a function to validate if payload is valid. Optional. In case payload used is created using ",(0,r.kt)("inlineCode",{parentName:"td"},"CreateToken")," function. If token is created using another function, this function must be provided."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"SymmetricKey"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"[]byte")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Secret key to encrypt token. If present the middleware will generate local tokens."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"PrivateKey"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ed25519.PrivateKey")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Secret key to sign the tokens. If present (along with its ",(0,r.kt)("inlineCode",{parentName:"td"},"PublicKey"),") the middleware will generate public tokens."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"PublicKey"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"crypto.PublicKey")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Public key to verify the tokens. If present (along with ",(0,r.kt)("inlineCode",{parentName:"td"},"PrivateKey"),") the middleware will generate public tokens."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"ContextKey"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Context key to store user information from the token into context."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},'"auth-token"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"TokenLookup"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"[2]string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"TokenLookup is a string slice with size 2, that is used to extract token from the request"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},'["header","Authorization"]'))))),(0,r.kt)("h3",{id:"instructions"},"Instructions"),(0,r.kt)("p",null,"When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token."),(0,r.kt)("p",null,"Passing a ",(0,r.kt)("inlineCode",{parentName:"p"},"SymmetricKey")," in the Config results in a local (encrypted) token, while passing a ",(0,r.kt)("inlineCode",{parentName:"p"},"PublicKey")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"PrivateKey")," results in a public (signed) token."),(0,r.kt)("p",null,"In case you want to use your own data structure, is needed to provide the ",(0,r.kt)("inlineCode",{parentName:"p"},"Validate")," function in ",(0,r.kt)("inlineCode",{parentName:"p"},"paseware.Config"),", that will return the data stored in the token, and a error."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/20b2a36a.5aa003d5.js b/assets/js/20b2a36a.5aa003d5.js new file mode 100644 index 00000000000..9e2176cc172 --- /dev/null +++ b/assets/js/20b2a36a.5aa003d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6050],{3905:(t,e,n)=>{n.d(e,{Zo:()=>s,kt:()=>k});var a=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function o(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var p=a.createContext({}),d=function(t){var e=a.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},s=function(t){var e=d(t.components);return a.createElement(p.Provider,{value:e},t.children)},c="mdxType",m={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},u=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,p=t.parentName,s=l(t,["components","mdxType","originalType","parentName"]),c=d(n),u=r,k=c["".concat(p,".").concat(u)]||c[u]||m[u]||i;return n?a.createElement(k,o(o({ref:e},s),{},{components:n})):a.createElement(k,o({ref:e},s))}));function k(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,o=new Array(i);o[0]=u;var l={};for(var p in e)hasOwnProperty.call(e,p)&&(l[p]=e[p]);l.originalType=t,l[c]="string"==typeof t?t:r,o[1]=l;for(var d=2;d{n.r(e),n.d(e,{assets:()=>p,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var a=n(87462),r=(n(67294),n(3905));const i={id:"paseto",title:"Paseto"},o=void 0,l={unversionedId:"paseto/paseto",id:"paseto/paseto",title:"Paseto",description:"Release",source:"@site/docs/contrib/paseto/README.md",sourceDirName:"paseto",slug:"/paseto/",permalink:"/contrib/next/paseto/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/paseto/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"paseto",title:"Paseto"},sidebar:"tutorialSidebar",previous:{title:"Example",permalink:"/contrib/next/otelfiber/example/"},next:{title:"Swagger",permalink:"/contrib/next/swagger/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Instructions",id:"instructions",level:3}],s={toc:d},c="wrapper";function m(t){let{components:e,...n}=t;return(0,r.kt)(c,(0,a.Z)({},s,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=paseto*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,r.kt)("p",null,"PASETO returns a Web Token (PASETO) auth middleware."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"For valid token, it sets the payload data in Ctx.Locals and calls next handler."),(0,r.kt)("li",{parentName:"ul"},'For invalid token, it returns "401 - Unauthorized" error.'),(0,r.kt)("li",{parentName:"ul"},'For missing token, it returns "400 - BadRequest" error.')),(0,r.kt)("h3",{id:"install"},"Install"),(0,r.kt)("p",null,"This middleware supports Fiber v2."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/paseto\ngo get -u github.com/o1egl/paseto\n")),(0,r.kt)("h3",{id:"signature"},"Signature"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error\n")),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,r.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"Next"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"func(*Ctx) bool")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Defines a function to skip middleware"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"SuccessHandler"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) error")),(0,r.kt)("td",{parentName:"tr",align:"left"},"SuccessHandler defines a function which is executed for a valid token."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"c.Next()"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"ErrorHandler"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx, error) error")),(0,r.kt)("td",{parentName:"tr",align:"left"},"ErrorHandler defines a function which is executed for an invalid token."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"401 Invalid or expired PASETO"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"Validate"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"PayloadValidator")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Defines a function to validate if payload is valid. Optional. In case payload used is created using ",(0,r.kt)("inlineCode",{parentName:"td"},"CreateToken")," function. If token is created using another function, this function must be provided."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"SymmetricKey"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"[]byte")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Secret key to encrypt token. If present the middleware will generate local tokens."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"PrivateKey"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"ed25519.PrivateKey")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Secret key to sign the tokens. If present (along with its ",(0,r.kt)("inlineCode",{parentName:"td"},"PublicKey"),") the middleware will generate public tokens."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"PublicKey"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"crypto.PublicKey")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Public key to verify the tokens. If present (along with ",(0,r.kt)("inlineCode",{parentName:"td"},"PrivateKey"),") the middleware will generate public tokens."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"ContextKey"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"Context key to store user information from the token into context."),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},'"auth-token"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},"TokenLookup"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"[2]string")),(0,r.kt)("td",{parentName:"tr",align:"left"},"TokenLookup is a string slice with size 2, that is used to extract token from the request"),(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},'["header","Authorization"]'))))),(0,r.kt)("h3",{id:"instructions"},"Instructions"),(0,r.kt)("p",null,"When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token."),(0,r.kt)("p",null,"Passing a ",(0,r.kt)("inlineCode",{parentName:"p"},"SymmetricKey")," in the Config results in a local (encrypted) token, while passing a ",(0,r.kt)("inlineCode",{parentName:"p"},"PublicKey")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"PrivateKey")," results in a public (signed) token."),(0,r.kt)("p",null,"In case you want to use your own data structure, is needed to provide the ",(0,r.kt)("inlineCode",{parentName:"p"},"Validate")," function in ",(0,r.kt)("inlineCode",{parentName:"p"},"paseware.Config"),", that will return the data stored in the token, and a error."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/20e81fa7.4b58ed16.js b/assets/js/20e81fa7.4b58ed16.js new file mode 100644 index 00000000000..08ef94b6e89 --- /dev/null +++ b/assets/js/20e81fa7.4b58ed16.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7961],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>h});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(r),d=a,h=c["".concat(s,".").concat(d)]||c[d]||m[d]||o;return r?n.createElement(h,i(i({ref:t},u),{},{components:r})):n.createElement(h,i({ref:t},u))}));function h(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(87462),a=(r(67294),r(3905));const o={id:"faq",title:"\ud83e\udd14 FAQ",description:"List of frequently asked questions. Feel free to open an issue to add your question to this page.",sidebar_position:1},i=void 0,l={unversionedId:"extra/faq",id:"version-v2.x/extra/faq",title:"\ud83e\udd14 FAQ",description:"List of frequently asked questions. Feel free to open an issue to add your question to this page.",source:"@site/versioned_docs/version-v2.x/extra/faq.md",sourceDirName:"extra",slug:"/extra/faq",permalink:"/extra/faq",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{id:"faq",title:"\ud83e\udd14 FAQ",description:"List of frequently asked questions. Feel free to open an issue to add your question to this page.",sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Extra",permalink:"/category/extra"},next:{title:"\ud83d\udcca Benchmarks",permalink:"/extra/benchmarks"}},s={},p=[{value:"How should I structure my application?",id:"how-should-i-structure-my-application",level:2},{value:"How do I handle custom 404 responses?",id:"how-do-i-handle-custom-404-responses",level:2},{value:"How can i use live reload ?",id:"how-can-i-use-live-reload-",level:2},{value:"How do I set up an error handler?",id:"how-do-i-set-up-an-error-handler",level:2},{value:"Which template engines does Fiber support?",id:"which-template-engines-does-fiber-support",level:2},{value:"Does Fiber have a community chat?",id:"does-fiber-have-a-community-chat",level:2},{value:"Does fiber support sub domain routing ?",id:"does-fiber-support-sub-domain-routing-",level:2}],u={toc:p},c="wrapper";function m(e){let{components:t,...o}=e;return(0,a.kt)(c,(0,n.Z)({},u,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"how-should-i-structure-my-application"},"How should I structure my application?"),(0,a.kt)("p",null,"There is no definitive answer to this question. The answer depends on the scale of your application and the team that is involved. To be as flexible as possible, Fiber makes no assumptions in terms of structure."),(0,a.kt)("p",null,"Routes and other application-specific logic can live in as many files as you wish, in any directory structure you prefer. View the following examples for inspiration:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/boilerplate"},"gofiber/boilerplate")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/thomasvvugt/fiber-boilerplate"},"thomasvvugt/fiber-boilerplate")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=Iq2qT0fRhAA"},"Youtube - Building a REST API using Gorm and Fiber")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/embedmode/fiberseed"},"embedmode/fiberseed"))),(0,a.kt)("h2",{id:"how-do-i-handle-custom-404-responses"},"How do I handle custom 404 responses?"),(0,a.kt)("p",null,"If you're using v2.32.0 or later, all you need to do is to implement a custom error handler. See below, or see a more detailed explanation at ",(0,a.kt)("a",{parentName:"p",href:"/guide/error-handling#custom-error-handler"},"Error Handling"),". "),(0,a.kt)("p",null,"If you're using v2.31.0 or earlier, the error handler will not capture 404 errors. Instead, you need to add a middleware function at the very bottom of the stack ","(","below all other functions",")"," to handle a 404 response:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Use(func(c *fiber.Ctx) error {\n return c.Status(fiber.StatusNotFound).SendString("Sorry can\'t find that!")\n})\n')),(0,a.kt)("h2",{id:"how-can-i-use-live-reload-"},"How can i use live reload ?"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/cosmtrek/air"},"Air")," is a handy tool that automatically restarts your Go applications whenever the source code changes, making your development process faster and more efficient."),(0,a.kt)("p",null,"To use Air in a Fiber project, follow these steps:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Install Air by downloading the appropriate binary for your operating system from the GitHub release page or by building the tool directly from source."),(0,a.kt)("li",{parentName:"ol"},"Create a configuration file for Air in your project directory. This file can be named, for example, .air.toml or air.conf. Here's a sample configuration file that works with Fiber:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-toml"},'# .air.toml\nroot = "."\ntmp_dir = "tmp"\n[build]\n cmd = "go build -o ./tmp/main ."\n bin = "./tmp/main"\n delay = 1000 # ms\n exclude_dir = ["assets", "tmp", "vendor"]\n include_ext = ["go", "tpl", "tmpl", "html"]\n exclude_regex = ["_test\\\\.go"]\n')),(0,a.kt)("ol",{start:3},(0,a.kt)("li",{parentName:"ol"},"Start your Fiber application using Air by running the following command in the terminal:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"air\n")),(0,a.kt)("p",null,"As you make changes to your source code, Air will detect them and automatically restart the application."),(0,a.kt)("p",null,"A complete example demonstrating the use of Air with Fiber can be found in the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/recipes/tree/master/air"},"Fiber Recipes repository"),". This example shows how to configure and use Air in a Fiber project to create an efficient development environment."),(0,a.kt)("h2",{id:"how-do-i-set-up-an-error-handler"},"How do I set up an error handler?"),(0,a.kt)("p",null,"To override the default error handler, you can override the default when providing a ",(0,a.kt)("a",{parentName:"p",href:"/api/fiber#config"},"Config")," when initiating a new ",(0,a.kt)("a",{parentName:"p",href:"/api/fiber#new"},"Fiber instance"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"app := fiber.New(fiber.Config{\n ErrorHandler: func(c *fiber.Ctx, err error) error {\n return c.Status(fiber.StatusInternalServerError).SendString(err.Error())\n },\n})\n")),(0,a.kt)("p",null,"We have a dedicated page explaining how error handling works in Fiber, see ",(0,a.kt)("a",{parentName:"p",href:"/guide/error-handling"},"Error Handling"),"."),(0,a.kt)("h2",{id:"which-template-engines-does-fiber-support"},"Which template engines does Fiber support?"),(0,a.kt)("p",null,"Fiber currently supports 8 template engines in our ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/template"},"gofiber/template")," middleware:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/yosssi/ace"},"Ace")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/eknkc/amber"},"Amber")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/flosch/pongo2"},"Django")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/aymerick/raymond"},"Handlebars")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://pkg.go.dev/html/template/"},"HTML")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/CloudyKit/jet"},"Jet")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/cbroglie/mustache"},"Mustache")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/Joker/jade"},"Pug"))),(0,a.kt)("p",null,"To learn more about using Templates in Fiber, see ",(0,a.kt)("a",{parentName:"p",href:"/guide/templates"},"Templates"),"."),(0,a.kt)("h2",{id:"does-fiber-have-a-community-chat"},"Does Fiber have a community chat?"),(0,a.kt)("p",null,"Yes, we have our own ",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},"Discord "),"server, where we hang out. We have different rooms for every subject.",(0,a.kt)("br",{parentName:"p"}),"\n","If you have questions or just want to have a chat, feel free to join us via this ",(0,a.kt)("strong",{parentName:"p"},">")," ",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("strong",{parentName:"a"},"invite link"))," ",(0,a.kt)("strong",{parentName:"p"},"<"),"."),(0,a.kt)("p",null,(0,a.kt)("img",{src:r(60408).Z,width:"243",height:"236"})),(0,a.kt)("h2",{id:"does-fiber-support-sub-domain-routing-"},"Does fiber support sub domain routing ?"),(0,a.kt)("p",null,"Yes we do, here are some examples:\nThis example works v2"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/logger"\n)\n\ntype Host struct {\n Fiber *fiber.App\n}\n\nfunc main() {\n // Hosts\n hosts := map[string]*Host{}\n //-----\n // API\n //-----\n api := fiber.New()\n api.Use(logger.New(logger.Config{\n Format: "[${ip}]:${port} ${status} - ${method} ${path}\\n",\n }))\n hosts["api.localhost:3000"] = &Host{api}\n api.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("API")\n })\n //------\n // Blog\n //------\n blog := fiber.New()\n blog.Use(logger.New(logger.Config{\n Format: "[${ip}]:${port} ${status} - ${method} ${path}\\n",\n }))\n hosts["blog.localhost:3000"] = &Host{blog}\n blog.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Blog")\n })\n //---------\n // Website\n //---------\n site := fiber.New()\n site.Use(logger.New(logger.Config{\n Format: "[${ip}]:${port} ${status} - ${method} ${path}\\n",\n }))\n\n hosts["localhost:3000"] = &Host{site}\n site.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Website")\n })\n // Server\n app := fiber.New()\n app.Use(func(c *fiber.Ctx) error {\n host := hosts[c.Hostname()]\n if host == nil {\n return c.SendStatus(fiber.StatusNotFound)\n } else {\n host.Fiber.Handler()(c.Context())\n return nil\n }\n })\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("p",null,"If more information is needed, please refer to this issue ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/issues/750"},"#750")))}m.isMDXComponent=!0},60408:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/support-discord-baf5f38231088813dfbc3ccdc6966634.png"}}]); \ No newline at end of file diff --git a/assets/js/20e81fa7.ced70935.js b/assets/js/20e81fa7.ced70935.js deleted file mode 100644 index 8b2bc6c17c2..00000000000 --- a/assets/js/20e81fa7.ced70935.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7961],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>h});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(r),d=a,h=c["".concat(s,".").concat(d)]||c[d]||m[d]||o;return r?n.createElement(h,i(i({ref:t},u),{},{components:r})):n.createElement(h,i({ref:t},u))}));function h(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(7462),a=(r(7294),r(3905));const o={id:"faq",title:"\ud83e\udd14 FAQ",description:"List of frequently asked questions. Feel free to open an issue to add your question to this page.",sidebar_position:1},i=void 0,l={unversionedId:"extra/faq",id:"version-v2.x/extra/faq",title:"\ud83e\udd14 FAQ",description:"List of frequently asked questions. Feel free to open an issue to add your question to this page.",source:"@site/versioned_docs/version-v2.x/extra/faq.md",sourceDirName:"extra",slug:"/extra/faq",permalink:"/extra/faq",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{id:"faq",title:"\ud83e\udd14 FAQ",description:"List of frequently asked questions. Feel free to open an issue to add your question to this page.",sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Extra",permalink:"/category/extra"},next:{title:"\ud83d\udcca Benchmarks",permalink:"/extra/benchmarks"}},s={},p=[{value:"How should I structure my application?",id:"how-should-i-structure-my-application",level:2},{value:"How do I handle custom 404 responses?",id:"how-do-i-handle-custom-404-responses",level:2},{value:"How can i use live reload ?",id:"how-can-i-use-live-reload-",level:2},{value:"How do I set up an error handler?",id:"how-do-i-set-up-an-error-handler",level:2},{value:"Which template engines does Fiber support?",id:"which-template-engines-does-fiber-support",level:2},{value:"Does Fiber have a community chat?",id:"does-fiber-have-a-community-chat",level:2},{value:"Does fiber support sub domain routing ?",id:"does-fiber-support-sub-domain-routing-",level:2}],u={toc:p},c="wrapper";function m(e){let{components:t,...o}=e;return(0,a.kt)(c,(0,n.Z)({},u,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"how-should-i-structure-my-application"},"How should I structure my application?"),(0,a.kt)("p",null,"There is no definitive answer to this question. The answer depends on the scale of your application and the team that is involved. To be as flexible as possible, Fiber makes no assumptions in terms of structure."),(0,a.kt)("p",null,"Routes and other application-specific logic can live in as many files as you wish, in any directory structure you prefer. View the following examples for inspiration:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/boilerplate"},"gofiber/boilerplate")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/thomasvvugt/fiber-boilerplate"},"thomasvvugt/fiber-boilerplate")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=Iq2qT0fRhAA"},"Youtube - Building a REST API using Gorm and Fiber")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/embedmode/fiberseed"},"embedmode/fiberseed"))),(0,a.kt)("h2",{id:"how-do-i-handle-custom-404-responses"},"How do I handle custom 404 responses?"),(0,a.kt)("p",null,"If you're using v2.32.0 or later, all you need to do is to implement a custom error handler. See below, or see a more detailed explanation at ",(0,a.kt)("a",{parentName:"p",href:"/guide/error-handling#custom-error-handler"},"Error Handling"),". "),(0,a.kt)("p",null,"If you're using v2.31.0 or earlier, the error handler will not capture 404 errors. Instead, you need to add a middleware function at the very bottom of the stack ","(","below all other functions",")"," to handle a 404 response:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Use(func(c *fiber.Ctx) error {\n return c.Status(fiber.StatusNotFound).SendString("Sorry can\'t find that!")\n})\n')),(0,a.kt)("h2",{id:"how-can-i-use-live-reload-"},"How can i use live reload ?"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/cosmtrek/air"},"Air")," is a handy tool that automatically restarts your Go applications whenever the source code changes, making your development process faster and more efficient."),(0,a.kt)("p",null,"To use Air in a Fiber project, follow these steps:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Install Air by downloading the appropriate binary for your operating system from the GitHub release page or by building the tool directly from source."),(0,a.kt)("li",{parentName:"ol"},"Create a configuration file for Air in your project directory. This file can be named, for example, .air.toml or air.conf. Here's a sample configuration file that works with Fiber:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-toml"},'# .air.toml\nroot = "."\ntmp_dir = "tmp"\n[build]\n cmd = "go build -o ./tmp/main ."\n bin = "./tmp/main"\n delay = 1000 # ms\n exclude_dir = ["assets", "tmp", "vendor"]\n include_ext = ["go", "tpl", "tmpl", "html"]\n exclude_regex = ["_test\\\\.go"]\n')),(0,a.kt)("ol",{start:3},(0,a.kt)("li",{parentName:"ol"},"Start your Fiber application using Air by running the following command in the terminal:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"air\n")),(0,a.kt)("p",null,"As you make changes to your source code, Air will detect them and automatically restart the application."),(0,a.kt)("p",null,"A complete example demonstrating the use of Air with Fiber can be found in the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/recipes/tree/master/air"},"Fiber Recipes repository"),". This example shows how to configure and use Air in a Fiber project to create an efficient development environment."),(0,a.kt)("h2",{id:"how-do-i-set-up-an-error-handler"},"How do I set up an error handler?"),(0,a.kt)("p",null,"To override the default error handler, you can override the default when providing a ",(0,a.kt)("a",{parentName:"p",href:"/api/fiber#config"},"Config")," when initiating a new ",(0,a.kt)("a",{parentName:"p",href:"/api/fiber#new"},"Fiber instance"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"app := fiber.New(fiber.Config{\n ErrorHandler: func(c *fiber.Ctx, err error) error {\n return c.Status(fiber.StatusInternalServerError).SendString(err.Error())\n },\n})\n")),(0,a.kt)("p",null,"We have a dedicated page explaining how error handling works in Fiber, see ",(0,a.kt)("a",{parentName:"p",href:"/guide/error-handling"},"Error Handling"),"."),(0,a.kt)("h2",{id:"which-template-engines-does-fiber-support"},"Which template engines does Fiber support?"),(0,a.kt)("p",null,"Fiber currently supports 8 template engines in our ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/template"},"gofiber/template")," middleware:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/yosssi/ace"},"Ace")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/eknkc/amber"},"Amber")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/flosch/pongo2"},"Django")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/aymerick/raymond"},"Handlebars")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://pkg.go.dev/html/template/"},"HTML")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/CloudyKit/jet"},"Jet")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/cbroglie/mustache"},"Mustache")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/Joker/jade"},"Pug"))),(0,a.kt)("p",null,"To learn more about using Templates in Fiber, see ",(0,a.kt)("a",{parentName:"p",href:"/guide/templates"},"Templates"),"."),(0,a.kt)("h2",{id:"does-fiber-have-a-community-chat"},"Does Fiber have a community chat?"),(0,a.kt)("p",null,"Yes, we have our own ",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},"Discord "),"server, where we hang out. We have different rooms for every subject.",(0,a.kt)("br",{parentName:"p"}),"\n","If you have questions or just want to have a chat, feel free to join us via this ",(0,a.kt)("strong",{parentName:"p"},">")," ",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("strong",{parentName:"a"},"invite link"))," ",(0,a.kt)("strong",{parentName:"p"},"<"),"."),(0,a.kt)("p",null,(0,a.kt)("img",{src:r(408).Z,width:"243",height:"236"})),(0,a.kt)("h2",{id:"does-fiber-support-sub-domain-routing-"},"Does fiber support sub domain routing ?"),(0,a.kt)("p",null,"Yes we do, here are some examples:\nThis example works v2"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/logger"\n)\n\ntype Host struct {\n Fiber *fiber.App\n}\n\nfunc main() {\n // Hosts\n hosts := map[string]*Host{}\n //-----\n // API\n //-----\n api := fiber.New()\n api.Use(logger.New(logger.Config{\n Format: "[${ip}]:${port} ${status} - ${method} ${path}\\n",\n }))\n hosts["api.localhost:3000"] = &Host{api}\n api.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("API")\n })\n //------\n // Blog\n //------\n blog := fiber.New()\n blog.Use(logger.New(logger.Config{\n Format: "[${ip}]:${port} ${status} - ${method} ${path}\\n",\n }))\n hosts["blog.localhost:3000"] = &Host{blog}\n blog.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Blog")\n })\n //---------\n // Website\n //---------\n site := fiber.New()\n site.Use(logger.New(logger.Config{\n Format: "[${ip}]:${port} ${status} - ${method} ${path}\\n",\n }))\n\n hosts["localhost:3000"] = &Host{site}\n site.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Website")\n })\n // Server\n app := fiber.New()\n app.Use(func(c *fiber.Ctx) error {\n host := hosts[c.Hostname()]\n if host == nil {\n return c.SendStatus(fiber.StatusNotFound)\n } else {\n host.Fiber.Handler()(c.Context())\n return nil\n }\n })\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("p",null,"If more information is needed, please refer to this issue ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/issues/750"},"#750")))}m.isMDXComponent=!0},408:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/support-discord-baf5f38231088813dfbc3ccdc6966634.png"}}]); \ No newline at end of file diff --git a/assets/js/21026dc8.6c02823c.js b/assets/js/21026dc8.6c02823c.js new file mode 100644 index 00000000000..d6447de0623 --- /dev/null +++ b/assets/js/21026dc8.6c02823c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3796],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=m(r),g=a,f=c["".concat(s,".").concat(g)]||c[g]||u[g]||o;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var m=2;m{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(87462),a=(r(67294),r(3905));const o={id:"memory",title:"Memory"},i=void 0,l={unversionedId:"memory/memory",id:"version-bbolt_v1.x.x/memory/memory",title:"Memory",description:"Release",source:"@site/storage_versioned_docs/version-bbolt_v1.x.x/memory/README.md",sourceDirName:"memory",slug:"/memory/",permalink:"/storage/memory/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memory/README.md",tags:[],version:"bbolt_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memory",title:"Memory"},sidebar:"tutorialSidebar",previous:{title:"Memcache",permalink:"/storage/memcache/"},next:{title:"MongoDB",permalink:"/storage/mongodb/"}},s={},m=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:m},c="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memory*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"An in-memory storage driver."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() map[string]entry\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Memory is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the memory implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memory"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := memory.New()\n\n// Initialize custom config\nstore := memory.New(memory.Config{\n GCInterval: 10 * time.Second,\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Time before deleting expired keys\n //\n // Default is 10 * time.Second\n GCInterval time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n GCInterval: 10 * time.Second,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2155a006.7424b294.js b/assets/js/2155a006.7424b294.js new file mode 100644 index 00000000000..675e73f9c63 --- /dev/null +++ b/assets/js/2155a006.7424b294.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1426],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>f});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=r.createContext({}),c=function(e){var n=r.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},s=function(e){var n=c(e.components);return r.createElement(u.Provider,{value:n},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},h=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,u=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=c(t),h=a,f=p["".concat(u,".").concat(h)]||p[h]||d[h]||i;return t?r.createElement(f,o(o({ref:n},s),{},{components:t})):r.createElement(f,o({ref:n},s))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=h;var l={};for(var u in n)hasOwnProperty.call(n,u)&&(l[u]=n[u]);l.originalType=e,l[p]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=t(87462),a=(t(67294),t(3905));const i={id:"keyauth",title:"Keyauth"},o=void 0,l={unversionedId:"api/middleware/keyauth",id:"version-v2.x/api/middleware/keyauth",title:"Keyauth",description:"Key auth middleware provides a key based authentication.",source:"@site/versioned_docs/version-v2.x/api/middleware/keyauth.md",sourceDirName:"api/middleware",slug:"/api/middleware/keyauth",permalink:"/api/middleware/keyauth",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"keyauth",title:"Keyauth"},sidebar:"tutorialSidebar",previous:{title:"Idempotency",permalink:"/api/middleware/idempotency"},next:{title:"Limiter",permalink:"/api/middleware/limiter"}},u={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Authenticate only certain endpoints",id:"authenticate-only-certain-endpoints",level:3},{value:"Specifying middleware in the handler",id:"specifying-middleware-in-the-handler",level:3},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],s={toc:c},p="wrapper";function d(e){let{components:n,...t}=e;return(0,a.kt)(p,(0,r.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Key auth middleware provides a key based authentication."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n)\n\nvar (\n apiKey = "correct horse battery staple"\n)\n\nfunc validateAPIKey(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n}\n\nfunc main() {\n app := fiber.New()\n\n // note that the keyauth middleware needs to be defined before the routes are defined!\n app.Use(keyauth.New(keyauth.Config{\n KeyLookup: "cookie:access_token",\n Validator: validateAPIKey,\n }))\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Test:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# No api-key specified -> 400 missing \ncurl http://localhost:3000\n#> missing or malformed API Key\n\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000\n#> Successfully authenticated!\n\ncurl --cookie "access_token=Clearly A Wrong Key" http://localhost:3000\n#> missing or malformed API Key\n')),(0,a.kt)("p",null,"For a more detailed example, see also the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/recipes"},(0,a.kt)("inlineCode",{parentName:"a"},"github.com/gofiber/recipes"))," repository and specifically the ",(0,a.kt)("inlineCode",{parentName:"p"},"fiber-envoy-extauthz")," repository and the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/recipes/blob/master/fiber-envoy-extauthz/authz/main.go"},(0,a.kt)("inlineCode",{parentName:"a"},"keyauth example"))," code."),(0,a.kt)("h3",{id:"authenticate-only-certain-endpoints"},"Authenticate only certain endpoints"),(0,a.kt)("p",null,"If you want to authenticate only certain endpoints, you can use the ",(0,a.kt)("inlineCode",{parentName:"p"},"Config")," of keyauth and apply a filter function (eg. ",(0,a.kt)("inlineCode",{parentName:"p"},"authFilter"),") like so"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n "regexp"\n "strings"\n)\n\nvar (\n apiKey = "correct horse battery staple"\n protectedURLs = []*regexp.Regexp{\n regexp.MustCompile("^/authenticated$"),\n regexp.MustCompile("^/auth2$"),\n }\n)\n\nfunc validateAPIKey(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n}\n\nfunc authFilter(c *fiber.Ctx) bool {\n originalURL := strings.ToLower(c.OriginalURL())\n\n for _, pattern := range protectedURLs {\n if pattern.MatchString(originalURL) {\n return false\n }\n }\n return true\n}\n\nfunc main() {\n app := fiber.New()\n\n app.Use(keyauth.New(keyauth.Config{\n Next: authFilter,\n KeyLookup: "cookie:access_token",\n Validator: validateAPIKey,\n }))\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome")\n })\n app.Get("/authenticated", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n app.Get("/auth2", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated 2!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,"Which results in this"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# / does not need to be authenticated\ncurl http://localhost:3000\n#> Welcome\n\n# /authenticated needs to be authenticated\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000/authenticated\n#> Successfully authenticated!\n\n# /auth2 needs to be authenticated too\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000/auth2\n#> Successfully authenticated 2!\n')),(0,a.kt)("h3",{id:"specifying-middleware-in-the-handler"},"Specifying middleware in the handler"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n)\n\nconst (\n apiKey = "my-super-secret-key"\n)\n\nfunc main() {\n app := fiber.New()\n\n authMiddleware := keyauth.New(keyauth.Config{\n Validator: func(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n },\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome")\n })\n\n app.Get("/allowed", authMiddleware, func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,"Which results in this"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# / does not need to be authenticated\ncurl http://localhost:3000\n#> Welcome\n\n# /allowed needs to be authenticated too\ncurl --header "Authorization: Bearer my-super-secret-key" http://localhost:3000/allowed\n#> Successfully authenticated!\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip middleware.\n // Optional. Default: nil\n Next func(*fiber.Ctx) bool\n\n // SuccessHandler defines a function which is executed for a valid key.\n // Optional. Default: nil\n SuccessHandler fiber.Handler\n\n // ErrorHandler defines a function which is executed for an invalid key.\n // It may be used to define a custom error.\n // Optional. Default: 401 Invalid or expired key\n ErrorHandler fiber.ErrorHandler\n\n // KeyLookup is a string in the form of ":" that is used\n // to extract key from the request.\n // Optional. Default value "header:Authorization".\n // Possible values:\n // - "header:"\n // - "query:"\n // - "form:"\n // - "param:"\n // - "cookie:"\n KeyLookup string\n\n // AuthScheme to be used in the Authorization header.\n // Optional. Default value "Bearer".\n AuthScheme string\n\n // Validator is a function to validate key.\n Validator func(*fiber.Ctx, string) (bool, error)\n\n // Context key to store the bearertoken from the token into context.\n // Optional. Default: "token".\n ContextKey string\n}\n')),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n SuccessHandler: func(c *fiber.Ctx) error {\n return c.Next()\n },\n ErrorHandler: func(c *fiber.Ctx, err error) error {\n if err == ErrMissingOrMalformedAPIKey {\n return c.Status(fiber.StatusUnauthorized).SendString(err.Error())\n }\n return c.Status(fiber.StatusUnauthorized).SendString("Invalid or expired API Key")\n },\n KeyLookup: "header:" + fiber.HeaderAuthorization,\n AuthScheme: "Bearer",\n ContextKey: "token",\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2155a006.dcb97dd0.js b/assets/js/2155a006.dcb97dd0.js deleted file mode 100644 index e09bebb2c14..00000000000 --- a/assets/js/2155a006.dcb97dd0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1426],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>f});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=r.createContext({}),c=function(e){var n=r.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},s=function(e){var n=c(e.components);return r.createElement(u.Provider,{value:n},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},h=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,u=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=c(t),h=a,f=p["".concat(u,".").concat(h)]||p[h]||d[h]||i;return t?r.createElement(f,o(o({ref:n},s),{},{components:t})):r.createElement(f,o({ref:n},s))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=h;var l={};for(var u in n)hasOwnProperty.call(n,u)&&(l[u]=n[u]);l.originalType=e,l[p]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=t(7462),a=(t(7294),t(3905));const i={id:"keyauth",title:"Keyauth"},o=void 0,l={unversionedId:"api/middleware/keyauth",id:"version-v2.x/api/middleware/keyauth",title:"Keyauth",description:"Key auth middleware provides a key based authentication.",source:"@site/versioned_docs/version-v2.x/api/middleware/keyauth.md",sourceDirName:"api/middleware",slug:"/api/middleware/keyauth",permalink:"/api/middleware/keyauth",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"keyauth",title:"Keyauth"},sidebar:"tutorialSidebar",previous:{title:"Idempotency",permalink:"/api/middleware/idempotency"},next:{title:"Limiter",permalink:"/api/middleware/limiter"}},u={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Authenticate only certain endpoints",id:"authenticate-only-certain-endpoints",level:3},{value:"Specifying middleware in the handler",id:"specifying-middleware-in-the-handler",level:3},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],s={toc:c},p="wrapper";function d(e){let{components:n,...t}=e;return(0,a.kt)(p,(0,r.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Key auth middleware provides a key based authentication."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n)\n\nvar (\n apiKey = "correct horse battery staple"\n)\n\nfunc validateAPIKey(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n}\n\nfunc main() {\n app := fiber.New()\n\n // note that the keyauth middleware needs to be defined before the routes are defined!\n app.Use(keyauth.New(keyauth.Config{\n KeyLookup: "cookie:access_token",\n Validator: validateAPIKey,\n }))\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Test:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# No api-key specified -> 400 missing \ncurl http://localhost:3000\n#> missing or malformed API Key\n\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000\n#> Successfully authenticated!\n\ncurl --cookie "access_token=Clearly A Wrong Key" http://localhost:3000\n#> missing or malformed API Key\n')),(0,a.kt)("p",null,"For a more detailed example, see also the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/recipes"},(0,a.kt)("inlineCode",{parentName:"a"},"github.com/gofiber/recipes"))," repository and specifically the ",(0,a.kt)("inlineCode",{parentName:"p"},"fiber-envoy-extauthz")," repository and the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/recipes/blob/master/fiber-envoy-extauthz/authz/main.go"},(0,a.kt)("inlineCode",{parentName:"a"},"keyauth example"))," code."),(0,a.kt)("h3",{id:"authenticate-only-certain-endpoints"},"Authenticate only certain endpoints"),(0,a.kt)("p",null,"If you want to authenticate only certain endpoints, you can use the ",(0,a.kt)("inlineCode",{parentName:"p"},"Config")," of keyauth and apply a filter function (eg. ",(0,a.kt)("inlineCode",{parentName:"p"},"authFilter"),") like so"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n "regexp"\n "strings"\n)\n\nvar (\n apiKey = "correct horse battery staple"\n protectedURLs = []*regexp.Regexp{\n regexp.MustCompile("^/authenticated$"),\n regexp.MustCompile("^/auth2$"),\n }\n)\n\nfunc validateAPIKey(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n}\n\nfunc authFilter(c *fiber.Ctx) bool {\n originalURL := strings.ToLower(c.OriginalURL())\n\n for _, pattern := range protectedURLs {\n if pattern.MatchString(originalURL) {\n return false\n }\n }\n return true\n}\n\nfunc main() {\n app := fiber.New()\n\n app.Use(keyauth.New(keyauth.Config{\n Next: authFilter,\n KeyLookup: "cookie:access_token",\n Validator: validateAPIKey,\n }))\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome")\n })\n app.Get("/authenticated", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n app.Get("/auth2", func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated 2!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,"Which results in this"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# / does not need to be authenticated\ncurl http://localhost:3000\n#> Welcome\n\n# /authenticated needs to be authenticated\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000/authenticated\n#> Successfully authenticated!\n\n# /auth2 needs to be authenticated too\ncurl --cookie "access_token=correct horse battery staple" http://localhost:3000/auth2\n#> Successfully authenticated 2!\n')),(0,a.kt)("h3",{id:"specifying-middleware-in-the-handler"},"Specifying middleware in the handler"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/sha256"\n "crypto/subtle"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/keyauth"\n)\n\nconst (\n apiKey = "my-super-secret-key"\n)\n\nfunc main() {\n app := fiber.New()\n\n authMiddleware := keyauth.New(keyauth.Config{\n Validator: func(c *fiber.Ctx, key string) (bool, error) {\n hashedAPIKey := sha256.Sum256([]byte(apiKey))\n hashedKey := sha256.Sum256([]byte(key))\n\n if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {\n return true, nil\n }\n return false, keyauth.ErrMissingOrMalformedAPIKey\n },\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome")\n })\n\n app.Get("/allowed", authMiddleware, func(c *fiber.Ctx) error {\n return c.SendString("Successfully authenticated!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("p",null,"Which results in this"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'# / does not need to be authenticated\ncurl http://localhost:3000\n#> Welcome\n\n# /allowed needs to be authenticated too\ncurl --header "Authorization: Bearer my-super-secret-key" http://localhost:3000/allowed\n#> Successfully authenticated!\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip middleware.\n // Optional. Default: nil\n Next func(*fiber.Ctx) bool\n\n // SuccessHandler defines a function which is executed for a valid key.\n // Optional. Default: nil\n SuccessHandler fiber.Handler\n\n // ErrorHandler defines a function which is executed for an invalid key.\n // It may be used to define a custom error.\n // Optional. Default: 401 Invalid or expired key\n ErrorHandler fiber.ErrorHandler\n\n // KeyLookup is a string in the form of ":" that is used\n // to extract key from the request.\n // Optional. Default value "header:Authorization".\n // Possible values:\n // - "header:"\n // - "query:"\n // - "form:"\n // - "param:"\n // - "cookie:"\n KeyLookup string\n\n // AuthScheme to be used in the Authorization header.\n // Optional. Default value "Bearer".\n AuthScheme string\n\n // Validator is a function to validate key.\n Validator func(*fiber.Ctx, string) (bool, error)\n\n // Context key to store the bearertoken from the token into context.\n // Optional. Default: "token".\n ContextKey string\n}\n')),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n SuccessHandler: func(c *fiber.Ctx) error {\n return c.Next()\n },\n ErrorHandler: func(c *fiber.Ctx, err error) error {\n if err == ErrMissingOrMalformedAPIKey {\n return c.Status(fiber.StatusUnauthorized).SendString(err.Error())\n }\n return c.Status(fiber.StatusUnauthorized).SendString("Invalid or expired API Key")\n },\n KeyLookup: "header:" + fiber.HeaderAuthorization,\n AuthScheme: "Bearer",\n ContextKey: "token",\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/216c2ff0.e1ecea18.js b/assets/js/216c2ff0.e1ecea18.js new file mode 100644 index 00000000000..bca5557374c --- /dev/null +++ b/assets/js/216c2ff0.e1ecea18.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1264],{92826:e=>{e.exports=JSON.parse('{"pluginId":"storage","version":"sqlite3_v1.x.x","label":"sqlite3_v1.x.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-sqlite3_v1.x.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/storage/sqlite3_v1.x.x/","docId":"README"},{"type":"link","label":"ArangoDB","href":"/storage/sqlite3_v1.x.x/arangodb/","docId":"arangodb/arangodb"},{"type":"link","label":"Azure Blob","href":"/storage/sqlite3_v1.x.x/azureblob/","docId":"azureblob/azureblob"},{"type":"link","label":"Badger","href":"/storage/sqlite3_v1.x.x/badger/","docId":"badger/badger"},{"type":"link","label":"Bbolt","href":"/storage/sqlite3_v1.x.x/bbolt/","docId":"bbolt/bbolt"},{"type":"link","label":"Couchbase","href":"/storage/sqlite3_v1.x.x/couchbase/","docId":"couchbase/couchbase"},{"type":"link","label":"DynamoDB","href":"/storage/sqlite3_v1.x.x/dynamodb/","docId":"dynamodb/dynamodb"},{"type":"link","label":"Etcd","href":"/storage/sqlite3_v1.x.x/etcd/","docId":"etcd/etcd"},{"type":"link","label":"Memcache","href":"/storage/sqlite3_v1.x.x/memcache/","docId":"memcache/memcache"},{"type":"link","label":"Memory","href":"/storage/sqlite3_v1.x.x/memory/","docId":"memory/memory"},{"type":"link","label":"MongoDB","href":"/storage/sqlite3_v1.x.x/mongodb/","docId":"mongodb/mongodb"},{"type":"link","label":"MSSQL","href":"/storage/sqlite3_v1.x.x/mssql/","docId":"mssql/mssql"},{"type":"link","label":"MySQL","href":"/storage/sqlite3_v1.x.x/mysql/","docId":"mysql/mysql"},{"type":"link","label":"Pebble","href":"/storage/sqlite3_v1.x.x/pebble/","docId":"pebble/pebble"},{"type":"link","label":"Postgres","href":"/storage/sqlite3_v1.x.x/postgres/","docId":"postgres/postgres"},{"type":"link","label":"Redis","href":"/storage/sqlite3_v1.x.x/redis/","docId":"redis/redis"},{"type":"link","label":"Ristretto","href":"/storage/sqlite3_v1.x.x/ristretto/","docId":"ristretto/ristretto"},{"type":"link","label":"S3","href":"/storage/sqlite3_v1.x.x/s3/","docId":"s3/s3"},{"type":"link","label":"SQLite3","href":"/storage/sqlite3_v1.x.x/sqlite3/","docId":"sqlite3/sqlite3"}]},"docs":{"arangodb/arangodb":{"id":"arangodb/arangodb","title":"ArangoDB","description":"Release","sidebar":"tutorialSidebar"},"azureblob/azureblob":{"id":"azureblob/azureblob","title":"Azure Blob","description":"Release","sidebar":"tutorialSidebar"},"badger/badger":{"id":"badger/badger","title":"Badger","description":"Release","sidebar":"tutorialSidebar"},"bbolt/bbolt":{"id":"bbolt/bbolt","title":"Bbolt","description":"Release","sidebar":"tutorialSidebar"},"couchbase/couchbase":{"id":"couchbase/couchbase","title":"Couchbase","description":"Release","sidebar":"tutorialSidebar"},"dynamodb/dynamodb":{"id":"dynamodb/dynamodb","title":"DynamoDB","description":"Release","sidebar":"tutorialSidebar"},"etcd/etcd":{"id":"etcd/etcd","title":"Etcd","description":"Release","sidebar":"tutorialSidebar"},"memcache/memcache":{"id":"memcache/memcache","title":"Memcache","description":"Release","sidebar":"tutorialSidebar"},"memory/memory":{"id":"memory/memory","title":"Memory","description":"Release","sidebar":"tutorialSidebar"},"mongodb/mongodb":{"id":"mongodb/mongodb","title":"MongoDB","description":"Release","sidebar":"tutorialSidebar"},"mssql/mssql":{"id":"mssql/mssql","title":"MSSQL","description":"Release","sidebar":"tutorialSidebar"},"mysql/mysql":{"id":"mysql/mysql","title":"MySQL","description":"Release","sidebar":"tutorialSidebar"},"pebble/pebble":{"id":"pebble/pebble","title":"Pebble","description":"Release","sidebar":"tutorialSidebar"},"postgres/postgres":{"id":"postgres/postgres","title":"Postgres","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.","sidebar":"tutorialSidebar"},"redis/redis":{"id":"redis/redis","title":"Redis","description":"Release","sidebar":"tutorialSidebar"},"ristretto/ristretto":{"id":"ristretto/ristretto","title":"Ristretto","description":"Release","sidebar":"tutorialSidebar"},"s3/s3":{"id":"s3/s3","title":"S3","description":"Release","sidebar":"tutorialSidebar"},"sqlite3/sqlite3":{"id":"sqlite3/sqlite3","title":"SQLite3","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/216c2ff0.e423e04e.js b/assets/js/216c2ff0.e423e04e.js deleted file mode 100644 index 4e8408469c7..00000000000 --- a/assets/js/216c2ff0.e423e04e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1264],{2826:e=>{e.exports=JSON.parse('{"pluginId":"storage","version":"sqlite3_v1.x.x","label":"sqlite3_v1.x.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-sqlite3_v1.x.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/storage/sqlite3_v1.x.x/","docId":"README"},{"type":"link","label":"ArangoDB","href":"/storage/sqlite3_v1.x.x/arangodb/","docId":"arangodb/arangodb"},{"type":"link","label":"Azure Blob","href":"/storage/sqlite3_v1.x.x/azureblob/","docId":"azureblob/azureblob"},{"type":"link","label":"Badger","href":"/storage/sqlite3_v1.x.x/badger/","docId":"badger/badger"},{"type":"link","label":"Bbolt","href":"/storage/sqlite3_v1.x.x/bbolt/","docId":"bbolt/bbolt"},{"type":"link","label":"Couchbase","href":"/storage/sqlite3_v1.x.x/couchbase/","docId":"couchbase/couchbase"},{"type":"link","label":"DynamoDB","href":"/storage/sqlite3_v1.x.x/dynamodb/","docId":"dynamodb/dynamodb"},{"type":"link","label":"Etcd","href":"/storage/sqlite3_v1.x.x/etcd/","docId":"etcd/etcd"},{"type":"link","label":"Memcache","href":"/storage/sqlite3_v1.x.x/memcache/","docId":"memcache/memcache"},{"type":"link","label":"Memory","href":"/storage/sqlite3_v1.x.x/memory/","docId":"memory/memory"},{"type":"link","label":"MongoDB","href":"/storage/sqlite3_v1.x.x/mongodb/","docId":"mongodb/mongodb"},{"type":"link","label":"MSSQL","href":"/storage/sqlite3_v1.x.x/mssql/","docId":"mssql/mssql"},{"type":"link","label":"MySQL","href":"/storage/sqlite3_v1.x.x/mysql/","docId":"mysql/mysql"},{"type":"link","label":"Pebble","href":"/storage/sqlite3_v1.x.x/pebble/","docId":"pebble/pebble"},{"type":"link","label":"Postgres","href":"/storage/sqlite3_v1.x.x/postgres/","docId":"postgres/postgres"},{"type":"link","label":"Redis","href":"/storage/sqlite3_v1.x.x/redis/","docId":"redis/redis"},{"type":"link","label":"Ristretto","href":"/storage/sqlite3_v1.x.x/ristretto/","docId":"ristretto/ristretto"},{"type":"link","label":"S3","href":"/storage/sqlite3_v1.x.x/s3/","docId":"s3/s3"},{"type":"link","label":"SQLite3","href":"/storage/sqlite3_v1.x.x/sqlite3/","docId":"sqlite3/sqlite3"}]},"docs":{"arangodb/arangodb":{"id":"arangodb/arangodb","title":"ArangoDB","description":"Release","sidebar":"tutorialSidebar"},"azureblob/azureblob":{"id":"azureblob/azureblob","title":"Azure Blob","description":"Release","sidebar":"tutorialSidebar"},"badger/badger":{"id":"badger/badger","title":"Badger","description":"Release","sidebar":"tutorialSidebar"},"bbolt/bbolt":{"id":"bbolt/bbolt","title":"Bbolt","description":"Release","sidebar":"tutorialSidebar"},"couchbase/couchbase":{"id":"couchbase/couchbase","title":"Couchbase","description":"Release","sidebar":"tutorialSidebar"},"dynamodb/dynamodb":{"id":"dynamodb/dynamodb","title":"DynamoDB","description":"Release","sidebar":"tutorialSidebar"},"etcd/etcd":{"id":"etcd/etcd","title":"Etcd","description":"Release","sidebar":"tutorialSidebar"},"memcache/memcache":{"id":"memcache/memcache","title":"Memcache","description":"Release","sidebar":"tutorialSidebar"},"memory/memory":{"id":"memory/memory","title":"Memory","description":"Release","sidebar":"tutorialSidebar"},"mongodb/mongodb":{"id":"mongodb/mongodb","title":"MongoDB","description":"Release","sidebar":"tutorialSidebar"},"mssql/mssql":{"id":"mssql/mssql","title":"MSSQL","description":"Release","sidebar":"tutorialSidebar"},"mysql/mysql":{"id":"mysql/mysql","title":"MySQL","description":"Release","sidebar":"tutorialSidebar"},"pebble/pebble":{"id":"pebble/pebble","title":"Pebble","description":"Release","sidebar":"tutorialSidebar"},"postgres/postgres":{"id":"postgres/postgres","title":"Postgres","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.","sidebar":"tutorialSidebar"},"redis/redis":{"id":"redis/redis","title":"Redis","description":"Release","sidebar":"tutorialSidebar"},"ristretto/ristretto":{"id":"ristretto/ristretto","title":"Ristretto","description":"Release","sidebar":"tutorialSidebar"},"s3/s3":{"id":"s3/s3","title":"S3","description":"Release","sidebar":"tutorialSidebar"},"sqlite3/sqlite3":{"id":"sqlite3/sqlite3","title":"SQLite3","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/21abdb0d.42d9bad4.js b/assets/js/21abdb0d.42d9bad4.js new file mode 100644 index 00000000000..9736ba4573b --- /dev/null +++ b/assets/js/21abdb0d.42d9bad4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4792],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=p(n),b=a,f=c["".concat(s,".").concat(b)]||c[b]||g[b]||l;return n?r.createElement(f,o(o({ref:t},u),{},{components:n})):r.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=b;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:a,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const l={id:"pebble",title:"Pebble"},o=void 0,i={unversionedId:"pebble/pebble",id:"version-bbolt_v1.x.x/pebble/pebble",title:"Pebble",description:"Release",source:"@site/storage_versioned_docs/version-bbolt_v1.x.x/pebble/README.md",sourceDirName:"pebble",slug:"/pebble/",permalink:"/storage/pebble/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/pebble/README.md",tags:[],version:"bbolt_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"pebble",title:"Pebble"},sidebar:"tutorialSidebar",previous:{title:"MySQL",permalink:"/storage/mysql/"},next:{title:"Postgres",permalink:"/storage/postgres/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:p},c="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=pebble*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A fast key-value DB using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cockroachdb/pebble"},"cockroachdb/pebble")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Pebble is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"Note: This step is only required if you don't have an existing module."),(0,a.kt)("p",null,"And then install the Pebble implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/pebble\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/pebble"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := pebble.New()\n\n// Initialize custom config\nstore := pebble.New(pebble.Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./db"\n Path string\n\n // Pass write options during write operations\n //\n // Optional. Default is nil\n WriteOptions &pebble.WriteOptions{}\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/21cbcfa4.12016889.js b/assets/js/21cbcfa4.12016889.js new file mode 100644 index 00000000000..e76666fc30f --- /dev/null +++ b/assets/js/21cbcfa4.12016889.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1681],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),p=s(n),f=a,h=p["".concat(l,".").concat(f)]||p[f]||d[f]||i;return n?r.createElement(h,o(o({ref:t},u),{},{components:n})):r.createElement(h,o({ref:t},u))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:a,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));const i={id:"cache",title:"Cache"},o=void 0,c={unversionedId:"api/middleware/cache",id:"api/middleware/cache",title:"Cache",description:"Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core!",source:"@site/docs/core/api/middleware/cache.md",sourceDirName:"api/middleware",slug:"/api/middleware/cache",permalink:"/next/api/middleware/cache",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/cache.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"cache",title:"Cache"},sidebar:"tutorialSidebar",previous:{title:"BasicAuth",permalink:"/next/api/middleware/basicauth"},next:{title:"Compress",permalink:"/next/api/middleware/compress"}},l={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],u={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Cache middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," designed to intercept responses and cache them. This middleware will cache the ",(0,a.kt)("inlineCode",{parentName:"p"},"Body"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"Content-Type")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"StatusCode")," using the ",(0,a.kt)("inlineCode",{parentName:"p"},"c.Path()")," as unique identifier. Special thanks to ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/codemicro/fiber-cache"},"@codemicro")," for creating this middleware for Fiber core!"),(0,a.kt)("p",null,"Request Directives",(0,a.kt)("br",null),"\n",(0,a.kt)("inlineCode",{parentName:"p"},"Cache-Control: no-cache")," will return the up-to-date response but still caches it. You will always get a ",(0,a.kt)("inlineCode",{parentName:"p"},"miss")," cache status.",(0,a.kt)("br",null),"\n",(0,a.kt)("inlineCode",{parentName:"p"},"Cache-Control: no-store")," will refrain from caching. You will always get the up-to-date response."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/cache"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(cache.New())\n\n// Or extend your config for customization\napp.Use(cache.New(cache.Config{\n Next: func(c *fiber.Ctx) bool {\n return c.Query("refresh") == "true"\n },\n Expiration: 30 * time.Minute,\n CacheControl: true,\n}))\n')),(0,a.kt)("p",null,"Or you can custom key and expire time like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(cache.New(cache.Config{\n ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration {\n newCacheTime, _ := strconv.Atoi(c.GetRespHeader("Cache-Time", "600"))\n return time.Second * time.Duration(newCacheTime)\n },\n KeyGenerator: func(c *fiber.Ctx) string {\n return utils.CopyString(c.Path())\n },\n}))\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Response().Header.Add("Cache-Time", "6000")\n return c.SendString("hi")\n})\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Expiration is the time that an cached response will live\n //\n // Optional. Default: 1 * time.Minute\n Expiration time.Duration\n\n // CacheHeader header on response header, indicate cache status, with the following possible return value\n //\n // hit, miss, unreachable\n //\n // Optional. Default: X-Cache\n CacheHeader string\n\n // CacheControl enables client side caching if set to true\n //\n // Optional. Default: false\n CacheControl bool\n\n // Key allows you to generate custom keys, by default c.Path() is used\n //\n // Default: func(c *fiber.Ctx) string {\n // return utils.CopyString(c.Path())\n // }\n KeyGenerator func(*fiber.Ctx) string\n\n // allows you to generate custom Expiration Key By Key, default is Expiration (Optional)\n //\n // Default: nil\n ExpirationGenerator func(*fiber.Ctx, *Config) time.Duration\n\n // Store is used to store the state of the middleware\n //\n // Default: an in memory store for this process only\n Storage fiber.Storage\n\n // allows you to store additional headers generated by next middlewares & handler\n //\n // Default: false\n StoreResponseHeaders bool\n\n // Max number of bytes of response bodies simultaneously stored in cache. When limit is reached,\n // entries with the nearest expiration are deleted to make room for new.\n // 0 means no limit\n //\n // Default: 0\n MaxBytes uint\n\n // You can specify HTTP methods to cache.\n // The middleware just caches the routes of its methods in this slice.\n //\n // Default: []string{fiber.MethodGet, fiber.MethodHead}\n Methods []string\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n Expiration: 1 * time.Minute,\n CacheHeader: "X-Cache",\n CacheControl: false,\n KeyGenerator: func(c *fiber.Ctx) string {\n return utils.CopyString(c.Path())\n },\n ExpirationGenerator: nil,\n StoreResponseHeaders: false,\n Storage: nil,\n MaxBytes: 0,\n Methods: []string{fiber.MethodGet, fiber.MethodHead},\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/21cbcfa4.39475d5c.js b/assets/js/21cbcfa4.39475d5c.js deleted file mode 100644 index 30a8830da76..00000000000 --- a/assets/js/21cbcfa4.39475d5c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1681],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),p=s(n),f=a,h=p["".concat(l,".").concat(f)]||p[f]||d[f]||i;return n?r.createElement(h,o(o({ref:t},u),{},{components:n})):r.createElement(h,o({ref:t},u))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:a,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var r=n(7462),a=(n(7294),n(3905));const i={id:"cache",title:"Cache"},o=void 0,c={unversionedId:"api/middleware/cache",id:"api/middleware/cache",title:"Cache",description:"Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core!",source:"@site/docs/core/api/middleware/cache.md",sourceDirName:"api/middleware",slug:"/api/middleware/cache",permalink:"/next/api/middleware/cache",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/cache.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"cache",title:"Cache"},sidebar:"tutorialSidebar",previous:{title:"BasicAuth",permalink:"/next/api/middleware/basicauth"},next:{title:"Compress",permalink:"/next/api/middleware/compress"}},l={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],u={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Cache middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," designed to intercept responses and cache them. This middleware will cache the ",(0,a.kt)("inlineCode",{parentName:"p"},"Body"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"Content-Type")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"StatusCode")," using the ",(0,a.kt)("inlineCode",{parentName:"p"},"c.Path()")," as unique identifier. Special thanks to ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/codemicro/fiber-cache"},"@codemicro")," for creating this middleware for Fiber core!"),(0,a.kt)("p",null,"Request Directives",(0,a.kt)("br",null),"\n",(0,a.kt)("inlineCode",{parentName:"p"},"Cache-Control: no-cache")," will return the up-to-date response but still caches it. You will always get a ",(0,a.kt)("inlineCode",{parentName:"p"},"miss")," cache status.",(0,a.kt)("br",null),"\n",(0,a.kt)("inlineCode",{parentName:"p"},"Cache-Control: no-store")," will refrain from caching. You will always get the up-to-date response."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/cache"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(cache.New())\n\n// Or extend your config for customization\napp.Use(cache.New(cache.Config{\n Next: func(c *fiber.Ctx) bool {\n return c.Query("refresh") == "true"\n },\n Expiration: 30 * time.Minute,\n CacheControl: true,\n}))\n')),(0,a.kt)("p",null,"Or you can custom key and expire time like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(cache.New(cache.Config{\n ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration {\n newCacheTime, _ := strconv.Atoi(c.GetRespHeader("Cache-Time", "600"))\n return time.Second * time.Duration(newCacheTime)\n },\n KeyGenerator: func(c *fiber.Ctx) string {\n return utils.CopyString(c.Path())\n },\n}))\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Response().Header.Add("Cache-Time", "6000")\n return c.SendString("hi")\n})\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Expiration is the time that an cached response will live\n //\n // Optional. Default: 1 * time.Minute\n Expiration time.Duration\n\n // CacheHeader header on response header, indicate cache status, with the following possible return value\n //\n // hit, miss, unreachable\n //\n // Optional. Default: X-Cache\n CacheHeader string\n\n // CacheControl enables client side caching if set to true\n //\n // Optional. Default: false\n CacheControl bool\n\n // Key allows you to generate custom keys, by default c.Path() is used\n //\n // Default: func(c *fiber.Ctx) string {\n // return utils.CopyString(c.Path())\n // }\n KeyGenerator func(*fiber.Ctx) string\n\n // allows you to generate custom Expiration Key By Key, default is Expiration (Optional)\n //\n // Default: nil\n ExpirationGenerator func(*fiber.Ctx, *Config) time.Duration\n\n // Store is used to store the state of the middleware\n //\n // Default: an in memory store for this process only\n Storage fiber.Storage\n\n // allows you to store additional headers generated by next middlewares & handler\n //\n // Default: false\n StoreResponseHeaders bool\n\n // Max number of bytes of response bodies simultaneously stored in cache. When limit is reached,\n // entries with the nearest expiration are deleted to make room for new.\n // 0 means no limit\n //\n // Default: 0\n MaxBytes uint\n\n // You can specify HTTP methods to cache.\n // The middleware just caches the routes of its methods in this slice.\n //\n // Default: []string{fiber.MethodGet, fiber.MethodHead}\n Methods []string\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n Expiration: 1 * time.Minute,\n CacheHeader: "X-Cache",\n CacheControl: false,\n KeyGenerator: func(c *fiber.Ctx) string {\n return utils.CopyString(c.Path())\n },\n ExpirationGenerator: nil,\n StoreResponseHeaders: false,\n Storage: nil,\n MaxBytes: 0,\n Methods: []string{fiber.MethodGet, fiber.MethodHead},\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2244d875.5019532d.js b/assets/js/2244d875.5019532d.js deleted file mode 100644 index 92391c644ab..00000000000 --- a/assets/js/2244d875.5019532d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7006],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>g});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=p(n),m=a,g=c["".concat(s,".").concat(m)]||c[m]||u[m]||i;return n?r.createElement(g,o(o({ref:t},d),{},{components:n})):r.createElement(g,o({ref:t},d))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const i={id:"jwt",title:"JWT"},o=void 0,l={unversionedId:"jwt/jwt",id:"version-fiberzerolog_v0.x.x/jwt/jwt",title:"JWT",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/jwt/README.md",sourceDirName:"jwt",slug:"/jwt/",permalink:"/contrib/jwt/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/jwt/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"jwt",title:"JWT"},sidebar:"tutorialSidebar",previous:{title:"Fiberzerolog",permalink:"/contrib/fiberzerolog/"},next:{title:"Opafiber",permalink:"/contrib/opafiber/"}},s={},p=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"HS256 Example",id:"hs256-example",level:3},{value:"HS256 Test",id:"hs256-test",level:3},{value:"RS256 Example",id:"rs256-example",level:3},{value:"RS256 Test",id:"rs256-test",level:3},{value:"JWK Set Test",id:"jwk-set-test",level:3},{value:"Custom KeyFunc example",id:"custom-keyfunc-example",level:3}],d={toc:p},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=jwt*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,'JWT returns a JSON Web Token (JWT) auth middleware.\nFor valid token, it sets the user in Ctx.Locals and calls next handler.\nFor invalid token, it returns "401 - Unauthorized" error.\nFor missing token, it returns "400 - Bad Request" error.'),(0,a.kt)("p",null,"Special thanks and credits to ",(0,a.kt)("a",{parentName:"p",href:"https://echo.labstack.com/middleware/jwt"},"Echo")),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("p",null,"This middleware supports Fiber v1 & v2, install accordingly."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/jwt\ngo get -u github.com/golang-jwt/jwt/v5\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"jwtware.New(config ...jwtware.Config) func(*fiber.Ctx) error\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Filter"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Defines a function to skip middleware"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SuccessHandler"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) error")),(0,a.kt)("td",{parentName:"tr",align:"left"},"SuccessHandler defines a function which is executed for a valid token."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"ErrorHandler"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx, error) error")),(0,a.kt)("td",{parentName:"tr",align:"left"},"ErrorHandler defines a function which is executed for an invalid token."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"401 Invalid or expired JWT"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SigningKey"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"interface{}")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Signing key to validate token. Used as fallback if SigningKeys has length 0."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SigningKeys"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"map[string]interface{}")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Map of signing keys to validate token with kid field usage."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"ContextKey"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Context key to store user information from the token into context."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'"user"'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Claims"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"jwt.Claim")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Claims are extendable claims data defining token content."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"jwt.MapClaims{}"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"TokenLookup"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"TokenLookup is a string in the form of ",(0,a.kt)("inlineCode",{parentName:"td"},":")," that is used"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'"header:Authorization"'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"AuthScheme"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"AuthScheme to be used in the Authorization header. The default value (",(0,a.kt)("inlineCode",{parentName:"td"},'"Bearer"'),") will only be used in conjuction with the default ",(0,a.kt)("inlineCode",{parentName:"td"},"TokenLookup")," value."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'"Bearer"'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"KeyFunc"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func() jwt.Keyfunc")),(0,a.kt)("td",{parentName:"tr",align:"left"},"KeyFunc defines a user-defined function that supplies the public key for a token validation."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"jwtKeyFunc"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"JWKSetURLs"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"A slice of unique JSON Web Key (JWK) Set URLs to used to parse JWTs."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))))),(0,a.kt)("h3",{id:"hs256-example"},"HS256 Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "time"\n\n "github.com/gofiber/fiber/v2"\n\n jwtware "github.com/gofiber/contrib/jwt"\n "github.com/golang-jwt/jwt/v5"\n)\n\nfunc main() {\n app := fiber.New()\n\n // Login route\n app.Post("/login", login)\n\n // Unauthenticated route\n app.Get("/", accessible)\n\n // JWT Middleware\n app.Use(jwtware.New(jwtware.Config{\n SigningKey: jwtware.SigningKey{Key: []byte("secret")},\n }))\n\n // Restricted Routes\n app.Get("/restricted", restricted)\n\n app.Listen(":3000")\n}\n\nfunc login(c *fiber.Ctx) error {\n user := c.FormValue("user")\n pass := c.FormValue("pass")\n\n // Throws Unauthorized error\n if user != "john" || pass != "doe" {\n return c.SendStatus(fiber.StatusUnauthorized)\n }\n\n // Create the Claims\n claims := jwt.MapClaims{\n "name": "John Doe",\n "admin": true,\n "exp": time.Now().Add(time.Hour * 72).Unix(),\n }\n\n // Create token\n token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)\n\n // Generate encoded token and send it as response.\n t, err := token.SignedString([]byte("secret"))\n if err != nil {\n return c.SendStatus(fiber.StatusInternalServerError)\n }\n\n return c.JSON(fiber.Map{"token": t})\n}\n\nfunc accessible(c *fiber.Ctx) error {\n return c.SendString("Accessible")\n}\n\nfunc restricted(c *fiber.Ctx) error {\n user := c.Locals("user").(*jwt.Token)\n claims := user.Claims.(jwt.MapClaims)\n name := claims["name"].(string)\n return c.SendString("Welcome " + name)\n}\n\n')),(0,a.kt)("h3",{id:"hs256-test"},"HS256 Test"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},"Login using username and password to retrieve a token.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'curl --data "user=john&pass=doe" http://localhost:3000/login\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},"Response")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY"\n}\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},"Request a restricted resource using the token in Authorization request header.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'curl localhost:3000/restricted -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY"\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},"Response")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"Welcome John Doe\n")),(0,a.kt)("h3",{id:"rs256-example"},"RS256 Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/rand"\n "crypto/rsa"\n "log"\n "time"\n\n "github.com/gofiber/fiber/v2"\n\n "github.com/golang-jwt/jwt/v5"\n\n jwtware "github.com/gofiber/contrib/jwt"\n)\n\nvar (\n // Obviously, this is just a test example. Do not do this in production.\n // In production, you would have the private key and public key pair generated\n // in advance. NEVER add a private key to any GitHub repo.\n privateKey *rsa.PrivateKey\n)\n\nfunc main() {\n app := fiber.New()\n\n // Just as a demo, generate a new private/public key pair on each run. See note above.\n rng := rand.Reader\n var err error\n privateKey, err = rsa.GenerateKey(rng, 2048)\n if err != nil {\n log.Fatalf("rsa.GenerateKey: %v", err)\n }\n\n // Login route\n app.Post("/login", login)\n\n // Unauthenticated route\n app.Get("/", accessible)\n\n // JWT Middleware\n app.Use(jwtware.New(jwtware.Config{\n SigningKey: jwtware.SigningKey{\n JWTAlg: jwtware.RS256,\n Key: privateKey.Public(),\n },\n }))\n\n // Restricted Routes\n app.Get("/restricted", restricted)\n\n app.Listen(":3000")\n}\n\nfunc login(c *fiber.Ctx) error {\n user := c.FormValue("user")\n pass := c.FormValue("pass")\n\n // Throws Unauthorized error\n if user != "john" || pass != "doe" {\n return c.SendStatus(fiber.StatusUnauthorized)\n }\n\n // Create the Claims\n claims := jwt.MapClaims{\n "name": "John Doe",\n "admin": true,\n "exp": time.Now().Add(time.Hour * 72).Unix(),\n }\n\n // Create token\n token := jwt.NewWithClaims(jwt.SigningMethodRS256, claims)\n\n // Generate encoded token and send it as response.\n t, err := token.SignedString(privateKey)\n if err != nil {\n log.Printf("token.SignedString: %v", err)\n return c.SendStatus(fiber.StatusInternalServerError)\n }\n\n return c.JSON(fiber.Map{"token": t})\n}\n\nfunc accessible(c *fiber.Ctx) error {\n return c.SendString("Accessible")\n}\n\nfunc restricted(c *fiber.Ctx) error {\n user := c.Locals("user").(*jwt.Token)\n claims := user.Claims.(jwt.MapClaims)\n name := claims["name"].(string)\n return c.SendString("Welcome " + name)\n}\n')),(0,a.kt)("h3",{id:"rs256-test"},"RS256 Test"),(0,a.kt)("p",null,"The RS256 is actually identical to the HS256 test above."),(0,a.kt)("h3",{id:"jwk-set-test"},"JWK Set Test"),(0,a.kt)("p",null,"The tests are identical to basic ",(0,a.kt)("inlineCode",{parentName:"p"},"JWT")," tests above, with exception that ",(0,a.kt)("inlineCode",{parentName:"p"},"JWKSetURLs")," to valid public keys collection in JSON Web Key (JWK) Set format should be supplied. See ",(0,a.kt)("a",{parentName:"p",href:"https://www.rfc-editor.org/rfc/rfc7517"},"RFC 7517"),"."),(0,a.kt)("h3",{id:"custom-keyfunc-example"},"Custom KeyFunc example"),(0,a.kt)("p",null,"KeyFunc defines a user-defined function that supplies the public key for a token validation.\nThe function shall take care of verifying the signing algorithm and selecting the proper key.\nA user-defined KeyFunc can be useful if tokens are issued by an external party."),(0,a.kt)("p",null,"When a user-defined KeyFunc is provided, SigningKey, SigningKeys, and SigningMethod are ignored.\nThis is one of the three options to provide a token validation key.\nThe order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey.\nRequired if neither SigningKeys nor SigningKey is provided.\nDefault to an internal implementation verifying the signing algorithm and selecting the proper key."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "github.com/gofiber/fiber/v2"\n\n jwtware "github.com/gofiber/contrib/jwt"\n "github.com/golang-jwt/jwt/v5"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use(jwtware.New(jwtware.Config{\n KeyFunc: customKeyFunc(),\n }))\n\n app.Get("/ok", func(c *fiber.Ctx) error {\n return c.SendString("OK")\n })\n}\n\nfunc customKeyFunc() jwt.Keyfunc {\n return func(t *jwt.Token) (interface{}, error) {\n // Always check the signing method\n if t.Method.Alg() != jwtware.HS256 {\n return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])\n }\n\n // TODO custom implementation of loading signing key like from a database\n signingKey := "secret"\n\n return []byte(signingKey), nil\n }\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2244d875.f95759a7.js b/assets/js/2244d875.f95759a7.js new file mode 100644 index 00000000000..9b76ad377cd --- /dev/null +++ b/assets/js/2244d875.f95759a7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7006],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>g});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=p(n),m=a,g=c["".concat(s,".").concat(m)]||c[m]||u[m]||i;return n?r.createElement(g,o(o({ref:t},d),{},{components:n})):r.createElement(g,o({ref:t},d))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const i={id:"jwt",title:"JWT"},o=void 0,l={unversionedId:"jwt/jwt",id:"version-fiberzerolog_v0.x.x/jwt/jwt",title:"JWT",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/jwt/README.md",sourceDirName:"jwt",slug:"/jwt/",permalink:"/contrib/jwt/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/jwt/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"jwt",title:"JWT"},sidebar:"tutorialSidebar",previous:{title:"Fiberzerolog",permalink:"/contrib/fiberzerolog/"},next:{title:"Opafiber",permalink:"/contrib/opafiber/"}},s={},p=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"HS256 Example",id:"hs256-example",level:3},{value:"HS256 Test",id:"hs256-test",level:3},{value:"RS256 Example",id:"rs256-example",level:3},{value:"RS256 Test",id:"rs256-test",level:3},{value:"JWK Set Test",id:"jwk-set-test",level:3},{value:"Custom KeyFunc example",id:"custom-keyfunc-example",level:3}],d={toc:p},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=jwt*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,'JWT returns a JSON Web Token (JWT) auth middleware.\nFor valid token, it sets the user in Ctx.Locals and calls next handler.\nFor invalid token, it returns "401 - Unauthorized" error.\nFor missing token, it returns "400 - Bad Request" error.'),(0,a.kt)("p",null,"Special thanks and credits to ",(0,a.kt)("a",{parentName:"p",href:"https://echo.labstack.com/middleware/jwt"},"Echo")),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("p",null,"This middleware supports Fiber v1 & v2, install accordingly."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/jwt\ngo get -u github.com/golang-jwt/jwt/v5\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"jwtware.New(config ...jwtware.Config) func(*fiber.Ctx) error\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Filter"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Defines a function to skip middleware"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SuccessHandler"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) error")),(0,a.kt)("td",{parentName:"tr",align:"left"},"SuccessHandler defines a function which is executed for a valid token."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"ErrorHandler"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx, error) error")),(0,a.kt)("td",{parentName:"tr",align:"left"},"ErrorHandler defines a function which is executed for an invalid token."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"401 Invalid or expired JWT"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SigningKey"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"interface{}")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Signing key to validate token. Used as fallback if SigningKeys has length 0."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SigningKeys"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"map[string]interface{}")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Map of signing keys to validate token with kid field usage."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"ContextKey"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Context key to store user information from the token into context."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'"user"'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Claims"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"jwt.Claim")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Claims are extendable claims data defining token content."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"jwt.MapClaims{}"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"TokenLookup"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"TokenLookup is a string in the form of ",(0,a.kt)("inlineCode",{parentName:"td"},":")," that is used"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'"header:Authorization"'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"AuthScheme"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"AuthScheme to be used in the Authorization header. The default value (",(0,a.kt)("inlineCode",{parentName:"td"},'"Bearer"'),") will only be used in conjuction with the default ",(0,a.kt)("inlineCode",{parentName:"td"},"TokenLookup")," value."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'"Bearer"'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"KeyFunc"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func() jwt.Keyfunc")),(0,a.kt)("td",{parentName:"tr",align:"left"},"KeyFunc defines a user-defined function that supplies the public key for a token validation."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"jwtKeyFunc"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"JWKSetURLs"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"A slice of unique JSON Web Key (JWK) Set URLs to used to parse JWTs."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))))),(0,a.kt)("h3",{id:"hs256-example"},"HS256 Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "time"\n\n "github.com/gofiber/fiber/v2"\n\n jwtware "github.com/gofiber/contrib/jwt"\n "github.com/golang-jwt/jwt/v5"\n)\n\nfunc main() {\n app := fiber.New()\n\n // Login route\n app.Post("/login", login)\n\n // Unauthenticated route\n app.Get("/", accessible)\n\n // JWT Middleware\n app.Use(jwtware.New(jwtware.Config{\n SigningKey: jwtware.SigningKey{Key: []byte("secret")},\n }))\n\n // Restricted Routes\n app.Get("/restricted", restricted)\n\n app.Listen(":3000")\n}\n\nfunc login(c *fiber.Ctx) error {\n user := c.FormValue("user")\n pass := c.FormValue("pass")\n\n // Throws Unauthorized error\n if user != "john" || pass != "doe" {\n return c.SendStatus(fiber.StatusUnauthorized)\n }\n\n // Create the Claims\n claims := jwt.MapClaims{\n "name": "John Doe",\n "admin": true,\n "exp": time.Now().Add(time.Hour * 72).Unix(),\n }\n\n // Create token\n token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)\n\n // Generate encoded token and send it as response.\n t, err := token.SignedString([]byte("secret"))\n if err != nil {\n return c.SendStatus(fiber.StatusInternalServerError)\n }\n\n return c.JSON(fiber.Map{"token": t})\n}\n\nfunc accessible(c *fiber.Ctx) error {\n return c.SendString("Accessible")\n}\n\nfunc restricted(c *fiber.Ctx) error {\n user := c.Locals("user").(*jwt.Token)\n claims := user.Claims.(jwt.MapClaims)\n name := claims["name"].(string)\n return c.SendString("Welcome " + name)\n}\n\n')),(0,a.kt)("h3",{id:"hs256-test"},"HS256 Test"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},"Login using username and password to retrieve a token.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'curl --data "user=john&pass=doe" http://localhost:3000/login\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},"Response")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY"\n}\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},"Request a restricted resource using the token in Authorization request header.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'curl localhost:3000/restricted -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY"\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},"Response")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"Welcome John Doe\n")),(0,a.kt)("h3",{id:"rs256-example"},"RS256 Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "crypto/rand"\n "crypto/rsa"\n "log"\n "time"\n\n "github.com/gofiber/fiber/v2"\n\n "github.com/golang-jwt/jwt/v5"\n\n jwtware "github.com/gofiber/contrib/jwt"\n)\n\nvar (\n // Obviously, this is just a test example. Do not do this in production.\n // In production, you would have the private key and public key pair generated\n // in advance. NEVER add a private key to any GitHub repo.\n privateKey *rsa.PrivateKey\n)\n\nfunc main() {\n app := fiber.New()\n\n // Just as a demo, generate a new private/public key pair on each run. See note above.\n rng := rand.Reader\n var err error\n privateKey, err = rsa.GenerateKey(rng, 2048)\n if err != nil {\n log.Fatalf("rsa.GenerateKey: %v", err)\n }\n\n // Login route\n app.Post("/login", login)\n\n // Unauthenticated route\n app.Get("/", accessible)\n\n // JWT Middleware\n app.Use(jwtware.New(jwtware.Config{\n SigningKey: jwtware.SigningKey{\n JWTAlg: jwtware.RS256,\n Key: privateKey.Public(),\n },\n }))\n\n // Restricted Routes\n app.Get("/restricted", restricted)\n\n app.Listen(":3000")\n}\n\nfunc login(c *fiber.Ctx) error {\n user := c.FormValue("user")\n pass := c.FormValue("pass")\n\n // Throws Unauthorized error\n if user != "john" || pass != "doe" {\n return c.SendStatus(fiber.StatusUnauthorized)\n }\n\n // Create the Claims\n claims := jwt.MapClaims{\n "name": "John Doe",\n "admin": true,\n "exp": time.Now().Add(time.Hour * 72).Unix(),\n }\n\n // Create token\n token := jwt.NewWithClaims(jwt.SigningMethodRS256, claims)\n\n // Generate encoded token and send it as response.\n t, err := token.SignedString(privateKey)\n if err != nil {\n log.Printf("token.SignedString: %v", err)\n return c.SendStatus(fiber.StatusInternalServerError)\n }\n\n return c.JSON(fiber.Map{"token": t})\n}\n\nfunc accessible(c *fiber.Ctx) error {\n return c.SendString("Accessible")\n}\n\nfunc restricted(c *fiber.Ctx) error {\n user := c.Locals("user").(*jwt.Token)\n claims := user.Claims.(jwt.MapClaims)\n name := claims["name"].(string)\n return c.SendString("Welcome " + name)\n}\n')),(0,a.kt)("h3",{id:"rs256-test"},"RS256 Test"),(0,a.kt)("p",null,"The RS256 is actually identical to the HS256 test above."),(0,a.kt)("h3",{id:"jwk-set-test"},"JWK Set Test"),(0,a.kt)("p",null,"The tests are identical to basic ",(0,a.kt)("inlineCode",{parentName:"p"},"JWT")," tests above, with exception that ",(0,a.kt)("inlineCode",{parentName:"p"},"JWKSetURLs")," to valid public keys collection in JSON Web Key (JWK) Set format should be supplied. See ",(0,a.kt)("a",{parentName:"p",href:"https://www.rfc-editor.org/rfc/rfc7517"},"RFC 7517"),"."),(0,a.kt)("h3",{id:"custom-keyfunc-example"},"Custom KeyFunc example"),(0,a.kt)("p",null,"KeyFunc defines a user-defined function that supplies the public key for a token validation.\nThe function shall take care of verifying the signing algorithm and selecting the proper key.\nA user-defined KeyFunc can be useful if tokens are issued by an external party."),(0,a.kt)("p",null,"When a user-defined KeyFunc is provided, SigningKey, SigningKeys, and SigningMethod are ignored.\nThis is one of the three options to provide a token validation key.\nThe order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey.\nRequired if neither SigningKeys nor SigningKey is provided.\nDefault to an internal implementation verifying the signing algorithm and selecting the proper key."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "github.com/gofiber/fiber/v2"\n\n jwtware "github.com/gofiber/contrib/jwt"\n "github.com/golang-jwt/jwt/v5"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use(jwtware.New(jwtware.Config{\n KeyFunc: customKeyFunc(),\n }))\n\n app.Get("/ok", func(c *fiber.Ctx) error {\n return c.SendString("OK")\n })\n}\n\nfunc customKeyFunc() jwt.Keyfunc {\n return func(t *jwt.Token) (interface{}, error) {\n // Always check the signing method\n if t.Method.Alg() != jwtware.HS256 {\n return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])\n }\n\n // TODO custom implementation of loading signing key like from a database\n signingKey := "secret"\n\n return []byte(signingKey), nil\n }\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/22e714a5.10483d7d.js b/assets/js/22e714a5.10483d7d.js deleted file mode 100644 index ce2d5ad29d6..00000000000 --- a/assets/js/22e714a5.10483d7d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9122],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>d});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=s(r),m=o,d=u["".concat(p,".").concat(m)]||u[m]||f[m]||a;return r?n.createElement(d,i(i({ref:t},c),{},{components:r})):n.createElement(d,i({ref:t},c))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:o,i[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var n=r(7462),o=(r(7294),r(3905));const a={id:"otelfiber-example",title:"Example"},i=void 0,l={unversionedId:"otelfiber/example/otelfiber-example",id:"version-swagger_v1.x.x/otelfiber/example/otelfiber-example",title:"Example",description:"An HTTP server using gofiber fiber and instrumentation. The server has a",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/otelfiber/example/README.md",sourceDirName:"otelfiber/example",slug:"/otelfiber/example/",permalink:"/contrib/swagger_v1.x.x/otelfiber/example/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/otelfiber/example/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"otelfiber-example",title:"Example"},sidebar:"tutorialSidebar",previous:{title:"Otelfiber",permalink:"/contrib/swagger_v1.x.x/otelfiber/"},next:{title:"Paseto",permalink:"/contrib/swagger_v1.x.x/paseto/"}},p={},s=[],c={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"An HTTP server using gofiber fiber and instrumentation. The server has a\n",(0,o.kt)("inlineCode",{parentName:"p"},"/users/:id")," endpoint. The server generates span information to\n",(0,o.kt)("inlineCode",{parentName:"p"},"stdout"),"."),(0,o.kt)("p",null,"These instructions expect you have\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/"},"docker-compose")," installed."),(0,o.kt)("p",null,"Bring up the ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," services to run the\nexample:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose up --detach fiber-server fiber-client\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," service sends just one HTTP request to ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server"),"\nand then exits. View the span generated by ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," in the logs:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose logs fiber-server\n")),(0,o.kt)("p",null,"Shut down the services when you are finished with the example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose down\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/22e714a5.2eaa1352.js b/assets/js/22e714a5.2eaa1352.js new file mode 100644 index 00000000000..206b5601145 --- /dev/null +++ b/assets/js/22e714a5.2eaa1352.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9122],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>d});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=s(r),m=o,d=u["".concat(p,".").concat(m)]||u[m]||f[m]||a;return r?n.createElement(d,i(i({ref:t},c),{},{components:r})):n.createElement(d,i({ref:t},c))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:o,i[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));const a={id:"otelfiber-example",title:"Example"},i=void 0,l={unversionedId:"otelfiber/example/otelfiber-example",id:"version-swagger_v1.x.x/otelfiber/example/otelfiber-example",title:"Example",description:"An HTTP server using gofiber fiber and instrumentation. The server has a",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/otelfiber/example/README.md",sourceDirName:"otelfiber/example",slug:"/otelfiber/example/",permalink:"/contrib/swagger_v1.x.x/otelfiber/example/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/otelfiber/example/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"otelfiber-example",title:"Example"},sidebar:"tutorialSidebar",previous:{title:"Otelfiber",permalink:"/contrib/swagger_v1.x.x/otelfiber/"},next:{title:"Paseto",permalink:"/contrib/swagger_v1.x.x/paseto/"}},p={},s=[],c={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"An HTTP server using gofiber fiber and instrumentation. The server has a\n",(0,o.kt)("inlineCode",{parentName:"p"},"/users/:id")," endpoint. The server generates span information to\n",(0,o.kt)("inlineCode",{parentName:"p"},"stdout"),"."),(0,o.kt)("p",null,"These instructions expect you have\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/"},"docker-compose")," installed."),(0,o.kt)("p",null,"Bring up the ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," services to run the\nexample:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose up --detach fiber-server fiber-client\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," service sends just one HTTP request to ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server"),"\nand then exits. View the span generated by ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," in the logs:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose logs fiber-server\n")),(0,o.kt)("p",null,"Shut down the services when you are finished with the example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose down\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/230.06e9bff8.js b/assets/js/230.06e9bff8.js deleted file mode 100644 index 4c2a3f2198d..00000000000 --- a/assets/js/230.06e9bff8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[230],{230:(e,t,o)=>{o.r(t),o.d(t,{default:()=>p});var a=o(7294),n=o(6010),l=o(5999);const r={popup:"popup_wph0",buttonContainer:"buttonContainer_ox5C"};function p(e){let{onReload:t}=e;const[o,p]=(0,a.useState)(!0);return o&&a.createElement("div",{className:(0,n.Z)("alert","alert--secondary",r.popup)},a.createElement("p",null,a.createElement(l.Z,{id:"theme.PwaReloadPopup.info",description:"The text for PWA reload popup"},"New version available")),a.createElement("div",{className:r.buttonContainer},a.createElement("button",{className:"button button--link",type:"button",onClick:()=>{p(!1),t()}},a.createElement(l.Z,{id:"theme.PwaReloadPopup.refreshButtonText",description:"The text for PWA reload button"},"Refresh")),a.createElement("button",{"aria-label":(0,l.I)({id:"theme.PwaReloadPopup.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of PWA reload popup"}),className:"close",type:"button",onClick:()=>p(!1)},a.createElement("span",{"aria-hidden":"true"},"\xd7"))))}}}]); \ No newline at end of file diff --git a/assets/js/230.9382e116.js b/assets/js/230.9382e116.js new file mode 100644 index 00000000000..0e52cd32fa4 --- /dev/null +++ b/assets/js/230.9382e116.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[230],{10230:(e,t,o)=>{o.r(t),o.d(t,{default:()=>p});var a=o(67294),n=o(86010),l=o(95999);const r={popup:"popup_wph0",buttonContainer:"buttonContainer_ox5C"};function p(e){let{onReload:t}=e;const[o,p]=(0,a.useState)(!0);return o&&a.createElement("div",{className:(0,n.Z)("alert","alert--secondary",r.popup)},a.createElement("p",null,a.createElement(l.Z,{id:"theme.PwaReloadPopup.info",description:"The text for PWA reload popup"},"New version available")),a.createElement("div",{className:r.buttonContainer},a.createElement("button",{className:"button button--link",type:"button",onClick:()=>{p(!1),t()}},a.createElement(l.Z,{id:"theme.PwaReloadPopup.refreshButtonText",description:"The text for PWA reload button"},"Refresh")),a.createElement("button",{"aria-label":(0,l.I)({id:"theme.PwaReloadPopup.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of PWA reload popup"}),className:"close",type:"button",onClick:()=>p(!1)},a.createElement("span",{"aria-hidden":"true"},"\xd7"))))}}}]); \ No newline at end of file diff --git a/assets/js/2355813e.84a25580.js b/assets/js/2355813e.84a25580.js deleted file mode 100644 index 02f46464e51..00000000000 --- a/assets/js/2355813e.84a25580.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9386],{3905:(t,e,r)=>{r.d(e,{Zo:()=>c,kt:()=>f});var o=r(7294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var n=o.createContext({}),g=function(t){var e=o.useContext(n),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},c=function(t){var e=g(t.components);return o.createElement(n.Provider,{value:e},t.children)},m="mdxType",h={inlineCode:"code",wrapper:function(t){var e=t.children;return o.createElement(o.Fragment,{},e)}},b=o.forwardRef((function(t,e){var r=t.components,a=t.mdxType,s=t.originalType,n=t.parentName,c=l(t,["components","mdxType","originalType","parentName"]),m=g(r),b=a,f=m["".concat(n,".").concat(b)]||m[b]||h[b]||s;return r?o.createElement(f,i(i({ref:e},c),{},{components:r})):o.createElement(f,i({ref:e},c))}));function f(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var s=r.length,i=new Array(s);i[0]=b;var l={};for(var n in e)hasOwnProperty.call(e,n)&&(l[n]=e[n]);l.originalType=t,l[m]="string"==typeof t?t:a,i[1]=l;for(var g=2;g{r.r(e),r.d(e,{assets:()=>n,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var o=r(7462),a=(r(7294),r(3905));const s={title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},i=void 0,l={unversionedId:"README",id:"version-sqlite3_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/storage/sqlite3_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"ArangoDB",permalink:"/storage/sqlite3_v1.x.x/arangodb/"}},n={},g=[{value:"\ud83d\udcd1 Storage Implementations",id:"-storage-implementations",level:2}],c={toc:g},m="wrapper";function h(t){let{components:e,...r}=t;return(0,a.kt)(m,(0,o.Z)({},c,r,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",{align:"center"},(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only"}),(0,a.kt)("br",null),(0,a.kt)("h1",{id:"-storage"},"\ud83d\udce6 Storage"),(0,a.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/storage?tab=doc"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,a.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/storage"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,a.kt)("a",{href:"https://gofiber.io/discord"},(0,a.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,a.kt)("p",null,"Premade storage drivers that implement the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/blob/main/storage.go"},(0,a.kt)("inlineCode",{parentName:"a"},"Storage"))," interface, designed to be used with various ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware"},"Fiber middlewares"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Storage interface for communicating with different database/key-value\n// providers. Visit https://github.com/gofiber/storage for more info.\ntype Storage interface {\n // Get gets the value for the given key.\n // `nil, nil` is returned when the key does not exist\n Get(key string) ([]byte, error)\n\n // Set stores the given value for the given key along\n // with an expiration value, 0 means no expiration.\n // Empty key or value will be ignored without an error.\n Set(key string, val []byte, exp time.Duration) error\n\n // Delete deletes the value for the given key.\n // It returns no error if the storage does not contain the key,\n Delete(key string) error\n\n // Reset resets the storage and delete all keys.\n Reset() error\n\n // Close closes the storage and will stop any running garbage\n // collectors and open connections.\n Close() error\n}\n")),(0,a.kt)("h2",{id:"-storage-implementations"},"\ud83d\udcd1 Storage Implementations"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/arangodb/"},"ArangoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/azureblob/"},"AzureBlob")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/badger/"},"Badger")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"./bbolt"},"Bbolt")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/couchbase/"},"Couchbase")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/dynamodb/"},"DynamoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/etcd/"},"Etcd")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/memcache/"},"Memcache")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/memory/"},"Memory")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/mongodb/"},"MongoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/mssql/"},"MSSQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/mysql/"},"MySQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/pebble/"},"Pebble")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/postgres/"},"Postgres")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/redis/"},"Redis")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/s3/"},"S3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/sqlite3/"},"SQLite3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2355813e.8e73d90b.js b/assets/js/2355813e.8e73d90b.js new file mode 100644 index 00000000000..f73fb2bce34 --- /dev/null +++ b/assets/js/2355813e.8e73d90b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9386],{3905:(t,e,r)=>{r.d(e,{Zo:()=>c,kt:()=>f});var o=r(67294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var n=o.createContext({}),g=function(t){var e=o.useContext(n),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},c=function(t){var e=g(t.components);return o.createElement(n.Provider,{value:e},t.children)},m="mdxType",h={inlineCode:"code",wrapper:function(t){var e=t.children;return o.createElement(o.Fragment,{},e)}},b=o.forwardRef((function(t,e){var r=t.components,a=t.mdxType,s=t.originalType,n=t.parentName,c=l(t,["components","mdxType","originalType","parentName"]),m=g(r),b=a,f=m["".concat(n,".").concat(b)]||m[b]||h[b]||s;return r?o.createElement(f,i(i({ref:e},c),{},{components:r})):o.createElement(f,i({ref:e},c))}));function f(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var s=r.length,i=new Array(s);i[0]=b;var l={};for(var n in e)hasOwnProperty.call(e,n)&&(l[n]=e[n]);l.originalType=t,l[m]="string"==typeof t?t:a,i[1]=l;for(var g=2;g{r.r(e),r.d(e,{assets:()=>n,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var o=r(87462),a=(r(67294),r(3905));const s={title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},i=void 0,l={unversionedId:"README",id:"version-sqlite3_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/storage/sqlite3_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"ArangoDB",permalink:"/storage/sqlite3_v1.x.x/arangodb/"}},n={},g=[{value:"\ud83d\udcd1 Storage Implementations",id:"-storage-implementations",level:2}],c={toc:g},m="wrapper";function h(t){let{components:e,...r}=t;return(0,a.kt)(m,(0,o.Z)({},c,r,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",{align:"center"},(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only"}),(0,a.kt)("br",null),(0,a.kt)("h1",{id:"-storage"},"\ud83d\udce6 Storage"),(0,a.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/storage?tab=doc"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,a.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/storage"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,a.kt)("a",{href:"https://gofiber.io/discord"},(0,a.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,a.kt)("p",null,"Premade storage drivers that implement the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/blob/main/storage.go"},(0,a.kt)("inlineCode",{parentName:"a"},"Storage"))," interface, designed to be used with various ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware"},"Fiber middlewares"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Storage interface for communicating with different database/key-value\n// providers. Visit https://github.com/gofiber/storage for more info.\ntype Storage interface {\n // Get gets the value for the given key.\n // `nil, nil` is returned when the key does not exist\n Get(key string) ([]byte, error)\n\n // Set stores the given value for the given key along\n // with an expiration value, 0 means no expiration.\n // Empty key or value will be ignored without an error.\n Set(key string, val []byte, exp time.Duration) error\n\n // Delete deletes the value for the given key.\n // It returns no error if the storage does not contain the key,\n Delete(key string) error\n\n // Reset resets the storage and delete all keys.\n Reset() error\n\n // Close closes the storage and will stop any running garbage\n // collectors and open connections.\n Close() error\n}\n")),(0,a.kt)("h2",{id:"-storage-implementations"},"\ud83d\udcd1 Storage Implementations"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/arangodb/"},"ArangoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/azureblob/"},"AzureBlob")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/badger/"},"Badger")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"./bbolt"},"Bbolt")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/couchbase/"},"Couchbase")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/dynamodb/"},"DynamoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/etcd/"},"Etcd")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/memcache/"},"Memcache")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/memory/"},"Memory")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/mongodb/"},"MongoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/mssql/"},"MSSQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/mysql/"},"MySQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/pebble/"},"Pebble")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/postgres/"},"Postgres")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/redis/"},"Redis")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/s3/"},"S3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3_v1.x.x/sqlite3/"},"SQLite3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/247783bb.b20f80cc.js b/assets/js/247783bb.b20f80cc.js deleted file mode 100644 index c88d69708e1..00000000000 --- a/assets/js/247783bb.b20f80cc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9334],{3769:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/247783bb.dd0316d8.js b/assets/js/247783bb.dd0316d8.js new file mode 100644 index 00000000000..70a324219ba --- /dev/null +++ b/assets/js/247783bb.dd0316d8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9334],{83769:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/24847ea2.2672af45.js b/assets/js/24847ea2.2672af45.js deleted file mode 100644 index 8ede2832391..00000000000 --- a/assets/js/24847ea2.2672af45.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1105],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>f});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var i=r.createContext({}),s=function(e){var n=r.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):u(u({},n),e)),t},p=function(e){var n=s(e.components);return r.createElement(i.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=s(t),d=a,f=c["".concat(i,".").concat(d)]||c[d]||m[d]||o;return t?r.createElement(f,u(u({ref:n},p),{},{components:t})):r.createElement(f,u({ref:n},p))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,u=new Array(o);u[0]=d;var l={};for(var i in n)hasOwnProperty.call(n,i)&&(l[i]=n[i]);l.originalType=e,l[c]="string"==typeof e?e:a,u[1]=l;for(var s=2;s{t.d(n,{Z:()=>u});var r=t(7294),a=t(6010);const o={tabItem:"tabItem_Ymn6"};function u(e){let{children:n,hidden:t,className:u}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,u),hidden:t},n)}},4866:(e,n,t)=>{t.d(n,{Z:()=>N});var r=t(7462),a=t(7294),o=t(6010),u=t(2466),l=t(6550),i=t(1980),s=t(7392),p=t(12);function c(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:a}}=e;return{value:n,label:t,attributes:r,default:a}}))}function m(e){const{values:n,children:t}=e;return(0,a.useMemo)((()=>{const e=n??c(t);return function(e){const n=(0,s.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function d(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const r=(0,l.k6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i._X)(o),(0,a.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(r.location.search);n.set(o,e),r.replace({...r.location,search:n.toString()})}),[o,r])]}function g(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=m(e),[u,l]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:o}))),[i,s]=f({queryString:t,groupId:r}),[c,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,o]=(0,p.Nk)(t);return[r,(0,a.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:r}),h=(()=>{const e=i??c;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{h&&l(h)}),[h]);return{selectedValue:u,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),s(e),g(e)}),[s,g,o]),tabValues:o}}var h=t(2389);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function b(e){let{className:n,block:t,selectedValue:l,selectValue:i,tabValues:s}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,u.o5)(),m=e=>{const n=e.currentTarget,t=p.indexOf(n),r=s[t].value;r!==l&&(c(n),i(r))},d=e=>{let n=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const t=p.indexOf(e.currentTarget)+1;n=p[t]??p[0];break}case"ArrowLeft":{const t=p.indexOf(e.currentTarget)-1;n=p[t]??p[p.length-1];break}}n?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},n)},s.map((e=>{let{value:n,label:t,attributes:u}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,key:n,ref:e=>p.push(e),onKeyDown:d,onClick:m},u,{className:(0,o.Z)("tabs__item",k.tabItem,u?.className,{"tabs__item--active":l===n})}),t??n)})))}function O(e){let{lazy:n,children:t,selectedValue:r}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==r}))))}function v(e){const n=g(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",k.tabList)},a.createElement(b,(0,r.Z)({},e,n)),a.createElement(O,(0,r.Z)({},e,n)))}function N(e){const n=(0,h.Z)();return a.createElement(v,(0,r.Z)({key:String(n)},e))}},4330:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>i,default:()=>f,frontMatter:()=>l,metadata:()=>s,toc:()=>c});var r=t(7462),a=(t(7294),t(3905)),o=t(4866),u=t(5162);const l={id:"hooks",title:"\ud83e\ude9d Hooks",sidebar_position:6},i=void 0,s={unversionedId:"guide/hooks",id:"version-v2.x/guide/hooks",title:"\ud83e\ude9d Hooks",description:"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:",source:"@site/versioned_docs/version-v2.x/guide/hooks.md",sourceDirName:"guide",slug:"/guide/hooks",permalink:"/guide/hooks",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:6,frontMatter:{id:"hooks",title:"\ud83e\ude9d Hooks",sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udd0e Validation",permalink:"/guide/validation"},next:{title:"\u26a1 Make Fiber Faster",permalink:"/guide/faster-fiber"}},p={},c=[{value:"Constants",id:"constants",level:2},{value:"OnRoute",id:"onroute",level:2},{value:"OnName",id:"onname",level:2},{value:"OnGroup",id:"ongroup",level:2},{value:"OnGroupName",id:"ongroupname",level:2},{value:"OnListen",id:"onlisten",level:2},{value:"OnFork",id:"onfork",level:2},{value:"OnShutdown",id:"onshutdown",level:2},{value:"OnMount",id:"onmount",level:2}],m={toc:c},d="wrapper";function f(e){let{components:n,...t}=e;return(0,a.kt)(d,(0,r.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onroute"},"OnRoute")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onname"},"OnName")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#ongroup"},"OnGroup")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#ongroupname"},"OnGroupName")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onlisten"},"OnListen")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onfork"},"OnFork")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onshutdown"},"OnShutdown")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onmount"},"OnMount"))),(0,a.kt)("h2",{id:"constants"},"Constants"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Handlers define a function to create hooks for Fiber.\ntype OnRouteHandler = func(Route) error\ntype OnNameHandler = OnRouteHandler\ntype OnGroupHandler = func(Group) error\ntype OnGroupNameHandler = OnGroupHandler\ntype OnListenHandler = func() error\ntype OnForkHandler = func(int) error\ntype OnShutdownHandler = OnListenHandler\ntype OnMountHandler = func(*App) error\n")),(0,a.kt)("h2",{id:"onroute"},"OnRoute"),(0,a.kt)("p",null,"OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by ",(0,a.kt)("strong",{parentName:"p"},"route")," parameter."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnRoute(handler ...OnRouteHandler)\n")),(0,a.kt)("h2",{id:"onname"},"OnName"),(0,a.kt)("p",null,"OnName is a hook to execute user functions on each route naming. Also you can get route properties by ",(0,a.kt)("strong",{parentName:"p"},"route")," parameter."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnName only works with naming routes, not groups.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnName(handler ...OnNameHandler)\n")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"onname-example",label:"OnName Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n\n "github.com/gofiber/fiber/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("index")\n\n app.Hooks().OnName(func(r fiber.Route) error {\n fmt.Print("Name: " + r.Name + ", ")\n\n return nil\n })\n\n app.Hooks().OnName(func(r fiber.Route) error {\n fmt.Print("Method: " + r.Method + "\\n")\n\n return nil\n })\n\n app.Get("/add/user", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("addUser")\n\n app.Delete("/destroy/user", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("destroyUser")\n\n app.Listen(":5000")\n}\n\n// Results:\n// Name: addUser, Method: GET\n// Name: destroyUser, Method: DELETE\n')))),(0,a.kt)("h2",{id:"ongroup"},"OnGroup"),(0,a.kt)("p",null,"OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by ",(0,a.kt)("strong",{parentName:"p"},"group")," parameter."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnGroup(handler ...OnGroupHandler)\n")),(0,a.kt)("h2",{id:"ongroupname"},"OnGroupName"),(0,a.kt)("p",null,"OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by ",(0,a.kt)("strong",{parentName:"p"},"group")," parameter."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnGroupName only works with naming groups, not routes.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnGroupName(handler ...OnGroupNameHandler)\n")),(0,a.kt)("h2",{id:"onlisten"},"OnListen"),(0,a.kt)("p",null,"OnListen is a hook to execute user functions on Listen, ListenTLS, Listener."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnListen(handler ...OnListenHandler)\n")),(0,a.kt)("h2",{id:"onfork"},"OnFork"),(0,a.kt)("p",null,"OnFork is a hook to execute user functions on Fork."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnFork(handler ...OnForkHandler)\n")),(0,a.kt)("h2",{id:"onshutdown"},"OnShutdown"),(0,a.kt)("p",null,"OnShutdown is a hook to execute user functions after Shutdown."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnShutdown(handler ...OnShutdownHandler)\n")),(0,a.kt)("h2",{id:"onmount"},"OnMount"),(0,a.kt)("p",null,"OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (h *Hooks) OnMount(handler ...OnMountHandler) \n")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"onmount-example",label:"OnMount Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n\n "github.com/gofiber/fiber/v2"\n)\n\nfunc main() {\n app := New()\n app.Get("/", testSimpleHandler).Name("x")\n\n subApp := New()\n subApp.Get("/test", testSimpleHandler)\n\n subApp.Hooks().OnMount(func(parent *fiber.App) error {\n fmt.Print("Mount path of parent app: "+parent.MountPath())\n // ...\n\n return nil\n })\n\n app.Mount("/sub", subApp)\n}\n\n// Result:\n// Mount path of parent app: \n')))),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/24847ea2.6f344d66.js b/assets/js/24847ea2.6f344d66.js new file mode 100644 index 00000000000..71d2ec6adf4 --- /dev/null +++ b/assets/js/24847ea2.6f344d66.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1105],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>f});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var i=r.createContext({}),s=function(e){var n=r.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):u(u({},n),e)),t},p=function(e){var n=s(e.components);return r.createElement(i.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=s(t),d=a,f=c["".concat(i,".").concat(d)]||c[d]||m[d]||o;return t?r.createElement(f,u(u({ref:n},p),{},{components:t})):r.createElement(f,u({ref:n},p))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,u=new Array(o);u[0]=d;var l={};for(var i in n)hasOwnProperty.call(n,i)&&(l[i]=n[i]);l.originalType=e,l[c]="string"==typeof e?e:a,u[1]=l;for(var s=2;s{t.d(n,{Z:()=>u});var r=t(67294),a=t(86010);const o={tabItem:"tabItem_Ymn6"};function u(e){let{children:n,hidden:t,className:u}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,u),hidden:t},n)}},74866:(e,n,t)=>{t.d(n,{Z:()=>N});var r=t(87462),a=t(67294),o=t(86010),u=t(12466),l=t(16550),i=t(91980),s=t(67392),p=t(50012);function c(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:a}}=e;return{value:n,label:t,attributes:r,default:a}}))}function m(e){const{values:n,children:t}=e;return(0,a.useMemo)((()=>{const e=n??c(t);return function(e){const n=(0,s.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function d(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const r=(0,l.k6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i._X)(o),(0,a.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(r.location.search);n.set(o,e),r.replace({...r.location,search:n.toString()})}),[o,r])]}function g(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=m(e),[u,l]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:o}))),[i,s]=f({queryString:t,groupId:r}),[c,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,o]=(0,p.Nk)(t);return[r,(0,a.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:r}),h=(()=>{const e=i??c;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{h&&l(h)}),[h]);return{selectedValue:u,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),s(e),g(e)}),[s,g,o]),tabValues:o}}var h=t(72389);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function b(e){let{className:n,block:t,selectedValue:l,selectValue:i,tabValues:s}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,u.o5)(),m=e=>{const n=e.currentTarget,t=p.indexOf(n),r=s[t].value;r!==l&&(c(n),i(r))},d=e=>{let n=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const t=p.indexOf(e.currentTarget)+1;n=p[t]??p[0];break}case"ArrowLeft":{const t=p.indexOf(e.currentTarget)-1;n=p[t]??p[p.length-1];break}}n?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},n)},s.map((e=>{let{value:n,label:t,attributes:u}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,key:n,ref:e=>p.push(e),onKeyDown:d,onClick:m},u,{className:(0,o.Z)("tabs__item",k.tabItem,u?.className,{"tabs__item--active":l===n})}),t??n)})))}function O(e){let{lazy:n,children:t,selectedValue:r}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==r}))))}function v(e){const n=g(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",k.tabList)},a.createElement(b,(0,r.Z)({},e,n)),a.createElement(O,(0,r.Z)({},e,n)))}function N(e){const n=(0,h.Z)();return a.createElement(v,(0,r.Z)({key:String(n)},e))}},74330:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>i,default:()=>f,frontMatter:()=>l,metadata:()=>s,toc:()=>c});var r=t(87462),a=(t(67294),t(3905)),o=t(74866),u=t(85162);const l={id:"hooks",title:"\ud83e\ude9d Hooks",sidebar_position:6},i=void 0,s={unversionedId:"guide/hooks",id:"version-v2.x/guide/hooks",title:"\ud83e\ude9d Hooks",description:"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:",source:"@site/versioned_docs/version-v2.x/guide/hooks.md",sourceDirName:"guide",slug:"/guide/hooks",permalink:"/guide/hooks",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:6,frontMatter:{id:"hooks",title:"\ud83e\ude9d Hooks",sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udd0e Validation",permalink:"/guide/validation"},next:{title:"\u26a1 Make Fiber Faster",permalink:"/guide/faster-fiber"}},p={},c=[{value:"Constants",id:"constants",level:2},{value:"OnRoute",id:"onroute",level:2},{value:"OnName",id:"onname",level:2},{value:"OnGroup",id:"ongroup",level:2},{value:"OnGroupName",id:"ongroupname",level:2},{value:"OnListen",id:"onlisten",level:2},{value:"OnFork",id:"onfork",level:2},{value:"OnShutdown",id:"onshutdown",level:2},{value:"OnMount",id:"onmount",level:2}],m={toc:c},d="wrapper";function f(e){let{components:n,...t}=e;return(0,a.kt)(d,(0,r.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onroute"},"OnRoute")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onname"},"OnName")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#ongroup"},"OnGroup")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#ongroupname"},"OnGroupName")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onlisten"},"OnListen")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onfork"},"OnFork")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onshutdown"},"OnShutdown")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onmount"},"OnMount"))),(0,a.kt)("h2",{id:"constants"},"Constants"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Handlers define a function to create hooks for Fiber.\ntype OnRouteHandler = func(Route) error\ntype OnNameHandler = OnRouteHandler\ntype OnGroupHandler = func(Group) error\ntype OnGroupNameHandler = OnGroupHandler\ntype OnListenHandler = func() error\ntype OnForkHandler = func(int) error\ntype OnShutdownHandler = OnListenHandler\ntype OnMountHandler = func(*App) error\n")),(0,a.kt)("h2",{id:"onroute"},"OnRoute"),(0,a.kt)("p",null,"OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by ",(0,a.kt)("strong",{parentName:"p"},"route")," parameter."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnRoute(handler ...OnRouteHandler)\n")),(0,a.kt)("h2",{id:"onname"},"OnName"),(0,a.kt)("p",null,"OnName is a hook to execute user functions on each route naming. Also you can get route properties by ",(0,a.kt)("strong",{parentName:"p"},"route")," parameter."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnName only works with naming routes, not groups.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnName(handler ...OnNameHandler)\n")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"onname-example",label:"OnName Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n\n "github.com/gofiber/fiber/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("index")\n\n app.Hooks().OnName(func(r fiber.Route) error {\n fmt.Print("Name: " + r.Name + ", ")\n\n return nil\n })\n\n app.Hooks().OnName(func(r fiber.Route) error {\n fmt.Print("Method: " + r.Method + "\\n")\n\n return nil\n })\n\n app.Get("/add/user", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("addUser")\n\n app.Delete("/destroy/user", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("destroyUser")\n\n app.Listen(":5000")\n}\n\n// Results:\n// Name: addUser, Method: GET\n// Name: destroyUser, Method: DELETE\n')))),(0,a.kt)("h2",{id:"ongroup"},"OnGroup"),(0,a.kt)("p",null,"OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by ",(0,a.kt)("strong",{parentName:"p"},"group")," parameter."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnGroup(handler ...OnGroupHandler)\n")),(0,a.kt)("h2",{id:"ongroupname"},"OnGroupName"),(0,a.kt)("p",null,"OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by ",(0,a.kt)("strong",{parentName:"p"},"group")," parameter."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnGroupName only works with naming groups, not routes.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnGroupName(handler ...OnGroupNameHandler)\n")),(0,a.kt)("h2",{id:"onlisten"},"OnListen"),(0,a.kt)("p",null,"OnListen is a hook to execute user functions on Listen, ListenTLS, Listener."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnListen(handler ...OnListenHandler)\n")),(0,a.kt)("h2",{id:"onfork"},"OnFork"),(0,a.kt)("p",null,"OnFork is a hook to execute user functions on Fork."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnFork(handler ...OnForkHandler)\n")),(0,a.kt)("h2",{id:"onshutdown"},"OnShutdown"),(0,a.kt)("p",null,"OnShutdown is a hook to execute user functions after Shutdown."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnShutdown(handler ...OnShutdownHandler)\n")),(0,a.kt)("h2",{id:"onmount"},"OnMount"),(0,a.kt)("p",null,"OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (h *Hooks) OnMount(handler ...OnMountHandler) \n")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"onmount-example",label:"OnMount Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n\n "github.com/gofiber/fiber/v2"\n)\n\nfunc main() {\n app := New()\n app.Get("/", testSimpleHandler).Name("x")\n\n subApp := New()\n subApp.Get("/test", testSimpleHandler)\n\n subApp.Hooks().OnMount(func(parent *fiber.App) error {\n fmt.Print("Mount path of parent app: "+parent.MountPath())\n // ...\n\n return nil\n })\n\n app.Mount("/sub", subApp)\n}\n\n// Result:\n// Mount path of parent app: \n')))),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/25e4f0d4.4a790ac6.js b/assets/js/25e4f0d4.4a790ac6.js deleted file mode 100644 index 8b4f497ee41..00000000000 --- a/assets/js/25e4f0d4.4a790ac6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7542],{3905:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>f});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function o(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},m=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),p=c(r),g=n,f=p["".concat(s,".").concat(g)]||p[g]||u[g]||i;return r?a.createElement(f,o(o({ref:t},m),{},{components:r})):a.createElement(f,o({ref:t},m))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,o=new Array(i);o[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,o[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var a=r(7462),n=(r(7294),r(3905));const i={id:"memcache",title:"Memcache"},o=void 0,l={unversionedId:"memcache/memcache",id:"version-sqlite3_v1.x.x/memcache/memcache",title:"Memcache",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/memcache/README.md",sourceDirName:"memcache",slug:"/memcache/",permalink:"/storage/sqlite3_v1.x.x/memcache/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memcache/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memcache",title:"Memcache"},sidebar:"tutorialSidebar",previous:{title:"Etcd",permalink:"/storage/sqlite3_v1.x.x/etcd/"},next:{title:"Memory",permalink:"/storage/sqlite3_v1.x.x/memory/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],m={toc:c},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memcache*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?label=Tests",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,n.kt)("p",null,"A Memcache storage driver using ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/bradfitz/gomemcache"},(0,n.kt)("inlineCode",{parentName:"a"},"bradfitz/gomemcache")),"."),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mc.Client\n")),(0,n.kt)("h3",{id:"installation"},"Installation"),(0,n.kt)("p",null,"Memory is tested on the 2 last ",(0,n.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,n.kt)("p",null,"And then install the memory implementation:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the storage package."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memcache"\n')),(0,n.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := memcache.New()\n\n// Initialize custom config\nstore := memcache.New(memcache.Config{\n Servers: "localhost:11211",\n})\n')),(0,n.kt)("h3",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Server list divided by ,\n // i.e. server1:11211, server2:11212\n //\n // Optional. Default is "127.0.0.1:11211"\n Servers string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Servers: "127.0.0.1:11211",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/25e4f0d4.b78e3c44.js b/assets/js/25e4f0d4.b78e3c44.js new file mode 100644 index 00000000000..47d6e94a5c5 --- /dev/null +++ b/assets/js/25e4f0d4.b78e3c44.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7542],{3905:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>f});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function o(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},m=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),p=c(r),g=n,f=p["".concat(s,".").concat(g)]||p[g]||u[g]||i;return r?a.createElement(f,o(o({ref:t},m),{},{components:r})):a.createElement(f,o({ref:t},m))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,o=new Array(i);o[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,o[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var a=r(87462),n=(r(67294),r(3905));const i={id:"memcache",title:"Memcache"},o=void 0,l={unversionedId:"memcache/memcache",id:"version-sqlite3_v1.x.x/memcache/memcache",title:"Memcache",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/memcache/README.md",sourceDirName:"memcache",slug:"/memcache/",permalink:"/storage/sqlite3_v1.x.x/memcache/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memcache/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memcache",title:"Memcache"},sidebar:"tutorialSidebar",previous:{title:"Etcd",permalink:"/storage/sqlite3_v1.x.x/etcd/"},next:{title:"Memory",permalink:"/storage/sqlite3_v1.x.x/memory/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],m={toc:c},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memcache*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?label=Tests",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,n.kt)("p",null,"A Memcache storage driver using ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/bradfitz/gomemcache"},(0,n.kt)("inlineCode",{parentName:"a"},"bradfitz/gomemcache")),"."),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mc.Client\n")),(0,n.kt)("h3",{id:"installation"},"Installation"),(0,n.kt)("p",null,"Memory is tested on the 2 last ",(0,n.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,n.kt)("p",null,"And then install the memory implementation:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the storage package."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memcache"\n')),(0,n.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := memcache.New()\n\n// Initialize custom config\nstore := memcache.New(memcache.Config{\n Servers: "localhost:11211",\n})\n')),(0,n.kt)("h3",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Server list divided by ,\n // i.e. server1:11211, server2:11212\n //\n // Optional. Default is "127.0.0.1:11211"\n Servers string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Servers: "127.0.0.1:11211",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/26257c43.854f03bd.js b/assets/js/26257c43.854f03bd.js deleted file mode 100644 index da9b8c120c7..00000000000 --- a/assets/js/26257c43.854f03bd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5890],{3905:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>f});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},u=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(t),u=o,f=d["".concat(s,".").concat(u)]||d[u]||m[u]||a;return t?r.createElement(f,i(i({ref:n},c),{},{components:t})):r.createElement(f,i({ref:n},c))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=u;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[d]="string"==typeof e?e:o,i[1]=l;for(var p=2;p{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=t(7462),o=(t(7294),t(3905));const a={id:"compress",title:"Compress"},i=void 0,l={unversionedId:"api/middleware/compress",id:"version-v2.x/api/middleware/compress",title:"Compress",description:"Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.",source:"@site/versioned_docs/version-v2.x/api/middleware/compress.md",sourceDirName:"api/middleware",slug:"/api/middleware/compress",permalink:"/api/middleware/compress",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"compress",title:"Compress"},sidebar:"tutorialSidebar",previous:{title:"Cache",permalink:"/api/middleware/cache"},next:{title:"CORS",permalink:"/api/middleware/cors"}},s={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2},{value:"Constants",id:"constants",level:2}],c={toc:p},d="wrapper";function m(e){let{components:n,...t}=e;return(0,o.kt)(d,(0,r.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Compression middleware for ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that will compress the response using ",(0,o.kt)("inlineCode",{parentName:"p"},"gzip"),", ",(0,o.kt)("inlineCode",{parentName:"p"},"deflate")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"brotli")," compression depending on the ",(0,o.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding"},"Accept-Encoding")," header."),(0,o.kt)("h2",{id:"signatures"},"Signatures"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,o.kt)("h2",{id:"examples"},"Examples"),(0,o.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/compress"\n)\n')),(0,o.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(compress.New())\n\n// Or extend your config for customization\napp.Use(compress.New(compress.Config{\n Level: compress.LevelBestSpeed, // 1\n}))\n\n// Skip middleware for specific routes\napp.Use(compress.New(compress.Config{\n Next: func(c *fiber.Ctx) bool {\n return c.Path() == "/dont_compress"\n },\n Level: compress.LevelBestSpeed, // 1\n}))\n')),(0,o.kt)("h2",{id:"config"},"Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Level determines the compression algoritm\n //\n // Optional. Default: LevelDefault\n // LevelDisabled: -1\n // LevelDefault: 0\n // LevelBestSpeed: 1\n // LevelBestCompression: 2\n Level int\n}\n")),(0,o.kt)("h2",{id:"default-config"},"Default Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n Level: LevelDefault,\n}\n")),(0,o.kt)("h2",{id:"constants"},"Constants"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"// Compression levels\nconst (\n LevelDisabled = -1\n LevelDefault = 0\n LevelBestSpeed = 1\n LevelBestCompression = 2\n)\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/26257c43.c73d191b.js b/assets/js/26257c43.c73d191b.js new file mode 100644 index 00000000000..3a7d5a4d58a --- /dev/null +++ b/assets/js/26257c43.c73d191b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5890],{3905:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>f});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},u=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(t),u=o,f=d["".concat(s,".").concat(u)]||d[u]||m[u]||a;return t?r.createElement(f,i(i({ref:n},c),{},{components:t})):r.createElement(f,i({ref:n},c))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=u;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[d]="string"==typeof e?e:o,i[1]=l;for(var p=2;p{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=t(87462),o=(t(67294),t(3905));const a={id:"compress",title:"Compress"},i=void 0,l={unversionedId:"api/middleware/compress",id:"version-v2.x/api/middleware/compress",title:"Compress",description:"Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.",source:"@site/versioned_docs/version-v2.x/api/middleware/compress.md",sourceDirName:"api/middleware",slug:"/api/middleware/compress",permalink:"/api/middleware/compress",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"compress",title:"Compress"},sidebar:"tutorialSidebar",previous:{title:"Cache",permalink:"/api/middleware/cache"},next:{title:"CORS",permalink:"/api/middleware/cors"}},s={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2},{value:"Constants",id:"constants",level:2}],c={toc:p},d="wrapper";function m(e){let{components:n,...t}=e;return(0,o.kt)(d,(0,r.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Compression middleware for ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that will compress the response using ",(0,o.kt)("inlineCode",{parentName:"p"},"gzip"),", ",(0,o.kt)("inlineCode",{parentName:"p"},"deflate")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"brotli")," compression depending on the ",(0,o.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding"},"Accept-Encoding")," header."),(0,o.kt)("h2",{id:"signatures"},"Signatures"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,o.kt)("h2",{id:"examples"},"Examples"),(0,o.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/compress"\n)\n')),(0,o.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(compress.New())\n\n// Or extend your config for customization\napp.Use(compress.New(compress.Config{\n Level: compress.LevelBestSpeed, // 1\n}))\n\n// Skip middleware for specific routes\napp.Use(compress.New(compress.Config{\n Next: func(c *fiber.Ctx) bool {\n return c.Path() == "/dont_compress"\n },\n Level: compress.LevelBestSpeed, // 1\n}))\n')),(0,o.kt)("h2",{id:"config"},"Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Level determines the compression algoritm\n //\n // Optional. Default: LevelDefault\n // LevelDisabled: -1\n // LevelDefault: 0\n // LevelBestSpeed: 1\n // LevelBestCompression: 2\n Level int\n}\n")),(0,o.kt)("h2",{id:"default-config"},"Default Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n Level: LevelDefault,\n}\n")),(0,o.kt)("h2",{id:"constants"},"Constants"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"// Compression levels\nconst (\n LevelDisabled = -1\n LevelDefault = 0\n LevelBestSpeed = 1\n LevelBestCompression = 2\n)\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2675a52a.4b682ac3.js b/assets/js/2675a52a.4b682ac3.js new file mode 100644 index 00000000000..dbe31b9cbaa --- /dev/null +++ b/assets/js/2675a52a.4b682ac3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9478],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),c=u(r),g=o,m=c["".concat(l,".").concat(g)]||c[g]||f[g]||a;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=g;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:o,i[1]=s;for(var u=2;u{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>s,toc:()=>u});var n=r(87462),o=(r(67294),r(3905));const a={id:"ristretto",title:"Ristretto"},i=void 0,s={unversionedId:"ristretto/ristretto",id:"version-bbolt_v1.x.x/ristretto/ristretto",title:"Ristretto",description:"Release",source:"@site/storage_versioned_docs/version-bbolt_v1.x.x/ristretto/README.md",sourceDirName:"ristretto",slug:"/ristretto/",permalink:"/storage/ristretto/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/ristretto/README.md",tags:[],version:"bbolt_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"ristretto",title:"Ristretto"},sidebar:"tutorialSidebar",previous:{title:"Redis",permalink:"/storage/redis/"},next:{title:"S3",permalink:"/storage/s3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:u},c="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=ristretto*",alt:"Release"}),"\n",(0,o.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-ristretto.yml?label=Tests",alt:"Test"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,o.kt)("p",null,"A Memory-bound storage driver using ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/dgraph-io/ristretto"},(0,o.kt)("inlineCode",{parentName:"a"},"dgraph-io/ristretto")),"."),(0,o.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,o.kt)("h3",{id:"signatures"},"Signatures"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *ristretto.Cache\n")),(0,o.kt)("h3",{id:"installation"},"Installation"),(0,o.kt)("p",null,"Ristretto is tested on the 2 last ",(0,o.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,o.kt)("p",null,"And then install the ristretto implementation:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/ristretto\n")),(0,o.kt)("h3",{id:"examples"},"Examples"),(0,o.kt)("p",null,"Import the storage package."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/ristretto"\n')),(0,o.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := ristretto.New()\n\n// Initialize custom config\nstore := ristretto.New(ristretto.Config{\n NumCounters: 1e7, // number of keys to track frequency of (10M).\n MaxCost: 1 << 30, // maximum cost of cache (1GB).\n BufferItems: 64, // number of keys per Get buffer.\n})\n")),(0,o.kt)("h3",{id:"config"},"Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // NumCounters number of keys to track frequency of (10M).\n NumCounters int64\n\n // MaxCost maximum cost of cache (1GB).\n MaxCost int64\n\n // BufferItems number of keys per Get buffer.\n BufferItems int64\n}\n")),(0,o.kt)("h3",{id:"default-config"},"Default Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n NumCounters: 1e7,\n MaxCost: 1 << 30,\n BufferItems: 64,\n DefaultCost: 1,\n}\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/27998293.139f1302.js b/assets/js/27998293.139f1302.js new file mode 100644 index 00000000000..5af391d48ea --- /dev/null +++ b/assets/js/27998293.139f1302.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2952],{3905:(t,e,r)=>{r.d(e,{Zo:()=>b,kt:()=>g});var i=r(67294);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function a(t){for(var e=1;e=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var l=i.createContext({}),c=function(t){var e=i.useContext(l),r=e;return t&&(r="function"==typeof t?t(e):a(a({},e),t)),r},b=function(t){var e=c(t.components);return i.createElement(l.Provider,{value:e},t.children)},f="mdxType",m={inlineCode:"code",wrapper:function(t){var e=t.children;return i.createElement(i.Fragment,{},e)}},p=i.forwardRef((function(t,e){var r=t.components,o=t.mdxType,n=t.originalType,l=t.parentName,b=s(t,["components","mdxType","originalType","parentName"]),f=c(r),p=o,g=f["".concat(l,".").concat(p)]||f[p]||m[p]||n;return r?i.createElement(g,a(a({ref:e},b),{},{components:r})):i.createElement(g,a({ref:e},b))}));function g(t,e){var r=arguments,o=e&&e.mdxType;if("string"==typeof t||o){var n=r.length,a=new Array(n);a[0]=p;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s[f]="string"==typeof t?t:o,a[1]=s;for(var c=2;c{r.r(e),r.d(e,{assets:()=>l,contentTitle:()=>a,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>c});var i=r(87462),o=(r(67294),r(3905));const n={title:"\ud83d\udc4b Welcome",sidebar_position:1},a=void 0,s={unversionedId:"README",id:"version-fibersentry_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"Discord",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/contrib/fibersentry_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"Casbin",permalink:"/contrib/fibersentry_v1.x.x/casbin/"}},l={},c=[{value:"\ud83d\udcd1 Middleware Implementations",id:"-middleware-implementations",level:2}],b={toc:c},f="wrapper";function m(t){let{components:e,...r}=t;return(0,o.kt)(f,(0,i.Z)({},b,r,{components:e,mdxType:"MDXLayout"}),(0,o.kt)("p",{align:"center"},(0,o.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/contrib/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,o.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/contrib/master/.github/logo.svg#gh-light-mode-only"}),(0,o.kt)("br",null),(0,o.kt)("h1",{id:"contrib"},"Contrib"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,o.kt)("p",null,"Repository for third party middlewares with dependencies.")),(0,o.kt)("h2",{id:"-middleware-implementations"},"\ud83d\udcd1 Middleware Implementations"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/casbin/"},"Casbin")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/fiberi18n/"},"Fiberi18n")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/fibersentry/"},"Fibersentry")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/fiberzap/"},"Fiberzap")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/fiberzerolog/"},"Fiberzerolog")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/jwt/"},"JWT")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/fibernewrelic/"},"NewRelic")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/opafiber/"},"Open Policy Agent")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/otelfiber/"},"Otelfiber (OpenTelemetry)")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/paseto/"},"Paseto")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/swagger/"},"Swagger")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/websocket/"},"Websocket")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/27998293.f43a25c2.js b/assets/js/27998293.f43a25c2.js deleted file mode 100644 index de03a4b26d7..00000000000 --- a/assets/js/27998293.f43a25c2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2952],{3905:(t,e,r)=>{r.d(e,{Zo:()=>b,kt:()=>g});var i=r(7294);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function a(t){for(var e=1;e=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var l=i.createContext({}),c=function(t){var e=i.useContext(l),r=e;return t&&(r="function"==typeof t?t(e):a(a({},e),t)),r},b=function(t){var e=c(t.components);return i.createElement(l.Provider,{value:e},t.children)},f="mdxType",m={inlineCode:"code",wrapper:function(t){var e=t.children;return i.createElement(i.Fragment,{},e)}},p=i.forwardRef((function(t,e){var r=t.components,o=t.mdxType,n=t.originalType,l=t.parentName,b=s(t,["components","mdxType","originalType","parentName"]),f=c(r),p=o,g=f["".concat(l,".").concat(p)]||f[p]||m[p]||n;return r?i.createElement(g,a(a({ref:e},b),{},{components:r})):i.createElement(g,a({ref:e},b))}));function g(t,e){var r=arguments,o=e&&e.mdxType;if("string"==typeof t||o){var n=r.length,a=new Array(n);a[0]=p;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s[f]="string"==typeof t?t:o,a[1]=s;for(var c=2;c{r.r(e),r.d(e,{assets:()=>l,contentTitle:()=>a,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>c});var i=r(7462),o=(r(7294),r(3905));const n={title:"\ud83d\udc4b Welcome",sidebar_position:1},a=void 0,s={unversionedId:"README",id:"version-fibersentry_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"Discord",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/contrib/fibersentry_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"Casbin",permalink:"/contrib/fibersentry_v1.x.x/casbin/"}},l={},c=[{value:"\ud83d\udcd1 Middleware Implementations",id:"-middleware-implementations",level:2}],b={toc:c},f="wrapper";function m(t){let{components:e,...r}=t;return(0,o.kt)(f,(0,i.Z)({},b,r,{components:e,mdxType:"MDXLayout"}),(0,o.kt)("p",{align:"center"},(0,o.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/contrib/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,o.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/contrib/master/.github/logo.svg#gh-light-mode-only"}),(0,o.kt)("br",null),(0,o.kt)("h1",{id:"contrib"},"Contrib"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,o.kt)("p",null,"Repository for third party middlewares with dependencies.")),(0,o.kt)("h2",{id:"-middleware-implementations"},"\ud83d\udcd1 Middleware Implementations"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/casbin/"},"Casbin")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/fiberi18n/"},"Fiberi18n")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/fibersentry/"},"Fibersentry")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/fiberzap/"},"Fiberzap")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/fiberzerolog/"},"Fiberzerolog")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/jwt/"},"JWT")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/fibernewrelic/"},"NewRelic")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/opafiber/"},"Open Policy Agent")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/otelfiber/"},"Otelfiber (OpenTelemetry)")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/paseto/"},"Paseto")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/swagger/"},"Swagger")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry_v1.x.x/websocket/"},"Websocket")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2804f106.3b7091f2.js b/assets/js/2804f106.3b7091f2.js new file mode 100644 index 00000000000..d199f157a8f --- /dev/null +++ b/assets/js/2804f106.3b7091f2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5675],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>d});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),u=s(n),g=r,d=u["".concat(p,".").concat(g)]||u[g]||c[g]||l;return n?a.createElement(d,i(i({ref:t},m),{},{components:n})):a.createElement(d,i({ref:t},m))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=g;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:r,i[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>c,frontMatter:()=>l,metadata:()=>o,toc:()=>s});var a=n(87462),r=(n(67294),n(3905));const l={id:"ctx",title:"\ud83e\udde0 Ctx",description:"The Ctx struct represents the Context which hold the HTTP request and response. It has methods for the request query string, parameters, body, HTTP headers, and so on.",sidebar_position:3},i=void 0,o={unversionedId:"api/ctx",id:"api/ctx",title:"\ud83e\udde0 Ctx",description:"The Ctx struct represents the Context which hold the HTTP request and response. It has methods for the request query string, parameters, body, HTTP headers, and so on.",source:"@site/docs/core/api/ctx.md",sourceDirName:"api",slug:"/api/ctx",permalink:"/next/api/ctx",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/ctx.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:3,frontMatter:{id:"ctx",title:"\ud83e\udde0 Ctx",description:"The Ctx struct represents the Context which hold the HTTP request and response. It has methods for the request query string, parameters, body, HTTP headers, and so on.",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"\ud83d\ude80 App",permalink:"/next/api/app"},next:{title:"\ud83d\udccb Constants",permalink:"/next/api/constants"}},p={},s=[{value:"Accepts",id:"accepts",level:2},{value:"AllParams",id:"allparams",level:2},{value:"App",id:"app",level:2},{value:"Append",id:"append",level:2},{value:"Attachment",id:"attachment",level:2},{value:"BaseURL",id:"baseurl",level:2},{value:"Bind",id:"bind",level:2},{value:"Body",id:"body",level:2},{value:"BodyParser",id:"bodyparser",level:2},{value:"ClearCookie",id:"clearcookie",level:2},{value:"ClientHelloInfo",id:"clienthelloinfo",level:2},{value:"Context",id:"context",level:2},{value:"Cookie",id:"cookie",level:2},{value:"Cookies",id:"cookies",level:2},{value:"Download",id:"download",level:2},{value:"Format",id:"format",level:2},{value:"FormFile",id:"formfile",level:2},{value:"FormValue",id:"formvalue",level:2},{value:"Fresh",id:"fresh",level:2},{value:"Get",id:"get",level:2},{value:"GetReqHeaders",id:"getreqheaders",level:2},{value:"GetRespHeader",id:"getrespheader",level:2},{value:"GetRespHeaders",id:"getrespheaders",level:2},{value:"GetRouteURL",id:"getrouteurl",level:2},{value:"Hostname",id:"hostname",level:2},{value:"IP",id:"ip",level:2},{value:"IPs",id:"ips",level:2},{value:"Is",id:"is",level:2},{value:"IsFromLocal",id:"isfromlocal",level:2},{value:"JSON",id:"json",level:2},{value:"JSONP",id:"jsonp",level:2},{value:"Links",id:"links",level:2},{value:"Locals",id:"locals",level:2},{value:"Location",id:"location",level:2},{value:"Method",id:"method",level:2},{value:"MultipartForm",id:"multipartform",level:2},{value:"Next",id:"next",level:2},{value:"OriginalURL",id:"originalurl",level:2},{value:"Params",id:"params",level:2},{value:"ParamsInt",id:"paramsint",level:2},{value:"ParamsParser",id:"paramsparser",level:2},{value:"Path",id:"path",level:2},{value:"Protocol",id:"protocol",level:2},{value:"Queries",id:"queries",level:2},{value:"Query",id:"query",level:2},{value:"QueryBool",id:"querybool",level:2},{value:"QueryFloat",id:"queryfloat",level:2},{value:"QueryInt",id:"queryint",level:2},{value:"QueryParser",id:"queryparser",level:2},{value:"Range",id:"range",level:2},{value:"Redirect",id:"redirect",level:2},{value:"RedirectToRoute",id:"redirecttoroute",level:2},{value:"RedirectBack",id:"redirectback",level:2},{value:"Render",id:"render",level:2},{value:"Request",id:"request",level:2},{value:"ReqHeaderParser",id:"reqheaderparser",level:2},{value:"Response",id:"response",level:2},{value:"RestartRouting",id:"restartrouting",level:2},{value:"Route",id:"route",level:2},{value:"SaveFile",id:"savefile",level:2},{value:"SaveFileToStorage",id:"savefiletostorage",level:2},{value:"Secure",id:"secure",level:2},{value:"Send",id:"send",level:2},{value:"SendFile",id:"sendfile",level:2},{value:"SendStatus",id:"sendstatus",level:2},{value:"Set",id:"set",level:2},{value:"SetParserDecoder",id:"setparserdecoder",level:2},{value:"SetUserContext",id:"setusercontext",level:2},{value:"Stale",id:"stale",level:2},{value:"Status",id:"status",level:2},{value:"Subdomains",id:"subdomains",level:2},{value:"Type",id:"type",level:2},{value:"UserContext",id:"usercontext",level:2},{value:"Vary",id:"vary",level:2},{value:"Write",id:"write",level:2},{value:"Writef",id:"writef",level:2},{value:"WriteString",id:"writestring",level:2},{value:"XHR",id:"xhr",level:2},{value:"XML",id:"xml",level:2}],m={toc:s},u="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"accepts"},"Accepts"),(0,r.kt)("p",null,"Checks, if the specified ",(0,r.kt)("strong",{parentName:"p"},"extensions")," or ",(0,r.kt)("strong",{parentName:"p"},"content")," ",(0,r.kt)("strong",{parentName:"p"},"types")," are acceptable."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Based on the request\u2019s ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept"},"Accept")," HTTP header.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Accepts(offers ...string) string\nfunc (c *Ctx) AcceptsCharsets(offers ...string) string\nfunc (c *Ctx) AcceptsEncodings(offers ...string) string\nfunc (c *Ctx) AcceptsLanguages(offers ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Accept: text/html, application/json; q=0.8, text/plain; q=0.5; charset="utf-8"\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Accepts("html") // "html"\n c.Accepts("text/html") // "text/html"\n c.Accepts("json", "text") // "json"\n c.Accepts("application/json") // "application/json"\n c.Accepts("text/plain", "application/json") // "application/json", due to quality\n c.Accepts("image/png") // ""\n c.Accepts("png") // ""\n // ...\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example 2"',title:'"Example','2"':!0},'// Accept: text/html, text/*, application/json, */*; q=0\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Accepts("text/plain", "application/json") // "application/json", due to specificity\n c.Accepts("application/json", "text/html") // "text/html", due to first match\n c.Accepts("image/png") // "", due to */* without q factor 0 is Not Acceptable\n // ...\n})\n')),(0,r.kt)("p",null,"Fiber provides similar functions for the other accept headers."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Accept-Charset: utf-8, iso-8859-1;q=0.2\n// Accept-Encoding: gzip, compress;q=0.2\n// Accept-Language: en;q=0.8, nl, ru\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.AcceptsCharsets("utf-16", "iso-8859-1") \n // "iso-8859-1"\n\n c.AcceptsEncodings("compress", "br") \n // "compress"\n\n c.AcceptsLanguages("pt", "nl", "ru") \n // "nl"\n // ...\n})\n')),(0,r.kt)("h2",{id:"allparams"},"AllParams"),(0,r.kt)("p",null,"Params is used to get all route parameters.\nUsing Params method to get params."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) AllParams() map[string]string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/user/fenny\napp.Get("/user/:name", func(c *fiber.Ctx) error {\n c.AllParams() // "{"name": "fenny"}"\n\n // ...\n})\n\n// GET http://example.com/user/fenny/123\napp.Get("/user/*", func(c *fiber.Ctx) error {\n c.AllParams() // "{"*1": "fenny/123"}"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"app"},"App"),(0,r.kt)("p",null,"Returns the ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},"*","App")," reference so you could easily access all application settings."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) App() *App\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/stack", func(c *fiber.Ctx) error {\n return c.JSON(c.App().Stack())\n})\n')),(0,r.kt)("h2",{id:"append"},"Append"),(0,r.kt)("p",null,"Appends the specified ",(0,r.kt)("strong",{parentName:"p"},"value")," to the HTTP response header field."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"If the header is ",(0,r.kt)("strong",{parentName:"p"},"not")," already set, it creates the header with the specified value.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Append(field string, values ...string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Append("Link", "http://google.com", "http://localhost")\n // => Link: http://localhost, http://google.com\n\n c.Append("Link", "Test")\n // => Link: http://localhost, http://google.com, Test\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"attachment"},"Attachment"),(0,r.kt)("p",null,"Sets the HTTP response ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition"},"Content-Disposition")," header field to ",(0,r.kt)("inlineCode",{parentName:"p"},"attachment"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Attachment(filename ...string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Attachment()\n // => Content-Disposition: attachment\n\n c.Attachment("./upload/images/logo.png")\n // => Content-Disposition: attachment; filename="logo.png"\n // => Content-Type: image/png\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"baseurl"},"BaseURL"),(0,r.kt)("p",null,"Returns the base URL ","(",(0,r.kt)("strong",{parentName:"p"},"protocol")," + ",(0,r.kt)("strong",{parentName:"p"},"host"),")"," as a ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) BaseURL() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET https://example.com/page#chapter-1\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.BaseURL() // https://example.com\n // ...\n})\n')),(0,r.kt)("h2",{id:"bind"},"Bind"),(0,r.kt)("p",null,"Add vars to default view var map binding to template engine.\nVariables are read by the Render method and may be overwritten."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Bind(vars Map) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Use(func(c *fiber.Ctx) error {\n c.Bind(fiber.Map{\n "Title": "Hello, World!",\n })\n})\n\napp.Get("/", func(c *fiber.Ctx) error {\n return c.Render("xxx.tmpl", fiber.Map{}) // Render will use Title variable\n})\n')),(0,r.kt)("h2",{id:"body"},"Body"),(0,r.kt)("p",null,"Returns the raw request ",(0,r.kt)("strong",{parentName:"p"},"body"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Body() []byte\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// curl -X POST http://localhost:8080 -d user=john\n\napp.Post("/", func(c *fiber.Ctx) error {\n // Get raw body from POST request:\n return c.Send(c.Body()) // []byte("user=john")\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"bodyparser"},"BodyParser"),(0,r.kt)("p",null,"Binds the request body to a struct."),(0,r.kt)("p",null,"It is important to specify the correct struct tag based on the content type to be parsed. For example, if you want to parse a JSON body with a field called Pass, you would use a struct field of ",(0,r.kt)("inlineCode",{parentName:"p"},'json:"pass"'),"."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"content-type"),(0,r.kt)("th",{parentName:"tr",align:null},"struct tag"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"application/x-www-form-urlencoded")),(0,r.kt)("td",{parentName:"tr",align:null},"form")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"multipart/form-data")),(0,r.kt)("td",{parentName:"tr",align:null},"form")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"application/json")),(0,r.kt)("td",{parentName:"tr",align:null},"json")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"application/xml")),(0,r.kt)("td",{parentName:"tr",align:null},"xml")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"text/xml")),(0,r.kt)("td",{parentName:"tr",align:null},"xml")))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) BodyParser(out interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Field names should start with an uppercase letter\ntype Person struct {\n Name string `json:"name" xml:"name" form:"name"`\n Pass string `json:"pass" xml:"pass" form:"pass"`\n}\n\napp.Post("/", func(c *fiber.Ctx) error {\n p := new(Person)\n\n if err := c.BodyParser(p); err != nil {\n return err\n }\n\n log.Println(p.Name) // john\n log.Println(p.Pass) // doe\n\n // ...\n})\n\n// Run tests with the following curl commands\n\n// curl -X POST -H "Content-Type: application/json" --data "{\\"name\\":\\"john\\",\\"pass\\":\\"doe\\"}" localhost:3000\n\n// curl -X POST -H "Content-Type: application/xml" --data "johndoe" localhost:3000\n\n// curl -X POST -H "Content-Type: application/x-www-form-urlencoded" --data "name=john&pass=doe" localhost:3000\n\n// curl -X POST -F name=john -F pass=doe http://localhost:3000\n\n// curl -X POST "http://localhost:3000/?name=john&pass=doe"\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"clearcookie"},"ClearCookie"),(0,r.kt)("p",null,"Expire a client cookie ","(",(0,r.kt)("em",{parentName:"p"},"or all cookies if left empty",")")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) ClearCookie(key ...string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // Clears all cookies:\n c.ClearCookie()\n\n // Expire specific cookie by name:\n c.ClearCookie("user")\n\n // Expire multiple cookies by names:\n c.ClearCookie("token", "session", "track_id", "version")\n // ...\n})\n')),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Web browsers and other compliant clients will only clear the cookie if the given options are identical to those when creating the cookie, excluding expires and maxAge. ClearCookie will not set these values for you - a technique similar to the one shown below should be used to ensure your cookie is deleted.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/set", func(c *fiber.Ctx) error {\n c.Cookie(&fiber.Cookie{\n Name: "token",\n Value: "randomvalue",\n Expires: time.Now().Add(24 * time.Hour),\n HTTPOnly: true,\n SameSite: "lax",\n })\n\n // ...\n})\n\napp.Get("/delete", func(c *fiber.Ctx) error {\n c.Cookie(&fiber.Cookie{\n Name: "token",\n // Set expiry date to the past\n Expires: time.Now().Add(-(time.Hour * 2)),\n HTTPOnly: true,\n SameSite: "lax",\n })\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"clienthelloinfo"},"ClientHelloInfo"),(0,r.kt)("p",null,"ClientHelloInfo contains information from a ClientHello message in order to guide application logic in the GetCertificate and GetConfigForClient callbacks.\nYou can refer to the ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/pkg/crypto/tls/#ClientHelloInfo"},"ClientHelloInfo")," struct documentation for more information on the returned struct."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) ClientHelloInfo() *tls.ClientHelloInfo\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/hello\napp.Get("/hello", func(c *fiber.Ctx) error {\n chi := c.ClientHelloInfo()\n // ...\n})\n')),(0,r.kt)("h2",{id:"context"},"Context"),(0,r.kt)("p",null,"Returns ",(0,r.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/valyala/fasthttp#RequestCtx"},"*","fasthttp.RequestCtx")," that is compatible with the context.Context interface that requires a deadline, a cancellation signal, and other values across API boundaries."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Context() *fasthttp.RequestCtx\n")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Please read the ",(0,r.kt)("a",{parentName:"p",href:"https://pkg.go.dev/github.com/valyala/fasthttp?tab=doc"},"Fasthttp Documentation")," for more information.")),(0,r.kt)("h2",{id:"cookie"},"Cookie"),(0,r.kt)("p",null,"Set cookie"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Cookie(cookie *Cookie)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Cookie struct {\n Name string `json:"name"`\n Value string `json:"value"`\n Path string `json:"path"`\n Domain string `json:"domain"`\n MaxAge int `json:"max_age"`\n Expires time.Time `json:"expires"`\n Secure bool `json:"secure"`\n HTTPOnly bool `json:"http_only"`\n SameSite string `json:"same_site"`\n SessionOnly bool `json:"session_only"`\n}\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // Create cookie\n cookie := new(fiber.Cookie)\n cookie.Name = "john"\n cookie.Value = "doe"\n cookie.Expires = time.Now().Add(24 * time.Hour)\n\n // Set cookie\n c.Cookie(cookie)\n // ...\n})\n')),(0,r.kt)("h2",{id:"cookies"},"Cookies"),(0,r.kt)("p",null,"Get cookie value by key, you could pass an optional default value that will be returned if the cookie key does not exist."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Cookies(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // Get cookie by key:\n c.Cookies("name") // "john"\n c.Cookies("empty", "doe") // "doe"\n // ...\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"download"},"Download"),(0,r.kt)("p",null,"Transfers the file from path as an ",(0,r.kt)("inlineCode",{parentName:"p"},"attachment"),"."),(0,r.kt)("p",null,"Typically, browsers will prompt the user to download. By default, the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition"},"Content-Disposition")," header ",(0,r.kt)("inlineCode",{parentName:"p"},"filename=")," parameter is the file path ","(",(0,r.kt)("em",{parentName:"p"},"this typically appears in the browser dialog"),")","."),(0,r.kt)("p",null,"Override this default with the ",(0,r.kt)("strong",{parentName:"p"},"filename")," parameter."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Download(file string, filename ...string) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return c.Download("./files/report-12345.pdf");\n // => Download report-12345.pdf\n\n return c.Download("./files/report-12345.pdf", "report.pdf");\n // => Download report.pdf\n})\n')),(0,r.kt)("h2",{id:"format"},"Format"),(0,r.kt)("p",null,"Performs content-negotiation on the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept"},"Accept")," HTTP header. It uses ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#accepts"},"Accepts")," to select a proper format."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If the header is ",(0,r.kt)("strong",{parentName:"p"},"not")," specified or there is ",(0,r.kt)("strong",{parentName:"p"},"no")," proper format, ",(0,r.kt)("strong",{parentName:"p"},"text/plain")," is used.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Format(body interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // Accept: text/plain\n c.Format("Hello, World!")\n // => Hello, World!\n\n // Accept: text/html\n c.Format("Hello, World!")\n // =>

Hello, World!

\n\n // Accept: application/json\n c.Format("Hello, World!")\n // => "Hello, World!"\n // ..\n})\n')),(0,r.kt)("h2",{id:"formfile"},"FormFile"),(0,r.kt)("p",null,"MultipartForm files can be retrieved by name, the ",(0,r.kt)("strong",{parentName:"p"},"first")," file from the given key is returned."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) FormFile(key string) (*multipart.FileHeader, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n // Get first file from form field "document":\n file, err := c.FormFile("document")\n\n // Save file to root directory:\n return c.SaveFile(file, fmt.Sprintf("./%s", file.Filename))\n})\n')),(0,r.kt)("h2",{id:"formvalue"},"FormValue"),(0,r.kt)("p",null,"Any form values can be retrieved by name, the ",(0,r.kt)("strong",{parentName:"p"},"first")," value from the given key is returned."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) FormValue(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n // Get first value from form field "name":\n c.FormValue("name")\n // => "john" or "" if not exist\n\n // ..\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"fresh"},"Fresh"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://expressjs.com/en/4x/api.html#req.fresh"},"https://expressjs.com/en/4x/api.html","#","req.fresh")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Fresh() bool\n")),(0,r.kt)("h2",{id:"get"},"Get"),(0,r.kt)("p",null,"Returns the HTTP request header specified by the field."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"The match is ",(0,r.kt)("strong",{parentName:"p"},"case-insensitive"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Get(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Get("Content-Type") // "text/plain"\n c.Get("CoNtEnT-TypE") // "text/plain"\n c.Get("something", "john") // "john"\n // ..\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"getreqheaders"},"GetReqHeaders"),(0,r.kt)("p",null,"Returns the HTTP request headers."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) GetReqHeaders() map[string]string\n")),(0,r.kt)("h2",{id:"getrespheader"},"GetRespHeader"),(0,r.kt)("p",null,"Returns the HTTP response header specified by the field."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"The match is ",(0,r.kt)("strong",{parentName:"p"},"case-insensitive"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) GetRespHeader(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.GetRespHeader("X-Request-Id") // "8d7ad5e3-aaf3-450b-a241-2beb887efd54"\n c.GetRespHeader("Content-Type") // "text/plain"\n c.GetRespHeader("something", "john") // "john"\n // ..\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"getrespheaders"},"GetRespHeaders"),(0,r.kt)("p",null,"Returns the HTTP response headers."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) GetRespHeaders() map[string]string\n")),(0,r.kt)("h2",{id:"getrouteurl"},"GetRouteURL"),(0,r.kt)("p",null,'Generates URLs to named routes, with parameters. URLs are relative, for example: "/user/1831"'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) GetRouteURL(routeName string, params Map) (string, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Home page")\n}).Name("home")\n\napp.Get("/user/:id", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("id"))\n}).Name("user.show")\n\napp.Get("/test", func(c *fiber.Ctx) error {\n location, _ := c.GetRouteURL("user.show", fiber.Map{"id": 1})\n return c.SendString(location)\n})\n\n// /test returns "/user/1"\n')),(0,r.kt)("h2",{id:"hostname"},"Hostname"),(0,r.kt)("p",null,"Returns the hostname derived from the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Host"},"Host")," HTTP header."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Hostname() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://google.com/search\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Hostname() // "google.com"\n\n // ...\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"ip"},"IP"),(0,r.kt)("p",null,"Returns the remote IP address of the request."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) IP() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.IP() // "127.0.0.1"\n\n // ...\n})\n')),(0,r.kt)("p",null,"When registering the proxy request header in the fiber app, the ip address of the header is returned ",(0,r.kt)("a",{parentName:"p",href:"/next/api/fiber#config"},"(Fiber configuration)")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"app := fiber.New(fiber.Config{\n ProxyHeader: fiber.HeaderXForwardedFor,\n})\n")),(0,r.kt)("h2",{id:"ips"},"IPs"),(0,r.kt)("p",null,"Returns an array of IP addresses specified in the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For"},"X-Forwarded-For")," request header."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) IPs() []string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// X-Forwarded-For: proxy1, 127.0.0.1, proxy3\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.IPs() // ["proxy1", "127.0.0.1", "proxy3"]\n\n // ...\n})\n')),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Improper use of the X-Forwarded-For header can be a security risk. For details, see the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#security_and_privacy_concerns"},"Security and privacy concerns")," section.")),(0,r.kt)("h2",{id:"is"},"Is"),(0,r.kt)("p",null,"Returns the matching ",(0,r.kt)("strong",{parentName:"p"},"content type"),", if the incoming request\u2019s ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type"},"Content-Type")," HTTP header field matches the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/ru/docs/Web/HTTP/Basics_of_HTTP/MIME_types"},"MIME type")," specified by the type parameter."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If the request has ",(0,r.kt)("strong",{parentName:"p"},"no")," body, it returns ",(0,r.kt)("strong",{parentName:"p"},"false"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Is(extension string) bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Content-Type: text/html; charset=utf-8\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Is("html") // true\n c.Is(".html") // true\n c.Is("json") // false\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"isfromlocal"},"IsFromLocal"),(0,r.kt)("p",null,"Returns true if request came from localhost"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) IsFromLocal() bool {\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'\napp.Get("/", func(c *fiber.Ctx) error {\n // If request came from localhost, return true else return false\n c.IsFromLocal()\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"json"},"JSON"),(0,r.kt)("p",null,"Converts any ",(0,r.kt)("strong",{parentName:"p"},"interface")," or ",(0,r.kt)("strong",{parentName:"p"},"string")," to JSON using the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/goccy/go-json"},"goccy/go-json")," package."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"JSON also sets the content header to ",(0,r.kt)("strong",{parentName:"p"},"application/json"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) JSON(data interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'type SomeStruct struct {\n Name string\n Age uint8\n}\n\napp.Get("/json", func(c *fiber.Ctx) error {\n // Create data struct:\n data := SomeStruct{\n Name: "Grame",\n Age: 20,\n }\n\n return c.JSON(data)\n // => Content-Type: application/json\n // => "{"Name": "Grame", "Age": 20}"\n\n return c.JSON(fiber.Map{\n "name": "Grame",\n "age": 20,\n })\n // => Content-Type: application/json\n // => "{"name": "Grame", "age": 20}"\n})\n')),(0,r.kt)("h2",{id:"jsonp"},"JSONP"),(0,r.kt)("p",null,"Sends a JSON response with JSONP support. This method is identical to ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#json"},"JSON"),", except that it opts-in to JSONP callback support. By default, the callback name is simply callback."),(0,r.kt)("p",null,"Override this by passing a ",(0,r.kt)("strong",{parentName:"p"},"named string")," in the method."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) JSONP(data interface{}, callback ...string) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'type SomeStruct struct {\n name string\n age uint8\n}\n\napp.Get("/", func(c *fiber.Ctx) error {\n // Create data struct:\n data := SomeStruct{\n name: "Grame",\n age: 20,\n }\n\n return c.JSONP(data)\n // => callback({"name": "Grame", "age": 20})\n\n return c.JSONP(data, "customFunc")\n // => customFunc({"name": "Grame", "age": 20})\n})\n')),(0,r.kt)("h2",{id:"links"},"Links"),(0,r.kt)("p",null,"Joins the links followed by the property to populate the response\u2019s ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link"},"Link")," HTTP header field."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Links(link ...string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Links(\n "http://api.example.com/users?page=2", "next",\n "http://api.example.com/users?page=5", "last",\n )\n // Link: ; rel="next",\n // ; rel="last"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"locals"},"Locals"),(0,r.kt)("p",null,"A method that stores variables scoped to the request and, therefore, are available only to the routes that match the request."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"This is useful if you want to pass some ",(0,r.kt)("strong",{parentName:"p"},"specific")," data to the next middleware.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Locals(key interface{}, value ...interface{}) interface{}\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Use(func(c *fiber.Ctx) error {\n c.Locals("user", "admin")\n return c.Next()\n})\n\napp.Get("/admin", func(c *fiber.Ctx) error {\n if c.Locals("user") == "admin" {\n return c.Status(fiber.StatusOK).SendString("Welcome, admin!")\n }\n return c.SendStatus(fiber.StatusForbidden)\n\n})\n')),(0,r.kt)("h2",{id:"location"},"Location"),(0,r.kt)("p",null,"Sets the response ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/ru/docs/Web/HTTP/Headers/Location"},"Location")," HTTP header to the specified path parameter."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Location(path string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n c.Location("http://example.com")\n\n c.Location("/foo/bar")\n \n return nil\n})\n')),(0,r.kt)("h2",{id:"method"},"Method"),(0,r.kt)("p",null,"Returns a string corresponding to the HTTP method of the request: ",(0,r.kt)("inlineCode",{parentName:"p"},"GET"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"POST"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"PUT"),", and so on.",(0,r.kt)("br",{parentName:"p"}),"\n","Optionally, you could override the method by passing a string."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Method(override ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n c.Method() // "POST"\n\n c.Method("GET")\n c.Method() // GET\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"multipartform"},"MultipartForm"),(0,r.kt)("p",null,"To access multipart form entries, you can parse the binary with ",(0,r.kt)("inlineCode",{parentName:"p"},"MultipartForm()"),". This returns a ",(0,r.kt)("inlineCode",{parentName:"p"},"map[string][]string"),", so given a key, the value will be a string slice."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) MultipartForm() (*multipart.Form, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n // Parse the multipart form:\n if form, err := c.MultipartForm(); err == nil {\n // => *multipart.Form\n\n if token := form.Value["token"]; len(token) > 0 {\n // Get key value:\n fmt.Println(token[0])\n }\n\n // Get all files from "documents" key:\n files := form.File["documents"]\n // => []*multipart.FileHeader\n\n // Loop through files:\n for _, file := range files {\n fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])\n // => "tutorial.pdf" 360641 "application/pdf"\n\n // Save the files to disk:\n if err := c.SaveFile(file, fmt.Sprintf("./%s", file.Filename)); err != nil {\n return err\n }\n }\n }\n\n return err\n})\n')),(0,r.kt)("h2",{id:"next"},"Next"),(0,r.kt)("p",null,"When ",(0,r.kt)("strong",{parentName:"p"},"Next")," is called, it executes the next method in the stack that matches the current route. You can pass an error struct within the method that will end the chaining and call the ",(0,r.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/guide/error-handling"},"error handler"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Next() error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n fmt.Println("1st route!")\n return c.Next()\n})\n\napp.Get("*", func(c *fiber.Ctx) error {\n fmt.Println("2nd route!")\n return c.Next()\n})\n\napp.Get("/", func(c *fiber.Ctx) error {\n fmt.Println("3rd route!")\n return c.SendString("Hello, World!")\n})\n')),(0,r.kt)("h2",{id:"originalurl"},"OriginalURL"),(0,r.kt)("p",null,"Returns the original request URL."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) OriginalURL() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/search?q=something\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.OriginalURL() // "/search?q=something"\n\n // ...\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"params"},"Params"),(0,r.kt)("p",null,"Method can be used to get the route parameters, you could pass an optional default value that will be returned if the param key does not exist."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Defaults to empty string ","(",(0,r.kt)("inlineCode",{parentName:"p"},'""'),")",", if the param ",(0,r.kt)("strong",{parentName:"p"},"doesn't")," exist.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Params(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/user/fenny\napp.Get("/user/:name", func(c *fiber.Ctx) error {\n c.Params("name") // "fenny"\n\n // ...\n})\n\n// GET http://example.com/user/fenny/123\napp.Get("/user/*", func(c *fiber.Ctx) error {\n c.Params("*") // "fenny/123"\n c.Params("*1") // "fenny/123"\n\n // ...\n})\n')),(0,r.kt)("p",null,"Unnamed route parameters","(","*",", +",")"," can be fetched by the ",(0,r.kt)("strong",{parentName:"p"},"character")," and the ",(0,r.kt)("strong",{parentName:"p"},"counter")," in the route."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// ROUTE: /v1/*/shop/*\n// GET: /v1/brand/4/shop/blue/xs\nc.Params("*1") // "brand/4"\nc.Params("*2") // "blue/xs"\n')),(0,r.kt)("p",null,"For reasons of ",(0,r.kt)("strong",{parentName:"p"},"downward compatibility"),", the first parameter segment for the parameter character can also be accessed without the counter."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/v1/*/shop/*", func(c *fiber.Ctx) error {\n c.Params("*") // outputs the values of the first wildcard segment\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"paramsint"},"ParamsInt"),(0,r.kt)("p",null,"Method can be used to get an integer from the route parameters.\nPlease note if that parameter is not in the request, zero\nwill be returned. If the parameter is NOT a number, zero and an error\nwill be returned"),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Defaults to the integer zero ","(",(0,r.kt)("inlineCode",{parentName:"p"},"0"),")",", if the param ",(0,r.kt)("strong",{parentName:"p"},"doesn't")," exist.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) ParamsInt(key string) (int, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/user/123\napp.Get("/user/:id", func(c *fiber.Ctx) error {\n id, err := c.ParamsInt("id") // int 123 and no error\n\n // ...\n})\n\n')),(0,r.kt)("p",null,"This method is equivalent of using ",(0,r.kt)("inlineCode",{parentName:"p"},"atoi")," with ctx.Params"),(0,r.kt)("h2",{id:"paramsparser"},"ParamsParser"),(0,r.kt)("p",null,'This method is similar to BodyParser, but for path parameters. It is important to use the struct tag "params". For example, if you want to parse a path parameter with a field called Pass, you would use a struct field of params:"pass"'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) ParamsParser(out interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/user/111\napp.Get("/user/:id", func(c *fiber.Ctx) error {\n param := struct {ID uint `params:"id"`}{}\n \n c.ParamsParser(¶m) // "{"id": 111}"\n\n // ...\n})\n\n')),(0,r.kt)("h2",{id:"path"},"Path"),(0,r.kt)("p",null,"Contains the path part of the request URL. Optionally, you could override the path by passing a string. For internal redirects, you might want to call ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#restartrouting"},"RestartRouting")," instead of ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#next"},"Next"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Path(override ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/users?sort=desc\n\napp.Get("/users", func(c *fiber.Ctx) error {\n c.Path() // "/users"\n\n c.Path("/john")\n c.Path() // "/john"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"protocol"},"Protocol"),(0,r.kt)("p",null,"Contains the request protocol string: ",(0,r.kt)("inlineCode",{parentName:"p"},"http")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"https")," for ",(0,r.kt)("strong",{parentName:"p"},"TLS")," requests."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Protocol() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Protocol() // "http"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"queries"},"Queries"),(0,r.kt)("p",null,"Queries is a function that returns an object containing a property for each query string parameter in the route."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Queries() map[string]string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?name=alex&want_pizza=false&id=\n\napp.Get("/", func(c *fiber.Ctx) error {\n m := c.Queries()\n m["name"] // "alex"\n m["want_pizza"] // "false"\n m["id"] // ""\n // ...\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?field1=value1&field1=value2&field2=value3\n\napp.Get("/", func (c *fiber.Ctx) error {\n m := c.Queries()\n m["field1"] // "value2"\n m["field2"] // value3\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?list_a=1&list_a=2&list_a=3&list_b[]=1&list_b[]=2&list_b[]=3&list_c=1,2,3\n\napp.Get("/", func(c *fiber.Ctx) error {\n m := c.Queries()\n m["list_a"] // "3"\n m["list_b[]"] // "3"\n m["list_c"] // "1,2,3"\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET /api/posts?filters.author.name=John&filters.category.name=Technology\n\napp.Get("/", func(c *fiber.Ctx) error {\n m := c.Queries()\n m["filters.author.name"] // John\n m["filters.category.name"] // Technology\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET /api/posts?tags=apple,orange,banana&filters[tags]=apple,orange,banana&filters[category][name]=fruits&filters.tags=apple,orange,banana&filters.category.name=fruits\n\napp.Get("/", func(c *fiber.Ctx) error {\n m := c.Queries()\n m["tags"] // apple,orange,banana\n m["filters[tags]"] // apple,orange,banana\n m["filters[category][name]"] // fruits\n m["filters.tags"] // apple,orange,banana\n m["filters.category.name"] // fruits\n})\n')),(0,r.kt)("h2",{id:"query"},"Query"),(0,r.kt)("p",null,"This property is an object containing a property for each query string parameter in the route, you could pass an optional default value that will be returned if the query key does not exist."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If there is ",(0,r.kt)("strong",{parentName:"p"},"no")," query string, it returns an ",(0,r.kt)("strong",{parentName:"p"},"empty string"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Query(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?order=desc&brand=nike\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Query("order") // "desc"\n c.Query("brand") // "nike"\n c.Query("empty", "nike") // "nike"\n\n // ...\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"querybool"},"QueryBool"),(0,r.kt)("p",null,"This property is an object containing a property for each query boolean parameter in the route, you could pass an optional default value that will be returned if the query key does not exist."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Please note if that parameter is not in the request, false will be returned.\nIf the parameter is not a boolean, it is still tried to be converted and usually returned as false.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) QueryBool(key string, defaultValue ...bool) bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?name=alex&want_pizza=false&id=\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.QueryBool("want_pizza") // false\n c.QueryBool("want_pizza", true) // false\n c.QueryBool("name") // false\n c.QueryBool("name", true) // true\n c.QueryBool("id") // false\n c.QueryBool("id", true) // true\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"queryfloat"},"QueryFloat"),(0,r.kt)("p",null,"This property is an object containing a property for each query float64 parameter in the route, you could pass an optional default value that will be returned if the query key does not exist."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Please note if that parameter is not in the request, zero will be returned.\nIf the parameter is not a number, it is still tried to be converted and usually returned as 1.")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Defaults to the float64 zero ","(",(0,r.kt)("inlineCode",{parentName:"p"},"0"),")",", if the param ",(0,r.kt)("strong",{parentName:"p"},"doesn't")," exist.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) QueryFloat(key string, defaultValue ...float64) float64\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?name=alex&amount=32.23&id=\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.QueryFloat("amount") // 32.23\n c.QueryFloat("amount", 3) // 32.23\n c.QueryFloat("name", 1) // 1\n c.QueryFloat("name") // 0\n c.QueryFloat("id", 3) // 3\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"queryint"},"QueryInt"),(0,r.kt)("p",null,"This property is an object containing a property for each query integer parameter in the route, you could pass an optional default value that will be returned if the query key does not exist."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Please note if that parameter is not in the request, zero will be returned.\nIf the parameter is not a number, it is still tried to be converted and usually returned as 1.")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Defaults to the integer zero ","(",(0,r.kt)("inlineCode",{parentName:"p"},"0"),")",", if the param ",(0,r.kt)("strong",{parentName:"p"},"doesn't")," exist.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) QueryInt(key string, defaultValue ...int) int\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?name=alex&wanna_cake=2&id=\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.QueryInt("wanna_cake", 1) // 2\n c.QueryInt("name", 1) // 1\n c.QueryInt("id", 1) // 1\n c.QueryInt("id") // 0\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"queryparser"},"QueryParser"),(0,r.kt)("p",null,"This method is similar to ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#bodyparser"},"BodyParser"),', but for query parameters.\nIt is important to use the struct tag "query". For example, if you want to parse a query parameter with a field called Pass, you would use a struct field of ',(0,r.kt)("inlineCode",{parentName:"p"},'query:"pass"'),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) QueryParser(out interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Field names should start with an uppercase letter\ntype Person struct {\n Name string `query:"name"`\n Pass string `query:"pass"`\n Products []string `query:"products"`\n}\n\napp.Get("/", func(c *fiber.Ctx) error {\n p := new(Person)\n\n if err := c.QueryParser(p); err != nil {\n return err\n }\n\n log.Println(p.Name) // john\n log.Println(p.Pass) // doe\n log.Println(p.Products) // [shoe, hat]\n\n // ...\n})\n// Run tests with the following curl command\n\n// curl "http://localhost:3000/?name=john&pass=doe&products=shoe,hat"\n')),(0,r.kt)("h2",{id:"range"},"Range"),(0,r.kt)("p",null,"A struct containing the type and a slice of ranges will be returned."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Range(size int) (Range, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Range: bytes=500-700, 700-900\napp.Get("/", func(c *fiber.Ctx) error {\n b := c.Range(1000)\n if b.Type == "bytes" {\n for r := range r.Ranges {\n fmt.Println(r)\n // [500, 700]\n }\n }\n})\n')),(0,r.kt)("h2",{id:"redirect"},"Redirect"),(0,r.kt)("p",null,"Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If ",(0,r.kt)("strong",{parentName:"p"},"not")," specified, status defaults to ",(0,r.kt)("strong",{parentName:"p"},"302 Found"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Redirect(location string, status ...int) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/coffee", func(c *fiber.Ctx) error {\n return c.Redirect("/teapot")\n})\n\napp.Get("/teapot", func(c *fiber.Ctx) error {\n return c.Status(fiber.StatusTeapot).Send("\ud83c\udf75 short and stout \ud83c\udf75")\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="More examples"',title:'"More','examples"':!0},'app.Get("/", func(c *fiber.Ctx) error {\n return c.Redirect("/foo/bar")\n return c.Redirect("../login")\n return c.Redirect("http://example.com")\n return c.Redirect("http://example.com", 301)\n})\n')),(0,r.kt)("h2",{id:"redirecttoroute"},"RedirectToRoute"),(0,r.kt)("p",null,"Redirects to the specific route along with the parameters and with specified status, a positive integer that corresponds to an HTTP status code."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If ",(0,r.kt)("strong",{parentName:"p"},"not")," specified, status defaults to ",(0,r.kt)("strong",{parentName:"p"},"302 Found"),".")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If you want to send queries to route, you must add ",(0,r.kt)("strong",{parentName:"p"},'"queries"')," key typed as ",(0,r.kt)("strong",{parentName:"p"},"map","[string]","string")," to params.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) RedirectToRoute(routeName string, params fiber.Map, status ...int) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // /user/fiber\n return c.RedirectToRoute("user", fiber.Map{\n "name": "fiber"\n })\n})\n\napp.Get("/with-queries", func(c *fiber.Ctx) error {\n // /user/fiber?data[0][name]=john&data[0][age]=10&test=doe\n return c.RedirectToRoute("user", fiber.Map{\n "name": "fiber",\n "queries": map[string]string{"data[0][name]": "john", "data[0][age]": "10", "test": "doe"},\n })\n})\n\napp.Get("/user/:name", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("name"))\n}).Name("user")\n')),(0,r.kt)("h2",{id:"redirectback"},"RedirectBack"),(0,r.kt)("p",null,"Redirects back to refer URL. It redirects to fallback URL if refer header doesn't exists, with specified status, a positive integer that corresponds to an HTTP status code."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If ",(0,r.kt)("strong",{parentName:"p"},"not")," specified, status defaults to ",(0,r.kt)("strong",{parentName:"p"},"302 Found"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) RedirectBack(fallback string, status ...int) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Home page")\n})\napp.Get("/test", func(c *fiber.Ctx) error {\n c.Set("Content-Type", "text/html")\n return c.SendString(`Back`)\n})\n\napp.Get("/back", func(c *fiber.Ctx) error {\n return c.RedirectBack("/")\n})\n')),(0,r.kt)("h2",{id:"render"},"Render"),(0,r.kt)("p",null,"Renders a view with data and sends a ",(0,r.kt)("inlineCode",{parentName:"p"},"text/html")," response. By default ",(0,r.kt)("inlineCode",{parentName:"p"},"Render")," uses the default ",(0,r.kt)("a",{parentName:"p",href:"https://pkg.go.dev/html/template/"},(0,r.kt)("strong",{parentName:"a"},"Go Template engine")),". If you want to use another View engine, please take a look at our ",(0,r.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/template"},(0,r.kt)("strong",{parentName:"a"},"Template middleware")),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Render(name string, bind interface{}, layouts ...string) error\n")),(0,r.kt)("h2",{id:"request"},"Request"),(0,r.kt)("p",null,"Request return the ",(0,r.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/valyala/fasthttp#Request"},"*","fasthttp.Request")," pointer"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Request() *fasthttp.Request\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Request().Header.Method()\n // => []byte("GET")\n})\n')),(0,r.kt)("h2",{id:"reqheaderparser"},"ReqHeaderParser"),(0,r.kt)("p",null,"This method is similar to ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#bodyparser"},"BodyParser"),', but for request headers.\nIt is important to use the struct tag "reqHeader". For example, if you want to parse a request header with a field called Pass, you would use a struct field of ',(0,r.kt)("inlineCode",{parentName:"p"},'reqHeader:"pass"'),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) ReqHeaderParser(out interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Field names should start with an uppercase letter\ntype Person struct {\n Name string `reqHeader:"name"`\n Pass string `reqHeader:"pass"`\n Products []string `reqHeader:"products"`\n}\n\napp.Get("/", func(c *fiber.Ctx) error {\n p := new(Person)\n\n if err := c.ReqHeaderParser(p); err != nil {\n return err\n }\n\n log.Println(p.Name) // john\n log.Println(p.Pass) // doe\n log.Println(p.Products) // [shoe, hat]\n\n // ...\n})\n// Run tests with the following curl command\n\n// curl "http://localhost:3000/" -H "name: john" -H "pass: doe" -H "products: shoe,hat"\n')),(0,r.kt)("h2",{id:"response"},"Response"),(0,r.kt)("p",null,"Response return the ",(0,r.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/valyala/fasthttp#Response"},"*","fasthttp.Response")," pointer"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Response() *fasthttp.Response\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Response().BodyWriter().Write([]byte("Hello, World!"))\n // => "Hello, World!"\n return nil\n})\n')),(0,r.kt)("h2",{id:"restartrouting"},"RestartRouting"),(0,r.kt)("p",null,"Instead of executing the next method when calling ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#next"},"Next"),", ",(0,r.kt)("strong",{parentName:"p"},"RestartRouting")," restarts execution from the first method that matches the current route. This may be helpful after overriding the path, i. e. an internal redirect. Note that handlers might be executed again which could result in an infinite loop."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) RestartRouting() error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/new", func(c *fiber.Ctx) error {\n return c.SendString("From /new")\n})\n\napp.Get("/old", func(c *fiber.Ctx) error {\n c.Path("/new")\n return c.RestartRouting()\n})\n')),(0,r.kt)("h2",{id:"route"},"Route"),(0,r.kt)("p",null,"Returns the matched ",(0,r.kt)("a",{parentName:"p",href:"https://pkg.go.dev/github.com/gofiber/fiber?tab=doc#Route"},"Route")," struct."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Route() *Route\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// http://localhost:8080/hello\n\n\napp.Get("/hello/:name", func(c *fiber.Ctx) error {\n r := c.Route()\n fmt.Println(r.Method, r.Path, r.Params, r.Handlers)\n // GET /hello/:name handler [name] \n\n // ...\n})\n')),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Do not rely on ",(0,r.kt)("inlineCode",{parentName:"p"},"c.Route()")," in middlewares ",(0,r.kt)("strong",{parentName:"p"},"before")," calling ",(0,r.kt)("inlineCode",{parentName:"p"},"c.Next()")," - ",(0,r.kt)("inlineCode",{parentName:"p"},"c.Route()")," returns the ",(0,r.kt)("strong",{parentName:"p"},"last executed route"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"func MyMiddleware() fiber.Handler {\n return func(c *fiber.Ctx) error {\n beforeNext := c.Route().Path // Will be '/'\n err := c.Next()\n afterNext := c.Route().Path // Will be '/hello/:name'\n return err\n }\n}\n")),(0,r.kt)("h2",{id:"savefile"},"SaveFile"),(0,r.kt)("p",null,"Method is used to save ",(0,r.kt)("strong",{parentName:"p"},"any")," multipart file to disk."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) SaveFile(fh *multipart.FileHeader, path string) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n // Parse the multipart form:\n if form, err := c.MultipartForm(); err == nil {\n // => *multipart.Form\n\n // Get all files from "documents" key:\n files := form.File["documents"]\n // => []*multipart.FileHeader\n\n // Loop through files:\n for _, file := range files {\n fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])\n // => "tutorial.pdf" 360641 "application/pdf"\n\n // Save the files to disk:\n if err := c.SaveFile(file, fmt.Sprintf("./%s", file.Filename)); err != nil {\n return err\n }\n }\n return err\n }\n})\n')),(0,r.kt)("h2",{id:"savefiletostorage"},"SaveFileToStorage"),(0,r.kt)("p",null,"Method is used to save ",(0,r.kt)("strong",{parentName:"p"},"any")," multipart file to an external storage system."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) SaveFileToStorage(fileheader *multipart.FileHeader, path string, storage Storage) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'storage := memory.New()\n\napp.Post("/", func(c *fiber.Ctx) error {\n // Parse the multipart form:\n if form, err := c.MultipartForm(); err == nil {\n // => *multipart.Form\n\n // Get all files from "documents" key:\n files := form.File["documents"]\n // => []*multipart.FileHeader\n\n // Loop through files:\n for _, file := range files {\n fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])\n // => "tutorial.pdf" 360641 "application/pdf"\n\n // Save the files to storage:\n if err := c.SaveFileToStorage(file, fmt.Sprintf("./%s", file.Filename), storage); err != nil {\n return err\n }\n }\n return err\n }\n})\n')),(0,r.kt)("h2",{id:"secure"},"Secure"),(0,r.kt)("p",null,"A boolean property that is ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," , if a ",(0,r.kt)("strong",{parentName:"p"},"TLS")," connection is established."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Secure() bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Secure() method is equivalent to:\nc.Protocol() == "https"\n')),(0,r.kt)("h2",{id:"send"},"Send"),(0,r.kt)("p",null,"Sets the HTTP response body."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Send(body []byte) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return c.Send([]byte("Hello, World!")) // => "Hello, World!"\n})\n')),(0,r.kt)("p",null,"Fiber also provides ",(0,r.kt)("inlineCode",{parentName:"p"},"SendString")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"SendStream")," methods for raw inputs."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Use this if you ",(0,r.kt)("strong",{parentName:"p"},"don't need")," type assertion, recommended for ",(0,r.kt)("strong",{parentName:"p"},"faster")," performance.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) SendString(body string) error\nfunc (c *Ctx) SendStream(stream io.Reader, size ...int) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n // => "Hello, World!"\n\n return c.SendStream(bytes.NewReader([]byte("Hello, World!")))\n // => "Hello, World!"\n})\n')),(0,r.kt)("h2",{id:"sendfile"},"SendFile"),(0,r.kt)("p",null,"Transfers the file from the given path. Sets the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type"},"Content-Type")," response HTTP header field based on the ",(0,r.kt)("strong",{parentName:"p"},"filenames")," extension."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Method doesn\xb4t use ",(0,r.kt)("strong",{parentName:"p"},"gzipping")," by default, set it to ",(0,r.kt)("strong",{parentName:"p"},"true")," to enable.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature" title="Signature"',title:'"Signature"'},"func (c *Ctx) SendFile(file string, compress ...bool) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/not-found", func(c *fiber.Ctx) error {\n return c.SendFile("./public/404.html");\n\n // Disable compression\n return c.SendFile("./static/index.html", false);\n})\n')),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If the file contains an url specific character you have to escape it before passing the file path into the ",(0,r.kt)("inlineCode",{parentName:"p"},"sendFile")," function.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/file-with-url-chars", func(c *fiber.Ctx) error {\n return c.SendFile(url.PathEscape("hash_sign_#.txt"))\n})\n')),(0,r.kt)("h2",{id:"sendstatus"},"SendStatus"),(0,r.kt)("p",null,"Sets the status code and the correct status message in the body, if the response body is ",(0,r.kt)("strong",{parentName:"p"},"empty"),"."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"You can find all used status codes and messages ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/blob/dffab20bcdf4f3597d2c74633a7705a517d2c8c2/utils.go#L183-L244"},"here"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) SendStatus(status int) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/not-found", func(c *fiber.Ctx) error {\n return c.SendStatus(415)\n // => 415 "Unsupported Media Type"\n\n c.SendString("Hello, World!")\n return c.SendStatus(415)\n // => 415 "Hello, World!"\n})\n')),(0,r.kt)("h2",{id:"set"},"Set"),(0,r.kt)("p",null,"Sets the response\u2019s HTTP header field to the specified ",(0,r.kt)("inlineCode",{parentName:"p"},"key"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Set(key string, val string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Set("Content-Type", "text/plain")\n // => "Content-type: text/plain"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"setparserdecoder"},"SetParserDecoder"),(0,r.kt)("p",null,"Allow you to config BodyParser/QueryParser decoder, base on schema's options, providing possibility to add custom type for parsing."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func SetParserDecoder(parserConfig fiber.ParserConfig{\n IgnoreUnknownKeys bool,\n ParserType []fiber.ParserType{\n Customtype interface{},\n Converter func(string) reflect.Value,\n },\n ZeroEmpty bool,\n SetAliasTag string,\n})\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'\ntype CustomTime time.Time\n\n// String() returns the time in string\nfunc (ct *CustomTime) String() string {\n t := time.Time(*ct).String()\n return t\n}\n\n// Register the converter for CustomTime type format as 2006-01-02\nvar timeConverter = func(value string) reflect.Value {\n fmt.Println("timeConverter", value)\n if v, err := time.Parse("2006-01-02", value); err == nil {\n return reflect.ValueOf(v)\n }\n return reflect.Value{}\n}\n\ncustomTime := fiber.ParserType{\n Customtype: CustomTime{},\n Converter: timeConverter,\n} \n\n// Add setting to the Decoder\nfiber.SetParserDecoder(fiber.ParserConfig{\n IgnoreUnknownKeys: true,\n ParserType: []fiber.ParserType{customTime},\n ZeroEmpty: true,\n})\n\n// Example to use CustomType, you pause custom time format not in RFC3339\ntype Demo struct {\n Date CustomTime `form:"date" query:"date"`\n Title string `form:"title" query:"title"`\n Body string `form:"body" query:"body"`\n}\n\napp.Post("/body", func(c *fiber.Ctx) error {\n var d Demo\n c.BodyParser(&d)\n fmt.Println("d.Date", d.Date.String())\n return c.JSON(d)\n})\n\napp.Get("/query", func(c *fiber.Ctx) error {\n var d Demo\n c.QueryParser(&d)\n fmt.Println("d.Date", d.Date.String())\n return c.JSON(d)\n})\n\n// curl -X POST -F title=title -F body=body -F date=2021-10-20 http://localhost:3000/body\n\n// curl -X GET "http://localhost:3000/query?title=title&body=body&date=2021-10-20"\n\n')),(0,r.kt)("h2",{id:"setusercontext"},"SetUserContext"),(0,r.kt)("p",null,"Sets the user specified implementation for context interface."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) SetUserContext(ctx context.Context)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n ctx := context.Background()\n c.SetUserContext(ctx)\n // Here ctx could be any context implementation\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"stale"},"Stale"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://expressjs.com/en/4x/api.html#req.stale"},"https://expressjs.com/en/4x/api.html","#","req.stale")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Stale() bool\n")),(0,r.kt)("h2",{id:"status"},"Status"),(0,r.kt)("p",null,"Sets the HTTP status for the response."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Method is a ",(0,r.kt)("strong",{parentName:"p"},"chainable"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Status(status int) *Ctx\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/fiber", func(c *fiber.Ctx) error {\n c.Status(fiber.StatusOK)\n return nil\n}\n\napp.Get("/hello", func(c *fiber.Ctx) error {\n return c.Status(fiber.StatusBadRequest).SendString("Bad Request")\n}\n\napp.Get("/world", func(c *fiber.Ctx) error {\n return c.Status(fiber.StatusNotFound).SendFile("./public/gopher.png")\n})\n')),(0,r.kt)("h2",{id:"subdomains"},"Subdomains"),(0,r.kt)("p",null,"Returns a string slice of subdomains in the domain name of the request."),(0,r.kt)("p",null,"The application property subdomain offset, which defaults to ",(0,r.kt)("inlineCode",{parentName:"p"},"2"),", is used for determining the beginning of the subdomain segments."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Subdomains(offset ...int) []string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Host: "tobi.ferrets.example.com"\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Subdomains() // ["ferrets", "tobi"]\n c.Subdomains(1) // ["tobi"]\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"type"},"Type"),(0,r.kt)("p",null,"Sets the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type"},"Content-Type")," HTTP header to the MIME type listed ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/nginx/nginx/blob/master/conf/mime.types"},"here")," specified by the file ",(0,r.kt)("strong",{parentName:"p"},"extension"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Type(ext string, charset ...string) *Ctx\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Type(".html") // => "text/html"\n c.Type("html") // => "text/html"\n c.Type("png") // => "image/png"\n\n c.Type("json", "utf-8") // => "application/json; charset=utf-8"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"usercontext"},"UserContext"),(0,r.kt)("p",null,"UserContext returns a context implementation that was set by user earlier\nor returns a non-nil, empty context, if it was not set earlier."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) UserContext() context.Context\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n ctx := c.UserContext()\n // ctx is context implementation set by user\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"vary"},"Vary"),(0,r.kt)("p",null,"Adds the given header field to the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Vary"},"Vary")," response header. This will append the header, if not already listed, otherwise leaves it listed in the current location."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Multiple fields are ",(0,r.kt)("strong",{parentName:"p"},"allowed"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Vary(fields ...string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Vary("Origin") // => Vary: Origin\n c.Vary("User-Agent") // => Vary: Origin, User-Agent\n\n // No duplicates\n c.Vary("Origin") // => Vary: Origin, User-Agent\n\n c.Vary("Accept-Encoding", "Accept")\n // => Vary: Origin, User-Agent, Accept-Encoding, Accept\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"write"},"Write"),(0,r.kt)("p",null,"Write adopts the Writer interface"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Write(p []byte) (n int, err error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Write([]byte("Hello, World!")) // => "Hello, World!"\n\n fmt.Fprintf(c, "%s\\n", "Hello, World!") // "Hello, World!Hello, World!"\n})\n')),(0,r.kt)("h2",{id:"writef"},"Writef"),(0,r.kt)("p",null,"Writef adopts the string with variables"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Writef(f string, a ...interface{}) (n int, err error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n world := "World!"\n c.Writef("Hello, %s", world) // => "Hello, World!"\n\n fmt.Fprintf(c, "%s\\n", "Hello, World!") // "Hello, World!Hello, World!"\n})\n')),(0,r.kt)("h2",{id:"writestring"},"WriteString"),(0,r.kt)("p",null,"WriteString adopts the string"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) WriteString(s string) (n int, err error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.WriteString("Hello, World!") // => "Hello, World!"\n\n fmt.Fprintf(c, "%s\\n", "Hello, World!") // "Hello, World!Hello, World!"\n})\n')),(0,r.kt)("h2",{id:"xhr"},"XHR"),(0,r.kt)("p",null,"A Boolean property, that is ",(0,r.kt)("inlineCode",{parentName:"p"},"true"),", if the request\u2019s ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers"},"X-Requested-With")," header field is ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest"},"XMLHttpRequest"),", indicating that the request was issued by a client library ","(","such as ",(0,r.kt)("a",{parentName:"p",href:"https://api.jquery.com/jQuery.ajax/"},"jQuery"),")","."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) XHR() bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// X-Requested-With: XMLHttpRequest\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.XHR() // true\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"xml"},"XML"),(0,r.kt)("p",null,"Converts any ",(0,r.kt)("strong",{parentName:"p"},"interface")," or ",(0,r.kt)("strong",{parentName:"p"},"string")," to XML using the standard ",(0,r.kt)("inlineCode",{parentName:"p"},"encoding/xml")," package."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"XML also sets the content header to ",(0,r.kt)("strong",{parentName:"p"},"application/xml"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) XML(data interface{}) error \n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'type SomeStruct struct {\n XMLName xml.Name `xml:"Fiber"`\n Name string `xml:"Name"`\n Age uint8 `xml:"Age"`\n}\n\napp.Get("/", func(c *fiber.Ctx) error {\n // Create data struct:\n data := SomeStruct{\n Name: "Grame",\n Age: 20,\n }\n\n return c.XML(data)\n // \n // Grame\n // 20\n // \n})\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2804f106.402e40c2.js b/assets/js/2804f106.402e40c2.js deleted file mode 100644 index cd801e3c873..00000000000 --- a/assets/js/2804f106.402e40c2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5675],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>d});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),u=s(n),g=r,d=u["".concat(p,".").concat(g)]||u[g]||c[g]||l;return n?a.createElement(d,i(i({ref:t},m),{},{components:n})):a.createElement(d,i({ref:t},m))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=g;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:r,i[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>c,frontMatter:()=>l,metadata:()=>o,toc:()=>s});var a=n(7462),r=(n(7294),n(3905));const l={id:"ctx",title:"\ud83e\udde0 Ctx",description:"The Ctx struct represents the Context which hold the HTTP request and response. It has methods for the request query string, parameters, body, HTTP headers, and so on.",sidebar_position:3},i=void 0,o={unversionedId:"api/ctx",id:"api/ctx",title:"\ud83e\udde0 Ctx",description:"The Ctx struct represents the Context which hold the HTTP request and response. It has methods for the request query string, parameters, body, HTTP headers, and so on.",source:"@site/docs/core/api/ctx.md",sourceDirName:"api",slug:"/api/ctx",permalink:"/next/api/ctx",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/ctx.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:3,frontMatter:{id:"ctx",title:"\ud83e\udde0 Ctx",description:"The Ctx struct represents the Context which hold the HTTP request and response. It has methods for the request query string, parameters, body, HTTP headers, and so on.",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"\ud83d\ude80 App",permalink:"/next/api/app"},next:{title:"\ud83d\udccb Constants",permalink:"/next/api/constants"}},p={},s=[{value:"Accepts",id:"accepts",level:2},{value:"AllParams",id:"allparams",level:2},{value:"App",id:"app",level:2},{value:"Append",id:"append",level:2},{value:"Attachment",id:"attachment",level:2},{value:"BaseURL",id:"baseurl",level:2},{value:"Bind",id:"bind",level:2},{value:"Body",id:"body",level:2},{value:"BodyParser",id:"bodyparser",level:2},{value:"ClearCookie",id:"clearcookie",level:2},{value:"ClientHelloInfo",id:"clienthelloinfo",level:2},{value:"Context",id:"context",level:2},{value:"Cookie",id:"cookie",level:2},{value:"Cookies",id:"cookies",level:2},{value:"Download",id:"download",level:2},{value:"Format",id:"format",level:2},{value:"FormFile",id:"formfile",level:2},{value:"FormValue",id:"formvalue",level:2},{value:"Fresh",id:"fresh",level:2},{value:"Get",id:"get",level:2},{value:"GetReqHeaders",id:"getreqheaders",level:2},{value:"GetRespHeader",id:"getrespheader",level:2},{value:"GetRespHeaders",id:"getrespheaders",level:2},{value:"GetRouteURL",id:"getrouteurl",level:2},{value:"Hostname",id:"hostname",level:2},{value:"IP",id:"ip",level:2},{value:"IPs",id:"ips",level:2},{value:"Is",id:"is",level:2},{value:"IsFromLocal",id:"isfromlocal",level:2},{value:"JSON",id:"json",level:2},{value:"JSONP",id:"jsonp",level:2},{value:"Links",id:"links",level:2},{value:"Locals",id:"locals",level:2},{value:"Location",id:"location",level:2},{value:"Method",id:"method",level:2},{value:"MultipartForm",id:"multipartform",level:2},{value:"Next",id:"next",level:2},{value:"OriginalURL",id:"originalurl",level:2},{value:"Params",id:"params",level:2},{value:"ParamsInt",id:"paramsint",level:2},{value:"ParamsParser",id:"paramsparser",level:2},{value:"Path",id:"path",level:2},{value:"Protocol",id:"protocol",level:2},{value:"Queries",id:"queries",level:2},{value:"Query",id:"query",level:2},{value:"QueryBool",id:"querybool",level:2},{value:"QueryFloat",id:"queryfloat",level:2},{value:"QueryInt",id:"queryint",level:2},{value:"QueryParser",id:"queryparser",level:2},{value:"Range",id:"range",level:2},{value:"Redirect",id:"redirect",level:2},{value:"RedirectToRoute",id:"redirecttoroute",level:2},{value:"RedirectBack",id:"redirectback",level:2},{value:"Render",id:"render",level:2},{value:"Request",id:"request",level:2},{value:"ReqHeaderParser",id:"reqheaderparser",level:2},{value:"Response",id:"response",level:2},{value:"RestartRouting",id:"restartrouting",level:2},{value:"Route",id:"route",level:2},{value:"SaveFile",id:"savefile",level:2},{value:"SaveFileToStorage",id:"savefiletostorage",level:2},{value:"Secure",id:"secure",level:2},{value:"Send",id:"send",level:2},{value:"SendFile",id:"sendfile",level:2},{value:"SendStatus",id:"sendstatus",level:2},{value:"Set",id:"set",level:2},{value:"SetParserDecoder",id:"setparserdecoder",level:2},{value:"SetUserContext",id:"setusercontext",level:2},{value:"Stale",id:"stale",level:2},{value:"Status",id:"status",level:2},{value:"Subdomains",id:"subdomains",level:2},{value:"Type",id:"type",level:2},{value:"UserContext",id:"usercontext",level:2},{value:"Vary",id:"vary",level:2},{value:"Write",id:"write",level:2},{value:"Writef",id:"writef",level:2},{value:"WriteString",id:"writestring",level:2},{value:"XHR",id:"xhr",level:2},{value:"XML",id:"xml",level:2}],m={toc:s},u="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"accepts"},"Accepts"),(0,r.kt)("p",null,"Checks, if the specified ",(0,r.kt)("strong",{parentName:"p"},"extensions")," or ",(0,r.kt)("strong",{parentName:"p"},"content")," ",(0,r.kt)("strong",{parentName:"p"},"types")," are acceptable."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Based on the request\u2019s ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept"},"Accept")," HTTP header.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Accepts(offers ...string) string\nfunc (c *Ctx) AcceptsCharsets(offers ...string) string\nfunc (c *Ctx) AcceptsEncodings(offers ...string) string\nfunc (c *Ctx) AcceptsLanguages(offers ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Accept: text/html, application/json; q=0.8, text/plain; q=0.5; charset="utf-8"\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Accepts("html") // "html"\n c.Accepts("text/html") // "text/html"\n c.Accepts("json", "text") // "json"\n c.Accepts("application/json") // "application/json"\n c.Accepts("text/plain", "application/json") // "application/json", due to quality\n c.Accepts("image/png") // ""\n c.Accepts("png") // ""\n // ...\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example 2"',title:'"Example','2"':!0},'// Accept: text/html, text/*, application/json, */*; q=0\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Accepts("text/plain", "application/json") // "application/json", due to specificity\n c.Accepts("application/json", "text/html") // "text/html", due to first match\n c.Accepts("image/png") // "", due to */* without q factor 0 is Not Acceptable\n // ...\n})\n')),(0,r.kt)("p",null,"Fiber provides similar functions for the other accept headers."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Accept-Charset: utf-8, iso-8859-1;q=0.2\n// Accept-Encoding: gzip, compress;q=0.2\n// Accept-Language: en;q=0.8, nl, ru\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.AcceptsCharsets("utf-16", "iso-8859-1") \n // "iso-8859-1"\n\n c.AcceptsEncodings("compress", "br") \n // "compress"\n\n c.AcceptsLanguages("pt", "nl", "ru") \n // "nl"\n // ...\n})\n')),(0,r.kt)("h2",{id:"allparams"},"AllParams"),(0,r.kt)("p",null,"Params is used to get all route parameters.\nUsing Params method to get params."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) AllParams() map[string]string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/user/fenny\napp.Get("/user/:name", func(c *fiber.Ctx) error {\n c.AllParams() // "{"name": "fenny"}"\n\n // ...\n})\n\n// GET http://example.com/user/fenny/123\napp.Get("/user/*", func(c *fiber.Ctx) error {\n c.AllParams() // "{"*1": "fenny/123"}"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"app"},"App"),(0,r.kt)("p",null,"Returns the ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},"*","App")," reference so you could easily access all application settings."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) App() *App\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/stack", func(c *fiber.Ctx) error {\n return c.JSON(c.App().Stack())\n})\n')),(0,r.kt)("h2",{id:"append"},"Append"),(0,r.kt)("p",null,"Appends the specified ",(0,r.kt)("strong",{parentName:"p"},"value")," to the HTTP response header field."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"If the header is ",(0,r.kt)("strong",{parentName:"p"},"not")," already set, it creates the header with the specified value.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Append(field string, values ...string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Append("Link", "http://google.com", "http://localhost")\n // => Link: http://localhost, http://google.com\n\n c.Append("Link", "Test")\n // => Link: http://localhost, http://google.com, Test\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"attachment"},"Attachment"),(0,r.kt)("p",null,"Sets the HTTP response ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition"},"Content-Disposition")," header field to ",(0,r.kt)("inlineCode",{parentName:"p"},"attachment"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Attachment(filename ...string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Attachment()\n // => Content-Disposition: attachment\n\n c.Attachment("./upload/images/logo.png")\n // => Content-Disposition: attachment; filename="logo.png"\n // => Content-Type: image/png\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"baseurl"},"BaseURL"),(0,r.kt)("p",null,"Returns the base URL ","(",(0,r.kt)("strong",{parentName:"p"},"protocol")," + ",(0,r.kt)("strong",{parentName:"p"},"host"),")"," as a ",(0,r.kt)("inlineCode",{parentName:"p"},"string"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) BaseURL() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET https://example.com/page#chapter-1\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.BaseURL() // https://example.com\n // ...\n})\n')),(0,r.kt)("h2",{id:"bind"},"Bind"),(0,r.kt)("p",null,"Add vars to default view var map binding to template engine.\nVariables are read by the Render method and may be overwritten."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Bind(vars Map) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Use(func(c *fiber.Ctx) error {\n c.Bind(fiber.Map{\n "Title": "Hello, World!",\n })\n})\n\napp.Get("/", func(c *fiber.Ctx) error {\n return c.Render("xxx.tmpl", fiber.Map{}) // Render will use Title variable\n})\n')),(0,r.kt)("h2",{id:"body"},"Body"),(0,r.kt)("p",null,"Returns the raw request ",(0,r.kt)("strong",{parentName:"p"},"body"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Body() []byte\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// curl -X POST http://localhost:8080 -d user=john\n\napp.Post("/", func(c *fiber.Ctx) error {\n // Get raw body from POST request:\n return c.Send(c.Body()) // []byte("user=john")\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"bodyparser"},"BodyParser"),(0,r.kt)("p",null,"Binds the request body to a struct."),(0,r.kt)("p",null,"It is important to specify the correct struct tag based on the content type to be parsed. For example, if you want to parse a JSON body with a field called Pass, you would use a struct field of ",(0,r.kt)("inlineCode",{parentName:"p"},'json:"pass"'),"."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"content-type"),(0,r.kt)("th",{parentName:"tr",align:null},"struct tag"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"application/x-www-form-urlencoded")),(0,r.kt)("td",{parentName:"tr",align:null},"form")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"multipart/form-data")),(0,r.kt)("td",{parentName:"tr",align:null},"form")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"application/json")),(0,r.kt)("td",{parentName:"tr",align:null},"json")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"application/xml")),(0,r.kt)("td",{parentName:"tr",align:null},"xml")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"text/xml")),(0,r.kt)("td",{parentName:"tr",align:null},"xml")))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) BodyParser(out interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Field names should start with an uppercase letter\ntype Person struct {\n Name string `json:"name" xml:"name" form:"name"`\n Pass string `json:"pass" xml:"pass" form:"pass"`\n}\n\napp.Post("/", func(c *fiber.Ctx) error {\n p := new(Person)\n\n if err := c.BodyParser(p); err != nil {\n return err\n }\n\n log.Println(p.Name) // john\n log.Println(p.Pass) // doe\n\n // ...\n})\n\n// Run tests with the following curl commands\n\n// curl -X POST -H "Content-Type: application/json" --data "{\\"name\\":\\"john\\",\\"pass\\":\\"doe\\"}" localhost:3000\n\n// curl -X POST -H "Content-Type: application/xml" --data "johndoe" localhost:3000\n\n// curl -X POST -H "Content-Type: application/x-www-form-urlencoded" --data "name=john&pass=doe" localhost:3000\n\n// curl -X POST -F name=john -F pass=doe http://localhost:3000\n\n// curl -X POST "http://localhost:3000/?name=john&pass=doe"\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"clearcookie"},"ClearCookie"),(0,r.kt)("p",null,"Expire a client cookie ","(",(0,r.kt)("em",{parentName:"p"},"or all cookies if left empty",")")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) ClearCookie(key ...string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // Clears all cookies:\n c.ClearCookie()\n\n // Expire specific cookie by name:\n c.ClearCookie("user")\n\n // Expire multiple cookies by names:\n c.ClearCookie("token", "session", "track_id", "version")\n // ...\n})\n')),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Web browsers and other compliant clients will only clear the cookie if the given options are identical to those when creating the cookie, excluding expires and maxAge. ClearCookie will not set these values for you - a technique similar to the one shown below should be used to ensure your cookie is deleted.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/set", func(c *fiber.Ctx) error {\n c.Cookie(&fiber.Cookie{\n Name: "token",\n Value: "randomvalue",\n Expires: time.Now().Add(24 * time.Hour),\n HTTPOnly: true,\n SameSite: "lax",\n })\n\n // ...\n})\n\napp.Get("/delete", func(c *fiber.Ctx) error {\n c.Cookie(&fiber.Cookie{\n Name: "token",\n // Set expiry date to the past\n Expires: time.Now().Add(-(time.Hour * 2)),\n HTTPOnly: true,\n SameSite: "lax",\n })\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"clienthelloinfo"},"ClientHelloInfo"),(0,r.kt)("p",null,"ClientHelloInfo contains information from a ClientHello message in order to guide application logic in the GetCertificate and GetConfigForClient callbacks.\nYou can refer to the ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/pkg/crypto/tls/#ClientHelloInfo"},"ClientHelloInfo")," struct documentation for more information on the returned struct."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) ClientHelloInfo() *tls.ClientHelloInfo\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/hello\napp.Get("/hello", func(c *fiber.Ctx) error {\n chi := c.ClientHelloInfo()\n // ...\n})\n')),(0,r.kt)("h2",{id:"context"},"Context"),(0,r.kt)("p",null,"Returns ",(0,r.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/valyala/fasthttp#RequestCtx"},"*","fasthttp.RequestCtx")," that is compatible with the context.Context interface that requires a deadline, a cancellation signal, and other values across API boundaries."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Context() *fasthttp.RequestCtx\n")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Please read the ",(0,r.kt)("a",{parentName:"p",href:"https://pkg.go.dev/github.com/valyala/fasthttp?tab=doc"},"Fasthttp Documentation")," for more information.")),(0,r.kt)("h2",{id:"cookie"},"Cookie"),(0,r.kt)("p",null,"Set cookie"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Cookie(cookie *Cookie)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Cookie struct {\n Name string `json:"name"`\n Value string `json:"value"`\n Path string `json:"path"`\n Domain string `json:"domain"`\n MaxAge int `json:"max_age"`\n Expires time.Time `json:"expires"`\n Secure bool `json:"secure"`\n HTTPOnly bool `json:"http_only"`\n SameSite string `json:"same_site"`\n SessionOnly bool `json:"session_only"`\n}\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // Create cookie\n cookie := new(fiber.Cookie)\n cookie.Name = "john"\n cookie.Value = "doe"\n cookie.Expires = time.Now().Add(24 * time.Hour)\n\n // Set cookie\n c.Cookie(cookie)\n // ...\n})\n')),(0,r.kt)("h2",{id:"cookies"},"Cookies"),(0,r.kt)("p",null,"Get cookie value by key, you could pass an optional default value that will be returned if the cookie key does not exist."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Cookies(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // Get cookie by key:\n c.Cookies("name") // "john"\n c.Cookies("empty", "doe") // "doe"\n // ...\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"download"},"Download"),(0,r.kt)("p",null,"Transfers the file from path as an ",(0,r.kt)("inlineCode",{parentName:"p"},"attachment"),"."),(0,r.kt)("p",null,"Typically, browsers will prompt the user to download. By default, the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition"},"Content-Disposition")," header ",(0,r.kt)("inlineCode",{parentName:"p"},"filename=")," parameter is the file path ","(",(0,r.kt)("em",{parentName:"p"},"this typically appears in the browser dialog"),")","."),(0,r.kt)("p",null,"Override this default with the ",(0,r.kt)("strong",{parentName:"p"},"filename")," parameter."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Download(file string, filename ...string) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return c.Download("./files/report-12345.pdf");\n // => Download report-12345.pdf\n\n return c.Download("./files/report-12345.pdf", "report.pdf");\n // => Download report.pdf\n})\n')),(0,r.kt)("h2",{id:"format"},"Format"),(0,r.kt)("p",null,"Performs content-negotiation on the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept"},"Accept")," HTTP header. It uses ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#accepts"},"Accepts")," to select a proper format."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If the header is ",(0,r.kt)("strong",{parentName:"p"},"not")," specified or there is ",(0,r.kt)("strong",{parentName:"p"},"no")," proper format, ",(0,r.kt)("strong",{parentName:"p"},"text/plain")," is used.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Format(body interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // Accept: text/plain\n c.Format("Hello, World!")\n // => Hello, World!\n\n // Accept: text/html\n c.Format("Hello, World!")\n // =>

Hello, World!

\n\n // Accept: application/json\n c.Format("Hello, World!")\n // => "Hello, World!"\n // ..\n})\n')),(0,r.kt)("h2",{id:"formfile"},"FormFile"),(0,r.kt)("p",null,"MultipartForm files can be retrieved by name, the ",(0,r.kt)("strong",{parentName:"p"},"first")," file from the given key is returned."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) FormFile(key string) (*multipart.FileHeader, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n // Get first file from form field "document":\n file, err := c.FormFile("document")\n\n // Save file to root directory:\n return c.SaveFile(file, fmt.Sprintf("./%s", file.Filename))\n})\n')),(0,r.kt)("h2",{id:"formvalue"},"FormValue"),(0,r.kt)("p",null,"Any form values can be retrieved by name, the ",(0,r.kt)("strong",{parentName:"p"},"first")," value from the given key is returned."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) FormValue(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n // Get first value from form field "name":\n c.FormValue("name")\n // => "john" or "" if not exist\n\n // ..\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"fresh"},"Fresh"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://expressjs.com/en/4x/api.html#req.fresh"},"https://expressjs.com/en/4x/api.html","#","req.fresh")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Fresh() bool\n")),(0,r.kt)("h2",{id:"get"},"Get"),(0,r.kt)("p",null,"Returns the HTTP request header specified by the field."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"The match is ",(0,r.kt)("strong",{parentName:"p"},"case-insensitive"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Get(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Get("Content-Type") // "text/plain"\n c.Get("CoNtEnT-TypE") // "text/plain"\n c.Get("something", "john") // "john"\n // ..\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"getreqheaders"},"GetReqHeaders"),(0,r.kt)("p",null,"Returns the HTTP request headers."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) GetReqHeaders() map[string]string\n")),(0,r.kt)("h2",{id:"getrespheader"},"GetRespHeader"),(0,r.kt)("p",null,"Returns the HTTP response header specified by the field."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"The match is ",(0,r.kt)("strong",{parentName:"p"},"case-insensitive"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) GetRespHeader(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.GetRespHeader("X-Request-Id") // "8d7ad5e3-aaf3-450b-a241-2beb887efd54"\n c.GetRespHeader("Content-Type") // "text/plain"\n c.GetRespHeader("something", "john") // "john"\n // ..\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"getrespheaders"},"GetRespHeaders"),(0,r.kt)("p",null,"Returns the HTTP response headers."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) GetRespHeaders() map[string]string\n")),(0,r.kt)("h2",{id:"getrouteurl"},"GetRouteURL"),(0,r.kt)("p",null,'Generates URLs to named routes, with parameters. URLs are relative, for example: "/user/1831"'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) GetRouteURL(routeName string, params Map) (string, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Home page")\n}).Name("home")\n\napp.Get("/user/:id", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("id"))\n}).Name("user.show")\n\napp.Get("/test", func(c *fiber.Ctx) error {\n location, _ := c.GetRouteURL("user.show", fiber.Map{"id": 1})\n return c.SendString(location)\n})\n\n// /test returns "/user/1"\n')),(0,r.kt)("h2",{id:"hostname"},"Hostname"),(0,r.kt)("p",null,"Returns the hostname derived from the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Host"},"Host")," HTTP header."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Hostname() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://google.com/search\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Hostname() // "google.com"\n\n // ...\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"ip"},"IP"),(0,r.kt)("p",null,"Returns the remote IP address of the request."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) IP() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.IP() // "127.0.0.1"\n\n // ...\n})\n')),(0,r.kt)("p",null,"When registering the proxy request header in the fiber app, the ip address of the header is returned ",(0,r.kt)("a",{parentName:"p",href:"/next/api/fiber#config"},"(Fiber configuration)")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"app := fiber.New(fiber.Config{\n ProxyHeader: fiber.HeaderXForwardedFor,\n})\n")),(0,r.kt)("h2",{id:"ips"},"IPs"),(0,r.kt)("p",null,"Returns an array of IP addresses specified in the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For"},"X-Forwarded-For")," request header."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) IPs() []string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// X-Forwarded-For: proxy1, 127.0.0.1, proxy3\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.IPs() // ["proxy1", "127.0.0.1", "proxy3"]\n\n // ...\n})\n')),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Improper use of the X-Forwarded-For header can be a security risk. For details, see the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#security_and_privacy_concerns"},"Security and privacy concerns")," section.")),(0,r.kt)("h2",{id:"is"},"Is"),(0,r.kt)("p",null,"Returns the matching ",(0,r.kt)("strong",{parentName:"p"},"content type"),", if the incoming request\u2019s ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type"},"Content-Type")," HTTP header field matches the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/ru/docs/Web/HTTP/Basics_of_HTTP/MIME_types"},"MIME type")," specified by the type parameter."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If the request has ",(0,r.kt)("strong",{parentName:"p"},"no")," body, it returns ",(0,r.kt)("strong",{parentName:"p"},"false"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Is(extension string) bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Content-Type: text/html; charset=utf-8\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Is("html") // true\n c.Is(".html") // true\n c.Is("json") // false\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"isfromlocal"},"IsFromLocal"),(0,r.kt)("p",null,"Returns true if request came from localhost"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) IsFromLocal() bool {\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'\napp.Get("/", func(c *fiber.Ctx) error {\n // If request came from localhost, return true else return false\n c.IsFromLocal()\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"json"},"JSON"),(0,r.kt)("p",null,"Converts any ",(0,r.kt)("strong",{parentName:"p"},"interface")," or ",(0,r.kt)("strong",{parentName:"p"},"string")," to JSON using the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/goccy/go-json"},"goccy/go-json")," package."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"JSON also sets the content header to ",(0,r.kt)("strong",{parentName:"p"},"application/json"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) JSON(data interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'type SomeStruct struct {\n Name string\n Age uint8\n}\n\napp.Get("/json", func(c *fiber.Ctx) error {\n // Create data struct:\n data := SomeStruct{\n Name: "Grame",\n Age: 20,\n }\n\n return c.JSON(data)\n // => Content-Type: application/json\n // => "{"Name": "Grame", "Age": 20}"\n\n return c.JSON(fiber.Map{\n "name": "Grame",\n "age": 20,\n })\n // => Content-Type: application/json\n // => "{"name": "Grame", "age": 20}"\n})\n')),(0,r.kt)("h2",{id:"jsonp"},"JSONP"),(0,r.kt)("p",null,"Sends a JSON response with JSONP support. This method is identical to ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#json"},"JSON"),", except that it opts-in to JSONP callback support. By default, the callback name is simply callback."),(0,r.kt)("p",null,"Override this by passing a ",(0,r.kt)("strong",{parentName:"p"},"named string")," in the method."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) JSONP(data interface{}, callback ...string) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'type SomeStruct struct {\n name string\n age uint8\n}\n\napp.Get("/", func(c *fiber.Ctx) error {\n // Create data struct:\n data := SomeStruct{\n name: "Grame",\n age: 20,\n }\n\n return c.JSONP(data)\n // => callback({"name": "Grame", "age": 20})\n\n return c.JSONP(data, "customFunc")\n // => customFunc({"name": "Grame", "age": 20})\n})\n')),(0,r.kt)("h2",{id:"links"},"Links"),(0,r.kt)("p",null,"Joins the links followed by the property to populate the response\u2019s ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link"},"Link")," HTTP header field."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Links(link ...string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Links(\n "http://api.example.com/users?page=2", "next",\n "http://api.example.com/users?page=5", "last",\n )\n // Link: ; rel="next",\n // ; rel="last"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"locals"},"Locals"),(0,r.kt)("p",null,"A method that stores variables scoped to the request and, therefore, are available only to the routes that match the request."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"This is useful if you want to pass some ",(0,r.kt)("strong",{parentName:"p"},"specific")," data to the next middleware.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Locals(key interface{}, value ...interface{}) interface{}\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Use(func(c *fiber.Ctx) error {\n c.Locals("user", "admin")\n return c.Next()\n})\n\napp.Get("/admin", func(c *fiber.Ctx) error {\n if c.Locals("user") == "admin" {\n return c.Status(fiber.StatusOK).SendString("Welcome, admin!")\n }\n return c.SendStatus(fiber.StatusForbidden)\n\n})\n')),(0,r.kt)("h2",{id:"location"},"Location"),(0,r.kt)("p",null,"Sets the response ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/ru/docs/Web/HTTP/Headers/Location"},"Location")," HTTP header to the specified path parameter."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Location(path string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n c.Location("http://example.com")\n\n c.Location("/foo/bar")\n \n return nil\n})\n')),(0,r.kt)("h2",{id:"method"},"Method"),(0,r.kt)("p",null,"Returns a string corresponding to the HTTP method of the request: ",(0,r.kt)("inlineCode",{parentName:"p"},"GET"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"POST"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"PUT"),", and so on.",(0,r.kt)("br",{parentName:"p"}),"\n","Optionally, you could override the method by passing a string."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Method(override ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n c.Method() // "POST"\n\n c.Method("GET")\n c.Method() // GET\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"multipartform"},"MultipartForm"),(0,r.kt)("p",null,"To access multipart form entries, you can parse the binary with ",(0,r.kt)("inlineCode",{parentName:"p"},"MultipartForm()"),". This returns a ",(0,r.kt)("inlineCode",{parentName:"p"},"map[string][]string"),", so given a key, the value will be a string slice."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) MultipartForm() (*multipart.Form, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n // Parse the multipart form:\n if form, err := c.MultipartForm(); err == nil {\n // => *multipart.Form\n\n if token := form.Value["token"]; len(token) > 0 {\n // Get key value:\n fmt.Println(token[0])\n }\n\n // Get all files from "documents" key:\n files := form.File["documents"]\n // => []*multipart.FileHeader\n\n // Loop through files:\n for _, file := range files {\n fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])\n // => "tutorial.pdf" 360641 "application/pdf"\n\n // Save the files to disk:\n if err := c.SaveFile(file, fmt.Sprintf("./%s", file.Filename)); err != nil {\n return err\n }\n }\n }\n\n return err\n})\n')),(0,r.kt)("h2",{id:"next"},"Next"),(0,r.kt)("p",null,"When ",(0,r.kt)("strong",{parentName:"p"},"Next")," is called, it executes the next method in the stack that matches the current route. You can pass an error struct within the method that will end the chaining and call the ",(0,r.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/guide/error-handling"},"error handler"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Next() error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n fmt.Println("1st route!")\n return c.Next()\n})\n\napp.Get("*", func(c *fiber.Ctx) error {\n fmt.Println("2nd route!")\n return c.Next()\n})\n\napp.Get("/", func(c *fiber.Ctx) error {\n fmt.Println("3rd route!")\n return c.SendString("Hello, World!")\n})\n')),(0,r.kt)("h2",{id:"originalurl"},"OriginalURL"),(0,r.kt)("p",null,"Returns the original request URL."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) OriginalURL() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/search?q=something\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.OriginalURL() // "/search?q=something"\n\n // ...\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"params"},"Params"),(0,r.kt)("p",null,"Method can be used to get the route parameters, you could pass an optional default value that will be returned if the param key does not exist."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Defaults to empty string ","(",(0,r.kt)("inlineCode",{parentName:"p"},'""'),")",", if the param ",(0,r.kt)("strong",{parentName:"p"},"doesn't")," exist.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Params(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/user/fenny\napp.Get("/user/:name", func(c *fiber.Ctx) error {\n c.Params("name") // "fenny"\n\n // ...\n})\n\n// GET http://example.com/user/fenny/123\napp.Get("/user/*", func(c *fiber.Ctx) error {\n c.Params("*") // "fenny/123"\n c.Params("*1") // "fenny/123"\n\n // ...\n})\n')),(0,r.kt)("p",null,"Unnamed route parameters","(","*",", +",")"," can be fetched by the ",(0,r.kt)("strong",{parentName:"p"},"character")," and the ",(0,r.kt)("strong",{parentName:"p"},"counter")," in the route."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// ROUTE: /v1/*/shop/*\n// GET: /v1/brand/4/shop/blue/xs\nc.Params("*1") // "brand/4"\nc.Params("*2") // "blue/xs"\n')),(0,r.kt)("p",null,"For reasons of ",(0,r.kt)("strong",{parentName:"p"},"downward compatibility"),", the first parameter segment for the parameter character can also be accessed without the counter."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/v1/*/shop/*", func(c *fiber.Ctx) error {\n c.Params("*") // outputs the values of the first wildcard segment\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"paramsint"},"ParamsInt"),(0,r.kt)("p",null,"Method can be used to get an integer from the route parameters.\nPlease note if that parameter is not in the request, zero\nwill be returned. If the parameter is NOT a number, zero and an error\nwill be returned"),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Defaults to the integer zero ","(",(0,r.kt)("inlineCode",{parentName:"p"},"0"),")",", if the param ",(0,r.kt)("strong",{parentName:"p"},"doesn't")," exist.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) ParamsInt(key string) (int, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/user/123\napp.Get("/user/:id", func(c *fiber.Ctx) error {\n id, err := c.ParamsInt("id") // int 123 and no error\n\n // ...\n})\n\n')),(0,r.kt)("p",null,"This method is equivalent of using ",(0,r.kt)("inlineCode",{parentName:"p"},"atoi")," with ctx.Params"),(0,r.kt)("h2",{id:"paramsparser"},"ParamsParser"),(0,r.kt)("p",null,'This method is similar to BodyParser, but for path parameters. It is important to use the struct tag "params". For example, if you want to parse a path parameter with a field called Pass, you would use a struct field of params:"pass"'),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) ParamsParser(out interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/user/111\napp.Get("/user/:id", func(c *fiber.Ctx) error {\n param := struct {ID uint `params:"id"`}{}\n \n c.ParamsParser(¶m) // "{"id": 111}"\n\n // ...\n})\n\n')),(0,r.kt)("h2",{id:"path"},"Path"),(0,r.kt)("p",null,"Contains the path part of the request URL. Optionally, you could override the path by passing a string. For internal redirects, you might want to call ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#restartrouting"},"RestartRouting")," instead of ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#next"},"Next"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Path(override ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/users?sort=desc\n\napp.Get("/users", func(c *fiber.Ctx) error {\n c.Path() // "/users"\n\n c.Path("/john")\n c.Path() // "/john"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"protocol"},"Protocol"),(0,r.kt)("p",null,"Contains the request protocol string: ",(0,r.kt)("inlineCode",{parentName:"p"},"http")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"https")," for ",(0,r.kt)("strong",{parentName:"p"},"TLS")," requests."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Protocol() string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Protocol() // "http"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"queries"},"Queries"),(0,r.kt)("p",null,"Queries is a function that returns an object containing a property for each query string parameter in the route."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Queries() map[string]string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?name=alex&want_pizza=false&id=\n\napp.Get("/", func(c *fiber.Ctx) error {\n m := c.Queries()\n m["name"] // "alex"\n m["want_pizza"] // "false"\n m["id"] // ""\n // ...\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?field1=value1&field1=value2&field2=value3\n\napp.Get("/", func (c *fiber.Ctx) error {\n m := c.Queries()\n m["field1"] // "value2"\n m["field2"] // value3\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?list_a=1&list_a=2&list_a=3&list_b[]=1&list_b[]=2&list_b[]=3&list_c=1,2,3\n\napp.Get("/", func(c *fiber.Ctx) error {\n m := c.Queries()\n m["list_a"] // "3"\n m["list_b[]"] // "3"\n m["list_c"] // "1,2,3"\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET /api/posts?filters.author.name=John&filters.category.name=Technology\n\napp.Get("/", func(c *fiber.Ctx) error {\n m := c.Queries()\n m["filters.author.name"] // John\n m["filters.category.name"] // Technology\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET /api/posts?tags=apple,orange,banana&filters[tags]=apple,orange,banana&filters[category][name]=fruits&filters.tags=apple,orange,banana&filters.category.name=fruits\n\napp.Get("/", func(c *fiber.Ctx) error {\n m := c.Queries()\n m["tags"] // apple,orange,banana\n m["filters[tags]"] // apple,orange,banana\n m["filters[category][name]"] // fruits\n m["filters.tags"] // apple,orange,banana\n m["filters.category.name"] // fruits\n})\n')),(0,r.kt)("h2",{id:"query"},"Query"),(0,r.kt)("p",null,"This property is an object containing a property for each query string parameter in the route, you could pass an optional default value that will be returned if the query key does not exist."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If there is ",(0,r.kt)("strong",{parentName:"p"},"no")," query string, it returns an ",(0,r.kt)("strong",{parentName:"p"},"empty string"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Query(key string, defaultValue ...string) string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?order=desc&brand=nike\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Query("order") // "desc"\n c.Query("brand") // "nike"\n c.Query("empty", "nike") // "nike"\n\n // ...\n})\n')),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("em",{parentName:"p"},"Returned value is only valid within the handler. Do not store any references.",(0,r.kt)("br",{parentName:"em"}),"Make copies or use the")," ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx"},(0,r.kt)("em",{parentName:"a"},(0,r.kt)("strong",{parentName:"em"},(0,r.kt)("inlineCode",{parentName:"strong"},"Immutable"))))," ",(0,r.kt)("em",{parentName:"p"},"setting instead.")," ",(0,r.kt)("a",{parentName:"p",href:"../#zero-allocation"},(0,r.kt)("em",{parentName:"a"},"Read more...")))),(0,r.kt)("h2",{id:"querybool"},"QueryBool"),(0,r.kt)("p",null,"This property is an object containing a property for each query boolean parameter in the route, you could pass an optional default value that will be returned if the query key does not exist."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Please note if that parameter is not in the request, false will be returned.\nIf the parameter is not a boolean, it is still tried to be converted and usually returned as false.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) QueryBool(key string, defaultValue ...bool) bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?name=alex&want_pizza=false&id=\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.QueryBool("want_pizza") // false\n c.QueryBool("want_pizza", true) // false\n c.QueryBool("name") // false\n c.QueryBool("name", true) // true\n c.QueryBool("id") // false\n c.QueryBool("id", true) // true\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"queryfloat"},"QueryFloat"),(0,r.kt)("p",null,"This property is an object containing a property for each query float64 parameter in the route, you could pass an optional default value that will be returned if the query key does not exist."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Please note if that parameter is not in the request, zero will be returned.\nIf the parameter is not a number, it is still tried to be converted and usually returned as 1.")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Defaults to the float64 zero ","(",(0,r.kt)("inlineCode",{parentName:"p"},"0"),")",", if the param ",(0,r.kt)("strong",{parentName:"p"},"doesn't")," exist.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) QueryFloat(key string, defaultValue ...float64) float64\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?name=alex&amount=32.23&id=\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.QueryFloat("amount") // 32.23\n c.QueryFloat("amount", 3) // 32.23\n c.QueryFloat("name", 1) // 1\n c.QueryFloat("name") // 0\n c.QueryFloat("id", 3) // 3\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"queryint"},"QueryInt"),(0,r.kt)("p",null,"This property is an object containing a property for each query integer parameter in the route, you could pass an optional default value that will be returned if the query key does not exist."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Please note if that parameter is not in the request, zero will be returned.\nIf the parameter is not a number, it is still tried to be converted and usually returned as 1.")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Defaults to the integer zero ","(",(0,r.kt)("inlineCode",{parentName:"p"},"0"),")",", if the param ",(0,r.kt)("strong",{parentName:"p"},"doesn't")," exist.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) QueryInt(key string, defaultValue ...int) int\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// GET http://example.com/?name=alex&wanna_cake=2&id=\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.QueryInt("wanna_cake", 1) // 2\n c.QueryInt("name", 1) // 1\n c.QueryInt("id", 1) // 1\n c.QueryInt("id") // 0\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"queryparser"},"QueryParser"),(0,r.kt)("p",null,"This method is similar to ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#bodyparser"},"BodyParser"),', but for query parameters.\nIt is important to use the struct tag "query". For example, if you want to parse a query parameter with a field called Pass, you would use a struct field of ',(0,r.kt)("inlineCode",{parentName:"p"},'query:"pass"'),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) QueryParser(out interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Field names should start with an uppercase letter\ntype Person struct {\n Name string `query:"name"`\n Pass string `query:"pass"`\n Products []string `query:"products"`\n}\n\napp.Get("/", func(c *fiber.Ctx) error {\n p := new(Person)\n\n if err := c.QueryParser(p); err != nil {\n return err\n }\n\n log.Println(p.Name) // john\n log.Println(p.Pass) // doe\n log.Println(p.Products) // [shoe, hat]\n\n // ...\n})\n// Run tests with the following curl command\n\n// curl "http://localhost:3000/?name=john&pass=doe&products=shoe,hat"\n')),(0,r.kt)("h2",{id:"range"},"Range"),(0,r.kt)("p",null,"A struct containing the type and a slice of ranges will be returned."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Range(size int) (Range, error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Range: bytes=500-700, 700-900\napp.Get("/", func(c *fiber.Ctx) error {\n b := c.Range(1000)\n if b.Type == "bytes" {\n for r := range r.Ranges {\n fmt.Println(r)\n // [500, 700]\n }\n }\n})\n')),(0,r.kt)("h2",{id:"redirect"},"Redirect"),(0,r.kt)("p",null,"Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If ",(0,r.kt)("strong",{parentName:"p"},"not")," specified, status defaults to ",(0,r.kt)("strong",{parentName:"p"},"302 Found"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Redirect(location string, status ...int) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/coffee", func(c *fiber.Ctx) error {\n return c.Redirect("/teapot")\n})\n\napp.Get("/teapot", func(c *fiber.Ctx) error {\n return c.Status(fiber.StatusTeapot).Send("\ud83c\udf75 short and stout \ud83c\udf75")\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="More examples"',title:'"More','examples"':!0},'app.Get("/", func(c *fiber.Ctx) error {\n return c.Redirect("/foo/bar")\n return c.Redirect("../login")\n return c.Redirect("http://example.com")\n return c.Redirect("http://example.com", 301)\n})\n')),(0,r.kt)("h2",{id:"redirecttoroute"},"RedirectToRoute"),(0,r.kt)("p",null,"Redirects to the specific route along with the parameters and with specified status, a positive integer that corresponds to an HTTP status code."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If ",(0,r.kt)("strong",{parentName:"p"},"not")," specified, status defaults to ",(0,r.kt)("strong",{parentName:"p"},"302 Found"),".")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If you want to send queries to route, you must add ",(0,r.kt)("strong",{parentName:"p"},'"queries"')," key typed as ",(0,r.kt)("strong",{parentName:"p"},"map","[string]","string")," to params.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) RedirectToRoute(routeName string, params fiber.Map, status ...int) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // /user/fiber\n return c.RedirectToRoute("user", fiber.Map{\n "name": "fiber"\n })\n})\n\napp.Get("/with-queries", func(c *fiber.Ctx) error {\n // /user/fiber?data[0][name]=john&data[0][age]=10&test=doe\n return c.RedirectToRoute("user", fiber.Map{\n "name": "fiber",\n "queries": map[string]string{"data[0][name]": "john", "data[0][age]": "10", "test": "doe"},\n })\n})\n\napp.Get("/user/:name", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("name"))\n}).Name("user")\n')),(0,r.kt)("h2",{id:"redirectback"},"RedirectBack"),(0,r.kt)("p",null,"Redirects back to refer URL. It redirects to fallback URL if refer header doesn't exists, with specified status, a positive integer that corresponds to an HTTP status code."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If ",(0,r.kt)("strong",{parentName:"p"},"not")," specified, status defaults to ",(0,r.kt)("strong",{parentName:"p"},"302 Found"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) RedirectBack(fallback string, status ...int) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Home page")\n})\napp.Get("/test", func(c *fiber.Ctx) error {\n c.Set("Content-Type", "text/html")\n return c.SendString(`Back`)\n})\n\napp.Get("/back", func(c *fiber.Ctx) error {\n return c.RedirectBack("/")\n})\n')),(0,r.kt)("h2",{id:"render"},"Render"),(0,r.kt)("p",null,"Renders a view with data and sends a ",(0,r.kt)("inlineCode",{parentName:"p"},"text/html")," response. By default ",(0,r.kt)("inlineCode",{parentName:"p"},"Render")," uses the default ",(0,r.kt)("a",{parentName:"p",href:"https://pkg.go.dev/html/template/"},(0,r.kt)("strong",{parentName:"a"},"Go Template engine")),". If you want to use another View engine, please take a look at our ",(0,r.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/template"},(0,r.kt)("strong",{parentName:"a"},"Template middleware")),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Render(name string, bind interface{}, layouts ...string) error\n")),(0,r.kt)("h2",{id:"request"},"Request"),(0,r.kt)("p",null,"Request return the ",(0,r.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/valyala/fasthttp#Request"},"*","fasthttp.Request")," pointer"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Request() *fasthttp.Request\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Request().Header.Method()\n // => []byte("GET")\n})\n')),(0,r.kt)("h2",{id:"reqheaderparser"},"ReqHeaderParser"),(0,r.kt)("p",null,"This method is similar to ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#bodyparser"},"BodyParser"),', but for request headers.\nIt is important to use the struct tag "reqHeader". For example, if you want to parse a request header with a field called Pass, you would use a struct field of ',(0,r.kt)("inlineCode",{parentName:"p"},'reqHeader:"pass"'),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) ReqHeaderParser(out interface{}) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Field names should start with an uppercase letter\ntype Person struct {\n Name string `reqHeader:"name"`\n Pass string `reqHeader:"pass"`\n Products []string `reqHeader:"products"`\n}\n\napp.Get("/", func(c *fiber.Ctx) error {\n p := new(Person)\n\n if err := c.ReqHeaderParser(p); err != nil {\n return err\n }\n\n log.Println(p.Name) // john\n log.Println(p.Pass) // doe\n log.Println(p.Products) // [shoe, hat]\n\n // ...\n})\n// Run tests with the following curl command\n\n// curl "http://localhost:3000/" -H "name: john" -H "pass: doe" -H "products: shoe,hat"\n')),(0,r.kt)("h2",{id:"response"},"Response"),(0,r.kt)("p",null,"Response return the ",(0,r.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/valyala/fasthttp#Response"},"*","fasthttp.Response")," pointer"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Response() *fasthttp.Response\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Response().BodyWriter().Write([]byte("Hello, World!"))\n // => "Hello, World!"\n return nil\n})\n')),(0,r.kt)("h2",{id:"restartrouting"},"RestartRouting"),(0,r.kt)("p",null,"Instead of executing the next method when calling ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#next"},"Next"),", ",(0,r.kt)("strong",{parentName:"p"},"RestartRouting")," restarts execution from the first method that matches the current route. This may be helpful after overriding the path, i. e. an internal redirect. Note that handlers might be executed again which could result in an infinite loop."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) RestartRouting() error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/new", func(c *fiber.Ctx) error {\n return c.SendString("From /new")\n})\n\napp.Get("/old", func(c *fiber.Ctx) error {\n c.Path("/new")\n return c.RestartRouting()\n})\n')),(0,r.kt)("h2",{id:"route"},"Route"),(0,r.kt)("p",null,"Returns the matched ",(0,r.kt)("a",{parentName:"p",href:"https://pkg.go.dev/github.com/gofiber/fiber?tab=doc#Route"},"Route")," struct."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Route() *Route\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// http://localhost:8080/hello\n\n\napp.Get("/hello/:name", func(c *fiber.Ctx) error {\n r := c.Route()\n fmt.Println(r.Method, r.Path, r.Params, r.Handlers)\n // GET /hello/:name handler [name] \n\n // ...\n})\n')),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Do not rely on ",(0,r.kt)("inlineCode",{parentName:"p"},"c.Route()")," in middlewares ",(0,r.kt)("strong",{parentName:"p"},"before")," calling ",(0,r.kt)("inlineCode",{parentName:"p"},"c.Next()")," - ",(0,r.kt)("inlineCode",{parentName:"p"},"c.Route()")," returns the ",(0,r.kt)("strong",{parentName:"p"},"last executed route"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"func MyMiddleware() fiber.Handler {\n return func(c *fiber.Ctx) error {\n beforeNext := c.Route().Path // Will be '/'\n err := c.Next()\n afterNext := c.Route().Path // Will be '/hello/:name'\n return err\n }\n}\n")),(0,r.kt)("h2",{id:"savefile"},"SaveFile"),(0,r.kt)("p",null,"Method is used to save ",(0,r.kt)("strong",{parentName:"p"},"any")," multipart file to disk."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) SaveFile(fh *multipart.FileHeader, path string) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Post("/", func(c *fiber.Ctx) error {\n // Parse the multipart form:\n if form, err := c.MultipartForm(); err == nil {\n // => *multipart.Form\n\n // Get all files from "documents" key:\n files := form.File["documents"]\n // => []*multipart.FileHeader\n\n // Loop through files:\n for _, file := range files {\n fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])\n // => "tutorial.pdf" 360641 "application/pdf"\n\n // Save the files to disk:\n if err := c.SaveFile(file, fmt.Sprintf("./%s", file.Filename)); err != nil {\n return err\n }\n }\n return err\n }\n})\n')),(0,r.kt)("h2",{id:"savefiletostorage"},"SaveFileToStorage"),(0,r.kt)("p",null,"Method is used to save ",(0,r.kt)("strong",{parentName:"p"},"any")," multipart file to an external storage system."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) SaveFileToStorage(fileheader *multipart.FileHeader, path string, storage Storage) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'storage := memory.New()\n\napp.Post("/", func(c *fiber.Ctx) error {\n // Parse the multipart form:\n if form, err := c.MultipartForm(); err == nil {\n // => *multipart.Form\n\n // Get all files from "documents" key:\n files := form.File["documents"]\n // => []*multipart.FileHeader\n\n // Loop through files:\n for _, file := range files {\n fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])\n // => "tutorial.pdf" 360641 "application/pdf"\n\n // Save the files to storage:\n if err := c.SaveFileToStorage(file, fmt.Sprintf("./%s", file.Filename), storage); err != nil {\n return err\n }\n }\n return err\n }\n})\n')),(0,r.kt)("h2",{id:"secure"},"Secure"),(0,r.kt)("p",null,"A boolean property that is ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," , if a ",(0,r.kt)("strong",{parentName:"p"},"TLS")," connection is established."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Secure() bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Secure() method is equivalent to:\nc.Protocol() == "https"\n')),(0,r.kt)("h2",{id:"send"},"Send"),(0,r.kt)("p",null,"Sets the HTTP response body."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Send(body []byte) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return c.Send([]byte("Hello, World!")) // => "Hello, World!"\n})\n')),(0,r.kt)("p",null,"Fiber also provides ",(0,r.kt)("inlineCode",{parentName:"p"},"SendString")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"SendStream")," methods for raw inputs."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Use this if you ",(0,r.kt)("strong",{parentName:"p"},"don't need")," type assertion, recommended for ",(0,r.kt)("strong",{parentName:"p"},"faster")," performance.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) SendString(body string) error\nfunc (c *Ctx) SendStream(stream io.Reader, size ...int) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n // => "Hello, World!"\n\n return c.SendStream(bytes.NewReader([]byte("Hello, World!")))\n // => "Hello, World!"\n})\n')),(0,r.kt)("h2",{id:"sendfile"},"SendFile"),(0,r.kt)("p",null,"Transfers the file from the given path. Sets the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type"},"Content-Type")," response HTTP header field based on the ",(0,r.kt)("strong",{parentName:"p"},"filenames")," extension."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Method doesn\xb4t use ",(0,r.kt)("strong",{parentName:"p"},"gzipping")," by default, set it to ",(0,r.kt)("strong",{parentName:"p"},"true")," to enable.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature" title="Signature"',title:'"Signature"'},"func (c *Ctx) SendFile(file string, compress ...bool) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/not-found", func(c *fiber.Ctx) error {\n return c.SendFile("./public/404.html");\n\n // Disable compression\n return c.SendFile("./static/index.html", false);\n})\n')),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If the file contains an url specific character you have to escape it before passing the file path into the ",(0,r.kt)("inlineCode",{parentName:"p"},"sendFile")," function.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/file-with-url-chars", func(c *fiber.Ctx) error {\n return c.SendFile(url.PathEscape("hash_sign_#.txt"))\n})\n')),(0,r.kt)("h2",{id:"sendstatus"},"SendStatus"),(0,r.kt)("p",null,"Sets the status code and the correct status message in the body, if the response body is ",(0,r.kt)("strong",{parentName:"p"},"empty"),"."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"You can find all used status codes and messages ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/blob/dffab20bcdf4f3597d2c74633a7705a517d2c8c2/utils.go#L183-L244"},"here"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) SendStatus(status int) error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/not-found", func(c *fiber.Ctx) error {\n return c.SendStatus(415)\n // => 415 "Unsupported Media Type"\n\n c.SendString("Hello, World!")\n return c.SendStatus(415)\n // => 415 "Hello, World!"\n})\n')),(0,r.kt)("h2",{id:"set"},"Set"),(0,r.kt)("p",null,"Sets the response\u2019s HTTP header field to the specified ",(0,r.kt)("inlineCode",{parentName:"p"},"key"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"value"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Set(key string, val string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Set("Content-Type", "text/plain")\n // => "Content-type: text/plain"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"setparserdecoder"},"SetParserDecoder"),(0,r.kt)("p",null,"Allow you to config BodyParser/QueryParser decoder, base on schema's options, providing possibility to add custom type for parsing."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func SetParserDecoder(parserConfig fiber.ParserConfig{\n IgnoreUnknownKeys bool,\n ParserType []fiber.ParserType{\n Customtype interface{},\n Converter func(string) reflect.Value,\n },\n ZeroEmpty bool,\n SetAliasTag string,\n})\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'\ntype CustomTime time.Time\n\n// String() returns the time in string\nfunc (ct *CustomTime) String() string {\n t := time.Time(*ct).String()\n return t\n}\n\n// Register the converter for CustomTime type format as 2006-01-02\nvar timeConverter = func(value string) reflect.Value {\n fmt.Println("timeConverter", value)\n if v, err := time.Parse("2006-01-02", value); err == nil {\n return reflect.ValueOf(v)\n }\n return reflect.Value{}\n}\n\ncustomTime := fiber.ParserType{\n Customtype: CustomTime{},\n Converter: timeConverter,\n} \n\n// Add setting to the Decoder\nfiber.SetParserDecoder(fiber.ParserConfig{\n IgnoreUnknownKeys: true,\n ParserType: []fiber.ParserType{customTime},\n ZeroEmpty: true,\n})\n\n// Example to use CustomType, you pause custom time format not in RFC3339\ntype Demo struct {\n Date CustomTime `form:"date" query:"date"`\n Title string `form:"title" query:"title"`\n Body string `form:"body" query:"body"`\n}\n\napp.Post("/body", func(c *fiber.Ctx) error {\n var d Demo\n c.BodyParser(&d)\n fmt.Println("d.Date", d.Date.String())\n return c.JSON(d)\n})\n\napp.Get("/query", func(c *fiber.Ctx) error {\n var d Demo\n c.QueryParser(&d)\n fmt.Println("d.Date", d.Date.String())\n return c.JSON(d)\n})\n\n// curl -X POST -F title=title -F body=body -F date=2021-10-20 http://localhost:3000/body\n\n// curl -X GET "http://localhost:3000/query?title=title&body=body&date=2021-10-20"\n\n')),(0,r.kt)("h2",{id:"setusercontext"},"SetUserContext"),(0,r.kt)("p",null,"Sets the user specified implementation for context interface."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) SetUserContext(ctx context.Context)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n ctx := context.Background()\n c.SetUserContext(ctx)\n // Here ctx could be any context implementation\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"stale"},"Stale"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://expressjs.com/en/4x/api.html#req.stale"},"https://expressjs.com/en/4x/api.html","#","req.stale")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Stale() bool\n")),(0,r.kt)("h2",{id:"status"},"Status"),(0,r.kt)("p",null,"Sets the HTTP status for the response."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Method is a ",(0,r.kt)("strong",{parentName:"p"},"chainable"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Status(status int) *Ctx\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/fiber", func(c *fiber.Ctx) error {\n c.Status(fiber.StatusOK)\n return nil\n}\n\napp.Get("/hello", func(c *fiber.Ctx) error {\n return c.Status(fiber.StatusBadRequest).SendString("Bad Request")\n}\n\napp.Get("/world", func(c *fiber.Ctx) error {\n return c.Status(fiber.StatusNotFound).SendFile("./public/gopher.png")\n})\n')),(0,r.kt)("h2",{id:"subdomains"},"Subdomains"),(0,r.kt)("p",null,"Returns a string slice of subdomains in the domain name of the request."),(0,r.kt)("p",null,"The application property subdomain offset, which defaults to ",(0,r.kt)("inlineCode",{parentName:"p"},"2"),", is used for determining the beginning of the subdomain segments."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Subdomains(offset ...int) []string\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Host: "tobi.ferrets.example.com"\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Subdomains() // ["ferrets", "tobi"]\n c.Subdomains(1) // ["tobi"]\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"type"},"Type"),(0,r.kt)("p",null,"Sets the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type"},"Content-Type")," HTTP header to the MIME type listed ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/nginx/nginx/blob/master/conf/mime.types"},"here")," specified by the file ",(0,r.kt)("strong",{parentName:"p"},"extension"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Type(ext string, charset ...string) *Ctx\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Type(".html") // => "text/html"\n c.Type("html") // => "text/html"\n c.Type("png") // => "image/png"\n\n c.Type("json", "utf-8") // => "application/json; charset=utf-8"\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"usercontext"},"UserContext"),(0,r.kt)("p",null,"UserContext returns a context implementation that was set by user earlier\nor returns a non-nil, empty context, if it was not set earlier."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) UserContext() context.Context\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n ctx := c.UserContext()\n // ctx is context implementation set by user\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"vary"},"Vary"),(0,r.kt)("p",null,"Adds the given header field to the ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Vary"},"Vary")," response header. This will append the header, if not already listed, otherwise leaves it listed in the current location."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Multiple fields are ",(0,r.kt)("strong",{parentName:"p"},"allowed"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Vary(fields ...string)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Vary("Origin") // => Vary: Origin\n c.Vary("User-Agent") // => Vary: Origin, User-Agent\n\n // No duplicates\n c.Vary("Origin") // => Vary: Origin, User-Agent\n\n c.Vary("Accept-Encoding", "Accept")\n // => Vary: Origin, User-Agent, Accept-Encoding, Accept\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"write"},"Write"),(0,r.kt)("p",null,"Write adopts the Writer interface"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Write(p []byte) (n int, err error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.Write([]byte("Hello, World!")) // => "Hello, World!"\n\n fmt.Fprintf(c, "%s\\n", "Hello, World!") // "Hello, World!Hello, World!"\n})\n')),(0,r.kt)("h2",{id:"writef"},"Writef"),(0,r.kt)("p",null,"Writef adopts the string with variables"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) Writef(f string, a ...interface{}) (n int, err error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n world := "World!"\n c.Writef("Hello, %s", world) // => "Hello, World!"\n\n fmt.Fprintf(c, "%s\\n", "Hello, World!") // "Hello, World!Hello, World!"\n})\n')),(0,r.kt)("h2",{id:"writestring"},"WriteString"),(0,r.kt)("p",null,"WriteString adopts the string"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) WriteString(s string) (n int, err error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n c.WriteString("Hello, World!") // => "Hello, World!"\n\n fmt.Fprintf(c, "%s\\n", "Hello, World!") // "Hello, World!Hello, World!"\n})\n')),(0,r.kt)("h2",{id:"xhr"},"XHR"),(0,r.kt)("p",null,"A Boolean property, that is ",(0,r.kt)("inlineCode",{parentName:"p"},"true"),", if the request\u2019s ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers"},"X-Requested-With")," header field is ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest"},"XMLHttpRequest"),", indicating that the request was issued by a client library ","(","such as ",(0,r.kt)("a",{parentName:"p",href:"https://api.jquery.com/jQuery.ajax/"},"jQuery"),")","."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) XHR() bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// X-Requested-With: XMLHttpRequest\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.XHR() // true\n\n // ...\n})\n')),(0,r.kt)("h2",{id:"xml"},"XML"),(0,r.kt)("p",null,"Converts any ",(0,r.kt)("strong",{parentName:"p"},"interface")," or ",(0,r.kt)("strong",{parentName:"p"},"string")," to XML using the standard ",(0,r.kt)("inlineCode",{parentName:"p"},"encoding/xml")," package."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"XML also sets the content header to ",(0,r.kt)("strong",{parentName:"p"},"application/xml"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (c *Ctx) XML(data interface{}) error \n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'type SomeStruct struct {\n XMLName xml.Name `xml:"Fiber"`\n Name string `xml:"Name"`\n Age uint8 `xml:"Age"`\n}\n\napp.Get("/", func(c *fiber.Ctx) error {\n // Create data struct:\n data := SomeStruct{\n Name: "Grame",\n Age: 20,\n }\n\n return c.XML(data)\n // \n // Grame\n // 20\n // \n})\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/28f5790d.3079af64.js b/assets/js/28f5790d.3079af64.js deleted file mode 100644 index 3fd4266bd66..00000000000 --- a/assets/js/28f5790d.3079af64.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1423],{6354:e=>{e.exports=JSON.parse('{"pluginId":"storage","version":"mysql_v1.x.x","label":"mysql_v1.x.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-mysql_v1.x.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/storage/mysql_v1.x.x/","docId":"README"},{"type":"link","label":"ArangoDB","href":"/storage/mysql_v1.x.x/arangodb/","docId":"arangodb/arangodb"},{"type":"link","label":"Azure Blob","href":"/storage/mysql_v1.x.x/azureblob/","docId":"azureblob/azureblob"},{"type":"link","label":"Badger","href":"/storage/mysql_v1.x.x/badger/","docId":"badger/badger"},{"type":"link","label":"Bbolt","href":"/storage/mysql_v1.x.x/bbolt/","docId":"bbolt/bbolt"},{"type":"link","label":"Couchbase","href":"/storage/mysql_v1.x.x/couchbase/","docId":"couchbase/couchbase"},{"type":"link","label":"DynamoDB","href":"/storage/mysql_v1.x.x/dynamodb/","docId":"dynamodb/dynamodb"},{"type":"link","label":"Etcd","href":"/storage/mysql_v1.x.x/etcd/","docId":"etcd/etcd"},{"type":"link","label":"Memcache","href":"/storage/mysql_v1.x.x/memcache/","docId":"memcache/memcache"},{"type":"link","label":"Memory","href":"/storage/mysql_v1.x.x/memory/","docId":"memory/memory"},{"type":"link","label":"MongoDB","href":"/storage/mysql_v1.x.x/mongodb/","docId":"mongodb/mongodb"},{"type":"link","label":"MSSQL","href":"/storage/mysql_v1.x.x/mssql/","docId":"mssql/mssql"},{"type":"link","label":"MySQL","href":"/storage/mysql_v1.x.x/mysql/","docId":"mysql/mysql"},{"type":"link","label":"Pebble","href":"/storage/mysql_v1.x.x/pebble/","docId":"pebble/pebble"},{"type":"link","label":"Postgres","href":"/storage/mysql_v1.x.x/postgres/","docId":"postgres/postgres"},{"type":"link","label":"Redis","href":"/storage/mysql_v1.x.x/redis/","docId":"redis/redis"},{"type":"link","label":"Ristretto","href":"/storage/mysql_v1.x.x/ristretto/","docId":"ristretto/ristretto"},{"type":"link","label":"S3","href":"/storage/mysql_v1.x.x/s3/","docId":"s3/s3"},{"type":"link","label":"SQLite3","href":"/storage/mysql_v1.x.x/sqlite3/","docId":"sqlite3/sqlite3"}]},"docs":{"arangodb/arangodb":{"id":"arangodb/arangodb","title":"ArangoDB","description":"Release","sidebar":"tutorialSidebar"},"azureblob/azureblob":{"id":"azureblob/azureblob","title":"Azure Blob","description":"Release","sidebar":"tutorialSidebar"},"badger/badger":{"id":"badger/badger","title":"Badger","description":"Release","sidebar":"tutorialSidebar"},"bbolt/bbolt":{"id":"bbolt/bbolt","title":"Bbolt","description":"Release","sidebar":"tutorialSidebar"},"couchbase/couchbase":{"id":"couchbase/couchbase","title":"Couchbase","description":"Release","sidebar":"tutorialSidebar"},"dynamodb/dynamodb":{"id":"dynamodb/dynamodb","title":"DynamoDB","description":"Release","sidebar":"tutorialSidebar"},"etcd/etcd":{"id":"etcd/etcd","title":"Etcd","description":"Release","sidebar":"tutorialSidebar"},"memcache/memcache":{"id":"memcache/memcache","title":"Memcache","description":"Release","sidebar":"tutorialSidebar"},"memory/memory":{"id":"memory/memory","title":"Memory","description":"Release","sidebar":"tutorialSidebar"},"mongodb/mongodb":{"id":"mongodb/mongodb","title":"MongoDB","description":"Release","sidebar":"tutorialSidebar"},"mssql/mssql":{"id":"mssql/mssql","title":"MSSQL","description":"Release","sidebar":"tutorialSidebar"},"mysql/mysql":{"id":"mysql/mysql","title":"MySQL","description":"Release","sidebar":"tutorialSidebar"},"pebble/pebble":{"id":"pebble/pebble","title":"Pebble","description":"Release","sidebar":"tutorialSidebar"},"postgres/postgres":{"id":"postgres/postgres","title":"Postgres","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.","sidebar":"tutorialSidebar"},"redis/redis":{"id":"redis/redis","title":"Redis","description":"Release","sidebar":"tutorialSidebar"},"ristretto/ristretto":{"id":"ristretto/ristretto","title":"Ristretto","description":"Release","sidebar":"tutorialSidebar"},"s3/s3":{"id":"s3/s3","title":"S3","description":"Release","sidebar":"tutorialSidebar"},"sqlite3/sqlite3":{"id":"sqlite3/sqlite3","title":"SQLite3","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/28f5790d.891fcb79.js b/assets/js/28f5790d.891fcb79.js new file mode 100644 index 00000000000..f2668cea5b3 --- /dev/null +++ b/assets/js/28f5790d.891fcb79.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1423],{36354:e=>{e.exports=JSON.parse('{"pluginId":"storage","version":"mysql_v1.x.x","label":"mysql_v1.x.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-mysql_v1.x.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/storage/mysql_v1.x.x/","docId":"README"},{"type":"link","label":"ArangoDB","href":"/storage/mysql_v1.x.x/arangodb/","docId":"arangodb/arangodb"},{"type":"link","label":"Azure Blob","href":"/storage/mysql_v1.x.x/azureblob/","docId":"azureblob/azureblob"},{"type":"link","label":"Badger","href":"/storage/mysql_v1.x.x/badger/","docId":"badger/badger"},{"type":"link","label":"Bbolt","href":"/storage/mysql_v1.x.x/bbolt/","docId":"bbolt/bbolt"},{"type":"link","label":"Couchbase","href":"/storage/mysql_v1.x.x/couchbase/","docId":"couchbase/couchbase"},{"type":"link","label":"DynamoDB","href":"/storage/mysql_v1.x.x/dynamodb/","docId":"dynamodb/dynamodb"},{"type":"link","label":"Etcd","href":"/storage/mysql_v1.x.x/etcd/","docId":"etcd/etcd"},{"type":"link","label":"Memcache","href":"/storage/mysql_v1.x.x/memcache/","docId":"memcache/memcache"},{"type":"link","label":"Memory","href":"/storage/mysql_v1.x.x/memory/","docId":"memory/memory"},{"type":"link","label":"MongoDB","href":"/storage/mysql_v1.x.x/mongodb/","docId":"mongodb/mongodb"},{"type":"link","label":"MSSQL","href":"/storage/mysql_v1.x.x/mssql/","docId":"mssql/mssql"},{"type":"link","label":"MySQL","href":"/storage/mysql_v1.x.x/mysql/","docId":"mysql/mysql"},{"type":"link","label":"Pebble","href":"/storage/mysql_v1.x.x/pebble/","docId":"pebble/pebble"},{"type":"link","label":"Postgres","href":"/storage/mysql_v1.x.x/postgres/","docId":"postgres/postgres"},{"type":"link","label":"Redis","href":"/storage/mysql_v1.x.x/redis/","docId":"redis/redis"},{"type":"link","label":"Ristretto","href":"/storage/mysql_v1.x.x/ristretto/","docId":"ristretto/ristretto"},{"type":"link","label":"S3","href":"/storage/mysql_v1.x.x/s3/","docId":"s3/s3"},{"type":"link","label":"SQLite3","href":"/storage/mysql_v1.x.x/sqlite3/","docId":"sqlite3/sqlite3"}]},"docs":{"arangodb/arangodb":{"id":"arangodb/arangodb","title":"ArangoDB","description":"Release","sidebar":"tutorialSidebar"},"azureblob/azureblob":{"id":"azureblob/azureblob","title":"Azure Blob","description":"Release","sidebar":"tutorialSidebar"},"badger/badger":{"id":"badger/badger","title":"Badger","description":"Release","sidebar":"tutorialSidebar"},"bbolt/bbolt":{"id":"bbolt/bbolt","title":"Bbolt","description":"Release","sidebar":"tutorialSidebar"},"couchbase/couchbase":{"id":"couchbase/couchbase","title":"Couchbase","description":"Release","sidebar":"tutorialSidebar"},"dynamodb/dynamodb":{"id":"dynamodb/dynamodb","title":"DynamoDB","description":"Release","sidebar":"tutorialSidebar"},"etcd/etcd":{"id":"etcd/etcd","title":"Etcd","description":"Release","sidebar":"tutorialSidebar"},"memcache/memcache":{"id":"memcache/memcache","title":"Memcache","description":"Release","sidebar":"tutorialSidebar"},"memory/memory":{"id":"memory/memory","title":"Memory","description":"Release","sidebar":"tutorialSidebar"},"mongodb/mongodb":{"id":"mongodb/mongodb","title":"MongoDB","description":"Release","sidebar":"tutorialSidebar"},"mssql/mssql":{"id":"mssql/mssql","title":"MSSQL","description":"Release","sidebar":"tutorialSidebar"},"mysql/mysql":{"id":"mysql/mysql","title":"MySQL","description":"Release","sidebar":"tutorialSidebar"},"pebble/pebble":{"id":"pebble/pebble","title":"Pebble","description":"Release","sidebar":"tutorialSidebar"},"postgres/postgres":{"id":"postgres/postgres","title":"Postgres","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.","sidebar":"tutorialSidebar"},"redis/redis":{"id":"redis/redis","title":"Redis","description":"Release","sidebar":"tutorialSidebar"},"ristretto/ristretto":{"id":"ristretto/ristretto","title":"Ristretto","description":"Release","sidebar":"tutorialSidebar"},"s3/s3":{"id":"s3/s3","title":"S3","description":"Release","sidebar":"tutorialSidebar"},"sqlite3/sqlite3":{"id":"sqlite3/sqlite3","title":"SQLite3","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/2930693d.8d150ba8.js b/assets/js/2930693d.8d150ba8.js deleted file mode 100644 index 396bfe7863c..00000000000 --- a/assets/js/2930693d.8d150ba8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1889],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),g=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=g(e.components);return o.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=g(n),m=r,f=p["".concat(s,".").concat(m)]||p[m]||c[m]||a;return n?o.createElement(f,i(i({ref:t},u),{},{components:n})):o.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,i[1]=l;for(var g=2;g{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>a,metadata:()=>l,toc:()=>g});var o=n(7462),r=(n(7294),n(3905));const a={id:"mongodb",title:"MongoDB"},i=void 0,l={unversionedId:"mongodb/mongodb",id:"mongodb/mongodb",title:"MongoDB",description:"Release",source:"@site/docs/storage/mongodb/README.md",sourceDirName:"mongodb",slug:"/mongodb/",permalink:"/storage/next/mongodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mongodb/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mongodb",title:"MongoDB"},sidebar:"tutorialSidebar",previous:{title:"Memory",permalink:"/storage/next/memory/"},next:{title:"MSSQL",permalink:"/storage/next/mssql/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:g},p="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mongodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MongoDB storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/mongodb/mongo-go-driver"},"mongodb/mongo-go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mongo.Database\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MongoDB is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mongodb implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mongodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mongodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mongodb.New()\n\n// Initialize custom config\nstore := mongodb.New(mongodb.Config{\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n// Initialize custom config using connection string\nstore := mongodb.New(mongodb.Config{\n ConnectionURI: "mongodb://user:password@127.0.0.1:27017",\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 27017\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2930693d.a315e61d.js b/assets/js/2930693d.a315e61d.js new file mode 100644 index 00000000000..9391013b77a --- /dev/null +++ b/assets/js/2930693d.a315e61d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1889],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),g=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=g(e.components);return o.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=g(n),m=r,f=p["".concat(s,".").concat(m)]||p[m]||c[m]||a;return n?o.createElement(f,i(i({ref:t},u),{},{components:n})):o.createElement(f,i({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,i[1]=l;for(var g=2;g{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>a,metadata:()=>l,toc:()=>g});var o=n(87462),r=(n(67294),n(3905));const a={id:"mongodb",title:"MongoDB"},i=void 0,l={unversionedId:"mongodb/mongodb",id:"mongodb/mongodb",title:"MongoDB",description:"Release",source:"@site/docs/storage/mongodb/README.md",sourceDirName:"mongodb",slug:"/mongodb/",permalink:"/storage/next/mongodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mongodb/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mongodb",title:"MongoDB"},sidebar:"tutorialSidebar",previous:{title:"Memory",permalink:"/storage/next/memory/"},next:{title:"MSSQL",permalink:"/storage/next/mssql/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:g},p="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mongodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MongoDB storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/mongodb/mongo-go-driver"},"mongodb/mongo-go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mongo.Database\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MongoDB is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mongodb implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mongodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mongodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mongodb.New()\n\n// Initialize custom config\nstore := mongodb.New(mongodb.Config{\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n// Initialize custom config using connection string\nstore := mongodb.New(mongodb.Config{\n ConnectionURI: "mongodb://user:password@127.0.0.1:27017",\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 27017\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/29a5ee20.1bfedbc2.js b/assets/js/29a5ee20.1bfedbc2.js deleted file mode 100644 index 379c2f6a73e..00000000000 --- a/assets/js/29a5ee20.1bfedbc2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1698],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(a),g=r,b=p["".concat(s,".").concat(g)]||p[g]||f[g]||o;return a?n.createElement(b,l(l({ref:t},c),{},{components:a})):n.createElement(b,l({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=g;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,l[1]=i;for(var u=2;u{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>f,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=a(7462),r=(a(7294),a(3905));const o={id:"bbolt",title:"Bbolt"},l=void 0,i={unversionedId:"bbolt/bbolt",id:"version-memcache_v1.x.x/bbolt/bbolt",title:"Bbolt",description:"Release",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/bbolt/README.md",sourceDirName:"bbolt",slug:"/bbolt/",permalink:"/storage/bbolt/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/bbolt/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"bbolt",title:"Bbolt"},sidebar:"tutorialSidebar",previous:{title:"Badger",permalink:"/storage/badger/"},next:{title:"Couchbase",permalink:"/storage/couchbase/"}},s={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},p="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(p,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=bbolt*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A Bbolt storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/etcd-io/bbolt"},"etcd-io/bbolt"),". Bolt is a pure Go key/value store inspired by ",(0,r.kt)("a",{parentName:"p",href:"https://twitter.com/hyc_symas"},"Howard Chu's")," ",(0,r.kt)("a",{parentName:"p",href:"https://www.symas.com/symas-embedded-database-lmdb"},"LMDB project"),". The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *bbolt.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"Bbolt is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the s3 implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/bbolt\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/bbolt"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := bbolt.New()\n\n// Initialize custom config\nstore := bbolt.New(bbolt.Config{\n Database: "my_database.db",\n Bucket: "my-bucket",\n Reset: false,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Database path\n //\n // Optional. Default is "fiber.db"\n Database string\n\n // Bbolt bucket name\n //\n // Optional. Default is "fiber_storage"\n Bucket string\n\n // Timeout is the amount of time to wait to obtain a file lock.\n // Only available on Darwin and Linux.\n //\n // Optional. Default is 60 * time.Second.\n Timeout time.Duration\n\n // Open database in read-only mode.\n //\n // Optional. Default is false\n ReadOnly bool\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Database: "fiber.db",\n Bucket: "fiber_storage",\n Timeout: 60 * time.Second,\n ReadOnly: false,\n Reset: false,\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/29a5ee20.2b94e86d.js b/assets/js/29a5ee20.2b94e86d.js new file mode 100644 index 00000000000..beccb28011c --- /dev/null +++ b/assets/js/29a5ee20.2b94e86d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1698],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(a),g=r,b=p["".concat(s,".").concat(g)]||p[g]||f[g]||o;return a?n.createElement(b,l(l({ref:t},u),{},{components:a})):n.createElement(b,l({ref:t},u))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=g;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,l[1]=i;for(var c=2;c{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>f,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var n=a(87462),r=(a(67294),a(3905));const o={id:"bbolt",title:"Bbolt"},l=void 0,i={unversionedId:"bbolt/bbolt",id:"version-memcache_v1.x.x/bbolt/bbolt",title:"Bbolt",description:"Release",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/bbolt/README.md",sourceDirName:"bbolt",slug:"/bbolt/",permalink:"/storage/memcache_v1.x.x/bbolt/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/bbolt/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"bbolt",title:"Bbolt"},sidebar:"tutorialSidebar",previous:{title:"Badger",permalink:"/storage/memcache_v1.x.x/badger/"},next:{title:"Couchbase",permalink:"/storage/memcache_v1.x.x/couchbase/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:c},p="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(p,(0,n.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=bbolt*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A Bbolt storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/etcd-io/bbolt"},"etcd-io/bbolt"),". Bolt is a pure Go key/value store inspired by ",(0,r.kt)("a",{parentName:"p",href:"https://twitter.com/hyc_symas"},"Howard Chu's")," ",(0,r.kt)("a",{parentName:"p",href:"https://www.symas.com/symas-embedded-database-lmdb"},"LMDB project"),". The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *bbolt.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"Bbolt is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the s3 implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/bbolt\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/bbolt"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := bbolt.New()\n\n// Initialize custom config\nstore := bbolt.New(bbolt.Config{\n Database: "my_database.db",\n Bucket: "my-bucket",\n Reset: false,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Database path\n //\n // Optional. Default is "fiber.db"\n Database string\n\n // Bbolt bucket name\n //\n // Optional. Default is "fiber_storage"\n Bucket string\n\n // Timeout is the amount of time to wait to obtain a file lock.\n // Only available on Darwin and Linux.\n //\n // Optional. Default is 60 * time.Second.\n Timeout time.Duration\n\n // Open database in read-only mode.\n //\n // Optional. Default is false\n ReadOnly bool\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Database: "fiber.db",\n Bucket: "fiber_storage",\n Timeout: 60 * time.Second,\n ReadOnly: false,\n Reset: false,\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/29b92cdb.233e09cd.js b/assets/js/29b92cdb.233e09cd.js deleted file mode 100644 index 6829f14b261..00000000000 --- a/assets/js/29b92cdb.233e09cd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4118],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>d});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=s(r),m=o,d=u["".concat(p,".").concat(m)]||u[m]||f[m]||a;return r?n.createElement(d,i(i({ref:t},c),{},{components:r})):n.createElement(d,i({ref:t},c))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:o,i[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var n=r(7462),o=(r(7294),r(3905));const a={id:"otelfiber-example",title:"Example"},i=void 0,l={unversionedId:"otelfiber/example/otelfiber-example",id:"otelfiber/example/otelfiber-example",title:"Example",description:"An HTTP server using gofiber fiber and instrumentation. The server has a",source:"@site/docs/contrib/otelfiber/example/README.md",sourceDirName:"otelfiber/example",slug:"/otelfiber/example/",permalink:"/contrib/next/otelfiber/example/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/otelfiber/example/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"otelfiber-example",title:"Example"},sidebar:"tutorialSidebar",previous:{title:"Otelfiber",permalink:"/contrib/next/otelfiber/"},next:{title:"Paseto",permalink:"/contrib/next/paseto/"}},p={},s=[],c={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"An HTTP server using gofiber fiber and instrumentation. The server has a\n",(0,o.kt)("inlineCode",{parentName:"p"},"/users/:id")," endpoint. The server generates span information to\n",(0,o.kt)("inlineCode",{parentName:"p"},"stdout"),"."),(0,o.kt)("p",null,"These instructions expect you have\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/"},"docker-compose")," installed."),(0,o.kt)("p",null,"Bring up the ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," services to run the\nexample:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose up --detach fiber-server fiber-client\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," service sends just one HTTP request to ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server"),"\nand then exits. View the span generated by ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," in the logs:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose logs fiber-server\n")),(0,o.kt)("p",null,"Shut down the services when you are finished with the example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose down\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/29b92cdb.fd195d9c.js b/assets/js/29b92cdb.fd195d9c.js new file mode 100644 index 00000000000..175d468164f --- /dev/null +++ b/assets/js/29b92cdb.fd195d9c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4118],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>d});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=s(r),m=o,d=u["".concat(p,".").concat(m)]||u[m]||f[m]||a;return r?n.createElement(d,i(i({ref:t},c),{},{components:r})):n.createElement(d,i({ref:t},c))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:o,i[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));const a={id:"otelfiber-example",title:"Example"},i=void 0,l={unversionedId:"otelfiber/example/otelfiber-example",id:"otelfiber/example/otelfiber-example",title:"Example",description:"An HTTP server using gofiber fiber and instrumentation. The server has a",source:"@site/docs/contrib/otelfiber/example/README.md",sourceDirName:"otelfiber/example",slug:"/otelfiber/example/",permalink:"/contrib/next/otelfiber/example/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/otelfiber/example/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"otelfiber-example",title:"Example"},sidebar:"tutorialSidebar",previous:{title:"Otelfiber",permalink:"/contrib/next/otelfiber/"},next:{title:"Paseto",permalink:"/contrib/next/paseto/"}},p={},s=[],c={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"An HTTP server using gofiber fiber and instrumentation. The server has a\n",(0,o.kt)("inlineCode",{parentName:"p"},"/users/:id")," endpoint. The server generates span information to\n",(0,o.kt)("inlineCode",{parentName:"p"},"stdout"),"."),(0,o.kt)("p",null,"These instructions expect you have\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/"},"docker-compose")," installed."),(0,o.kt)("p",null,"Bring up the ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," services to run the\nexample:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose up --detach fiber-server fiber-client\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," service sends just one HTTP request to ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server"),"\nand then exits. View the span generated by ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," in the logs:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose logs fiber-server\n")),(0,o.kt)("p",null,"Shut down the services when you are finished with the example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose down\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2a83b683.0ca18764.js b/assets/js/2a83b683.0ca18764.js deleted file mode 100644 index 3e6879f359d..00000000000 --- a/assets/js/2a83b683.0ca18764.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9801],{3905:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>d});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=r.createContext({}),u=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},c=function(e){var n=u(e.components);return r.createElement(l.Provider,{value:n},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,s=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(t),m=o,d=p["".concat(l,".").concat(m)]||p[m]||f[m]||s;return t?r.createElement(d,a(a({ref:n},c),{},{components:t})):r.createElement(d,a({ref:n},c))}));function d(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var s=t.length,a=new Array(s);a[0]=m;var i={};for(var l in n)hasOwnProperty.call(n,l)&&(i[l]=n[l]);i.originalType=e,i[p]="string"==typeof e?e:o,a[1]=i;for(var u=2;u{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>f,frontMatter:()=>s,metadata:()=>i,toc:()=>u});var r=t(7462),o=(t(7294),t(3905));const s={id:"session",title:"Session"},a=void 0,i={unversionedId:"api/middleware/session",id:"api/middleware/session",title:"Session",description:"Session middleware for Fiber.",source:"@site/docs/core/api/middleware/session.md",sourceDirName:"api/middleware",slug:"/api/middleware/session",permalink:"/next/api/middleware/session",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/session.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"session",title:"Session"},sidebar:"tutorialSidebar",previous:{title:"Rewrite",permalink:"/next/api/middleware/rewrite"},next:{title:"Skip",permalink:"/next/api/middleware/skip"}},l={},u=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2},{value:"Constants",id:"constants",level:2},{value:"Custom Storage/Database",id:"custom-storagedatabase",level:3}],c={toc:u},p="wrapper";function f(e){let{components:n,...t}=e;return(0,o.kt)(p,(0,r.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Session middleware for ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),"."),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"This middleware uses our ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage"},"Storage")," package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.")),(0,o.kt)("h2",{id:"signatures"},"Signatures"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) *Store\nfunc (s *Store) RegisterType(i interface{})\nfunc (s *Store) Get(c *fiber.Ctx) (*Session, error)\nfunc (s *Store) Reset() error\n\nfunc (s *Session) Get(key string) interface{}\nfunc (s *Session) Set(key string, val interface{})\nfunc (s *Session) Delete(key string)\nfunc (s *Session) Destroy() error\nfunc (s *Session) Regenerate() error\nfunc (s *Session) Save() error\nfunc (s *Session) Fresh() bool\nfunc (s *Session) ID() string\nfunc (s *Session) Keys() []string\n")),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Storing ",(0,o.kt)("inlineCode",{parentName:"p"},"interface{}")," values are limited to built-ins Go types.")),(0,o.kt)("h2",{id:"examples"},"Examples"),(0,o.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/session"\n)\n')),(0,o.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\n// This stores all of your app\'s sessions\nstore := session.New()\n\napp.Get("/", func(c *fiber.Ctx) error {\n // Get session from storage\n sess, err := store.Get(c)\n if err != nil {\n panic(err)\n }\n\n // Get value\n name := sess.Get("name")\n\n // Set key/value\n sess.Set("name", "john")\n\n // Get all Keys\n keys := sess.Keys()\n\n // Delete key\n sess.Delete("name")\n\n // Destroy session\n if err := sess.Destroy(); err != nil {\n panic(err)\n }\n\n // Sets a specific expiration for this session\n sess.SetExpiry(time.Second * 2)\n\n // Save session\n if err := sess.Save(); err != nil {\n panic(err)\n }\n\n return c.SendString(fmt.Sprintf("Welcome %v", name))\n})\n')),(0,o.kt)("h2",{id:"config"},"Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Allowed session duration\n // Optional. Default value 24 * time.Hour\n Expiration time.Duration\n\n // Storage interface to store the session data\n // Optional. Default value memory.New()\n Storage fiber.Storage\n\n // KeyLookup is a string in the form of ":" that is used\n // to extract session id from the request.\n // Possible values: "header:", "query:" or "cookie:"\n // Optional. Default value "cookie:session_id".\n KeyLookup string\n\n // Domain of the CSRF cookie.\n // Optional. Default value "".\n CookieDomain string\n\n // Path of the CSRF cookie.\n // Optional. Default value "".\n CookiePath string\n\n // Indicates if CSRF cookie is secure.\n // Optional. Default value false.\n CookieSecure bool\n\n // Indicates if CSRF cookie is HTTP only.\n // Optional. Default value false.\n CookieHTTPOnly bool\n\n // Value of SameSite cookie.\n // Optional. Default value "Lax".\n CookieSameSite string\n\n // Decides whether cookie should last for only the browser sesison.\n // Ignores Expiration if set to true\n // Optional. Default value false.\n CookieSessionOnly bool\n\n // KeyGenerator generates the session key.\n // Optional. Default value utils.UUIDv4\n KeyGenerator func() string\n\n // Deprecated: Please use KeyLookup\n CookieName string\n\n // Source defines where to obtain the session id\n source Source\n\n // The session name\n sessionName string\n}\n')),(0,o.kt)("h2",{id:"default-config"},"Default Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Expiration: 24 * time.Hour,\n KeyLookup: "cookie:session_id",\n KeyGenerator: utils.UUIDv4,\n source: "cookie",\n sessionName: "session_id",\n}\n')),(0,o.kt)("h2",{id:"constants"},"Constants"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'const (\n SourceCookie Source = "cookie"\n SourceHeader Source = "header"\n SourceURLQuery Source = "query"\n)\n')),(0,o.kt)("h3",{id:"custom-storagedatabase"},"Custom Storage/Database"),(0,o.kt)("p",null,"You can use any storage from our ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/"},"storage")," package."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3\nstore := session.New(session.Config{\n Storage: storage,\n})\n")),(0,o.kt)("p",null,"To use the store, see the ",(0,o.kt)("a",{parentName:"p",href:"#examples"},"Examples"),"."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2a83b683.86fc5b30.js b/assets/js/2a83b683.86fc5b30.js new file mode 100644 index 00000000000..0e45cf932c4 --- /dev/null +++ b/assets/js/2a83b683.86fc5b30.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9801],{3905:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>d});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=r.createContext({}),u=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},c=function(e){var n=u(e.components);return r.createElement(l.Provider,{value:n},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,s=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(t),m=o,d=p["".concat(l,".").concat(m)]||p[m]||f[m]||s;return t?r.createElement(d,a(a({ref:n},c),{},{components:t})):r.createElement(d,a({ref:n},c))}));function d(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var s=t.length,a=new Array(s);a[0]=m;var i={};for(var l in n)hasOwnProperty.call(n,l)&&(i[l]=n[l]);i.originalType=e,i[p]="string"==typeof e?e:o,a[1]=i;for(var u=2;u{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>f,frontMatter:()=>s,metadata:()=>i,toc:()=>u});var r=t(87462),o=(t(67294),t(3905));const s={id:"session",title:"Session"},a=void 0,i={unversionedId:"api/middleware/session",id:"api/middleware/session",title:"Session",description:"Session middleware for Fiber.",source:"@site/docs/core/api/middleware/session.md",sourceDirName:"api/middleware",slug:"/api/middleware/session",permalink:"/next/api/middleware/session",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/session.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"session",title:"Session"},sidebar:"tutorialSidebar",previous:{title:"Rewrite",permalink:"/next/api/middleware/rewrite"},next:{title:"Skip",permalink:"/next/api/middleware/skip"}},l={},u=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2},{value:"Constants",id:"constants",level:2},{value:"Custom Storage/Database",id:"custom-storagedatabase",level:3}],c={toc:u},p="wrapper";function f(e){let{components:n,...t}=e;return(0,o.kt)(p,(0,r.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Session middleware for ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),"."),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"This middleware uses our ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage"},"Storage")," package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.")),(0,o.kt)("h2",{id:"signatures"},"Signatures"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) *Store\nfunc (s *Store) RegisterType(i interface{})\nfunc (s *Store) Get(c *fiber.Ctx) (*Session, error)\nfunc (s *Store) Reset() error\n\nfunc (s *Session) Get(key string) interface{}\nfunc (s *Session) Set(key string, val interface{})\nfunc (s *Session) Delete(key string)\nfunc (s *Session) Destroy() error\nfunc (s *Session) Regenerate() error\nfunc (s *Session) Save() error\nfunc (s *Session) Fresh() bool\nfunc (s *Session) ID() string\nfunc (s *Session) Keys() []string\n")),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Storing ",(0,o.kt)("inlineCode",{parentName:"p"},"interface{}")," values are limited to built-ins Go types.")),(0,o.kt)("h2",{id:"examples"},"Examples"),(0,o.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/session"\n)\n')),(0,o.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\n// This stores all of your app\'s sessions\nstore := session.New()\n\napp.Get("/", func(c *fiber.Ctx) error {\n // Get session from storage\n sess, err := store.Get(c)\n if err != nil {\n panic(err)\n }\n\n // Get value\n name := sess.Get("name")\n\n // Set key/value\n sess.Set("name", "john")\n\n // Get all Keys\n keys := sess.Keys()\n\n // Delete key\n sess.Delete("name")\n\n // Destroy session\n if err := sess.Destroy(); err != nil {\n panic(err)\n }\n\n // Sets a specific expiration for this session\n sess.SetExpiry(time.Second * 2)\n\n // Save session\n if err := sess.Save(); err != nil {\n panic(err)\n }\n\n return c.SendString(fmt.Sprintf("Welcome %v", name))\n})\n')),(0,o.kt)("h2",{id:"config"},"Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Allowed session duration\n // Optional. Default value 24 * time.Hour\n Expiration time.Duration\n\n // Storage interface to store the session data\n // Optional. Default value memory.New()\n Storage fiber.Storage\n\n // KeyLookup is a string in the form of ":" that is used\n // to extract session id from the request.\n // Possible values: "header:", "query:" or "cookie:"\n // Optional. Default value "cookie:session_id".\n KeyLookup string\n\n // Domain of the CSRF cookie.\n // Optional. Default value "".\n CookieDomain string\n\n // Path of the CSRF cookie.\n // Optional. Default value "".\n CookiePath string\n\n // Indicates if CSRF cookie is secure.\n // Optional. Default value false.\n CookieSecure bool\n\n // Indicates if CSRF cookie is HTTP only.\n // Optional. Default value false.\n CookieHTTPOnly bool\n\n // Value of SameSite cookie.\n // Optional. Default value "Lax".\n CookieSameSite string\n\n // Decides whether cookie should last for only the browser sesison.\n // Ignores Expiration if set to true\n // Optional. Default value false.\n CookieSessionOnly bool\n\n // KeyGenerator generates the session key.\n // Optional. Default value utils.UUIDv4\n KeyGenerator func() string\n\n // Deprecated: Please use KeyLookup\n CookieName string\n\n // Source defines where to obtain the session id\n source Source\n\n // The session name\n sessionName string\n}\n')),(0,o.kt)("h2",{id:"default-config"},"Default Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Expiration: 24 * time.Hour,\n KeyLookup: "cookie:session_id",\n KeyGenerator: utils.UUIDv4,\n source: "cookie",\n sessionName: "session_id",\n}\n')),(0,o.kt)("h2",{id:"constants"},"Constants"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'const (\n SourceCookie Source = "cookie"\n SourceHeader Source = "header"\n SourceURLQuery Source = "query"\n)\n')),(0,o.kt)("h3",{id:"custom-storagedatabase"},"Custom Storage/Database"),(0,o.kt)("p",null,"You can use any storage from our ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/"},"storage")," package."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3\nstore := session.New(session.Config{\n Storage: storage,\n})\n")),(0,o.kt)("p",null,"To use the store, see the ",(0,o.kt)("a",{parentName:"p",href:"#examples"},"Examples"),"."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2ab216cb.26f9f83d.js b/assets/js/2ab216cb.26f9f83d.js deleted file mode 100644 index 3f40b64105d..00000000000 --- a/assets/js/2ab216cb.26f9f83d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4435],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>f});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var i=r.createContext({}),s=function(e){var n=r.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):u(u({},n),e)),t},p=function(e){var n=s(e.components);return r.createElement(i.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=s(t),d=a,f=c["".concat(i,".").concat(d)]||c[d]||m[d]||o;return t?r.createElement(f,u(u({ref:n},p),{},{components:t})):r.createElement(f,u({ref:n},p))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,u=new Array(o);u[0]=d;var l={};for(var i in n)hasOwnProperty.call(n,i)&&(l[i]=n[i]);l.originalType=e,l[c]="string"==typeof e?e:a,u[1]=l;for(var s=2;s{t.d(n,{Z:()=>u});var r=t(7294),a=t(6010);const o={tabItem:"tabItem_Ymn6"};function u(e){let{children:n,hidden:t,className:u}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,u),hidden:t},n)}},4866:(e,n,t)=>{t.d(n,{Z:()=>y});var r=t(7462),a=t(7294),o=t(6010),u=t(2466),l=t(6550),i=t(1980),s=t(7392),p=t(12);function c(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:a}}=e;return{value:n,label:t,attributes:r,default:a}}))}function m(e){const{values:n,children:t}=e;return(0,a.useMemo)((()=>{const e=n??c(t);return function(e){const n=(0,s.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function d(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const r=(0,l.k6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i._X)(o),(0,a.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(r.location.search);n.set(o,e),r.replace({...r.location,search:n.toString()})}),[o,r])]}function g(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=m(e),[u,l]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:o}))),[i,s]=f({queryString:t,groupId:r}),[c,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,o]=(0,p.Nk)(t);return[r,(0,a.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:r}),h=(()=>{const e=i??c;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{h&&l(h)}),[h]);return{selectedValue:u,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),s(e),g(e)}),[s,g,o]),tabValues:o}}var h=t(2389);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function b(e){let{className:n,block:t,selectedValue:l,selectValue:i,tabValues:s}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,u.o5)(),m=e=>{const n=e.currentTarget,t=p.indexOf(n),r=s[t].value;r!==l&&(c(n),i(r))},d=e=>{let n=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const t=p.indexOf(e.currentTarget)+1;n=p[t]??p[0];break}case"ArrowLeft":{const t=p.indexOf(e.currentTarget)-1;n=p[t]??p[p.length-1];break}}n?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},n)},s.map((e=>{let{value:n,label:t,attributes:u}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,key:n,ref:e=>p.push(e),onKeyDown:d,onClick:m},u,{className:(0,o.Z)("tabs__item",k.tabItem,u?.className,{"tabs__item--active":l===n})}),t??n)})))}function O(e){let{lazy:n,children:t,selectedValue:r}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==r}))))}function N(e){const n=g(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",k.tabList)},a.createElement(b,(0,r.Z)({},e,n)),a.createElement(O,(0,r.Z)({},e,n)))}function y(e){const n=(0,h.Z)();return a.createElement(N,(0,r.Z)({key:String(n)},e))}},9415:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>i,default:()=>f,frontMatter:()=>l,metadata:()=>s,toc:()=>c});var r=t(7462),a=(t(7294),t(3905)),o=t(4866),u=t(5162);const l={id:"hooks",title:"\ud83e\ude9d Hooks",sidebar_position:6},i=void 0,s={unversionedId:"guide/hooks",id:"guide/hooks",title:"\ud83e\ude9d Hooks",description:"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:",source:"@site/docs/core/guide/hooks.md",sourceDirName:"guide",slug:"/guide/hooks",permalink:"/next/guide/hooks",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/hooks.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:6,frontMatter:{id:"hooks",title:"\ud83e\ude9d Hooks",sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udd0e Validation",permalink:"/next/guide/validation"},next:{title:"\u26a1 Make Fiber Faster",permalink:"/next/guide/faster-fiber"}},p={},c=[{value:"Constants",id:"constants",level:2},{value:"OnRoute",id:"onroute",level:2},{value:"OnName",id:"onname",level:2},{value:"OnGroup",id:"ongroup",level:2},{value:"OnGroupName",id:"ongroupname",level:2},{value:"OnListen",id:"onlisten",level:2},{value:"OnFork",id:"onfork",level:2},{value:"OnShutdown",id:"onshutdown",level:2},{value:"OnMount",id:"onmount",level:2}],m={toc:c},d="wrapper";function f(e){let{components:n,...t}=e;return(0,a.kt)(d,(0,r.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onroute"},"OnRoute")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onname"},"OnName")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#ongroup"},"OnGroup")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#ongroupname"},"OnGroupName")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onlisten"},"OnListen")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onfork"},"OnFork")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onshutdown"},"OnShutdown")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onmount"},"OnMount"))),(0,a.kt)("h2",{id:"constants"},"Constants"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Handlers define a function to create hooks for Fiber.\ntype OnRouteHandler = func(Route) error\ntype OnNameHandler = OnRouteHandler\ntype OnGroupHandler = func(Group) error\ntype OnGroupNameHandler = OnGroupHandler\ntype OnListenHandler = func(ListenData) error\ntype OnForkHandler = func(int) error\ntype OnShutdownHandler = func() error\ntype OnMountHandler = func(*App) error\n")),(0,a.kt)("h2",{id:"onroute"},"OnRoute"),(0,a.kt)("p",null,"OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by ",(0,a.kt)("strong",{parentName:"p"},"route")," parameter."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnRoute(handler ...OnRouteHandler)\n")),(0,a.kt)("h2",{id:"onname"},"OnName"),(0,a.kt)("p",null,"OnName is a hook to execute user functions on each route naming. Also you can get route properties by ",(0,a.kt)("strong",{parentName:"p"},"route")," parameter."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnName only works with naming routes, not groups.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnName(handler ...OnNameHandler)\n")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"onname-example",label:"OnName Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n\n "github.com/gofiber/fiber/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("index")\n\n app.Hooks().OnName(func(r fiber.Route) error {\n fmt.Print("Name: " + r.Name + ", ")\n\n return nil\n })\n\n app.Hooks().OnName(func(r fiber.Route) error {\n fmt.Print("Method: " + r.Method + "\\n")\n\n return nil\n })\n\n app.Get("/add/user", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("addUser")\n\n app.Delete("/destroy/user", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("destroyUser")\n\n app.Listen(":5000")\n}\n\n// Results:\n// Name: addUser, Method: GET\n// Name: destroyUser, Method: DELETE\n')))),(0,a.kt)("h2",{id:"ongroup"},"OnGroup"),(0,a.kt)("p",null,"OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by ",(0,a.kt)("strong",{parentName:"p"},"group")," parameter."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnGroup(handler ...OnGroupHandler)\n")),(0,a.kt)("h2",{id:"ongroupname"},"OnGroupName"),(0,a.kt)("p",null,"OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by ",(0,a.kt)("strong",{parentName:"p"},"group")," parameter."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnGroupName only works with naming groups, not routes.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnGroupName(handler ...OnGroupNameHandler)\n")),(0,a.kt)("h2",{id:"onlisten"},"OnListen"),(0,a.kt)("p",null,"OnListen is a hook to execute user functions on Listen, ListenTLS, Listener."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnListen(handler ...OnListenHandler)\n")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"onlisten-example",label:"OnListen Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app := fiber.New(fiber.Config{\n DisableStartupMessage: true,\n})\n\napp.Hooks().OnListen(func(listenData fiber.ListenData) error {\n if fiber.IsChild() {\n return nil\n }\n scheme := "http"\n if data.TLS {\n scheme = "https"\n }\n log.Println(scheme + "://" + listenData.Host + ":" + listenData.Port)\n return nil\n})\n\napp.Listen(":5000")\n')))),(0,a.kt)("h2",{id:"onfork"},"OnFork"),(0,a.kt)("p",null,"OnFork is a hook to execute user functions on Fork."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnFork(handler ...OnForkHandler)\n")),(0,a.kt)("h2",{id:"onshutdown"},"OnShutdown"),(0,a.kt)("p",null,"OnShutdown is a hook to execute user functions after Shutdown."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnShutdown(handler ...OnShutdownHandler)\n")),(0,a.kt)("h2",{id:"onmount"},"OnMount"),(0,a.kt)("p",null,"OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (h *Hooks) OnMount(handler ...OnMountHandler) \n")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"onmount-example",label:"OnMount Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n\n "github.com/gofiber/fiber/v2"\n)\n\nfunc main() {\n app := New()\n app.Get("/", testSimpleHandler).Name("x")\n\n subApp := New()\n subApp.Get("/test", testSimpleHandler)\n\n subApp.Hooks().OnMount(func(parent *fiber.App) error {\n fmt.Print("Mount path of parent app: "+parent.MountPath())\n // ...\n\n return nil\n })\n\n app.Mount("/sub", subApp)\n}\n\n// Result:\n// Mount path of parent app: \n')))),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2ab216cb.421971ea.js b/assets/js/2ab216cb.421971ea.js new file mode 100644 index 00000000000..cc1fbaa8835 --- /dev/null +++ b/assets/js/2ab216cb.421971ea.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4435],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>f});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var i=r.createContext({}),s=function(e){var n=r.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):u(u({},n),e)),t},p=function(e){var n=s(e.components);return r.createElement(i.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=s(t),d=a,f=c["".concat(i,".").concat(d)]||c[d]||m[d]||o;return t?r.createElement(f,u(u({ref:n},p),{},{components:t})):r.createElement(f,u({ref:n},p))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,u=new Array(o);u[0]=d;var l={};for(var i in n)hasOwnProperty.call(n,i)&&(l[i]=n[i]);l.originalType=e,l[c]="string"==typeof e?e:a,u[1]=l;for(var s=2;s{t.d(n,{Z:()=>u});var r=t(67294),a=t(86010);const o={tabItem:"tabItem_Ymn6"};function u(e){let{children:n,hidden:t,className:u}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,u),hidden:t},n)}},74866:(e,n,t)=>{t.d(n,{Z:()=>y});var r=t(87462),a=t(67294),o=t(86010),u=t(12466),l=t(16550),i=t(91980),s=t(67392),p=t(50012);function c(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:a}}=e;return{value:n,label:t,attributes:r,default:a}}))}function m(e){const{values:n,children:t}=e;return(0,a.useMemo)((()=>{const e=n??c(t);return function(e){const n=(0,s.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function d(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const r=(0,l.k6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i._X)(o),(0,a.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(r.location.search);n.set(o,e),r.replace({...r.location,search:n.toString()})}),[o,r])]}function g(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=m(e),[u,l]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:o}))),[i,s]=f({queryString:t,groupId:r}),[c,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,o]=(0,p.Nk)(t);return[r,(0,a.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:r}),h=(()=>{const e=i??c;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{h&&l(h)}),[h]);return{selectedValue:u,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),s(e),g(e)}),[s,g,o]),tabValues:o}}var h=t(72389);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function b(e){let{className:n,block:t,selectedValue:l,selectValue:i,tabValues:s}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,u.o5)(),m=e=>{const n=e.currentTarget,t=p.indexOf(n),r=s[t].value;r!==l&&(c(n),i(r))},d=e=>{let n=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const t=p.indexOf(e.currentTarget)+1;n=p[t]??p[0];break}case"ArrowLeft":{const t=p.indexOf(e.currentTarget)-1;n=p[t]??p[p.length-1];break}}n?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},n)},s.map((e=>{let{value:n,label:t,attributes:u}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,key:n,ref:e=>p.push(e),onKeyDown:d,onClick:m},u,{className:(0,o.Z)("tabs__item",k.tabItem,u?.className,{"tabs__item--active":l===n})}),t??n)})))}function O(e){let{lazy:n,children:t,selectedValue:r}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==r}))))}function N(e){const n=g(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",k.tabList)},a.createElement(b,(0,r.Z)({},e,n)),a.createElement(O,(0,r.Z)({},e,n)))}function y(e){const n=(0,h.Z)();return a.createElement(N,(0,r.Z)({key:String(n)},e))}},19415:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>i,default:()=>f,frontMatter:()=>l,metadata:()=>s,toc:()=>c});var r=t(87462),a=(t(67294),t(3905)),o=t(74866),u=t(85162);const l={id:"hooks",title:"\ud83e\ude9d Hooks",sidebar_position:6},i=void 0,s={unversionedId:"guide/hooks",id:"guide/hooks",title:"\ud83e\ude9d Hooks",description:"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:",source:"@site/docs/core/guide/hooks.md",sourceDirName:"guide",slug:"/guide/hooks",permalink:"/next/guide/hooks",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/hooks.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:6,frontMatter:{id:"hooks",title:"\ud83e\ude9d Hooks",sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udd0e Validation",permalink:"/next/guide/validation"},next:{title:"\u26a1 Make Fiber Faster",permalink:"/next/guide/faster-fiber"}},p={},c=[{value:"Constants",id:"constants",level:2},{value:"OnRoute",id:"onroute",level:2},{value:"OnName",id:"onname",level:2},{value:"OnGroup",id:"ongroup",level:2},{value:"OnGroupName",id:"ongroupname",level:2},{value:"OnListen",id:"onlisten",level:2},{value:"OnFork",id:"onfork",level:2},{value:"OnShutdown",id:"onshutdown",level:2},{value:"OnMount",id:"onmount",level:2}],m={toc:c},d="wrapper";function f(e){let{components:n,...t}=e;return(0,a.kt)(d,(0,r.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onroute"},"OnRoute")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onname"},"OnName")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#ongroup"},"OnGroup")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#ongroupname"},"OnGroupName")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onlisten"},"OnListen")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onfork"},"OnFork")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onshutdown"},"OnShutdown")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#onmount"},"OnMount"))),(0,a.kt)("h2",{id:"constants"},"Constants"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Handlers define a function to create hooks for Fiber.\ntype OnRouteHandler = func(Route) error\ntype OnNameHandler = OnRouteHandler\ntype OnGroupHandler = func(Group) error\ntype OnGroupNameHandler = OnGroupHandler\ntype OnListenHandler = func(ListenData) error\ntype OnForkHandler = func(int) error\ntype OnShutdownHandler = func() error\ntype OnMountHandler = func(*App) error\n")),(0,a.kt)("h2",{id:"onroute"},"OnRoute"),(0,a.kt)("p",null,"OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by ",(0,a.kt)("strong",{parentName:"p"},"route")," parameter."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnRoute(handler ...OnRouteHandler)\n")),(0,a.kt)("h2",{id:"onname"},"OnName"),(0,a.kt)("p",null,"OnName is a hook to execute user functions on each route naming. Also you can get route properties by ",(0,a.kt)("strong",{parentName:"p"},"route")," parameter."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnName only works with naming routes, not groups.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnName(handler ...OnNameHandler)\n")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"onname-example",label:"OnName Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n\n "github.com/gofiber/fiber/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("index")\n\n app.Hooks().OnName(func(r fiber.Route) error {\n fmt.Print("Name: " + r.Name + ", ")\n\n return nil\n })\n\n app.Hooks().OnName(func(r fiber.Route) error {\n fmt.Print("Method: " + r.Method + "\\n")\n\n return nil\n })\n\n app.Get("/add/user", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("addUser")\n\n app.Delete("/destroy/user", func(c *fiber.Ctx) error {\n return c.SendString(c.Route().Name)\n }).Name("destroyUser")\n\n app.Listen(":5000")\n}\n\n// Results:\n// Name: addUser, Method: GET\n// Name: destroyUser, Method: DELETE\n')))),(0,a.kt)("h2",{id:"ongroup"},"OnGroup"),(0,a.kt)("p",null,"OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by ",(0,a.kt)("strong",{parentName:"p"},"group")," parameter."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnGroup(handler ...OnGroupHandler)\n")),(0,a.kt)("h2",{id:"ongroupname"},"OnGroupName"),(0,a.kt)("p",null,"OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by ",(0,a.kt)("strong",{parentName:"p"},"group")," parameter."),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnGroupName only works with naming groups, not routes.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnGroupName(handler ...OnGroupNameHandler)\n")),(0,a.kt)("h2",{id:"onlisten"},"OnListen"),(0,a.kt)("p",null,"OnListen is a hook to execute user functions on Listen, ListenTLS, Listener."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnListen(handler ...OnListenHandler)\n")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"onlisten-example",label:"OnListen Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app := fiber.New(fiber.Config{\n DisableStartupMessage: true,\n})\n\napp.Hooks().OnListen(func(listenData fiber.ListenData) error {\n if fiber.IsChild() {\n return nil\n }\n scheme := "http"\n if data.TLS {\n scheme = "https"\n }\n log.Println(scheme + "://" + listenData.Host + ":" + listenData.Port)\n return nil\n})\n\napp.Listen(":5000")\n')))),(0,a.kt)("h2",{id:"onfork"},"OnFork"),(0,a.kt)("p",null,"OnFork is a hook to execute user functions on Fork."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnFork(handler ...OnForkHandler)\n")),(0,a.kt)("h2",{id:"onshutdown"},"OnShutdown"),(0,a.kt)("p",null,"OnShutdown is a hook to execute user functions after Shutdown."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) OnShutdown(handler ...OnShutdownHandler)\n")),(0,a.kt)("h2",{id:"onmount"},"OnMount"),(0,a.kt)("p",null,"OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (h *Hooks) OnMount(handler ...OnMountHandler) \n")),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(u.Z,{value:"onmount-example",label:"OnMount Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n\n "github.com/gofiber/fiber/v2"\n)\n\nfunc main() {\n app := New()\n app.Get("/", testSimpleHandler).Name("x")\n\n subApp := New()\n subApp.Get("/test", testSimpleHandler)\n\n subApp.Hooks().OnMount(func(parent *fiber.App) error {\n fmt.Print("Mount path of parent app: "+parent.MountPath())\n // ...\n\n return nil\n })\n\n app.Mount("/sub", subApp)\n}\n\n// Result:\n// Mount path of parent app: \n')))),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2b43107e.5a5fc1d4.js b/assets/js/2b43107e.5a5fc1d4.js new file mode 100644 index 00000000000..610e99512da --- /dev/null +++ b/assets/js/2b43107e.5a5fc1d4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2707],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(n),f=i,m=u["".concat(s,".").concat(f)]||u[f]||d[f]||a;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=n(87462),i=(n(67294),n(3905));const a={id:"monitor",title:"Monitor"},o=void 0,l={unversionedId:"api/middleware/monitor",id:"api/middleware/monitor",title:"Monitor",description:"Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor",source:"@site/docs/core/api/middleware/monitor.md",sourceDirName:"api/middleware",slug:"/api/middleware/monitor",permalink:"/next/api/middleware/monitor",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/monitor.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"monitor",title:"Monitor"},sidebar:"tutorialSidebar",previous:{title:"Logger",permalink:"/next/api/middleware/logger"},next:{title:"Pprof",permalink:"/next/api/middleware/pprof"}},s={},p=[{value:"Signatures",id:"signatures",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Monitor middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that reports server metrics, inspired by ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/RafalWilinski/express-status-monitor"},"express-status-monitor")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Monitor is still in beta, API might change in the future!")),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/nHAtBpJ.gif",alt:null})),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New() fiber.Handler\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/monitor"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config (Assign the middleware to /metrics)\napp.Get("/metrics", monitor.New())\n\n// Or extend your config for customization\n// Assign the middleware to /metrics\n// and change the Title to `MyService Metrics Page`\napp.Get("/metrics", monitor.New(monitor.Config{Title: "MyService Metrics Page"}))\n')),(0,i.kt)("p",null,"You can also access the API endpoint with\n",(0,i.kt)("inlineCode",{parentName:"p"},'curl -X GET -H "Accept: application/json" http://localhost:3000/metrics')," which returns:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{"pid":{ "cpu":0.4568381746582226, "ram":20516864, "conns":3 },\n "os": { "cpu":8.759124087593099, "ram":3997155328, "conns":44,\n "total_ram":8245489664, "load_avg":0.51 }}\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Metrics page title\n //\n // Optional. Default: "Fiber Monitor"\n Title string\n\n // Refresh period\n //\n // Optional. Default: 3 seconds\n Refresh time.Duration\n\n // Whether the service should expose only the monitoring API.\n //\n // Optional. Default: false\n APIOnly bool\n\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Custom HTML Code to Head Section(Before End)\n //\n // Optional. Default: empty\n CustomHead string\n\n // FontURL for specify font resource path or URL . also you can use relative path\n //\n // Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap\n FontURL string\n\n // ChartJsURL for specify ChartJS library path or URL . also you can use relative path\n //\n // Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js\n ChartJsURL string\n\n index string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Title: defaultTitle,\n Refresh: defaultRefresh,\n FontURL: defaultFontURL,\n ChartJsURL: defaultChartJSURL,\n CustomHead: defaultCustomHead,\n APIOnly: false,\n Next: nil,\n index: newIndex(viewBag{\n defaultTitle,\n defaultRefresh,\n defaultFontURL,\n defaultChartJSURL,\n defaultCustomHead,\n }),\n}\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2b43107e.d9d13b52.js b/assets/js/2b43107e.d9d13b52.js deleted file mode 100644 index ef5ec4869f1..00000000000 --- a/assets/js/2b43107e.d9d13b52.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2707],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(n),f=i,m=u["".concat(s,".").concat(f)]||u[f]||d[f]||a;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=n(7462),i=(n(7294),n(3905));const a={id:"monitor",title:"Monitor"},o=void 0,l={unversionedId:"api/middleware/monitor",id:"api/middleware/monitor",title:"Monitor",description:"Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor",source:"@site/docs/core/api/middleware/monitor.md",sourceDirName:"api/middleware",slug:"/api/middleware/monitor",permalink:"/next/api/middleware/monitor",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/monitor.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"monitor",title:"Monitor"},sidebar:"tutorialSidebar",previous:{title:"Logger",permalink:"/next/api/middleware/logger"},next:{title:"Pprof",permalink:"/next/api/middleware/pprof"}},s={},p=[{value:"Signatures",id:"signatures",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Monitor middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that reports server metrics, inspired by ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/RafalWilinski/express-status-monitor"},"express-status-monitor")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Monitor is still in beta, API might change in the future!")),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/nHAtBpJ.gif",alt:null})),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New() fiber.Handler\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/monitor"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config (Assign the middleware to /metrics)\napp.Get("/metrics", monitor.New())\n\n// Or extend your config for customization\n// Assign the middleware to /metrics\n// and change the Title to `MyService Metrics Page`\napp.Get("/metrics", monitor.New(monitor.Config{Title: "MyService Metrics Page"}))\n')),(0,i.kt)("p",null,"You can also access the API endpoint with\n",(0,i.kt)("inlineCode",{parentName:"p"},'curl -X GET -H "Accept: application/json" http://localhost:3000/metrics')," which returns:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{"pid":{ "cpu":0.4568381746582226, "ram":20516864, "conns":3 },\n "os": { "cpu":8.759124087593099, "ram":3997155328, "conns":44,\n "total_ram":8245489664, "load_avg":0.51 }}\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Metrics page title\n //\n // Optional. Default: "Fiber Monitor"\n Title string\n\n // Refresh period\n //\n // Optional. Default: 3 seconds\n Refresh time.Duration\n\n // Whether the service should expose only the monitoring API.\n //\n // Optional. Default: false\n APIOnly bool\n\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Custom HTML Code to Head Section(Before End)\n //\n // Optional. Default: empty\n CustomHead string\n\n // FontURL for specify font resource path or URL . also you can use relative path\n //\n // Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap\n FontURL string\n\n // ChartJsURL for specify ChartJS library path or URL . also you can use relative path\n //\n // Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js\n ChartJsURL string\n\n index string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Title: defaultTitle,\n Refresh: defaultRefresh,\n FontURL: defaultFontURL,\n ChartJsURL: defaultChartJSURL,\n CustomHead: defaultCustomHead,\n APIOnly: false,\n Next: nil,\n index: newIndex(viewBag{\n defaultTitle,\n defaultRefresh,\n defaultFontURL,\n defaultChartJSURL,\n defaultCustomHead,\n }),\n}\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2bc33efd.1b9c99f2.js b/assets/js/2bc33efd.1b9c99f2.js new file mode 100644 index 00000000000..e6af7144a1e --- /dev/null +++ b/assets/js/2bc33efd.1b9c99f2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6208],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(n),f=i,m=u["".concat(s,".").concat(f)]||u[f]||d[f]||a;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=n(87462),i=(n(67294),n(3905));const a={id:"monitor",title:"Monitor"},o=void 0,l={unversionedId:"api/middleware/monitor",id:"version-v2.x/api/middleware/monitor",title:"Monitor",description:"Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor",source:"@site/versioned_docs/version-v2.x/api/middleware/monitor.md",sourceDirName:"api/middleware",slug:"/api/middleware/monitor",permalink:"/api/middleware/monitor",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"monitor",title:"Monitor"},sidebar:"tutorialSidebar",previous:{title:"Logger",permalink:"/api/middleware/logger"},next:{title:"Pprof",permalink:"/api/middleware/pprof"}},s={},p=[{value:"Signatures",id:"signatures",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Monitor middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that reports server metrics, inspired by ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/RafalWilinski/express-status-monitor"},"express-status-monitor")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Monitor is still in beta, API might change in the future!")),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/nHAtBpJ.gif",alt:null})),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New() fiber.Handler\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/monitor"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config (Assign the middleware to /metrics)\napp.Get("/metrics", monitor.New())\n\n// Or extend your config for customization\n// Assign the middleware to /metrics\n// and change the Title to `MyService Metrics Page`\napp.Get("/metrics", monitor.New(monitor.Config{Title: "MyService Metrics Page"}))\n')),(0,i.kt)("p",null,"You can also access the API endpoint with\n",(0,i.kt)("inlineCode",{parentName:"p"},'curl -X GET -H "Accept: application/json" http://localhost:3000/metrics')," which returns:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{"pid":{ "cpu":0.4568381746582226, "ram":20516864, "conns":3 },\n "os": { "cpu":8.759124087593099, "ram":3997155328, "conns":44,\n "total_ram":8245489664, "load_avg":0.51 }}\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Metrics page title\n //\n // Optional. Default: "Fiber Monitor"\n Title string\n\n // Refresh period\n //\n // Optional. Default: 3 seconds\n Refresh time.Duration\n\n // Whether the service should expose only the monitoring API.\n //\n // Optional. Default: false\n APIOnly bool\n\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Custom HTML Code to Head Section(Before End)\n //\n // Optional. Default: empty\n CustomHead string\n\n // FontURL for specify font resource path or URL . also you can use relative path\n //\n // Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap\n FontURL string\n\n // ChartJsURL for specify ChartJS library path or URL . also you can use relative path\n //\n // Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js\n ChartJsURL string\n\n index string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Title: defaultTitle,\n Refresh: defaultRefresh,\n FontURL: defaultFontURL,\n ChartJsURL: defaultChartJSURL,\n CustomHead: defaultCustomHead,\n APIOnly: false,\n Next: nil,\n index: newIndex(viewBag{\n defaultTitle,\n defaultRefresh,\n defaultFontURL,\n defaultChartJSURL,\n defaultCustomHead,\n }),\n}\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2bc33efd.c760cae1.js b/assets/js/2bc33efd.c760cae1.js deleted file mode 100644 index 82696991fc5..00000000000 --- a/assets/js/2bc33efd.c760cae1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6208],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(n),f=i,m=u["".concat(s,".").concat(f)]||u[f]||d[f]||a;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var r=n(7462),i=(n(7294),n(3905));const a={id:"monitor",title:"Monitor"},o=void 0,l={unversionedId:"api/middleware/monitor",id:"version-v2.x/api/middleware/monitor",title:"Monitor",description:"Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor",source:"@site/versioned_docs/version-v2.x/api/middleware/monitor.md",sourceDirName:"api/middleware",slug:"/api/middleware/monitor",permalink:"/api/middleware/monitor",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"monitor",title:"Monitor"},sidebar:"tutorialSidebar",previous:{title:"Logger",permalink:"/api/middleware/logger"},next:{title:"Pprof",permalink:"/api/middleware/pprof"}},s={},p=[{value:"Signatures",id:"signatures",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Monitor middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that reports server metrics, inspired by ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/RafalWilinski/express-status-monitor"},"express-status-monitor")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Monitor is still in beta, API might change in the future!")),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/nHAtBpJ.gif",alt:null})),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New() fiber.Handler\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/monitor"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config (Assign the middleware to /metrics)\napp.Get("/metrics", monitor.New())\n\n// Or extend your config for customization\n// Assign the middleware to /metrics\n// and change the Title to `MyService Metrics Page`\napp.Get("/metrics", monitor.New(monitor.Config{Title: "MyService Metrics Page"}))\n')),(0,i.kt)("p",null,"You can also access the API endpoint with\n",(0,i.kt)("inlineCode",{parentName:"p"},'curl -X GET -H "Accept: application/json" http://localhost:3000/metrics')," which returns:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{"pid":{ "cpu":0.4568381746582226, "ram":20516864, "conns":3 },\n "os": { "cpu":8.759124087593099, "ram":3997155328, "conns":44,\n "total_ram":8245489664, "load_avg":0.51 }}\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Metrics page title\n //\n // Optional. Default: "Fiber Monitor"\n Title string\n\n // Refresh period\n //\n // Optional. Default: 3 seconds\n Refresh time.Duration\n\n // Whether the service should expose only the monitoring API.\n //\n // Optional. Default: false\n APIOnly bool\n\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Custom HTML Code to Head Section(Before End)\n //\n // Optional. Default: empty\n CustomHead string\n\n // FontURL for specify font resource path or URL . also you can use relative path\n //\n // Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap\n FontURL string\n\n // ChartJsURL for specify ChartJS library path or URL . also you can use relative path\n //\n // Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js\n ChartJsURL string\n\n index string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Title: defaultTitle,\n Refresh: defaultRefresh,\n FontURL: defaultFontURL,\n ChartJsURL: defaultChartJSURL,\n CustomHead: defaultCustomHead,\n APIOnly: false,\n Next: nil,\n index: newIndex(viewBag{\n defaultTitle,\n defaultRefresh,\n defaultFontURL,\n defaultChartJSURL,\n defaultCustomHead,\n }),\n}\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2d339dcd.2ed76047.js b/assets/js/2d339dcd.2ed76047.js deleted file mode 100644 index 1179149c0e9..00000000000 --- a/assets/js/2d339dcd.2ed76047.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8731],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),g=u(n),f=a,m=g["".concat(l,".").concat(f)]||g[f]||p[f]||i;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[g]="string"==typeof e?e:a,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var r=n(7462),a=(n(7294),n(3905));const i={id:"s3",title:"S3"},o=void 0,s={unversionedId:"s3/s3",id:"version-ristretto_v1.x.x/s3/s3",title:"S3",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/s3/README.md",sourceDirName:"s3",slug:"/s3/",permalink:"/storage/ristretto_v1.x.x/s3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/s3/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"s3",title:"S3"},sidebar:"tutorialSidebar",previous:{title:"Ristretto",permalink:"/storage/ristretto_v1.x.x/ristretto/"},next:{title:"SQLite3",permalink:"/storage/ristretto_v1.x.x/sqlite3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=s3*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A S3 storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,a.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *s3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"S3 is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the s3 implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/s3\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/s3"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := s3.New()\n\n// Initialize custom config\nstore := s3.New(s3.Config{\n Bucket: "my-bucket-url",\n Endpoint: "my-endpoint",\n Region: "my-region",\n Reset: false,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for storage.\ntype Config struct {\n // S3 bucket name\n Bucket string\n\n // AWS endpoint\n Endpoint string\n\n // AWS region\n Region string\n\n // Request timeout\n //\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("p",null,"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Bucket: "",\n Region: "",\n Endpoint: "",\n Credentials: Credentials{},\n MaxAttempts: 3,\n RequestTimeout: 0,\n Reset: false,\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2d339dcd.d0fb39d9.js b/assets/js/2d339dcd.d0fb39d9.js new file mode 100644 index 00000000000..fc14df37159 --- /dev/null +++ b/assets/js/2d339dcd.d0fb39d9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8731],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),g=u(n),f=a,m=g["".concat(l,".").concat(f)]||g[f]||p[f]||i;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[g]="string"==typeof e?e:a,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var r=n(87462),a=(n(67294),n(3905));const i={id:"s3",title:"S3"},o=void 0,s={unversionedId:"s3/s3",id:"version-ristretto_v1.x.x/s3/s3",title:"S3",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/s3/README.md",sourceDirName:"s3",slug:"/s3/",permalink:"/storage/ristretto_v1.x.x/s3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/s3/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"s3",title:"S3"},sidebar:"tutorialSidebar",previous:{title:"Ristretto",permalink:"/storage/ristretto_v1.x.x/ristretto/"},next:{title:"SQLite3",permalink:"/storage/ristretto_v1.x.x/sqlite3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=s3*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A S3 storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,a.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *s3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"S3 is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the s3 implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/s3\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/s3"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := s3.New()\n\n// Initialize custom config\nstore := s3.New(s3.Config{\n Bucket: "my-bucket-url",\n Endpoint: "my-endpoint",\n Region: "my-region",\n Reset: false,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for storage.\ntype Config struct {\n // S3 bucket name\n Bucket string\n\n // AWS endpoint\n Endpoint string\n\n // AWS region\n Region string\n\n // Request timeout\n //\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("p",null,"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Bucket: "",\n Region: "",\n Endpoint: "",\n Credentials: Credentials{},\n MaxAttempts: 3,\n RequestTimeout: 0,\n Reset: false,\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2f0b5b6c.0419634e.js b/assets/js/2f0b5b6c.0419634e.js new file mode 100644 index 00000000000..2ad5e076b1f --- /dev/null +++ b/assets/js/2f0b5b6c.0419634e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5281],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>u});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),b=a,u=d["".concat(s,".").concat(b)]||d[b]||m[b]||i;return n?r.createElement(u,o(o({ref:t},p),{},{components:n})):r.createElement(u,o({ref:t},p))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=b;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));const i={id:"casbin",title:"Casbin"},o=void 0,l={unversionedId:"casbin/casbin",id:"version-fibersentry_v1.x.x/casbin/casbin",title:"Casbin",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/casbin/README.md",sourceDirName:"casbin",slug:"/casbin/",permalink:"/contrib/fibersentry_v1.x.x/casbin/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/casbin/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"casbin",title:"Casbin"},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc4b Welcome",permalink:"/contrib/fibersentry_v1.x.x/"},next:{title:"Fiberi18n",permalink:"/contrib/fibersentry_v1.x.x/fiberi18n/"}},s={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Examples",id:"examples",level:3},{value:"CustomPermission",id:"custompermission",level:3},{value:"RoutePermission",id:"routepermission",level:3},{value:"RoleAuthorization",id:"roleauthorization",level:3}],p={toc:c},d="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=casbin*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Casbin middleware for Fiber."),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/casbin\n")),(0,a.kt)("p",null,"choose an adapter from ",(0,a.kt)("a",{parentName:"p",href:"https://casbin.org/docs/en/adapters"},"here")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/casbin/xorm-adapter\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"casbin.New(config ...casbin.Config) *casbin.Middleware\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"ModelFilePath"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Model file path"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'"./model.conf"'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"PolicyAdapter"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"persist.Adapter")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Database adapter for policies"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"./policy.csv"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Enforcer"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"*casbin.Enforcer")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Custom casbin enforcer"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"Middleware generated enforcer using ModelFilePath & PolicyAdapter"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Lookup"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Look up for current subject"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'""'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Unauthorized"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) error")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Response body for unauthorized responses"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"Unauthorized"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Forbidden"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) error")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Response body for forbidden responses"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"Forbidden"))))),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/svcg/-fiber_casbin_demo"},"Gorm Adapter")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/contrib/casbin/tree/master/example"},"File Adapter"))),(0,a.kt)("h3",{id:"custompermission"},"CustomPermission"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/casbin"\n _ "github.com/go-sql-driver/mysql"\n "github.com/casbin/xorm-adapter/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n authz := casbin.New(casbin.Config{\n ModelFilePath: "path/to/rbac_model.conf",\n PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),\n Lookup: func(c *fiber.Ctx) string {\n // fetch authenticated user subject\n },\n })\n\n app.Post("/blog",\n authz.RequiresPermissions([]string{"blog:create"}, casbin.WithValidationRule(casbin.MatchAllRule)),\n func(c *fiber.Ctx) error {\n // your handler\n },\n )\n \n app.Delete("/blog/:id",\n authz.RequiresPermissions([]string{"blog:create", "blog:delete"}, casbin.WithValidationRule(casbin.AtLeastOneRule)),\n func(c *fiber.Ctx) error {\n // your handler\n },\n )\n\n app.Listen(":8080")\n}\n')),(0,a.kt)("h3",{id:"routepermission"},"RoutePermission"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/casbin"\n _ "github.com/go-sql-driver/mysql"\n "github.com/casbin/xorm-adapter/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n authz := casbin.New(casbin.Config{\n ModelFilePath: "path/to/rbac_model.conf",\n PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),\n Lookup: func(c *fiber.Ctx) string {\n // fetch authenticated user subject\n },\n })\n\n // check permission with Method and Path\n app.Post("/blog",\n authz.RoutePermission(),\n func(c *fiber.Ctx) error {\n // your handler\n },\n )\n\n app.Listen(":8080")\n}\n')),(0,a.kt)("h3",{id:"roleauthorization"},"RoleAuthorization"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/casbin"\n _ "github.com/go-sql-driver/mysql"\n "github.com/casbin/xorm-adapter/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n authz := casbin.New(casbin.Config{\n ModelFilePath: "path/to/rbac_model.conf",\n PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),\n Lookup: func(c *fiber.Ctx) string {\n // fetch authenticated user subject\n },\n })\n \n app.Put("/blog/:id",\n authz.RequiresRoles([]string{"admin"}),\n func(c *fiber.Ctx) error {\n // your handler\n },\n )\n\n app.Listen(":8080")\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2f0b5b6c.588a4005.js b/assets/js/2f0b5b6c.588a4005.js deleted file mode 100644 index 0c3b55b00ff..00000000000 --- a/assets/js/2f0b5b6c.588a4005.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5281],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>u});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),b=a,u=d["".concat(s,".").concat(b)]||d[b]||m[b]||i;return n?r.createElement(u,o(o({ref:t},p),{},{components:n})):r.createElement(u,o({ref:t},p))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=b;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=n(7462),a=(n(7294),n(3905));const i={id:"casbin",title:"Casbin"},o=void 0,l={unversionedId:"casbin/casbin",id:"version-fibersentry_v1.x.x/casbin/casbin",title:"Casbin",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/casbin/README.md",sourceDirName:"casbin",slug:"/casbin/",permalink:"/contrib/fibersentry_v1.x.x/casbin/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/casbin/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"casbin",title:"Casbin"},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc4b Welcome",permalink:"/contrib/fibersentry_v1.x.x/"},next:{title:"Fiberi18n",permalink:"/contrib/fibersentry_v1.x.x/fiberi18n/"}},s={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Examples",id:"examples",level:3},{value:"CustomPermission",id:"custompermission",level:3},{value:"RoutePermission",id:"routepermission",level:3},{value:"RoleAuthorization",id:"roleauthorization",level:3}],p={toc:c},d="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=casbin*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Casbin middleware for Fiber."),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/casbin\n")),(0,a.kt)("p",null,"choose an adapter from ",(0,a.kt)("a",{parentName:"p",href:"https://casbin.org/docs/en/adapters"},"here")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/casbin/xorm-adapter\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"casbin.New(config ...casbin.Config) *casbin.Middleware\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"ModelFilePath"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Model file path"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'"./model.conf"'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"PolicyAdapter"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"persist.Adapter")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Database adapter for policies"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"./policy.csv"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Enforcer"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"*casbin.Enforcer")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Custom casbin enforcer"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"Middleware generated enforcer using ModelFilePath & PolicyAdapter"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Lookup"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Look up for current subject"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'""'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Unauthorized"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) error")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Response body for unauthorized responses"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"Unauthorized"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Forbidden"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) error")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Response body for forbidden responses"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"Forbidden"))))),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/svcg/-fiber_casbin_demo"},"Gorm Adapter")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/gofiber/contrib/casbin/tree/master/example"},"File Adapter"))),(0,a.kt)("h3",{id:"custompermission"},"CustomPermission"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/casbin"\n _ "github.com/go-sql-driver/mysql"\n "github.com/casbin/xorm-adapter/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n authz := casbin.New(casbin.Config{\n ModelFilePath: "path/to/rbac_model.conf",\n PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),\n Lookup: func(c *fiber.Ctx) string {\n // fetch authenticated user subject\n },\n })\n\n app.Post("/blog",\n authz.RequiresPermissions([]string{"blog:create"}, casbin.WithValidationRule(casbin.MatchAllRule)),\n func(c *fiber.Ctx) error {\n // your handler\n },\n )\n \n app.Delete("/blog/:id",\n authz.RequiresPermissions([]string{"blog:create", "blog:delete"}, casbin.WithValidationRule(casbin.AtLeastOneRule)),\n func(c *fiber.Ctx) error {\n // your handler\n },\n )\n\n app.Listen(":8080")\n}\n')),(0,a.kt)("h3",{id:"routepermission"},"RoutePermission"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/casbin"\n _ "github.com/go-sql-driver/mysql"\n "github.com/casbin/xorm-adapter/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n authz := casbin.New(casbin.Config{\n ModelFilePath: "path/to/rbac_model.conf",\n PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),\n Lookup: func(c *fiber.Ctx) string {\n // fetch authenticated user subject\n },\n })\n\n // check permission with Method and Path\n app.Post("/blog",\n authz.RoutePermission(),\n func(c *fiber.Ctx) error {\n // your handler\n },\n )\n\n app.Listen(":8080")\n}\n')),(0,a.kt)("h3",{id:"roleauthorization"},"RoleAuthorization"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/casbin"\n _ "github.com/go-sql-driver/mysql"\n "github.com/casbin/xorm-adapter/v2"\n)\n\nfunc main() {\n app := fiber.New()\n\n authz := casbin.New(casbin.Config{\n ModelFilePath: "path/to/rbac_model.conf",\n PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),\n Lookup: func(c *fiber.Ctx) string {\n // fetch authenticated user subject\n },\n })\n \n app.Put("/blog/:id",\n authz.RequiresRoles([]string{"admin"}),\n func(c *fiber.Ctx) error {\n // your handler\n },\n )\n\n app.Listen(":8080")\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2f70042d.0fb1d70d.js b/assets/js/2f70042d.0fb1d70d.js deleted file mode 100644 index b3df4c08c9b..00000000000 --- a/assets/js/2f70042d.0fb1d70d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1203],{3905:(t,e,r)=>{r.d(e,{Zo:()=>c,kt:()=>f});var o=r(7294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var n=o.createContext({}),g=function(t){var e=o.useContext(n),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},c=function(t){var e=g(t.components);return o.createElement(n.Provider,{value:e},t.children)},m="mdxType",h={inlineCode:"code",wrapper:function(t){var e=t.children;return o.createElement(o.Fragment,{},e)}},b=o.forwardRef((function(t,e){var r=t.components,a=t.mdxType,s=t.originalType,n=t.parentName,c=l(t,["components","mdxType","originalType","parentName"]),m=g(r),b=a,f=m["".concat(n,".").concat(b)]||m[b]||h[b]||s;return r?o.createElement(f,i(i({ref:e},c),{},{components:r})):o.createElement(f,i({ref:e},c))}));function f(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var s=r.length,i=new Array(s);i[0]=b;var l={};for(var n in e)hasOwnProperty.call(e,n)&&(l[n]=e[n]);l.originalType=t,l[m]="string"==typeof t?t:a,i[1]=l;for(var g=2;g{r.r(e),r.d(e,{assets:()=>n,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var o=r(7462),a=(r(7294),r(3905));const s={title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},i=void 0,l={unversionedId:"README",id:"version-ristretto_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/storage/ristretto_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"ArangoDB",permalink:"/storage/ristretto_v1.x.x/arangodb/"}},n={},g=[{value:"\ud83d\udcd1 Storage Implementations",id:"-storage-implementations",level:2}],c={toc:g},m="wrapper";function h(t){let{components:e,...r}=t;return(0,a.kt)(m,(0,o.Z)({},c,r,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",{align:"center"},(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only"}),(0,a.kt)("br",null),(0,a.kt)("h1",{id:"-storage"},"\ud83d\udce6 Storage"),(0,a.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/storage?tab=doc"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,a.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/storage"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,a.kt)("a",{href:"https://gofiber.io/discord"},(0,a.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,a.kt)("p",null,"Premade storage drivers that implement the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/blob/main/storage.go"},(0,a.kt)("inlineCode",{parentName:"a"},"Storage"))," interface, designed to be used with various ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware"},"Fiber middlewares"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Storage interface for communicating with different database/key-value\n// providers. Visit https://github.com/gofiber/storage for more info.\ntype Storage interface {\n // Get gets the value for the given key.\n // `nil, nil` is returned when the key does not exist\n Get(key string) ([]byte, error)\n\n // Set stores the given value for the given key along\n // with an expiration value, 0 means no expiration.\n // Empty key or value will be ignored without an error.\n Set(key string, val []byte, exp time.Duration) error\n\n // Delete deletes the value for the given key.\n // It returns no error if the storage does not contain the key,\n Delete(key string) error\n\n // Reset resets the storage and delete all keys.\n Reset() error\n\n // Close closes the storage and will stop any running garbage\n // collectors and open connections.\n Close() error\n}\n")),(0,a.kt)("h2",{id:"-storage-implementations"},"\ud83d\udcd1 Storage Implementations"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/arangodb/"},"ArangoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/azureblob/"},"AzureBlob")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/badger/"},"Badger")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"./bbolt"},"Bbolt")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/couchbase/"},"Couchbase")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/dynamodb/"},"DynamoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/etcd/"},"Etcd")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/memcache/"},"Memcache")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/memory/"},"Memory")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/mongodb/"},"MongoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/mssql/"},"MSSQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/mysql/"},"MySQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/pebble/"},"Pebble")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/postgres/"},"Postgres")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/redis/"},"Redis")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/s3/"},"S3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/sqlite3/"},"SQLite3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2f70042d.92d16a70.js b/assets/js/2f70042d.92d16a70.js new file mode 100644 index 00000000000..691ac122e8e --- /dev/null +++ b/assets/js/2f70042d.92d16a70.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1203],{3905:(t,e,r)=>{r.d(e,{Zo:()=>c,kt:()=>f});var o=r(67294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var n=o.createContext({}),g=function(t){var e=o.useContext(n),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},c=function(t){var e=g(t.components);return o.createElement(n.Provider,{value:e},t.children)},m="mdxType",h={inlineCode:"code",wrapper:function(t){var e=t.children;return o.createElement(o.Fragment,{},e)}},b=o.forwardRef((function(t,e){var r=t.components,a=t.mdxType,s=t.originalType,n=t.parentName,c=l(t,["components","mdxType","originalType","parentName"]),m=g(r),b=a,f=m["".concat(n,".").concat(b)]||m[b]||h[b]||s;return r?o.createElement(f,i(i({ref:e},c),{},{components:r})):o.createElement(f,i({ref:e},c))}));function f(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var s=r.length,i=new Array(s);i[0]=b;var l={};for(var n in e)hasOwnProperty.call(e,n)&&(l[n]=e[n]);l.originalType=t,l[m]="string"==typeof t?t:a,i[1]=l;for(var g=2;g{r.r(e),r.d(e,{assets:()=>n,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var o=r(87462),a=(r(67294),r(3905));const s={title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},i=void 0,l={unversionedId:"README",id:"version-ristretto_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/storage/ristretto_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"ArangoDB",permalink:"/storage/ristretto_v1.x.x/arangodb/"}},n={},g=[{value:"\ud83d\udcd1 Storage Implementations",id:"-storage-implementations",level:2}],c={toc:g},m="wrapper";function h(t){let{components:e,...r}=t;return(0,a.kt)(m,(0,o.Z)({},c,r,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",{align:"center"},(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only"}),(0,a.kt)("br",null),(0,a.kt)("h1",{id:"-storage"},"\ud83d\udce6 Storage"),(0,a.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/storage?tab=doc"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,a.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/storage"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,a.kt)("a",{href:"https://gofiber.io/discord"},(0,a.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,a.kt)("p",null,"Premade storage drivers that implement the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/blob/main/storage.go"},(0,a.kt)("inlineCode",{parentName:"a"},"Storage"))," interface, designed to be used with various ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware"},"Fiber middlewares"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Storage interface for communicating with different database/key-value\n// providers. Visit https://github.com/gofiber/storage for more info.\ntype Storage interface {\n // Get gets the value for the given key.\n // `nil, nil` is returned when the key does not exist\n Get(key string) ([]byte, error)\n\n // Set stores the given value for the given key along\n // with an expiration value, 0 means no expiration.\n // Empty key or value will be ignored without an error.\n Set(key string, val []byte, exp time.Duration) error\n\n // Delete deletes the value for the given key.\n // It returns no error if the storage does not contain the key,\n Delete(key string) error\n\n // Reset resets the storage and delete all keys.\n Reset() error\n\n // Close closes the storage and will stop any running garbage\n // collectors and open connections.\n Close() error\n}\n")),(0,a.kt)("h2",{id:"-storage-implementations"},"\ud83d\udcd1 Storage Implementations"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/arangodb/"},"ArangoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/azureblob/"},"AzureBlob")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/badger/"},"Badger")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"./bbolt"},"Bbolt")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/couchbase/"},"Couchbase")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/dynamodb/"},"DynamoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/etcd/"},"Etcd")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/memcache/"},"Memcache")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/memory/"},"Memory")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/mongodb/"},"MongoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/mssql/"},"MSSQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/mysql/"},"MySQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/pebble/"},"Pebble")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/postgres/"},"Postgres")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/redis/"},"Redis")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/s3/"},"S3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/ristretto_v1.x.x/sqlite3/"},"SQLite3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/302308c6.230f7c58.js b/assets/js/302308c6.230f7c58.js new file mode 100644 index 00000000000..c066f75e6c9 --- /dev/null +++ b/assets/js/302308c6.230f7c58.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9092],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=u(n),m=i,f=p["".concat(l,".").concat(m)]||p[m]||c[m]||a;return n?r.createElement(f,o(o({ref:t},d),{},{components:n})):r.createElement(f,o({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:i,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>a,metadata:()=>s,toc:()=>u});var r=n(87462),i=(n(67294),n(3905));const a={id:"limiter",title:"Limiter"},o=void 0,s={unversionedId:"api/middleware/limiter",id:"api/middleware/limiter",title:"Limiter",description:"Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled.",source:"@site/docs/core/api/middleware/limiter.md",sourceDirName:"api/middleware",slug:"/api/middleware/limiter",permalink:"/next/api/middleware/limiter",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/limiter.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"limiter",title:"Limiter"},sidebar:"tutorialSidebar",previous:{title:"Keyauth",permalink:"/next/api/middleware/keyauth"},next:{title:"Logger",permalink:"/next/api/middleware/logger"}},l={},u=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Sliding window",id:"sliding-window",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2},{value:"Custom Storage/Database",id:"custom-storagedatabase",level:3}],d={toc:u},p="wrapper";function c(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Limiter middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled."),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This middleware uses our ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage"},"Storage")," package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.")),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This module does not share state with other processes/servers by default.")),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/limiter"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(limiter.New())\n\n// Or extend your config for customization\napp.Use(limiter.New(limiter.Config{\n Next: func(c *fiber.Ctx) bool {\n return c.IP() == "127.0.0.1"\n },\n Max: 20,\n Expiration: 30 * time.Second,\n KeyGenerator: func(c *fiber.Ctx) string {\n return c.Get("x-forwarded-for")\n },\n LimitReached: func(c *fiber.Ctx) error {\n return c.SendFile("./toofast.html")\n },\n Storage: myCustomStorage{},\n}))\n')),(0,i.kt)("h2",{id:"sliding-window"},"Sliding window"),(0,i.kt)("p",null,"Instead of using the standard fixed window algorithm, you can enable the ",(0,i.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Sliding_window_protocol"},"sliding window")," algorithm."),(0,i.kt)("p",null,"A example of such configuration is:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"app.Use(limiter.New(limiter.Config{\n Max: 20,\n Expiration: 30 * time.Second,\n LimiterMiddleware: limiter.SlidingWindow{},\n}))\n")),(0,i.kt)("p",null,"This means that every window will take into account the previous window(if there was any). The given formula for the rate is:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"weightOfPreviousWindpw = previous window's amount request * (whenNewWindow / Expiration)\nrate = weightOfPreviousWindpw + current window's amount request.\n")),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Max number of recent connections during `Duration` seconds before sending a 429 response\n //\n // Default: 5\n Max int\n\n // KeyGenerator allows you to generate custom keys, by default c.IP() is used\n //\n // Default: func(c *fiber.Ctx) string {\n // return c.IP()\n // }\n KeyGenerator func(*fiber.Ctx) string\n\n // Expiration is the time on how long to keep records of requests in memory\n //\n // Default: 1 * time.Minute\n Expiration time.Duration\n\n // LimitReached is called when a request hits the limit\n //\n // Default: func(c *fiber.Ctx) error {\n // return c.SendStatus(fiber.StatusTooManyRequests)\n // }\n LimitReached fiber.Handler\n\n // When set to true, requests with StatusCode >= 400 won't be counted.\n //\n // Default: false\n SkipFailedRequests bool\n\n // When set to true, requests with StatusCode < 400 won't be counted.\n //\n // Default: false\n SkipSuccessfulRequests bool\n\n // Store is used to store the state of the middleware\n //\n // Default: an in memory store for this process only\n Storage fiber.Storage\n\n // LimiterMiddleware is the struct that implements limiter middleware.\n //\n // Default: a new Fixed Window Rate Limiter\n LimiterMiddleware LimiterHandler\n}\n")),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"A custom store can be used if it implements the ",(0,i.kt)("inlineCode",{parentName:"p"},"Storage")," interface - more details and an example can be found in ",(0,i.kt)("inlineCode",{parentName:"p"},"store.go"),".")),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Max: 5,\n Expiration: 1 * time.Minute,\n KeyGenerator: func(c *fiber.Ctx) string {\n return c.IP()\n },\n LimitReached: func(c *fiber.Ctx) error {\n return c.SendStatus(fiber.StatusTooManyRequests)\n },\n SkipFailedRequests: false,\n SkipSuccessfulRequests: false,\n LimiterMiddleware: FixedWindow{},\n}\n")),(0,i.kt)("h3",{id:"custom-storagedatabase"},"Custom Storage/Database"),(0,i.kt)("p",null,"You can use any storage from our ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/"},"storage")," package."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3\napp.Use(limiter.New(limiter.Config{\n Storage: storage,\n}))\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/302308c6.ffcd529e.js b/assets/js/302308c6.ffcd529e.js deleted file mode 100644 index f1516b0ac29..00000000000 --- a/assets/js/302308c6.ffcd529e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9092],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=u(n),m=i,f=p["".concat(l,".").concat(m)]||p[m]||c[m]||a;return n?r.createElement(f,o(o({ref:t},d),{},{components:n})):r.createElement(f,o({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:i,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>a,metadata:()=>s,toc:()=>u});var r=n(7462),i=(n(7294),n(3905));const a={id:"limiter",title:"Limiter"},o=void 0,s={unversionedId:"api/middleware/limiter",id:"api/middleware/limiter",title:"Limiter",description:"Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled.",source:"@site/docs/core/api/middleware/limiter.md",sourceDirName:"api/middleware",slug:"/api/middleware/limiter",permalink:"/next/api/middleware/limiter",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/limiter.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"limiter",title:"Limiter"},sidebar:"tutorialSidebar",previous:{title:"Keyauth",permalink:"/next/api/middleware/keyauth"},next:{title:"Logger",permalink:"/next/api/middleware/logger"}},l={},u=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Sliding window",id:"sliding-window",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2},{value:"Custom Storage/Database",id:"custom-storagedatabase",level:3}],d={toc:u},p="wrapper";function c(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Limiter middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled."),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This middleware uses our ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage"},"Storage")," package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.")),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This module does not share state with other processes/servers by default.")),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/limiter"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(limiter.New())\n\n// Or extend your config for customization\napp.Use(limiter.New(limiter.Config{\n Next: func(c *fiber.Ctx) bool {\n return c.IP() == "127.0.0.1"\n },\n Max: 20,\n Expiration: 30 * time.Second,\n KeyGenerator: func(c *fiber.Ctx) string {\n return c.Get("x-forwarded-for")\n },\n LimitReached: func(c *fiber.Ctx) error {\n return c.SendFile("./toofast.html")\n },\n Storage: myCustomStorage{},\n}))\n')),(0,i.kt)("h2",{id:"sliding-window"},"Sliding window"),(0,i.kt)("p",null,"Instead of using the standard fixed window algorithm, you can enable the ",(0,i.kt)("a",{parentName:"p",href:"https://en.wikipedia.org/wiki/Sliding_window_protocol"},"sliding window")," algorithm."),(0,i.kt)("p",null,"A example of such configuration is:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"app.Use(limiter.New(limiter.Config{\n Max: 20,\n Expiration: 30 * time.Second,\n LimiterMiddleware: limiter.SlidingWindow{},\n}))\n")),(0,i.kt)("p",null,"This means that every window will take into account the previous window(if there was any). The given formula for the rate is:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"weightOfPreviousWindpw = previous window's amount request * (whenNewWindow / Expiration)\nrate = weightOfPreviousWindpw + current window's amount request.\n")),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Max number of recent connections during `Duration` seconds before sending a 429 response\n //\n // Default: 5\n Max int\n\n // KeyGenerator allows you to generate custom keys, by default c.IP() is used\n //\n // Default: func(c *fiber.Ctx) string {\n // return c.IP()\n // }\n KeyGenerator func(*fiber.Ctx) string\n\n // Expiration is the time on how long to keep records of requests in memory\n //\n // Default: 1 * time.Minute\n Expiration time.Duration\n\n // LimitReached is called when a request hits the limit\n //\n // Default: func(c *fiber.Ctx) error {\n // return c.SendStatus(fiber.StatusTooManyRequests)\n // }\n LimitReached fiber.Handler\n\n // When set to true, requests with StatusCode >= 400 won't be counted.\n //\n // Default: false\n SkipFailedRequests bool\n\n // When set to true, requests with StatusCode < 400 won't be counted.\n //\n // Default: false\n SkipSuccessfulRequests bool\n\n // Store is used to store the state of the middleware\n //\n // Default: an in memory store for this process only\n Storage fiber.Storage\n\n // LimiterMiddleware is the struct that implements limiter middleware.\n //\n // Default: a new Fixed Window Rate Limiter\n LimiterMiddleware LimiterHandler\n}\n")),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"A custom store can be used if it implements the ",(0,i.kt)("inlineCode",{parentName:"p"},"Storage")," interface - more details and an example can be found in ",(0,i.kt)("inlineCode",{parentName:"p"},"store.go"),".")),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Max: 5,\n Expiration: 1 * time.Minute,\n KeyGenerator: func(c *fiber.Ctx) string {\n return c.IP()\n },\n LimitReached: func(c *fiber.Ctx) error {\n return c.SendStatus(fiber.StatusTooManyRequests)\n },\n SkipFailedRequests: false,\n SkipSuccessfulRequests: false,\n LimiterMiddleware: FixedWindow{},\n}\n")),(0,i.kt)("h3",{id:"custom-storagedatabase"},"Custom Storage/Database"),(0,i.kt)("p",null,"You can use any storage from our ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/"},"storage")," package."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3\napp.Use(limiter.New(limiter.Config{\n Storage: storage,\n}))\n")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/30f87c66.a8573b00.js b/assets/js/30f87c66.a8573b00.js new file mode 100644 index 00000000000..be9929ceddd --- /dev/null +++ b/assets/js/30f87c66.a8573b00.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9595],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),m=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=m(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=m(n),d=a,f=c["".concat(s,".").concat(d)]||c[d]||u[d]||i;return n?r.createElement(f,l(l({ref:t},p),{},{components:n})):r.createElement(f,l({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:a,l[1]=o;for(var m=2;m{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>m});var r=n(87462),a=(n(67294),n(3905));const i={id:"slim",title:"Slim"},l=void 0,o={unversionedId:"slim/slim",id:"slim/slim",title:"Slim",description:"Release",source:"@site/docs/template/slim/README.md",sourceDirName:"slim",slug:"/slim/",permalink:"/template/next/slim/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/slim/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"slim",title:"Slim"},sidebar:"tutorialSidebar",previous:{title:"Pug",permalink:"/template/next/pug/"}},s={},m=[{value:"Basic Example",id:"basic-example",level:3}],p={toc:m},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Slim is a template engine created by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/mattn/go-slim"},"mattn"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://rubydoc.info/gems/slim/frames"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.slim"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},'== render("partials/header.slim")\n\nh1 = Title\n\n== render("partials/footer.slim")\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.slim"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"h2 = Header\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.slim"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"h2 = Footer\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.slim"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"doctype html\nhtml\n head\n title Main\n include ../partials/meta.slim\n body\n | {{embed}}\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/slim/v2"\n\n // "net/http" // embedded system\n)\n\nfunc main() {\n // Create a new engine\n engine := slim.New("./views", ".slim")\n\n // Or from an embedded system\n // See github.com/gofiber/embed for examples\n // engine := slim.NewFileSystem(http.Dir("./views", ".slim"))\n\n // Pass the engine to the Views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/30f87c66.f7f6fada.js b/assets/js/30f87c66.f7f6fada.js deleted file mode 100644 index b24317c8e43..00000000000 --- a/assets/js/30f87c66.f7f6fada.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9595],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),m=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=m(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=m(n),d=a,f=c["".concat(s,".").concat(d)]||c[d]||u[d]||i;return n?r.createElement(f,l(l({ref:t},p),{},{components:n})):r.createElement(f,l({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:a,l[1]=o;for(var m=2;m{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>m});var r=n(7462),a=(n(7294),n(3905));const i={id:"slim",title:"Slim"},l=void 0,o={unversionedId:"slim/slim",id:"slim/slim",title:"Slim",description:"Release",source:"@site/docs/template/slim/README.md",sourceDirName:"slim",slug:"/slim/",permalink:"/template/next/slim/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/slim/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"slim",title:"Slim"},sidebar:"tutorialSidebar",previous:{title:"Pug",permalink:"/template/next/pug/"}},s={},m=[{value:"Basic Example",id:"basic-example",level:3}],p={toc:m},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Slim is a template engine created by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/mattn/go-slim"},"mattn"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://rubydoc.info/gems/slim/frames"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.slim"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},'== render("partials/header.slim")\n\nh1 = Title\n\n== render("partials/footer.slim")\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.slim"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"h2 = Header\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.slim"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"h2 = Footer\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.slim"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"doctype html\nhtml\n head\n title Main\n include ../partials/meta.slim\n body\n | {{embed}}\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/slim/v2"\n\n // "net/http" // embedded system\n)\n\nfunc main() {\n // Create a new engine\n engine := slim.New("./views", ".slim")\n\n // Or from an embedded system\n // See github.com/gofiber/embed for examples\n // engine := slim.NewFileSystem(http.Dir("./views", ".slim"))\n\n // Pass the engine to the Views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3109af4c.396e8a3d.js b/assets/js/3109af4c.396e8a3d.js new file mode 100644 index 00000000000..5e0676b19e3 --- /dev/null +++ b/assets/js/3109af4c.396e8a3d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6873],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),f=c(n),b=i,d=f["".concat(l,".").concat(b)]||f[b]||u[b]||a;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=b;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[f]="string"==typeof e?e:i,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var r=n(87462),i=(n(67294),n(3905));const a={id:"fibersentry",title:"Fibersentry"},o=void 0,s={unversionedId:"fibersentry/fibersentry",id:"fibersentry/fibersentry",title:"Fibersentry",description:"Release",source:"@site/docs/contrib/fibersentry/README.md",sourceDirName:"fibersentry",slug:"/fibersentry/",permalink:"/contrib/next/fibersentry/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fibersentry/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fibersentry",title:"Fibersentry"},sidebar:"tutorialSidebar",previous:{title:"Fibernewrelic",permalink:"/contrib/next/fibernewrelic/"},next:{title:"Fiberzap",permalink:"/contrib/next/fiberzap/"}},l={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Accessing Context in BeforeSend callback",id:"accessing-context-in-beforesend-callback",level:3}],p={toc:c},f="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(f,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fibersentry*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://sentry.io/"},"Sentry")," support for Fiber."),(0,i.kt)("h3",{id:"install"},"Install"),(0,i.kt)("p",null,"This middleware supports Fiber v2."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fibersentry\ngo get -u github.com/getsentry/sentry-go\n")),(0,i.kt)("h3",{id:"signature"},"Signature"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"fibersentry.New(config ...Config) fiber.Handler\n")),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic configures whether Sentry should repanic after recovery. Set to true, if ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery configures whether you want to block the request before moving forward with the response. If ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used, it's safe to either skip this option or set it to false."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout for the event delivery requests."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Second * 2"))))),(0,i.kt)("h3",{id:"usage"},"Usage"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry")," attaches an instance of ",(0,i.kt)("inlineCode",{parentName:"p"},"*sentry.Hub")," (",(0,i.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/getsentry/sentry-go#Hub"},"https://godoc.org/github.com/getsentry/sentry-go#Hub"),") to the request's context, which makes it available throughout the rest of the request's lifetime.\nYou can access it by using the ",(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry.GetHubFromContext()")," method on the context itself in any of your proceeding middleware and routes.\nAnd it should be used instead of the global ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureMessage"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureException"),", or any other calls, as it keeps the separation of data between the requests."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Keep in mind that ",(0,i.kt)("inlineCode",{parentName:"strong"},"*sentry.Hub")," won't be available in middleware attached before to ",(0,i.kt)("inlineCode",{parentName:"strong"},"fibersentry"),"!")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "log"\n\n "github.com/getsentry/sentry-go"\n "github.com/gofiber/contrib/fibersentry"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/utils"\n)\n\nfunc main() {\n _ = sentry.Init(sentry.ClientOptions{\n Dsn: "",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(utils.ImmutableString(c.Hostname()))\n }\n }\n fmt.Println(event)\n return event\n },\n Debug: true,\n AttachStacktrace: true,\n })\n\n app := fiber.New()\n\n app.Use(fibersentry.New(fibersentry.Config{\n Repanic: true,\n WaitForDelivery: true,\n }))\n\n enhanceSentryEvent := func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")\n }\n return c.Next()\n }\n\n app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {\n panic("y tho")\n })\n\n app.All("/", func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.WithScope(func(scope *sentry.Scope) {\n scope.SetExtra("unwantedQuery", "someQueryDataMaybe")\n hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")\n })\n }\n return c.SendStatus(fiber.StatusOK)\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,i.kt)("h3",{id:"accessing-context-in-beforesend-callback"},"Accessing Context in ",(0,i.kt)("inlineCode",{parentName:"h3"},"BeforeSend")," callback"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'sentry.Init(sentry.ClientOptions{\n Dsn: "your-public-dsn",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(c.Hostname())\n }\n }\n return event\n },\n})\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3109af4c.9c5a997e.js b/assets/js/3109af4c.9c5a997e.js deleted file mode 100644 index 2b5313604a7..00000000000 --- a/assets/js/3109af4c.9c5a997e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6873],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),f=c(n),b=i,d=f["".concat(l,".").concat(b)]||f[b]||u[b]||a;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=b;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[f]="string"==typeof e?e:i,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var r=n(7462),i=(n(7294),n(3905));const a={id:"fibersentry",title:"Fibersentry"},o=void 0,s={unversionedId:"fibersentry/fibersentry",id:"fibersentry/fibersentry",title:"Fibersentry",description:"Release",source:"@site/docs/contrib/fibersentry/README.md",sourceDirName:"fibersentry",slug:"/fibersentry/",permalink:"/contrib/next/fibersentry/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fibersentry/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fibersentry",title:"Fibersentry"},sidebar:"tutorialSidebar",previous:{title:"Fibernewrelic",permalink:"/contrib/next/fibernewrelic/"},next:{title:"Fiberzap",permalink:"/contrib/next/fiberzap/"}},l={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Accessing Context in BeforeSend callback",id:"accessing-context-in-beforesend-callback",level:3}],p={toc:c},f="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(f,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fibersentry*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://sentry.io/"},"Sentry")," support for Fiber."),(0,i.kt)("h3",{id:"install"},"Install"),(0,i.kt)("p",null,"This middleware supports Fiber v2."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fibersentry\ngo get -u github.com/getsentry/sentry-go\n")),(0,i.kt)("h3",{id:"signature"},"Signature"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"fibersentry.New(config ...Config) fiber.Handler\n")),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic configures whether Sentry should repanic after recovery. Set to true, if ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery configures whether you want to block the request before moving forward with the response. If ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used, it's safe to either skip this option or set it to false."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout for the event delivery requests."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Second * 2"))))),(0,i.kt)("h3",{id:"usage"},"Usage"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry")," attaches an instance of ",(0,i.kt)("inlineCode",{parentName:"p"},"*sentry.Hub")," (",(0,i.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/getsentry/sentry-go#Hub"},"https://godoc.org/github.com/getsentry/sentry-go#Hub"),") to the request's context, which makes it available throughout the rest of the request's lifetime.\nYou can access it by using the ",(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry.GetHubFromContext()")," method on the context itself in any of your proceeding middleware and routes.\nAnd it should be used instead of the global ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureMessage"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureException"),", or any other calls, as it keeps the separation of data between the requests."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Keep in mind that ",(0,i.kt)("inlineCode",{parentName:"strong"},"*sentry.Hub")," won't be available in middleware attached before to ",(0,i.kt)("inlineCode",{parentName:"strong"},"fibersentry"),"!")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "log"\n\n "github.com/getsentry/sentry-go"\n "github.com/gofiber/contrib/fibersentry"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/utils"\n)\n\nfunc main() {\n _ = sentry.Init(sentry.ClientOptions{\n Dsn: "",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(utils.ImmutableString(c.Hostname()))\n }\n }\n fmt.Println(event)\n return event\n },\n Debug: true,\n AttachStacktrace: true,\n })\n\n app := fiber.New()\n\n app.Use(fibersentry.New(fibersentry.Config{\n Repanic: true,\n WaitForDelivery: true,\n }))\n\n enhanceSentryEvent := func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")\n }\n return c.Next()\n }\n\n app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {\n panic("y tho")\n })\n\n app.All("/", func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.WithScope(func(scope *sentry.Scope) {\n scope.SetExtra("unwantedQuery", "someQueryDataMaybe")\n hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")\n })\n }\n return c.SendStatus(fiber.StatusOK)\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,i.kt)("h3",{id:"accessing-context-in-beforesend-callback"},"Accessing Context in ",(0,i.kt)("inlineCode",{parentName:"h3"},"BeforeSend")," callback"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'sentry.Init(sentry.ClientOptions{\n Dsn: "your-public-dsn",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(c.Hostname())\n }\n }\n return event\n },\n})\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/32a09f8c.1436fb15.js b/assets/js/32a09f8c.1436fb15.js deleted file mode 100644 index 4a3db2465be..00000000000 --- a/assets/js/32a09f8c.1436fb15.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8279],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=m(r),g=a,f=c["".concat(s,".").concat(g)]||c[g]||u[g]||o;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var m=2;m{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(7462),a=(r(7294),r(3905));const o={id:"memory",title:"Memory"},i=void 0,l={unversionedId:"memory/memory",id:"version-mysql_v1.x.x/memory/memory",title:"Memory",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/memory/README.md",sourceDirName:"memory",slug:"/memory/",permalink:"/storage/mysql_v1.x.x/memory/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memory/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memory",title:"Memory"},sidebar:"tutorialSidebar",previous:{title:"Memcache",permalink:"/storage/mysql_v1.x.x/memcache/"},next:{title:"MongoDB",permalink:"/storage/mysql_v1.x.x/mongodb/"}},s={},m=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:m},c="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memory*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"An in-memory storage driver."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() map[string]entry\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Memory is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the memory implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memory"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := memory.New()\n\n// Initialize custom config\nstore := memory.New(memory.Config{\n GCInterval: 10 * time.Second,\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Time before deleting expired keys\n //\n // Default is 10 * time.Second\n GCInterval time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n GCInterval: 10 * time.Second,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/32a09f8c.24c23d3d.js b/assets/js/32a09f8c.24c23d3d.js new file mode 100644 index 00000000000..1bab929e6f2 --- /dev/null +++ b/assets/js/32a09f8c.24c23d3d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8279],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=m(r),g=a,f=c["".concat(s,".").concat(g)]||c[g]||u[g]||o;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var m=2;m{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(87462),a=(r(67294),r(3905));const o={id:"memory",title:"Memory"},i=void 0,l={unversionedId:"memory/memory",id:"version-mysql_v1.x.x/memory/memory",title:"Memory",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/memory/README.md",sourceDirName:"memory",slug:"/memory/",permalink:"/storage/mysql_v1.x.x/memory/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memory/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memory",title:"Memory"},sidebar:"tutorialSidebar",previous:{title:"Memcache",permalink:"/storage/mysql_v1.x.x/memcache/"},next:{title:"MongoDB",permalink:"/storage/mysql_v1.x.x/mongodb/"}},s={},m=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:m},c="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memory*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"An in-memory storage driver."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() map[string]entry\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Memory is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the memory implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memory"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := memory.New()\n\n// Initialize custom config\nstore := memory.New(memory.Config{\n GCInterval: 10 * time.Second,\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Time before deleting expired keys\n //\n // Default is 10 * time.Second\n GCInterval time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n GCInterval: 10 * time.Second,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/32e68b93.28aac975.js b/assets/js/32e68b93.28aac975.js new file mode 100644 index 00000000000..08f2e33ebc5 --- /dev/null +++ b/assets/js/32e68b93.28aac975.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6494],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(r),d=o,f=u["".concat(l,".").concat(d)]||u[d]||m[d]||a;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:o,i[1]=c;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>c,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));const a={id:"faster-fiber",title:"\u26a1 Make Fiber Faster",sidebar_position:7},i=void 0,c={unversionedId:"guide/faster-fiber",id:"guide/faster-fiber",title:"\u26a1 Make Fiber Faster",description:"Custom JSON Encoder/Decoder",source:"@site/docs/core/guide/faster-fiber.md",sourceDirName:"guide",slug:"/guide/faster-fiber",permalink:"/next/guide/faster-fiber",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/faster-fiber.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:7,frontMatter:{id:"faster-fiber",title:"\u26a1 Make Fiber Faster",sidebar_position:7},sidebar:"tutorialSidebar",previous:{title:"\ud83e\ude9d Hooks",permalink:"/next/guide/hooks"},next:{title:"Extra",permalink:"/next/category/extra"}},l={},s=[{value:"Custom JSON Encoder/Decoder",id:"custom-json-encoderdecoder",level:2},{value:"References",id:"references",level:3}],p={toc:s},u="wrapper";function m(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"custom-json-encoderdecoder"},"Custom JSON Encoder/Decoder"),(0,o.kt)("p",null,"Since Fiber v2.32.0, we use ",(0,o.kt)("strong",{parentName:"p"},"encoding/json")," as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of ",(0,o.kt)("strong",{parentName:"p"},"encoding/json"),", we recommend you to use these libraries:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/goccy/go-json"},"goccy/go-json")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/bytedance/sonic"},"bytedance/sonic")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/segmentio/encoding"},"segmentio/encoding")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/mailru/easyjson"},"mailru/easyjson")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/minio/simdjson-go"},"minio/simdjson-go")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/wI2L/jettison"},"wI2L/jettison"))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'package main\n\nimport "github.com/gofiber/fiber/v2"\nimport "github.com/goccy/go-json"\n\nfunc main() {\n app := fiber.New(fiber.Config{\n JSONEncoder: json.Marshal,\n JSONDecoder: json.Unmarshal,\n })\n\n # ...\n}\n')),(0,o.kt)("h3",{id:"references"},"References"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/next/api/client#jsonencoder"},"Set custom JSON encoder for client")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/next/api/client#jsondecoder"},"Set custom JSON decoder for client")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/next/api/fiber#config"},"Set custom JSON encoder for application")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/next/api/fiber#config"},"Set custom JSON decoder for application"))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/32e68b93.fd4d6362.js b/assets/js/32e68b93.fd4d6362.js deleted file mode 100644 index 4bf68d7d794..00000000000 --- a/assets/js/32e68b93.fd4d6362.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6494],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(r),d=o,f=u["".concat(l,".").concat(d)]||u[d]||m[d]||a;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:o,i[1]=c;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>c,toc:()=>s});var n=r(7462),o=(r(7294),r(3905));const a={id:"faster-fiber",title:"\u26a1 Make Fiber Faster",sidebar_position:7},i=void 0,c={unversionedId:"guide/faster-fiber",id:"guide/faster-fiber",title:"\u26a1 Make Fiber Faster",description:"Custom JSON Encoder/Decoder",source:"@site/docs/core/guide/faster-fiber.md",sourceDirName:"guide",slug:"/guide/faster-fiber",permalink:"/next/guide/faster-fiber",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/faster-fiber.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:7,frontMatter:{id:"faster-fiber",title:"\u26a1 Make Fiber Faster",sidebar_position:7},sidebar:"tutorialSidebar",previous:{title:"\ud83e\ude9d Hooks",permalink:"/next/guide/hooks"},next:{title:"Extra",permalink:"/next/category/extra"}},l={},s=[{value:"Custom JSON Encoder/Decoder",id:"custom-json-encoderdecoder",level:2},{value:"References",id:"references",level:3}],p={toc:s},u="wrapper";function m(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"custom-json-encoderdecoder"},"Custom JSON Encoder/Decoder"),(0,o.kt)("p",null,"Since Fiber v2.32.0, we use ",(0,o.kt)("strong",{parentName:"p"},"encoding/json")," as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of ",(0,o.kt)("strong",{parentName:"p"},"encoding/json"),", we recommend you to use these libraries:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/goccy/go-json"},"goccy/go-json")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/bytedance/sonic"},"bytedance/sonic")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/segmentio/encoding"},"segmentio/encoding")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/mailru/easyjson"},"mailru/easyjson")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/minio/simdjson-go"},"minio/simdjson-go")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/wI2L/jettison"},"wI2L/jettison"))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'package main\n\nimport "github.com/gofiber/fiber/v2"\nimport "github.com/goccy/go-json"\n\nfunc main() {\n app := fiber.New(fiber.Config{\n JSONEncoder: json.Marshal,\n JSONDecoder: json.Unmarshal,\n })\n\n # ...\n}\n')),(0,o.kt)("h3",{id:"references"},"References"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/next/api/client#jsonencoder"},"Set custom JSON encoder for client")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/next/api/client#jsondecoder"},"Set custom JSON decoder for client")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/next/api/fiber#config"},"Set custom JSON encoder for application")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/next/api/fiber#config"},"Set custom JSON decoder for application"))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/351af030.2e7c60dd.js b/assets/js/351af030.2e7c60dd.js new file mode 100644 index 00000000000..6276134d200 --- /dev/null +++ b/assets/js/351af030.2e7c60dd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5397],{3905:(e,t,n)=>{n.d(t,{Zo:()=>f,kt:()=>m});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=r.createContext({}),c=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},f=function(e){var t=c(e.components);return r.createElement(p.Provider,{value:t},e.children)},d="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,p=e.parentName,f=o(e,["components","mdxType","originalType","parentName"]),d=c(n),g=i,m=d["".concat(p,".").concat(g)]||d[g]||s[g]||a;return n?r.createElement(m,l(l({ref:t},f),{},{components:n})):r.createElement(m,l({ref:t},f))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,l=new Array(a);l[0]=g;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[d]="string"==typeof e?e:i,l[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>s,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var r=n(87462),i=(n(67294),n(3905));const a={id:"fibernewrelic",title:"Fibernewrelic"},l=void 0,o={unversionedId:"fibernewrelic/fibernewrelic",id:"version-fibersentry_v1.x.x/fibernewrelic/fibernewrelic",title:"Fibernewrelic",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/fibernewrelic/README.md",sourceDirName:"fibernewrelic",slug:"/fibernewrelic/",permalink:"/contrib/fibersentry_v1.x.x/fibernewrelic/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fibernewrelic/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fibernewrelic",title:"Fibernewrelic"},sidebar:"tutorialSidebar",previous:{title:"Fiberi18n",permalink:"/contrib/fibersentry_v1.x.x/fiberi18n/"},next:{title:"Fibersentry",permalink:"/contrib/fibersentry_v1.x.x/fibersentry/"}},p={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Usage with existing New Relic application",id:"usage-with-existing-new-relic-application",level:3}],f={toc:c},d="wrapper";function s(e){let{components:t,...n}=e;return(0,i.kt)(d,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fibernewrelic*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/newrelic/go-agent"},"NewRelic")," support for Fiber."),(0,i.kt)("h3",{id:"install"},"Install"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fibernewrelic\n")),(0,i.kt)("h3",{id:"signature"},"Signature"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"fibernewrelic.New(config fibernewrelic.Config) fiber.Handler\n")),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"License"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Required - New Relic License Key"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},'""'))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"AppName"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"New Relic Application Name"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"fiber-api"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Enabled"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Enable/Disable New Relic"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("del",{parentName:"td"},"TransportType")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("del",{parentName:"td"},(0,i.kt)("inlineCode",{parentName:"del"},"string"))),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("del",{parentName:"td"},"Can be HTTP or HTTPS")," (Deprecated)"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("del",{parentName:"td"},(0,i.kt)("inlineCode",{parentName:"del"},'"HTTP"')))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Application"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Application")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Existing New Relic App"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"nil"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"ErrorStatusCodeHandler"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"func(c *fiber.Ctx, err error) int")),(0,i.kt)("td",{parentName:"tr",align:"left"},"If you want to change newrelic status code, you can use it."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"DefaultErrorStatusCodeHandler"))))),(0,i.kt)("h3",{id:"usage"},"Usage"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/fibernewrelic"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendStatus(200)\n })\n\n cfg := fibernewrelic.Config{\n License: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",\n AppName: "MyCustomApi",\n Enabled: true,\n }\n\n app.Use(fibernewrelic.New(cfg))\n\n app.Listen(":8080")\n}\n')),(0,i.kt)("h3",{id:"usage-with-existing-new-relic-application"},"Usage with existing New Relic application"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/fibernewrelic"\n "github.com/newrelic/go-agent/v3/newrelic"\n)\n\nfunc main() {\n newrelicApp, err := newrelic.NewApplication(\n newrelic.ConfigAppName("MyCustomApi"),\n newrelic.ConfigLicense("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),\n newrelic.ConfigEnabled(true),\n )\n\n app := fiber.New()\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendStatus(200)\n })\n\n cfg := fibernewrelic.Config{\n Application: newrelicApp\n }\n\n app.Use(fibernewrelic.New(cfg))\n\n app.Listen(":8080")\n}\n')))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/351af030.458607e1.js b/assets/js/351af030.458607e1.js deleted file mode 100644 index f5ebc683c6d..00000000000 --- a/assets/js/351af030.458607e1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5397],{3905:(e,t,n)=>{n.d(t,{Zo:()=>f,kt:()=>m});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=r.createContext({}),c=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},f=function(e){var t=c(e.components);return r.createElement(p.Provider,{value:t},e.children)},d="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,p=e.parentName,f=o(e,["components","mdxType","originalType","parentName"]),d=c(n),g=i,m=d["".concat(p,".").concat(g)]||d[g]||s[g]||a;return n?r.createElement(m,l(l({ref:t},f),{},{components:n})):r.createElement(m,l({ref:t},f))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,l=new Array(a);l[0]=g;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[d]="string"==typeof e?e:i,l[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>s,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var r=n(7462),i=(n(7294),n(3905));const a={id:"fibernewrelic",title:"Fibernewrelic"},l=void 0,o={unversionedId:"fibernewrelic/fibernewrelic",id:"version-fibersentry_v1.x.x/fibernewrelic/fibernewrelic",title:"Fibernewrelic",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/fibernewrelic/README.md",sourceDirName:"fibernewrelic",slug:"/fibernewrelic/",permalink:"/contrib/fibersentry_v1.x.x/fibernewrelic/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fibernewrelic/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fibernewrelic",title:"Fibernewrelic"},sidebar:"tutorialSidebar",previous:{title:"Fiberi18n",permalink:"/contrib/fibersentry_v1.x.x/fiberi18n/"},next:{title:"Fibersentry",permalink:"/contrib/fibersentry_v1.x.x/fibersentry/"}},p={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Usage with existing New Relic application",id:"usage-with-existing-new-relic-application",level:3}],f={toc:c},d="wrapper";function s(e){let{components:t,...n}=e;return(0,i.kt)(d,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fibernewrelic*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/newrelic/go-agent"},"NewRelic")," support for Fiber."),(0,i.kt)("h3",{id:"install"},"Install"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fibernewrelic\n")),(0,i.kt)("h3",{id:"signature"},"Signature"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"fibernewrelic.New(config fibernewrelic.Config) fiber.Handler\n")),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"License"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Required - New Relic License Key"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},'""'))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"AppName"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"New Relic Application Name"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"fiber-api"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Enabled"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Enable/Disable New Relic"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("del",{parentName:"td"},"TransportType")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("del",{parentName:"td"},(0,i.kt)("inlineCode",{parentName:"del"},"string"))),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("del",{parentName:"td"},"Can be HTTP or HTTPS")," (Deprecated)"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("del",{parentName:"td"},(0,i.kt)("inlineCode",{parentName:"del"},'"HTTP"')))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Application"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Application")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Existing New Relic App"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"nil"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"ErrorStatusCodeHandler"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"func(c *fiber.Ctx, err error) int")),(0,i.kt)("td",{parentName:"tr",align:"left"},"If you want to change newrelic status code, you can use it."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"DefaultErrorStatusCodeHandler"))))),(0,i.kt)("h3",{id:"usage"},"Usage"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/fibernewrelic"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendStatus(200)\n })\n\n cfg := fibernewrelic.Config{\n License: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",\n AppName: "MyCustomApi",\n Enabled: true,\n }\n\n app.Use(fibernewrelic.New(cfg))\n\n app.Listen(":8080")\n}\n')),(0,i.kt)("h3",{id:"usage-with-existing-new-relic-application"},"Usage with existing New Relic application"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/fibernewrelic"\n "github.com/newrelic/go-agent/v3/newrelic"\n)\n\nfunc main() {\n newrelicApp, err := newrelic.NewApplication(\n newrelic.ConfigAppName("MyCustomApi"),\n newrelic.ConfigLicense("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),\n newrelic.ConfigEnabled(true),\n )\n\n app := fiber.New()\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendStatus(200)\n })\n\n cfg := fibernewrelic.Config{\n Application: newrelicApp\n }\n\n app.Use(fibernewrelic.New(cfg))\n\n app.Listen(":8080")\n}\n')))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/354823c1.97fb6789.js b/assets/js/354823c1.97fb6789.js new file mode 100644 index 00000000000..4c50e544e96 --- /dev/null +++ b/assets/js/354823c1.97fb6789.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6831],{3905:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>f});var n=r(67294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},m=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),d=p(r),c=i,f=d["".concat(s,".").concat(c)]||d[c]||u[c]||a;return r?n.createElement(f,o(o({ref:t},m),{},{components:r})):n.createElement(f,o({ref:t},m))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=c;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var n=r(87462),i=(r(67294),r(3905));const a={id:"middleware",title:"\ud83e\uddec Middleware",description:"Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.",sidebar_position:3},o=void 0,l={unversionedId:"api/middleware",id:"version-v1.x/api/middleware",title:"\ud83e\uddec Middleware",description:"Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.",source:"@site/versioned_docs/version-v1.x/api/middleware.md",sourceDirName:"api",slug:"/api/middleware",permalink:"/v1.x/api/middleware",draft:!1,tags:[],version:"v1.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:3,frontMatter:{id:"middleware",title:"\ud83e\uddec Middleware",description:"Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"\ud83e\udde0 Ctx",permalink:"/v1.x/api/ctx"},next:{title:"Guide",permalink:"/v1.x/category/guide"}},s={},p=[{value:"Compress",id:"compress",level:2},{value:"Skipping middleware execution",id:"skipping-middleware-execution",level:2},{value:"FileSystem",id:"filesystem",level:2},{value:"Favicon",id:"favicon",level:2}],m={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,i.kt)(d,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Fiber ships with multiple middleware modules by default:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber"\n "github.com/gofiber/fiber/middleware"\n)\n')),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"*","*","*","*",(0,i.kt)("a",{parentName:"li",href:"#compress"},(0,i.kt)("strong",{parentName:"a"},"Compress"))," Compress middleware that supports ",(0,i.kt)("inlineCode",{parentName:"li"},"deflate"),", ",(0,i.kt)("inlineCode",{parentName:"li"},"gzip")," and ",(0,i.kt)("inlineCode",{parentName:"li"},"brotli")," compression."),(0,i.kt)("li",{parentName:"ul"},"*","*","*","*",(0,i.kt)("a",{parentName:"li",href:"#filesystem"},(0,i.kt)("strong",{parentName:"a"},"FileSystem"))," FileSystem middleware for Fiber, special thanks and credits to Alireza Salary"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Favicon")," Ignore favicon from logs or serve from memory if a file path is provided."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Logger")," HTTP request/response logger."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Pprof")," HTTP server runtime profiling"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Recover")," Recover middleware recovers from panics anywhere in the stack chain and handles the control to the centralized",(0,i.kt)("a",{parentName:"li",href:"../guide/error-handling"}," ErrorHandler"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"RequestID")," Request ID middleware generates a unique id for a request."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Timeout")," A wrapper function for handlers which will raise an error if the handler takes longer than a set amount of time to return")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Fiber also maintains external middleware modules, these have to be installed separately:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber"\n "github.com/gofiber/"\n)\n')),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/adaptor")," Converter for net/http handlers to/from Fiber request handlers."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/basicauth")," Basic auth middleware provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized for missing or invalid credentials."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/cors")," Enable cross-origin resource sharing ","(","CORS",")"," with various options."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/csrf")," Protect from CSRF exploits."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/helmet")," Helps secure your apps by setting various HTTP headers."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/jwt")," JWT returns a JSON Web Token ","(","JWT",")"," auth middleware."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/keyauth")," Key auth middleware provides a key-based authentication."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/limiter")," Rate-limiting middleware for Fiber. Use to limit repeated requests to public APIs and/or endpoints such as password reset."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/rewrite")," Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/session")," This session middleware is built on top of fasthttp/session by @savsgio MIT. Special thanks to "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/template")," This package contains 8 template engines"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/websocket")," Based on Gorilla WebSocket for Fiber")),(0,i.kt)("h2",{id:"compress"},"Compress"),(0,i.kt)("p",null,"Compress middleware for with support for ",(0,i.kt)("inlineCode",{parentName:"p"},"deflate"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"gzip")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"brotli"),"compression.",(0,i.kt)("br",{parentName:"p"}),"\n","It will use the fastest compression method depending on the request header ",(0,i.kt)("inlineCode",{parentName:"p"},"Accept-Encoding"),"value."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func Compress(options ...interface{}) fiber.Handler {}\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Config"',title:'"Config"'},"type CompressConfig struct {\n // Next defines a function to skip this middleware.\n // Default: nil\n Next func(*fiber.Ctx) bool\n\n // Compression level for brotli, gzip and deflate\n // CompressLevelDisabled = -1\n // CompressLevelDefault = 0\n // CompressLevelBestSpeed = 1\n // CompressLevelBestCompression = 2\n // Default: CompressLevelDefault\n Level int\n}\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Compression handler with default settings\napp.Use(middleware.Compress())\n\n// Provide a custom compression level\napp.Use(middleware.Compress(2))\n\n// Pass a next function to skip specific requests\napp.Use(middleware.Compress(func(c *fiber.Ctx) bool {\n return c.Path() == "/dontcompress"\n}))\n\n// Provide a full Config\napp.Use(middleware.Compress(middleware.CompressConfig{\n Next: func(c *fiber.Ctx) bool {\n return c.Path() == "/dontcompress"\n },\n Level: CompressLevelDefault,\n})\n')),(0,i.kt)("h2",{id:"skipping-middleware-execution"},"Skipping middleware execution"),(0,i.kt)("p",null,"When adding middleware to your application, you can also specify when the middleware should be activated and when it should not through a function passed when initialising the middleware using a function passed in the configuration for the middleware."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (*fiber.Ctx) bool\n")),(0,i.kt)("p",null,"This function should return ",(0,i.kt)("inlineCode",{parentName:"p"},"true")," if the middleware should be deactivated. For example, if you would like admin users to be exempt from rate-limiting, you could do something like this:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"app.Use(limiter.New(limiter.Config{\n Timeout: 10,\n Max: 3,\n Filter: func (c *fiber.Ctx) bool {\n var isUserAdmin bool\n // Your logic here\n return isUserAdmin\n }\n}))\n")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If you are using middleware that is included with Fiber by default ","(","for example Compress or Logger",")",", you should use the ",(0,i.kt)("inlineCode",{parentName:"p"},"Next")," field instead of the ",(0,i.kt)("inlineCode",{parentName:"p"},"Filter")," field. For example:"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Use(middleware.Logger(middleware.LoggerConfig{\n Format: "${time} ${method} ${path}",\n TimeFormat: "15:04:05",\n TimeZone: "Asia/Chongqing",\n Next: func (c *fiber.Ctx) bool {\n var isUserAdmin bool\n // Your logic here\n return isUserAdmin\n }\n}))\n'))),(0,i.kt)("h2",{id:"filesystem"},"FileSystem"),(0,i.kt)("h2",{id:"favicon"},"Favicon"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/354823c1.9918a004.js b/assets/js/354823c1.9918a004.js deleted file mode 100644 index 7dd7560b181..00000000000 --- a/assets/js/354823c1.9918a004.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6831],{3905:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>f});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},m=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),d=p(r),c=i,f=d["".concat(s,".").concat(c)]||d[c]||u[c]||a;return r?n.createElement(f,o(o({ref:t},m),{},{components:r})):n.createElement(f,o({ref:t},m))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=c;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var n=r(7462),i=(r(7294),r(3905));const a={id:"middleware",title:"\ud83e\uddec Middleware",description:"Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.",sidebar_position:3},o=void 0,l={unversionedId:"api/middleware",id:"version-v1.x/api/middleware",title:"\ud83e\uddec Middleware",description:"Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.",source:"@site/versioned_docs/version-v1.x/api/middleware.md",sourceDirName:"api",slug:"/api/middleware",permalink:"/v1.x/api/middleware",draft:!1,tags:[],version:"v1.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:3,frontMatter:{id:"middleware",title:"\ud83e\uddec Middleware",description:"Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"\ud83e\udde0 Ctx",permalink:"/v1.x/api/ctx"},next:{title:"Guide",permalink:"/v1.x/category/guide"}},s={},p=[{value:"Compress",id:"compress",level:2},{value:"Skipping middleware execution",id:"skipping-middleware-execution",level:2},{value:"FileSystem",id:"filesystem",level:2},{value:"Favicon",id:"favicon",level:2}],m={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,i.kt)(d,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Fiber ships with multiple middleware modules by default:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber"\n "github.com/gofiber/fiber/middleware"\n)\n')),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"*","*","*","*",(0,i.kt)("a",{parentName:"li",href:"#compress"},(0,i.kt)("strong",{parentName:"a"},"Compress"))," Compress middleware that supports ",(0,i.kt)("inlineCode",{parentName:"li"},"deflate"),", ",(0,i.kt)("inlineCode",{parentName:"li"},"gzip")," and ",(0,i.kt)("inlineCode",{parentName:"li"},"brotli")," compression."),(0,i.kt)("li",{parentName:"ul"},"*","*","*","*",(0,i.kt)("a",{parentName:"li",href:"#filesystem"},(0,i.kt)("strong",{parentName:"a"},"FileSystem"))," FileSystem middleware for Fiber, special thanks and credits to Alireza Salary"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Favicon")," Ignore favicon from logs or serve from memory if a file path is provided."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Logger")," HTTP request/response logger."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Pprof")," HTTP server runtime profiling"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Recover")," Recover middleware recovers from panics anywhere in the stack chain and handles the control to the centralized",(0,i.kt)("a",{parentName:"li",href:"../guide/error-handling"}," ErrorHandler"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"RequestID")," Request ID middleware generates a unique id for a request."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Timeout")," A wrapper function for handlers which will raise an error if the handler takes longer than a set amount of time to return")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Fiber also maintains external middleware modules, these have to be installed separately:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber"\n "github.com/gofiber/"\n)\n')),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/adaptor")," Converter for net/http handlers to/from Fiber request handlers."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/basicauth")," Basic auth middleware provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized for missing or invalid credentials."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/cors")," Enable cross-origin resource sharing ","(","CORS",")"," with various options."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/csrf")," Protect from CSRF exploits."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/helmet")," Helps secure your apps by setting various HTTP headers."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/jwt")," JWT returns a JSON Web Token ","(","JWT",")"," auth middleware."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/keyauth")," Key auth middleware provides a key-based authentication."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/limiter")," Rate-limiting middleware for Fiber. Use to limit repeated requests to public APIs and/or endpoints such as password reset."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/rewrite")," Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/session")," This session middleware is built on top of fasthttp/session by @savsgio MIT. Special thanks to "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/template")," This package contains 8 template engines"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"gofiber/websocket")," Based on Gorilla WebSocket for Fiber")),(0,i.kt)("h2",{id:"compress"},"Compress"),(0,i.kt)("p",null,"Compress middleware for with support for ",(0,i.kt)("inlineCode",{parentName:"p"},"deflate"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"gzip")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"brotli"),"compression.",(0,i.kt)("br",{parentName:"p"}),"\n","It will use the fastest compression method depending on the request header ",(0,i.kt)("inlineCode",{parentName:"p"},"Accept-Encoding"),"value."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func Compress(options ...interface{}) fiber.Handler {}\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Config"',title:'"Config"'},"type CompressConfig struct {\n // Next defines a function to skip this middleware.\n // Default: nil\n Next func(*fiber.Ctx) bool\n\n // Compression level for brotli, gzip and deflate\n // CompressLevelDisabled = -1\n // CompressLevelDefault = 0\n // CompressLevelBestSpeed = 1\n // CompressLevelBestCompression = 2\n // Default: CompressLevelDefault\n Level int\n}\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Compression handler with default settings\napp.Use(middleware.Compress())\n\n// Provide a custom compression level\napp.Use(middleware.Compress(2))\n\n// Pass a next function to skip specific requests\napp.Use(middleware.Compress(func(c *fiber.Ctx) bool {\n return c.Path() == "/dontcompress"\n}))\n\n// Provide a full Config\napp.Use(middleware.Compress(middleware.CompressConfig{\n Next: func(c *fiber.Ctx) bool {\n return c.Path() == "/dontcompress"\n },\n Level: CompressLevelDefault,\n})\n')),(0,i.kt)("h2",{id:"skipping-middleware-execution"},"Skipping middleware execution"),(0,i.kt)("p",null,"When adding middleware to your application, you can also specify when the middleware should be activated and when it should not through a function passed when initialising the middleware using a function passed in the configuration for the middleware."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (*fiber.Ctx) bool\n")),(0,i.kt)("p",null,"This function should return ",(0,i.kt)("inlineCode",{parentName:"p"},"true")," if the middleware should be deactivated. For example, if you would like admin users to be exempt from rate-limiting, you could do something like this:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"app.Use(limiter.New(limiter.Config{\n Timeout: 10,\n Max: 3,\n Filter: func (c *fiber.Ctx) bool {\n var isUserAdmin bool\n // Your logic here\n return isUserAdmin\n }\n}))\n")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"If you are using middleware that is included with Fiber by default ","(","for example Compress or Logger",")",", you should use the ",(0,i.kt)("inlineCode",{parentName:"p"},"Next")," field instead of the ",(0,i.kt)("inlineCode",{parentName:"p"},"Filter")," field. For example:"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Use(middleware.Logger(middleware.LoggerConfig{\n Format: "${time} ${method} ${path}",\n TimeFormat: "15:04:05",\n TimeZone: "Asia/Chongqing",\n Next: func (c *fiber.Ctx) bool {\n var isUserAdmin bool\n // Your logic here\n return isUserAdmin\n }\n}))\n'))),(0,i.kt)("h2",{id:"filesystem"},"FileSystem"),(0,i.kt)("h2",{id:"favicon"},"Favicon"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/354efaa7.255ca81b.js b/assets/js/354efaa7.255ca81b.js deleted file mode 100644 index 5888cf8d7fe..00000000000 --- a/assets/js/354efaa7.255ca81b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8244],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>m});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),u=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},g=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),c=u(n),f=r,m=c["".concat(l,".").concat(f)]||c[f]||p[f]||s;return n?a.createElement(m,o(o({ref:t},g),{},{components:n})):a.createElement(m,o({ref:t},g))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:r,o[1]=i;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>u});var a=n(7462),r=(n(7294),n(3905));const s={id:"mssql",title:"MSSQL"},o=void 0,i={unversionedId:"mssql/mssql",id:"mssql/mssql",title:"MSSQL",description:"Release",source:"@site/docs/storage/mssql/README.md",sourceDirName:"mssql",slug:"/mssql/",permalink:"/storage/next/mssql/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mssql/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mssql",title:"MSSQL"},sidebar:"tutorialSidebar",previous:{title:"MongoDB",permalink:"/storage/next/mongodb/"},next:{title:"MySQL",permalink:"/storage/next/mysql/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:u},c="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(c,(0,a.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mssql*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MSSQL storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/microsoft/go-mssqldb"},"microsoft/go-mssqldb"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MSSQL is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mssql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mssql\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mssql"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mssql.New()\n\n// Initialize custom config\nstore := mssql.New(mssql.Config{\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n})\n\n// Initialize custom config using connection string\nstore := mssql.New(mssql.Config{\n ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 1433\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Instance name\n //\n // Optional. Default is ""\n Instance string\n \n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SslMode string\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/354efaa7.462d42b6.js b/assets/js/354efaa7.462d42b6.js new file mode 100644 index 00000000000..050c8a9cce7 --- /dev/null +++ b/assets/js/354efaa7.462d42b6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8244],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),u=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},g=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,g=i(e,["components","mdxType","originalType","parentName"]),c=u(n),f=r,m=c["".concat(l,".").concat(f)]||c[f]||p[f]||s;return n?a.createElement(m,o(o({ref:t},g),{},{components:n})):a.createElement(m,o({ref:t},g))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:r,o[1]=i;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>u});var a=n(87462),r=(n(67294),n(3905));const s={id:"mssql",title:"MSSQL"},o=void 0,i={unversionedId:"mssql/mssql",id:"mssql/mssql",title:"MSSQL",description:"Release",source:"@site/docs/storage/mssql/README.md",sourceDirName:"mssql",slug:"/mssql/",permalink:"/storage/next/mssql/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mssql/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mssql",title:"MSSQL"},sidebar:"tutorialSidebar",previous:{title:"MongoDB",permalink:"/storage/next/mongodb/"},next:{title:"MySQL",permalink:"/storage/next/mysql/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:u},c="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(c,(0,a.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mssql*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MSSQL storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/microsoft/go-mssqldb"},"microsoft/go-mssqldb"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MSSQL is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mssql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mssql\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mssql"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mssql.New()\n\n// Initialize custom config\nstore := mssql.New(mssql.Config{\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n})\n\n// Initialize custom config using connection string\nstore := mssql.New(mssql.Config{\n ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 1433\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Instance name\n //\n // Optional. Default is ""\n Instance string\n \n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SslMode string\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 1433,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n SslMode: "disable",\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3719c62c.355a8b76.js b/assets/js/3719c62c.355a8b76.js new file mode 100644 index 00000000000..1a0ac6a4b37 --- /dev/null +++ b/assets/js/3719c62c.355a8b76.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2730],{33300:e=>{e.exports=JSON.parse('{"title":"Misc","description":"Extra contents for Fiber.","slug":"/category/misc","permalink":"/v1.x/category/misc","navigation":{"previous":{"title":"\ud83d\udc1b Error Handling","permalink":"/v1.x/guide/error-handling"},"next":{"title":"\ud83e\udd14 FAQ","permalink":"/v1.x/misc/faq"}}}')}}]); \ No newline at end of file diff --git a/assets/js/3719c62c.693effe3.js b/assets/js/3719c62c.693effe3.js deleted file mode 100644 index 91cc9f89844..00000000000 --- a/assets/js/3719c62c.693effe3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2730],{3300:e=>{e.exports=JSON.parse('{"title":"Misc","description":"Extra contents for Fiber.","slug":"/category/misc","permalink":"/v1.x/category/misc","navigation":{"previous":{"title":"\ud83d\udc1b Error Handling","permalink":"/v1.x/guide/error-handling"},"next":{"title":"\ud83e\udd14 FAQ","permalink":"/v1.x/misc/faq"}}}')}}]); \ No newline at end of file diff --git a/assets/js/3724ddc1.618406a6.js b/assets/js/3724ddc1.618406a6.js deleted file mode 100644 index 15943055135..00000000000 --- a/assets/js/3724ddc1.618406a6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9449],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=s(n),d=a,h=c["".concat(p,".").concat(d)]||c[d]||m[d]||o;return n?r.createElement(h,l(l({ref:t},u),{},{components:n})):r.createElement(h,l({ref:t},u))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[c]="string"==typeof e?e:a,l[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>s});var r=n(7462),a=(n(7294),n(3905));const o={slug:"/",id:"welcome",title:"\ud83d\udc4b Welcome",sidebar_position:1},l=void 0,i={unversionedId:"welcome",id:"welcome",title:"\ud83d\udc4b Welcome",description:"An online API documentation with examples so you can start building web apps with Fiber right away!",source:"@site/docs/core/intro.md",sourceDirName:".",slug:"/",permalink:"/next/",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/intro.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{slug:"/",id:"welcome",title:"\ud83d\udc4b Welcome",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"API",permalink:"/next/category/api"}},p={},s=[{value:"Installation",id:"installation",level:3},{value:"Zero Allocation",id:"zero-allocation",level:3},{value:"Hello, World!",id:"hello-world",level:3},{value:"Basic routing",id:"basic-routing",level:3},{value:"Static files",id:"static-files",level:3},{value:"Note",id:"note",level:3}],u={toc:s},c="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"An online API documentation with examples so you can start building web apps with Fiber right away!"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Fiber")," is an ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/expressjs/express"},"Express")," inspired ",(0,a.kt)("strong",{parentName:"p"},"web framework")," built on top of ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/valyala/fasthttp"},"Fasthttp"),", the ",(0,a.kt)("strong",{parentName:"p"},"fastest")," HTTP engine for ",(0,a.kt)("a",{parentName:"p",href:"https://go.dev/doc/"},"Go"),". Designed to ",(0,a.kt)("strong",{parentName:"p"},"ease")," things up for ",(0,a.kt)("strong",{parentName:"p"},"fast")," development with ",(0,a.kt)("strong",{parentName:"p"},"zero memory allocation")," and ",(0,a.kt)("strong",{parentName:"p"},"performance")," in mind."),(0,a.kt)("p",null,"These docs are for ",(0,a.kt)("strong",{parentName:"p"},"Fiber v2"),", which was released on ",(0,a.kt)("strong",{parentName:"p"},"September 15th, 2020"),"."),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"First of all, ",(0,a.kt)("a",{parentName:"p",href:"https://go.dev/dl/"},"download")," and install Go. ",(0,a.kt)("inlineCode",{parentName:"p"},"1.17")," or higher is required."),(0,a.kt)("p",null,"Installation is done using the ",(0,a.kt)("a",{parentName:"p",href:"https://pkg.go.dev/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them"},(0,a.kt)("inlineCode",{parentName:"a"},"go get"))," command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/fiber/v2\n")),(0,a.kt)("h3",{id:"zero-allocation"},"Zero Allocation"),(0,a.kt)("p",null,"Some values returned from ","*",(0,a.kt)("strong",{parentName:"p"},"fiber.Ctx")," are ",(0,a.kt)("strong",{parentName:"p"},"not")," immutable by default."),(0,a.kt)("p",null,"Because fiber is optimized for ",(0,a.kt)("strong",{parentName:"p"},"high-performance"),", values returned from ",(0,a.kt)("strong",{parentName:"p"},"fiber.Ctx")," are ",(0,a.kt)("strong",{parentName:"p"},"not")," immutable by default and ",(0,a.kt)("strong",{parentName:"p"},"will")," be re-used across requests. As a rule of thumb, you ",(0,a.kt)("strong",{parentName:"p"},"must")," only use context values within the handler, and you ",(0,a.kt)("strong",{parentName:"p"},"must not")," keep any references. As soon as you return from the handler, any values you have obtained from the context will be re-used in future requests and will change below your feet. Here is an example:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func handler(c *fiber.Ctx) error {\n // Variable is only valid within this handler\n result := c.Params("foo") \n\n // ...\n}\n')),(0,a.kt)("p",null,"If you need to persist such values outside the handler, make copies of their ",(0,a.kt)("strong",{parentName:"p"},"underlying buffer")," using the ",(0,a.kt)("a",{parentName:"p",href:"https://pkg.go.dev/builtin/#copy"},"copy")," builtin. Here is an example for persisting a string:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func handler(c *fiber.Ctx) error {\n // Variable is only valid within this handler\n result := c.Params("foo")\n\n // Make a copy\n buffer := make([]byte, len(result))\n copy(buffer, result)\n resultCopy := string(buffer) \n // Variable is now valid forever\n\n // ...\n}\n')),(0,a.kt)("p",null,"We created a custom ",(0,a.kt)("inlineCode",{parentName:"p"},"CopyString")," function that does the above and is available under ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/utils"},"gofiber/utils"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/:foo", func(c *fiber.Ctx) error {\n // Variable is now immutable\n result := utils.CopyString(c.Params("foo")) \n\n // ...\n})\n')),(0,a.kt)("p",null,"Alternatively, you can also use the ",(0,a.kt)("inlineCode",{parentName:"p"},"Immutable")," setting. It will make all values returned from the context immutable, allowing you to persist them anywhere. Of course, this comes at the cost of performance."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"app := fiber.New(fiber.Config{\n Immutable: true,\n})\n")),(0,a.kt)("p",null,"For more information, please check ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/issues/426"},(0,a.kt)("strong",{parentName:"a"},"#","426"))," and ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/issues/185"},(0,a.kt)("strong",{parentName:"a"},"#","185")),"."),(0,a.kt)("h3",{id:"hello-world"},"Hello, World!"),(0,a.kt)("p",null,"Embedded below is essentially the most straightforward ",(0,a.kt)("strong",{parentName:"p"},"Fiber")," app you can create:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport "github.com/gofiber/fiber/v2"\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text"},"go run server.go\n")),(0,a.kt)("p",null,"Browse to ",(0,a.kt)("inlineCode",{parentName:"p"},"http://localhost:3000")," and you should see ",(0,a.kt)("inlineCode",{parentName:"p"},"Hello, World!")," on the page."),(0,a.kt)("h3",{id:"basic-routing"},"Basic routing"),(0,a.kt)("p",null,"Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (",(0,a.kt)("inlineCode",{parentName:"p"},"GET"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"PUT"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"POST"),", etc.)."),(0,a.kt)("p",null,"Each route can have ",(0,a.kt)("strong",{parentName:"p"},"multiple handler functions")," that are executed when the route is matched."),(0,a.kt)("p",null,"Route definition takes the following structures:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Function signature\napp.Method(path string, ...func(*fiber.Ctx) error)\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"app")," is an instance of ",(0,a.kt)("strong",{parentName:"li"},"Fiber")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Method")," is an ",(0,a.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/api/app#route-handlers"},"HTTP request method"),": ",(0,a.kt)("inlineCode",{parentName:"li"},"GET"),", ",(0,a.kt)("inlineCode",{parentName:"li"},"PUT"),", ",(0,a.kt)("inlineCode",{parentName:"li"},"POST"),", etc."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"path")," is a virtual path on the server"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"func(*fiber.Ctx) error")," is a callback function containing the ",(0,a.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/api/ctx"},"Context")," executed when the route is matched")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Simple route")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Respond with "Hello, World!" on root path, "/"\napp.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n})\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Parameters")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// GET http://localhost:8080/hello%20world\n\napp.Get("/:value", func(c *fiber.Ctx) error {\n return c.SendString("value: " + c.Params("value"))\n // => Get request with value: hello world\n})\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Optional parameter")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// GET http://localhost:3000/john\n\napp.Get("/:name?", func(c *fiber.Ctx) error {\n if c.Params("name") != "" {\n return c.SendString("Hello " + c.Params("name"))\n // => Hello john\n }\n return c.SendString("Where is john?")\n})\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Wildcards")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// GET http://localhost:3000/api/user/john\n\napp.Get("/api/*", func(c *fiber.Ctx) error {\n return c.SendString("API path: " + c.Params("*"))\n // => API path: user/john\n})\n')),(0,a.kt)("h3",{id:"static-files"},"Static files"),(0,a.kt)("p",null,"To serve static files such as ",(0,a.kt)("strong",{parentName:"p"},"images"),", ",(0,a.kt)("strong",{parentName:"p"},"CSS"),", and ",(0,a.kt)("strong",{parentName:"p"},"JavaScript")," files, replace your function handler with a file or directory string."),(0,a.kt)("p",null,"Function signature:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"app.Static(prefix, root string, config ...Static)\n")),(0,a.kt)("p",null,"Use the following code to serve files in a directory named ",(0,a.kt)("inlineCode",{parentName:"p"},"./public"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app := fiber.New()\n\napp.Static("/", "./public") \n\napp.Listen(":3000")\n')),(0,a.kt)("p",null,"Now, you can load the files that are in the ",(0,a.kt)("inlineCode",{parentName:"p"},"./public")," directory:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"http://localhost:8080/hello.html\nhttp://localhost:8080/js/jquery.js\nhttp://localhost:8080/css/style.css\n")),(0,a.kt)("h3",{id:"note"},"Note"),(0,a.kt)("p",null,"For more information on how to build APIs in Go with Fiber, please check out this excellent article\n",(0,a.kt)("a",{parentName:"p",href:"https://blog.logrocket.com/express-style-api-go-fiber/"},"on building an express-style API in Go with Fiber"),"."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3724ddc1.807eab62.js b/assets/js/3724ddc1.807eab62.js new file mode 100644 index 00000000000..fca3f6120e4 --- /dev/null +++ b/assets/js/3724ddc1.807eab62.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9449],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=s(n),d=a,h=c["".concat(p,".").concat(d)]||c[d]||m[d]||o;return n?r.createElement(h,l(l({ref:t},u),{},{components:n})):r.createElement(h,l({ref:t},u))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[c]="string"==typeof e?e:a,l[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));const o={slug:"/",id:"welcome",title:"\ud83d\udc4b Welcome",sidebar_position:1},l=void 0,i={unversionedId:"welcome",id:"welcome",title:"\ud83d\udc4b Welcome",description:"An online API documentation with examples so you can start building web apps with Fiber right away!",source:"@site/docs/core/intro.md",sourceDirName:".",slug:"/",permalink:"/next/",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/intro.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{slug:"/",id:"welcome",title:"\ud83d\udc4b Welcome",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"API",permalink:"/next/category/api"}},p={},s=[{value:"Installation",id:"installation",level:3},{value:"Zero Allocation",id:"zero-allocation",level:3},{value:"Hello, World!",id:"hello-world",level:3},{value:"Basic routing",id:"basic-routing",level:3},{value:"Static files",id:"static-files",level:3},{value:"Note",id:"note",level:3}],u={toc:s},c="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"An online API documentation with examples so you can start building web apps with Fiber right away!"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Fiber")," is an ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/expressjs/express"},"Express")," inspired ",(0,a.kt)("strong",{parentName:"p"},"web framework")," built on top of ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/valyala/fasthttp"},"Fasthttp"),", the ",(0,a.kt)("strong",{parentName:"p"},"fastest")," HTTP engine for ",(0,a.kt)("a",{parentName:"p",href:"https://go.dev/doc/"},"Go"),". Designed to ",(0,a.kt)("strong",{parentName:"p"},"ease")," things up for ",(0,a.kt)("strong",{parentName:"p"},"fast")," development with ",(0,a.kt)("strong",{parentName:"p"},"zero memory allocation")," and ",(0,a.kt)("strong",{parentName:"p"},"performance")," in mind."),(0,a.kt)("p",null,"These docs are for ",(0,a.kt)("strong",{parentName:"p"},"Fiber v2"),", which was released on ",(0,a.kt)("strong",{parentName:"p"},"September 15th, 2020"),"."),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"First of all, ",(0,a.kt)("a",{parentName:"p",href:"https://go.dev/dl/"},"download")," and install Go. ",(0,a.kt)("inlineCode",{parentName:"p"},"1.17")," or higher is required."),(0,a.kt)("p",null,"Installation is done using the ",(0,a.kt)("a",{parentName:"p",href:"https://pkg.go.dev/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them"},(0,a.kt)("inlineCode",{parentName:"a"},"go get"))," command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/fiber/v2\n")),(0,a.kt)("h3",{id:"zero-allocation"},"Zero Allocation"),(0,a.kt)("p",null,"Some values returned from ","*",(0,a.kt)("strong",{parentName:"p"},"fiber.Ctx")," are ",(0,a.kt)("strong",{parentName:"p"},"not")," immutable by default."),(0,a.kt)("p",null,"Because fiber is optimized for ",(0,a.kt)("strong",{parentName:"p"},"high-performance"),", values returned from ",(0,a.kt)("strong",{parentName:"p"},"fiber.Ctx")," are ",(0,a.kt)("strong",{parentName:"p"},"not")," immutable by default and ",(0,a.kt)("strong",{parentName:"p"},"will")," be re-used across requests. As a rule of thumb, you ",(0,a.kt)("strong",{parentName:"p"},"must")," only use context values within the handler, and you ",(0,a.kt)("strong",{parentName:"p"},"must not")," keep any references. As soon as you return from the handler, any values you have obtained from the context will be re-used in future requests and will change below your feet. Here is an example:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func handler(c *fiber.Ctx) error {\n // Variable is only valid within this handler\n result := c.Params("foo") \n\n // ...\n}\n')),(0,a.kt)("p",null,"If you need to persist such values outside the handler, make copies of their ",(0,a.kt)("strong",{parentName:"p"},"underlying buffer")," using the ",(0,a.kt)("a",{parentName:"p",href:"https://pkg.go.dev/builtin/#copy"},"copy")," builtin. Here is an example for persisting a string:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func handler(c *fiber.Ctx) error {\n // Variable is only valid within this handler\n result := c.Params("foo")\n\n // Make a copy\n buffer := make([]byte, len(result))\n copy(buffer, result)\n resultCopy := string(buffer) \n // Variable is now valid forever\n\n // ...\n}\n')),(0,a.kt)("p",null,"We created a custom ",(0,a.kt)("inlineCode",{parentName:"p"},"CopyString")," function that does the above and is available under ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/utils"},"gofiber/utils"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/:foo", func(c *fiber.Ctx) error {\n // Variable is now immutable\n result := utils.CopyString(c.Params("foo")) \n\n // ...\n})\n')),(0,a.kt)("p",null,"Alternatively, you can also use the ",(0,a.kt)("inlineCode",{parentName:"p"},"Immutable")," setting. It will make all values returned from the context immutable, allowing you to persist them anywhere. Of course, this comes at the cost of performance."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"app := fiber.New(fiber.Config{\n Immutable: true,\n})\n")),(0,a.kt)("p",null,"For more information, please check ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/issues/426"},(0,a.kt)("strong",{parentName:"a"},"#","426"))," and ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/issues/185"},(0,a.kt)("strong",{parentName:"a"},"#","185")),"."),(0,a.kt)("h3",{id:"hello-world"},"Hello, World!"),(0,a.kt)("p",null,"Embedded below is essentially the most straightforward ",(0,a.kt)("strong",{parentName:"p"},"Fiber")," app you can create:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport "github.com/gofiber/fiber/v2"\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n })\n\n app.Listen(":3000")\n}\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text"},"go run server.go\n")),(0,a.kt)("p",null,"Browse to ",(0,a.kt)("inlineCode",{parentName:"p"},"http://localhost:3000")," and you should see ",(0,a.kt)("inlineCode",{parentName:"p"},"Hello, World!")," on the page."),(0,a.kt)("h3",{id:"basic-routing"},"Basic routing"),(0,a.kt)("p",null,"Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (",(0,a.kt)("inlineCode",{parentName:"p"},"GET"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"PUT"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"POST"),", etc.)."),(0,a.kt)("p",null,"Each route can have ",(0,a.kt)("strong",{parentName:"p"},"multiple handler functions")," that are executed when the route is matched."),(0,a.kt)("p",null,"Route definition takes the following structures:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Function signature\napp.Method(path string, ...func(*fiber.Ctx) error)\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"app")," is an instance of ",(0,a.kt)("strong",{parentName:"li"},"Fiber")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Method")," is an ",(0,a.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/api/app#route-handlers"},"HTTP request method"),": ",(0,a.kt)("inlineCode",{parentName:"li"},"GET"),", ",(0,a.kt)("inlineCode",{parentName:"li"},"PUT"),", ",(0,a.kt)("inlineCode",{parentName:"li"},"POST"),", etc."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"path")," is a virtual path on the server"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"func(*fiber.Ctx) error")," is a callback function containing the ",(0,a.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/api/ctx"},"Context")," executed when the route is matched")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Simple route")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Respond with "Hello, World!" on root path, "/"\napp.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n})\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Parameters")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// GET http://localhost:8080/hello%20world\n\napp.Get("/:value", func(c *fiber.Ctx) error {\n return c.SendString("value: " + c.Params("value"))\n // => Get request with value: hello world\n})\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Optional parameter")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// GET http://localhost:3000/john\n\napp.Get("/:name?", func(c *fiber.Ctx) error {\n if c.Params("name") != "" {\n return c.SendString("Hello " + c.Params("name"))\n // => Hello john\n }\n return c.SendString("Where is john?")\n})\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Wildcards")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// GET http://localhost:3000/api/user/john\n\napp.Get("/api/*", func(c *fiber.Ctx) error {\n return c.SendString("API path: " + c.Params("*"))\n // => API path: user/john\n})\n')),(0,a.kt)("h3",{id:"static-files"},"Static files"),(0,a.kt)("p",null,"To serve static files such as ",(0,a.kt)("strong",{parentName:"p"},"images"),", ",(0,a.kt)("strong",{parentName:"p"},"CSS"),", and ",(0,a.kt)("strong",{parentName:"p"},"JavaScript")," files, replace your function handler with a file or directory string."),(0,a.kt)("p",null,"Function signature:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"app.Static(prefix, root string, config ...Static)\n")),(0,a.kt)("p",null,"Use the following code to serve files in a directory named ",(0,a.kt)("inlineCode",{parentName:"p"},"./public"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app := fiber.New()\n\napp.Static("/", "./public") \n\napp.Listen(":3000")\n')),(0,a.kt)("p",null,"Now, you can load the files that are in the ",(0,a.kt)("inlineCode",{parentName:"p"},"./public")," directory:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"http://localhost:8080/hello.html\nhttp://localhost:8080/js/jquery.js\nhttp://localhost:8080/css/style.css\n")),(0,a.kt)("h3",{id:"note"},"Note"),(0,a.kt)("p",null,"For more information on how to build APIs in Go with Fiber, please check out this excellent article\n",(0,a.kt)("a",{parentName:"p",href:"https://blog.logrocket.com/express-style-api-go-fiber/"},"on building an express-style API in Go with Fiber"),"."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/37662bdc.5f667ef4.js b/assets/js/37662bdc.5f667ef4.js new file mode 100644 index 00000000000..24b0ce1674d --- /dev/null +++ b/assets/js/37662bdc.5f667ef4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5886],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>s});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},g=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),u=d(n),c=r,s=u["".concat(p,".").concat(c)]||u[c]||m[c]||i;return n?a.createElement(s,l(l({ref:t},g),{},{components:n})):a.createElement(s,l({ref:t},g))}));function s(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var d=2;d{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var a=n(87462),r=(n(67294),n(3905));const i={id:"fiberi18n",title:"Fiberi18n"},l=void 0,o={unversionedId:"fiberi18n/fiberi18n",id:"fiberi18n/fiberi18n",title:"Fiberi18n",description:"Release",source:"@site/docs/contrib/fiberi18n/README.md",sourceDirName:"fiberi18n",slug:"/fiberi18n/",permalink:"/contrib/next/fiberi18n/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fiberi18n/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fiberi18n",title:"Fiberi18n"},sidebar:"tutorialSidebar",previous:{title:"Casbin",permalink:"/contrib/next/casbin/"},next:{title:"Fibernewrelic",permalink:"/contrib/next/fibernewrelic/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Example",id:"example",level:3}],g={toc:d},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fiberi18n*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/nicksnyder/go-i18n"},"go-i18n")," support for Fiber."),(0,r.kt)("h3",{id:"install"},"Install"),(0,r.kt)("p",null,"This middleware supports Fiber v2."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fiberi18n\n")),(0,r.kt)("h3",{id:"signature"},"Signature"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"fiberi18n.New(config ...*Config) fiber.Handler\n")),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Property"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Next"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(c *fiber.Ctx) bool")),(0,r.kt)("td",{parentName:"tr",align:null},"A function to skip this middleware when returned ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"RootPath"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The i18n template folder path."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"./example/localize"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"AcceptLanguages"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"A collection of languages that can be processed."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag{language.Chinese, language.English}"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"FormatBundleFile"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The type of the template file."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"yaml"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DefaultLanguage"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"The default returned language type."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.English"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Loader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Loader")),(0,r.kt)("td",{parentName:"tr",align:null},"The implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"LoaderFunc(os.ReadFile)"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"UnmarshalFunc"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"i18n.UnmarshalFunc")),(0,r.kt)("td",{parentName:"tr",align:null},"The function used for decoding template files."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"yaml.Unmarshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"LangHandler"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(ctx *fiber.Ctx, defaultLang string) string")),(0,r.kt)("td",{parentName:"tr",align:null},"Used to get the kind of language handled by *fiber.Ctx and defaultLang."),(0,r.kt)("td",{parentName:"tr",align:null},"Retrieved from the request header ",(0,r.kt)("inlineCode",{parentName:"td"},"Accept-Language")," or query parameter ",(0,r.kt)("inlineCode",{parentName:"td"},"lang"),".")))),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/contrib/fiberi18n"\n "github.com/gofiber/fiber/v2"\n "github.com/nicksnyder/go-i18n/v2/i18n"\n "golang.org/x/text/language"\n)\n\nfunc main() {\n app := fiber.New()\n app.Use(\n fiberi18n.New(&fiberi18n.Config{\n RootPath: "./example/localize",\n AcceptLanguages: []language.Tag{language.Chinese, language.English},\n DefaultLanguage: language.Chinese,\n }),\n )\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString(fiberi18n.MustGetMessage("welcome"))\n })\n app.Get("/:name", func(ctx *fiber.Ctx) error {\n return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{\n MessageID: "welcomeWithName",\n TemplateData: map[string]string{\n "name": ctx.Params("name"),\n },\n }))\n })\n app.Listen("127.0.0.1:3000")\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/37662bdc.cd41d3bc.js b/assets/js/37662bdc.cd41d3bc.js deleted file mode 100644 index 5d857693fca..00000000000 --- a/assets/js/37662bdc.cd41d3bc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5886],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>s});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},g=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),u=d(n),c=r,s=u["".concat(p,".").concat(c)]||u[c]||m[c]||i;return n?a.createElement(s,l(l({ref:t},g),{},{components:n})):a.createElement(s,l({ref:t},g))}));function s(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var d=2;d{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var a=n(7462),r=(n(7294),n(3905));const i={id:"fiberi18n",title:"Fiberi18n"},l=void 0,o={unversionedId:"fiberi18n/fiberi18n",id:"fiberi18n/fiberi18n",title:"Fiberi18n",description:"Release",source:"@site/docs/contrib/fiberi18n/README.md",sourceDirName:"fiberi18n",slug:"/fiberi18n/",permalink:"/contrib/next/fiberi18n/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fiberi18n/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fiberi18n",title:"Fiberi18n"},sidebar:"tutorialSidebar",previous:{title:"Casbin",permalink:"/contrib/next/casbin/"},next:{title:"Fibernewrelic",permalink:"/contrib/next/fibernewrelic/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Example",id:"example",level:3}],g={toc:d},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fiberi18n*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/nicksnyder/go-i18n"},"go-i18n")," support for Fiber."),(0,r.kt)("h3",{id:"install"},"Install"),(0,r.kt)("p",null,"This middleware supports Fiber v2."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fiberi18n\n")),(0,r.kt)("h3",{id:"signature"},"Signature"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"fiberi18n.New(config ...*Config) fiber.Handler\n")),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Property"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Next"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(c *fiber.Ctx) bool")),(0,r.kt)("td",{parentName:"tr",align:null},"A function to skip this middleware when returned ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"RootPath"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The i18n template folder path."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"./example/localize"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"AcceptLanguages"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"A collection of languages that can be processed."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag{language.Chinese, language.English}"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"FormatBundleFile"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The type of the template file."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"yaml"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DefaultLanguage"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"The default returned language type."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.English"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Loader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Loader")),(0,r.kt)("td",{parentName:"tr",align:null},"The implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"LoaderFunc(os.ReadFile)"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"UnmarshalFunc"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"i18n.UnmarshalFunc")),(0,r.kt)("td",{parentName:"tr",align:null},"The function used for decoding template files."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"yaml.Unmarshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"LangHandler"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(ctx *fiber.Ctx, defaultLang string) string")),(0,r.kt)("td",{parentName:"tr",align:null},"Used to get the kind of language handled by *fiber.Ctx and defaultLang."),(0,r.kt)("td",{parentName:"tr",align:null},"Retrieved from the request header ",(0,r.kt)("inlineCode",{parentName:"td"},"Accept-Language")," or query parameter ",(0,r.kt)("inlineCode",{parentName:"td"},"lang"),".")))),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/contrib/fiberi18n"\n "github.com/gofiber/fiber/v2"\n "github.com/nicksnyder/go-i18n/v2/i18n"\n "golang.org/x/text/language"\n)\n\nfunc main() {\n app := fiber.New()\n app.Use(\n fiberi18n.New(&fiberi18n.Config{\n RootPath: "./example/localize",\n AcceptLanguages: []language.Tag{language.Chinese, language.English},\n DefaultLanguage: language.Chinese,\n }),\n )\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString(fiberi18n.MustGetMessage("welcome"))\n })\n app.Get("/:name", func(ctx *fiber.Ctx) error {\n return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{\n MessageID: "welcomeWithName",\n TemplateData: map[string]string{\n "name": ctx.Params("name"),\n },\n }))\n })\n app.Listen("127.0.0.1:3000")\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/37744159.1758ac5e.js b/assets/js/37744159.1758ac5e.js deleted file mode 100644 index fb3fe39c487..00000000000 --- a/assets/js/37744159.1758ac5e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4734],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>f});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),d=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},g=function(e){var t=d(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),p=d(n),c=i,f=p["".concat(l,".").concat(c)]||p[c]||u[c]||a;return n?r.createElement(f,s(s({ref:t},g),{},{components:n})):r.createElement(f,s({ref:t},g))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,s=new Array(a);s[0]=c;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[p]="string"==typeof e?e:i,s[1]=o;for(var d=2;d{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var r=n(7462),i=(n(7294),n(3905));const a={id:"redis",title:"Redis"},s=void 0,o={unversionedId:"redis/redis",id:"version-memcache_v1.x.x/redis/redis",title:"Redis",description:"Release",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/redis/README.md",sourceDirName:"redis",slug:"/redis/",permalink:"/storage/redis/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/redis/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"redis",title:"Redis"},sidebar:"tutorialSidebar",previous:{title:"Postgres",permalink:"/storage/postgres/"},next:{title:"Ristretto",permalink:"/storage/ristretto/"}},l={},d=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=redis*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?label=Tests",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,i.kt)("p",null,"A Redis storage driver using ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-redis/redis"},"go-redis/redis"),"."),(0,i.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() redis.UniversalClient\n")),(0,i.kt)("h3",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Redis is tested on the 2 last ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,i.kt)("p",null,"And then install the redis implementation:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/redis/v2\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the storage package."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/redis/v2"\n')),(0,i.kt)("p",null,"You can use the one of the following options to create a Redis Storage:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := redis.New()\n\n// Initialize custom config\nstore := redis.New(redis.Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n})\n\n// Initialize Redis Failover Client\nstore := redis.New(redis.Config{\n MasterName: "master-name",\n Addrs: []string{":6379"},\n})\n\n// Initialize Redis Cluster Client\nstore := redis.New(redis.Config{\n Addrs: []string{":6379", ":6380"},\n})\n\n// Create a client with support for TLS\ncer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")\nif err != nil {\n log.Println(err)\n return\n}\ntlsCfg := &tls.Config{\n MinVersion: tls.VersionTLS12,\n InsecureSkipVerify: true,\n Certificates: []tls.Certificate{cer},\n}\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n TLSConfig: tlsCfg,\n Reset: false,\n})\n\n// Create a client with a Redis URL with all information.\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n Reset: false,\n})\n')),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 6379\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database to be selected after connecting to the server.\n //\n // Optional. Default is 0\n Database int\n\n // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.\n //\n // Example: redis://:@localhost:6379/\n // Optional. Default is ""\n URL string\n\n // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient\n //\n // Optional. Default is []string{}\n Addrs []string\n\n // MasterName is the sentinel master\'s name\n //\n // Optional. Default is ""\n MasterName string\n\n // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.\n //\n // Optional. Default is ""\n ClientName string\n\n // SentinelUsername\n //\n // Optional. Default is ""\n SentinelUsername string\n\n // SentinelPassword\n //\n // Optional. Default is ""\n SentinelPassword string\n\n // Reset clears any existing keys in existing Collection\n //\n // Optional. Default is false\n Reset bool\n\n // TLS Config to use. When set TLS will be negotiated.\n //\n // Optional. Default is nil\n TLSConfig *tls.Config\n\n // Maximum number of socket connections.\n //\n // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.\n PoolSize int\n}\n')),(0,i.kt)("h3",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n URL: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n Addrs: []string{},\n MasterName: "",\n ClientName: "",\n SentinelUsername: "",\n SentinelPassword: "",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/37744159.dc893b9a.js b/assets/js/37744159.dc893b9a.js new file mode 100644 index 00000000000..dac177126c7 --- /dev/null +++ b/assets/js/37744159.dc893b9a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4734],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>f});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),g=c(n),u=i,f=g["".concat(l,".").concat(u)]||g[u]||p[u]||a;return n?r.createElement(f,s(s({ref:t},d),{},{components:n})):r.createElement(f,s({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,s=new Array(a);s[0]=u;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[g]="string"==typeof e?e:i,s[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var r=n(87462),i=(n(67294),n(3905));const a={id:"redis",title:"Redis"},s=void 0,o={unversionedId:"redis/redis",id:"version-memcache_v1.x.x/redis/redis",title:"Redis",description:"Release",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/redis/README.md",sourceDirName:"redis",slug:"/redis/",permalink:"/storage/memcache_v1.x.x/redis/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/redis/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"redis",title:"Redis"},sidebar:"tutorialSidebar",previous:{title:"Postgres",permalink:"/storage/memcache_v1.x.x/postgres/"},next:{title:"Ristretto",permalink:"/storage/memcache_v1.x.x/ristretto/"}},l={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],d={toc:c},g="wrapper";function p(e){let{components:t,...n}=e;return(0,i.kt)(g,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=redis*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?label=Tests",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,i.kt)("p",null,"A Redis storage driver using ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-redis/redis"},"go-redis/redis"),"."),(0,i.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,i.kt)("h3",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() redis.UniversalClient\n")),(0,i.kt)("h3",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Redis is tested on the 2 last ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,i.kt)("p",null,"And then install the redis implementation:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/redis/v2\n")),(0,i.kt)("h3",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the storage package."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/redis/v2"\n')),(0,i.kt)("p",null,"You can use the one of the following options to create a Redis Storage:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := redis.New()\n\n// Initialize custom config\nstore := redis.New(redis.Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n})\n\n// Initialize Redis Failover Client\nstore := redis.New(redis.Config{\n MasterName: "master-name",\n Addrs: []string{":6379"},\n})\n\n// Initialize Redis Cluster Client\nstore := redis.New(redis.Config{\n Addrs: []string{":6379", ":6380"},\n})\n\n// Create a client with support for TLS\ncer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")\nif err != nil {\n log.Println(err)\n return\n}\ntlsCfg := &tls.Config{\n MinVersion: tls.VersionTLS12,\n InsecureSkipVerify: true,\n Certificates: []tls.Certificate{cer},\n}\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n TLSConfig: tlsCfg,\n Reset: false,\n})\n\n// Create a client with a Redis URL with all information.\nstore = redis.New(redis.Config{\n URL: "redis://:@127.0.0.1:6379/",\n Reset: false,\n})\n')),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 6379\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database to be selected after connecting to the server.\n //\n // Optional. Default is 0\n Database int\n\n // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.\n //\n // Example: redis://:@localhost:6379/\n // Optional. Default is ""\n URL string\n\n // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient\n //\n // Optional. Default is []string{}\n Addrs []string\n\n // MasterName is the sentinel master\'s name\n //\n // Optional. Default is ""\n MasterName string\n\n // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.\n //\n // Optional. Default is ""\n ClientName string\n\n // SentinelUsername\n //\n // Optional. Default is ""\n SentinelUsername string\n\n // SentinelPassword\n //\n // Optional. Default is ""\n SentinelPassword string\n\n // Reset clears any existing keys in existing Collection\n //\n // Optional. Default is false\n Reset bool\n\n // TLS Config to use. When set TLS will be negotiated.\n //\n // Optional. Default is nil\n TLSConfig *tls.Config\n\n // Maximum number of socket connections.\n //\n // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.\n PoolSize int\n}\n')),(0,i.kt)("h3",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "127.0.0.1",\n Port: 6379,\n Username: "",\n Password: "",\n URL: "",\n Database: 0,\n Reset: false,\n TLSConfig: nil,\n PoolSize: 10 * runtime.GOMAXPROCS(0),\n Addrs: []string{},\n MasterName: "",\n ClientName: "",\n SentinelUsername: "",\n SentinelPassword: "",\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3a6391d4.4f580913.js b/assets/js/3a6391d4.4f580913.js deleted file mode 100644 index 3bbcd665eb8..00000000000 --- a/assets/js/3a6391d4.4f580913.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6811],{3905:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>m});var n=t(7294);function i(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var c=n.createContext({}),d=function(e){var r=n.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):o(o({},r),e)),t},p=function(e){var r=d(e.components);return n.createElement(c.Provider,{value:r},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),s=d(t),f=i,m=s["".concat(c,".").concat(f)]||s[f]||u[f]||a;return t?n.createElement(m,o(o({ref:r},p),{},{components:t})):n.createElement(m,o({ref:r},p))}));function m(e,r){var t=arguments,i=r&&r.mdxType;if("string"==typeof e||i){var a=t.length,o=new Array(a);o[0]=f;var l={};for(var c in r)hasOwnProperty.call(r,c)&&(l[c]=r[c]);l.originalType=e,l[s]="string"==typeof e?e:i,o[1]=l;for(var d=2;d{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>d});var n=t(7462),i=(t(7294),t(3905));const a={id:"redirect",title:"Redirect"},o=void 0,l={unversionedId:"api/middleware/redirect",id:"api/middleware/redirect",title:"Redirect",description:"Redirection middleware for Fiber.",source:"@site/docs/core/api/middleware/redirect.md",sourceDirName:"api/middleware",slug:"/api/middleware/redirect",permalink:"/next/api/middleware/redirect",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/redirect.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"redirect",title:"Redirect"},sidebar:"tutorialSidebar",previous:{title:"Recover",permalink:"/next/api/middleware/recover"},next:{title:"RequestID",permalink:"/next/api/middleware/requestid"}},c={},d=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],p={toc:d},s="wrapper";function u(e){let{components:r,...t}=e;return(0,i.kt)(s,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Redirection middleware for Fiber."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/redirect"\n)\n\nfunc main() {\n app := fiber.New()\n \n app.Use(redirect.New(redirect.Config{\n Rules: map[string]string{\n "/old": "/new",\n "/old/*": "/new/$1",\n },\n StatusCode: 301,\n }))\n \n app.Get("/new", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n })\n app.Get("/new/*", func(c *fiber.Ctx) error {\n return c.SendString("Wildcard: " + c.Params("*"))\n })\n \n app.Listen(":3000")\n}\n')),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Test:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-curl"},"curl http://localhost:3000/old\ncurl http://localhost:3000/old/hello\n")),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Filter defines a function to skip middleware.\n // Optional. Default: nil\n Next func(*fiber.Ctx) bool\n\n // Rules defines the URL path rewrite rules. The values captured in asterisk can be\n // retrieved by index e.g. $1, $2 and so on.\n // Required. Example:\n // "/old": "/new",\n // "/api/*": "/$1",\n // "/js/*": "/public/javascripts/$1",\n // "/users/*/orders/*": "/user/$1/order/$2",\n Rules map[string]string\n\n // The status code when redirecting\n // This is ignored if Redirect is disabled\n // Optional. Default: 302 (fiber.StatusFound)\n StatusCode int\n\n rulesRegex map[*regexp.Regexp]string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n StatusCode: fiber.StatusFound,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3a6391d4.7687ac26.js b/assets/js/3a6391d4.7687ac26.js new file mode 100644 index 00000000000..22e2ade4cfa --- /dev/null +++ b/assets/js/3a6391d4.7687ac26.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6811],{3905:(e,r,t)=>{t.d(r,{Zo:()=>p,kt:()=>m});var n=t(67294);function i(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var c=n.createContext({}),d=function(e){var r=n.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):o(o({},r),e)),t},p=function(e){var r=d(e.components);return n.createElement(c.Provider,{value:r},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),s=d(t),f=i,m=s["".concat(c,".").concat(f)]||s[f]||u[f]||a;return t?n.createElement(m,o(o({ref:r},p),{},{components:t})):n.createElement(m,o({ref:r},p))}));function m(e,r){var t=arguments,i=r&&r.mdxType;if("string"==typeof e||i){var a=t.length,o=new Array(a);o[0]=f;var l={};for(var c in r)hasOwnProperty.call(r,c)&&(l[c]=r[c]);l.originalType=e,l[s]="string"==typeof e?e:i,o[1]=l;for(var d=2;d{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>d});var n=t(87462),i=(t(67294),t(3905));const a={id:"redirect",title:"Redirect"},o=void 0,l={unversionedId:"api/middleware/redirect",id:"api/middleware/redirect",title:"Redirect",description:"Redirection middleware for Fiber.",source:"@site/docs/core/api/middleware/redirect.md",sourceDirName:"api/middleware",slug:"/api/middleware/redirect",permalink:"/next/api/middleware/redirect",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/redirect.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"redirect",title:"Redirect"},sidebar:"tutorialSidebar",previous:{title:"Recover",permalink:"/next/api/middleware/recover"},next:{title:"RequestID",permalink:"/next/api/middleware/requestid"}},c={},d=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],p={toc:d},s="wrapper";function u(e){let{components:r,...t}=e;return(0,i.kt)(s,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Redirection middleware for Fiber."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/redirect"\n)\n\nfunc main() {\n app := fiber.New()\n \n app.Use(redirect.New(redirect.Config{\n Rules: map[string]string{\n "/old": "/new",\n "/old/*": "/new/$1",\n },\n StatusCode: 301,\n }))\n \n app.Get("/new", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n })\n app.Get("/new/*", func(c *fiber.Ctx) error {\n return c.SendString("Wildcard: " + c.Params("*"))\n })\n \n app.Listen(":3000")\n}\n')),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Test:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-curl"},"curl http://localhost:3000/old\ncurl http://localhost:3000/old/hello\n")),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Filter defines a function to skip middleware.\n // Optional. Default: nil\n Next func(*fiber.Ctx) bool\n\n // Rules defines the URL path rewrite rules. The values captured in asterisk can be\n // retrieved by index e.g. $1, $2 and so on.\n // Required. Example:\n // "/old": "/new",\n // "/api/*": "/$1",\n // "/js/*": "/public/javascripts/$1",\n // "/users/*/orders/*": "/user/$1/order/$2",\n Rules map[string]string\n\n // The status code when redirecting\n // This is ignored if Redirect is disabled\n // Optional. Default: 302 (fiber.StatusFound)\n StatusCode int\n\n rulesRegex map[*regexp.Regexp]string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n StatusCode: fiber.StatusFound,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3b70e89f.31be6586.js b/assets/js/3b70e89f.31be6586.js new file mode 100644 index 00000000000..4cfefbf5c34 --- /dev/null +++ b/assets/js/3b70e89f.31be6586.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[41],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var o=n(67294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var g=o.createContext({}),s=function(e){var t=o.useContext(g),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=s(e.components);return o.createElement(g.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,g=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=s(n),d=l,f=p["".concat(g,".").concat(d)]||p[d]||c[d]||r;return n?o.createElement(f,a(a({ref:t},u),{},{components:n})):o.createElement(f,a({ref:t},u))}));function f(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=n.length,a=new Array(r);a[0]=d;var i={};for(var g in t)hasOwnProperty.call(t,g)&&(i[g]=t[g]);i.originalType=e,i[p]="string"==typeof e?e:l,a[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>a,default:()=>c,frontMatter:()=>r,metadata:()=>i,toc:()=>s});var o=n(87462),l=(n(67294),n(3905));const r={id:"log",title:"Log",description:"Fiber's built-in log package",sidebar_position:8},a=void 0,i={unversionedId:"api/log",id:"api/log",title:"Log",description:"Fiber's built-in log package",source:"@site/docs/core/api/log.md",sourceDirName:"api",slug:"/api/log",permalink:"/next/api/log",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/log.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:8,frontMatter:{id:"log",title:"Log",description:"Fiber's built-in log package",sidebar_position:8},sidebar:"tutorialSidebar",previous:{title:"Timeout",permalink:"/next/api/middleware/timeout"},next:{title:"Guide",permalink:"/next/category/guide"}},g={},s=[{value:"Log",id:"log",level:2},{value:"Log levels",id:"log-levels",level:2},{value:"Custom log",id:"custom-log",level:2},{value:"Print log",id:"print-log",level:2},{value:"Global log",id:"global-log",level:2},{value:"Set Level",id:"set-level",level:2},{value:"Set output",id:"set-output",level:2},{value:"Bind context",id:"bind-context",level:2}],u={toc:s},p="wrapper";function c(e){let{components:t,...n}=e;return(0,l.kt)(p,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"log"},"Log"),(0,l.kt)("p",null,"We can use logs to observe program behavior, diagnose problems, or configure corresponding alarms.\nAnd defining a well structured log can improve search efficiency and facilitate handling of problems."),(0,l.kt)("p",null,"Fiber provides a default way to print logs in the standard output.\nIt also provides several global functions, such as ",(0,l.kt)("inlineCode",{parentName:"p"},"log.Info"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"log.Errorf"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"log.Warnw"),", etc. "),(0,l.kt)("h2",{id:"log-levels"},"Log levels"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},"const (\n LevelTrace Level = iota\n LevelDebug\n LevelInfo\n LevelWarn\n LevelError\n LevelFatal\n LevelPanic\n)\n")),(0,l.kt)("h2",{id:"custom-log"},"Custom log"),(0,l.kt)("p",null,"Fiber provides the ",(0,l.kt)("inlineCode",{parentName:"p"},"AllLogger")," interface for adapting the various log libraries."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},"type CommonLogger interface {\n Logger\n FormatLogger\n WithLogger\n}\n\ntype AllLogger interface {\n CommonLogger\n ControlLogger\n WithLogger\n}\n")),(0,l.kt)("h2",{id:"print-log"},"Print log"),(0,l.kt)("p",null,"Note: The method of calling the Fatal level will interrupt the program running after printing the log, please use it with caution.\nDirectly print logs of different levels, which will be entered into messageKey, the default is msg."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'log.Info("Hello, World!")\nlog.Debug("Are you OK?")\nlog.Info("42 is the answer to life, the universe, and everything")\nlog.Warn("We are under attack!")\nlog.Error("Houston, we have a problem.")\nlog.Fatal("So Long, and Thanks for All the Fislog.")\nlog.Panic("The system is down.")\n')),(0,l.kt)("p",null,"Format and print logs of different levels, all methods end with f"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'log.Debugf("Hello %s", "boy")\nlog.Infof("%d is the answer to life, the universe, and everything", 233)\nlog.Warnf("We are under attack %s!", "boss")\nlog.Errorf("%s, we have a problem.", "Master Shifu")\nlog.Fatalf("So Long, and Thanks for All the %s.", "banana")\n')),(0,l.kt)("p",null,"Print a message with the key and value, or ",(0,l.kt)("inlineCode",{parentName:"p"},"KEYVALS UNPAIRED")," if the key and value are not a pair."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'log.Debugw("", "Hello", "boy")\nlog.Infow("", "number", 233)\nlog.Warnw("", "job", "boss")\nlog.Errorw("", "name", "Master Shifu")\nlog.Fatalw("", "fruit", "banana")\n')),(0,l.kt)("h2",{id:"global-log"},"Global log"),(0,l.kt)("p",null,"If you are in a project and just want to use a simple log function that can be printed at any time in the global, we provide a global log."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/fiber/v2/log"\n\nlog.Info("info")\nlog.Warn("warn")\n')),(0,l.kt)("p",null,"The above is using the default ",(0,l.kt)("inlineCode",{parentName:"p"},"log.DefaultLogger")," standard output.\nYou can also find an already implemented adaptation under contrib, or use your own implemented Logger and use ",(0,l.kt)("inlineCode",{parentName:"p"},"log.SetLogger")," to set the global log logger."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "log"\n fiberlog "github.com/gofiber/fiber/v2/log"\n)\n\nvar _ log.AllLogger = (*customLogger)(nil)\n\ntype customLogger struct {\n stdlog *log.Logger\n}\n\n// ...\n// inject your custom logger\nfiberlog.SetLogger(customLogger)\n')),(0,l.kt)("h2",{id:"set-level"},"Set Level"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"log.SetLevel")," sets the level of logs below which logs will not be output.\nThe default logger is LevelTrace."),(0,l.kt)("p",null,"Note that this method is not ",(0,l.kt)("strong",{parentName:"p"},"concurrent-safe"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/fiber/v2/log"\n\nlog.SetLevel(log.LevelInfo)\n')),(0,l.kt)("h2",{id:"set-output"},"Set output"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"log.SetOutput")," sets the output destination of the logger. The default logger types the log in the console."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'var logger AllLogger = &defaultLogger{\n stdlog: log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile|log.Lmicroseconds),\n depth: 4,\n}\n')),(0,l.kt)("p",null,"Set the output destination to the file."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'// Output to ./test.log file\nf, err := os.OpenFile("test.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)\nif err != nil {\n return\n}\nlog.SetOutput(f)\n')),(0,l.kt)("p",null,"Set the output destination to the console and file."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'// Output to ./test.log file\nfile, _ := os.OpenFile("test.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)\niw := io.MultiWriter(os.Stdout, file)\nlog.SetOutput(iw)\n')),(0,l.kt)("h2",{id:"bind-context"},"Bind context"),(0,l.kt)("p",null,"Set the context, using the following method will return a ",(0,l.kt)("inlineCode",{parentName:"p"},"CommonLogger")," instance bound to the specified context"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'commonLogger := log.WithContext(ctx)\ncommonLogger.Info("info")\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3b70e89f.93cc780c.js b/assets/js/3b70e89f.93cc780c.js deleted file mode 100644 index f6b9d92b025..00000000000 --- a/assets/js/3b70e89f.93cc780c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[41],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var o=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var g=o.createContext({}),s=function(e){var t=o.useContext(g),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=s(e.components);return o.createElement(g.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,l=e.mdxType,r=e.originalType,g=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=s(n),d=l,f=p["".concat(g,".").concat(d)]||p[d]||c[d]||r;return n?o.createElement(f,a(a({ref:t},u),{},{components:n})):o.createElement(f,a({ref:t},u))}));function f(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var r=n.length,a=new Array(r);a[0]=d;var i={};for(var g in t)hasOwnProperty.call(t,g)&&(i[g]=t[g]);i.originalType=e,i[p]="string"==typeof e?e:l,a[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>a,default:()=>c,frontMatter:()=>r,metadata:()=>i,toc:()=>s});var o=n(7462),l=(n(7294),n(3905));const r={id:"log",title:"Log",description:"Fiber's built-in log package",sidebar_position:8},a=void 0,i={unversionedId:"api/log",id:"api/log",title:"Log",description:"Fiber's built-in log package",source:"@site/docs/core/api/log.md",sourceDirName:"api",slug:"/api/log",permalink:"/next/api/log",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/log.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:8,frontMatter:{id:"log",title:"Log",description:"Fiber's built-in log package",sidebar_position:8},sidebar:"tutorialSidebar",previous:{title:"Timeout",permalink:"/next/api/middleware/timeout"},next:{title:"Guide",permalink:"/next/category/guide"}},g={},s=[{value:"Log",id:"log",level:2},{value:"Log levels",id:"log-levels",level:2},{value:"Custom log",id:"custom-log",level:2},{value:"Print log",id:"print-log",level:2},{value:"Global log",id:"global-log",level:2},{value:"Set Level",id:"set-level",level:2},{value:"Set output",id:"set-output",level:2},{value:"Bind context",id:"bind-context",level:2}],u={toc:s},p="wrapper";function c(e){let{components:t,...n}=e;return(0,l.kt)(p,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"log"},"Log"),(0,l.kt)("p",null,"We can use logs to observe program behavior, diagnose problems, or configure corresponding alarms.\nAnd defining a well structured log can improve search efficiency and facilitate handling of problems."),(0,l.kt)("p",null,"Fiber provides a default way to print logs in the standard output.\nIt also provides several global functions, such as ",(0,l.kt)("inlineCode",{parentName:"p"},"log.Info"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"log.Errorf"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"log.Warnw"),", etc. "),(0,l.kt)("h2",{id:"log-levels"},"Log levels"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},"const (\n LevelTrace Level = iota\n LevelDebug\n LevelInfo\n LevelWarn\n LevelError\n LevelFatal\n LevelPanic\n)\n")),(0,l.kt)("h2",{id:"custom-log"},"Custom log"),(0,l.kt)("p",null,"Fiber provides the ",(0,l.kt)("inlineCode",{parentName:"p"},"AllLogger")," interface for adapting the various log libraries."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},"type CommonLogger interface {\n Logger\n FormatLogger\n WithLogger\n}\n\ntype AllLogger interface {\n CommonLogger\n ControlLogger\n WithLogger\n}\n")),(0,l.kt)("h2",{id:"print-log"},"Print log"),(0,l.kt)("p",null,"Note: The method of calling the Fatal level will interrupt the program running after printing the log, please use it with caution.\nDirectly print logs of different levels, which will be entered into messageKey, the default is msg."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'log.Info("Hello, World!")\nlog.Debug("Are you OK?")\nlog.Info("42 is the answer to life, the universe, and everything")\nlog.Warn("We are under attack!")\nlog.Error("Houston, we have a problem.")\nlog.Fatal("So Long, and Thanks for All the Fislog.")\nlog.Panic("The system is down.")\n')),(0,l.kt)("p",null,"Format and print logs of different levels, all methods end with f"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'log.Debugf("Hello %s", "boy")\nlog.Infof("%d is the answer to life, the universe, and everything", 233)\nlog.Warnf("We are under attack %s!", "boss")\nlog.Errorf("%s, we have a problem.", "Master Shifu")\nlog.Fatalf("So Long, and Thanks for All the %s.", "banana")\n')),(0,l.kt)("p",null,"Print a message with the key and value, or ",(0,l.kt)("inlineCode",{parentName:"p"},"KEYVALS UNPAIRED")," if the key and value are not a pair."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'log.Debugw("", "Hello", "boy")\nlog.Infow("", "number", 233)\nlog.Warnw("", "job", "boss")\nlog.Errorw("", "name", "Master Shifu")\nlog.Fatalw("", "fruit", "banana")\n')),(0,l.kt)("h2",{id:"global-log"},"Global log"),(0,l.kt)("p",null,"If you are in a project and just want to use a simple log function that can be printed at any time in the global, we provide a global log."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/fiber/v2/log"\n\nlog.Info("info")\nlog.Warn("warn")\n')),(0,l.kt)("p",null,"The above is using the default ",(0,l.kt)("inlineCode",{parentName:"p"},"log.DefaultLogger")," standard output.\nYou can also find an already implemented adaptation under contrib, or use your own implemented Logger and use ",(0,l.kt)("inlineCode",{parentName:"p"},"log.SetLogger")," to set the global log logger."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "log"\n fiberlog "github.com/gofiber/fiber/v2/log"\n)\n\nvar _ log.AllLogger = (*customLogger)(nil)\n\ntype customLogger struct {\n stdlog *log.Logger\n}\n\n// ...\n// inject your custom logger\nfiberlog.SetLogger(customLogger)\n')),(0,l.kt)("h2",{id:"set-level"},"Set Level"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"log.SetLevel")," sets the level of logs below which logs will not be output.\nThe default logger is LevelTrace."),(0,l.kt)("p",null,"Note that this method is not ",(0,l.kt)("strong",{parentName:"p"},"concurrent-safe"),"."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/fiber/v2/log"\n\nlog.SetLevel(log.LevelInfo)\n')),(0,l.kt)("h2",{id:"set-output"},"Set output"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"log.SetOutput")," sets the output destination of the logger. The default logger types the log in the console."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'var logger AllLogger = &defaultLogger{\n stdlog: log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile|log.Lmicroseconds),\n depth: 4,\n}\n')),(0,l.kt)("p",null,"Set the output destination to the file."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'// Output to ./test.log file\nf, err := os.OpenFile("test.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)\nif err != nil {\n return\n}\nlog.SetOutput(f)\n')),(0,l.kt)("p",null,"Set the output destination to the console and file."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'// Output to ./test.log file\nfile, _ := os.OpenFile("test.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)\niw := io.MultiWriter(os.Stdout, file)\nlog.SetOutput(iw)\n')),(0,l.kt)("h2",{id:"bind-context"},"Bind context"),(0,l.kt)("p",null,"Set the context, using the following method will return a ",(0,l.kt)("inlineCode",{parentName:"p"},"CommonLogger")," instance bound to the specified context"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},'commonLogger := log.WithContext(ctx)\ncommonLogger.Info("info")\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3d13e7fb.7eade6bf.js b/assets/js/3d13e7fb.7eade6bf.js new file mode 100644 index 00000000000..57c833f309c --- /dev/null +++ b/assets/js/3d13e7fb.7eade6bf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7245],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>g});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),u=a,g=d["".concat(s,".").concat(u)]||d[u]||f[u]||i;return n?r.createElement(g,o(o({ref:t},p),{},{components:n})):r.createElement(g,o({ref:t},p))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));const i={id:"etag",title:"ETag"},o=void 0,l={unversionedId:"api/middleware/etag",id:"api/middleware/etag",title:"ETag",description:"ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.",source:"@site/docs/core/api/middleware/etag.md",sourceDirName:"api/middleware",slug:"/api/middleware/etag",permalink:"/next/api/middleware/etag",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/etag.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"etag",title:"ETag"},sidebar:"tutorialSidebar",previous:{title:"EnvVar",permalink:"/next/api/middleware/envvar"},next:{title:"ExpVar",permalink:"/next/api/middleware/expvar"}},s={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],p={toc:c},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"ETag middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/etag"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(etag.New())\n\n// Get / receives Etag: "13-1831710635" in response header\napp.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n})\n\n// Or extend your config for customization\napp.Use(etag.New(etag.Config{\n Weak: true,\n}))\n\n// Get / receives Etag: "W/"13-1831710635" in response header\napp.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n})\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Weak indicates that a weak validator is used. Weak etags are easy\n // to generate, but are far less useful for comparisons. Strong\n // validators are ideal for comparisons but can be very difficult\n // to generate efficiently. Weak ETag values of two representations\n // of the same resources might be semantically equivalent, but not\n // byte-for-byte identical. This means weak etags prevent caching\n // when byte range requests are used, but strong etags mean range\n // requests can still be cached.\n Weak bool\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n Weak: false,\n}\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3d13e7fb.c248a747.js b/assets/js/3d13e7fb.c248a747.js deleted file mode 100644 index 784a9f0d5ae..00000000000 --- a/assets/js/3d13e7fb.c248a747.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7245],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>g});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),u=a,g=d["".concat(s,".").concat(u)]||d[u]||f[u]||i;return n?r.createElement(g,o(o({ref:t},p),{},{components:n})):r.createElement(g,o({ref:t},p))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=n(7462),a=(n(7294),n(3905));const i={id:"etag",title:"ETag"},o=void 0,l={unversionedId:"api/middleware/etag",id:"api/middleware/etag",title:"ETag",description:"ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.",source:"@site/docs/core/api/middleware/etag.md",sourceDirName:"api/middleware",slug:"/api/middleware/etag",permalink:"/next/api/middleware/etag",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/etag.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"etag",title:"ETag"},sidebar:"tutorialSidebar",previous:{title:"EnvVar",permalink:"/next/api/middleware/envvar"},next:{title:"ExpVar",permalink:"/next/api/middleware/expvar"}},s={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],p={toc:c},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"ETag middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/etag"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(etag.New())\n\n// Get / receives Etag: "13-1831710635" in response header\napp.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n})\n\n// Or extend your config for customization\napp.Use(etag.New(etag.Config{\n Weak: true,\n}))\n\n// Get / receives Etag: "W/"13-1831710635" in response header\napp.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n})\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Weak indicates that a weak validator is used. Weak etags are easy\n // to generate, but are far less useful for comparisons. Strong\n // validators are ideal for comparisons but can be very difficult\n // to generate efficiently. Weak ETag values of two representations\n // of the same resources might be semantically equivalent, but not\n // byte-for-byte identical. This means weak etags prevent caching\n // when byte range requests are used, but strong etags mean range\n // requests can still be cached.\n Weak bool\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n Weak: false,\n}\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3d2c31c0.2e22df35.js b/assets/js/3d2c31c0.2e22df35.js new file mode 100644 index 00000000000..992df3b2d8f --- /dev/null +++ b/assets/js/3d2c31c0.2e22df35.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[268],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),c=u(a),g=r,b=c["".concat(s,".").concat(g)]||c[g]||f[g]||o;return a?n.createElement(b,l(l({ref:t},p),{},{components:a})):n.createElement(b,l({ref:t},p))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=g;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:r,l[1]=i;for(var u=2;u{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>f,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=a(87462),r=(a(67294),a(3905));const o={id:"bbolt",title:"Bbolt"},l=void 0,i={unversionedId:"bbolt/bbolt",id:"version-sqlite3_v1.x.x/bbolt/bbolt",title:"Bbolt",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/bbolt/README.md",sourceDirName:"bbolt",slug:"/bbolt/",permalink:"/storage/sqlite3_v1.x.x/bbolt/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/bbolt/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"bbolt",title:"Bbolt"},sidebar:"tutorialSidebar",previous:{title:"Badger",permalink:"/storage/sqlite3_v1.x.x/badger/"},next:{title:"Couchbase",permalink:"/storage/sqlite3_v1.x.x/couchbase/"}},s={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:u},c="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(c,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=bbolt*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A Bbolt storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/etcd-io/bbolt"},"etcd-io/bbolt"),". Bolt is a pure Go key/value store inspired by ",(0,r.kt)("a",{parentName:"p",href:"https://twitter.com/hyc_symas"},"Howard Chu's")," ",(0,r.kt)("a",{parentName:"p",href:"https://www.symas.com/symas-embedded-database-lmdb"},"LMDB project"),". The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *bbolt.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"Bbolt is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the s3 implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/bbolt\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/bbolt"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := bbolt.New()\n\n// Initialize custom config\nstore := bbolt.New(bbolt.Config{\n Database: "my_database.db",\n Bucket: "my-bucket",\n Reset: false,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Database path\n //\n // Optional. Default is "fiber.db"\n Database string\n\n // Bbolt bucket name\n //\n // Optional. Default is "fiber_storage"\n Bucket string\n\n // Timeout is the amount of time to wait to obtain a file lock.\n // Only available on Darwin and Linux.\n //\n // Optional. Default is 60 * time.Second.\n Timeout time.Duration\n\n // Open database in read-only mode.\n //\n // Optional. Default is false\n ReadOnly bool\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Database: "fiber.db",\n Bucket: "fiber_storage",\n Timeout: 60 * time.Second,\n ReadOnly: false,\n Reset: false,\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3d2c31c0.300268cc.js b/assets/js/3d2c31c0.300268cc.js deleted file mode 100644 index b1abcb6b2f0..00000000000 --- a/assets/js/3d2c31c0.300268cc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[268],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>b});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),c=u(a),g=r,b=c["".concat(s,".").concat(g)]||c[g]||f[g]||o;return a?n.createElement(b,l(l({ref:t},p),{},{components:a})):n.createElement(b,l({ref:t},p))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=g;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:r,l[1]=i;for(var u=2;u{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>f,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=a(7462),r=(a(7294),a(3905));const o={id:"bbolt",title:"Bbolt"},l=void 0,i={unversionedId:"bbolt/bbolt",id:"version-sqlite3_v1.x.x/bbolt/bbolt",title:"Bbolt",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/bbolt/README.md",sourceDirName:"bbolt",slug:"/bbolt/",permalink:"/storage/sqlite3_v1.x.x/bbolt/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/bbolt/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"bbolt",title:"Bbolt"},sidebar:"tutorialSidebar",previous:{title:"Badger",permalink:"/storage/sqlite3_v1.x.x/badger/"},next:{title:"Couchbase",permalink:"/storage/sqlite3_v1.x.x/couchbase/"}},s={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:u},c="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(c,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=bbolt*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A Bbolt storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/etcd-io/bbolt"},"etcd-io/bbolt"),". Bolt is a pure Go key/value store inspired by ",(0,r.kt)("a",{parentName:"p",href:"https://twitter.com/hyc_symas"},"Howard Chu's")," ",(0,r.kt)("a",{parentName:"p",href:"https://www.symas.com/symas-embedded-database-lmdb"},"LMDB project"),". The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *bbolt.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"Bbolt is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the s3 implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/bbolt\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/bbolt"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := bbolt.New()\n\n// Initialize custom config\nstore := bbolt.New(bbolt.Config{\n Database: "my_database.db",\n Bucket: "my-bucket",\n Reset: false,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Database path\n //\n // Optional. Default is "fiber.db"\n Database string\n\n // Bbolt bucket name\n //\n // Optional. Default is "fiber_storage"\n Bucket string\n\n // Timeout is the amount of time to wait to obtain a file lock.\n // Only available on Darwin and Linux.\n //\n // Optional. Default is 60 * time.Second.\n Timeout time.Duration\n\n // Open database in read-only mode.\n //\n // Optional. Default is false\n ReadOnly bool\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Database: "fiber.db",\n Bucket: "fiber_storage",\n Timeout: 60 * time.Second,\n ReadOnly: false,\n Reset: false,\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4082c816.10cb6e6e.js b/assets/js/4082c816.10cb6e6e.js new file mode 100644 index 00000000000..71ab628ff37 --- /dev/null +++ b/assets/js/4082c816.10cb6e6e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8724],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>g});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=c(n),m=o,g=u["".concat(l,".").concat(m)]||u[m]||p[m]||r;return n?a.createElement(g,i(i({ref:t},d),{},{components:n})):a.createElement(g,i({ref:t},d))}));function g(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:o,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var a=n(87462),o=(n(67294),n(3905));const r={id:"dynamodb",title:"DynamoDB"},i=void 0,s={unversionedId:"dynamodb/dynamodb",id:"version-bbolt_v1.x.x/dynamodb/dynamodb",title:"DynamoDB",description:"Release",source:"@site/storage_versioned_docs/version-bbolt_v1.x.x/dynamodb/README.md",sourceDirName:"dynamodb",slug:"/dynamodb/",permalink:"/storage/dynamodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/dynamodb/README.md",tags:[],version:"bbolt_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"dynamodb",title:"DynamoDB"},sidebar:"tutorialSidebar",previous:{title:"Couchbase",permalink:"/storage/couchbase/"},next:{title:"Etcd",permalink:"/storage/etcd/"}},l={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],d={toc:c},u="wrapper";function p(e){let{components:t,...n}=e;return(0,o.kt)(u,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=dynamodb*",alt:"Release"}),"\n",(0,o.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?label=Tests",alt:"Test"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,o.kt)("p",null,"A DynamoDB storage driver using ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,o.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,o.kt)("p",null,"...."),(0,o.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,o.kt)("h3",{id:"signatures"},"Signatures"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"func New(config Config) Storage\n\n\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *awsdynamodb.Client\n")),(0,o.kt)("h3",{id:"installation"},"Installation"),(0,o.kt)("p",null,"DynamoDB is tested on the 2 last ",(0,o.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,o.kt)("p",null,"And then install the dynamodb implementation:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/dynamodb\n")),(0,o.kt)("h3",{id:"examples"},"Examples"),(0,o.kt)("p",null,"Import the storage package."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/dynamodb"\n')),(0,o.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize dynamodb\nstore := dynamodb.New(dynamodb.Config{\n \n})\n")),(0,o.kt)("h3",{id:"config"},"Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Region of the DynamoDB service you want to use.\n // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.\n // E.g. "us-west-2".\n // Optional (read from shared config file or environment variable if not set).\n // Environment variable: "AWS_REGION".\n Region string\n\n // Name of the DynamoDB table.\n // Optional ("fiber_storage" by default).\n Table string\n\n // CustomEndpoint allows you to set a custom DynamoDB service endpoint.\n // This is especially useful if you\'re running a "DynamoDB local" Docker container for local testing.\n // Typical value for the Docker container: "http://localhost:8000".\n // See https://hub.docker.com/r/amazon/dynamodb-local/.\n // Optional ("" by default)\n Endpoint string\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // ReadCapacityUnits of the table.\n // Only required when the table doesn\'t exist yet and is created by gokv.\n // Optional (5 by default, which is the same default value as when creating a table in the web console)\n // 25 RCUs are included in the free tier (across all tables).\n // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.\n // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.\n ReadCapacityUnits int64\n\n // ReadCapacityUnits of the table.\n // Only required when the table doesn\'t exist yet and is created by gokv.\n // Optional (5 by default, which is the same default value as when creating a table in the web console)\n // 25 RCUs are included in the free tier (across all tables).\n // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.\n // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.\n WriteCapacityUnits int64\n\n // If the table doesn\'t exist yet, gokv creates it.\n // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.\n // If the table still doesn\'t exist after 15 seconds, an error is returned.\n // If WaitForTableCreation is false, gokv returns the client immediately.\n // In the latter case you need to make sure that you don\'t read from or write to the table before it\'s created,\n // because otherwise you will get ResourceNotFoundException errors.\n // Optional (true by default).\n WaitForTableCreation *bool\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n\n')),(0,o.kt)("h3",{id:"default-config"},"Default Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Table: "fiber_storage",\n Credentials: Credentials{},\n MaxAttempts: 3,\n Reset: false,\n ReadCapacityUnits: 5,\n WriteCapacityUnits: 5,\n WaitForTableCreation: aws.Bool(true),\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4129286c.6024df0a.js b/assets/js/4129286c.6024df0a.js deleted file mode 100644 index dc3f44a6b03..00000000000 --- a/assets/js/4129286c.6024df0a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5156],{2776:s=>{s.exports=JSON.parse('{"name":"@easyops-cn/docusaurus-search-local","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/4129286c.d3d20f8e.js b/assets/js/4129286c.d3d20f8e.js new file mode 100644 index 00000000000..607556c97cf --- /dev/null +++ b/assets/js/4129286c.d3d20f8e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5156],{12776:s=>{s.exports=JSON.parse('{"name":"@easyops-cn/docusaurus-search-local","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/41a4aef8.2635bdff.js b/assets/js/41a4aef8.2635bdff.js new file mode 100644 index 00000000000..a43b57f7f42 --- /dev/null +++ b/assets/js/41a4aef8.2635bdff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[513,7554],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=p(n),m=r,h=c["".concat(s,".").concat(m)]||c[m]||d[m]||o;return n?a.createElement(h,l(l({ref:t},u),{},{components:n})):a.createElement(h,l({ref:t},u))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:r,l[1]=i;for(var p=2;p{n.d(t,{Z:()=>l});var a=n(67294),r=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(o.tabItem,l),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(87462),r=n(67294),o=n(86010),l=n(12466),i=n(16550),s=n(91980),p=n(67392),u=n(50012);function c(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,p.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,r.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(a.location.search);t.set(o,e),a.replace({...a.location,search:t.toString()})}),[o,a])]}function g(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,o=d(e),[l,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:o}))),[s,p]=h({queryString:n,groupId:a}),[c,g]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,o]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:a}),f=(()=>{const e=s??c;return m({value:e,tabValues:o})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),p(e),g(e)}),[p,g,o]),tabValues:o}}var f=n(72389);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function b(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:p}=e;const u=[],{blockElementScrollPositionUntilNextRender:c}=(0,l.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=p[n].value;a!==i&&(c(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},p.map((e=>{let{value:t,label:n,attributes:l}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},l,{className:(0,o.Z)("tabs__item",k.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function N(e){let{lazy:t,children:n,selectedValue:a}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=g(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",k.tabList)},r.createElement(b,(0,a.Z)({},e,t)),r.createElement(N,(0,a.Z)({},e,t)))}function y(e){const t=(0,f.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},9835:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>p,default:()=>g,frontMatter:()=>s,metadata:()=>u,toc:()=>d});var a=n(87462),r=(n(67294),n(3905)),o=n(74866),l=n(85162),i=n(36074);const s={id:"routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",sidebar_position:1},p=void 0,u={unversionedId:"guide/routing",id:"version-v2.x/guide/routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",source:"@site/versioned_docs/version-v2.x/guide/routing.md",sourceDirName:"guide",slug:"/guide/routing",permalink:"/guide/routing",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{id:"routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Guide",permalink:"/category/guide"},next:{title:"\ud83c\udfad Grouping",permalink:"/guide/grouping"}},c={},d=[{value:"Handlers",id:"handlers",level:2},{value:"Paths",id:"paths",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Constraints",id:"constraints",level:3},{value:"Middleware",id:"middleware",level:2},{value:"Grouping",id:"grouping",level:2}],m={toc:d},h="wrapper";function g(e){let{components:t,...n}=e;return(0,r.kt)(h,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"handlers"},"Handlers"),(0,r.kt)(i.default,{mdxType:"RoutingHandler"}),(0,r.kt)("h2",{id:"paths"},"Paths"),(0,r.kt)("p",null,"Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be ",(0,r.kt)("strong",{parentName:"p"},"strings")," or ",(0,r.kt)("strong",{parentName:"p"},"string patterns"),"."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Examples of route paths based on strings")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// This route path will match requests to the root route, "/":\napp.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("root")\n})\n\n// This route path will match requests to "/about":\napp.Get("/about", func(c *fiber.Ctx) error {\n return c.SendString("about")\n})\n\n// This route path will match requests to "/random.txt":\napp.Get("/random.txt", func(c *fiber.Ctx) error {\n return c.SendString("random.txt")\n})\n')),(0,r.kt)("p",null,"As with the expressJs framework, the order of the route declaration plays a role.\nWhen a request is received, the routes are checked in the order in which they are declared."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"So please be careful to write routes with variable parameters after the routes that contain fixed parts, so that these variable parts do not match instead and unexpected behavior occurs.")),(0,r.kt)("h2",{id:"parameters"},"Parameters"),(0,r.kt)("p",null,"Route parameters are dynamic elements in the route, which are ",(0,r.kt)("strong",{parentName:"p"},"named")," or ",(0,r.kt)("strong",{parentName:"p"},"not named segments"),". This segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the ",(0,r.kt)("a",{parentName:"p",href:"https://fiber.wiki/context#params"},"Params")," function, with the name of the route parameter specified in the path as their respective keys or for unnamed parameters the character","(","*",", +",")"," and the counter of this."),(0,r.kt)("p",null,"The characters :, +, and ","*"," are characters that introduce a parameter."),(0,r.kt)("p",null,"Greedy parameters are indicated by wildcard","(","*",")"," or plus","(","+",")"," signs."),(0,r.kt)("p",null,'The routing also offers the possibility to use optional parameters, for the named parameters these are marked with a final "?", unlike the plus sign which is not optional, you can use the wildcard character for a parameter range which is optional and greedy.'),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Example of define routes with route parameters")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Parameters\napp.Get("/user/:name/books/:title", func(c *fiber.Ctx) error {\n fmt.Fprintf(c, "%s\\n", c.Params("name"))\n fmt.Fprintf(c, "%s\\n", c.Params("title"))\n return nil\n})\n// Plus - greedy - not optional\napp.Get("/user/+", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("+"))\n})\n\n// Optional parameter\napp.Get("/user/:name?", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("name"))\n})\n\n// Wildcard - greedy - optional\napp.Get("/user/*", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("*"))\n})\n\n// This route path will match requests to "/v1/some/resource/name:customVerb", since the parameter character is escaped\napp.Get("/v1/some/resource/name\\\\:customVerb", func(c *fiber.Ctx) error {\n return c.SendString("Hello, Community")\n})\n')),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Since the hyphen ","(",(0,r.kt)("inlineCode",{parentName:"p"},"-"),")"," and the dot ","(",(0,r.kt)("inlineCode",{parentName:"p"},"."),")"," are interpreted literally, they can be used along with route parameters for useful purposes.")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"All special parameter characters can also be escaped with ",(0,r.kt)("inlineCode",{parentName:"p"},'"\\\\"')," and lose their value, so you can use them in the route if you want, like in the custom methods of the ",(0,r.kt)("a",{parentName:"p",href:"https://cloud.google.com/apis/design/custom_methods"},"google api design guide"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// http://localhost:3000/plantae/prunus.persica\napp.Get("/plantae/:genus.:species", func(c *fiber.Ctx) error {\n fmt.Fprintf(c, "%s.%s\\n", c.Params("genus"), c.Params("species"))\n return nil // prunus.persica\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// http://localhost:3000/flights/LAX-SFO\napp.Get("/flights/:from-:to", func(c *fiber.Ctx) error {\n fmt.Fprintf(c, "%s-%s\\n", c.Params("from"), c.Params("to"))\n return nil // LAX-SFO\n})\n')),(0,r.kt)("p",null,"Our intelligent router recognizes that the introductory parameter characters should be part of the request route in this case and can process them as such."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// http://localhost:3000/shop/product/color:blue/size:xs\napp.Get("/shop/product/color::color/size::size", func(c *fiber.Ctx) error {\n fmt.Fprintf(c, "%s:%s\\n", c.Params("color"), c.Params("size"))\n return nil // blue:xs\n})\n')),(0,r.kt)("p",null,"In addition, several parameters in a row and several unnamed parameter characters in the route, such as the wildcard or plus character, are possible, which greatly expands the possibilities of the router for the user."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// GET /@v1\n// Params: "sign" -> "@", "param" -> "v1"\napp.Get("/:sign:param", handler)\n\n// GET /api-v1\n// Params: "name" -> "v1" \napp.Get("/api-:name", handler)\n\n// GET /customer/v1/cart/proxy\n// Params: "*1" -> "customer/", "*2" -> "/cart"\napp.Get("/*v1*/proxy", handler)\n\n// GET /v1/brand/4/shop/blue/xs\n// Params: "*1" -> "brand/4", "*2" -> "blue/xs"\napp.Get("/v1/*/shop/*", handler)\n')),(0,r.kt)("p",null,"We have adapted the routing strongly to the express routing, but currently without the possibility of the regular expressions, because they are quite slow. The possibilities can be tested with version 0.1.7 ","(","express 4",")"," in the online ",(0,r.kt)("a",{parentName:"p",href:"http://forbeslindesay.github.io/express-route-tester/"},"Express route tester"),"."),(0,r.kt)("h3",{id:"constraints"},"Constraints"),(0,r.kt)("p",null,"Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values by parameters. The feature was intorduced in ",(0,r.kt)("inlineCode",{parentName:"p"},"v2.37.0")," and inspired by ",(0,r.kt)("a",{parentName:"p",href:"https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-6.0#route-constraints"},".NET Core"),"."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Constraints aren't validation for parameters. If constraint aren't valid for parameter value, Fiber returns ",(0,r.kt)("strong",{parentName:"p"},"404 handler"),".")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Constraint"),(0,r.kt)("th",{parentName:"tr",align:null},"Example"),(0,r.kt)("th",{parentName:"tr",align:null},"Example matches"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"int"),(0,r.kt)("td",{parentName:"tr",align:null},":id"),(0,r.kt)("td",{parentName:"tr",align:null},"123456789, -123456789")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"bool"),(0,r.kt)("td",{parentName:"tr",align:null},":active"),(0,r.kt)("td",{parentName:"tr",align:null},"true,false")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"guid"),(0,r.kt)("td",{parentName:"tr",align:null},":id"),(0,r.kt)("td",{parentName:"tr",align:null},"CD2C1638-1638-72D5-1638-DEADBEEF1638")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"float"),(0,r.kt)("td",{parentName:"tr",align:null},":weight"),(0,r.kt)("td",{parentName:"tr",align:null},"1.234, -1,001.01e8")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"minLen(value)"),(0,r.kt)("td",{parentName:"tr",align:null},":username"),(0,r.kt)("td",{parentName:"tr",align:null},"Test (must be at least 4 characters)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"maxLen(value)"),(0,r.kt)("td",{parentName:"tr",align:null},":filename"),(0,r.kt)("td",{parentName:"tr",align:null},"MyFile (must be no more than 8 characters")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"len(length)"),(0,r.kt)("td",{parentName:"tr",align:null},":filename"),(0,r.kt)("td",{parentName:"tr",align:null},"somefile.txt (exactly 12 characters)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"min(value)"),(0,r.kt)("td",{parentName:"tr",align:null},":age"),(0,r.kt)("td",{parentName:"tr",align:null},"19 (Integer value must be at least 18)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"max(value)"),(0,r.kt)("td",{parentName:"tr",align:null},":age"),(0,r.kt)("td",{parentName:"tr",align:null},"91 (Integer value must be no more than 120)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"range(min,max)"),(0,r.kt)("td",{parentName:"tr",align:null},":age"),(0,r.kt)("td",{parentName:"tr",align:null},"91 (Integer value must be at least 18 but no more than 120)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"alpha"),(0,r.kt)("td",{parentName:"tr",align:null},":name"),(0,r.kt)("td",{parentName:"tr",align:null},"Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"datetime"),(0,r.kt)("td",{parentName:"tr",align:null},":dob"),(0,r.kt)("td",{parentName:"tr",align:null},"2005-11-01")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"regex(expression)"),(0,r.kt)("td",{parentName:"tr",align:null},":date"),(0,r.kt)("td",{parentName:"tr",align:null},"2022-08-27 (Must match regular expression)")))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Examples")),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"single-constraint",label:"Single Constraint",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/:test", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("test"))\n})\n\n// curl -X GET http://localhost:3000/12\n// 12\n\n// curl -X GET http://localhost:3000/1\n// Cannot GET /1\n'))),(0,r.kt)(l.Z,{value:"multiple-constraints",label:"Multiple Constraints",mdxType:"TabItem"},(0,r.kt)("p",null,"You can use ",(0,r.kt)("inlineCode",{parentName:"p"},";")," for multiple constraints."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/:test", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("test"))\n})\n\n// curl -X GET http://localhost:3000/120000\n// Cannot GET /120000\n\n// curl -X GET http://localhost:3000/1\n// Cannot GET /1\n\n// curl -X GET http://localhost:3000/250\n// 250\n'))),(0,r.kt)(l.Z,{value:"regex-constraint",label:"Regex Constraint",mdxType:"TabItem"},(0,r.kt)("p",null,"Fiber precompiles regex query when to register routes. So there're no performance overhead for regex constraint."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/:date", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("date"))\n})\n\n// curl -X GET http://localhost:3000/125\n// Cannot GET /125\n\n// curl -X GET http://localhost:3000/test\n// Cannot GET /test\n\n// curl -X GET http://localhost:3000/2022-08-27\n// 2022-08-27\n')))),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"You should use ",(0,r.kt)("inlineCode",{parentName:"p"},"\\\\")," before routing-specific characters when to use datetime constraint (",(0,r.kt)("inlineCode",{parentName:"p"},"*"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"+"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"?"),", ",(0,r.kt)("inlineCode",{parentName:"p"},":"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"/"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"<"),", ",(0,r.kt)("inlineCode",{parentName:"p"},">"),", ",(0,r.kt)("inlineCode",{parentName:"p"},";"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"("),", ",(0,r.kt)("inlineCode",{parentName:"p"},")"),"), to avoid wrong parsing.")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Optional Parameter Example")),(0,r.kt)("p",null,"You can impose constraints on optional parameters as well."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/:test?", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("test"))\n})\n// curl -X GET http://localhost:3000/42\n// 42\n// curl -X GET http://localhost:3000/\n//\n// curl -X GET http://localhost:3000/7.0\n// Cannot GET /7.0\n')),(0,r.kt)("h2",{id:"middleware"},"Middleware"),(0,r.kt)("p",null,"Functions that are designed to make changes to the request or response are called ",(0,r.kt)("strong",{parentName:"p"},"middleware functions"),". The ",(0,r.kt)("a",{parentName:"p",href:"/api/ctx#next"},"Next")," is a ",(0,r.kt)("strong",{parentName:"p"},"Fiber")," router function, when called, executes the ",(0,r.kt)("strong",{parentName:"p"},"next")," function that ",(0,r.kt)("strong",{parentName:"p"},"matches")," the current route."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Example of a middleware function")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(func(c *fiber.Ctx) error {\n // Set a custom header on all responses:\n c.Set("X-Custom-Header", "Hello, World")\n\n // Go to next middleware:\n return c.Next()\n})\n\napp.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n})\n')),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Use")," method path is a ",(0,r.kt)("strong",{parentName:"p"},"mount"),", or ",(0,r.kt)("strong",{parentName:"p"},"prefix")," path, and limits middleware to only apply to any paths requested that begin with it."),(0,r.kt)("h2",{id:"grouping"},"Grouping"),(0,r.kt)("p",null,"If you have many endpoints, you can organize your routes using ",(0,r.kt)("inlineCode",{parentName:"p"},"Group"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api", middleware) // /api\n\n v1 := api.Group("/v1", middleware) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2", middleware) // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,r.kt)("p",null,"More information about this in our ",(0,r.kt)("a",{parentName:"p",href:"/guide/grouping"},"Grouping Guide")))}g.isMDXComponent=!0},36074:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const o={id:"route-handlers",title:"Route Handlers"},l=void 0,i={unversionedId:"partials/routing/route-handlers",id:"version-v2.x/partials/routing/route-handlers",title:"Route Handlers",description:"Registers a route bound to a specific HTTP method.",source:"@site/versioned_docs/version-v2.x/partials/routing/handler.md",sourceDirName:"partials/routing",slug:"/partials/routing/route-handlers",permalink:"/partials/routing/route-handlers",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"route-handlers",title:"Route Handlers"}},s={},p=[],u={toc:p},c="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(c,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Registers a route bound to a specific ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods"},"HTTP method"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signatures"',title:'"Signatures"'},"// HTTP methods\nfunc (app *App) Get(path string, handlers ...Handler) Router\nfunc (app *App) Head(path string, handlers ...Handler) Router\nfunc (app *App) Post(path string, handlers ...Handler) Router\nfunc (app *App) Put(path string, handlers ...Handler) Router\nfunc (app *App) Delete(path string, handlers ...Handler) Router\nfunc (app *App) Connect(path string, handlers ...Handler) Router\nfunc (app *App) Options(path string, handlers ...Handler) Router\nfunc (app *App) Trace(path string, handlers ...Handler) Router\nfunc (app *App) Patch(path string, handlers ...Handler) Router\n\n// Add allows you to specifiy a method as value\nfunc (app *App) Add(method, path string, handlers ...Handler) Router\n\n// All will register the route on all HTTP methods\n// Almost the same as app.Use but not bound to prefixes\nfunc (app *App) All(path string, handlers ...Handler) Router\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Simple GET handler\napp.Get("/api/list", func(c *fiber.Ctx) error {\n return c.SendString("I\'m a GET request!")\n})\n\n// Simple POST handler\napp.Post("/api/register", func(c *fiber.Ctx) error {\n return c.SendString("I\'m a POST request!")\n})\n')),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Use")," can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. ",(0,r.kt)("inlineCode",{parentName:"p"},"/john")," will match ",(0,r.kt)("inlineCode",{parentName:"p"},"/john/doe"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"/johnnnnn")," etc"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Use(args ...interface{}) Router\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Match any request\napp.Use(func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Match request starting with /api\napp.Use("/api", func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Match requests starting with /api or /home (multiple-prefix support)\napp.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Attach multiple handlers \napp.Use("/api", func(c *fiber.Ctx) error {\n c.Set("X-Custom-Header", random.String(32))\n return c.Next()\n}, func(c *fiber.Ctx) error {\n return c.Next()\n})\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/41a4aef8.cf014c1c.js b/assets/js/41a4aef8.cf014c1c.js deleted file mode 100644 index 6a2f974781d..00000000000 --- a/assets/js/41a4aef8.cf014c1c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[513,7554],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=p(n),m=r,h=c["".concat(s,".").concat(m)]||c[m]||d[m]||o;return n?a.createElement(h,l(l({ref:t},u),{},{components:n})):a.createElement(h,l({ref:t},u))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[c]="string"==typeof e?e:r,l[1]=i;for(var p=2;p{n.d(t,{Z:()=>l});var a=n(7294),r=n(6010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(o.tabItem,l),hidden:n},t)}},4866:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(7462),r=n(7294),o=n(6010),l=n(2466),i=n(6550),s=n(1980),p=n(7392),u=n(12);function c(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,p.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,r.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(a.location.search);t.set(o,e),a.replace({...a.location,search:t.toString()})}),[o,a])]}function g(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,o=d(e),[l,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:o}))),[s,p]=h({queryString:n,groupId:a}),[c,g]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,o]=(0,u.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:a}),f=(()=>{const e=s??c;return m({value:e,tabValues:o})?e:null})();(0,r.useLayoutEffect)((()=>{f&&i(f)}),[f]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),p(e),g(e)}),[p,g,o]),tabValues:o}}var f=n(2389);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function b(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:p}=e;const u=[],{blockElementScrollPositionUntilNextRender:c}=(0,l.o5)(),d=e=>{const t=e.currentTarget,n=u.indexOf(t),a=p[n].value;a!==i&&(c(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},p.map((e=>{let{value:t,label:n,attributes:l}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>u.push(e),onKeyDown:m,onClick:d},l,{className:(0,o.Z)("tabs__item",k.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function N(e){let{lazy:t,children:n,selectedValue:a}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function v(e){const t=g(e);return r.createElement("div",{className:(0,o.Z)("tabs-container",k.tabList)},r.createElement(b,(0,a.Z)({},e,t)),r.createElement(N,(0,a.Z)({},e,t)))}function y(e){const t=(0,f.Z)();return r.createElement(v,(0,a.Z)({key:String(t)},e))}},9835:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>p,default:()=>g,frontMatter:()=>s,metadata:()=>u,toc:()=>d});var a=n(7462),r=(n(7294),n(3905)),o=n(4866),l=n(5162),i=n(6074);const s={id:"routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",sidebar_position:1},p=void 0,u={unversionedId:"guide/routing",id:"version-v2.x/guide/routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",source:"@site/versioned_docs/version-v2.x/guide/routing.md",sourceDirName:"guide",slug:"/guide/routing",permalink:"/guide/routing",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{id:"routing",title:"\ud83d\udd0c Routing",description:"Routing refers to how an application's endpoints (URIs) respond to client requests.",sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Guide",permalink:"/category/guide"},next:{title:"\ud83c\udfad Grouping",permalink:"/guide/grouping"}},c={},d=[{value:"Handlers",id:"handlers",level:2},{value:"Paths",id:"paths",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Constraints",id:"constraints",level:3},{value:"Middleware",id:"middleware",level:2},{value:"Grouping",id:"grouping",level:2}],m={toc:d},h="wrapper";function g(e){let{components:t,...n}=e;return(0,r.kt)(h,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"handlers"},"Handlers"),(0,r.kt)(i.default,{mdxType:"RoutingHandler"}),(0,r.kt)("h2",{id:"paths"},"Paths"),(0,r.kt)("p",null,"Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be ",(0,r.kt)("strong",{parentName:"p"},"strings")," or ",(0,r.kt)("strong",{parentName:"p"},"string patterns"),"."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Examples of route paths based on strings")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// This route path will match requests to the root route, "/":\napp.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("root")\n})\n\n// This route path will match requests to "/about":\napp.Get("/about", func(c *fiber.Ctx) error {\n return c.SendString("about")\n})\n\n// This route path will match requests to "/random.txt":\napp.Get("/random.txt", func(c *fiber.Ctx) error {\n return c.SendString("random.txt")\n})\n')),(0,r.kt)("p",null,"As with the expressJs framework, the order of the route declaration plays a role.\nWhen a request is received, the routes are checked in the order in which they are declared."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"So please be careful to write routes with variable parameters after the routes that contain fixed parts, so that these variable parts do not match instead and unexpected behavior occurs.")),(0,r.kt)("h2",{id:"parameters"},"Parameters"),(0,r.kt)("p",null,"Route parameters are dynamic elements in the route, which are ",(0,r.kt)("strong",{parentName:"p"},"named")," or ",(0,r.kt)("strong",{parentName:"p"},"not named segments"),". This segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the ",(0,r.kt)("a",{parentName:"p",href:"https://fiber.wiki/context#params"},"Params")," function, with the name of the route parameter specified in the path as their respective keys or for unnamed parameters the character","(","*",", +",")"," and the counter of this."),(0,r.kt)("p",null,"The characters :, +, and ","*"," are characters that introduce a parameter."),(0,r.kt)("p",null,"Greedy parameters are indicated by wildcard","(","*",")"," or plus","(","+",")"," signs."),(0,r.kt)("p",null,'The routing also offers the possibility to use optional parameters, for the named parameters these are marked with a final "?", unlike the plus sign which is not optional, you can use the wildcard character for a parameter range which is optional and greedy.'),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Example of define routes with route parameters")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Parameters\napp.Get("/user/:name/books/:title", func(c *fiber.Ctx) error {\n fmt.Fprintf(c, "%s\\n", c.Params("name"))\n fmt.Fprintf(c, "%s\\n", c.Params("title"))\n return nil\n})\n// Plus - greedy - not optional\napp.Get("/user/+", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("+"))\n})\n\n// Optional parameter\napp.Get("/user/:name?", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("name"))\n})\n\n// Wildcard - greedy - optional\napp.Get("/user/*", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("*"))\n})\n\n// This route path will match requests to "/v1/some/resource/name:customVerb", since the parameter character is escaped\napp.Get("/v1/some/resource/name\\\\:customVerb", func(c *fiber.Ctx) error {\n return c.SendString("Hello, Community")\n})\n')),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"Since the hyphen ","(",(0,r.kt)("inlineCode",{parentName:"p"},"-"),")"," and the dot ","(",(0,r.kt)("inlineCode",{parentName:"p"},"."),")"," are interpreted literally, they can be used along with route parameters for useful purposes.")),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"All special parameter characters can also be escaped with ",(0,r.kt)("inlineCode",{parentName:"p"},'"\\\\"')," and lose their value, so you can use them in the route if you want, like in the custom methods of the ",(0,r.kt)("a",{parentName:"p",href:"https://cloud.google.com/apis/design/custom_methods"},"google api design guide"),".")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// http://localhost:3000/plantae/prunus.persica\napp.Get("/plantae/:genus.:species", func(c *fiber.Ctx) error {\n fmt.Fprintf(c, "%s.%s\\n", c.Params("genus"), c.Params("species"))\n return nil // prunus.persica\n})\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// http://localhost:3000/flights/LAX-SFO\napp.Get("/flights/:from-:to", func(c *fiber.Ctx) error {\n fmt.Fprintf(c, "%s-%s\\n", c.Params("from"), c.Params("to"))\n return nil // LAX-SFO\n})\n')),(0,r.kt)("p",null,"Our intelligent router recognizes that the introductory parameter characters should be part of the request route in this case and can process them as such."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// http://localhost:3000/shop/product/color:blue/size:xs\napp.Get("/shop/product/color::color/size::size", func(c *fiber.Ctx) error {\n fmt.Fprintf(c, "%s:%s\\n", c.Params("color"), c.Params("size"))\n return nil // blue:xs\n})\n')),(0,r.kt)("p",null,"In addition, several parameters in a row and several unnamed parameter characters in the route, such as the wildcard or plus character, are possible, which greatly expands the possibilities of the router for the user."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// GET /@v1\n// Params: "sign" -> "@", "param" -> "v1"\napp.Get("/:sign:param", handler)\n\n// GET /api-v1\n// Params: "name" -> "v1" \napp.Get("/api-:name", handler)\n\n// GET /customer/v1/cart/proxy\n// Params: "*1" -> "customer/", "*2" -> "/cart"\napp.Get("/*v1*/proxy", handler)\n\n// GET /v1/brand/4/shop/blue/xs\n// Params: "*1" -> "brand/4", "*2" -> "blue/xs"\napp.Get("/v1/*/shop/*", handler)\n')),(0,r.kt)("p",null,"We have adapted the routing strongly to the express routing, but currently without the possibility of the regular expressions, because they are quite slow. The possibilities can be tested with version 0.1.7 ","(","express 4",")"," in the online ",(0,r.kt)("a",{parentName:"p",href:"http://forbeslindesay.github.io/express-route-tester/"},"Express route tester"),"."),(0,r.kt)("h3",{id:"constraints"},"Constraints"),(0,r.kt)("p",null,"Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values by parameters. The feature was intorduced in ",(0,r.kt)("inlineCode",{parentName:"p"},"v2.37.0")," and inspired by ",(0,r.kt)("a",{parentName:"p",href:"https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-6.0#route-constraints"},".NET Core"),"."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"Constraints aren't validation for parameters. If constraint aren't valid for parameter value, Fiber returns ",(0,r.kt)("strong",{parentName:"p"},"404 handler"),".")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Constraint"),(0,r.kt)("th",{parentName:"tr",align:null},"Example"),(0,r.kt)("th",{parentName:"tr",align:null},"Example matches"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"int"),(0,r.kt)("td",{parentName:"tr",align:null},":id"),(0,r.kt)("td",{parentName:"tr",align:null},"123456789, -123456789")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"bool"),(0,r.kt)("td",{parentName:"tr",align:null},":active"),(0,r.kt)("td",{parentName:"tr",align:null},"true,false")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"guid"),(0,r.kt)("td",{parentName:"tr",align:null},":id"),(0,r.kt)("td",{parentName:"tr",align:null},"CD2C1638-1638-72D5-1638-DEADBEEF1638")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"float"),(0,r.kt)("td",{parentName:"tr",align:null},":weight"),(0,r.kt)("td",{parentName:"tr",align:null},"1.234, -1,001.01e8")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"minLen(value)"),(0,r.kt)("td",{parentName:"tr",align:null},":username"),(0,r.kt)("td",{parentName:"tr",align:null},"Test (must be at least 4 characters)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"maxLen(value)"),(0,r.kt)("td",{parentName:"tr",align:null},":filename"),(0,r.kt)("td",{parentName:"tr",align:null},"MyFile (must be no more than 8 characters")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"len(length)"),(0,r.kt)("td",{parentName:"tr",align:null},":filename"),(0,r.kt)("td",{parentName:"tr",align:null},"somefile.txt (exactly 12 characters)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"min(value)"),(0,r.kt)("td",{parentName:"tr",align:null},":age"),(0,r.kt)("td",{parentName:"tr",align:null},"19 (Integer value must be at least 18)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"max(value)"),(0,r.kt)("td",{parentName:"tr",align:null},":age"),(0,r.kt)("td",{parentName:"tr",align:null},"91 (Integer value must be no more than 120)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"range(min,max)"),(0,r.kt)("td",{parentName:"tr",align:null},":age"),(0,r.kt)("td",{parentName:"tr",align:null},"91 (Integer value must be at least 18 but no more than 120)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"alpha"),(0,r.kt)("td",{parentName:"tr",align:null},":name"),(0,r.kt)("td",{parentName:"tr",align:null},"Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive)")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"datetime"),(0,r.kt)("td",{parentName:"tr",align:null},":dob"),(0,r.kt)("td",{parentName:"tr",align:null},"2005-11-01")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"regex(expression)"),(0,r.kt)("td",{parentName:"tr",align:null},":date"),(0,r.kt)("td",{parentName:"tr",align:null},"2022-08-27 (Must match regular expression)")))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Examples")),(0,r.kt)(o.Z,{mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"single-constraint",label:"Single Constraint",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/:test", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("test"))\n})\n\n// curl -X GET http://localhost:3000/12\n// 12\n\n// curl -X GET http://localhost:3000/1\n// Cannot GET /1\n'))),(0,r.kt)(l.Z,{value:"multiple-constraints",label:"Multiple Constraints",mdxType:"TabItem"},(0,r.kt)("p",null,"You can use ",(0,r.kt)("inlineCode",{parentName:"p"},";")," for multiple constraints."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/:test", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("test"))\n})\n\n// curl -X GET http://localhost:3000/120000\n// Cannot GET /120000\n\n// curl -X GET http://localhost:3000/1\n// Cannot GET /1\n\n// curl -X GET http://localhost:3000/250\n// 250\n'))),(0,r.kt)(l.Z,{value:"regex-constraint",label:"Regex Constraint",mdxType:"TabItem"},(0,r.kt)("p",null,"Fiber precompiles regex query when to register routes. So there're no performance overhead for regex constraint."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/:date", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("date"))\n})\n\n// curl -X GET http://localhost:3000/125\n// Cannot GET /125\n\n// curl -X GET http://localhost:3000/test\n// Cannot GET /test\n\n// curl -X GET http://localhost:3000/2022-08-27\n// 2022-08-27\n')))),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"You should use ",(0,r.kt)("inlineCode",{parentName:"p"},"\\\\")," before routing-specific characters when to use datetime constraint (",(0,r.kt)("inlineCode",{parentName:"p"},"*"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"+"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"?"),", ",(0,r.kt)("inlineCode",{parentName:"p"},":"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"/"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"<"),", ",(0,r.kt)("inlineCode",{parentName:"p"},">"),", ",(0,r.kt)("inlineCode",{parentName:"p"},";"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"("),", ",(0,r.kt)("inlineCode",{parentName:"p"},")"),"), to avoid wrong parsing.")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Optional Parameter Example")),(0,r.kt)("p",null,"You can impose constraints on optional parameters as well."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/:test?", func(c *fiber.Ctx) error {\n return c.SendString(c.Params("test"))\n})\n// curl -X GET http://localhost:3000/42\n// 42\n// curl -X GET http://localhost:3000/\n//\n// curl -X GET http://localhost:3000/7.0\n// Cannot GET /7.0\n')),(0,r.kt)("h2",{id:"middleware"},"Middleware"),(0,r.kt)("p",null,"Functions that are designed to make changes to the request or response are called ",(0,r.kt)("strong",{parentName:"p"},"middleware functions"),". The ",(0,r.kt)("a",{parentName:"p",href:"/api/ctx#next"},"Next")," is a ",(0,r.kt)("strong",{parentName:"p"},"Fiber")," router function, when called, executes the ",(0,r.kt)("strong",{parentName:"p"},"next")," function that ",(0,r.kt)("strong",{parentName:"p"},"matches")," the current route."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Example of a middleware function")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(func(c *fiber.Ctx) error {\n // Set a custom header on all responses:\n c.Set("X-Custom-Header", "Hello, World")\n\n // Go to next middleware:\n return c.Next()\n})\n\napp.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n})\n')),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Use")," method path is a ",(0,r.kt)("strong",{parentName:"p"},"mount"),", or ",(0,r.kt)("strong",{parentName:"p"},"prefix")," path, and limits middleware to only apply to any paths requested that begin with it."),(0,r.kt)("h2",{id:"grouping"},"Grouping"),(0,r.kt)("p",null,"If you have many endpoints, you can organize your routes using ",(0,r.kt)("inlineCode",{parentName:"p"},"Group"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api", middleware) // /api\n\n v1 := api.Group("/v1", middleware) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2", middleware) // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,r.kt)("p",null,"More information about this in our ",(0,r.kt)("a",{parentName:"p",href:"/guide/grouping"},"Grouping Guide")))}g.isMDXComponent=!0},6074:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var a=n(7462),r=(n(7294),n(3905));const o={id:"route-handlers",title:"Route Handlers"},l=void 0,i={unversionedId:"partials/routing/route-handlers",id:"version-v2.x/partials/routing/route-handlers",title:"Route Handlers",description:"Registers a route bound to a specific HTTP method.",source:"@site/versioned_docs/version-v2.x/partials/routing/handler.md",sourceDirName:"partials/routing",slug:"/partials/routing/route-handlers",permalink:"/partials/routing/route-handlers",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"route-handlers",title:"Route Handlers"}},s={},p=[],u={toc:p},c="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(c,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Registers a route bound to a specific ",(0,r.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods"},"HTTP method"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signatures"',title:'"Signatures"'},"// HTTP methods\nfunc (app *App) Get(path string, handlers ...Handler) Router\nfunc (app *App) Head(path string, handlers ...Handler) Router\nfunc (app *App) Post(path string, handlers ...Handler) Router\nfunc (app *App) Put(path string, handlers ...Handler) Router\nfunc (app *App) Delete(path string, handlers ...Handler) Router\nfunc (app *App) Connect(path string, handlers ...Handler) Router\nfunc (app *App) Options(path string, handlers ...Handler) Router\nfunc (app *App) Trace(path string, handlers ...Handler) Router\nfunc (app *App) Patch(path string, handlers ...Handler) Router\n\n// Add allows you to specifiy a method as value\nfunc (app *App) Add(method, path string, handlers ...Handler) Router\n\n// All will register the route on all HTTP methods\n// Almost the same as app.Use but not bound to prefixes\nfunc (app *App) All(path string, handlers ...Handler) Router\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Simple GET handler\napp.Get("/api/list", func(c *fiber.Ctx) error {\n return c.SendString("I\'m a GET request!")\n})\n\n// Simple POST handler\napp.Post("/api/register", func(c *fiber.Ctx) error {\n return c.SendString("I\'m a POST request!")\n})\n')),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Use")," can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. ",(0,r.kt)("inlineCode",{parentName:"p"},"/john")," will match ",(0,r.kt)("inlineCode",{parentName:"p"},"/john/doe"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"/johnnnnn")," etc"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Use(args ...interface{}) Router\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Match any request\napp.Use(func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Match request starting with /api\napp.Use("/api", func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Match requests starting with /api or /home (multiple-prefix support)\napp.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Attach multiple handlers \napp.Use("/api", func(c *fiber.Ctx) error {\n c.Set("X-Custom-Header", random.String(32))\n return c.Next()\n}, func(c *fiber.Ctx) error {\n return c.Next()\n})\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/41a8a410.11a8fa24.js b/assets/js/41a8a410.11a8fa24.js deleted file mode 100644 index 9b4a036c21d..00000000000 --- a/assets/js/41a8a410.11a8fa24.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6948],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>c});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var g=n.createContext({}),p=function(e){var t=n.useContext(g),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=p(e.components);return n.createElement(g.Provider,{value:t},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,g=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),s=p(r),m=a,c=s["".concat(g,".").concat(m)]||s[m]||f[m]||o;return r?n.createElement(c,i(i({ref:t},d),{},{components:r})):n.createElement(c,i({ref:t},d))}));function c(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var l={};for(var g in t)hasOwnProperty.call(t,g)&&(l[g]=t[g]);l.originalType=e,l[s]="string"==typeof e?e:a,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(7462),a=(r(7294),r(3905));const o={id:"fiberzerolog",title:"Fiberzerolog"},i=void 0,l={unversionedId:"fiberzerolog/fiberzerolog",id:"version-fibersentry_v1.x.x/fiberzerolog/fiberzerolog",title:"Fiberzerolog",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/fiberzerolog/README.md",sourceDirName:"fiberzerolog",slug:"/fiberzerolog/",permalink:"/contrib/fibersentry_v1.x.x/fiberzerolog/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fiberzerolog/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fiberzerolog",title:"Fiberzerolog"},sidebar:"tutorialSidebar",previous:{title:"Fiberzap",permalink:"/contrib/fibersentry_v1.x.x/fiberzap/"},next:{title:"JWT",permalink:"/contrib/fibersentry_v1.x.x/jwt/"}},g={},p=[{value:"Install",id:"install",level:2},{value:"Signature",id:"signature",level:2},{value:"Config",id:"config",level:2},{value:"Example",id:"example",level:2}],d={toc:p},s="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(s,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fiberzerolog*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://zerolog.io/"},"Zerolog")," logging support for Fiber."),(0,a.kt)("h2",{id:"install"},"Install"),(0,a.kt)("p",null,"This middleware supports Fiber v2."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fiberzerolog\ngo get -u github.com/rs/zerolog/log\n")),(0,a.kt)("h2",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"fiberzerolog.New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Next"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*Ctx) bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Define a function to skip this middleware when returned true"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Logger"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"*zerolog.Logger")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Add custom zerolog logger."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"zerolog.New(os.Stderr).With().Timestamp().Logger()"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"GetLogger"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) zerolog.Logger")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Get custom zerolog logger, if it's defined the returned logger will replace the ",(0,a.kt)("inlineCode",{parentName:"td"},"Logger")," value."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Fields"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Add fields what you want see."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'[]string{"latency", "status", "method", "url", "error"}'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Messages"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Custom response messages."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'[]string{"Server error", "Client error", "Success"}'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Levels"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]zerolog.Level")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Custom response levels."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel}"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SkipURIs"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Skip logging these URI."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string{}"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"GetResBody"),(0,a.kt)("td",{parentName:"tr",align:"left"},"func(c *fiber.Ctx) []byte"),(0,a.kt)("td",{parentName:"tr",align:"left"},"Define a function to get response body when return non-nil.",(0,a.kt)("br",null),"eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))))),(0,a.kt)("h2",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/fiberzerolog"\n "github.com/rs/zerolog"\n)\n\nfunc main() {\n app := fiber.New()\n logger := zerolog.New(os.Stderr).With().Timestamp().Logger()\n\n app.Use(fiberzerolog.New(fiberzerolog.Config{\n Logger: &logger,\n }))\n\n app.Get("/", func (c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n })\n\n if err := app.Listen(":3000"); err != nil {\n logger.Fatal().Err(err).Msg("Fiber app error")\n }\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/41a8a410.f675ea4b.js b/assets/js/41a8a410.f675ea4b.js new file mode 100644 index 00000000000..c4c0b42b964 --- /dev/null +++ b/assets/js/41a8a410.f675ea4b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6948],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>c});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var g=n.createContext({}),p=function(e){var t=n.useContext(g),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=p(e.components);return n.createElement(g.Provider,{value:t},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,g=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),s=p(r),m=a,c=s["".concat(g,".").concat(m)]||s[m]||f[m]||o;return r?n.createElement(c,i(i({ref:t},d),{},{components:r})):n.createElement(c,i({ref:t},d))}));function c(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var l={};for(var g in t)hasOwnProperty.call(t,g)&&(l[g]=t[g]);l.originalType=e,l[s]="string"==typeof e?e:a,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>g,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(87462),a=(r(67294),r(3905));const o={id:"fiberzerolog",title:"Fiberzerolog"},i=void 0,l={unversionedId:"fiberzerolog/fiberzerolog",id:"version-fibersentry_v1.x.x/fiberzerolog/fiberzerolog",title:"Fiberzerolog",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/fiberzerolog/README.md",sourceDirName:"fiberzerolog",slug:"/fiberzerolog/",permalink:"/contrib/fibersentry_v1.x.x/fiberzerolog/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fiberzerolog/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fiberzerolog",title:"Fiberzerolog"},sidebar:"tutorialSidebar",previous:{title:"Fiberzap",permalink:"/contrib/fibersentry_v1.x.x/fiberzap/"},next:{title:"JWT",permalink:"/contrib/fibersentry_v1.x.x/jwt/"}},g={},p=[{value:"Install",id:"install",level:2},{value:"Signature",id:"signature",level:2},{value:"Config",id:"config",level:2},{value:"Example",id:"example",level:2}],d={toc:p},s="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(s,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fiberzerolog*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://zerolog.io/"},"Zerolog")," logging support for Fiber."),(0,a.kt)("h2",{id:"install"},"Install"),(0,a.kt)("p",null,"This middleware supports Fiber v2."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fiberzerolog\ngo get -u github.com/rs/zerolog/log\n")),(0,a.kt)("h2",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"fiberzerolog.New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Next"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*Ctx) bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Define a function to skip this middleware when returned true"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Logger"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"*zerolog.Logger")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Add custom zerolog logger."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"zerolog.New(os.Stderr).With().Timestamp().Logger()"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"GetLogger"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func(*fiber.Ctx) zerolog.Logger")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Get custom zerolog logger, if it's defined the returned logger will replace the ",(0,a.kt)("inlineCode",{parentName:"td"},"Logger")," value."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Fields"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Add fields what you want see."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'[]string{"latency", "status", "method", "url", "error"}'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Messages"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Custom response messages."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'[]string{"Server error", "Client error", "Success"}'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"Levels"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]zerolog.Level")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Custom response levels."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel}"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"SkipURIs"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Skip logging these URI."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string{}"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"GetResBody"),(0,a.kt)("td",{parentName:"tr",align:"left"},"func(c *fiber.Ctx) []byte"),(0,a.kt)("td",{parentName:"tr",align:"left"},"Define a function to get response body when return non-nil.",(0,a.kt)("br",null),"eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody."),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"nil"))))),(0,a.kt)("h2",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/fiberzerolog"\n "github.com/rs/zerolog"\n)\n\nfunc main() {\n app := fiber.New()\n logger := zerolog.New(os.Stderr).With().Timestamp().Logger()\n\n app.Use(fiberzerolog.New(fiberzerolog.Config{\n Logger: &logger,\n }))\n\n app.Get("/", func (c *fiber.Ctx) error {\n return c.SendString("Hello, World!")\n })\n\n if err := app.Listen(":3000"); err != nil {\n logger.Fatal().Err(err).Msg("Fiber app error")\n }\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/420bbee2.06d1dbd7.js b/assets/js/420bbee2.06d1dbd7.js new file mode 100644 index 00000000000..b19fa9cbde3 --- /dev/null +++ b/assets/js/420bbee2.06d1dbd7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8261],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(n),g=r,m=c["".concat(s,".").concat(g)]||c[g]||f[g]||i;return n?a.createElement(m,o(o({ref:t},u),{},{components:n})):a.createElement(m,o({ref:t},u))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:r,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const i={id:"sqlite3",title:"SQLite3"},o=void 0,l={unversionedId:"sqlite3/sqlite3",id:"version-ristretto_v1.x.x/sqlite3/sqlite3",title:"SQLite3",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/sqlite3/README.md",sourceDirName:"sqlite3",slug:"/sqlite3/",permalink:"/storage/ristretto_v1.x.x/sqlite3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/sqlite3/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"sqlite3",title:"SQLite3"},sidebar:"tutorialSidebar",previous:{title:"S3",permalink:"/storage/ristretto_v1.x.x/s3/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:p},c="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(c,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=sqlite3*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A SQLite3 storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/mattn/go-sqlite3"},"mattn/go-sqlite3"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"SQLite3 is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the sqlite3 implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/sqlite3\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/sqlite3"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := sqlite3.New()\n\n// Initialize custom config\nstore := sqlite3.New(sqlite3.Config{\n Database: "./fiber.sqlite3",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n MaxOpenConns: 100,\n MaxIdleConns: 100,\n ConnMaxLifetime: 1 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // //////////////////////////////////\n // Adaptor related config options //\n // //////////////////////////////////\n\n // MaxIdleConns sets the maximum number of connections in the idle connection pool.\n //\n // Optional. Default is 100.\n MaxIdleConns int\n\n // MaxOpenConns sets the maximum number of open connections to the database.\n //\n // Optional. Default is 100.\n MaxOpenConns int\n\n // ConnMaxLifetime sets the maximum amount of time a connection may be reused.\n //\n // Optional. Default is 1 second.\n ConnMaxLifetime time.Duration\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Database: "./fiber.sqlite3",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n MaxOpenConns: 100,\n MaxIdleConns: 100,\n ConnMaxLifetime: 1 * time.Second,\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/420bbee2.247cb8eb.js b/assets/js/420bbee2.247cb8eb.js deleted file mode 100644 index 46b8df398c5..00000000000 --- a/assets/js/420bbee2.247cb8eb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8261],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(n),g=r,m=c["".concat(s,".").concat(g)]||c[g]||f[g]||i;return n?a.createElement(m,o(o({ref:t},u),{},{components:n})):a.createElement(m,o({ref:t},u))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:r,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var a=n(7462),r=(n(7294),n(3905));const i={id:"sqlite3",title:"SQLite3"},o=void 0,l={unversionedId:"sqlite3/sqlite3",id:"version-ristretto_v1.x.x/sqlite3/sqlite3",title:"SQLite3",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/sqlite3/README.md",sourceDirName:"sqlite3",slug:"/sqlite3/",permalink:"/storage/ristretto_v1.x.x/sqlite3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/sqlite3/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"sqlite3",title:"SQLite3"},sidebar:"tutorialSidebar",previous:{title:"S3",permalink:"/storage/ristretto_v1.x.x/s3/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:p},c="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(c,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=sqlite3*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A SQLite3 storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/mattn/go-sqlite3"},"mattn/go-sqlite3"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"SQLite3 is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the sqlite3 implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/sqlite3\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/sqlite3"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := sqlite3.New()\n\n// Initialize custom config\nstore := sqlite3.New(sqlite3.Config{\n Database: "./fiber.sqlite3",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n MaxOpenConns: 100,\n MaxIdleConns: 100,\n ConnMaxLifetime: 1 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n\n // //////////////////////////////////\n // Adaptor related config options //\n // //////////////////////////////////\n\n // MaxIdleConns sets the maximum number of connections in the idle connection pool.\n //\n // Optional. Default is 100.\n MaxIdleConns int\n\n // MaxOpenConns sets the maximum number of open connections to the database.\n //\n // Optional. Default is 100.\n MaxOpenConns int\n\n // ConnMaxLifetime sets the maximum amount of time a connection may be reused.\n //\n // Optional. Default is 1 second.\n ConnMaxLifetime time.Duration\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Database: "./fiber.sqlite3",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n MaxOpenConns: 100,\n MaxIdleConns: 100,\n ConnMaxLifetime: 1 * time.Second,\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/447fdb90.725bf4b3.js b/assets/js/447fdb90.725bf4b3.js deleted file mode 100644 index 0ff14778310..00000000000 --- a/assets/js/447fdb90.725bf4b3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7811],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>h});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var m=n.createContext({}),s=function(e){var t=n.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return n.createElement(m.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,m=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=s(a),u=r,h=c["".concat(m,".").concat(u)]||c[u]||g[u]||i;return a?n.createElement(h,l(l({ref:t},p),{},{components:a})):n.createElement(h,l({ref:t},p))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=u;var o={};for(var m in t)hasOwnProperty.call(t,m)&&(o[m]=t[m]);o.originalType=e,o[c]="string"==typeof e?e:r,l[1]=o;for(var s=2;s{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var n=a(7462),r=(a(7294),a(3905));const i={title:"\ud83d\udc4b Welcome",description:"\ud83e\uddec Template engine middlewares for Fiber.",sidebar_position:1},l=void 0,o={unversionedId:"README",id:"version-slim_v2.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83e\uddec Template engine middlewares for Fiber.",source:"@site/template_versioned_docs/version-slim_v2.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/template/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/README.md",tags:[],version:"slim_v2.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83e\uddec Template engine middlewares for Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"Ace",permalink:"/template/ace/"}},m={},s=[{value:"Installation",id:"installation",level:3},{value:"Example",id:"example",level:3},{value:"More Examples",id:"more-examples",level:3},{value:"embedded Systems",id:"embedded-systems",level:3},{value:"pkger",id:"pkger",level:4},{value:"packr",id:"packr",level:4},{value:"go.rice",id:"gorice",level:4},{value:"fileb0x",id:"fileb0x",level:4},{value:"Benchmarks",id:"benchmarks",level:3},{value:"Simple",id:"simple",level:4},{value:"Extended",id:"extended",level:4}],p={toc:s},c="wrapper";function g(e){let{components:t,...a}=e;return(0,r.kt)(c,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",{align:"center"},(0,r.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/template/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,r.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/template/master/.github/logo.svg#gh-light-mode-only"}),(0,r.kt)("br",null),(0,r.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/template?tab=doc"},(0,r.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,r.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/template"},(0,r.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,r.kt)("a",{href:"https://gofiber.io/discord"},(0,r.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,r.kt)("p",null,"This package provides universal methods to use multiple template engines with the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber web framework")," using the new ",(0,r.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/gofiber/fiber#Views"},"Views")," interface that is available from ",(0,r.kt)("inlineCode",{parentName:"p"},"> v1.11.1"),". Special thanks to @bdtomlin & @arsmn for helping!"),(0,r.kt)("p",null,"9 template engines are supported:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/ace/"},"ace")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Ace%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-ace.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))," "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/amber/"},"amber")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Amber%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-amber.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/django/"},"django")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Django%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-django.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))," "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/handlebars/"},"handlebars")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Handlebars%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-handlebars.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/html/"},"html")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Html%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-html.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/jet/"},"jet")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Jet%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-jet.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/mustache/"},"mustache")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Mustache%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-mustache.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/pug/"},"pug")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Pug%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-pug.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/slim/"},"slim")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Slim%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-slim.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})))),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Go version ",(0,r.kt)("inlineCode",{parentName:"p"},"1.17")," or higher is required.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/template/any_template_engine/vX\n")),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n\n // To use a specific template engine, import as shown below:\n // "github.com/gofiber/template/pug"\n // "github.com/gofiber/template/mustache"\n // etc..\n\n // In this example we use the html template engine\n "github.com/gofiber/template/html/v2"\n)\n\nfunc main() {\n // Create a new engine by passing the template folder\n // and template extension using .New(dir, ext string)\n engine := html.New("./views", ".html")\n\n // We also support the http.FileSystem interface\n // See examples below to load templates from embedded files\n engine := html.NewFileSystem(http.Dir("./views"), ".html")\n\n // Reload the templates on each render, good for development\n engine.Reload(true) // Optional. Default: false\n\n // Debug will print each template that is parsed, good for debugging\n engine.Debug(true) // Optional. Default: false\n\n // Layout defines the variable name that is used to yield templates within layouts\n engine.Layout("embed") // Optional. Default: "embed"\n\n // Delims sets the action delimiters to the specified strings\n engine.Delims("{{", "}}") // Optional. Default: engine delimiters\n\n // AddFunc adds a function to the template\'s global function map.\n engine.AddFunc("greet", func(name string) string {\n return "Hello, " + name + "!"\n })\n\n // After you created your engine, you can pass it to Fiber\'s Views Engine\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n // To render a template, you can call the ctx.Render function\n // Render(tmpl string, values interface{}, layout ...string)\n app.Get("/", func(c *fiber.Ctx) error {\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n // Render with layout example\n app.Get("/layout", func(c *fiber.Ctx) error {\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')),(0,r.kt)("h3",{id:"more-examples"},"More Examples"),(0,r.kt)("p",null,"To view more specific examples, you could visit each engine folder to learn more"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/ace/"},"ace")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/amber/"},"amber")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/django/"},"django")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/handlebars/"},"handlebars")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/html/"},"html")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/jet/"},"jet")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/mustache/"},"mustache")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/pug/"},"pug")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/slim/"},"slim"))),(0,r.kt)("h3",{id:"embedded-systems"},"embedded Systems"),(0,r.kt)("p",null,"We support the ",(0,r.kt)("inlineCode",{parentName:"p"},"http.FileSystem")," interface, so you can use different libraries to load the templates from embedded binaries."),(0,r.kt)("h4",{id:"pkger"},"pkger"),(0,r.kt)("p",null,"Read documentation: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/markbates/pkger"},"https://github.com/markbates/pkger")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/html"\n\n "github.com/markbates/pkger"\n)\n\nfunc main() {\n engine := html.NewFileSystem(pkger.Dir("/views"), ".html")\n\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n // run pkger && go build\n}\n')),(0,r.kt)("h4",{id:"packr"},"packr"),(0,r.kt)("p",null,"Read documentation: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/gobuffalo/packr"},"https://github.com/gobuffalo/packr")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/html"\n\n "github.com/gobuffalo/packr/v2"\n)\n\nfunc main() {\n engine := html.NewFileSystem(packr.New("Templates", "/views"), ".html")\n\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n // run packr && go build\n}\n')),(0,r.kt)("h4",{id:"gorice"},"go.rice"),(0,r.kt)("p",null,"Read documentation: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/GeertJohan/go.rice"},"https://github.com/GeertJohan/go.rice")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/html"\n\n "github.com/GeertJohan/go.rice"\n)\n\nfunc main() {\n engine := html.NewFileSystem(rice.MustFindBox("views").HTTPBox(), ".html")\n\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n // run rice embed-go && go build\n}\n\n')),(0,r.kt)("h4",{id:"fileb0x"},"fileb0x"),(0,r.kt)("p",null,"Read documentation: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/UnnoTed/fileb0x"},"https://github.com/UnnoTed/fileb0x")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/html"\n // your generated package\n "github.com///static"\n)\n\nfunc main() {\n engine := html.NewFileSystem(static.HTTP, ".html")\n\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n // Read the documentation on how to use fileb0x\n}\n')),(0,r.kt)("h3",{id:"benchmarks"},"Benchmarks"),(0,r.kt)("h4",{id:"simple"},"Simple"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://raw.githubusercontent.com/gofiber/template/master/.github/data/Simple-TimeperOperation.png",alt:null})),(0,r.kt)("h4",{id:"extended"},"Extended"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://raw.githubusercontent.com/gofiber/template/master/.github/data/Extended-TimeperOperation.png",alt:null})),(0,r.kt)("p",null,"Benchmarks were ran on Apple Macbook M1. Each engine was benchmarked 20 times and the results averaged into a single xlsx file. Mustache was excluded from the extended benchmark"))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/447fdb90.eed853fd.js b/assets/js/447fdb90.eed853fd.js new file mode 100644 index 00000000000..99d38248927 --- /dev/null +++ b/assets/js/447fdb90.eed853fd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7811],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>h});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var m=n.createContext({}),s=function(e){var t=n.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=s(e.components);return n.createElement(m.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,m=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=s(a),u=r,h=c["".concat(m,".").concat(u)]||c[u]||g[u]||i;return a?n.createElement(h,l(l({ref:t},p),{},{components:a})):n.createElement(h,l({ref:t},p))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=u;var o={};for(var m in t)hasOwnProperty.call(t,m)&&(o[m]=t[m]);o.originalType=e,o[c]="string"==typeof e?e:r,l[1]=o;for(var s=2;s{a.r(t),a.d(t,{assets:()=>m,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var n=a(87462),r=(a(67294),a(3905));const i={title:"\ud83d\udc4b Welcome",description:"\ud83e\uddec Template engine middlewares for Fiber.",sidebar_position:1},l=void 0,o={unversionedId:"README",id:"version-slim_v2.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83e\uddec Template engine middlewares for Fiber.",source:"@site/template_versioned_docs/version-slim_v2.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/template/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/README.md",tags:[],version:"slim_v2.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83e\uddec Template engine middlewares for Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"Ace",permalink:"/template/ace/"}},m={},s=[{value:"Installation",id:"installation",level:3},{value:"Example",id:"example",level:3},{value:"More Examples",id:"more-examples",level:3},{value:"embedded Systems",id:"embedded-systems",level:3},{value:"pkger",id:"pkger",level:4},{value:"packr",id:"packr",level:4},{value:"go.rice",id:"gorice",level:4},{value:"fileb0x",id:"fileb0x",level:4},{value:"Benchmarks",id:"benchmarks",level:3},{value:"Simple",id:"simple",level:4},{value:"Extended",id:"extended",level:4}],p={toc:s},c="wrapper";function g(e){let{components:t,...a}=e;return(0,r.kt)(c,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",{align:"center"},(0,r.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/template/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,r.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/template/master/.github/logo.svg#gh-light-mode-only"}),(0,r.kt)("br",null),(0,r.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/template?tab=doc"},(0,r.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,r.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/template"},(0,r.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,r.kt)("a",{href:"https://gofiber.io/discord"},(0,r.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,r.kt)("p",null,"This package provides universal methods to use multiple template engines with the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber web framework")," using the new ",(0,r.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/gofiber/fiber#Views"},"Views")," interface that is available from ",(0,r.kt)("inlineCode",{parentName:"p"},"> v1.11.1"),". Special thanks to @bdtomlin & @arsmn for helping!"),(0,r.kt)("p",null,"9 template engines are supported:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/ace/"},"ace")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Ace%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-ace.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))," "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/amber/"},"amber")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Amber%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-amber.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/django/"},"django")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Django%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-django.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))," "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/handlebars/"},"handlebars")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Handlebars%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-handlebars.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/html/"},"html")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Html%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-html.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/jet/"},"jet")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Jet%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-jet.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/mustache/"},"mustache")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Mustache%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-mustache.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/pug/"},"pug")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Pug%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-pug.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/slim/"},"slim")," ",(0,r.kt)("a",{href:"https://github.com/gofiber/template/actions?query=workflow%3A%22Tests+Slim%22"}," ",(0,r.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/template/test-slim.yml?branch=master&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})))),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Go version ",(0,r.kt)("inlineCode",{parentName:"p"},"1.17")," or higher is required.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/template/any_template_engine/vX\n")),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n\n // To use a specific template engine, import as shown below:\n // "github.com/gofiber/template/pug"\n // "github.com/gofiber/template/mustache"\n // etc..\n\n // In this example we use the html template engine\n "github.com/gofiber/template/html/v2"\n)\n\nfunc main() {\n // Create a new engine by passing the template folder\n // and template extension using .New(dir, ext string)\n engine := html.New("./views", ".html")\n\n // We also support the http.FileSystem interface\n // See examples below to load templates from embedded files\n engine := html.NewFileSystem(http.Dir("./views"), ".html")\n\n // Reload the templates on each render, good for development\n engine.Reload(true) // Optional. Default: false\n\n // Debug will print each template that is parsed, good for debugging\n engine.Debug(true) // Optional. Default: false\n\n // Layout defines the variable name that is used to yield templates within layouts\n engine.Layout("embed") // Optional. Default: "embed"\n\n // Delims sets the action delimiters to the specified strings\n engine.Delims("{{", "}}") // Optional. Default: engine delimiters\n\n // AddFunc adds a function to the template\'s global function map.\n engine.AddFunc("greet", func(name string) string {\n return "Hello, " + name + "!"\n })\n\n // After you created your engine, you can pass it to Fiber\'s Views Engine\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n // To render a template, you can call the ctx.Render function\n // Render(tmpl string, values interface{}, layout ...string)\n app.Get("/", func(c *fiber.Ctx) error {\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n // Render with layout example\n app.Get("/layout", func(c *fiber.Ctx) error {\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')),(0,r.kt)("h3",{id:"more-examples"},"More Examples"),(0,r.kt)("p",null,"To view more specific examples, you could visit each engine folder to learn more"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/ace/"},"ace")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/amber/"},"amber")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/django/"},"django")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/handlebars/"},"handlebars")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/html/"},"html")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/jet/"},"jet")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/mustache/"},"mustache")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/pug/"},"pug")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/template/slim/"},"slim"))),(0,r.kt)("h3",{id:"embedded-systems"},"embedded Systems"),(0,r.kt)("p",null,"We support the ",(0,r.kt)("inlineCode",{parentName:"p"},"http.FileSystem")," interface, so you can use different libraries to load the templates from embedded binaries."),(0,r.kt)("h4",{id:"pkger"},"pkger"),(0,r.kt)("p",null,"Read documentation: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/markbates/pkger"},"https://github.com/markbates/pkger")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/html"\n\n "github.com/markbates/pkger"\n)\n\nfunc main() {\n engine := html.NewFileSystem(pkger.Dir("/views"), ".html")\n\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n // run pkger && go build\n}\n')),(0,r.kt)("h4",{id:"packr"},"packr"),(0,r.kt)("p",null,"Read documentation: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/gobuffalo/packr"},"https://github.com/gobuffalo/packr")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/html"\n\n "github.com/gobuffalo/packr/v2"\n)\n\nfunc main() {\n engine := html.NewFileSystem(packr.New("Templates", "/views"), ".html")\n\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n // run packr && go build\n}\n')),(0,r.kt)("h4",{id:"gorice"},"go.rice"),(0,r.kt)("p",null,"Read documentation: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/GeertJohan/go.rice"},"https://github.com/GeertJohan/go.rice")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/html"\n\n "github.com/GeertJohan/go.rice"\n)\n\nfunc main() {\n engine := html.NewFileSystem(rice.MustFindBox("views").HTTPBox(), ".html")\n\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n // run rice embed-go && go build\n}\n\n')),(0,r.kt)("h4",{id:"fileb0x"},"fileb0x"),(0,r.kt)("p",null,"Read documentation: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/UnnoTed/fileb0x"},"https://github.com/UnnoTed/fileb0x")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/html"\n // your generated package\n "github.com///static"\n)\n\nfunc main() {\n engine := html.NewFileSystem(static.HTTP, ".html")\n\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n // Read the documentation on how to use fileb0x\n}\n')),(0,r.kt)("h3",{id:"benchmarks"},"Benchmarks"),(0,r.kt)("h4",{id:"simple"},"Simple"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://raw.githubusercontent.com/gofiber/template/master/.github/data/Simple-TimeperOperation.png",alt:null})),(0,r.kt)("h4",{id:"extended"},"Extended"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://raw.githubusercontent.com/gofiber/template/master/.github/data/Extended-TimeperOperation.png",alt:null})),(0,r.kt)("p",null,"Benchmarks were ran on Apple Macbook M1. Each engine was benchmarked 20 times and the results averaged into a single xlsx file. Mustache was excluded from the extended benchmark"))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/45741516.32f088d1.js b/assets/js/45741516.32f088d1.js new file mode 100644 index 00000000000..97c342b4c37 --- /dev/null +++ b/assets/js/45741516.32f088d1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6661],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>u});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),d=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=d(n),g=a,u=c["".concat(p,".").concat(g)]||c[g]||f[g]||i;return n?r.createElement(u,o(o({ref:t},s),{},{components:n})):r.createElement(u,o({ref:t},s))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=g;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var r=n(87462),a=(n(67294),n(3905));const i={id:"opafiber",title:"Opafiber"},o=void 0,l={unversionedId:"opafiber/opafiber",id:"version-swagger_v1.x.x/opafiber/opafiber",title:"Opafiber",description:"Release",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/opafiber/README.md",sourceDirName:"opafiber",slug:"/opafiber/",permalink:"/contrib/swagger_v1.x.x/opafiber/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/opafiber/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"opafiber",title:"Opafiber"},sidebar:"tutorialSidebar",previous:{title:"JWT",permalink:"/contrib/swagger_v1.x.x/jwt/"},next:{title:"Otelfiber",permalink:"/contrib/swagger_v1.x.x/otelfiber/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Types",id:"types",level:3},{value:"Usage",id:"usage",level:3}],s={toc:d},c="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=opafiber*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/open-policy-agent/opa"},"Open Policy Agent")," support for Fiber."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note: Requires Go 1.18 and above")),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/opafiber\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"opafiber.New(config opafiber.Config) fiber.Handler\n\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"RegoQuery"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Required - Rego query"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"RegoPolicy"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"io.Reader")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Required - Rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"IncludeQueryString"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Include query string as input to rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"false"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"DeniedStatusCode"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"int")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Http status code to return when policy denies request"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"400"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"DeniedResponseMessage"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Http response body text to return when policy denies request"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'""'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"IncludeHeaders"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Include headers as input to rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"InputCreationMethod"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"InputCreationFunc")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Use your own function to provide input for OPA"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)"))))),(0,a.kt)("h3",{id:"types"},"Types"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)\n")),(0,a.kt)("h3",{id:"usage"},"Usage"),(0,a.kt)("p",null,"OPA Fiber middleware sends the following example data to the policy engine as input:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "method": "GET",\n "path": "/somePath",\n "query": {\n "name": ["John Doe"]\n },\n "headers": {\n "Accept": "application/json",\n "Content-Type": "application/json"\n }\n}\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/opafiber"\n)\n\nfunc main() {\n app := fiber.New()\n module := `\npackage example.authz\n\ndefault allow := false\n\nallow {\n input.method == "GET"\n}\n`\n\n cfg := opafiber.Config{\n RegoQuery: "data.example.authz.allow",\n RegoPolicy: bytes.NewBufferString(module),\n IncludeQueryString: true,\n DeniedStatusCode: fiber.StatusForbidden,\n DeniedResponseMessage: "status forbidden",\n IncludeHeaders: []string{"Authorization"},\n InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {\n return map[string]interface{}{\n "method": ctx.Method(),\n "path": ctx.Path(),\n }, nil\n },\n }\n app.Use(opafiber.New(cfg))\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendStatus(200)\n })\n\n app.Listen(":8080")\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/45741516.e5688147.js b/assets/js/45741516.e5688147.js deleted file mode 100644 index 818f281064f..00000000000 --- a/assets/js/45741516.e5688147.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6661],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>u});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),d=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=d(n),g=a,u=c["".concat(p,".").concat(g)]||c[g]||f[g]||i;return n?r.createElement(u,o(o({ref:t},s),{},{components:n})):r.createElement(u,o({ref:t},s))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=g;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var r=n(7462),a=(n(7294),n(3905));const i={id:"opafiber",title:"Opafiber"},o=void 0,l={unversionedId:"opafiber/opafiber",id:"version-swagger_v1.x.x/opafiber/opafiber",title:"Opafiber",description:"Release",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/opafiber/README.md",sourceDirName:"opafiber",slug:"/opafiber/",permalink:"/contrib/swagger_v1.x.x/opafiber/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/opafiber/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"opafiber",title:"Opafiber"},sidebar:"tutorialSidebar",previous:{title:"JWT",permalink:"/contrib/swagger_v1.x.x/jwt/"},next:{title:"Otelfiber",permalink:"/contrib/swagger_v1.x.x/otelfiber/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Types",id:"types",level:3},{value:"Usage",id:"usage",level:3}],s={toc:d},c="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=opafiber*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/open-policy-agent/opa"},"Open Policy Agent")," support for Fiber."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note: Requires Go 1.18 and above")),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/opafiber\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"opafiber.New(config opafiber.Config) fiber.Handler\n\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"RegoQuery"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Required - Rego query"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"RegoPolicy"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"io.Reader")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Required - Rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"IncludeQueryString"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Include query string as input to rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"false"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"DeniedStatusCode"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"int")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Http status code to return when policy denies request"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"400"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"DeniedResponseMessage"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Http response body text to return when policy denies request"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'""'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"IncludeHeaders"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Include headers as input to rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"InputCreationMethod"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"InputCreationFunc")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Use your own function to provide input for OPA"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)"))))),(0,a.kt)("h3",{id:"types"},"Types"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)\n")),(0,a.kt)("h3",{id:"usage"},"Usage"),(0,a.kt)("p",null,"OPA Fiber middleware sends the following example data to the policy engine as input:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "method": "GET",\n "path": "/somePath",\n "query": {\n "name": ["John Doe"]\n },\n "headers": {\n "Accept": "application/json",\n "Content-Type": "application/json"\n }\n}\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/opafiber"\n)\n\nfunc main() {\n app := fiber.New()\n module := `\npackage example.authz\n\ndefault allow := false\n\nallow {\n input.method == "GET"\n}\n`\n\n cfg := opafiber.Config{\n RegoQuery: "data.example.authz.allow",\n RegoPolicy: bytes.NewBufferString(module),\n IncludeQueryString: true,\n DeniedStatusCode: fiber.StatusForbidden,\n DeniedResponseMessage: "status forbidden",\n IncludeHeaders: []string{"Authorization"},\n InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {\n return map[string]interface{}{\n "method": ctx.Method(),\n "path": ctx.Path(),\n }, nil\n },\n }\n app.Use(opafiber.New(cfg))\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendStatus(200)\n })\n\n app.Listen(":8080")\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/460afb67.5b9aabd7.js b/assets/js/460afb67.5b9aabd7.js new file mode 100644 index 00000000000..13e28af99ab --- /dev/null +++ b/assets/js/460afb67.5b9aabd7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[184],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},g="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),g=u(n),f=a,m=g["".concat(l,".").concat(f)]||g[f]||p[f]||i;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[g]="string"==typeof e?e:a,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>u});var r=n(87462),a=(n(67294),n(3905));const i={id:"s3",title:"S3"},o=void 0,s={unversionedId:"s3/s3",id:"version-bbolt_v1.x.x/s3/s3",title:"S3",description:"Release",source:"@site/storage_versioned_docs/version-bbolt_v1.x.x/s3/README.md",sourceDirName:"s3",slug:"/s3/",permalink:"/storage/s3/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/s3/README.md",tags:[],version:"bbolt_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"s3",title:"S3"},sidebar:"tutorialSidebar",previous:{title:"Ristretto",permalink:"/storage/ristretto/"},next:{title:"SQLite3",permalink:"/storage/sqlite3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},g="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(g,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=s3*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A S3 storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,a.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *s3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"S3 is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the s3 implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/s3\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/s3"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := s3.New()\n\n// Initialize custom config\nstore := s3.New(s3.Config{\n Bucket: "my-bucket-url",\n Endpoint: "my-endpoint",\n Region: "my-region",\n Reset: false,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for storage.\ntype Config struct {\n // S3 bucket name\n Bucket string\n\n // AWS endpoint\n Endpoint string\n\n // AWS region\n Region string\n\n // Request timeout\n //\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("p",null,"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Bucket: "",\n Region: "",\n Endpoint: "",\n Credentials: Credentials{},\n MaxAttempts: 3,\n RequestTimeout: 0,\n Reset: false,\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/46e18ecb.2382ce98.js b/assets/js/46e18ecb.2382ce98.js deleted file mode 100644 index 6b1f1f34da8..00000000000 --- a/assets/js/46e18ecb.2382ce98.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8374],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},b=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(r),b=a,f=c["".concat(s,".").concat(b)]||c[b]||g[b]||o;return r?n.createElement(f,i(i({ref:t},u),{},{components:r})):n.createElement(f,i({ref:t},u))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=b;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>g,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(7462),a=(r(7294),r(3905));const o={id:"pebble",title:"Pebble"},i=void 0,l={unversionedId:"pebble/pebble",id:"version-ristretto_v1.x.x/pebble/pebble",title:"Pebble",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/pebble/README.md",sourceDirName:"pebble",slug:"/pebble/",permalink:"/storage/ristretto_v1.x.x/pebble/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/pebble/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"pebble",title:"Pebble"},sidebar:"tutorialSidebar",previous:{title:"MySQL",permalink:"/storage/ristretto_v1.x.x/mysql/"},next:{title:"Postgres",permalink:"/storage/ristretto_v1.x.x/postgres/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:p},c="wrapper";function g(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=pebble*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A fast key-value DB using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cockroachdb/pebble"},"cockroachdb/pebble")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Pebble is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"Note: This step is only required if you don't have an existing module."),(0,a.kt)("p",null,"And then install the Pebble implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/pebble\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/pebble"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := pebble.New()\n\n// Initialize custom config\nstore := pebble.New(pebble.Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./db"\n Path string\n\n // Pass write options during write operations\n //\n // Optional. Default is nil\n WriteOptions &pebble.WriteOptions{}\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/46e18ecb.579b7805.js b/assets/js/46e18ecb.579b7805.js new file mode 100644 index 00000000000..2278bbf16d1 --- /dev/null +++ b/assets/js/46e18ecb.579b7805.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8374],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},b=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(r),b=a,f=c["".concat(s,".").concat(b)]||c[b]||g[b]||o;return r?n.createElement(f,i(i({ref:t},u),{},{components:r})):n.createElement(f,i({ref:t},u))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=b;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>g,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var n=r(87462),a=(r(67294),r(3905));const o={id:"pebble",title:"Pebble"},i=void 0,l={unversionedId:"pebble/pebble",id:"version-ristretto_v1.x.x/pebble/pebble",title:"Pebble",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/pebble/README.md",sourceDirName:"pebble",slug:"/pebble/",permalink:"/storage/ristretto_v1.x.x/pebble/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/pebble/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"pebble",title:"Pebble"},sidebar:"tutorialSidebar",previous:{title:"MySQL",permalink:"/storage/ristretto_v1.x.x/mysql/"},next:{title:"Postgres",permalink:"/storage/ristretto_v1.x.x/postgres/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],u={toc:p},c="wrapper";function g(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=pebble*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A fast key-value DB using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cockroachdb/pebble"},"cockroachdb/pebble")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Pebble is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"Note: This step is only required if you don't have an existing module."),(0,a.kt)("p",null,"And then install the Pebble implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/pebble\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/pebble"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := pebble.New()\n\n// Initialize custom config\nstore := pebble.New(pebble.Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./db"\n Path string\n\n // Pass write options during write operations\n //\n // Optional. Default is nil\n WriteOptions &pebble.WriteOptions{}\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/48aeac67.8734465c.js b/assets/js/48aeac67.8734465c.js deleted file mode 100644 index 648f28b7c06..00000000000 --- a/assets/js/48aeac67.8734465c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1319],{170:e=>{e.exports=JSON.parse('{"pluginId":"contrib","version":"swagger_v1.x.x","label":"swagger_v1.x.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-swagger_v1.x.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/contrib/swagger_v1.x.x/","docId":"README"},{"type":"link","label":"Casbin","href":"/contrib/swagger_v1.x.x/casbin/","docId":"casbin/casbin"},{"type":"link","label":"Fiberi18n","href":"/contrib/swagger_v1.x.x/fiberi18n/","docId":"fiberi18n/fiberi18n"},{"type":"link","label":"Fibernewrelic","href":"/contrib/swagger_v1.x.x/fibernewrelic/","docId":"fibernewrelic/fibernewrelic"},{"type":"link","label":"Fibersentry","href":"/contrib/swagger_v1.x.x/fibersentry/","docId":"fibersentry/fibersentry"},{"type":"link","label":"Fiberzap","href":"/contrib/swagger_v1.x.x/fiberzap/","docId":"fiberzap/fiberzap"},{"type":"link","label":"Fiberzerolog","href":"/contrib/swagger_v1.x.x/fiberzerolog/","docId":"fiberzerolog/fiberzerolog"},{"type":"link","label":"JWT","href":"/contrib/swagger_v1.x.x/jwt/","docId":"jwt/jwt"},{"type":"link","label":"Opafiber","href":"/contrib/swagger_v1.x.x/opafiber/","docId":"opafiber/opafiber"},{"type":"category","label":"Otelfiber","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Example","href":"/contrib/swagger_v1.x.x/otelfiber/example/","docId":"otelfiber/example/otelfiber-example"}],"href":"/contrib/swagger_v1.x.x/otelfiber/"},{"type":"link","label":"Paseto","href":"/contrib/swagger_v1.x.x/paseto/","docId":"paseto/paseto"},{"type":"link","label":"Swagger","href":"/contrib/swagger_v1.x.x/swagger/","docId":"swagger/swagger"},{"type":"link","label":"Websocket","href":"/contrib/swagger_v1.x.x/websocket/","docId":"websocket/websocket"}]},"docs":{"casbin/casbin":{"id":"casbin/casbin","title":"Casbin","description":"Release","sidebar":"tutorialSidebar"},"fiberi18n/fiberi18n":{"id":"fiberi18n/fiberi18n","title":"Fiberi18n","description":"Release","sidebar":"tutorialSidebar"},"fibernewrelic/fibernewrelic":{"id":"fibernewrelic/fibernewrelic","title":"Fibernewrelic","description":"Release","sidebar":"tutorialSidebar"},"fibersentry/fibersentry":{"id":"fibersentry/fibersentry","title":"Fibersentry","description":"Release","sidebar":"tutorialSidebar"},"fiberzap/fiberzap":{"id":"fiberzap/fiberzap","title":"Fiberzap","description":"Release","sidebar":"tutorialSidebar"},"fiberzerolog/fiberzerolog":{"id":"fiberzerolog/fiberzerolog","title":"Fiberzerolog","description":"Release","sidebar":"tutorialSidebar"},"jwt/jwt":{"id":"jwt/jwt","title":"JWT","description":"Release","sidebar":"tutorialSidebar"},"opafiber/opafiber":{"id":"opafiber/opafiber","title":"Opafiber","description":"Release","sidebar":"tutorialSidebar"},"otelfiber/example/otelfiber-example":{"id":"otelfiber/example/otelfiber-example","title":"Example","description":"An HTTP server using gofiber fiber and instrumentation. The server has a","sidebar":"tutorialSidebar"},"otelfiber/otelfiber":{"id":"otelfiber/otelfiber","title":"Otelfiber","description":"Release","sidebar":"tutorialSidebar"},"paseto/paseto":{"id":"paseto/paseto","title":"Paseto","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"Discord","sidebar":"tutorialSidebar"},"swagger/swagger":{"id":"swagger/swagger","title":"Swagger","description":"Release","sidebar":"tutorialSidebar"},"websocket/websocket":{"id":"websocket/websocket","title":"Websocket","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/48aeac67.af2aa9ba.js b/assets/js/48aeac67.af2aa9ba.js new file mode 100644 index 00000000000..a333a3e61b0 --- /dev/null +++ b/assets/js/48aeac67.af2aa9ba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1319],{20170:e=>{e.exports=JSON.parse('{"pluginId":"contrib","version":"swagger_v1.x.x","label":"swagger_v1.x.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-swagger_v1.x.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/contrib/swagger_v1.x.x/","docId":"README"},{"type":"link","label":"Casbin","href":"/contrib/swagger_v1.x.x/casbin/","docId":"casbin/casbin"},{"type":"link","label":"Fiberi18n","href":"/contrib/swagger_v1.x.x/fiberi18n/","docId":"fiberi18n/fiberi18n"},{"type":"link","label":"Fibernewrelic","href":"/contrib/swagger_v1.x.x/fibernewrelic/","docId":"fibernewrelic/fibernewrelic"},{"type":"link","label":"Fibersentry","href":"/contrib/swagger_v1.x.x/fibersentry/","docId":"fibersentry/fibersentry"},{"type":"link","label":"Fiberzap","href":"/contrib/swagger_v1.x.x/fiberzap/","docId":"fiberzap/fiberzap"},{"type":"link","label":"Fiberzerolog","href":"/contrib/swagger_v1.x.x/fiberzerolog/","docId":"fiberzerolog/fiberzerolog"},{"type":"link","label":"JWT","href":"/contrib/swagger_v1.x.x/jwt/","docId":"jwt/jwt"},{"type":"link","label":"Opafiber","href":"/contrib/swagger_v1.x.x/opafiber/","docId":"opafiber/opafiber"},{"type":"category","label":"Otelfiber","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Example","href":"/contrib/swagger_v1.x.x/otelfiber/example/","docId":"otelfiber/example/otelfiber-example"}],"href":"/contrib/swagger_v1.x.x/otelfiber/"},{"type":"link","label":"Paseto","href":"/contrib/swagger_v1.x.x/paseto/","docId":"paseto/paseto"},{"type":"link","label":"Swagger","href":"/contrib/swagger_v1.x.x/swagger/","docId":"swagger/swagger"},{"type":"link","label":"Websocket","href":"/contrib/swagger_v1.x.x/websocket/","docId":"websocket/websocket"}]},"docs":{"casbin/casbin":{"id":"casbin/casbin","title":"Casbin","description":"Release","sidebar":"tutorialSidebar"},"fiberi18n/fiberi18n":{"id":"fiberi18n/fiberi18n","title":"Fiberi18n","description":"Release","sidebar":"tutorialSidebar"},"fibernewrelic/fibernewrelic":{"id":"fibernewrelic/fibernewrelic","title":"Fibernewrelic","description":"Release","sidebar":"tutorialSidebar"},"fibersentry/fibersentry":{"id":"fibersentry/fibersentry","title":"Fibersentry","description":"Release","sidebar":"tutorialSidebar"},"fiberzap/fiberzap":{"id":"fiberzap/fiberzap","title":"Fiberzap","description":"Release","sidebar":"tutorialSidebar"},"fiberzerolog/fiberzerolog":{"id":"fiberzerolog/fiberzerolog","title":"Fiberzerolog","description":"Release","sidebar":"tutorialSidebar"},"jwt/jwt":{"id":"jwt/jwt","title":"JWT","description":"Release","sidebar":"tutorialSidebar"},"opafiber/opafiber":{"id":"opafiber/opafiber","title":"Opafiber","description":"Release","sidebar":"tutorialSidebar"},"otelfiber/example/otelfiber-example":{"id":"otelfiber/example/otelfiber-example","title":"Example","description":"An HTTP server using gofiber fiber and instrumentation. The server has a","sidebar":"tutorialSidebar"},"otelfiber/otelfiber":{"id":"otelfiber/otelfiber","title":"Otelfiber","description":"Release","sidebar":"tutorialSidebar"},"paseto/paseto":{"id":"paseto/paseto","title":"Paseto","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"Discord","sidebar":"tutorialSidebar"},"swagger/swagger":{"id":"swagger/swagger","title":"Swagger","description":"Release","sidebar":"tutorialSidebar"},"websocket/websocket":{"id":"websocket/websocket","title":"Websocket","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/48c6cc07.379fd254.js b/assets/js/48c6cc07.379fd254.js new file mode 100644 index 00000000000..79af5ba9d56 --- /dev/null +++ b/assets/js/48c6cc07.379fd254.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6843],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>R});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var d=n.createContext({}),c=function(e){var t=n.useContext(d),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(d.Provider,{value:t},e.children)},l="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},C=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,d=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),l=c(r),C=a,R=l["".concat(d,".").concat(C)]||l[C]||p[C]||o;return r?n.createElement(R,i(i({ref:t},u),{},{components:r})):n.createElement(R,i({ref:t},u))}));function R(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=C;var s={};for(var d in t)hasOwnProperty.call(t,d)&&(s[d]=t[d]);s.originalType=e,s[l]="string"==typeof e?e:a,i[1]=s;for(var c=2;c{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var n=r(87462),a=(r(67294),r(3905));const o={id:"constants",title:"\ud83d\udccb Constants",description:"Some constants for Fiber.",sidebar_position:4},i=void 0,s={unversionedId:"api/constants",id:"version-v2.x/api/constants",title:"\ud83d\udccb Constants",description:"Some constants for Fiber.",source:"@site/versioned_docs/version-v2.x/api/constants.md",sourceDirName:"api",slug:"/api/constants",permalink:"/api/constants",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:4,frontMatter:{id:"constants",title:"\ud83d\udccb Constants",description:"Some constants for Fiber.",sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"\ud83e\udde0 Ctx",permalink:"/api/ctx"},next:{title:"\ud83c\udf0e Client",permalink:"/api/client"}},d={},c=[],u={toc:c},l="wrapper";function p(e){let{components:t,...r}=e;return(0,a.kt)(l,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"HTTP methods were copied from net/http."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'const (\n MethodGet = "GET" // RFC 7231, 4.3.1\n MethodHead = "HEAD" // RFC 7231, 4.3.2\n MethodPost = "POST" // RFC 7231, 4.3.3\n MethodPut = "PUT" // RFC 7231, 4.3.4\n MethodPatch = "PATCH" // RFC 5789\n MethodDelete = "DELETE" // RFC 7231, 4.3.5\n MethodConnect = "CONNECT" // RFC 7231, 4.3.6\n MethodOptions = "OPTIONS" // RFC 7231, 4.3.7\n MethodTrace = "TRACE" // RFC 7231, 4.3.8\n methodUse = "USE"\n)\n')),(0,a.kt)("p",null,"MIME types that are commonly used"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'const (\n MIMETextXML = "text/xml"\n MIMETextHTML = "text/html"\n MIMETextPlain = "text/plain"\n MIMEApplicationXML = "application/xml"\n MIMEApplicationJSON = "application/json"\n MIMEApplicationJavaScript = "application/javascript"\n MIMEApplicationForm = "application/x-www-form-urlencoded"\n MIMEOctetStream = "application/octet-stream"\n MIMEMultipartForm = "multipart/form-data"\n\n MIMETextXMLCharsetUTF8 = "text/xml; charset=utf-8"\n MIMETextHTMLCharsetUTF8 = "text/html; charset=utf-8"\n MIMETextPlainCharsetUTF8 = "text/plain; charset=utf-8"\n MIMEApplicationXMLCharsetUTF8 = "application/xml; charset=utf-8"\n MIMEApplicationJSONCharsetUTF8 = "application/json; charset=utf-8"\n MIMEApplicationJavaScriptCharsetUTF8 = "application/javascript; charset=utf-8"\n)\n')),(0,a.kt)("p",null,"HTTP status codes were copied from net/http."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"const (\n StatusContinue = 100 // RFC 7231, 6.2.1\n StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2\n StatusProcessing = 102 // RFC 2518, 10.1\n StatusEarlyHints = 103 // RFC 8297\n StatusOK = 200 // RFC 7231, 6.3.1\n StatusCreated = 201 // RFC 7231, 6.3.2\n StatusAccepted = 202 // RFC 7231, 6.3.3\n StatusNonAuthoritativeInformation = 203 // RFC 7231, 6.3.4\n StatusNoContent = 204 // RFC 7231, 6.3.5\n StatusResetContent = 205 // RFC 7231, 6.3.6\n StatusPartialContent = 206 // RFC 7233, 4.1\n StatusMultiStatus = 207 // RFC 4918, 11.1\n StatusAlreadyReported = 208 // RFC 5842, 7.1\n StatusIMUsed = 226 // RFC 3229, 10.4.1\n StatusMultipleChoices = 300 // RFC 7231, 6.4.1\n StatusMovedPermanently = 301 // RFC 7231, 6.4.2\n StatusFound = 302 // RFC 7231, 6.4.3\n StatusSeeOther = 303 // RFC 7231, 6.4.4\n StatusNotModified = 304 // RFC 7232, 4.1\n StatusUseProxy = 305 // RFC 7231, 6.4.5\n StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7\n StatusPermanentRedirect = 308 // RFC 7538, 3\n StatusBadRequest = 400 // RFC 7231, 6.5.1\n StatusUnauthorized = 401 // RFC 7235, 3.1\n StatusPaymentRequired = 402 // RFC 7231, 6.5.2\n StatusForbidden = 403 // RFC 7231, 6.5.3\n StatusNotFound = 404 // RFC 7231, 6.5.4\n StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5\n StatusNotAcceptable = 406 // RFC 7231, 6.5.6\n StatusProxyAuthRequired = 407 // RFC 7235, 3.2\n StatusRequestTimeout = 408 // RFC 7231, 6.5.7\n StatusConflict = 409 // RFC 7231, 6.5.8\n StatusGone = 410 // RFC 7231, 6.5.9\n StatusLengthRequired = 411 // RFC 7231, 6.5.10\n StatusPreconditionFailed = 412 // RFC 7232, 4.2\n StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11\n StatusRequestURITooLong = 414 // RFC 7231, 6.5.12\n StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13\n StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4\n StatusExpectationFailed = 417 // RFC 7231, 6.5.14\n StatusTeapot = 418 // RFC 7168, 2.3.3\n StatusMisdirectedRequest = 421 // RFC 7540, 9.1.2\n StatusUnprocessableEntity = 422 // RFC 4918, 11.2\n StatusLocked = 423 // RFC 4918, 11.3\n StatusFailedDependency = 424 // RFC 4918, 11.4\n StatusTooEarly = 425 // RFC 8470, 5.2.\n StatusUpgradeRequired = 426 // RFC 7231, 6.5.15\n StatusPreconditionRequired = 428 // RFC 6585, 3\n StatusTooManyRequests = 429 // RFC 6585, 4\n StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5\n StatusUnavailableForLegalReasons = 451 // RFC 7725, 3\n StatusInternalServerError = 500 // RFC 7231, 6.6.1\n StatusNotImplemented = 501 // RFC 7231, 6.6.2\n StatusBadGateway = 502 // RFC 7231, 6.6.3\n StatusServiceUnavailable = 503 // RFC 7231, 6.6.4\n StatusGatewayTimeout = 504 // RFC 7231, 6.6.5\n StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6\n StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1\n StatusInsufficientStorage = 507 // RFC 4918, 11.5\n StatusLoopDetected = 508 // RFC 5842, 7.2\n StatusNotExtended = 510 // RFC 2774, 7\n StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6\n)\n")),(0,a.kt)("p",null,"Errors"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var (\n ErrBadRequest = NewError(StatusBadRequest) // RFC 7231, 6.5.1\n ErrUnauthorized = NewError(StatusUnauthorized) // RFC 7235, 3.1\n ErrPaymentRequired = NewError(StatusPaymentRequired) // RFC 7231, 6.5.2\n ErrForbidden = NewError(StatusForbidden) // RFC 7231, 6.5.3\n ErrNotFound = NewError(StatusNotFound) // RFC 7231, 6.5.4\n ErrMethodNotAllowed = NewError(StatusMethodNotAllowed) // RFC 7231, 6.5.5\n ErrNotAcceptable = NewError(StatusNotAcceptable) // RFC 7231, 6.5.6\n ErrProxyAuthRequired = NewError(StatusProxyAuthRequired) // RFC 7235, 3.2\n ErrRequestTimeout = NewError(StatusRequestTimeout) // RFC 7231, 6.5.7\n ErrConflict = NewError(StatusConflict) // RFC 7231, 6.5.8\n ErrGone = NewError(StatusGone) // RFC 7231, 6.5.9\n ErrLengthRequired = NewError(StatusLengthRequired) // RFC 7231, 6.5.10\n ErrPreconditionFailed = NewError(StatusPreconditionFailed) // RFC 7232, 4.2\n ErrRequestEntityTooLarge = NewError(StatusRequestEntityTooLarge) // RFC 7231, 6.5.11\n ErrRequestURITooLong = NewError(StatusRequestURITooLong) // RFC 7231, 6.5.12\n ErrUnsupportedMediaType = NewError(StatusUnsupportedMediaType) // RFC 7231, 6.5.13\n ErrRequestedRangeNotSatisfiable = NewError(StatusRequestedRangeNotSatisfiable) // RFC 7233, 4.4\n ErrExpectationFailed = NewError(StatusExpectationFailed) // RFC 7231, 6.5.14\n ErrTeapot = NewError(StatusTeapot) // RFC 7168, 2.3.3\n ErrMisdirectedRequest = NewError(StatusMisdirectedRequest) // RFC 7540, 9.1.2\n ErrUnprocessableEntity = NewError(StatusUnprocessableEntity) // RFC 4918, 11.2\n ErrLocked = NewError(StatusLocked) // RFC 4918, 11.3\n ErrFailedDependency = NewError(StatusFailedDependency) // RFC 4918, 11.4\n ErrTooEarly = NewError(StatusTooEarly) // RFC 8470, 5.2.\n ErrUpgradeRequired = NewError(StatusUpgradeRequired) // RFC 7231, 6.5.15\n ErrPreconditionRequired = NewError(StatusPreconditionRequired) // RFC 6585, 3\n ErrTooManyRequests = NewError(StatusTooManyRequests) // RFC 6585, 4\n ErrRequestHeaderFieldsTooLarge = NewError(StatusRequestHeaderFieldsTooLarge) // RFC 6585, 5\n ErrUnavailableForLegalReasons = NewError(StatusUnavailableForLegalReasons) // RFC 7725, 3\n ErrInternalServerError = NewError(StatusInternalServerError) // RFC 7231, 6.6.1\n ErrNotImplemented = NewError(StatusNotImplemented) // RFC 7231, 6.6.2\n ErrBadGateway = NewError(StatusBadGateway) // RFC 7231, 6.6.3\n ErrServiceUnavailable = NewError(StatusServiceUnavailable) // RFC 7231, 6.6.4\n ErrGatewayTimeout = NewError(StatusGatewayTimeout) // RFC 7231, 6.6.5\n ErrHTTPVersionNotSupported = NewError(StatusHTTPVersionNotSupported) // RFC 7231, 6.6.6\n ErrVariantAlsoNegotiates = NewError(StatusVariantAlsoNegotiates) // RFC 2295, 8.1\n ErrInsufficientStorage = NewError(StatusInsufficientStorage) // RFC 4918, 11.5\n ErrLoopDetected = NewError(StatusLoopDetected) // RFC 5842, 7.2\n ErrNotExtended = NewError(StatusNotExtended) // RFC 2774, 7\n ErrNetworkAuthenticationRequired = NewError(StatusNetworkAuthenticationRequired) // RFC 6585, 6\n)\n")),(0,a.kt)("p",null,"HTTP Headers were copied from net/http."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'const (\n HeaderAuthorization = "Authorization"\n HeaderProxyAuthenticate = "Proxy-Authenticate"\n HeaderProxyAuthorization = "Proxy-Authorization"\n HeaderWWWAuthenticate = "WWW-Authenticate"\n HeaderAge = "Age"\n HeaderCacheControl = "Cache-Control"\n HeaderClearSiteData = "Clear-Site-Data"\n HeaderExpires = "Expires"\n HeaderPragma = "Pragma"\n HeaderWarning = "Warning"\n HeaderAcceptCH = "Accept-CH"\n HeaderAcceptCHLifetime = "Accept-CH-Lifetime"\n HeaderContentDPR = "Content-DPR"\n HeaderDPR = "DPR"\n HeaderEarlyData = "Early-Data"\n HeaderSaveData = "Save-Data"\n HeaderViewportWidth = "Viewport-Width"\n HeaderWidth = "Width"\n HeaderETag = "ETag"\n HeaderIfMatch = "If-Match"\n HeaderIfModifiedSince = "If-Modified-Since"\n HeaderIfNoneMatch = "If-None-Match"\n HeaderIfUnmodifiedSince = "If-Unmodified-Since"\n HeaderLastModified = "Last-Modified"\n HeaderVary = "Vary"\n HeaderConnection = "Connection"\n HeaderKeepAlive = "Keep-Alive"\n HeaderAccept = "Accept"\n HeaderAcceptCharset = "Accept-Charset"\n HeaderAcceptEncoding = "Accept-Encoding"\n HeaderAcceptLanguage = "Accept-Language"\n HeaderCookie = "Cookie"\n HeaderExpect = "Expect"\n HeaderMaxForwards = "Max-Forwards"\n HeaderSetCookie = "Set-Cookie"\n HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"\n HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers"\n HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods"\n HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin"\n HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers"\n HeaderAccessControlMaxAge = "Access-Control-Max-Age"\n HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers"\n HeaderAccessControlRequestMethod = "Access-Control-Request-Method"\n HeaderOrigin = "Origin"\n HeaderTimingAllowOrigin = "Timing-Allow-Origin"\n HeaderXPermittedCrossDomainPolicies = "X-Permitted-Cross-Domain-Policies"\n HeaderDNT = "DNT"\n HeaderTk = "Tk"\n HeaderContentDisposition = "Content-Disposition"\n HeaderContentEncoding = "Content-Encoding"\n HeaderContentLanguage = "Content-Language"\n HeaderContentLength = "Content-Length"\n HeaderContentLocation = "Content-Location"\n HeaderContentType = "Content-Type"\n HeaderForwarded = "Forwarded"\n HeaderVia = "Via"\n HeaderXForwardedFor = "X-Forwarded-For"\n HeaderXForwardedHost = "X-Forwarded-Host"\n HeaderXForwardedProto = "X-Forwarded-Proto"\n HeaderXForwardedProtocol = "X-Forwarded-Protocol"\n HeaderXForwardedSsl = "X-Forwarded-Ssl"\n HeaderXUrlScheme = "X-Url-Scheme"\n HeaderLocation = "Location"\n HeaderFrom = "From"\n HeaderHost = "Host"\n HeaderReferer = "Referer"\n HeaderReferrerPolicy = "Referrer-Policy"\n HeaderUserAgent = "User-Agent"\n HeaderAllow = "Allow"\n HeaderServer = "Server"\n HeaderAcceptRanges = "Accept-Ranges"\n HeaderContentRange = "Content-Range"\n HeaderIfRange = "If-Range"\n HeaderRange = "Range"\n HeaderContentSecurityPolicy = "Content-Security-Policy"\n HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"\n HeaderCrossOriginResourcePolicy = "Cross-Origin-Resource-Policy"\n HeaderExpectCT = "Expect-CT"\n HeaderFeaturePolicy = "Feature-Policy"\n HeaderPublicKeyPins = "Public-Key-Pins"\n HeaderPublicKeyPinsReportOnly = "Public-Key-Pins-Report-Only"\n HeaderStrictTransportSecurity = "Strict-Transport-Security"\n HeaderUpgradeInsecureRequests = "Upgrade-Insecure-Requests"\n HeaderXContentTypeOptions = "X-Content-Type-Options"\n HeaderXDownloadOptions = "X-Download-Options"\n HeaderXFrameOptions = "X-Frame-Options"\n HeaderXPoweredBy = "X-Powered-By"\n HeaderXXSSProtection = "X-XSS-Protection"\n HeaderLastEventID = "Last-Event-ID"\n HeaderNEL = "NEL"\n HeaderPingFrom = "Ping-From"\n HeaderPingTo = "Ping-To"\n HeaderReportTo = "Report-To"\n HeaderTE = "TE"\n HeaderTrailer = "Trailer"\n HeaderTransferEncoding = "Transfer-Encoding"\n HeaderSecWebSocketAccept = "Sec-WebSocket-Accept"\n HeaderSecWebSocketExtensions = "Sec-WebSocket-Extensions"\n HeaderSecWebSocketKey = "Sec-WebSocket-Key"\n HeaderSecWebSocketProtocol = "Sec-WebSocket-Protocol"\n HeaderSecWebSocketVersion = "Sec-WebSocket-Version"\n HeaderAcceptPatch = "Accept-Patch"\n HeaderAcceptPushPolicy = "Accept-Push-Policy"\n HeaderAcceptSignature = "Accept-Signature"\n HeaderAltSvc = "Alt-Svc"\n HeaderDate = "Date"\n HeaderIndex = "Index"\n HeaderLargeAllocation = "Large-Allocation"\n HeaderLink = "Link"\n HeaderPushPolicy = "Push-Policy"\n HeaderRetryAfter = "Retry-After"\n HeaderServerTiming = "Server-Timing"\n HeaderSignature = "Signature"\n HeaderSignedHeaders = "Signed-Headers"\n HeaderSourceMap = "SourceMap"\n HeaderUpgrade = "Upgrade"\n HeaderXDNSPrefetchControl = "X-DNS-Prefetch-Control"\n HeaderXPingback = "X-Pingback"\n HeaderXRequestID = "X-Request-ID"\n HeaderXRequestedWith = "X-Requested-With"\n HeaderXRobotsTag = "X-Robots-Tag"\n HeaderXUACompatible = "X-UA-Compatible"\n)\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/48c6cc07.626c57bb.js b/assets/js/48c6cc07.626c57bb.js deleted file mode 100644 index 04e62c2df08..00000000000 --- a/assets/js/48c6cc07.626c57bb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6843],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>R});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var d=n.createContext({}),c=function(e){var t=n.useContext(d),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(d.Provider,{value:t},e.children)},l="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},C=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,d=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),l=c(r),C=a,R=l["".concat(d,".").concat(C)]||l[C]||p[C]||o;return r?n.createElement(R,i(i({ref:t},u),{},{components:r})):n.createElement(R,i({ref:t},u))}));function R(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=C;var s={};for(var d in t)hasOwnProperty.call(t,d)&&(s[d]=t[d]);s.originalType=e,s[l]="string"==typeof e?e:a,i[1]=s;for(var c=2;c{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var n=r(7462),a=(r(7294),r(3905));const o={id:"constants",title:"\ud83d\udccb Constants",description:"Some constants for Fiber.",sidebar_position:4},i=void 0,s={unversionedId:"api/constants",id:"version-v2.x/api/constants",title:"\ud83d\udccb Constants",description:"Some constants for Fiber.",source:"@site/versioned_docs/version-v2.x/api/constants.md",sourceDirName:"api",slug:"/api/constants",permalink:"/api/constants",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:4,frontMatter:{id:"constants",title:"\ud83d\udccb Constants",description:"Some constants for Fiber.",sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"\ud83e\udde0 Ctx",permalink:"/api/ctx"},next:{title:"\ud83c\udf0e Client",permalink:"/api/client"}},d={},c=[],u={toc:c},l="wrapper";function p(e){let{components:t,...r}=e;return(0,a.kt)(l,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"HTTP methods were copied from net/http."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'const (\n MethodGet = "GET" // RFC 7231, 4.3.1\n MethodHead = "HEAD" // RFC 7231, 4.3.2\n MethodPost = "POST" // RFC 7231, 4.3.3\n MethodPut = "PUT" // RFC 7231, 4.3.4\n MethodPatch = "PATCH" // RFC 5789\n MethodDelete = "DELETE" // RFC 7231, 4.3.5\n MethodConnect = "CONNECT" // RFC 7231, 4.3.6\n MethodOptions = "OPTIONS" // RFC 7231, 4.3.7\n MethodTrace = "TRACE" // RFC 7231, 4.3.8\n methodUse = "USE"\n)\n')),(0,a.kt)("p",null,"MIME types that are commonly used"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'const (\n MIMETextXML = "text/xml"\n MIMETextHTML = "text/html"\n MIMETextPlain = "text/plain"\n MIMEApplicationXML = "application/xml"\n MIMEApplicationJSON = "application/json"\n MIMEApplicationJavaScript = "application/javascript"\n MIMEApplicationForm = "application/x-www-form-urlencoded"\n MIMEOctetStream = "application/octet-stream"\n MIMEMultipartForm = "multipart/form-data"\n\n MIMETextXMLCharsetUTF8 = "text/xml; charset=utf-8"\n MIMETextHTMLCharsetUTF8 = "text/html; charset=utf-8"\n MIMETextPlainCharsetUTF8 = "text/plain; charset=utf-8"\n MIMEApplicationXMLCharsetUTF8 = "application/xml; charset=utf-8"\n MIMEApplicationJSONCharsetUTF8 = "application/json; charset=utf-8"\n MIMEApplicationJavaScriptCharsetUTF8 = "application/javascript; charset=utf-8"\n)\n')),(0,a.kt)("p",null,"HTTP status codes were copied from net/http."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"const (\n StatusContinue = 100 // RFC 7231, 6.2.1\n StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2\n StatusProcessing = 102 // RFC 2518, 10.1\n StatusEarlyHints = 103 // RFC 8297\n StatusOK = 200 // RFC 7231, 6.3.1\n StatusCreated = 201 // RFC 7231, 6.3.2\n StatusAccepted = 202 // RFC 7231, 6.3.3\n StatusNonAuthoritativeInformation = 203 // RFC 7231, 6.3.4\n StatusNoContent = 204 // RFC 7231, 6.3.5\n StatusResetContent = 205 // RFC 7231, 6.3.6\n StatusPartialContent = 206 // RFC 7233, 4.1\n StatusMultiStatus = 207 // RFC 4918, 11.1\n StatusAlreadyReported = 208 // RFC 5842, 7.1\n StatusIMUsed = 226 // RFC 3229, 10.4.1\n StatusMultipleChoices = 300 // RFC 7231, 6.4.1\n StatusMovedPermanently = 301 // RFC 7231, 6.4.2\n StatusFound = 302 // RFC 7231, 6.4.3\n StatusSeeOther = 303 // RFC 7231, 6.4.4\n StatusNotModified = 304 // RFC 7232, 4.1\n StatusUseProxy = 305 // RFC 7231, 6.4.5\n StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7\n StatusPermanentRedirect = 308 // RFC 7538, 3\n StatusBadRequest = 400 // RFC 7231, 6.5.1\n StatusUnauthorized = 401 // RFC 7235, 3.1\n StatusPaymentRequired = 402 // RFC 7231, 6.5.2\n StatusForbidden = 403 // RFC 7231, 6.5.3\n StatusNotFound = 404 // RFC 7231, 6.5.4\n StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5\n StatusNotAcceptable = 406 // RFC 7231, 6.5.6\n StatusProxyAuthRequired = 407 // RFC 7235, 3.2\n StatusRequestTimeout = 408 // RFC 7231, 6.5.7\n StatusConflict = 409 // RFC 7231, 6.5.8\n StatusGone = 410 // RFC 7231, 6.5.9\n StatusLengthRequired = 411 // RFC 7231, 6.5.10\n StatusPreconditionFailed = 412 // RFC 7232, 4.2\n StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11\n StatusRequestURITooLong = 414 // RFC 7231, 6.5.12\n StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13\n StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4\n StatusExpectationFailed = 417 // RFC 7231, 6.5.14\n StatusTeapot = 418 // RFC 7168, 2.3.3\n StatusMisdirectedRequest = 421 // RFC 7540, 9.1.2\n StatusUnprocessableEntity = 422 // RFC 4918, 11.2\n StatusLocked = 423 // RFC 4918, 11.3\n StatusFailedDependency = 424 // RFC 4918, 11.4\n StatusTooEarly = 425 // RFC 8470, 5.2.\n StatusUpgradeRequired = 426 // RFC 7231, 6.5.15\n StatusPreconditionRequired = 428 // RFC 6585, 3\n StatusTooManyRequests = 429 // RFC 6585, 4\n StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5\n StatusUnavailableForLegalReasons = 451 // RFC 7725, 3\n StatusInternalServerError = 500 // RFC 7231, 6.6.1\n StatusNotImplemented = 501 // RFC 7231, 6.6.2\n StatusBadGateway = 502 // RFC 7231, 6.6.3\n StatusServiceUnavailable = 503 // RFC 7231, 6.6.4\n StatusGatewayTimeout = 504 // RFC 7231, 6.6.5\n StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6\n StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1\n StatusInsufficientStorage = 507 // RFC 4918, 11.5\n StatusLoopDetected = 508 // RFC 5842, 7.2\n StatusNotExtended = 510 // RFC 2774, 7\n StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6\n)\n")),(0,a.kt)("p",null,"Errors"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var (\n ErrBadRequest = NewError(StatusBadRequest) // RFC 7231, 6.5.1\n ErrUnauthorized = NewError(StatusUnauthorized) // RFC 7235, 3.1\n ErrPaymentRequired = NewError(StatusPaymentRequired) // RFC 7231, 6.5.2\n ErrForbidden = NewError(StatusForbidden) // RFC 7231, 6.5.3\n ErrNotFound = NewError(StatusNotFound) // RFC 7231, 6.5.4\n ErrMethodNotAllowed = NewError(StatusMethodNotAllowed) // RFC 7231, 6.5.5\n ErrNotAcceptable = NewError(StatusNotAcceptable) // RFC 7231, 6.5.6\n ErrProxyAuthRequired = NewError(StatusProxyAuthRequired) // RFC 7235, 3.2\n ErrRequestTimeout = NewError(StatusRequestTimeout) // RFC 7231, 6.5.7\n ErrConflict = NewError(StatusConflict) // RFC 7231, 6.5.8\n ErrGone = NewError(StatusGone) // RFC 7231, 6.5.9\n ErrLengthRequired = NewError(StatusLengthRequired) // RFC 7231, 6.5.10\n ErrPreconditionFailed = NewError(StatusPreconditionFailed) // RFC 7232, 4.2\n ErrRequestEntityTooLarge = NewError(StatusRequestEntityTooLarge) // RFC 7231, 6.5.11\n ErrRequestURITooLong = NewError(StatusRequestURITooLong) // RFC 7231, 6.5.12\n ErrUnsupportedMediaType = NewError(StatusUnsupportedMediaType) // RFC 7231, 6.5.13\n ErrRequestedRangeNotSatisfiable = NewError(StatusRequestedRangeNotSatisfiable) // RFC 7233, 4.4\n ErrExpectationFailed = NewError(StatusExpectationFailed) // RFC 7231, 6.5.14\n ErrTeapot = NewError(StatusTeapot) // RFC 7168, 2.3.3\n ErrMisdirectedRequest = NewError(StatusMisdirectedRequest) // RFC 7540, 9.1.2\n ErrUnprocessableEntity = NewError(StatusUnprocessableEntity) // RFC 4918, 11.2\n ErrLocked = NewError(StatusLocked) // RFC 4918, 11.3\n ErrFailedDependency = NewError(StatusFailedDependency) // RFC 4918, 11.4\n ErrTooEarly = NewError(StatusTooEarly) // RFC 8470, 5.2.\n ErrUpgradeRequired = NewError(StatusUpgradeRequired) // RFC 7231, 6.5.15\n ErrPreconditionRequired = NewError(StatusPreconditionRequired) // RFC 6585, 3\n ErrTooManyRequests = NewError(StatusTooManyRequests) // RFC 6585, 4\n ErrRequestHeaderFieldsTooLarge = NewError(StatusRequestHeaderFieldsTooLarge) // RFC 6585, 5\n ErrUnavailableForLegalReasons = NewError(StatusUnavailableForLegalReasons) // RFC 7725, 3\n ErrInternalServerError = NewError(StatusInternalServerError) // RFC 7231, 6.6.1\n ErrNotImplemented = NewError(StatusNotImplemented) // RFC 7231, 6.6.2\n ErrBadGateway = NewError(StatusBadGateway) // RFC 7231, 6.6.3\n ErrServiceUnavailable = NewError(StatusServiceUnavailable) // RFC 7231, 6.6.4\n ErrGatewayTimeout = NewError(StatusGatewayTimeout) // RFC 7231, 6.6.5\n ErrHTTPVersionNotSupported = NewError(StatusHTTPVersionNotSupported) // RFC 7231, 6.6.6\n ErrVariantAlsoNegotiates = NewError(StatusVariantAlsoNegotiates) // RFC 2295, 8.1\n ErrInsufficientStorage = NewError(StatusInsufficientStorage) // RFC 4918, 11.5\n ErrLoopDetected = NewError(StatusLoopDetected) // RFC 5842, 7.2\n ErrNotExtended = NewError(StatusNotExtended) // RFC 2774, 7\n ErrNetworkAuthenticationRequired = NewError(StatusNetworkAuthenticationRequired) // RFC 6585, 6\n)\n")),(0,a.kt)("p",null,"HTTP Headers were copied from net/http."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'const (\n HeaderAuthorization = "Authorization"\n HeaderProxyAuthenticate = "Proxy-Authenticate"\n HeaderProxyAuthorization = "Proxy-Authorization"\n HeaderWWWAuthenticate = "WWW-Authenticate"\n HeaderAge = "Age"\n HeaderCacheControl = "Cache-Control"\n HeaderClearSiteData = "Clear-Site-Data"\n HeaderExpires = "Expires"\n HeaderPragma = "Pragma"\n HeaderWarning = "Warning"\n HeaderAcceptCH = "Accept-CH"\n HeaderAcceptCHLifetime = "Accept-CH-Lifetime"\n HeaderContentDPR = "Content-DPR"\n HeaderDPR = "DPR"\n HeaderEarlyData = "Early-Data"\n HeaderSaveData = "Save-Data"\n HeaderViewportWidth = "Viewport-Width"\n HeaderWidth = "Width"\n HeaderETag = "ETag"\n HeaderIfMatch = "If-Match"\n HeaderIfModifiedSince = "If-Modified-Since"\n HeaderIfNoneMatch = "If-None-Match"\n HeaderIfUnmodifiedSince = "If-Unmodified-Since"\n HeaderLastModified = "Last-Modified"\n HeaderVary = "Vary"\n HeaderConnection = "Connection"\n HeaderKeepAlive = "Keep-Alive"\n HeaderAccept = "Accept"\n HeaderAcceptCharset = "Accept-Charset"\n HeaderAcceptEncoding = "Accept-Encoding"\n HeaderAcceptLanguage = "Accept-Language"\n HeaderCookie = "Cookie"\n HeaderExpect = "Expect"\n HeaderMaxForwards = "Max-Forwards"\n HeaderSetCookie = "Set-Cookie"\n HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"\n HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers"\n HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods"\n HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin"\n HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers"\n HeaderAccessControlMaxAge = "Access-Control-Max-Age"\n HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers"\n HeaderAccessControlRequestMethod = "Access-Control-Request-Method"\n HeaderOrigin = "Origin"\n HeaderTimingAllowOrigin = "Timing-Allow-Origin"\n HeaderXPermittedCrossDomainPolicies = "X-Permitted-Cross-Domain-Policies"\n HeaderDNT = "DNT"\n HeaderTk = "Tk"\n HeaderContentDisposition = "Content-Disposition"\n HeaderContentEncoding = "Content-Encoding"\n HeaderContentLanguage = "Content-Language"\n HeaderContentLength = "Content-Length"\n HeaderContentLocation = "Content-Location"\n HeaderContentType = "Content-Type"\n HeaderForwarded = "Forwarded"\n HeaderVia = "Via"\n HeaderXForwardedFor = "X-Forwarded-For"\n HeaderXForwardedHost = "X-Forwarded-Host"\n HeaderXForwardedProto = "X-Forwarded-Proto"\n HeaderXForwardedProtocol = "X-Forwarded-Protocol"\n HeaderXForwardedSsl = "X-Forwarded-Ssl"\n HeaderXUrlScheme = "X-Url-Scheme"\n HeaderLocation = "Location"\n HeaderFrom = "From"\n HeaderHost = "Host"\n HeaderReferer = "Referer"\n HeaderReferrerPolicy = "Referrer-Policy"\n HeaderUserAgent = "User-Agent"\n HeaderAllow = "Allow"\n HeaderServer = "Server"\n HeaderAcceptRanges = "Accept-Ranges"\n HeaderContentRange = "Content-Range"\n HeaderIfRange = "If-Range"\n HeaderRange = "Range"\n HeaderContentSecurityPolicy = "Content-Security-Policy"\n HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"\n HeaderCrossOriginResourcePolicy = "Cross-Origin-Resource-Policy"\n HeaderExpectCT = "Expect-CT"\n HeaderFeaturePolicy = "Feature-Policy"\n HeaderPublicKeyPins = "Public-Key-Pins"\n HeaderPublicKeyPinsReportOnly = "Public-Key-Pins-Report-Only"\n HeaderStrictTransportSecurity = "Strict-Transport-Security"\n HeaderUpgradeInsecureRequests = "Upgrade-Insecure-Requests"\n HeaderXContentTypeOptions = "X-Content-Type-Options"\n HeaderXDownloadOptions = "X-Download-Options"\n HeaderXFrameOptions = "X-Frame-Options"\n HeaderXPoweredBy = "X-Powered-By"\n HeaderXXSSProtection = "X-XSS-Protection"\n HeaderLastEventID = "Last-Event-ID"\n HeaderNEL = "NEL"\n HeaderPingFrom = "Ping-From"\n HeaderPingTo = "Ping-To"\n HeaderReportTo = "Report-To"\n HeaderTE = "TE"\n HeaderTrailer = "Trailer"\n HeaderTransferEncoding = "Transfer-Encoding"\n HeaderSecWebSocketAccept = "Sec-WebSocket-Accept"\n HeaderSecWebSocketExtensions = "Sec-WebSocket-Extensions"\n HeaderSecWebSocketKey = "Sec-WebSocket-Key"\n HeaderSecWebSocketProtocol = "Sec-WebSocket-Protocol"\n HeaderSecWebSocketVersion = "Sec-WebSocket-Version"\n HeaderAcceptPatch = "Accept-Patch"\n HeaderAcceptPushPolicy = "Accept-Push-Policy"\n HeaderAcceptSignature = "Accept-Signature"\n HeaderAltSvc = "Alt-Svc"\n HeaderDate = "Date"\n HeaderIndex = "Index"\n HeaderLargeAllocation = "Large-Allocation"\n HeaderLink = "Link"\n HeaderPushPolicy = "Push-Policy"\n HeaderRetryAfter = "Retry-After"\n HeaderServerTiming = "Server-Timing"\n HeaderSignature = "Signature"\n HeaderSignedHeaders = "Signed-Headers"\n HeaderSourceMap = "SourceMap"\n HeaderUpgrade = "Upgrade"\n HeaderXDNSPrefetchControl = "X-DNS-Prefetch-Control"\n HeaderXPingback = "X-Pingback"\n HeaderXRequestID = "X-Request-ID"\n HeaderXRequestedWith = "X-Requested-With"\n HeaderXRobotsTag = "X-Robots-Tag"\n HeaderXUACompatible = "X-UA-Compatible"\n)\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4972.091c56f5.js b/assets/js/4972.091c56f5.js deleted file mode 100644 index 603b2c80bbc..00000000000 --- a/assets/js/4972.091c56f5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4972],{4972:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var a=n(7294),l=n(5999),o=n(1944),r=n(6375);function i(){return a.createElement(a.Fragment,null,a.createElement(o.d,{title:(0,l.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file diff --git a/assets/js/4972.283c30eb.js b/assets/js/4972.283c30eb.js new file mode 100644 index 00000000000..0200b0a7a63 --- /dev/null +++ b/assets/js/4972.283c30eb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4972],{4972:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var a=n(67294),l=n(95999),o=n(1944),r=n(46375);function i(){return a.createElement(a.Fragment,null,a.createElement(o.d,{title:(0,l.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(l.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(l.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file diff --git a/assets/js/4a6d765c.83439e14.js b/assets/js/4a6d765c.83439e14.js deleted file mode 100644 index 0cfcfdd08d8..00000000000 --- a/assets/js/4a6d765c.83439e14.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3729],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>m});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(t),d=i,m=c["".concat(s,".").concat(d)]||c[d]||f[d]||o;return t?r.createElement(m,a(a({ref:n},u),{},{components:t})):r.createElement(m,a({ref:n},u))}));function m(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:i,a[1]=l;for(var p=2;p{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>a,default:()=>f,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=t(7462),i=(t(7294),t(3905));const o={id:"helmet",title:"Helmet"},a=void 0,l={unversionedId:"api/middleware/helmet",id:"version-v2.x/api/middleware/helmet",title:"Helmet",description:"Helmet middleware helps secure your apps by setting various HTTP headers.",source:"@site/versioned_docs/version-v2.x/api/middleware/helmet.md",sourceDirName:"api/middleware",slug:"/api/middleware/helmet",permalink:"/api/middleware/helmet",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"helmet",title:"Helmet"},sidebar:"tutorialSidebar",previous:{title:"FileSystem",permalink:"/api/middleware/filesystem"},next:{title:"Idempotency",permalink:"/api/middleware/idempotency"}},s={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],u={toc:p},c="wrapper";function f(e){let{components:n,...t}=e;return(0,i.kt)(c,(0,r.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Helmet middleware helps secure your apps by setting various HTTP headers."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/helmet"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use(helmet.New())\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome!")\n })\n\n app.Listen(":3000")\n}\n')),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Test:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-curl"},"curl -I http://localhost:3000\n")),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip middleware.\n // Optional. Default: nil\n Next func(*fiber.Ctx) bool\n\n // XSSProtection\n // Optional. Default value "0".\n XSSProtection string\n\n // ContentTypeNosniff\n // Optional. Default value "nosniff".\n ContentTypeNosniff string\n\n // XFrameOptions\n // Optional. Default value "SAMEORIGIN".\n // Possible values: "SAMEORIGIN", "DENY", "ALLOW-FROM uri"\n XFrameOptions string\n\n // HSTSMaxAge\n // Optional. Default value 0.\n HSTSMaxAge int\n\n // HSTSExcludeSubdomains\n // Optional. Default value false.\n HSTSExcludeSubdomains bool\n\n // ContentSecurityPolicy\n // Optional. Default value "".\n ContentSecurityPolicy string\n\n // CSPReportOnly\n // Optional. Default value false.\n CSPReportOnly bool\n\n // HSTSPreloadEnabled\n // Optional. Default value false.\n HSTSPreloadEnabled bool\n\n // ReferrerPolicy\n // Optional. Default value "ReferrerPolicy".\n ReferrerPolicy string\n\n // Permissions-Policy\n // Optional. Default value "".\n PermissionPolicy string\n\n // Cross-Origin-Embedder-Policy\n // Optional. Default value "require-corp".\n CrossOriginEmbedderPolicy string\n\n // Cross-Origin-Opener-Policy\n // Optional. Default value "same-origin".\n CrossOriginOpenerPolicy string\n\n // Cross-Origin-Resource-Policy\n // Optional. Default value "same-origin".\n CrossOriginResourcePolicy string\n\n // Origin-Agent-Cluster\n // Optional. Default value "?1".\n OriginAgentCluster string\n\n // X-DNS-Prefetch-Control\n // Optional. Default value "off".\n XDNSPrefetchControl string\n\n // X-Download-Options\n // Optional. Default value "noopen".\n XDownloadOptions string\n\n // X-Permitted-Cross-Domain-Policies\n // Optional. Default value "none".\n XPermittedCrossDomain string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n XSSProtection: "0",\n ContentTypeNosniff: "nosniff",\n XFrameOptions: "SAMEORIGIN",\n ReferrerPolicy: "no-referrer",\n CrossOriginEmbedderPolicy: "require-corp",\n CrossOriginOpenerPolicy: "same-origin",\n CrossOriginResourcePolicy: "same-origin",\n OriginAgentCluster: "?1",\n XDNSPrefetchControl: "off",\n XDownloadOptions: "noopen",\n XPermittedCrossDomain: "none",\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4a6d765c.e49d06ce.js b/assets/js/4a6d765c.e49d06ce.js new file mode 100644 index 00000000000..fb68b6365d6 --- /dev/null +++ b/assets/js/4a6d765c.e49d06ce.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3729],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>m});var r=t(67294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(t),d=i,m=c["".concat(s,".").concat(d)]||c[d]||f[d]||o;return t?r.createElement(m,a(a({ref:n},u),{},{components:t})):r.createElement(m,a({ref:n},u))}));function m(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:i,a[1]=l;for(var p=2;p{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>a,default:()=>f,frontMatter:()=>o,metadata:()=>l,toc:()=>p});var r=t(87462),i=(t(67294),t(3905));const o={id:"helmet",title:"Helmet"},a=void 0,l={unversionedId:"api/middleware/helmet",id:"version-v2.x/api/middleware/helmet",title:"Helmet",description:"Helmet middleware helps secure your apps by setting various HTTP headers.",source:"@site/versioned_docs/version-v2.x/api/middleware/helmet.md",sourceDirName:"api/middleware",slug:"/api/middleware/helmet",permalink:"/api/middleware/helmet",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"helmet",title:"Helmet"},sidebar:"tutorialSidebar",previous:{title:"FileSystem",permalink:"/api/middleware/filesystem"},next:{title:"Idempotency",permalink:"/api/middleware/idempotency"}},s={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],u={toc:p},c="wrapper";function f(e){let{components:n,...t}=e;return(0,i.kt)(c,(0,r.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Helmet middleware helps secure your apps by setting various HTTP headers."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/helmet"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use(helmet.New())\n\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString("Welcome!")\n })\n\n app.Listen(":3000")\n}\n')),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Test:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-curl"},"curl -I http://localhost:3000\n")),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip middleware.\n // Optional. Default: nil\n Next func(*fiber.Ctx) bool\n\n // XSSProtection\n // Optional. Default value "0".\n XSSProtection string\n\n // ContentTypeNosniff\n // Optional. Default value "nosniff".\n ContentTypeNosniff string\n\n // XFrameOptions\n // Optional. Default value "SAMEORIGIN".\n // Possible values: "SAMEORIGIN", "DENY", "ALLOW-FROM uri"\n XFrameOptions string\n\n // HSTSMaxAge\n // Optional. Default value 0.\n HSTSMaxAge int\n\n // HSTSExcludeSubdomains\n // Optional. Default value false.\n HSTSExcludeSubdomains bool\n\n // ContentSecurityPolicy\n // Optional. Default value "".\n ContentSecurityPolicy string\n\n // CSPReportOnly\n // Optional. Default value false.\n CSPReportOnly bool\n\n // HSTSPreloadEnabled\n // Optional. Default value false.\n HSTSPreloadEnabled bool\n\n // ReferrerPolicy\n // Optional. Default value "ReferrerPolicy".\n ReferrerPolicy string\n\n // Permissions-Policy\n // Optional. Default value "".\n PermissionPolicy string\n\n // Cross-Origin-Embedder-Policy\n // Optional. Default value "require-corp".\n CrossOriginEmbedderPolicy string\n\n // Cross-Origin-Opener-Policy\n // Optional. Default value "same-origin".\n CrossOriginOpenerPolicy string\n\n // Cross-Origin-Resource-Policy\n // Optional. Default value "same-origin".\n CrossOriginResourcePolicy string\n\n // Origin-Agent-Cluster\n // Optional. Default value "?1".\n OriginAgentCluster string\n\n // X-DNS-Prefetch-Control\n // Optional. Default value "off".\n XDNSPrefetchControl string\n\n // X-Download-Options\n // Optional. Default value "noopen".\n XDownloadOptions string\n\n // X-Permitted-Cross-Domain-Policies\n // Optional. Default value "none".\n XPermittedCrossDomain string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n XSSProtection: "0",\n ContentTypeNosniff: "nosniff",\n XFrameOptions: "SAMEORIGIN",\n ReferrerPolicy: "no-referrer",\n CrossOriginEmbedderPolicy: "require-corp",\n CrossOriginOpenerPolicy: "same-origin",\n CrossOriginResourcePolicy: "same-origin",\n OriginAgentCluster: "?1",\n XDNSPrefetchControl: "off",\n XDownloadOptions: "noopen",\n XPermittedCrossDomain: "none",\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4b0c4837.a22d24c4.js b/assets/js/4b0c4837.a22d24c4.js new file mode 100644 index 00000000000..94dd154d3e7 --- /dev/null +++ b/assets/js/4b0c4837.a22d24c4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3261],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>m});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),d=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},u=function(e){var t=d(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=d(a),f=n,m=p["".concat(s,".").concat(f)]||p[f]||c[f]||o;return a?r.createElement(m,l(l({ref:t},u),{},{components:a})):r.createElement(m,l({ref:t},u))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var d=2;d{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var r=a(87462),n=(a(67294),a(3905));const o={id:"earlydata",title:"EarlyData"},l=void 0,i={unversionedId:"api/middleware/earlydata",id:"api/middleware/earlydata",title:"EarlyData",description:'The Early Data middleware for Fiber adds support for TLS 1.3\'s early data ("0-RTT") feature.',source:"@site/docs/core/api/middleware/earlydata.md",sourceDirName:"api/middleware",slug:"/api/middleware/earlydata",permalink:"/next/api/middleware/earlydata",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/earlydata.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"earlydata",title:"EarlyData"},sidebar:"tutorialSidebar",previous:{title:"CSRF",permalink:"/next/api/middleware/csrf"},next:{title:"Encrypt Cookie",permalink:"/next/api/middleware/encryptcookie"}},s={},d=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2},{value:"Constants",id:"constants",level:2}],u={toc:d},p="wrapper";function c(e){let{components:t,...a}=e;return(0,n.kt)(p,(0,r.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"The Early Data middleware for ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),' adds support for TLS 1.3\'s early data ("0-RTT") feature.\nCiting ',(0,n.kt)("a",{parentName:"p",href:"https://datatracker.ietf.org/doc/html/rfc8446#section-2-3"},"RFC 8446"),', when a client and server share a PSK, TLS 1.3 allows clients to send data on the first flight ("early data") to speed up the request, effectively reducing the regular 1-RTT request to a 0-RTT request.'),(0,n.kt)("p",null,"Make sure to enable fiber's ",(0,n.kt)("inlineCode",{parentName:"p"},"EnableTrustedProxyCheck")," config option before using this middleware in order to not trust bogus HTTP request headers of the client."),(0,n.kt)("p",null,"Also be aware that enabling support for early data in your reverse proxy (e.g. nginx, as done with a simple ",(0,n.kt)("inlineCode",{parentName:"p"},"ssl_early_data on;"),") makes requests replayable. Refer to the following documents before continuing:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://datatracker.ietf.org/doc/html/rfc8446#section-8"},"https://datatracker.ietf.org/doc/html/rfc8446#section-8")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://blog.trailofbits.com/2019/03/25/what-application-developers-need-to-know-about-tls-early-data-0rtt/"},"https://blog.trailofbits.com/2019/03/25/what-application-developers-need-to-know-about-tls-early-data-0rtt/"))),(0,n.kt)("p",null,"By default, this middleware allows early data requests on safe HTTP request methods only and rejects the request otherwise, i.e. aborts the request before executing your handler. This behavior can be controlled by the ",(0,n.kt)("inlineCode",{parentName:"p"},"AllowEarlyData")," config option.\nSafe HTTP methods \u2014 ",(0,n.kt)("inlineCode",{parentName:"p"},"GET"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"HEAD"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"OPTIONS")," and ",(0,n.kt)("inlineCode",{parentName:"p"},"TRACE")," \u2014 should not modify a state on the server."),(0,n.kt)("h2",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,n.kt)("h2",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/earlydata"\n)\n')),(0,n.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\napp.Use(earlydata.New())\n\n// Or extend your config for customization\napp.Use(earlydata.New(earlydata.Config{\n Error: fiber.ErrTooEarly,\n // ...\n}))\n")),(0,n.kt)("h2",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // IsEarlyData returns whether the request is an early-data request.\n //\n // Optional. Default: a function which checks if the "Early-Data" request header equals "1".\n IsEarlyData func(c *fiber.Ctx) bool\n\n // AllowEarlyData returns whether the early-data request should be allowed or rejected.\n //\n // Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods.\n AllowEarlyData func(c *fiber.Ctx) bool\n\n // Error is returned in case an early-data request is rejected.\n //\n // Optional. Default: fiber.ErrTooEarly.\n Error error\n}\n')),(0,n.kt)("h2",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n IsEarlyData: func(c *fiber.Ctx) bool {\n return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue\n },\n\n AllowEarlyData: func(c *fiber.Ctx) bool {\n return fiber.IsMethodSafe(c.Method())\n },\n\n Error: fiber.ErrTooEarly,\n}\n")),(0,n.kt)("h2",{id:"constants"},"Constants"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'const (\n DefaultHeaderName = "Early-Data"\n DefaultHeaderTrueValue = "1"\n)\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4b0c4837.fb718049.js b/assets/js/4b0c4837.fb718049.js deleted file mode 100644 index 1ff98f37ffd..00000000000 --- a/assets/js/4b0c4837.fb718049.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3261],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>m});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),d=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},u=function(e){var t=d(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=d(a),f=n,m=p["".concat(s,".").concat(f)]||p[f]||c[f]||o;return a?r.createElement(m,l(l({ref:t},u),{},{components:a})):r.createElement(m,l({ref:t},u))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,l=new Array(o);l[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:n,l[1]=i;for(var d=2;d{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var r=a(7462),n=(a(7294),a(3905));const o={id:"earlydata",title:"EarlyData"},l=void 0,i={unversionedId:"api/middleware/earlydata",id:"api/middleware/earlydata",title:"EarlyData",description:'The Early Data middleware for Fiber adds support for TLS 1.3\'s early data ("0-RTT") feature.',source:"@site/docs/core/api/middleware/earlydata.md",sourceDirName:"api/middleware",slug:"/api/middleware/earlydata",permalink:"/next/api/middleware/earlydata",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/earlydata.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"earlydata",title:"EarlyData"},sidebar:"tutorialSidebar",previous:{title:"CSRF",permalink:"/next/api/middleware/csrf"},next:{title:"Encrypt Cookie",permalink:"/next/api/middleware/encryptcookie"}},s={},d=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2},{value:"Constants",id:"constants",level:2}],u={toc:d},p="wrapper";function c(e){let{components:t,...a}=e;return(0,n.kt)(p,(0,r.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"The Early Data middleware for ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),' adds support for TLS 1.3\'s early data ("0-RTT") feature.\nCiting ',(0,n.kt)("a",{parentName:"p",href:"https://datatracker.ietf.org/doc/html/rfc8446#section-2-3"},"RFC 8446"),', when a client and server share a PSK, TLS 1.3 allows clients to send data on the first flight ("early data") to speed up the request, effectively reducing the regular 1-RTT request to a 0-RTT request.'),(0,n.kt)("p",null,"Make sure to enable fiber's ",(0,n.kt)("inlineCode",{parentName:"p"},"EnableTrustedProxyCheck")," config option before using this middleware in order to not trust bogus HTTP request headers of the client."),(0,n.kt)("p",null,"Also be aware that enabling support for early data in your reverse proxy (e.g. nginx, as done with a simple ",(0,n.kt)("inlineCode",{parentName:"p"},"ssl_early_data on;"),") makes requests replayable. Refer to the following documents before continuing:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://datatracker.ietf.org/doc/html/rfc8446#section-8"},"https://datatracker.ietf.org/doc/html/rfc8446#section-8")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://blog.trailofbits.com/2019/03/25/what-application-developers-need-to-know-about-tls-early-data-0rtt/"},"https://blog.trailofbits.com/2019/03/25/what-application-developers-need-to-know-about-tls-early-data-0rtt/"))),(0,n.kt)("p",null,"By default, this middleware allows early data requests on safe HTTP request methods only and rejects the request otherwise, i.e. aborts the request before executing your handler. This behavior can be controlled by the ",(0,n.kt)("inlineCode",{parentName:"p"},"AllowEarlyData")," config option.\nSafe HTTP methods \u2014 ",(0,n.kt)("inlineCode",{parentName:"p"},"GET"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"HEAD"),", ",(0,n.kt)("inlineCode",{parentName:"p"},"OPTIONS")," and ",(0,n.kt)("inlineCode",{parentName:"p"},"TRACE")," \u2014 should not modify a state on the server."),(0,n.kt)("h2",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,n.kt)("h2",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/earlydata"\n)\n')),(0,n.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\napp.Use(earlydata.New())\n\n// Or extend your config for customization\napp.Use(earlydata.New(earlydata.Config{\n Error: fiber.ErrTooEarly,\n // ...\n}))\n")),(0,n.kt)("h2",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // IsEarlyData returns whether the request is an early-data request.\n //\n // Optional. Default: a function which checks if the "Early-Data" request header equals "1".\n IsEarlyData func(c *fiber.Ctx) bool\n\n // AllowEarlyData returns whether the early-data request should be allowed or rejected.\n //\n // Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods.\n AllowEarlyData func(c *fiber.Ctx) bool\n\n // Error is returned in case an early-data request is rejected.\n //\n // Optional. Default: fiber.ErrTooEarly.\n Error error\n}\n')),(0,n.kt)("h2",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n IsEarlyData: func(c *fiber.Ctx) bool {\n return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue\n },\n\n AllowEarlyData: func(c *fiber.Ctx) bool {\n return fiber.IsMethodSafe(c.Method())\n },\n\n Error: fiber.ErrTooEarly,\n}\n")),(0,n.kt)("h2",{id:"constants"},"Constants"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'const (\n DefaultHeaderName = "Early-Data"\n DefaultHeaderTrueValue = "1"\n)\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4b47f78b.6311813b.js b/assets/js/4b47f78b.6311813b.js new file mode 100644 index 00000000000..4ec05215803 --- /dev/null +++ b/assets/js/4b47f78b.6311813b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6858],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),p=s(n),f=a,h=p["".concat(l,".").concat(f)]||p[f]||d[f]||i;return n?r.createElement(h,o(o({ref:t},u),{},{components:n})):r.createElement(h,o({ref:t},u))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:a,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));const i={id:"cache",title:"Cache"},o=void 0,c={unversionedId:"api/middleware/cache",id:"version-v2.x/api/middleware/cache",title:"Cache",description:"Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core!",source:"@site/versioned_docs/version-v2.x/api/middleware/cache.md",sourceDirName:"api/middleware",slug:"/api/middleware/cache",permalink:"/api/middleware/cache",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"cache",title:"Cache"},sidebar:"tutorialSidebar",previous:{title:"BasicAuth",permalink:"/api/middleware/basicauth"},next:{title:"Compress",permalink:"/api/middleware/compress"}},l={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],u={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Cache middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," designed to intercept responses and cache them. This middleware will cache the ",(0,a.kt)("inlineCode",{parentName:"p"},"Body"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"Content-Type")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"StatusCode")," using the ",(0,a.kt)("inlineCode",{parentName:"p"},"c.Path()")," as unique identifier. Special thanks to ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/codemicro/fiber-cache"},"@codemicro")," for creating this middleware for Fiber core!"),(0,a.kt)("p",null,"Request Directives",(0,a.kt)("br",null),"\n",(0,a.kt)("inlineCode",{parentName:"p"},"Cache-Control: no-cache")," will return the up-to-date response but still caches it. You will always get a ",(0,a.kt)("inlineCode",{parentName:"p"},"miss")," cache status.",(0,a.kt)("br",null),"\n",(0,a.kt)("inlineCode",{parentName:"p"},"Cache-Control: no-store")," will refrain from caching. You will always get the up-to-date response."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/cache"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(cache.New())\n\n// Or extend your config for customization\napp.Use(cache.New(cache.Config{\n Next: func(c *fiber.Ctx) bool {\n return c.Query("refresh") == "true"\n },\n Expiration: 30 * time.Minute,\n CacheControl: true,\n}))\n')),(0,a.kt)("p",null,"Or you can custom key and expire time like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(cache.New(cache.Config{\n ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration {\n newCacheTime, _ := strconv.Atoi(c.GetRespHeader("Cache-Time", "600"))\n return time.Second * time.Duration(newCacheTime)\n },\n KeyGenerator: func(c *fiber.Ctx) string {\n return utils.CopyString(c.Path())\n },\n}))\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Response().Header.Add("Cache-Time", "6000")\n return c.SendString("hi")\n})\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Expiration is the time that an cached response will live\n //\n // Optional. Default: 1 * time.Minute\n Expiration time.Duration\n\n // CacheHeader header on response header, indicate cache status, with the following possible return value\n //\n // hit, miss, unreachable\n //\n // Optional. Default: X-Cache\n CacheHeader string\n\n // CacheControl enables client side caching if set to true\n //\n // Optional. Default: false\n CacheControl bool\n\n // Key allows you to generate custom keys, by default c.Path() is used\n //\n // Default: func(c *fiber.Ctx) string {\n // return utils.CopyString(c.Path())\n // }\n KeyGenerator func(*fiber.Ctx) string\n\n // allows you to generate custom Expiration Key By Key, default is Expiration (Optional)\n //\n // Default: nil\n ExpirationGenerator func(*fiber.Ctx, *Config) time.Duration\n\n // Store is used to store the state of the middleware\n //\n // Default: an in memory store for this process only\n Storage fiber.Storage\n\n // allows you to store additional headers generated by next middlewares & handler\n //\n // Default: false\n StoreResponseHeaders bool\n\n // Max number of bytes of response bodies simultaneously stored in cache. When limit is reached,\n // entries with the nearest expiration are deleted to make room for new.\n // 0 means no limit\n //\n // Default: 0\n MaxBytes uint\n\n // You can specify HTTP methods to cache.\n // The middleware just caches the routes of its methods in this slice.\n //\n // Default: []string{fiber.MethodGet, fiber.MethodHead}\n Methods []string\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n Expiration: 1 * time.Minute,\n CacheHeader: "X-Cache",\n CacheControl: false,\n KeyGenerator: func(c *fiber.Ctx) string {\n return utils.CopyString(c.Path())\n },\n ExpirationGenerator: nil,\n StoreResponseHeaders: false,\n Storage: nil,\n MaxBytes: 0,\n Methods: []string{fiber.MethodGet, fiber.MethodHead},\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4b47f78b.86e0014f.js b/assets/js/4b47f78b.86e0014f.js deleted file mode 100644 index a3bcb16dd29..00000000000 --- a/assets/js/4b47f78b.86e0014f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6858],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),p=s(n),f=a,h=p["".concat(l,".").concat(f)]||p[f]||d[f]||i;return n?r.createElement(h,o(o({ref:t},u),{},{components:n})):r.createElement(h,o({ref:t},u))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:a,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var r=n(7462),a=(n(7294),n(3905));const i={id:"cache",title:"Cache"},o=void 0,c={unversionedId:"api/middleware/cache",id:"version-v2.x/api/middleware/cache",title:"Cache",description:"Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core!",source:"@site/versioned_docs/version-v2.x/api/middleware/cache.md",sourceDirName:"api/middleware",slug:"/api/middleware/cache",permalink:"/api/middleware/cache",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"cache",title:"Cache"},sidebar:"tutorialSidebar",previous:{title:"BasicAuth",permalink:"/api/middleware/basicauth"},next:{title:"Compress",permalink:"/api/middleware/compress"}},l={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],u={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Cache middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," designed to intercept responses and cache them. This middleware will cache the ",(0,a.kt)("inlineCode",{parentName:"p"},"Body"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"Content-Type")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"StatusCode")," using the ",(0,a.kt)("inlineCode",{parentName:"p"},"c.Path()")," as unique identifier. Special thanks to ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/codemicro/fiber-cache"},"@codemicro")," for creating this middleware for Fiber core!"),(0,a.kt)("p",null,"Request Directives",(0,a.kt)("br",null),"\n",(0,a.kt)("inlineCode",{parentName:"p"},"Cache-Control: no-cache")," will return the up-to-date response but still caches it. You will always get a ",(0,a.kt)("inlineCode",{parentName:"p"},"miss")," cache status.",(0,a.kt)("br",null),"\n",(0,a.kt)("inlineCode",{parentName:"p"},"Cache-Control: no-store")," will refrain from caching. You will always get the up-to-date response."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/cache"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(cache.New())\n\n// Or extend your config for customization\napp.Use(cache.New(cache.Config{\n Next: func(c *fiber.Ctx) bool {\n return c.Query("refresh") == "true"\n },\n Expiration: 30 * time.Minute,\n CacheControl: true,\n}))\n')),(0,a.kt)("p",null,"Or you can custom key and expire time like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(cache.New(cache.Config{\n ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration {\n newCacheTime, _ := strconv.Atoi(c.GetRespHeader("Cache-Time", "600"))\n return time.Second * time.Duration(newCacheTime)\n },\n KeyGenerator: func(c *fiber.Ctx) string {\n return utils.CopyString(c.Path())\n },\n}))\n\napp.Get("/", func(c *fiber.Ctx) error {\n c.Response().Header.Add("Cache-Time", "6000")\n return c.SendString("hi")\n})\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // Expiration is the time that an cached response will live\n //\n // Optional. Default: 1 * time.Minute\n Expiration time.Duration\n\n // CacheHeader header on response header, indicate cache status, with the following possible return value\n //\n // hit, miss, unreachable\n //\n // Optional. Default: X-Cache\n CacheHeader string\n\n // CacheControl enables client side caching if set to true\n //\n // Optional. Default: false\n CacheControl bool\n\n // Key allows you to generate custom keys, by default c.Path() is used\n //\n // Default: func(c *fiber.Ctx) string {\n // return utils.CopyString(c.Path())\n // }\n KeyGenerator func(*fiber.Ctx) string\n\n // allows you to generate custom Expiration Key By Key, default is Expiration (Optional)\n //\n // Default: nil\n ExpirationGenerator func(*fiber.Ctx, *Config) time.Duration\n\n // Store is used to store the state of the middleware\n //\n // Default: an in memory store for this process only\n Storage fiber.Storage\n\n // allows you to store additional headers generated by next middlewares & handler\n //\n // Default: false\n StoreResponseHeaders bool\n\n // Max number of bytes of response bodies simultaneously stored in cache. When limit is reached,\n // entries with the nearest expiration are deleted to make room for new.\n // 0 means no limit\n //\n // Default: 0\n MaxBytes uint\n\n // You can specify HTTP methods to cache.\n // The middleware just caches the routes of its methods in this slice.\n //\n // Default: []string{fiber.MethodGet, fiber.MethodHead}\n Methods []string\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n Expiration: 1 * time.Minute,\n CacheHeader: "X-Cache",\n CacheControl: false,\n KeyGenerator: func(c *fiber.Ctx) string {\n return utils.CopyString(c.Path())\n },\n ExpirationGenerator: nil,\n StoreResponseHeaders: false,\n Storage: nil,\n MaxBytes: 0,\n Methods: []string{fiber.MethodGet, fiber.MethodHead},\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4c57fea8.57c99d8b.js b/assets/js/4c57fea8.57c99d8b.js deleted file mode 100644 index fb75348d0a4..00000000000 --- a/assets/js/4c57fea8.57c99d8b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7025],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),g=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=g(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=g(n),f=r,d=u["".concat(s,".").concat(f)]||u[f]||c[f]||o;return n?a.createElement(d,i(i({ref:t},p),{},{components:n})):a.createElement(d,i({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var g=2;g{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var a=n(7462),r=(n(7294),n(3905));const o={id:"arangodb",title:"ArangoDB"},i=void 0,l={unversionedId:"arangodb/arangodb",id:"version-mysql_v1.x.x/arangodb/arangodb",title:"ArangoDB",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/arangodb/README.md",sourceDirName:"arangodb",slug:"/arangodb/",permalink:"/storage/mysql_v1.x.x/arangodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/arangodb/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"arangodb",title:"ArangoDB"},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc4b Welcome",permalink:"/storage/mysql_v1.x.x/"},next:{title:"Azure Blob",permalink:"/storage/mysql_v1.x.x/azureblob/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:g},u="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=arangodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A ArangoDB storage driver using ",(0,r.kt)("inlineCode",{parentName:"p"},"arangodb/go-driver")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/arangodb/go-driver"},"arangodb/go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() driver.Client\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"ArangoDB is tested on the 2 last (1.14/1.15) ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mysql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/arangodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/arangodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := arangodb.New()\n\n// Initialize custom config\nstore := arangodb.New(arangodb.Config{\n Host: "http://127.0.0.1",\n Port: 8529,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "http://127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 8529\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing collection\n //\n // Optional. Default is false\n Reset bool\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("p",null,"Used only for optional fields"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "http://127.0.0.1",\n Port: 8529,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4c57fea8.bc5813c5.js b/assets/js/4c57fea8.bc5813c5.js new file mode 100644 index 00000000000..2438a680079 --- /dev/null +++ b/assets/js/4c57fea8.bc5813c5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7025],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),g=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=g(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=g(n),f=r,d=u["".concat(s,".").concat(f)]||u[f]||c[f]||o;return n?a.createElement(d,i(i({ref:t},p),{},{components:n})):a.createElement(d,i({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var g=2;g{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var a=n(87462),r=(n(67294),n(3905));const o={id:"arangodb",title:"ArangoDB"},i=void 0,l={unversionedId:"arangodb/arangodb",id:"version-mysql_v1.x.x/arangodb/arangodb",title:"ArangoDB",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/arangodb/README.md",sourceDirName:"arangodb",slug:"/arangodb/",permalink:"/storage/mysql_v1.x.x/arangodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/arangodb/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"arangodb",title:"ArangoDB"},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc4b Welcome",permalink:"/storage/mysql_v1.x.x/"},next:{title:"Azure Blob",permalink:"/storage/mysql_v1.x.x/azureblob/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:g},u="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=arangodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A ArangoDB storage driver using ",(0,r.kt)("inlineCode",{parentName:"p"},"arangodb/go-driver")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/arangodb/go-driver"},"arangodb/go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() driver.Client\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"ArangoDB is tested on the 2 last (1.14/1.15) ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mysql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/arangodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/arangodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := arangodb.New()\n\n// Initialize custom config\nstore := arangodb.New(arangodb.Config{\n Host: "http://127.0.0.1",\n Port: 8529,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "http://127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 8529\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing collection\n //\n // Optional. Default is false\n Reset bool\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("p",null,"Used only for optional fields"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "http://127.0.0.1",\n Port: 8529,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4cd7d6c0.2c08e710.js b/assets/js/4cd7d6c0.2c08e710.js new file mode 100644 index 00000000000..7449b423ac2 --- /dev/null +++ b/assets/js/4cd7d6c0.2c08e710.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4985],{3905:(t,e,r)=>{r.d(e,{Zo:()=>m,kt:()=>f});var o=r(67294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var n=o.createContext({}),g=function(t){var e=o.useContext(n),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},m=function(t){var e=g(t.components);return o.createElement(n.Provider,{value:e},t.children)},c="mdxType",h={inlineCode:"code",wrapper:function(t){var e=t.children;return o.createElement(o.Fragment,{},e)}},b=o.forwardRef((function(t,e){var r=t.components,a=t.mdxType,s=t.originalType,n=t.parentName,m=l(t,["components","mdxType","originalType","parentName"]),c=g(r),b=a,f=c["".concat(n,".").concat(b)]||c[b]||h[b]||s;return r?o.createElement(f,i(i({ref:e},m),{},{components:r})):o.createElement(f,i({ref:e},m))}));function f(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var s=r.length,i=new Array(s);i[0]=b;var l={};for(var n in e)hasOwnProperty.call(e,n)&&(l[n]=e[n]);l.originalType=t,l[c]="string"==typeof t?t:a,i[1]=l;for(var g=2;g{r.r(e),r.d(e,{assets:()=>n,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var o=r(87462),a=(r(67294),r(3905));const s={title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},i=void 0,l={unversionedId:"README",id:"version-mysql_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/storage/mysql_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"ArangoDB",permalink:"/storage/mysql_v1.x.x/arangodb/"}},n={},g=[{value:"\ud83d\udcd1 Storage Implementations",id:"-storage-implementations",level:2}],m={toc:g},c="wrapper";function h(t){let{components:e,...r}=t;return(0,a.kt)(c,(0,o.Z)({},m,r,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",{align:"center"},(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only"}),(0,a.kt)("br",null),(0,a.kt)("h1",{id:"-storage"},"\ud83d\udce6 Storage"),(0,a.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/storage?tab=doc"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,a.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/storage"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,a.kt)("a",{href:"https://gofiber.io/discord"},(0,a.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,a.kt)("p",null,"Premade storage drivers that implement the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/blob/main/storage.go"},(0,a.kt)("inlineCode",{parentName:"a"},"Storage"))," interface, designed to be used with various ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware"},"Fiber middlewares"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Storage interface for communicating with different database/key-value\n// providers. Visit https://github.com/gofiber/storage for more info.\ntype Storage interface {\n // Get gets the value for the given key.\n // `nil, nil` is returned when the key does not exist\n Get(key string) ([]byte, error)\n\n // Set stores the given value for the given key along\n // with an expiration value, 0 means no expiration.\n // Empty key or value will be ignored without an error.\n Set(key string, val []byte, exp time.Duration) error\n\n // Delete deletes the value for the given key.\n // It returns no error if the storage does not contain the key,\n Delete(key string) error\n\n // Reset resets the storage and delete all keys.\n Reset() error\n\n // Close closes the storage and will stop any running garbage\n // collectors and open connections.\n Close() error\n}\n")),(0,a.kt)("h2",{id:"-storage-implementations"},"\ud83d\udcd1 Storage Implementations"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/arangodb/"},"ArangoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/azureblob/"},"AzureBlob")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/badger/"},"Badger")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"./bbolt"},"Bbolt")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/couchbase/"},"Couchbase")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/dynamodb/"},"DynamoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/etcd/"},"Etcd")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/memcache/"},"Memcache")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/memory/"},"Memory")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/mongodb/"},"MongoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/mssql/"},"MSSQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/mysql/"},"MySQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/pebble/"},"Pebble")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/postgres/"},"Postgres")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/redis/"},"Redis")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/s3/"},"S3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/sqlite3/"},"SQLite3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4cd7d6c0.c6a80257.js b/assets/js/4cd7d6c0.c6a80257.js deleted file mode 100644 index f788bacb14b..00000000000 --- a/assets/js/4cd7d6c0.c6a80257.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4985],{3905:(t,e,r)=>{r.d(e,{Zo:()=>m,kt:()=>f});var o=r(7294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var n=o.createContext({}),g=function(t){var e=o.useContext(n),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},m=function(t){var e=g(t.components);return o.createElement(n.Provider,{value:e},t.children)},c="mdxType",h={inlineCode:"code",wrapper:function(t){var e=t.children;return o.createElement(o.Fragment,{},e)}},b=o.forwardRef((function(t,e){var r=t.components,a=t.mdxType,s=t.originalType,n=t.parentName,m=l(t,["components","mdxType","originalType","parentName"]),c=g(r),b=a,f=c["".concat(n,".").concat(b)]||c[b]||h[b]||s;return r?o.createElement(f,i(i({ref:e},m),{},{components:r})):o.createElement(f,i({ref:e},m))}));function f(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var s=r.length,i=new Array(s);i[0]=b;var l={};for(var n in e)hasOwnProperty.call(e,n)&&(l[n]=e[n]);l.originalType=t,l[c]="string"==typeof t?t:a,i[1]=l;for(var g=2;g{r.r(e),r.d(e,{assets:()=>n,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var o=r(7462),a=(r(7294),r(3905));const s={title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},i=void 0,l={unversionedId:"README",id:"version-mysql_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/storage/mysql_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"ArangoDB",permalink:"/storage/mysql_v1.x.x/arangodb/"}},n={},g=[{value:"\ud83d\udcd1 Storage Implementations",id:"-storage-implementations",level:2}],m={toc:g},c="wrapper";function h(t){let{components:e,...r}=t;return(0,a.kt)(c,(0,o.Z)({},m,r,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",{align:"center"},(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only"}),(0,a.kt)("br",null),(0,a.kt)("h1",{id:"-storage"},"\ud83d\udce6 Storage"),(0,a.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/storage?tab=doc"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,a.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/storage"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,a.kt)("a",{href:"https://gofiber.io/discord"},(0,a.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,a.kt)("p",null,"Premade storage drivers that implement the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/blob/main/storage.go"},(0,a.kt)("inlineCode",{parentName:"a"},"Storage"))," interface, designed to be used with various ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware"},"Fiber middlewares"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Storage interface for communicating with different database/key-value\n// providers. Visit https://github.com/gofiber/storage for more info.\ntype Storage interface {\n // Get gets the value for the given key.\n // `nil, nil` is returned when the key does not exist\n Get(key string) ([]byte, error)\n\n // Set stores the given value for the given key along\n // with an expiration value, 0 means no expiration.\n // Empty key or value will be ignored without an error.\n Set(key string, val []byte, exp time.Duration) error\n\n // Delete deletes the value for the given key.\n // It returns no error if the storage does not contain the key,\n Delete(key string) error\n\n // Reset resets the storage and delete all keys.\n Reset() error\n\n // Close closes the storage and will stop any running garbage\n // collectors and open connections.\n Close() error\n}\n")),(0,a.kt)("h2",{id:"-storage-implementations"},"\ud83d\udcd1 Storage Implementations"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/arangodb/"},"ArangoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/azureblob/"},"AzureBlob")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/badger/"},"Badger")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"./bbolt"},"Bbolt")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/couchbase/"},"Couchbase")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/dynamodb/"},"DynamoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/etcd/"},"Etcd")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/memcache/"},"Memcache")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/memory/"},"Memory")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/mongodb/"},"MongoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/mssql/"},"MSSQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/mysql/"},"MySQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/pebble/"},"Pebble")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/postgres/"},"Postgres")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/redis/"},"Redis")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/s3/"},"S3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql_v1.x.x/sqlite3/"},"SQLite3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4e1e38be.90b0b3eb.js b/assets/js/4e1e38be.90b0b3eb.js new file mode 100644 index 00000000000..9c1019011a6 --- /dev/null +++ b/assets/js/4e1e38be.90b0b3eb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3685],{3905:(t,e,r)=>{r.d(e,{Zo:()=>c,kt:()=>f});var o=r(67294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var n=o.createContext({}),g=function(t){var e=o.useContext(n),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},c=function(t){var e=g(t.components);return o.createElement(n.Provider,{value:e},t.children)},m="mdxType",h={inlineCode:"code",wrapper:function(t){var e=t.children;return o.createElement(o.Fragment,{},e)}},b=o.forwardRef((function(t,e){var r=t.components,a=t.mdxType,s=t.originalType,n=t.parentName,c=l(t,["components","mdxType","originalType","parentName"]),m=g(r),b=a,f=m["".concat(n,".").concat(b)]||m[b]||h[b]||s;return r?o.createElement(f,i(i({ref:e},c),{},{components:r})):o.createElement(f,i({ref:e},c))}));function f(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var s=r.length,i=new Array(s);i[0]=b;var l={};for(var n in e)hasOwnProperty.call(e,n)&&(l[n]=e[n]);l.originalType=t,l[m]="string"==typeof t?t:a,i[1]=l;for(var g=2;g{r.r(e),r.d(e,{assets:()=>n,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var o=r(87462),a=(r(67294),r(3905));const s={title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},i=void 0,l={unversionedId:"README",id:"version-etcd_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/storage/etcd_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"ArangoDB",permalink:"/storage/etcd_v1.x.x/arangodb/"}},n={},g=[{value:"\ud83d\udcd1 Storage Implementations",id:"-storage-implementations",level:2}],c={toc:g},m="wrapper";function h(t){let{components:e,...r}=t;return(0,a.kt)(m,(0,o.Z)({},c,r,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",{align:"center"},(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only"}),(0,a.kt)("br",null),(0,a.kt)("h1",{id:"-storage"},"\ud83d\udce6 Storage"),(0,a.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/storage?tab=doc"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,a.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/storage"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,a.kt)("a",{href:"https://gofiber.io/discord"},(0,a.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,a.kt)("p",null,"Premade storage drivers that implement the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/blob/main/storage.go"},(0,a.kt)("inlineCode",{parentName:"a"},"Storage"))," interface, designed to be used with various ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware"},"Fiber middlewares"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Storage interface for communicating with different database/key-value\n// providers. Visit https://github.com/gofiber/storage for more info.\ntype Storage interface {\n // Get gets the value for the given key.\n // `nil, nil` is returned when the key does not exist\n Get(key string) ([]byte, error)\n\n // Set stores the given value for the given key along\n // with an expiration value, 0 means no expiration.\n // Empty key or value will be ignored without an error.\n Set(key string, val []byte, exp time.Duration) error\n\n // Delete deletes the value for the given key.\n // It returns no error if the storage does not contain the key,\n Delete(key string) error\n\n // Reset resets the storage and delete all keys.\n Reset() error\n\n // Close closes the storage and will stop any running garbage\n // collectors and open connections.\n Close() error\n}\n")),(0,a.kt)("h2",{id:"-storage-implementations"},"\ud83d\udcd1 Storage Implementations"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/arangodb/"},"ArangoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/azureblob/"},"AzureBlob")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/badger/"},"Badger")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"./bbolt"},"Bbolt")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/couchbase/"},"Couchbase")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/dynamodb/"},"DynamoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/etcd/"},"Etcd")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/memcache/"},"Memcache")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/memory/"},"Memory")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/mongodb/"},"MongoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/mssql/"},"MSSQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/mysql/"},"MySQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/pebble/"},"Pebble")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/postgres/"},"Postgres")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/redis/"},"Redis")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/s3/"},"S3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/sqlite3/"},"SQLite3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4e1e38be.9c4bf89f.js b/assets/js/4e1e38be.9c4bf89f.js deleted file mode 100644 index e8bc8b439da..00000000000 --- a/assets/js/4e1e38be.9c4bf89f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3685],{3905:(t,e,r)=>{r.d(e,{Zo:()=>c,kt:()=>f});var o=r(7294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var n=o.createContext({}),g=function(t){var e=o.useContext(n),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},c=function(t){var e=g(t.components);return o.createElement(n.Provider,{value:e},t.children)},m="mdxType",h={inlineCode:"code",wrapper:function(t){var e=t.children;return o.createElement(o.Fragment,{},e)}},b=o.forwardRef((function(t,e){var r=t.components,a=t.mdxType,s=t.originalType,n=t.parentName,c=l(t,["components","mdxType","originalType","parentName"]),m=g(r),b=a,f=m["".concat(n,".").concat(b)]||m[b]||h[b]||s;return r?o.createElement(f,i(i({ref:e},c),{},{components:r})):o.createElement(f,i({ref:e},c))}));function f(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var s=r.length,i=new Array(s);i[0]=b;var l={};for(var n in e)hasOwnProperty.call(e,n)&&(l[n]=e[n]);l.originalType=t,l[m]="string"==typeof t?t:a,i[1]=l;for(var g=2;g{r.r(e),r.d(e,{assets:()=>n,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var o=r(7462),a=(r(7294),r(3905));const s={title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},i=void 0,l={unversionedId:"README",id:"version-etcd_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/storage/etcd_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"ArangoDB",permalink:"/storage/etcd_v1.x.x/arangodb/"}},n={},g=[{value:"\ud83d\udcd1 Storage Implementations",id:"-storage-implementations",level:2}],c={toc:g},m="wrapper";function h(t){let{components:e,...r}=t;return(0,a.kt)(m,(0,o.Z)({},c,r,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("p",{align:"center"},(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only"}),(0,a.kt)("br",null),(0,a.kt)("h1",{id:"-storage"},"\ud83d\udce6 Storage"),(0,a.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/storage?tab=doc"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,a.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/storage"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,a.kt)("a",{href:"https://gofiber.io/discord"},(0,a.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,a.kt)("p",null,"Premade storage drivers that implement the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/blob/main/storage.go"},(0,a.kt)("inlineCode",{parentName:"a"},"Storage"))," interface, designed to be used with various ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware"},"Fiber middlewares"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Storage interface for communicating with different database/key-value\n// providers. Visit https://github.com/gofiber/storage for more info.\ntype Storage interface {\n // Get gets the value for the given key.\n // `nil, nil` is returned when the key does not exist\n Get(key string) ([]byte, error)\n\n // Set stores the given value for the given key along\n // with an expiration value, 0 means no expiration.\n // Empty key or value will be ignored without an error.\n Set(key string, val []byte, exp time.Duration) error\n\n // Delete deletes the value for the given key.\n // It returns no error if the storage does not contain the key,\n Delete(key string) error\n\n // Reset resets the storage and delete all keys.\n Reset() error\n\n // Close closes the storage and will stop any running garbage\n // collectors and open connections.\n Close() error\n}\n")),(0,a.kt)("h2",{id:"-storage-implementations"},"\ud83d\udcd1 Storage Implementations"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/arangodb/"},"ArangoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/azureblob/"},"AzureBlob")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/badger/"},"Badger")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"./bbolt"},"Bbolt")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/couchbase/"},"Couchbase")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/dynamodb/"},"DynamoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/etcd/"},"Etcd")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/memcache/"},"Memcache")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/memory/"},"Memory")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/mongodb/"},"MongoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/mssql/"},"MSSQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/mysql/"},"MySQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/pebble/"},"Pebble")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/postgres/"},"Postgres")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/redis/"},"Redis")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/s3/"},"S3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd_v1.x.x/sqlite3/"},"SQLite3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4efb66e2.86de2a0d.js b/assets/js/4efb66e2.86de2a0d.js deleted file mode 100644 index a41b1a9278a..00000000000 --- a/assets/js/4efb66e2.86de2a0d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4862],{3905:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>f});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},m=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),p=c(r),g=n,f=p["".concat(s,".").concat(g)]||p[g]||u[g]||o;return r?a.createElement(f,i(i({ref:t},m),{},{components:r})):a.createElement(f,i({ref:t},m))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,i[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=r(7462),n=(r(7294),r(3905));const o={id:"memcache",title:"Memcache"},i=void 0,l={unversionedId:"memcache/memcache",id:"version-mysql_v1.x.x/memcache/memcache",title:"Memcache",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/memcache/README.md",sourceDirName:"memcache",slug:"/memcache/",permalink:"/storage/mysql_v1.x.x/memcache/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memcache/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memcache",title:"Memcache"},sidebar:"tutorialSidebar",previous:{title:"Etcd",permalink:"/storage/mysql_v1.x.x/etcd/"},next:{title:"Memory",permalink:"/storage/mysql_v1.x.x/memory/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],m={toc:c},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memcache*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?label=Tests",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,n.kt)("p",null,"A Memcache storage driver using ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/bradfitz/gomemcache"},(0,n.kt)("inlineCode",{parentName:"a"},"bradfitz/gomemcache")),"."),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mc.Client\n")),(0,n.kt)("h3",{id:"installation"},"Installation"),(0,n.kt)("p",null,"Memory is tested on the 2 last ",(0,n.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,n.kt)("p",null,"And then install the memory implementation:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the storage package."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memcache"\n')),(0,n.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := memcache.New()\n\n// Initialize custom config\nstore := memcache.New(memcache.Config{\n Servers: "localhost:11211",\n})\n')),(0,n.kt)("h3",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Server list divided by ,\n // i.e. server1:11211, server2:11212\n //\n // Optional. Default is "127.0.0.1:11211"\n Servers string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Servers: "127.0.0.1:11211",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4efb66e2.b12d3674.js b/assets/js/4efb66e2.b12d3674.js new file mode 100644 index 00000000000..cc6ab39afe7 --- /dev/null +++ b/assets/js/4efb66e2.b12d3674.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4862],{3905:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>f});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},m=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),p=c(r),g=n,f=p["".concat(s,".").concat(g)]||p[g]||u[g]||o;return r?a.createElement(f,i(i({ref:t},m),{},{components:r})):a.createElement(f,i({ref:t},m))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,i[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=r(87462),n=(r(67294),r(3905));const o={id:"memcache",title:"Memcache"},i=void 0,l={unversionedId:"memcache/memcache",id:"version-mysql_v1.x.x/memcache/memcache",title:"Memcache",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/memcache/README.md",sourceDirName:"memcache",slug:"/memcache/",permalink:"/storage/mysql_v1.x.x/memcache/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memcache/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memcache",title:"Memcache"},sidebar:"tutorialSidebar",previous:{title:"Etcd",permalink:"/storage/mysql_v1.x.x/etcd/"},next:{title:"Memory",permalink:"/storage/mysql_v1.x.x/memory/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],m={toc:c},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memcache*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?label=Tests",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,n.kt)("p",null,"A Memcache storage driver using ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/bradfitz/gomemcache"},(0,n.kt)("inlineCode",{parentName:"a"},"bradfitz/gomemcache")),"."),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mc.Client\n")),(0,n.kt)("h3",{id:"installation"},"Installation"),(0,n.kt)("p",null,"Memory is tested on the 2 last ",(0,n.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,n.kt)("p",null,"And then install the memory implementation:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the storage package."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memcache"\n')),(0,n.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := memcache.New()\n\n// Initialize custom config\nstore := memcache.New(memcache.Config{\n Servers: "localhost:11211",\n})\n')),(0,n.kt)("h3",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Server list divided by ,\n // i.e. server1:11211, server2:11212\n //\n // Optional. Default is "127.0.0.1:11211"\n Servers string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Servers: "127.0.0.1:11211",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5086bf8b.01cf840c.js b/assets/js/5086bf8b.01cf840c.js new file mode 100644 index 00000000000..f878df05eb0 --- /dev/null +++ b/assets/js/5086bf8b.01cf840c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1281],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),g=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},c=function(e){var t=g(e.components);return n.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=g(r),f=a,m=p["".concat(l,".").concat(f)]||p[f]||u[f]||i;return r?n.createElement(m,o(o({ref:t},c),{},{components:r})):n.createElement(m,o({ref:t},c))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,o[1]=s;for(var g=2;g{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>g});var n=r(87462),a=(r(67294),r(3905));const i={id:"swagger",title:"Swagger"},o=void 0,s={unversionedId:"swagger/swagger",id:"version-fibersentry_v1.x.x/swagger/swagger",title:"Swagger",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/swagger/README.md",sourceDirName:"swagger",slug:"/swagger/",permalink:"/contrib/fibersentry_v1.x.x/swagger/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/swagger/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"swagger",title:"Swagger"},sidebar:"tutorialSidebar",previous:{title:"Paseto",permalink:"/contrib/fibersentry_v1.x.x/paseto/"},next:{title:"Websocket",permalink:"/contrib/fibersentry_v1.x.x/websocket/"}},l={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Examples",id:"examples",level:3},{value:"Default Config",id:"default-config",level:3},{value:"Custom Config",id:"custom-config",level:3}],c={toc:g},p="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=swagger*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Swagger middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),". The middleware handles Swagger UI. "),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/swagger"\n)\n')),(0,a.kt)("p",null,"Then create a Fiber app with app := fiber.New()."),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"app.Use(swagger.New(cfg))\n")),(0,a.kt)("h3",{id:"custom-config"},"Custom Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'cfg := swagger.Config{\n BasePath: "/", //swagger ui base path\n FilePath: "./docs/swagger.json",\n}\n\napp.Use(swagger.New(cfg))\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5086bf8b.09f5e366.js b/assets/js/5086bf8b.09f5e366.js deleted file mode 100644 index cec0574bee1..00000000000 --- a/assets/js/5086bf8b.09f5e366.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1281],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),g=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},c=function(e){var t=g(e.components);return n.createElement(l.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=g(r),f=a,m=p["".concat(l,".").concat(f)]||p[f]||u[f]||i;return r?n.createElement(m,o(o({ref:t},c),{},{components:r})):n.createElement(m,o({ref:t},c))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,o[1]=s;for(var g=2;g{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>g});var n=r(7462),a=(r(7294),r(3905));const i={id:"swagger",title:"Swagger"},o=void 0,s={unversionedId:"swagger/swagger",id:"version-fibersentry_v1.x.x/swagger/swagger",title:"Swagger",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/swagger/README.md",sourceDirName:"swagger",slug:"/swagger/",permalink:"/contrib/fibersentry_v1.x.x/swagger/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/swagger/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"swagger",title:"Swagger"},sidebar:"tutorialSidebar",previous:{title:"Paseto",permalink:"/contrib/fibersentry_v1.x.x/paseto/"},next:{title:"Websocket",permalink:"/contrib/fibersentry_v1.x.x/websocket/"}},l={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Examples",id:"examples",level:3},{value:"Default Config",id:"default-config",level:3},{value:"Custom Config",id:"custom-config",level:3}],c={toc:g},p="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=swagger*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Swagger middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),". The middleware handles Swagger UI. "),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/swagger"\n)\n')),(0,a.kt)("p",null,"Then create a Fiber app with app := fiber.New()."),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"app.Use(swagger.New(cfg))\n")),(0,a.kt)("h3",{id:"custom-config"},"Custom Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'cfg := swagger.Config{\n BasePath: "/", //swagger ui base path\n FilePath: "./docs/swagger.json",\n}\n\napp.Use(swagger.New(cfg))\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5131.8aadd48c.js b/assets/js/5131.8aadd48c.js deleted file mode 100644 index 014ad040dbc..00000000000 --- a/assets/js/5131.8aadd48c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5131],{5131:(n,e,t)=>{t.r(e),t.d(e,{Workbox:()=>d,WorkboxEvent:()=>u,messageSW:()=>r});try{self["workbox:window:6.5.3"]&&_()}catch(r){}function r(n,e){return new Promise((function(t){var r=new MessageChannel;r.port1.onmessage=function(n){t(n.data)},n.postMessage(e,[r.port2])}))}function o(n,e){for(var t=0;tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t=n.length?{done:!0}:{done:!1,value:n[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=n[Symbol.iterator]()).next.bind(t)}try{self["workbox:core:6.5.3"]&&_()}catch(r){}var s=function(){var n=this;this.promise=new Promise((function(e,t){n.resolve=e,n.reject=t}))};function c(n,e){var t=location.href;return new URL(n,t).href===new URL(e,t).href}var u=function(n,e){this.type=n,Object.assign(this,e)};function f(n,e,t){return t?e?e(n):n:(n&&n.then||(n=Promise.resolve(n)),e?n.then(e):n)}function v(){}var h={type:"SKIP_WAITING"};function l(n,e){if(!e)return n&&n.then?n.then(v):Promise.resolve()}var d=function(n){var e,t;function i(e,t){var r,o;return void 0===t&&(t={}),(r=n.call(this)||this).nn={},r.tn=0,r.rn=new s,r.en=new s,r.on=new s,r.un=0,r.an=new Set,r.cn=function(){var n=r.fn,e=n.installing;r.tn>0||!c(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,n.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(n){var e=r.fn,t=n.target,o=t.state,i=t===r.vn,a={sw:t,isExternal:i,originalEvent:n};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new u(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===t&&r.dispatchEvent(new u("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(t))},r.dn=function(n){var e=r.hn,t=e!==navigator.serviceWorker.controller;r.dispatchEvent(new u("controlling",{isExternal:t,originalEvent:n,sw:e,isUpdate:r.mn})),t||r.on.resolve(e)},r.gn=(o=function(n){var e=n.data,t=n.ports,o=n.source;return f(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new u("message",{data:e,originalEvent:n,ports:t,sw:o}))}))},function(){for(var n=[],e=0;e{t.r(e),t.d(e,{Workbox:()=>d,WorkboxEvent:()=>u,messageSW:()=>r});try{self["workbox:window:6.5.3"]&&_()}catch(r){}function r(n,e){return new Promise((function(t){var r=new MessageChannel;r.port1.onmessage=function(n){t(n.data)},n.postMessage(e,[r.port2])}))}function o(n,e){for(var t=0;tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t=n.length?{done:!0}:{done:!1,value:n[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=n[Symbol.iterator]()).next.bind(t)}try{self["workbox:core:6.5.3"]&&_()}catch(r){}var s=function(){var n=this;this.promise=new Promise((function(e,t){n.resolve=e,n.reject=t}))};function c(n,e){var t=location.href;return new URL(n,t).href===new URL(e,t).href}var u=function(n,e){this.type=n,Object.assign(this,e)};function f(n,e,t){return t?e?e(n):n:(n&&n.then||(n=Promise.resolve(n)),e?n.then(e):n)}function v(){}var h={type:"SKIP_WAITING"};function l(n,e){if(!e)return n&&n.then?n.then(v):Promise.resolve()}var d=function(n){var e,t;function i(e,t){var r,o;return void 0===t&&(t={}),(r=n.call(this)||this).nn={},r.tn=0,r.rn=new s,r.en=new s,r.on=new s,r.un=0,r.an=new Set,r.cn=function(){var n=r.fn,e=n.installing;r.tn>0||!c(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,n.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(n){var e=r.fn,t=n.target,o=t.state,i=t===r.vn,a={sw:t,isExternal:i,originalEvent:n};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new u(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===t&&r.dispatchEvent(new u("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(t))},r.dn=function(n){var e=r.hn,t=e!==navigator.serviceWorker.controller;r.dispatchEvent(new u("controlling",{isExternal:t,originalEvent:n,sw:e,isUpdate:r.mn})),t||r.on.resolve(e)},r.gn=(o=function(n){var e=n.data,t=n.ports,o=n.source;return f(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new u("message",{data:e,originalEvent:n,ports:t,sw:o}))}))},function(){for(var n=[],e=0;e{r.d(t,{Zo:()=>c,kt:()=>f});var o=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var n=o.createContext({}),g=function(e){var t=o.useContext(n),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=g(e.components);return o.createElement(n.Provider,{value:t},e.children)},m="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},b=o.forwardRef((function(e,t){var r=e.components,a=e.mdxType,s=e.originalType,n=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=g(r),b=a,f=m["".concat(n,".").concat(b)]||m[b]||h[b]||s;return r?o.createElement(f,i(i({ref:t},c),{},{components:r})):o.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var s=r.length,i=new Array(s);i[0]=b;var l={};for(var n in t)hasOwnProperty.call(t,n)&&(l[n]=t[n]);l.originalType=e,l[m]="string"==typeof e?e:a,i[1]=l;for(var g=2;g{r.r(t),r.d(t,{assets:()=>n,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var o=r(7462),a=(r(7294),r(3905));const s={title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},i=void 0,l={unversionedId:"README",id:"version-memcache_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/storage/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"ArangoDB",permalink:"/storage/arangodb/"}},n={},g=[{value:"\ud83d\udcd1 Storage Implementations",id:"-storage-implementations",level:2}],c={toc:g},m="wrapper";function h(e){let{components:t,...r}=e;return(0,a.kt)(m,(0,o.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",{align:"center"},(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only"}),(0,a.kt)("br",null),(0,a.kt)("h1",{id:"-storage"},"\ud83d\udce6 Storage"),(0,a.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/storage?tab=doc"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,a.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/storage"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,a.kt)("a",{href:"https://gofiber.io/discord"},(0,a.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,a.kt)("p",null,"Premade storage drivers that implement the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/blob/main/storage.go"},(0,a.kt)("inlineCode",{parentName:"a"},"Storage"))," interface, designed to be used with various ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware"},"Fiber middlewares"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Storage interface for communicating with different database/key-value\n// providers. Visit https://github.com/gofiber/storage for more info.\ntype Storage interface {\n // Get gets the value for the given key.\n // `nil, nil` is returned when the key does not exist\n Get(key string) ([]byte, error)\n\n // Set stores the given value for the given key along\n // with an expiration value, 0 means no expiration.\n // Empty key or value will be ignored without an error.\n Set(key string, val []byte, exp time.Duration) error\n\n // Delete deletes the value for the given key.\n // It returns no error if the storage does not contain the key,\n Delete(key string) error\n\n // Reset resets the storage and delete all keys.\n Reset() error\n\n // Close closes the storage and will stop any running garbage\n // collectors and open connections.\n Close() error\n}\n")),(0,a.kt)("h2",{id:"-storage-implementations"},"\ud83d\udcd1 Storage Implementations"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/arangodb/"},"ArangoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/azureblob/"},"AzureBlob")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/badger/"},"Badger")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"./bbolt"},"Bbolt")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/couchbase/"},"Couchbase")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/dynamodb/"},"DynamoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/etcd/"},"Etcd")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache/"},"Memcache")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memory/"},"Memory")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mongodb/"},"MongoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mssql/"},"MSSQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/mysql/"},"MySQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/pebble/"},"Pebble")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/postgres/"},"Postgres")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/redis/"},"Redis")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/s3/"},"S3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/sqlite3/"},"SQLite3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/52295632.eb4d5725.js b/assets/js/52295632.eb4d5725.js new file mode 100644 index 00000000000..9d056fb6d0e --- /dev/null +++ b/assets/js/52295632.eb4d5725.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4353],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var o=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var n=o.createContext({}),g=function(e){var t=o.useContext(n),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=g(e.components);return o.createElement(n.Provider,{value:t},e.children)},m="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},b=o.forwardRef((function(e,t){var r=e.components,a=e.mdxType,s=e.originalType,n=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=g(r),b=a,f=m["".concat(n,".").concat(b)]||m[b]||h[b]||s;return r?o.createElement(f,i(i({ref:t},c),{},{components:r})):o.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var s=r.length,i=new Array(s);i[0]=b;var l={};for(var n in t)hasOwnProperty.call(t,n)&&(l[n]=t[n]);l.originalType=e,l[m]="string"==typeof e?e:a,i[1]=l;for(var g=2;g{r.r(t),r.d(t,{assets:()=>n,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>g});var o=r(87462),a=(r(67294),r(3905));const s={title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},i=void 0,l={unversionedId:"README",id:"version-memcache_v1.x.x/README",title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/storage/memcache_v1.x.x/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",description:"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"ArangoDB",permalink:"/storage/memcache_v1.x.x/arangodb/"}},n={},g=[{value:"\ud83d\udcd1 Storage Implementations",id:"-storage-implementations",level:2}],c={toc:g},m="wrapper";function h(e){let{components:t,...r}=e;return(0,a.kt)(m,(0,o.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",{align:"center"},(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,a.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/storage/master/.github/logo.svg#gh-light-mode-only"}),(0,a.kt)("br",null),(0,a.kt)("h1",{id:"-storage"},"\ud83d\udce6 Storage"),(0,a.kt)("a",{href:"https://pkg.go.dev/github.com/gofiber/storage?tab=doc"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat"})),(0,a.kt)("a",{href:"https://goreportcard.com/report/github.com/gofiber/storage"},(0,a.kt)("img",{src:"https://img.shields.io/badge/%F0%9F%93%9D%20goreport-A%2B-75C46B"})),(0,a.kt)("a",{href:"https://gofiber.io/discord"},(0,a.kt)("img",{src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7"}))),(0,a.kt)("p",null,"Premade storage drivers that implement the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/storage/blob/main/storage.go"},(0,a.kt)("inlineCode",{parentName:"a"},"Storage"))," interface, designed to be used with various ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber/tree/master/middleware"},"Fiber middlewares"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Storage interface for communicating with different database/key-value\n// providers. Visit https://github.com/gofiber/storage for more info.\ntype Storage interface {\n // Get gets the value for the given key.\n // `nil, nil` is returned when the key does not exist\n Get(key string) ([]byte, error)\n\n // Set stores the given value for the given key along\n // with an expiration value, 0 means no expiration.\n // Empty key or value will be ignored without an error.\n Set(key string, val []byte, exp time.Duration) error\n\n // Delete deletes the value for the given key.\n // It returns no error if the storage does not contain the key,\n Delete(key string) error\n\n // Reset resets the storage and delete all keys.\n Reset() error\n\n // Close closes the storage and will stop any running garbage\n // collectors and open connections.\n Close() error\n}\n")),(0,a.kt)("h2",{id:"-storage-implementations"},"\ud83d\udcd1 Storage Implementations"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/arangodb/"},"ArangoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+ArangoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/azureblob/"},"AzureBlob")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Azure+Blob%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/badger/"},"Badger")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Badger%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-badger.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"./bbolt"},"Bbolt")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Bbolt%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/couchbase/"},"Couchbase")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Couchbase%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-couchbase.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/dynamodb/"},"DynamoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+DynamoDB%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/etcd/"},"Etcd")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Etcd%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/memcache/"},"Memcache")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Memcache%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/memory/"},"Memory")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Local+Storage%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/mongodb/"},"MongoDB")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Mongodb%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/mssql/"},"MSSQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MSSQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mssql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/mysql/"},"MySQL")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+MySQL%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/pebble/"},"Pebble")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Pebble%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/postgres/"},"Postgres")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Postgres%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/redis/"},"Redis")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Redis%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-redis.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/s3/"},"S3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+S3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-s3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/storage/memcache_v1.x.x/sqlite3/"},"SQLite3")," ",(0,a.kt)("a",{href:"https://github.com/gofiber/storage/actions?query=workflow%3A%22Tests+Sqlite3%22"}," ",(0,a.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-sqlite3.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5229ce75.86e107f0.js b/assets/js/5229ce75.86e107f0.js deleted file mode 100644 index 98f3693f576..00000000000 --- a/assets/js/5229ce75.86e107f0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8048],{3905:(e,r,t)=>{t.d(r,{Zo:()=>d,kt:()=>m});var n=t(7294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=n.createContext({}),p=function(e){var r=n.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):o(o({},r),e)),t},d=function(e){var r=p(e.components);return n.createElement(c.Provider,{value:r},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},s=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),f=p(t),s=a,m=f["".concat(c,".").concat(s)]||f[s]||u[s]||i;return t?n.createElement(m,o(o({ref:r},d),{},{components:t})):n.createElement(m,o({ref:r},d))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=s;var l={};for(var c in r)hasOwnProperty.call(r,c)&&(l[c]=r[c]);l.originalType=e,l[f]="string"==typeof e?e:a,o[1]=l;for(var p=2;p{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var n=t(7462),a=(t(7294),t(3905));const i={id:"recover",title:"Recover"},o=void 0,l={unversionedId:"api/middleware/recover",id:"version-v2.x/api/middleware/recover",title:"Recover",description:"Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.",source:"@site/versioned_docs/version-v2.x/api/middleware/recover.md",sourceDirName:"api/middleware",slug:"/api/middleware/recover",permalink:"/api/middleware/recover",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"recover",title:"Recover"},sidebar:"tutorialSidebar",previous:{title:"Proxy",permalink:"/api/middleware/proxy"},next:{title:"Redirect",permalink:"/api/middleware/redirect"}},c={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],d={toc:p},f="wrapper";function u(e){let{components:r,...t}=e;return(0,a.kt)(f,(0,n.Z)({},d,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Recover middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that recovers from panics anywhere in the stack chain and handles the control to the centralized ",(0,a.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/error-handling"},"ErrorHandler"),"."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/recover"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(recover.New())\n\n// This panic will be caught by the middleware\napp.Get("/", func(c *fiber.Ctx) error {\n panic("I\'m an error")\n})\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // EnableStackTrace enables handling stack trace\n //\n // Optional. Default: false\n EnableStackTrace bool\n\n // StackTraceHandler defines a function to handle stack trace\n //\n // Optional. Default: defaultStackTraceHandler\n StackTraceHandler func(c *fiber.Ctx, e interface{})\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n EnableStackTrace: false,\n StackTraceHandler: defaultStackTraceHandler,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5229ce75.99357a34.js b/assets/js/5229ce75.99357a34.js new file mode 100644 index 00000000000..fd138f65c12 --- /dev/null +++ b/assets/js/5229ce75.99357a34.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8048],{3905:(e,r,t)=>{t.d(r,{Zo:()=>d,kt:()=>m});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=n.createContext({}),p=function(e){var r=n.useContext(c),t=r;return e&&(t="function"==typeof e?e(r):o(o({},r),e)),t},d=function(e){var r=p(e.components);return n.createElement(c.Provider,{value:r},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},s=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),f=p(t),s=a,m=f["".concat(c,".").concat(s)]||f[s]||u[s]||i;return t?n.createElement(m,o(o({ref:r},d),{},{components:t})):n.createElement(m,o({ref:r},d))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=s;var l={};for(var c in r)hasOwnProperty.call(r,c)&&(l[c]=r[c]);l.originalType=e,l[f]="string"==typeof e?e:a,o[1]=l;for(var p=2;p{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var n=t(87462),a=(t(67294),t(3905));const i={id:"recover",title:"Recover"},o=void 0,l={unversionedId:"api/middleware/recover",id:"version-v2.x/api/middleware/recover",title:"Recover",description:"Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.",source:"@site/versioned_docs/version-v2.x/api/middleware/recover.md",sourceDirName:"api/middleware",slug:"/api/middleware/recover",permalink:"/api/middleware/recover",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"recover",title:"Recover"},sidebar:"tutorialSidebar",previous:{title:"Proxy",permalink:"/api/middleware/proxy"},next:{title:"Redirect",permalink:"/api/middleware/redirect"}},c={},p=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],d={toc:p},f="wrapper";function u(e){let{components:r,...t}=e;return(0,a.kt)(f,(0,n.Z)({},d,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Recover middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that recovers from panics anywhere in the stack chain and handles the control to the centralized ",(0,a.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/error-handling"},"ErrorHandler"),"."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/recover"\n)\n')),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(recover.New())\n\n// This panic will be caught by the middleware\napp.Get("/", func(c *fiber.Ctx) error {\n panic("I\'m an error")\n})\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // EnableStackTrace enables handling stack trace\n //\n // Optional. Default: false\n EnableStackTrace bool\n\n // StackTraceHandler defines a function to handle stack trace\n //\n // Optional. Default: defaultStackTraceHandler\n StackTraceHandler func(c *fiber.Ctx, e interface{})\n}\n")),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n Next: nil,\n EnableStackTrace: false,\n StackTraceHandler: defaultStackTraceHandler,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5283.0af36832.js b/assets/js/5283.0af36832.js deleted file mode 100644 index 4e97e169f65..00000000000 --- a/assets/js/5283.0af36832.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5283],{5283:(e,n,t)=>{t.r(n),t.d(n,{renderReloadPopup:()=>a});var d=t(7294),r=t(3935);const c="pwa-popup-container",o=()=>document.getElementById(c),u=()=>{const e=document.createElement("div");return e.id=c,document.body.appendChild(e),e};function a(e){const n=o()??u();return Promise.all([t.e(532),t.e(230)]).then(t.bind(t,230)).then((t=>{let{default:c}=t;r.render(d.createElement(c,e),n)}))}}}]); \ No newline at end of file diff --git a/assets/js/5283.9645c32e.js b/assets/js/5283.9645c32e.js new file mode 100644 index 00000000000..e66e986a1e9 --- /dev/null +++ b/assets/js/5283.9645c32e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5283],{65283:(e,n,t)=>{t.r(n),t.d(n,{renderReloadPopup:()=>a});var d=t(67294),r=t(73935);const c="pwa-popup-container",o=()=>document.getElementById(c),u=()=>{const e=document.createElement("div");return e.id=c,document.body.appendChild(e),e};function a(e){const n=o()??u();return Promise.all([t.e(532),t.e(230)]).then(t.bind(t,10230)).then((t=>{let{default:c}=t;r.render(d.createElement(c,e),n)}))}}}]); \ No newline at end of file diff --git a/assets/js/5525.999d509e.js b/assets/js/5525.11292518.js similarity index 69% rename from assets/js/5525.999d509e.js rename to assets/js/5525.11292518.js index d6232e89079..6ddb861e504 100644 --- a/assets/js/5525.999d509e.js +++ b/assets/js/5525.11292518.js @@ -1 +1 @@ -(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5525],{5525:()=>{}}]); \ No newline at end of file +(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5525],{15525:()=>{}}]); \ No newline at end of file diff --git a/assets/js/56cc377d.54e7c637.js b/assets/js/56cc377d.54e7c637.js new file mode 100644 index 00000000000..2dace2e248e --- /dev/null +++ b/assets/js/56cc377d.54e7c637.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1184],{3905:(e,r,t)=>{t.d(r,{Zo:()=>c,kt:()=>m});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=n.createContext({}),u=function(e){var r=n.useContext(s),t=r;return e&&(t="function"==typeof e?e(r):l(l({},r),e)),t},c=function(e){var r=u(e.components);return n.createElement(s.Provider,{value:r},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=u(t),f=a,m=d["".concat(s,".").concat(f)]||d[f]||p[f]||o;return t?n.createElement(m,l(l({ref:r},c),{},{components:t})):n.createElement(m,l({ref:r},c))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var o=t.length,l=new Array(o);l[0]=f;var i={};for(var s in r)hasOwnProperty.call(r,s)&&(i[s]=r[s]);i.originalType=e,i[d]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{t.d(r,{Z:()=>l});var n=t(67294),a=t(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:r,hidden:t,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:t},r)}},74866:(e,r,t)=>{t.d(r,{Z:()=>E});var n=t(87462),a=t(67294),o=t(86010),l=t(12466),i=t(16550),s=t(91980),u=t(67392),c=t(50012);function d(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:r}=e;return!!r&&"object"==typeof r&&"value"in r}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:r,label:t,attributes:n,default:a}}=e;return{value:r,label:t,attributes:n,default:a}}))}function p(e){const{values:r,children:t}=e;return(0,a.useMemo)((()=>{const e=r??d(t);return function(e){const r=(0,u.l)(e,((e,r)=>e.value===r.value));if(r.length>0)throw new Error(`Docusaurus error: Duplicate values "${r.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[r,t])}function f(e){let{value:r,tabValues:t}=e;return t.some((e=>e.value===r))}function m(e){let{queryString:r=!1,groupId:t}=e;const n=(0,i.k6)(),o=function(e){let{queryString:r=!1,groupId:t}=e;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:r,groupId:t});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const r=new URLSearchParams(n.location.search);r.set(o,e),n.replace({...n.location,search:r.toString()})}),[o,n])]}function h(e){const{defaultValue:r,queryString:t=!1,groupId:n}=e,o=p(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:r,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!f({value:r,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${r}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return r}const n=t.find((e=>e.default))??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:r,tabValues:o}))),[s,u]=m({queryString:t,groupId:n}),[d,h]=function(e){let{groupId:r}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(r),[n,o]=(0,c.Nk)(t);return[n,(0,a.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:n}),b=(()=>{const e=s??d;return f({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{b&&i(b)}),[b]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!f({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),h(e)}),[u,h,o]),tabValues:o}}var b=t(72389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:r,block:t,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,l.o5)(),p=e=>{const r=e.currentTarget,t=c.indexOf(r),n=u[t].value;n!==i&&(d(r),s(n))},f=e=>{let r=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;r=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;r=c[t]??c[c.length-1];break}}r?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},r)},u.map((e=>{let{value:r,label:t,attributes:l}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===r?0:-1,"aria-selected":i===r,key:r,ref:e=>c.push(e),onKeyDown:f,onClick:p},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===r})}),t??r)})))}function y(e){let{lazy:r,children:t,selectedValue:n}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(r){const e=o.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,r)=>(0,a.cloneElement)(e,{key:r,hidden:e.props.value!==n}))))}function k(e){const r=h(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},a.createElement(v,(0,n.Z)({},e,r)),a.createElement(y,(0,n.Z)({},e,r)))}function E(e){const r=(0,b.Z)();return a.createElement(k,(0,n.Z)({key:String(r)},e))}},12579:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>s,default:()=>m,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var n=t(87462),a=(t(67294),t(3905)),o=t(74866),l=t(85162);const i={id:"error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",sidebar_position:4},s=void 0,u={unversionedId:"guide/error-handling",id:"guide/error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",source:"@site/docs/core/guide/error-handling.md",sourceDirName:"guide",slug:"/guide/error-handling",permalink:"/next/guide/error-handling",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/error-handling.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:4,frontMatter:{id:"error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcdd Templates",permalink:"/next/guide/templates"},next:{title:"\ud83d\udd0e Validation",permalink:"/next/guide/validation"}},c={},d=[{value:"Catching Errors",id:"catching-errors",level:2},{value:"Default Error Handler",id:"default-error-handler",level:2},{value:"Custom Error Handler",id:"custom-error-handler",level:2}],p={toc:d},f="wrapper";function m(e){let{components:r,...t}=e;return(0,a.kt)(f,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"catching-errors"},"Catching Errors"),(0,a.kt)("p",null,"It\u2019s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them."),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(l.Z,{value:"example",label:"Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/", func(c *fiber.Ctx) error {\n // Pass error to Fiber\n return c.SendFile("file-does-not-exist")\n})\n')))),(0,a.kt)("p",null,"Fiber does not handle ",(0,a.kt)("a",{parentName:"p",href:"https://go.dev/blog/defer-panic-and-recover"},"panics")," by default. To recover from a panic thrown by any handler in the stack, you need to include the ",(0,a.kt)("inlineCode",{parentName:"p"},"Recover")," middleware below:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/recover"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use(recover.New())\n\n app.Get("/", func(c *fiber.Ctx) error {\n panic("This panic is caught by fiber")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("p",null,"You could use Fiber's custom error struct to pass an additional ",(0,a.kt)("inlineCode",{parentName:"p"},"status code")," using ",(0,a.kt)("inlineCode",{parentName:"p"},"fiber.NewError()"),". It's optional to pass a message; if this is left empty, it will default to the status code message ","(",(0,a.kt)("inlineCode",{parentName:"p"},"404")," equals ",(0,a.kt)("inlineCode",{parentName:"p"},"Not Found"),")","."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // 503 Service Unavailable\n return fiber.ErrServiceUnavailable\n\n // 503 On vacation!\n return fiber.NewError(fiber.StatusServiceUnavailable, "On vacation!")\n})\n')),(0,a.kt)("h2",{id:"default-error-handler"},"Default Error Handler"),(0,a.kt)("p",null,"Fiber provides an error handler by default. For a standard error, the response is sent as ",(0,a.kt)("strong",{parentName:"p"},"500 Internal Server Error"),". If the error is of type ",(0,a.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/gofiber/fiber#Error"},"fiber.Error"),", the response is sent with the provided status code and message."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"// Default error handler\nvar DefaultErrorHandler = func(c *fiber.Ctx, err error) error {\n // Status code defaults to 500\n code := fiber.StatusInternalServerError\n\n // Retrieve the custom status code if it's a *fiber.Error\n var e *fiber.Error\n if errors.As(err, &e) {\n code = e.Code\n }\n\n // Set Content-Type: text/plain; charset=utf-8\n c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)\n\n // Return status code with error message\n return c.Status(code).SendString(err.Error())\n}\n")),(0,a.kt)("h2",{id:"custom-error-handler"},"Custom Error Handler"),(0,a.kt)("p",null,"A custom error handler can be set using a ",(0,a.kt)("a",{parentName:"p",href:"/next/api/fiber#config"},"Config "),"when initializing a ",(0,a.kt)("a",{parentName:"p",href:"/next/api/fiber#new"},"Fiber instance"),"."),(0,a.kt)("p",null,"In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response."),(0,a.kt)("p",null,"The following example shows how to display error pages for different types of errors."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Create a new fiber instance with custom config\napp := fiber.New(fiber.Config{\n // Override default error handler\n ErrorHandler: func(ctx *fiber.Ctx, err error) error {\n // Status code defaults to 500\n code := fiber.StatusInternalServerError\n\n // Retrieve the custom status code if it\'s a *fiber.Error\n var e *fiber.Error\n if errors.As(err, &e) {\n code = e.Code\n }\n\n // Send custom error page\n err = ctx.Status(code).SendFile(fmt.Sprintf("./%d.html", code))\n if err != nil {\n // In case the SendFile fails\n return ctx.Status(fiber.StatusInternalServerError).SendString("Internal Server Error")\n }\n\n // Return from handler\n return nil\n },\n})\n\n// ...\n')),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Special thanks to the ",(0,a.kt)("a",{parentName:"p",href:"https://echo.labstack.com/"},"Echo")," & ",(0,a.kt)("a",{parentName:"p",href:"https://expressjs.com/"},"Express")," framework for inspiration regarding error handling.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/56cc377d.8fad9853.js b/assets/js/56cc377d.8fad9853.js deleted file mode 100644 index 57f7d19698f..00000000000 --- a/assets/js/56cc377d.8fad9853.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1184],{3905:(e,r,t)=>{t.d(r,{Zo:()=>c,kt:()=>m});var n=t(7294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=n.createContext({}),u=function(e){var r=n.useContext(s),t=r;return e&&(t="function"==typeof e?e(r):l(l({},r),e)),t},c=function(e){var r=u(e.components);return n.createElement(s.Provider,{value:r},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=u(t),f=a,m=d["".concat(s,".").concat(f)]||d[f]||p[f]||o;return t?n.createElement(m,l(l({ref:r},c),{},{components:t})):n.createElement(m,l({ref:r},c))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var o=t.length,l=new Array(o);l[0]=f;var i={};for(var s in r)hasOwnProperty.call(r,s)&&(i[s]=r[s]);i.originalType=e,i[d]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{t.d(r,{Z:()=>l});var n=t(7294),a=t(6010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:r,hidden:t,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:t},r)}},4866:(e,r,t)=>{t.d(r,{Z:()=>E});var n=t(7462),a=t(7294),o=t(6010),l=t(2466),i=t(6550),s=t(1980),u=t(7392),c=t(12);function d(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:r}=e;return!!r&&"object"==typeof r&&"value"in r}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:r,label:t,attributes:n,default:a}}=e;return{value:r,label:t,attributes:n,default:a}}))}function p(e){const{values:r,children:t}=e;return(0,a.useMemo)((()=>{const e=r??d(t);return function(e){const r=(0,u.l)(e,((e,r)=>e.value===r.value));if(r.length>0)throw new Error(`Docusaurus error: Duplicate values "${r.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[r,t])}function f(e){let{value:r,tabValues:t}=e;return t.some((e=>e.value===r))}function m(e){let{queryString:r=!1,groupId:t}=e;const n=(0,i.k6)(),o=function(e){let{queryString:r=!1,groupId:t}=e;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:r,groupId:t});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const r=new URLSearchParams(n.location.search);r.set(o,e),n.replace({...n.location,search:r.toString()})}),[o,n])]}function h(e){const{defaultValue:r,queryString:t=!1,groupId:n}=e,o=p(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:r,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!f({value:r,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${r}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return r}const n=t.find((e=>e.default))??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:r,tabValues:o}))),[s,u]=m({queryString:t,groupId:n}),[d,h]=function(e){let{groupId:r}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(r),[n,o]=(0,c.Nk)(t);return[n,(0,a.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:n}),b=(()=>{const e=s??d;return f({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{b&&i(b)}),[b]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!f({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),h(e)}),[u,h,o]),tabValues:o}}var b=t(2389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:r,block:t,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,l.o5)(),p=e=>{const r=e.currentTarget,t=c.indexOf(r),n=u[t].value;n!==i&&(d(r),s(n))},f=e=>{let r=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;r=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;r=c[t]??c[c.length-1];break}}r?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":t},r)},u.map((e=>{let{value:r,label:t,attributes:l}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===r?0:-1,"aria-selected":i===r,key:r,ref:e=>c.push(e),onKeyDown:f,onClick:p},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===r})}),t??r)})))}function y(e){let{lazy:r,children:t,selectedValue:n}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(r){const e=o.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,r)=>(0,a.cloneElement)(e,{key:r,hidden:e.props.value!==n}))))}function k(e){const r=h(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},a.createElement(v,(0,n.Z)({},e,r)),a.createElement(y,(0,n.Z)({},e,r)))}function E(e){const r=(0,b.Z)();return a.createElement(k,(0,n.Z)({key:String(r)},e))}},2579:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>s,default:()=>m,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var n=t(7462),a=(t(7294),t(3905)),o=t(4866),l=t(5162);const i={id:"error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",sidebar_position:4},s=void 0,u={unversionedId:"guide/error-handling",id:"guide/error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",source:"@site/docs/core/guide/error-handling.md",sourceDirName:"guide",slug:"/guide/error-handling",permalink:"/next/guide/error-handling",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/error-handling.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:4,frontMatter:{id:"error-handling",title:"\ud83d\udc1b Error Handling",description:"Fiber supports centralized error handling by returning an error to the handler which allows you to log errors to external services or send a customized HTTP response to the client.",sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcdd Templates",permalink:"/next/guide/templates"},next:{title:"\ud83d\udd0e Validation",permalink:"/next/guide/validation"}},c={},d=[{value:"Catching Errors",id:"catching-errors",level:2},{value:"Default Error Handler",id:"default-error-handler",level:2},{value:"Custom Error Handler",id:"custom-error-handler",level:2}],p={toc:d},f="wrapper";function m(e){let{components:r,...t}=e;return(0,a.kt)(f,(0,n.Z)({},p,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"catching-errors"},"Catching Errors"),(0,a.kt)("p",null,"It\u2019s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them."),(0,a.kt)(o.Z,{mdxType:"Tabs"},(0,a.kt)(l.Z,{value:"example",label:"Example",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/", func(c *fiber.Ctx) error {\n // Pass error to Fiber\n return c.SendFile("file-does-not-exist")\n})\n')))),(0,a.kt)("p",null,"Fiber does not handle ",(0,a.kt)("a",{parentName:"p",href:"https://go.dev/blog/defer-panic-and-recover"},"panics")," by default. To recover from a panic thrown by any handler in the stack, you need to include the ",(0,a.kt)("inlineCode",{parentName:"p"},"Recover")," middleware below:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'package main\n\nimport (\n "log"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/recover"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Use(recover.New())\n\n app.Get("/", func(c *fiber.Ctx) error {\n panic("This panic is caught by fiber")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,a.kt)("p",null,"You could use Fiber's custom error struct to pass an additional ",(0,a.kt)("inlineCode",{parentName:"p"},"status code")," using ",(0,a.kt)("inlineCode",{parentName:"p"},"fiber.NewError()"),". It's optional to pass a message; if this is left empty, it will default to the status code message ","(",(0,a.kt)("inlineCode",{parentName:"p"},"404")," equals ",(0,a.kt)("inlineCode",{parentName:"p"},"Not Found"),")","."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n // 503 Service Unavailable\n return fiber.ErrServiceUnavailable\n\n // 503 On vacation!\n return fiber.NewError(fiber.StatusServiceUnavailable, "On vacation!")\n})\n')),(0,a.kt)("h2",{id:"default-error-handler"},"Default Error Handler"),(0,a.kt)("p",null,"Fiber provides an error handler by default. For a standard error, the response is sent as ",(0,a.kt)("strong",{parentName:"p"},"500 Internal Server Error"),". If the error is of type ",(0,a.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/gofiber/fiber#Error"},"fiber.Error"),", the response is sent with the provided status code and message."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"// Default error handler\nvar DefaultErrorHandler = func(c *fiber.Ctx, err error) error {\n // Status code defaults to 500\n code := fiber.StatusInternalServerError\n\n // Retrieve the custom status code if it's a *fiber.Error\n var e *fiber.Error\n if errors.As(err, &e) {\n code = e.Code\n }\n\n // Set Content-Type: text/plain; charset=utf-8\n c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)\n\n // Return status code with error message\n return c.Status(code).SendString(err.Error())\n}\n")),(0,a.kt)("h2",{id:"custom-error-handler"},"Custom Error Handler"),(0,a.kt)("p",null,"A custom error handler can be set using a ",(0,a.kt)("a",{parentName:"p",href:"/next/api/fiber#config"},"Config "),"when initializing a ",(0,a.kt)("a",{parentName:"p",href:"/next/api/fiber#new"},"Fiber instance"),"."),(0,a.kt)("p",null,"In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response."),(0,a.kt)("p",null,"The following example shows how to display error pages for different types of errors."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Create a new fiber instance with custom config\napp := fiber.New(fiber.Config{\n // Override default error handler\n ErrorHandler: func(ctx *fiber.Ctx, err error) error {\n // Status code defaults to 500\n code := fiber.StatusInternalServerError\n\n // Retrieve the custom status code if it\'s a *fiber.Error\n var e *fiber.Error\n if errors.As(err, &e) {\n code = e.Code\n }\n\n // Send custom error page\n err = ctx.Status(code).SendFile(fmt.Sprintf("./%d.html", code))\n if err != nil {\n // In case the SendFile fails\n return ctx.Status(fiber.StatusInternalServerError).SendString("Internal Server Error")\n }\n\n // Return from handler\n return nil\n },\n})\n\n// ...\n')),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Special thanks to the ",(0,a.kt)("a",{parentName:"p",href:"https://echo.labstack.com/"},"Echo")," & ",(0,a.kt)("a",{parentName:"p",href:"https://expressjs.com/"},"Express")," framework for inspiration regarding error handling.")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/57eea674.e84bb09f.js b/assets/js/57eea674.e84bb09f.js new file mode 100644 index 00000000000..fc05012f5e8 --- /dev/null +++ b/assets/js/57eea674.e84bb09f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7766],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),g=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=g(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=g(n),f=r,d=u["".concat(s,".").concat(f)]||u[f]||c[f]||o;return n?a.createElement(d,i(i({ref:t},p),{},{components:n})):a.createElement(d,i({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var g=2;g{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var a=n(87462),r=(n(67294),n(3905));const o={id:"arangodb",title:"ArangoDB"},i=void 0,l={unversionedId:"arangodb/arangodb",id:"version-bbolt_v1.x.x/arangodb/arangodb",title:"ArangoDB",description:"Release",source:"@site/storage_versioned_docs/version-bbolt_v1.x.x/arangodb/README.md",sourceDirName:"arangodb",slug:"/arangodb/",permalink:"/storage/arangodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/arangodb/README.md",tags:[],version:"bbolt_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"arangodb",title:"ArangoDB"},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc4b Welcome",permalink:"/storage/"},next:{title:"Azure Blob",permalink:"/storage/azureblob/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:g},u="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=arangodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A ArangoDB storage driver using ",(0,r.kt)("inlineCode",{parentName:"p"},"arangodb/go-driver")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/arangodb/go-driver"},"arangodb/go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() driver.Client\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"ArangoDB is tested on the 2 last (1.14/1.15) ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,r.kt)("p",null,"And then install the mysql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/arangodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/arangodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := arangodb.New()\n\n// Initialize custom config\nstore := arangodb.New(arangodb.Config{\n Host: "http://127.0.0.1",\n Port: 8529,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "http://127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 8529\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing collection\n //\n // Optional. Default is false\n Reset bool\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("p",null,"Used only for optional fields"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "http://127.0.0.1",\n Port: 8529,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/59256a9c.1dcade72.js b/assets/js/59256a9c.1dcade72.js deleted file mode 100644 index 4039b7c9ff8..00000000000 --- a/assets/js/59256a9c.1dcade72.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2609],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=u(r),m=a,f=p["".concat(s,".").concat(m)]||p[m]||g[m]||o;return r?n.createElement(f,i(i({ref:t},c),{},{components:r})):n.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>g,frontMatter:()=>o,metadata:()=>l,toc:()=>u});var n=r(7462),a=(r(7294),r(3905));const o={id:"azureblob",title:"Azure Blob"},i=void 0,l={unversionedId:"azureblob/azureblob",id:"version-ristretto_v1.x.x/azureblob/azureblob",title:"Azure Blob",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/azureblob/README.md",sourceDirName:"azureblob",slug:"/azureblob/",permalink:"/storage/ristretto_v1.x.x/azureblob/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/azureblob/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"azureblob",title:"Azure Blob"},sidebar:"tutorialSidebar",previous:{title:"ArangoDB",permalink:"/storage/ristretto_v1.x.x/arangodb/"},next:{title:"Badger",permalink:"/storage/ristretto_v1.x.x/badger/"}},s={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},p="wrapper";function g(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=azureblob*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://azure.microsoft.com/en-us/products/storage/blobs/#overview"},"Azure Blob storage")," is Microsoft's object storage solution for the cloud."),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"NOTE: Go ",(0,a.kt)("strong",{parentName:"p"},"1.18")," or later is required. Source: ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/Azure/azure-sdk-for-go/blob/main/README.md"},"link"))),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *azblob.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Azure blob storage driver is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the azure blob implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/azureblob\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/azureblob"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := azureblob.New()\n\n// Initialize custom config\nstore := azureblob.New(azureblob.Config{\n Account: "test",\n Container: "test",\n Credentials: Credentials{\n Account: "test",\n Key: "YXp1cml0ZWtleQo=",\n },\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Storage account name.\n Account string\n // Container name.\n Container string\n // Storage endpoint.\n // Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"\n Endpoint string\n // Request timeout.\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n // Reset clears any existing keys in existing container.\n // Optional. Default is false\n Reset bool\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n // Optional. Default is Credentials{}\n Credentials Credentials\n // The maximum number of times requests that encounter retryable failures should be attempted.\n // Optional. Default is 3\n MaxAttempts int\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Account: "",\n Container: "",\n Endpoint: "",\n RequestTimeout: 0,\n Reset: false,\n MaxAttempts: 3,\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/59256a9c.46d3b834.js b/assets/js/59256a9c.46d3b834.js new file mode 100644 index 00000000000..178771806d4 --- /dev/null +++ b/assets/js/59256a9c.46d3b834.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2609],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=u(r),m=a,f=p["".concat(s,".").concat(m)]||p[m]||g[m]||o;return r?n.createElement(f,i(i({ref:t},c),{},{components:r})):n.createElement(f,i({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>g,frontMatter:()=>o,metadata:()=>l,toc:()=>u});var n=r(87462),a=(r(67294),r(3905));const o={id:"azureblob",title:"Azure Blob"},i=void 0,l={unversionedId:"azureblob/azureblob",id:"version-ristretto_v1.x.x/azureblob/azureblob",title:"Azure Blob",description:"Release",source:"@site/storage_versioned_docs/version-ristretto_v1.x.x/azureblob/README.md",sourceDirName:"azureblob",slug:"/azureblob/",permalink:"/storage/ristretto_v1.x.x/azureblob/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/azureblob/README.md",tags:[],version:"ristretto_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"azureblob",title:"Azure Blob"},sidebar:"tutorialSidebar",previous:{title:"ArangoDB",permalink:"/storage/ristretto_v1.x.x/arangodb/"},next:{title:"Badger",permalink:"/storage/ristretto_v1.x.x/badger/"}},s={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},p="wrapper";function g(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=azureblob*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-azureblob.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://azure.microsoft.com/en-us/products/storage/blobs/#overview"},"Azure Blob storage")," is Microsoft's object storage solution for the cloud."),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"NOTE: Go ",(0,a.kt)("strong",{parentName:"p"},"1.18")," or later is required. Source: ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/Azure/azure-sdk-for-go/blob/main/README.md"},"link"))),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *azblob.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Azure blob storage driver is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the azure blob implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/azureblob\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/azureblob"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := azureblob.New()\n\n// Initialize custom config\nstore := azureblob.New(azureblob.Config{\n Account: "test",\n Container: "test",\n Credentials: Credentials{\n Account: "test",\n Key: "YXp1cml0ZWtleQo=",\n },\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Storage account name.\n Account string\n // Container name.\n Container string\n // Storage endpoint.\n // Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"\n Endpoint string\n // Request timeout.\n // Optional. Default is 0 (no timeout)\n RequestTimeout time.Duration\n // Reset clears any existing keys in existing container.\n // Optional. Default is false\n Reset bool\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n // Optional. Default is Credentials{}\n Credentials Credentials\n // The maximum number of times requests that encounter retryable failures should be attempted.\n // Optional. Default is 3\n MaxAttempts int\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Account: "",\n Container: "",\n Endpoint: "",\n RequestTimeout: 0,\n Reset: false,\n MaxAttempts: 3,\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5aebd6e8.232292b5.js b/assets/js/5aebd6e8.232292b5.js deleted file mode 100644 index 3c0d1db291d..00000000000 --- a/assets/js/5aebd6e8.232292b5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2342],{3905:(e,r,t)=>{t.d(r,{Zo:()=>u,kt:()=>m});var n=t(7294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=n.createContext({}),d=function(e){var r=n.useContext(s),t=r;return e&&(t="function"==typeof e?e(r):o(o({},r),e)),t},u=function(e){var r=d(e.components);return n.createElement(s.Provider,{value:r},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},g=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=d(t),g=a,m=c["".concat(s,".").concat(g)]||c[g]||p[g]||i;return t?n.createElement(m,o(o({ref:r},u),{},{components:t})):n.createElement(m,o({ref:r},u))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=g;var l={};for(var s in r)hasOwnProperty.call(r,s)&&(l[s]=r[s]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{t.r(r),t.d(r,{assets:()=>s,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var n=t(7462),a=(t(7294),t(3905));const i={id:"validating",title:"\ud83d\udd0e Validating",sidebar_position:4},o=void 0,l={unversionedId:"guide/validating",id:"version-v1.x/guide/validating",title:"\ud83d\udd0e Validating",description:"Validator package",source:"@site/versioned_docs/version-v1.x/guide/validating.md",sourceDirName:"guide",slug:"/guide/validating",permalink:"/v1.x/guide/validating",draft:!1,tags:[],version:"v1.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:4,frontMatter:{id:"validating",title:"\ud83d\udd0e Validating",sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcdd Templates",permalink:"/v1.x/guide/templates"},next:{title:"\ud83d\udc1b Error Handling",permalink:"/v1.x/guide/error-handling"}},s={},d=[{value:"Validator package",id:"validator-package",level:2}],u={toc:d},c="wrapper";function p(e){let{components:r,...t}=e;return(0,a.kt)(c,(0,n.Z)({},u,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"validator-package"},"Validator package"),(0,a.kt)("p",null,"Fiber can make ",(0,a.kt)("em",{parentName:"p"},"great")," use of the validator package to ensure correct validation of data to store."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/go-playground/validator"},"Official validator Github page ","(","Installation, use, examples..",")","."))),(0,a.kt)("p",null,"You can find the detailed descriptions of the ",(0,a.kt)("em",{parentName:"p"},"validations")," used in the fields contained on the structs below:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://pkg.go.dev/github.com/go-playground/validator?tab=doc"},"Detailed docs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Validation Example"',title:'"Validation','Example"':!0},'type Job struct{\n Type string `validate:"required,min=3,max=32"`\n Salary int `validate:"required,number"`\n}\n\ntype User struct{\n Name string `validate:"required,min=3,max=32"`\n IsActive bool `validate:"required,eq=True|eq=False"`\n Email string `validate:"required,email,min=6,max=32"`\n Job Job `validate:"dive"`\n}\n\ntype ErrorResponse struct {\n FailedField string\n Tag string\n Value string\n}\n\nfunc ValidateStruct(user User) []*ErrorResponse {\n var errors []*ErrorResponse\n validate = validator.New()\n err := validate.Struct(user)\n if err != nil {\n for _, err := range err.(validator.ValidationErrors) {\n var element ErrorResponse\n element.FailedField = err.StructNamespace()\n element.Tag = err.Tag()\n element.Value = err.Param()\n errors = append(errors, &element)\n }\n }\n return errors\n}\n\nfunc AddUser(c *fiber.Ctx) {\n //Connect to database\n user := new(User)\n if err := c.BodyParser(user); err != nil {\n errors := ValidateStruct()\n if errors != nil {\n c.JSON(errors)\n return\n }\n }\n //Do something else here\n\n //Return user\n c.JSON(user)\n}\n\n// Running a test with the following curl commands\n\n// curl -X POST -H "Content-Type: application/json" --data "{\\"name\\":\\"john\\",\\"isactive\\":\\"True\\"}" http://localhost:8080/register/user\n\n// Results in \n\n// [{"FailedField":"User.Email","Tag":"required","Value":""},{"FailedField":"User.Job.Salary","Tag":"required","Value":""},{"FailedField":"User.Job.Type","Tag":"required","Value":""}]\u23ce\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5aebd6e8.31f4ec2e.js b/assets/js/5aebd6e8.31f4ec2e.js new file mode 100644 index 00000000000..11001325e42 --- /dev/null +++ b/assets/js/5aebd6e8.31f4ec2e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2342],{3905:(e,r,t)=>{t.d(r,{Zo:()=>u,kt:()=>m});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=n.createContext({}),d=function(e){var r=n.useContext(s),t=r;return e&&(t="function"==typeof e?e(r):o(o({},r),e)),t},u=function(e){var r=d(e.components);return n.createElement(s.Provider,{value:r},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},g=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=d(t),g=a,m=c["".concat(s,".").concat(g)]||c[g]||p[g]||i;return t?n.createElement(m,o(o({ref:r},u),{},{components:t})):n.createElement(m,o({ref:r},u))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=g;var l={};for(var s in r)hasOwnProperty.call(r,s)&&(l[s]=r[s]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{t.r(r),t.d(r,{assets:()=>s,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var n=t(87462),a=(t(67294),t(3905));const i={id:"validating",title:"\ud83d\udd0e Validating",sidebar_position:4},o=void 0,l={unversionedId:"guide/validating",id:"version-v1.x/guide/validating",title:"\ud83d\udd0e Validating",description:"Validator package",source:"@site/versioned_docs/version-v1.x/guide/validating.md",sourceDirName:"guide",slug:"/guide/validating",permalink:"/v1.x/guide/validating",draft:!1,tags:[],version:"v1.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:4,frontMatter:{id:"validating",title:"\ud83d\udd0e Validating",sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcdd Templates",permalink:"/v1.x/guide/templates"},next:{title:"\ud83d\udc1b Error Handling",permalink:"/v1.x/guide/error-handling"}},s={},d=[{value:"Validator package",id:"validator-package",level:2}],u={toc:d},c="wrapper";function p(e){let{components:r,...t}=e;return(0,a.kt)(c,(0,n.Z)({},u,t,{components:r,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"validator-package"},"Validator package"),(0,a.kt)("p",null,"Fiber can make ",(0,a.kt)("em",{parentName:"p"},"great")," use of the validator package to ensure correct validation of data to store."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/go-playground/validator"},"Official validator Github page ","(","Installation, use, examples..",")","."))),(0,a.kt)("p",null,"You can find the detailed descriptions of the ",(0,a.kt)("em",{parentName:"p"},"validations")," used in the fields contained on the structs below:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://pkg.go.dev/github.com/go-playground/validator?tab=doc"},"Detailed docs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Validation Example"',title:'"Validation','Example"':!0},'type Job struct{\n Type string `validate:"required,min=3,max=32"`\n Salary int `validate:"required,number"`\n}\n\ntype User struct{\n Name string `validate:"required,min=3,max=32"`\n IsActive bool `validate:"required,eq=True|eq=False"`\n Email string `validate:"required,email,min=6,max=32"`\n Job Job `validate:"dive"`\n}\n\ntype ErrorResponse struct {\n FailedField string\n Tag string\n Value string\n}\n\nfunc ValidateStruct(user User) []*ErrorResponse {\n var errors []*ErrorResponse\n validate = validator.New()\n err := validate.Struct(user)\n if err != nil {\n for _, err := range err.(validator.ValidationErrors) {\n var element ErrorResponse\n element.FailedField = err.StructNamespace()\n element.Tag = err.Tag()\n element.Value = err.Param()\n errors = append(errors, &element)\n }\n }\n return errors\n}\n\nfunc AddUser(c *fiber.Ctx) {\n //Connect to database\n user := new(User)\n if err := c.BodyParser(user); err != nil {\n errors := ValidateStruct()\n if errors != nil {\n c.JSON(errors)\n return\n }\n }\n //Do something else here\n\n //Return user\n c.JSON(user)\n}\n\n// Running a test with the following curl commands\n\n// curl -X POST -H "Content-Type: application/json" --data "{\\"name\\":\\"john\\",\\"isactive\\":\\"True\\"}" http://localhost:8080/register/user\n\n// Results in \n\n// [{"FailedField":"User.Email","Tag":"required","Value":""},{"FailedField":"User.Job.Salary","Tag":"required","Value":""},{"FailedField":"User.Job.Type","Tag":"required","Value":""}]\u23ce\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5f0d6a9f.5156ebbc.js b/assets/js/5f0d6a9f.5156ebbc.js new file mode 100644 index 00000000000..5b65246c011 --- /dev/null +++ b/assets/js/5f0d6a9f.5156ebbc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9042],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},g=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,g=s(e,["components","mdxType","originalType","parentName"]),c=p(n),f=a,d=c["".concat(l,".").concat(f)]||c[f]||u[f]||o;return n?r.createElement(d,i(i({ref:t},g),{},{components:n})):r.createElement(d,i({ref:t},g))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:a,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const o={id:"postgres",title:"Postgres"},i=void 0,s={unversionedId:"postgres/postgres",id:"version-etcd_v1.x.x/postgres/postgres",title:"Postgres",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/postgres/README.md",sourceDirName:"postgres",slug:"/postgres/",permalink:"/storage/etcd_v1.x.x/postgres/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/postgres/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"postgres",title:"Postgres"},sidebar:"tutorialSidebar",previous:{title:"Pebble",permalink:"/storage/etcd_v1.x.x/pebble/"},next:{title:"Redis",permalink:"/storage/etcd_v1.x.x/redis/"}},l={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:p},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=postgres*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Postgres storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/jackc/pgx"},"jackc/pgx"),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *pgxpool.Pool\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Postgres is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the postgres implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/postgres/v2\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/postgres/v2"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := postgres.New()\n\n// Initialize custom config\nstore := postgres.New(postgres.Config{\n Db: dbPool,\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // DB pgxpool.Pool object will override connection uri and other connection fields\n //\n // Optional. Default is nil\n DB *pgxpool.Pool\n\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 5432\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SSLMode string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 5432,\n Database: "fiber",\n Table: "fiber_storage",\n SSLMode: "disable",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5f0d6a9f.860a40b7.js b/assets/js/5f0d6a9f.860a40b7.js deleted file mode 100644 index 6839b828bee..00000000000 --- a/assets/js/5f0d6a9f.860a40b7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9042],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>d});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},g=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,g=s(e,["components","mdxType","originalType","parentName"]),c=p(n),f=a,d=c["".concat(l,".").concat(f)]||c[f]||u[f]||o;return n?r.createElement(d,i(i({ref:t},g),{},{components:n})):r.createElement(d,i({ref:t},g))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:a,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const o={id:"postgres",title:"Postgres"},i=void 0,s={unversionedId:"postgres/postgres",id:"version-etcd_v1.x.x/postgres/postgres",title:"Postgres",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/postgres/README.md",sourceDirName:"postgres",slug:"/postgres/",permalink:"/storage/etcd_v1.x.x/postgres/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/postgres/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"postgres",title:"Postgres"},sidebar:"tutorialSidebar",previous:{title:"Pebble",permalink:"/storage/etcd_v1.x.x/pebble/"},next:{title:"Redis",permalink:"/storage/etcd_v1.x.x/redis/"}},l={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:p},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=postgres*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Postgres storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/jackc/pgx"},"jackc/pgx"),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *pgxpool.Pool\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Postgres is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the postgres implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/postgres/v2\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/postgres/v2"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := postgres.New()\n\n// Initialize custom config\nstore := postgres.New(postgres.Config{\n Db: dbPool,\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // DB pgxpool.Pool object will override connection uri and other connection fields\n //\n // Optional. Default is nil\n DB *pgxpool.Pool\n\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 5432\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SSLMode string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 5432,\n Database: "fiber",\n Table: "fiber_storage",\n SSLMode: "disable",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5f49a855.836ed532.js b/assets/js/5f49a855.836ed532.js deleted file mode 100644 index 64bd9c42e6c..00000000000 --- a/assets/js/5f49a855.836ed532.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7554],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,p=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=s(r),f=a,m=c["".concat(l,".").concat(f)]||c[f]||d[f]||p;return r?n.createElement(m,o(o({ref:t},u),{},{components:r})):n.createElement(m,o({ref:t},u))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var p=r.length,o=new Array(p);o[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:a,o[1]=i;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>p,metadata:()=>i,toc:()=>s});var n=r(7462),a=(r(7294),r(3905));const p={id:"route-handlers",title:"Route Handlers"},o=void 0,i={unversionedId:"partials/routing/route-handlers",id:"version-v2.x/partials/routing/route-handlers",title:"Route Handlers",description:"Registers a route bound to a specific HTTP method.",source:"@site/versioned_docs/version-v2.x/partials/routing/handler.md",sourceDirName:"partials/routing",slug:"/partials/routing/route-handlers",permalink:"/partials/routing/route-handlers",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"route-handlers",title:"Route Handlers"}},l={},s=[],u={toc:s},c="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Registers a route bound to a specific ",(0,a.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods"},"HTTP method"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signatures"',title:'"Signatures"'},"// HTTP methods\nfunc (app *App) Get(path string, handlers ...Handler) Router\nfunc (app *App) Head(path string, handlers ...Handler) Router\nfunc (app *App) Post(path string, handlers ...Handler) Router\nfunc (app *App) Put(path string, handlers ...Handler) Router\nfunc (app *App) Delete(path string, handlers ...Handler) Router\nfunc (app *App) Connect(path string, handlers ...Handler) Router\nfunc (app *App) Options(path string, handlers ...Handler) Router\nfunc (app *App) Trace(path string, handlers ...Handler) Router\nfunc (app *App) Patch(path string, handlers ...Handler) Router\n\n// Add allows you to specifiy a method as value\nfunc (app *App) Add(method, path string, handlers ...Handler) Router\n\n// All will register the route on all HTTP methods\n// Almost the same as app.Use but not bound to prefixes\nfunc (app *App) All(path string, handlers ...Handler) Router\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Simple GET handler\napp.Get("/api/list", func(c *fiber.Ctx) error {\n return c.SendString("I\'m a GET request!")\n})\n\n// Simple POST handler\napp.Post("/api/register", func(c *fiber.Ctx) error {\n return c.SendString("I\'m a POST request!")\n})\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Use")," can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. ",(0,a.kt)("inlineCode",{parentName:"p"},"/john")," will match ",(0,a.kt)("inlineCode",{parentName:"p"},"/john/doe"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"/johnnnnn")," etc"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Use(args ...interface{}) Router\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Match any request\napp.Use(func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Match request starting with /api\napp.Use("/api", func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Match requests starting with /api or /home (multiple-prefix support)\napp.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Attach multiple handlers \napp.Use("/api", func(c *fiber.Ctx) error {\n c.Set("X-Custom-Header", random.String(32))\n return c.Next()\n}, func(c *fiber.Ctx) error {\n return c.Next()\n})\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5f49a855.cb6855e7.js b/assets/js/5f49a855.cb6855e7.js new file mode 100644 index 00000000000..43ea7d036fa --- /dev/null +++ b/assets/js/5f49a855.cb6855e7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7554],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,p=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),c=s(r),f=a,m=c["".concat(l,".").concat(f)]||c[f]||d[f]||p;return r?n.createElement(m,o(o({ref:t},u),{},{components:r})):n.createElement(m,o({ref:t},u))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var p=r.length,o=new Array(p);o[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:a,o[1]=i;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>p,metadata:()=>i,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));const p={id:"route-handlers",title:"Route Handlers"},o=void 0,i={unversionedId:"partials/routing/route-handlers",id:"version-v2.x/partials/routing/route-handlers",title:"Route Handlers",description:"Registers a route bound to a specific HTTP method.",source:"@site/versioned_docs/version-v2.x/partials/routing/handler.md",sourceDirName:"partials/routing",slug:"/partials/routing/route-handlers",permalink:"/partials/routing/route-handlers",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"route-handlers",title:"Route Handlers"}},l={},s=[],u={toc:s},c="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Registers a route bound to a specific ",(0,a.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods"},"HTTP method"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signatures"',title:'"Signatures"'},"// HTTP methods\nfunc (app *App) Get(path string, handlers ...Handler) Router\nfunc (app *App) Head(path string, handlers ...Handler) Router\nfunc (app *App) Post(path string, handlers ...Handler) Router\nfunc (app *App) Put(path string, handlers ...Handler) Router\nfunc (app *App) Delete(path string, handlers ...Handler) Router\nfunc (app *App) Connect(path string, handlers ...Handler) Router\nfunc (app *App) Options(path string, handlers ...Handler) Router\nfunc (app *App) Trace(path string, handlers ...Handler) Router\nfunc (app *App) Patch(path string, handlers ...Handler) Router\n\n// Add allows you to specifiy a method as value\nfunc (app *App) Add(method, path string, handlers ...Handler) Router\n\n// All will register the route on all HTTP methods\n// Almost the same as app.Use but not bound to prefixes\nfunc (app *App) All(path string, handlers ...Handler) Router\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Simple GET handler\napp.Get("/api/list", func(c *fiber.Ctx) error {\n return c.SendString("I\'m a GET request!")\n})\n\n// Simple POST handler\napp.Post("/api/register", func(c *fiber.Ctx) error {\n return c.SendString("I\'m a POST request!")\n})\n')),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Use")," can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. ",(0,a.kt)("inlineCode",{parentName:"p"},"/john")," will match ",(0,a.kt)("inlineCode",{parentName:"p"},"/john/doe"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"/johnnnnn")," etc"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (app *App) Use(args ...interface{}) Router\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Examples"',title:'"Examples"'},'// Match any request\napp.Use(func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Match request starting with /api\napp.Use("/api", func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Match requests starting with /api or /home (multiple-prefix support)\napp.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {\n return c.Next()\n})\n\n// Attach multiple handlers \napp.Use("/api", func(c *fiber.Ctx) error {\n c.Set("X-Custom-Header", random.String(32))\n return c.Next()\n}, func(c *fiber.Ctx) error {\n return c.Next()\n})\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/60178aaa.0deb8b9a.js b/assets/js/60178aaa.0deb8b9a.js deleted file mode 100644 index e4615771e10..00000000000 --- a/assets/js/60178aaa.0deb8b9a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5594],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),g=a,f=u["".concat(s,".").concat(g)]||u[g]||d[g]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var r=n(7462),a=(n(7294),n(3905));const o={id:"etcd",title:"Etcd"},i=void 0,l={unversionedId:"etcd/etcd",id:"version-etcd_v1.x.x/etcd/etcd",title:"Etcd",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/etcd/README.md",sourceDirName:"etcd",slug:"/etcd/",permalink:"/storage/etcd_v1.x.x/etcd/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/etcd/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"etcd",title:"Etcd"},sidebar:"tutorialSidebar",previous:{title:"DynamoDB",permalink:"/storage/etcd_v1.x.x/dynamodb/"},next:{title:"Memcache",permalink:"/storage/etcd_v1.x.x/memcache/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:c},u="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=etcd*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Etcd storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/etcd-io/etcd"},(0,a.kt)("inlineCode",{parentName:"a"},"etcd-io/etcd")),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) *Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *clientv3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Etcd is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the etcd implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/etcd\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/etcd"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := etcd.New()\n\n// Initialize custom config\nstore := etcd.New(Config{\n Endpoints: []string{"localhost:2379"},\n})\n\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Endpoints is a list of URLs.\n Endpoints []string\n // DialTimeout is the timeout for failing to establish a connection.\n DialTimeout time.Duration\n // Username is a username for authentication.\n Username string\n // Password is a password for authentication.\n Password string\n // TLS holds the client secure credentials, if any.\n TLS *tls.Config\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Endpoints: []string{"localhost:2379"},\n DialTimeout: 2 * time.Second,\n Username: "",\n Password: "",\n TLS: nil,\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/60178aaa.af414b16.js b/assets/js/60178aaa.af414b16.js new file mode 100644 index 00000000000..39f6919355a --- /dev/null +++ b/assets/js/60178aaa.af414b16.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5594],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),g=a,f=u["".concat(s,".").concat(g)]||u[g]||d[g]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));const o={id:"etcd",title:"Etcd"},i=void 0,l={unversionedId:"etcd/etcd",id:"version-etcd_v1.x.x/etcd/etcd",title:"Etcd",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/etcd/README.md",sourceDirName:"etcd",slug:"/etcd/",permalink:"/storage/etcd_v1.x.x/etcd/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/etcd/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"etcd",title:"Etcd"},sidebar:"tutorialSidebar",previous:{title:"DynamoDB",permalink:"/storage/etcd_v1.x.x/dynamodb/"},next:{title:"Memcache",permalink:"/storage/etcd_v1.x.x/memcache/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:c},u="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=etcd*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Etcd storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/etcd-io/etcd"},(0,a.kt)("inlineCode",{parentName:"a"},"etcd-io/etcd")),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) *Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *clientv3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Etcd is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"And then install the etcd implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/etcd\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/etcd"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := etcd.New()\n\n// Initialize custom config\nstore := etcd.New(Config{\n Endpoints: []string{"localhost:2379"},\n})\n\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Endpoints is a list of URLs.\n Endpoints []string\n // DialTimeout is the timeout for failing to establish a connection.\n DialTimeout time.Duration\n // Username is a username for authentication.\n Username string\n // Password is a password for authentication.\n Password string\n // TLS holds the client secure credentials, if any.\n TLS *tls.Config\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Endpoints: []string{"localhost:2379"},\n DialTimeout: 2 * time.Second,\n Username: "",\n Password: "",\n TLS: nil,\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/60c7cba8.4147280a.js b/assets/js/60c7cba8.4147280a.js deleted file mode 100644 index db72c8ce41c..00000000000 --- a/assets/js/60c7cba8.4147280a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8467],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),f=c(n),b=i,d=f["".concat(l,".").concat(b)]||f[b]||u[b]||a;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=b;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[f]="string"==typeof e?e:i,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var r=n(7462),i=(n(7294),n(3905));const a={id:"fibersentry",title:"Fibersentry"},o=void 0,s={unversionedId:"fibersentry/fibersentry",id:"version-fibersentry_v1.x.x/fibersentry/fibersentry",title:"Fibersentry",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/fibersentry/README.md",sourceDirName:"fibersentry",slug:"/fibersentry/",permalink:"/contrib/fibersentry_v1.x.x/fibersentry/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fibersentry/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fibersentry",title:"Fibersentry"},sidebar:"tutorialSidebar",previous:{title:"Fibernewrelic",permalink:"/contrib/fibersentry_v1.x.x/fibernewrelic/"},next:{title:"Fiberzap",permalink:"/contrib/fibersentry_v1.x.x/fiberzap/"}},l={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Accessing Context in BeforeSend callback",id:"accessing-context-in-beforesend-callback",level:3}],p={toc:c},f="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(f,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fibersentry*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://sentry.io/"},"Sentry")," support for Fiber."),(0,i.kt)("h3",{id:"install"},"Install"),(0,i.kt)("p",null,"This middleware supports Fiber v2."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fibersentry\ngo get -u github.com/getsentry/sentry-go\n")),(0,i.kt)("h3",{id:"signature"},"Signature"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"fibersentry.New(config ...Config) fiber.Handler\n")),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic configures whether Sentry should repanic after recovery. Set to true, if ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery configures whether you want to block the request before moving forward with the response. If ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used, it's safe to either skip this option or set it to false."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout for the event delivery requests."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Second * 2"))))),(0,i.kt)("h3",{id:"usage"},"Usage"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry")," attaches an instance of ",(0,i.kt)("inlineCode",{parentName:"p"},"*sentry.Hub")," (",(0,i.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/getsentry/sentry-go#Hub"},"https://godoc.org/github.com/getsentry/sentry-go#Hub"),") to the request's context, which makes it available throughout the rest of the request's lifetime.\nYou can access it by using the ",(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry.GetHubFromContext()")," method on the context itself in any of your proceeding middleware and routes.\nAnd it should be used instead of the global ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureMessage"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureException"),", or any other calls, as it keeps the separation of data between the requests."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Keep in mind that ",(0,i.kt)("inlineCode",{parentName:"strong"},"*sentry.Hub")," won't be available in middleware attached before to ",(0,i.kt)("inlineCode",{parentName:"strong"},"fibersentry"),"!")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "log"\n\n "github.com/getsentry/sentry-go"\n "github.com/gofiber/contrib/fibersentry"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/utils"\n)\n\nfunc main() {\n _ = sentry.Init(sentry.ClientOptions{\n Dsn: "",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(utils.ImmutableString(c.Hostname()))\n }\n }\n fmt.Println(event)\n return event\n },\n Debug: true,\n AttachStacktrace: true,\n })\n\n app := fiber.New()\n\n app.Use(fibersentry.New(fibersentry.Config{\n Repanic: true,\n WaitForDelivery: true,\n }))\n\n enhanceSentryEvent := func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")\n }\n return c.Next()\n }\n\n app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {\n panic("y tho")\n })\n\n app.All("/", func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.WithScope(func(scope *sentry.Scope) {\n scope.SetExtra("unwantedQuery", "someQueryDataMaybe")\n hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")\n })\n }\n return c.SendStatus(fiber.StatusOK)\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,i.kt)("h3",{id:"accessing-context-in-beforesend-callback"},"Accessing Context in ",(0,i.kt)("inlineCode",{parentName:"h3"},"BeforeSend")," callback"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'sentry.Init(sentry.ClientOptions{\n Dsn: "your-public-dsn",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(c.Hostname())\n }\n }\n return event\n },\n})\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/60c7cba8.8f874307.js b/assets/js/60c7cba8.8f874307.js new file mode 100644 index 00000000000..9893a29fe91 --- /dev/null +++ b/assets/js/60c7cba8.8f874307.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8467],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),f=c(n),b=i,d=f["".concat(l,".").concat(b)]||f[b]||u[b]||a;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=b;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[f]="string"==typeof e?e:i,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var r=n(87462),i=(n(67294),n(3905));const a={id:"fibersentry",title:"Fibersentry"},o=void 0,s={unversionedId:"fibersentry/fibersentry",id:"version-fibersentry_v1.x.x/fibersentry/fibersentry",title:"Fibersentry",description:"Release",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/fibersentry/README.md",sourceDirName:"fibersentry",slug:"/fibersentry/",permalink:"/contrib/fibersentry_v1.x.x/fibersentry/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fibersentry/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fibersentry",title:"Fibersentry"},sidebar:"tutorialSidebar",previous:{title:"Fibernewrelic",permalink:"/contrib/fibersentry_v1.x.x/fibernewrelic/"},next:{title:"Fiberzap",permalink:"/contrib/fibersentry_v1.x.x/fiberzap/"}},l={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Accessing Context in BeforeSend callback",id:"accessing-context-in-beforesend-callback",level:3}],p={toc:c},f="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(f,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fibersentry*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://sentry.io/"},"Sentry")," support for Fiber."),(0,i.kt)("h3",{id:"install"},"Install"),(0,i.kt)("p",null,"This middleware supports Fiber v2."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fibersentry\ngo get -u github.com/getsentry/sentry-go\n")),(0,i.kt)("h3",{id:"signature"},"Signature"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"fibersentry.New(config ...Config) fiber.Handler\n")),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic configures whether Sentry should repanic after recovery. Set to true, if ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery configures whether you want to block the request before moving forward with the response. If ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used, it's safe to either skip this option or set it to false."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout for the event delivery requests."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Second * 2"))))),(0,i.kt)("h3",{id:"usage"},"Usage"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry")," attaches an instance of ",(0,i.kt)("inlineCode",{parentName:"p"},"*sentry.Hub")," (",(0,i.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/getsentry/sentry-go#Hub"},"https://godoc.org/github.com/getsentry/sentry-go#Hub"),") to the request's context, which makes it available throughout the rest of the request's lifetime.\nYou can access it by using the ",(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry.GetHubFromContext()")," method on the context itself in any of your proceeding middleware and routes.\nAnd it should be used instead of the global ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureMessage"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureException"),", or any other calls, as it keeps the separation of data between the requests."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Keep in mind that ",(0,i.kt)("inlineCode",{parentName:"strong"},"*sentry.Hub")," won't be available in middleware attached before to ",(0,i.kt)("inlineCode",{parentName:"strong"},"fibersentry"),"!")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "log"\n\n "github.com/getsentry/sentry-go"\n "github.com/gofiber/contrib/fibersentry"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/utils"\n)\n\nfunc main() {\n _ = sentry.Init(sentry.ClientOptions{\n Dsn: "",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(utils.ImmutableString(c.Hostname()))\n }\n }\n fmt.Println(event)\n return event\n },\n Debug: true,\n AttachStacktrace: true,\n })\n\n app := fiber.New()\n\n app.Use(fibersentry.New(fibersentry.Config{\n Repanic: true,\n WaitForDelivery: true,\n }))\n\n enhanceSentryEvent := func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")\n }\n return c.Next()\n }\n\n app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {\n panic("y tho")\n })\n\n app.All("/", func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.WithScope(func(scope *sentry.Scope) {\n scope.SetExtra("unwantedQuery", "someQueryDataMaybe")\n hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")\n })\n }\n return c.SendStatus(fiber.StatusOK)\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,i.kt)("h3",{id:"accessing-context-in-beforesend-callback"},"Accessing Context in ",(0,i.kt)("inlineCode",{parentName:"h3"},"BeforeSend")," callback"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'sentry.Init(sentry.ClientOptions{\n Dsn: "your-public-dsn",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(c.Hostname())\n }\n }\n return event\n },\n})\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/61265387.8527a486.js b/assets/js/61265387.8527a486.js new file mode 100644 index 00000000000..4b1f45891ca --- /dev/null +++ b/assets/js/61265387.8527a486.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5708],{3905:(e,n,r)=>{r.d(n,{Zo:()=>u,kt:()=>g});var t=r(67294);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function i(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function o(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=t.createContext({}),d=function(e){var n=t.useContext(s),r=n;return e&&(r="function"==typeof e?e(n):o(o({},n),e)),r},u=function(e){var n=d(e.components);return t.createElement(s.Provider,{value:n},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},m=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=d(r),m=a,g=c["".concat(s,".").concat(m)]||c[m]||p[m]||i;return r?t.createElement(g,o(o({ref:n},u),{},{components:r})):t.createElement(g,o({ref:n},u))}));function g(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=m;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{r.r(n),r.d(n,{assets:()=>s,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var t=r(87462),a=(r(67294),r(3905));const i={id:"validation",title:"\ud83d\udd0e Validation",sidebar_position:5},o=void 0,l={unversionedId:"guide/validation",id:"guide/validation",title:"\ud83d\udd0e Validation",description:"Validator package",source:"@site/docs/core/guide/validation.md",sourceDirName:"guide",slug:"/guide/validation",permalink:"/next/guide/validation",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/validation.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:5,frontMatter:{id:"validation",title:"\ud83d\udd0e Validation",sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc1b Error Handling",permalink:"/next/guide/error-handling"},next:{title:"\ud83e\ude9d Hooks",permalink:"/next/guide/hooks"}},s={},d=[{value:"Validator package",id:"validator-package",level:2}],u={toc:d},c="wrapper";function p(e){let{components:n,...r}=e;return(0,a.kt)(c,(0,t.Z)({},u,r,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"validator-package"},"Validator package"),(0,a.kt)("p",null,"Fiber can make ",(0,a.kt)("em",{parentName:"p"},"great")," use of the validator package to ensure correct validation of data to store."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/go-playground/validator"},"Official validator Github page ","(","Installation, use, examples..",")","."))),(0,a.kt)("p",null,"You can find the detailed descriptions of the ",(0,a.kt)("em",{parentName:"p"},"validations")," used in the fields contained on the structs below:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://pkg.go.dev/github.com/go-playground/validator?tab=doc"},"Detailed docs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Validation Example"',title:'"Validation','Example"':!0},'package main\n\nimport (\n "fmt"\n "log"\n "strings"\n\n "github.com/go-playground/validator/v10"\n "github.com/gofiber/fiber/v2"\n)\n\ntype (\n User struct {\n Name string `validate:"required,min=5,max=20"` // Required field, min 5 char long max 20\n Age int `validate:"required,teener"` // Required field, and client needs to implement our \'teener\' tag format which we\'ll see later\n }\n\n ErrorResponse struct {\n Error bool\n FailedField string\n Tag string\n Value interface{}\n }\n\n XValidator struct {\n validator *validator.Validate\n }\n\n GlobalErrorHandlerResp struct {\n Success bool `json:"success"`\n Message string `json:"message"`\n }\n)\n\n// This is the validator instance\n// for more information see: https://github.com/go-playground/validator\nvar validate = validator.New()\n\nfunc (v XValidator) Validate(data interface{}) []ErrorResponse {\n validationErrors := []ErrorResponse{}\n\n errs := validate.Struct(data)\n if errs != nil {\n for _, err := range errs.(validator.ValidationErrors) {\n // In this case data object is actually holding the User struct\n var elem ErrorResponse\n\n elem.FailedField = err.Field() // Export struct field name\n elem.Tag = err.Tag() // Export struct tag\n elem.Value = err.Value() // Export field value\n elem.Error = true\n\n validationErrors = append(validationErrors, elem)\n }\n }\n\n return validationErrors\n}\n\nfunc main() {\n myValidator := &XValidator{\n validator: validate,\n }\n\n app := fiber.New(fiber.Config{\n // Global custom error handler\n ErrorHandler: func(c *fiber.Ctx, err error) error {\n return c.Status(fiber.StatusBadRequest).JSON(GlobalErrorHandlerResp{\n Success: false,\n Message: err.Error(),\n })\n },\n })\n\n // Custom struct validation tag format\n myValidator.validator.RegisterValidation("teener", func(fl validator.FieldLevel) bool {\n // User.Age needs to fit our needs, 12-18 years old.\n return fl.Field().Int() >= 12 && fl.Field().Int() <= 18\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n user := &User{\n Name: c.Query("name"),\n Age: c.QueryInt("age"),\n }\n\n // Validation\n if errs := myValidator.Validate(user); len(errs) > 0 && errs[0].Error {\n errMsgs := make([]string, 0)\n\n for _, err := range errs {\n errMsgs = append(errMsgs, fmt.Sprintf(\n "[%s]: \'%v\' | Needs to implement \'%s\'",\n err.FailedField,\n err.Value,\n err.Tag,\n ))\n }\n\n return &fiber.Error{\n Code: fiber.ErrBadRequest.Code,\n Message: strings.Join(errMsgs, " and "),\n }\n }\n\n // Logic, validated with success\n return c.SendString("Hello, World!")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n/**\nOUTPUT\n\n[1]\nRequest:\n\nGET http://127.0.0.1:3000/\n\nResponse:\n\n{"success":false,"message":"[Name]: \'\' | Needs to implement \'required\' and [Age]: \'0\' | Needs to implement \'required\'"}\n\n[2]\nRequest:\n\nGET http://127.0.0.1:3000/?name=efdal&age=9\n\nResponse:\n{"success":false,"message":"[Age]: \'9\' | Needs to implement \'teener\'"}\n\n[3]\nRequest:\n\nGET http://127.0.0.1:3000/?name=efdal&age=\n\nResponse:\n{"success":false,"message":"[Age]: \'0\' | Needs to implement \'required\'"}\n\n[4]\nRequest:\n\nGET http://127.0.0.1:3000/?name=efdal&age=18\n\nResponse:\nHello, World!\n\n**/\n\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/61265387.a05b84e3.js b/assets/js/61265387.a05b84e3.js deleted file mode 100644 index fe1528f61c4..00000000000 --- a/assets/js/61265387.a05b84e3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5708],{3905:(e,n,r)=>{r.d(n,{Zo:()=>u,kt:()=>g});var t=r(7294);function a(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function i(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function o(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=t.createContext({}),d=function(e){var n=t.useContext(s),r=n;return e&&(r="function"==typeof e?e(n):o(o({},n),e)),r},u=function(e){var n=d(e.components);return t.createElement(s.Provider,{value:n},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},m=t.forwardRef((function(e,n){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=d(r),m=a,g=c["".concat(s,".").concat(m)]||c[m]||p[m]||i;return r?t.createElement(g,o(o({ref:n},u),{},{components:r})):t.createElement(g,o({ref:n},u))}));function g(e,n){var r=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=m;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{r.r(n),r.d(n,{assets:()=>s,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var t=r(7462),a=(r(7294),r(3905));const i={id:"validation",title:"\ud83d\udd0e Validation",sidebar_position:5},o=void 0,l={unversionedId:"guide/validation",id:"guide/validation",title:"\ud83d\udd0e Validation",description:"Validator package",source:"@site/docs/core/guide/validation.md",sourceDirName:"guide",slug:"/guide/validation",permalink:"/next/guide/validation",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/validation.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:5,frontMatter:{id:"validation",title:"\ud83d\udd0e Validation",sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc1b Error Handling",permalink:"/next/guide/error-handling"},next:{title:"\ud83e\ude9d Hooks",permalink:"/next/guide/hooks"}},s={},d=[{value:"Validator package",id:"validator-package",level:2}],u={toc:d},c="wrapper";function p(e){let{components:n,...r}=e;return(0,a.kt)(c,(0,t.Z)({},u,r,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"validator-package"},"Validator package"),(0,a.kt)("p",null,"Fiber can make ",(0,a.kt)("em",{parentName:"p"},"great")," use of the validator package to ensure correct validation of data to store."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/go-playground/validator"},"Official validator Github page ","(","Installation, use, examples..",")","."))),(0,a.kt)("p",null,"You can find the detailed descriptions of the ",(0,a.kt)("em",{parentName:"p"},"validations")," used in the fields contained on the structs below:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://pkg.go.dev/github.com/go-playground/validator?tab=doc"},"Detailed docs"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Validation Example"',title:'"Validation','Example"':!0},'package main\n\nimport (\n "fmt"\n "log"\n "strings"\n\n "github.com/go-playground/validator/v10"\n "github.com/gofiber/fiber/v2"\n)\n\ntype (\n User struct {\n Name string `validate:"required,min=5,max=20"` // Required field, min 5 char long max 20\n Age int `validate:"required,teener"` // Required field, and client needs to implement our \'teener\' tag format which we\'ll see later\n }\n\n ErrorResponse struct {\n Error bool\n FailedField string\n Tag string\n Value interface{}\n }\n\n XValidator struct {\n validator *validator.Validate\n }\n\n GlobalErrorHandlerResp struct {\n Success bool `json:"success"`\n Message string `json:"message"`\n }\n)\n\n// This is the validator instance\n// for more information see: https://github.com/go-playground/validator\nvar validate = validator.New()\n\nfunc (v XValidator) Validate(data interface{}) []ErrorResponse {\n validationErrors := []ErrorResponse{}\n\n errs := validate.Struct(data)\n if errs != nil {\n for _, err := range errs.(validator.ValidationErrors) {\n // In this case data object is actually holding the User struct\n var elem ErrorResponse\n\n elem.FailedField = err.Field() // Export struct field name\n elem.Tag = err.Tag() // Export struct tag\n elem.Value = err.Value() // Export field value\n elem.Error = true\n\n validationErrors = append(validationErrors, elem)\n }\n }\n\n return validationErrors\n}\n\nfunc main() {\n myValidator := &XValidator{\n validator: validate,\n }\n\n app := fiber.New(fiber.Config{\n // Global custom error handler\n ErrorHandler: func(c *fiber.Ctx, err error) error {\n return c.Status(fiber.StatusBadRequest).JSON(GlobalErrorHandlerResp{\n Success: false,\n Message: err.Error(),\n })\n },\n })\n\n // Custom struct validation tag format\n myValidator.validator.RegisterValidation("teener", func(fl validator.FieldLevel) bool {\n // User.Age needs to fit our needs, 12-18 years old.\n return fl.Field().Int() >= 12 && fl.Field().Int() <= 18\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n user := &User{\n Name: c.Query("name"),\n Age: c.QueryInt("age"),\n }\n\n // Validation\n if errs := myValidator.Validate(user); len(errs) > 0 && errs[0].Error {\n errMsgs := make([]string, 0)\n\n for _, err := range errs {\n errMsgs = append(errMsgs, fmt.Sprintf(\n "[%s]: \'%v\' | Needs to implement \'%s\'",\n err.FailedField,\n err.Value,\n err.Tag,\n ))\n }\n\n return &fiber.Error{\n Code: fiber.ErrBadRequest.Code,\n Message: strings.Join(errMsgs, " and "),\n }\n }\n\n // Logic, validated with success\n return c.SendString("Hello, World!")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n/**\nOUTPUT\n\n[1]\nRequest:\n\nGET http://127.0.0.1:3000/\n\nResponse:\n\n{"success":false,"message":"[Name]: \'\' | Needs to implement \'required\' and [Age]: \'0\' | Needs to implement \'required\'"}\n\n[2]\nRequest:\n\nGET http://127.0.0.1:3000/?name=efdal&age=9\n\nResponse:\n{"success":false,"message":"[Age]: \'9\' | Needs to implement \'teener\'"}\n\n[3]\nRequest:\n\nGET http://127.0.0.1:3000/?name=efdal&age=\n\nResponse:\n{"success":false,"message":"[Age]: \'0\' | Needs to implement \'required\'"}\n\n[4]\nRequest:\n\nGET http://127.0.0.1:3000/?name=efdal&age=18\n\nResponse:\nHello, World!\n\n**/\n\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/61f05610.4d9fa7b5.js b/assets/js/61f05610.4d9fa7b5.js deleted file mode 100644 index 5f59771a942..00000000000 --- a/assets/js/61f05610.4d9fa7b5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[387],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=u(n),m=r,f=c["".concat(s,".").concat(m)]||c[m]||d[m]||l;return n?a.createElement(f,i(i({ref:t},p),{},{components:n})):a.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{n.d(t,{Z:()=>i});var a=n(7294),r=n(6010);const l={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:n},t)}},4866:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(7462),r=n(7294),l=n(6010),i=n(2466),o=n(6550),s=n(1980),u=n(7392),p=n(12);function c(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,u]=f({queryString:n,groupId:a}),[c,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,p.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),g=(()=>{const e=s??c;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{g&&o(g)}),[g]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var g=n(2389);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:t,block:n,selectedValue:o,selectValue:s,tabValues:u}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=p.indexOf(t),a=u[n].value;a!==o&&(c(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=p.indexOf(e.currentTarget)+1;t=p[n]??p[0];break}case"ArrowLeft":{const n=p.indexOf(e.currentTarget)-1;t=p[n]??p[p.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>p.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,a.Z)({},e,t)),r.createElement(k,(0,a.Z)({},e,t)))}function w(e){const t=(0,g.Z)();return r.createElement(y,(0,a.Z)({key:String(t)},e))}},9323:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>f,frontMatter:()=>o,metadata:()=>u,toc:()=>c});var a=n(7462),r=(n(7294),n(3905)),l=n(4866),i=n(5162);const o={id:"templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",sidebar_position:3},s=void 0,u={unversionedId:"guide/templates",id:"guide/templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",source:"@site/docs/core/guide/templates.md",sourceDirName:"guide",slug:"/guide/templates",permalink:"/next/guide/templates",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/templates.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:3,frontMatter:{id:"templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"\ud83c\udfad Grouping",permalink:"/next/guide/grouping"},next:{title:"\ud83d\udc1b Error Handling",permalink:"/next/guide/error-handling"}},p={},c=[{value:"Template interfaces",id:"template-interfaces",level:2},{value:"Engines",id:"engines",level:2}],d={toc:c},m="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"template-interfaces"},"Template interfaces"),(0,r.kt)("p",null,"Fiber provides a Views interface to provide your own template engine:"),(0,r.kt)(l.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"views",label:"Views",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"type Views interface {\n Load() error\n Render(io.Writer, string, interface{}, ...string) error\n}\n")))),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Views")," interface contains a ",(0,r.kt)("inlineCode",{parentName:"p"},"Load")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"Render")," method, ",(0,r.kt)("inlineCode",{parentName:"p"},"Load")," is executed by Fiber on app initialization to load/parse the templates."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Pass engine to Fiber\'s Views Engine\napp := fiber.New(fiber.Config{\n Views: engine,\n // Views Layout is the global layout for all template render until override on Render function.\n ViewsLayout: "layouts/main"\n})\n')),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"Render")," method is linked to the ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#render"},(0,r.kt)("strong",{parentName:"a"},"ctx.Render","(",")"))," function that accepts a template name and binding data. It will use global layout if layout is not being defined in ",(0,r.kt)("inlineCode",{parentName:"p"},"Render")," function.\nIf the Fiber config option ",(0,r.kt)("inlineCode",{parentName:"p"},"PassLocalsToViews")," is enabled, then all locals set using ",(0,r.kt)("inlineCode",{parentName:"p"},"ctx.Locals(key, value)")," will be passed to the template."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/", func(c *fiber.Ctx) error {\n return c.Render("index", fiber.Map{\n "hello": "world",\n });\n})\n')),(0,r.kt)("h2",{id:"engines"},"Engines"),(0,r.kt)("p",null,"Fiber team maintains ",(0,r.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/template"},"templates")," package that provides wrappers for multiple template engines:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/ace/"},"ace")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/amber/"},"amber")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/django/"},"django")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/handlebars"},"handlebars")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/html"},"html")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/jet"},"jet")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/mustache"},"mustache")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/pug"},"pug")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/pug"},"slim"))),(0,r.kt)(l.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"example",label:"Example",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/html/v2"\n)\n\nfunc main() {\n // Initialize standard Go html template engine\n engine := html.New("./views", ".html")\n // If you want other engine, just replace with following\n // Create a new engine with django\n // engine := django.New("./views", ".django")\n\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index template\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n'))),(0,r.kt)(i.Z,{value:"index",label:"views/index.html",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-markup"},"\n\n

{{.Title}}

\n\n\n")))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/61f05610.c71088b4.js b/assets/js/61f05610.c71088b4.js new file mode 100644 index 00000000000..8ba099a7a54 --- /dev/null +++ b/assets/js/61f05610.c71088b4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[387],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=u(n),m=r,f=c["".concat(s,".").concat(m)]||c[m]||d[m]||l;return n?a.createElement(f,i(i({ref:t},p),{},{components:n})):a.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[c]="string"==typeof e?e:r,i[1]=o;for(var u=2;u{n.d(t,{Z:()=>i});var a=n(67294),r=n(86010);const l={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:n,className:i}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,i),hidden:n},t)}},74866:(e,t,n)=>{n.d(t,{Z:()=>w});var a=n(87462),r=n(67294),l=n(86010),i=n(12466),o=n(16550),s=n(91980),u=n(67392),p=n(50012);function c(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function d(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??c(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=d(e),[i,o]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[s,u]=f({queryString:n,groupId:a}),[c,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,p.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),g=(()=>{const e=s??c;return m({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{g&&o(g)}),[g]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,l]),tabValues:l}}var g=n(72389);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:t,block:n,selectedValue:o,selectValue:s,tabValues:u}=e;const p=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=p.indexOf(t),a=u[n].value;a!==o&&(c(t),s(a))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=p.indexOf(e.currentTarget)+1;t=p[n]??p[0];break}case"ArrowLeft":{const n=p.indexOf(e.currentTarget)-1;t=p[n]??p[p.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:i}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>p.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",h.tabItem,i?.className,{"tabs__item--active":o===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function y(e){const t=b(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},r.createElement(v,(0,a.Z)({},e,t)),r.createElement(k,(0,a.Z)({},e,t)))}function w(e){const t=(0,g.Z)();return r.createElement(y,(0,a.Z)({key:String(t)},e))}},49323:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>f,frontMatter:()=>o,metadata:()=>u,toc:()=>c});var a=n(87462),r=(n(67294),n(3905)),l=n(74866),i=n(85162);const o={id:"templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",sidebar_position:3},s=void 0,u={unversionedId:"guide/templates",id:"guide/templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",source:"@site/docs/core/guide/templates.md",sourceDirName:"guide",slug:"/guide/templates",permalink:"/next/guide/templates",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/guide/templates.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:3,frontMatter:{id:"templates",title:"\ud83d\udcdd Templates",description:"Fiber supports server-side template engines.",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"\ud83c\udfad Grouping",permalink:"/next/guide/grouping"},next:{title:"\ud83d\udc1b Error Handling",permalink:"/next/guide/error-handling"}},p={},c=[{value:"Template interfaces",id:"template-interfaces",level:2},{value:"Engines",id:"engines",level:2}],d={toc:c},m="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"template-interfaces"},"Template interfaces"),(0,r.kt)("p",null,"Fiber provides a Views interface to provide your own template engine:"),(0,r.kt)(l.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"views",label:"Views",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"type Views interface {\n Load() error\n Render(io.Writer, string, interface{}, ...string) error\n}\n")))),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Views")," interface contains a ",(0,r.kt)("inlineCode",{parentName:"p"},"Load")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"Render")," method, ",(0,r.kt)("inlineCode",{parentName:"p"},"Load")," is executed by Fiber on app initialization to load/parse the templates."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Pass engine to Fiber\'s Views Engine\napp := fiber.New(fiber.Config{\n Views: engine,\n // Views Layout is the global layout for all template render until override on Render function.\n ViewsLayout: "layouts/main"\n})\n')),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"Render")," method is linked to the ",(0,r.kt)("a",{parentName:"p",href:"/next/api/ctx#render"},(0,r.kt)("strong",{parentName:"a"},"ctx.Render","(",")"))," function that accepts a template name and binding data. It will use global layout if layout is not being defined in ",(0,r.kt)("inlineCode",{parentName:"p"},"Render")," function.\nIf the Fiber config option ",(0,r.kt)("inlineCode",{parentName:"p"},"PassLocalsToViews")," is enabled, then all locals set using ",(0,r.kt)("inlineCode",{parentName:"p"},"ctx.Locals(key, value)")," will be passed to the template."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'app.Get("/", func(c *fiber.Ctx) error {\n return c.Render("index", fiber.Map{\n "hello": "world",\n });\n})\n')),(0,r.kt)("h2",{id:"engines"},"Engines"),(0,r.kt)("p",null,"Fiber team maintains ",(0,r.kt)("a",{parentName:"p",href:"https://docs.gofiber.io/template"},"templates")," package that provides wrappers for multiple template engines:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/ace/"},"ace")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/amber/"},"amber")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/django/"},"django")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/handlebars"},"handlebars")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/html"},"html")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/jet"},"jet")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/mustache"},"mustache")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/pug"},"pug")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.gofiber.io/template/pug"},"slim"))),(0,r.kt)(l.Z,{mdxType:"Tabs"},(0,r.kt)(i.Z,{value:"example",label:"Example",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/html/v2"\n)\n\nfunc main() {\n // Initialize standard Go html template engine\n engine := html.New("./views", ".html")\n // If you want other engine, just replace with following\n // Create a new engine with django\n // engine := django.New("./views", ".django")\n\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index template\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n'))),(0,r.kt)(i.Z,{value:"index",label:"views/index.html",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-markup"},"\n\n

{{.Title}}

\n\n\n")))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6332.66f44b9d.js b/assets/js/6332.66f44b9d.js deleted file mode 100644 index b303849d0a0..00000000000 --- a/assets/js/6332.66f44b9d.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6332],{3905:(e,t,n)=>{"use strict";n.d(t,{Zo:()=>d,kt:()=>f});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),i=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=i(e.components);return a.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),m=i(n),p=o,f=m["".concat(s,".").concat(p)]||m[p]||u[p]||r;return n?a.createElement(f,l(l({ref:t},d),{},{components:n})):a.createElement(f,l({ref:t},d))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,l=new Array(r);l[0]=p;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[m]="string"==typeof e?e:o,l[1]=c;for(var i=2;i{"use strict";n.d(t,{Z:()=>v});var a=n(7462),o=n(7294),r=n(6010),l=n(5281),c=n(3438),s=n(8596),i=n(9960),d=n(5999),m=n(4996);function u(e){return o.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},e),o.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const p={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function f(){const e=(0,m.Z)("/");return o.createElement("li",{className:"breadcrumbs__item"},o.createElement(i.Z,{"aria-label":(0,d.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},o.createElement(u,{className:p.breadcrumbHomeIcon})))}const h={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function g(e){let{children:t,href:n,isLast:a}=e;const r="breadcrumbs__link";return a?o.createElement("span",{className:r,itemProp:"name"},t):n?o.createElement(i.Z,{className:r,href:n,itemProp:"item"},o.createElement("span",{itemProp:"name"},t)):o.createElement("span",{className:r},t)}function b(e){let{children:t,active:n,index:l,addMicrodata:c}=e;return o.createElement("li",(0,a.Z)({},c&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,r.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),t,o.createElement("meta",{itemProp:"position",content:String(l+1)}))}function v(){const e=(0,c.s1)(),t=(0,s.Ns)();return e?o.createElement("nav",{className:(0,r.Z)(l.k.docs.docBreadcrumbs,h.breadcrumbsContainer),"aria-label":(0,d.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},o.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&o.createElement(f,null),e.map(((t,n)=>{const a=n===e.length-1;return o.createElement(b,{key:n,active:a,index:n,addMicrodata:!!t.href},o.createElement(g,{href:t.href,isLast:a},t.label))})))):null}},620:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>st});var a=n(7294),o=n(1944),r=n(902);const l=a.createContext(null);function c(e){let{children:t,content:n}=e;const o=function(e){return(0,a.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return a.createElement(l.Provider,{value:o},t)}function s(){const e=(0,a.useContext)(l);if(null===e)throw new r.i6("DocProvider");return e}function i(){const{metadata:e,frontMatter:t,assets:n}=s();return a.createElement(o.d,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var d=n(6010),m=n(7524),u=n(4966);function p(){const{metadata:e}=s();return a.createElement(u.Z,{previous:e.previous,next:e.next})}var f=n(9408),h=n(4364),g=n(5281),b=n(5999);function v(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n}=e;return a.createElement(b.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:a.createElement("b",null,a.createElement("time",{dateTime:new Date(1e3*t).toISOString()},n))}}," on {date}")}function E(e){let{lastUpdatedBy:t}=e;return a.createElement(b.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:a.createElement("b",null,t)}}," by {user}")}function y(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n,lastUpdatedBy:o}=e;return a.createElement("span",{className:g.k.common.lastUpdated},a.createElement(b.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&n?a.createElement(v,{lastUpdatedAt:t,formattedLastUpdatedAt:n}):"",byUser:o?a.createElement(E,{lastUpdatedBy:o}):""}},"Last updated{atDate}{byUser}"),!1)}var k=n(7462);const N={iconEdit:"iconEdit_Z9Sw"};function C(e){let{className:t,...n}=e;return a.createElement("svg",(0,k.Z)({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,d.Z)(N.iconEdit,t),"aria-hidden":"true"},n),a.createElement("g",null,a.createElement("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})))}function L(e){let{editUrl:t}=e;return a.createElement("a",{href:t,target:"_blank",rel:"noreferrer noopener",className:g.k.common.editThisPage},a.createElement(C,null),a.createElement(b.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page"},"Edit this page"))}var Z=n(9960);const T={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function _(e){let{permalink:t,label:n,count:o}=e;return a.createElement(Z.Z,{href:t,className:(0,d.Z)(T.tag,o?T.tagWithCount:T.tagRegular)},n,o&&a.createElement("span",null,o))}const w={tags:"tags_jXut",tag:"tag_QGVx"};function B(e){let{tags:t}=e;return a.createElement(a.Fragment,null,a.createElement("b",null,a.createElement(b.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),a.createElement("ul",{className:(0,d.Z)(w.tags,"padding--none","margin-left--sm")},t.map((e=>{let{label:t,permalink:n}=e;return a.createElement("li",{key:n,className:w.tag},a.createElement(_,{label:t,permalink:n}))}))))}const x={lastUpdated:"lastUpdated_vwxv"};function O(e){return a.createElement("div",{className:(0,d.Z)(g.k.docs.docFooterTagsRow,"row margin-bottom--sm")},a.createElement("div",{className:"col"},a.createElement(B,e)))}function H(e){let{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:o,formattedLastUpdatedAt:r}=e;return a.createElement("div",{className:(0,d.Z)(g.k.docs.docFooterEditMetaRow,"row")},a.createElement("div",{className:"col"},t&&a.createElement(L,{editUrl:t})),a.createElement("div",{className:(0,d.Z)("col",x.lastUpdated)},(n||o)&&a.createElement(y,{lastUpdatedAt:n,formattedLastUpdatedAt:r,lastUpdatedBy:o})))}function A(){const{metadata:e}=s(),{editUrl:t,lastUpdatedAt:n,formattedLastUpdatedAt:o,lastUpdatedBy:r,tags:l}=e,c=l.length>0,i=!!(t||n||r);return c||i?a.createElement("footer",{className:(0,d.Z)(g.k.docs.docFooter,"docusaurus-mt-lg")},c&&a.createElement(O,{tags:l}),i&&a.createElement(H,{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:r,formattedLastUpdatedAt:o})):null}var j=n(6043),I=n(6668);function S(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const a=n.slice(2,e.level);e.parentIndex=Math.max(...a),n[e.level]=t}));const a=[];return t.forEach((e=>{const{parentIndex:n,...o}=e;n>=0?t[n].children.push(o):a.push(o)})),a}function M(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:a}=e;return t.flatMap((e=>{const t=M({toc:e.children,minHeadingLevel:n,maxHeadingLevel:a});return function(e){return e.level>=n&&e.level<=a}(e)?[{...e,children:t}]:t}))}function P(e){const t=e.getBoundingClientRect();return t.top===t.bottom?P(e.parentNode):t}function U(e,t){let{anchorTopOffset:n}=t;const a=e.find((e=>P(e).top>=n));if(a){return function(e){return e.top>0&&e.bottom{e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function V(e){const t=(0,a.useRef)(void 0),n=z();(0,a.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:a,linkActiveClassName:o,minHeadingLevel:r,maxHeadingLevel:l}=e;function c(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(a),c=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const a=[];for(let o=t;o<=n;o+=1)a.push(`h${o}.anchor`);return Array.from(document.querySelectorAll(a.join()))}({minHeadingLevel:r,maxHeadingLevel:l}),s=U(c,{anchorTopOffset:n.current}),i=e.find((e=>s&&s.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(o),e.classList.add(o),t.current=e):e.classList.remove(o)}(e,e===i)}))}return document.addEventListener("scroll",c),document.addEventListener("resize",c),c(),()=>{document.removeEventListener("scroll",c),document.removeEventListener("resize",c)}}),[e,n])}function D(e){let{toc:t,className:n,linkClassName:o,isChild:r}=e;return t.length?a.createElement("ul",{className:r?void 0:n},t.map((e=>a.createElement("li",{key:e.id},a.createElement("a",{href:`#${e.id}`,className:o??void 0,dangerouslySetInnerHTML:{__html:e.value}}),a.createElement(D,{isChild:!0,toc:e.children,className:n,linkClassName:o}))))):null}const R=a.memo(D);function W(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:o="table-of-contents__link",linkActiveClassName:r,minHeadingLevel:l,maxHeadingLevel:c,...s}=e;const i=(0,I.L)(),d=l??i.tableOfContents.minHeadingLevel,m=c??i.tableOfContents.maxHeadingLevel,u=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:o}=e;return(0,a.useMemo)((()=>M({toc:S(t),minHeadingLevel:n,maxHeadingLevel:o})),[t,n,o])}({toc:t,minHeadingLevel:d,maxHeadingLevel:m});return V((0,a.useMemo)((()=>{if(o&&r)return{linkClassName:o,linkActiveClassName:r,minHeadingLevel:d,maxHeadingLevel:m}}),[o,r,d,m])),a.createElement(R,(0,k.Z)({toc:u,className:n,linkClassName:o},s))}const $={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function F(e){let{collapsed:t,...n}=e;return a.createElement("button",(0,k.Z)({type:"button"},n,{className:(0,d.Z)("clean-btn",$.tocCollapsibleButton,!t&&$.tocCollapsibleButtonExpanded,n.className)}),a.createElement(b.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}const q={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function G(e){let{toc:t,className:n,minHeadingLevel:o,maxHeadingLevel:r}=e;const{collapsed:l,toggleCollapsed:c}=(0,j.u)({initialState:!0});return a.createElement("div",{className:(0,d.Z)(q.tocCollapsible,!l&&q.tocCollapsibleExpanded,n)},a.createElement(F,{collapsed:l,onClick:c}),a.createElement(j.z,{lazy:!0,className:q.tocCollapsibleContent,collapsed:l},a.createElement(W,{toc:t,minHeadingLevel:o,maxHeadingLevel:r})))}const Y={tocMobile:"tocMobile_ITEo"};function J(){const{toc:e,frontMatter:t}=s();return a.createElement(G,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,d.Z)(g.k.docs.docTocMobile,Y.tocMobile)})}const Q={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},X="table-of-contents__link toc-highlight",K="table-of-contents__link--active";function ee(e){let{className:t,...n}=e;return a.createElement("div",{className:(0,d.Z)(Q.tableOfContents,"thin-scrollbar",t)},a.createElement(W,(0,k.Z)({},n,{linkClassName:X,linkActiveClassName:K})))}function te(){const{toc:e,frontMatter:t}=s();return a.createElement(ee,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:g.k.docs.docTocDesktop})}var ne=n(2503),ae=n(3905),oe=n(5742);var re=n(2389),le=n(2949);function ce(){const{prism:e}=(0,I.L)(),{colorMode:t}=(0,le.I)(),n=e.theme,a=e.darkTheme||n;return"dark"===t?a:n}var se=n(7594),ie=n.n(se);const de=/title=(?["'])(?.*?)\1/,me=/\{(?<range>[\d,-]+)\}/,ue={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}};function pe(e,t){const n=e.map((e=>{const{start:n,end:a}=ue[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${a})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function fe(e,t){let n=e.replace(/\n$/,"");const{language:a,magicComments:o,metastring:r}=t;if(r&&me.test(r)){const e=r.match(me).groups.range;if(0===o.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${r}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=o[0].className,a=ie()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(a),code:n}}if(void 0===a)return{lineClassNames:{},code:n};const l=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return pe(["js","jsBlock"],t);case"jsx":case"tsx":return pe(["js","jsBlock","jsx"],t);case"html":return pe(["js","jsBlock","html"],t);case"python":case"py":case"bash":return pe(["bash"],t);case"markdown":case"md":return pe(["html","jsx","bash"],t);default:return pe(Object.keys(ue),t)}}(a,o),c=n.split("\n"),s=Object.fromEntries(o.map((e=>[e.className,{start:0,range:""}]))),i=Object.fromEntries(o.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),m=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let p=0;p<c.length;){const e=c[p].match(l);if(!e){p+=1;continue}const t=e.slice(1).find((e=>void 0!==e));i[t]?s[i[t]].range+=`${p},`:d[t]?s[d[t]].start=p:m[t]&&(s[m[t]].range+=`${s[m[t]].start}-${p-1},`),c.splice(p,1)}n=c.join("\n");const u={};return Object.entries(s).forEach((e=>{let[t,{range:n}]=e;ie()(n).forEach((e=>{u[e]??=[],u[e].push(t)}))})),{lineClassNames:u,code:n}}const he={codeBlockContainer:"codeBlockContainer_Ckt0"};function ge(e){let{as:t,...n}=e;const o=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[a,o]=e;const r=t[a];r&&"string"==typeof o&&(n[r]=o)})),n}(ce());return a.createElement(t,(0,k.Z)({},n,{style:o,className:(0,d.Z)(n.className,he.codeBlockContainer,g.k.common.codeBlock)}))}const be={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function ve(e){let{children:t,className:n}=e;return a.createElement(ge,{as:"pre",tabIndex:0,className:(0,d.Z)(be.codeBlockStandalone,"thin-scrollbar",n)},a.createElement("code",{className:be.codeBlockLines},t))}const Ee={attributes:!0,characterData:!0,childList:!0,subtree:!0};function ye(e,t){const[n,o]=(0,a.useState)(),l=(0,a.useCallback)((()=>{o(e.current?.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,a.useEffect)((()=>{l()}),[l]),function(e,t,n){void 0===n&&(n=Ee);const o=(0,r.zX)(t),l=(0,r.Ql)(n);(0,a.useEffect)((()=>{const t=new MutationObserver(o);return e&&t.observe(e,l),()=>t.disconnect()}),[e,o,l])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),l())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}const ke={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var Ne={Prism:n(7410).Z,theme:ke};function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}var Ze=/\r\n|\r|\n/,Te=function(e){0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},_e=function(e,t){var n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},we=function(e,t){var n=e.plain,a=Object.create(null),o=e.styles.reduce((function(e,n){var a=n.languages,o=n.style;return a&&!a.includes(t)||n.types.forEach((function(t){var n=Le({},e[t],o);e[t]=n})),e}),a);return o.root=n,o.plain=Le({},n,{backgroundColor:null}),o};function Be(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}const xe=function(e){function t(){for(var t=this,n=[],a=arguments.length;a--;)n[a]=arguments[a];e.apply(this,n),Ce(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?we(e.theme,e.language):void 0;return t.themeDict=n})),Ce(this,"getLineProps",(function(e){var n=e.key,a=e.className,o=e.style,r=Le({},Be(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),l=t.getThemeDict(t.props);return void 0!==l&&(r.style=l.plain),void 0!==o&&(r.style=void 0!==r.style?Le({},r.style,o):o),void 0!==n&&(r.key=n),a&&(r.className+=" "+a),r})),Ce(this,"getStyleForToken",(function(e){var n=e.types,a=e.empty,o=n.length,r=t.getThemeDict(t.props);if(void 0!==r){if(1===o&&"plain"===n[0])return a?{display:"inline-block"}:void 0;if(1===o&&!a)return r[n[0]];var l=a?{display:"inline-block"}:{},c=n.map((function(e){return r[e]}));return Object.assign.apply(Object,[l].concat(c))}})),Ce(this,"getTokenProps",(function(e){var n=e.key,a=e.className,o=e.style,r=e.token,l=Le({},Be(e,["key","className","style","token"]),{className:"token "+r.types.join(" "),children:r.content,style:t.getStyleForToken(r),key:void 0});return void 0!==o&&(l.style=void 0!==l.style?Le({},l.style,o):o),void 0!==n&&(l.key=n),a&&(l.className+=" "+a),l})),Ce(this,"tokenize",(function(e,t,n,a){var o={code:t,grammar:n,language:a,tokens:[]};e.hooks.run("before-tokenize",o);var r=o.tokens=e.tokenize(o.code,o.grammar,o.language);return e.hooks.run("after-tokenize",o),r}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,a=e.code,o=e.children,r=this.getThemeDict(this.props),l=t.languages[n];return o({tokens:function(e){for(var t=[[]],n=[e],a=[0],o=[e.length],r=0,l=0,c=[],s=[c];l>-1;){for(;(r=a[l]++)<o[l];){var i=void 0,d=t[l],m=n[l][r];if("string"==typeof m?(d=l>0?d:["plain"],i=m):(d=_e(d,m.type),m.alias&&(d=_e(d,m.alias)),i=m.content),"string"==typeof i){var u=i.split(Ze),p=u.length;c.push({types:d,content:u[0]});for(var f=1;f<p;f++)Te(c),s.push(c=[]),c.push({types:d,content:u[f]})}else l++,t.push(d),n.push(i),a.push(0),o.push(i.length)}l--,t.pop(),n.pop(),a.pop(),o.pop()}return Te(c),s}(void 0!==l?this.tokenize(t,a,l,n):[a]),className:"prism-code language-"+n,style:void 0!==r?r.root:{},getLineProps:this.getLineProps,getTokenProps:this.getTokenProps})},t}(a.Component),Oe={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function He(e){let{line:t,classNames:n,showLineNumbers:o,getLineProps:r,getTokenProps:l}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const c=r({line:t,className:(0,d.Z)(n,o&&Oe.codeLine)}),s=t.map(((e,t)=>a.createElement("span",(0,k.Z)({key:t},l({token:e,key:t})))));return a.createElement("span",c,o?a.createElement(a.Fragment,null,a.createElement("span",{className:Oe.codeLineNumber}),a.createElement("span",{className:Oe.codeLineContent},s)):s,a.createElement("br",null))}function Ae(e){return a.createElement("svg",(0,k.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}))}function je(e){return a.createElement("svg",(0,k.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}const Ie={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function Se(e){let{code:t,className:n}=e;const[o,r]=(0,a.useState)(!1),l=(0,a.useRef)(void 0),c=(0,a.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const a=document.createElement("textarea"),o=document.activeElement;a.value=e,a.setAttribute("readonly",""),a.style.contain="strict",a.style.position="absolute",a.style.left="-9999px",a.style.fontSize="12pt";const r=document.getSelection(),l=r.rangeCount>0&&r.getRangeAt(0);n.append(a),a.select(),a.selectionStart=0,a.selectionEnd=e.length;let c=!1;try{c=document.execCommand("copy")}catch{}a.remove(),l&&(r.removeAllRanges(),r.addRange(l)),o&&o.focus()}(t),r(!0),l.current=window.setTimeout((()=>{r(!1)}),1e3)}),[t]);return(0,a.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),a.createElement("button",{type:"button","aria-label":o?(0,b.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,b.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,b.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,d.Z)("clean-btn",n,Ie.copyButton,o&&Ie.copyButtonCopied),onClick:c},a.createElement("span",{className:Ie.copyButtonIcons,"aria-hidden":"true"},a.createElement(Ae,{className:Ie.copyButtonIcon}),a.createElement(je,{className:Ie.copyButtonSuccessIcon})))}function Me(e){return a.createElement("svg",(0,k.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}const Pe={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Ue(e){let{className:t,onClick:n,isEnabled:o}=e;const r=(0,b.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return a.createElement("button",{type:"button",onClick:n,className:(0,d.Z)("clean-btn",t,o&&Pe.wordWrapButtonEnabled),"aria-label":r,title:r},a.createElement(Me,{className:Pe.wordWrapButtonIcon,"aria-hidden":"true"}))}function ze(e){let{children:t,className:n="",metastring:o,title:r,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:s,magicComments:i}}=(0,I.L)(),m=c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??s,u=ce(),p=function(){const[e,t]=(0,a.useState)(!1),[n,o]=(0,a.useState)(!1),r=(0,a.useRef)(null),l=(0,a.useCallback)((()=>{const n=r.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[r,e]),c=(0,a.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=r.current,n=e>t||r.current.querySelector("code").hasAttribute("style");o(n)}),[r]);return ye(r,c),(0,a.useEffect)((()=>{c()}),[e,c]),(0,a.useEffect)((()=>(window.addEventListener("resize",c,{passive:!0}),()=>{window.removeEventListener("resize",c)})),[c]),{codeBlockRef:r,isEnabled:e,isCodeScrollable:n,toggle:l}}(),f=function(e){return e?.match(de)?.groups.title??""}(o)||r,{lineClassNames:h,code:g}=fe(t,{metastring:o,language:m,magicComments:i}),b=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(o);return a.createElement(ge,{as:"div",className:(0,d.Z)(n,m&&!n.includes(`language-${m}`)&&`language-${m}`)},f&&a.createElement("div",{className:be.codeBlockTitle},f),a.createElement("div",{className:be.codeBlockContent},a.createElement(xe,(0,k.Z)({},Ne,{theme:u,code:g,language:m??"text"}),(e=>{let{className:t,tokens:n,getLineProps:o,getTokenProps:r}=e;return a.createElement("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,d.Z)(t,be.codeBlock,"thin-scrollbar")},a.createElement("code",{className:(0,d.Z)(be.codeBlockLines,b&&be.codeBlockLinesWithNumbering)},n.map(((e,t)=>a.createElement(He,{key:t,line:e,getLineProps:o,getTokenProps:r,classNames:h[t],showLineNumbers:b})))))})),a.createElement("div",{className:be.buttonGroup},(p.isEnabled||p.isCodeScrollable)&&a.createElement(Ue,{className:be.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),a.createElement(Se,{className:be.codeButton,code:g}))))}function Ve(e){let{children:t,...n}=e;const o=(0,re.Z)(),r=function(e){return a.Children.toArray(e).some((e=>(0,a.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof r?ze:ve;return a.createElement(l,(0,k.Z)({key:String(o)},n),r)}const De={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function Re(e){return!!e&&("SUMMARY"===e.tagName||Re(e.parentElement))}function We(e,t){return!!e&&(e===t||We(e.parentElement,t))}function $e(e){let{summary:t,children:n,...o}=e;const r=(0,re.Z)(),l=(0,a.useRef)(null),{collapsed:c,setCollapsed:s}=(0,j.u)({initialState:!o.open}),[i,m]=(0,a.useState)(o.open),u=a.isValidElement(t)?t:a.createElement("summary",null,t??"Details");return a.createElement("details",(0,k.Z)({},o,{ref:l,open:i,"data-collapsed":c,className:(0,d.Z)(De.details,r&&De.isBrowser,o.className),onMouseDown:e=>{Re(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;Re(t)&&We(t,l.current)&&(e.preventDefault(),c?(s(!1),m(!0)):s(!0))}}),u,a.createElement(j.z,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{s(e),m(!e)}},a.createElement("div",{className:De.collapsibleContent},n)))}const Fe={details:"details_b_Ee"},qe="alert alert--info";function Ge(e){let{...t}=e;return a.createElement($e,(0,k.Z)({},t,{className:(0,d.Z)(qe,Fe.details,t.className)}))}function Ye(e){return a.createElement(ne.Z,e)}const Je={containsTaskList:"containsTaskList_mC6p"};const Qe={img:"img_ev3q"};const Xe={admonition:"admonition_LlT9",admonitionHeading:"admonitionHeading_tbUL",admonitionIcon:"admonitionIcon_kALy",admonitionContent:"admonitionContent_S0QG"};const Ke={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(b.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(b.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(b.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(b.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(b.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},et={secondary:"note",important:"info",success:"tip",warning:"danger"};function tt(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=a.Children.toArray(e),n=t.find((e=>a.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),o=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return{mdxAdmonitionTitle:n,rest:o}}(e.children);return{...e,title:e.title??t,children:n}}const nt={head:function(e){const t=a.Children.map(e.children,(e=>a.isValidElement(e)?function(e){if(e.props?.mdxType&&e.props.originalType){const{mdxType:t,originalType:n,...o}=e.props;return a.createElement(e.props.originalType,o)}return e}(e):e));return a.createElement(oe.Z,e,t)},code:function(e){const t=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return a.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")||(0,a.isValidElement)(e)&&t.includes(e.props?.mdxType)))?a.createElement("code",e):a.createElement(Ve,e)},a:function(e){return a.createElement(Z.Z,e)},pre:function(e){return a.createElement(Ve,(0,a.isValidElement)(e.children)&&"code"===e.children.props?.originalType?e.children.props:{...e})},details:function(e){const t=a.Children.toArray(e.children),n=t.find((e=>a.isValidElement(e)&&"summary"===e.props?.mdxType)),o=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return a.createElement(Ge,(0,k.Z)({},e,{summary:n}),o)},ul:function(e){return a.createElement("ul",(0,k.Z)({},e,{className:(t=e.className,(0,d.Z)(t,t?.includes("contains-task-list")&&Je.containsTaskList))}));var t},img:function(e){return a.createElement("img",(0,k.Z)({loading:"lazy"},e,{className:(t=e.className,(0,d.Z)(t,Qe.img))}));var t},h1:e=>a.createElement(Ye,(0,k.Z)({as:"h1"},e)),h2:e=>a.createElement(Ye,(0,k.Z)({as:"h2"},e)),h3:e=>a.createElement(Ye,(0,k.Z)({as:"h3"},e)),h4:e=>a.createElement(Ye,(0,k.Z)({as:"h4"},e)),h5:e=>a.createElement(Ye,(0,k.Z)({as:"h5"},e)),h6:e=>a.createElement(Ye,(0,k.Z)({as:"h6"},e)),admonition:function(e){const{children:t,type:n,title:o,icon:r}=tt(e),l=function(e){const t=et[e]??e,n=Ke[t];return n||(console.warn(`No admonition config found for admonition type "${t}". Using Info as fallback.`),Ke.info)}(n),c=o??l.label,{iconComponent:s}=l,i=r??a.createElement(s,null);return a.createElement("div",{className:(0,d.Z)(g.k.common.admonition,g.k.common.admonitionType(e.type),"alert",`alert--${l.infimaClassName}`,Xe.admonition)},a.createElement("div",{className:Xe.admonitionHeading},a.createElement("span",{className:Xe.admonitionIcon},i),c),a.createElement("div",{className:Xe.admonitionContent},t))},mermaid:()=>null};function at(e){let{children:t}=e;return a.createElement(ae.Zo,{components:nt},t)}function ot(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=s();return t.hide_title||void 0!==n?null:e.title}();return a.createElement("div",{className:(0,d.Z)(g.k.docs.docMarkdown,"markdown")},n&&a.createElement("header",null,a.createElement(ne.Z,{as:"h1"},n)),a.createElement(at,null,t))}var rt=n(7456);const lt={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function ct(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=s(),n=(0,m.i)(),o=e.hide_table_of_contents,r=!o&&t.length>0;return{hidden:o,mobile:r?a.createElement(J,null):void 0,desktop:!r||"desktop"!==n&&"ssr"!==n?void 0:a.createElement(te,null)}}();return a.createElement("div",{className:"row"},a.createElement("div",{className:(0,d.Z)("col",!n.hidden&<.docItemCol)},a.createElement(f.Z,null),a.createElement("div",{className:lt.docItemContainer},a.createElement("article",null,a.createElement(rt.Z,null),a.createElement(h.Z,null),n.mobile,a.createElement(ot,null,t),a.createElement(A,null)),a.createElement(p,null))),n.desktop&&a.createElement("div",{className:"col col--3"},n.desktop))}function st(e){const t=`docs-doc-id-${e.content.metadata.unversionedId}`,n=e.content;return a.createElement(c,{content:e.content},a.createElement(o.FG,{className:t},a.createElement(i,null),a.createElement(ct,null,a.createElement(n,null))))}},4966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(7462),o=n(7294),r=n(5999),l=n(6010),c=n(9960);function s(e){const{permalink:t,title:n,subLabel:a,isNext:r}=e;return o.createElement(c.Z,{className:(0,l.Z)("pagination-nav__link",r?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},a&&o.createElement("div",{className:"pagination-nav__sublabel"},a),o.createElement("div",{className:"pagination-nav__label"},n))}function i(e){const{previous:t,next:n}=e;return o.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,r.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"})},t&&o.createElement(s,(0,a.Z)({},t,{subLabel:o.createElement(r.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),n&&o.createElement(s,(0,a.Z)({},n,{subLabel:o.createElement(r.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}},4364:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var a=n(7294),o=n(6010),r=n(5999),l=n(5281),c=n(4477);function s(e){let{className:t}=e;const n=(0,c.E)();return n.badge?a.createElement("span",{className:(0,o.Z)(t,l.k.docs.docVersionBadge,"badge badge--secondary")},a.createElement(r.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label}},"Version: {versionLabel}")):null}},3120:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var a=n(7294),o=n(6010),r=n(2263),l=n(9960),c=n(5999),s=n(143),i=n(5281),d=n(373),m=n(4477);const u={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(c.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(c.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function p(e){const t=u[e.versionMetadata.banner];return a.createElement(t,e)}function f(e){let{versionLabel:t,to:n,onClick:o}=e;return a.createElement(c.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:a.createElement("b",null,a.createElement(l.Z,{to:n,onClick:o},a.createElement(c.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function h(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:l}}=(0,r.Z)(),{pluginId:c}=(0,s.gA)({failfast:!0}),{savePreferredVersionName:m}=(0,d.J)(c),{latestDocSuggestion:u,latestVersionSuggestion:h}=(0,s.Jo)(c),g=u??(b=h).docs.find((e=>e.id===b.mainDocId));var b;return a.createElement("div",{className:(0,o.Z)(t,i.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},a.createElement("div",null,a.createElement(p,{siteTitle:l,versionMetadata:n})),a.createElement("div",{className:"margin-top--md"},a.createElement(f,{versionLabel:h.label,to:g.path,onClick:()=>m(h.name)})))}function g(e){let{className:t}=e;const n=(0,m.E)();return n.banner?a.createElement(h,{className:t,versionMetadata:n}):null}},2503:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var a=n(7462),o=n(7294),r=n(6010),l=n(5999),c=n(6668),s=n(9960);const i={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};function d(e){let{as:t,id:n,...d}=e;const{navbar:{hideOnScroll:m}}=(0,c.L)();if("h1"===t||!n)return o.createElement(t,(0,a.Z)({},d,{id:void 0}));const u=(0,l.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof d.children?d.children:n});return o.createElement(t,(0,a.Z)({},d,{className:(0,r.Z)("anchor",m?i.anchorWithHideOnScrollNavbar:i.anchorWithStickyNavbar,d.className),id:n}),d.children,o.createElement(s.Z,{className:"hash-link",to:`#${n}`,"aria-label":u,title:u},"\u200b"))}},7594:(e,t)=>{function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,o,r]=t;if(a&&r){a=parseInt(a),r=parseInt(r);const e=a<r?1:-1;"-"!==o&&".."!==o&&"\u2025"!==o||(r+=e);for(let t=a;t!==r;t+=e)n.push(t)}}return n}t.default=n,e.exports=n}}]); \ No newline at end of file diff --git a/assets/js/6332.f2f1b997.js b/assets/js/6332.f2f1b997.js new file mode 100644 index 00000000000..c6da2339c79 --- /dev/null +++ b/assets/js/6332.f2f1b997.js @@ -0,0 +1 @@ +(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6332],{3905:(e,t,n)=>{"use strict";n.d(t,{Zo:()=>d,kt:()=>f});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),i=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},d=function(e){var t=i(e.components);return a.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),m=i(n),p=o,f=m["".concat(s,".").concat(p)]||m[p]||u[p]||r;return n?a.createElement(f,l(l({ref:t},d),{},{components:n})):a.createElement(f,l({ref:t},d))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,l=new Array(r);l[0]=p;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[m]="string"==typeof e?e:o,l[1]=c;for(var i=2;i<r;i++)l[i]=n[i];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}p.displayName="MDXCreateElement"},1310:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var a=n(87462),o=n(67294),r=n(86010),l=n(35281),c=n(53438),s=n(48596),i=n(39960),d=n(95999),m=n(44996);function u(e){return o.createElement("svg",(0,a.Z)({viewBox:"0 0 24 24"},e),o.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const p={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function f(){const e=(0,m.Z)("/");return o.createElement("li",{className:"breadcrumbs__item"},o.createElement(i.Z,{"aria-label":(0,d.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},o.createElement(u,{className:p.breadcrumbHomeIcon})))}const h={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function g(e){let{children:t,href:n,isLast:a}=e;const r="breadcrumbs__link";return a?o.createElement("span",{className:r,itemProp:"name"},t):n?o.createElement(i.Z,{className:r,href:n,itemProp:"item"},o.createElement("span",{itemProp:"name"},t)):o.createElement("span",{className:r},t)}function b(e){let{children:t,active:n,index:l,addMicrodata:c}=e;return o.createElement("li",(0,a.Z)({},c&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,r.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),t,o.createElement("meta",{itemProp:"position",content:String(l+1)}))}function v(){const e=(0,c.s1)(),t=(0,s.Ns)();return e?o.createElement("nav",{className:(0,r.Z)(l.k.docs.docBreadcrumbs,h.breadcrumbsContainer),"aria-label":(0,d.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},o.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&o.createElement(f,null),e.map(((t,n)=>{const a=n===e.length-1;return o.createElement(b,{key:n,active:a,index:n,addMicrodata:!!t.href},o.createElement(g,{href:t.href,isLast:a},t.label))})))):null}},10620:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>st});var a=n(67294),o=n(1944),r=n(902);const l=a.createContext(null);function c(e){let{children:t,content:n}=e;const o=function(e){return(0,a.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return a.createElement(l.Provider,{value:o},t)}function s(){const e=(0,a.useContext)(l);if(null===e)throw new r.i6("DocProvider");return e}function i(){const{metadata:e,frontMatter:t,assets:n}=s();return a.createElement(o.d,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var d=n(86010),m=n(87524),u=n(4966);function p(){const{metadata:e}=s();return a.createElement(u.Z,{previous:e.previous,next:e.next})}var f=n(19408),h=n(44364),g=n(35281),b=n(95999);function v(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n}=e;return a.createElement(b.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:a.createElement("b",null,a.createElement("time",{dateTime:new Date(1e3*t).toISOString()},n))}}," on {date}")}function E(e){let{lastUpdatedBy:t}=e;return a.createElement(b.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:a.createElement("b",null,t)}}," by {user}")}function y(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n,lastUpdatedBy:o}=e;return a.createElement("span",{className:g.k.common.lastUpdated},a.createElement(b.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&n?a.createElement(v,{lastUpdatedAt:t,formattedLastUpdatedAt:n}):"",byUser:o?a.createElement(E,{lastUpdatedBy:o}):""}},"Last updated{atDate}{byUser}"),!1)}var k=n(87462);const N={iconEdit:"iconEdit_Z9Sw"};function C(e){let{className:t,...n}=e;return a.createElement("svg",(0,k.Z)({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,d.Z)(N.iconEdit,t),"aria-hidden":"true"},n),a.createElement("g",null,a.createElement("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})))}function L(e){let{editUrl:t}=e;return a.createElement("a",{href:t,target:"_blank",rel:"noreferrer noopener",className:g.k.common.editThisPage},a.createElement(C,null),a.createElement(b.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page"},"Edit this page"))}var Z=n(39960);const T={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function _(e){let{permalink:t,label:n,count:o}=e;return a.createElement(Z.Z,{href:t,className:(0,d.Z)(T.tag,o?T.tagWithCount:T.tagRegular)},n,o&&a.createElement("span",null,o))}const w={tags:"tags_jXut",tag:"tag_QGVx"};function B(e){let{tags:t}=e;return a.createElement(a.Fragment,null,a.createElement("b",null,a.createElement(b.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),a.createElement("ul",{className:(0,d.Z)(w.tags,"padding--none","margin-left--sm")},t.map((e=>{let{label:t,permalink:n}=e;return a.createElement("li",{key:n,className:w.tag},a.createElement(_,{label:t,permalink:n}))}))))}const x={lastUpdated:"lastUpdated_vwxv"};function O(e){return a.createElement("div",{className:(0,d.Z)(g.k.docs.docFooterTagsRow,"row margin-bottom--sm")},a.createElement("div",{className:"col"},a.createElement(B,e)))}function H(e){let{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:o,formattedLastUpdatedAt:r}=e;return a.createElement("div",{className:(0,d.Z)(g.k.docs.docFooterEditMetaRow,"row")},a.createElement("div",{className:"col"},t&&a.createElement(L,{editUrl:t})),a.createElement("div",{className:(0,d.Z)("col",x.lastUpdated)},(n||o)&&a.createElement(y,{lastUpdatedAt:n,formattedLastUpdatedAt:r,lastUpdatedBy:o})))}function A(){const{metadata:e}=s(),{editUrl:t,lastUpdatedAt:n,formattedLastUpdatedAt:o,lastUpdatedBy:r,tags:l}=e,c=l.length>0,i=!!(t||n||r);return c||i?a.createElement("footer",{className:(0,d.Z)(g.k.docs.docFooter,"docusaurus-mt-lg")},c&&a.createElement(O,{tags:l}),i&&a.createElement(H,{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:r,formattedLastUpdatedAt:o})):null}var j=n(86043),I=n(86668);function S(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const a=n.slice(2,e.level);e.parentIndex=Math.max(...a),n[e.level]=t}));const a=[];return t.forEach((e=>{const{parentIndex:n,...o}=e;n>=0?t[n].children.push(o):a.push(o)})),a}function M(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:a}=e;return t.flatMap((e=>{const t=M({toc:e.children,minHeadingLevel:n,maxHeadingLevel:a});return function(e){return e.level>=n&&e.level<=a}(e)?[{...e,children:t}]:t}))}function P(e){const t=e.getBoundingClientRect();return t.top===t.bottom?P(e.parentNode):t}function U(e,t){let{anchorTopOffset:n}=t;const a=e.find((e=>P(e).top>=n));if(a){return function(e){return e.top>0&&e.bottom<window.innerHeight/2}(P(a))?a:e[e.indexOf(a)-1]??null}return e[e.length-1]??null}function z(){const e=(0,a.useRef)(0),{navbar:{hideOnScroll:t}}=(0,I.L)();return(0,a.useEffect)((()=>{e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function V(e){const t=(0,a.useRef)(void 0),n=z();(0,a.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:a,linkActiveClassName:o,minHeadingLevel:r,maxHeadingLevel:l}=e;function c(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(a),c=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const a=[];for(let o=t;o<=n;o+=1)a.push(`h${o}.anchor`);return Array.from(document.querySelectorAll(a.join()))}({minHeadingLevel:r,maxHeadingLevel:l}),s=U(c,{anchorTopOffset:n.current}),i=e.find((e=>s&&s.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(o),e.classList.add(o),t.current=e):e.classList.remove(o)}(e,e===i)}))}return document.addEventListener("scroll",c),document.addEventListener("resize",c),c(),()=>{document.removeEventListener("scroll",c),document.removeEventListener("resize",c)}}),[e,n])}function D(e){let{toc:t,className:n,linkClassName:o,isChild:r}=e;return t.length?a.createElement("ul",{className:r?void 0:n},t.map((e=>a.createElement("li",{key:e.id},a.createElement("a",{href:`#${e.id}`,className:o??void 0,dangerouslySetInnerHTML:{__html:e.value}}),a.createElement(D,{isChild:!0,toc:e.children,className:n,linkClassName:o}))))):null}const R=a.memo(D);function W(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:o="table-of-contents__link",linkActiveClassName:r,minHeadingLevel:l,maxHeadingLevel:c,...s}=e;const i=(0,I.L)(),d=l??i.tableOfContents.minHeadingLevel,m=c??i.tableOfContents.maxHeadingLevel,u=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:o}=e;return(0,a.useMemo)((()=>M({toc:S(t),minHeadingLevel:n,maxHeadingLevel:o})),[t,n,o])}({toc:t,minHeadingLevel:d,maxHeadingLevel:m});return V((0,a.useMemo)((()=>{if(o&&r)return{linkClassName:o,linkActiveClassName:r,minHeadingLevel:d,maxHeadingLevel:m}}),[o,r,d,m])),a.createElement(R,(0,k.Z)({toc:u,className:n,linkClassName:o},s))}const $={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function F(e){let{collapsed:t,...n}=e;return a.createElement("button",(0,k.Z)({type:"button"},n,{className:(0,d.Z)("clean-btn",$.tocCollapsibleButton,!t&&$.tocCollapsibleButtonExpanded,n.className)}),a.createElement(b.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}const q={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function G(e){let{toc:t,className:n,minHeadingLevel:o,maxHeadingLevel:r}=e;const{collapsed:l,toggleCollapsed:c}=(0,j.u)({initialState:!0});return a.createElement("div",{className:(0,d.Z)(q.tocCollapsible,!l&&q.tocCollapsibleExpanded,n)},a.createElement(F,{collapsed:l,onClick:c}),a.createElement(j.z,{lazy:!0,className:q.tocCollapsibleContent,collapsed:l},a.createElement(W,{toc:t,minHeadingLevel:o,maxHeadingLevel:r})))}const Y={tocMobile:"tocMobile_ITEo"};function J(){const{toc:e,frontMatter:t}=s();return a.createElement(G,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,d.Z)(g.k.docs.docTocMobile,Y.tocMobile)})}const Q={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},X="table-of-contents__link toc-highlight",K="table-of-contents__link--active";function ee(e){let{className:t,...n}=e;return a.createElement("div",{className:(0,d.Z)(Q.tableOfContents,"thin-scrollbar",t)},a.createElement(W,(0,k.Z)({},n,{linkClassName:X,linkActiveClassName:K})))}function te(){const{toc:e,frontMatter:t}=s();return a.createElement(ee,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:g.k.docs.docTocDesktop})}var ne=n(92503),ae=n(3905),oe=n(35742);var re=n(72389),le=n(92949);function ce(){const{prism:e}=(0,I.L)(),{colorMode:t}=(0,le.I)(),n=e.theme,a=e.darkTheme||n;return"dark"===t?a:n}var se=n(87594),ie=n.n(se);const de=/title=(?<quote>["'])(?<title>.*?)\1/,me=/\{(?<range>[\d,-]+)\}/,ue={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}};function pe(e,t){const n=e.map((e=>{const{start:n,end:a}=ue[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${a})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function fe(e,t){let n=e.replace(/\n$/,"");const{language:a,magicComments:o,metastring:r}=t;if(r&&me.test(r)){const e=r.match(me).groups.range;if(0===o.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${r}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=o[0].className,a=ie()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(a),code:n}}if(void 0===a)return{lineClassNames:{},code:n};const l=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return pe(["js","jsBlock"],t);case"jsx":case"tsx":return pe(["js","jsBlock","jsx"],t);case"html":return pe(["js","jsBlock","html"],t);case"python":case"py":case"bash":return pe(["bash"],t);case"markdown":case"md":return pe(["html","jsx","bash"],t);default:return pe(Object.keys(ue),t)}}(a,o),c=n.split("\n"),s=Object.fromEntries(o.map((e=>[e.className,{start:0,range:""}]))),i=Object.fromEntries(o.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),m=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let p=0;p<c.length;){const e=c[p].match(l);if(!e){p+=1;continue}const t=e.slice(1).find((e=>void 0!==e));i[t]?s[i[t]].range+=`${p},`:d[t]?s[d[t]].start=p:m[t]&&(s[m[t]].range+=`${s[m[t]].start}-${p-1},`),c.splice(p,1)}n=c.join("\n");const u={};return Object.entries(s).forEach((e=>{let[t,{range:n}]=e;ie()(n).forEach((e=>{u[e]??=[],u[e].push(t)}))})),{lineClassNames:u,code:n}}const he={codeBlockContainer:"codeBlockContainer_Ckt0"};function ge(e){let{as:t,...n}=e;const o=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[a,o]=e;const r=t[a];r&&"string"==typeof o&&(n[r]=o)})),n}(ce());return a.createElement(t,(0,k.Z)({},n,{style:o,className:(0,d.Z)(n.className,he.codeBlockContainer,g.k.common.codeBlock)}))}const be={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function ve(e){let{children:t,className:n}=e;return a.createElement(ge,{as:"pre",tabIndex:0,className:(0,d.Z)(be.codeBlockStandalone,"thin-scrollbar",n)},a.createElement("code",{className:be.codeBlockLines},t))}const Ee={attributes:!0,characterData:!0,childList:!0,subtree:!0};function ye(e,t){const[n,o]=(0,a.useState)(),l=(0,a.useCallback)((()=>{o(e.current?.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,a.useEffect)((()=>{l()}),[l]),function(e,t,n){void 0===n&&(n=Ee);const o=(0,r.zX)(t),l=(0,r.Ql)(n);(0,a.useEffect)((()=>{const t=new MutationObserver(o);return e&&t.observe(e,l),()=>t.disconnect()}),[e,o,l])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),l())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}const ke={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var Ne={Prism:n(87410).Z,theme:ke};function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}var Ze=/\r\n|\r|\n/,Te=function(e){0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},_e=function(e,t){var n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},we=function(e,t){var n=e.plain,a=Object.create(null),o=e.styles.reduce((function(e,n){var a=n.languages,o=n.style;return a&&!a.includes(t)||n.types.forEach((function(t){var n=Le({},e[t],o);e[t]=n})),e}),a);return o.root=n,o.plain=Le({},n,{backgroundColor:null}),o};function Be(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}const xe=function(e){function t(){for(var t=this,n=[],a=arguments.length;a--;)n[a]=arguments[a];e.apply(this,n),Ce(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?we(e.theme,e.language):void 0;return t.themeDict=n})),Ce(this,"getLineProps",(function(e){var n=e.key,a=e.className,o=e.style,r=Le({},Be(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),l=t.getThemeDict(t.props);return void 0!==l&&(r.style=l.plain),void 0!==o&&(r.style=void 0!==r.style?Le({},r.style,o):o),void 0!==n&&(r.key=n),a&&(r.className+=" "+a),r})),Ce(this,"getStyleForToken",(function(e){var n=e.types,a=e.empty,o=n.length,r=t.getThemeDict(t.props);if(void 0!==r){if(1===o&&"plain"===n[0])return a?{display:"inline-block"}:void 0;if(1===o&&!a)return r[n[0]];var l=a?{display:"inline-block"}:{},c=n.map((function(e){return r[e]}));return Object.assign.apply(Object,[l].concat(c))}})),Ce(this,"getTokenProps",(function(e){var n=e.key,a=e.className,o=e.style,r=e.token,l=Le({},Be(e,["key","className","style","token"]),{className:"token "+r.types.join(" "),children:r.content,style:t.getStyleForToken(r),key:void 0});return void 0!==o&&(l.style=void 0!==l.style?Le({},l.style,o):o),void 0!==n&&(l.key=n),a&&(l.className+=" "+a),l})),Ce(this,"tokenize",(function(e,t,n,a){var o={code:t,grammar:n,language:a,tokens:[]};e.hooks.run("before-tokenize",o);var r=o.tokens=e.tokenize(o.code,o.grammar,o.language);return e.hooks.run("after-tokenize",o),r}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,a=e.code,o=e.children,r=this.getThemeDict(this.props),l=t.languages[n];return o({tokens:function(e){for(var t=[[]],n=[e],a=[0],o=[e.length],r=0,l=0,c=[],s=[c];l>-1;){for(;(r=a[l]++)<o[l];){var i=void 0,d=t[l],m=n[l][r];if("string"==typeof m?(d=l>0?d:["plain"],i=m):(d=_e(d,m.type),m.alias&&(d=_e(d,m.alias)),i=m.content),"string"==typeof i){var u=i.split(Ze),p=u.length;c.push({types:d,content:u[0]});for(var f=1;f<p;f++)Te(c),s.push(c=[]),c.push({types:d,content:u[f]})}else l++,t.push(d),n.push(i),a.push(0),o.push(i.length)}l--,t.pop(),n.pop(),a.pop(),o.pop()}return Te(c),s}(void 0!==l?this.tokenize(t,a,l,n):[a]),className:"prism-code language-"+n,style:void 0!==r?r.root:{},getLineProps:this.getLineProps,getTokenProps:this.getTokenProps})},t}(a.Component),Oe={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function He(e){let{line:t,classNames:n,showLineNumbers:o,getLineProps:r,getTokenProps:l}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const c=r({line:t,className:(0,d.Z)(n,o&&Oe.codeLine)}),s=t.map(((e,t)=>a.createElement("span",(0,k.Z)({key:t},l({token:e,key:t})))));return a.createElement("span",c,o?a.createElement(a.Fragment,null,a.createElement("span",{className:Oe.codeLineNumber}),a.createElement("span",{className:Oe.codeLineContent},s)):s,a.createElement("br",null))}function Ae(e){return a.createElement("svg",(0,k.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}))}function je(e){return a.createElement("svg",(0,k.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}const Ie={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function Se(e){let{code:t,className:n}=e;const[o,r]=(0,a.useState)(!1),l=(0,a.useRef)(void 0),c=(0,a.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const a=document.createElement("textarea"),o=document.activeElement;a.value=e,a.setAttribute("readonly",""),a.style.contain="strict",a.style.position="absolute",a.style.left="-9999px",a.style.fontSize="12pt";const r=document.getSelection(),l=r.rangeCount>0&&r.getRangeAt(0);n.append(a),a.select(),a.selectionStart=0,a.selectionEnd=e.length;let c=!1;try{c=document.execCommand("copy")}catch{}a.remove(),l&&(r.removeAllRanges(),r.addRange(l)),o&&o.focus()}(t),r(!0),l.current=window.setTimeout((()=>{r(!1)}),1e3)}),[t]);return(0,a.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),a.createElement("button",{type:"button","aria-label":o?(0,b.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,b.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,b.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,d.Z)("clean-btn",n,Ie.copyButton,o&&Ie.copyButtonCopied),onClick:c},a.createElement("span",{className:Ie.copyButtonIcons,"aria-hidden":"true"},a.createElement(Ae,{className:Ie.copyButtonIcon}),a.createElement(je,{className:Ie.copyButtonSuccessIcon})))}function Me(e){return a.createElement("svg",(0,k.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}const Pe={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Ue(e){let{className:t,onClick:n,isEnabled:o}=e;const r=(0,b.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return a.createElement("button",{type:"button",onClick:n,className:(0,d.Z)("clean-btn",t,o&&Pe.wordWrapButtonEnabled),"aria-label":r,title:r},a.createElement(Me,{className:Pe.wordWrapButtonIcon,"aria-hidden":"true"}))}function ze(e){let{children:t,className:n="",metastring:o,title:r,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:s,magicComments:i}}=(0,I.L)(),m=c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??s,u=ce(),p=function(){const[e,t]=(0,a.useState)(!1),[n,o]=(0,a.useState)(!1),r=(0,a.useRef)(null),l=(0,a.useCallback)((()=>{const n=r.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[r,e]),c=(0,a.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=r.current,n=e>t||r.current.querySelector("code").hasAttribute("style");o(n)}),[r]);return ye(r,c),(0,a.useEffect)((()=>{c()}),[e,c]),(0,a.useEffect)((()=>(window.addEventListener("resize",c,{passive:!0}),()=>{window.removeEventListener("resize",c)})),[c]),{codeBlockRef:r,isEnabled:e,isCodeScrollable:n,toggle:l}}(),f=function(e){return e?.match(de)?.groups.title??""}(o)||r,{lineClassNames:h,code:g}=fe(t,{metastring:o,language:m,magicComments:i}),b=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(o);return a.createElement(ge,{as:"div",className:(0,d.Z)(n,m&&!n.includes(`language-${m}`)&&`language-${m}`)},f&&a.createElement("div",{className:be.codeBlockTitle},f),a.createElement("div",{className:be.codeBlockContent},a.createElement(xe,(0,k.Z)({},Ne,{theme:u,code:g,language:m??"text"}),(e=>{let{className:t,tokens:n,getLineProps:o,getTokenProps:r}=e;return a.createElement("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,d.Z)(t,be.codeBlock,"thin-scrollbar")},a.createElement("code",{className:(0,d.Z)(be.codeBlockLines,b&&be.codeBlockLinesWithNumbering)},n.map(((e,t)=>a.createElement(He,{key:t,line:e,getLineProps:o,getTokenProps:r,classNames:h[t],showLineNumbers:b})))))})),a.createElement("div",{className:be.buttonGroup},(p.isEnabled||p.isCodeScrollable)&&a.createElement(Ue,{className:be.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),a.createElement(Se,{className:be.codeButton,code:g}))))}function Ve(e){let{children:t,...n}=e;const o=(0,re.Z)(),r=function(e){return a.Children.toArray(e).some((e=>(0,a.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof r?ze:ve;return a.createElement(l,(0,k.Z)({key:String(o)},n),r)}const De={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function Re(e){return!!e&&("SUMMARY"===e.tagName||Re(e.parentElement))}function We(e,t){return!!e&&(e===t||We(e.parentElement,t))}function $e(e){let{summary:t,children:n,...o}=e;const r=(0,re.Z)(),l=(0,a.useRef)(null),{collapsed:c,setCollapsed:s}=(0,j.u)({initialState:!o.open}),[i,m]=(0,a.useState)(o.open),u=a.isValidElement(t)?t:a.createElement("summary",null,t??"Details");return a.createElement("details",(0,k.Z)({},o,{ref:l,open:i,"data-collapsed":c,className:(0,d.Z)(De.details,r&&De.isBrowser,o.className),onMouseDown:e=>{Re(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;Re(t)&&We(t,l.current)&&(e.preventDefault(),c?(s(!1),m(!0)):s(!0))}}),u,a.createElement(j.z,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{s(e),m(!e)}},a.createElement("div",{className:De.collapsibleContent},n)))}const Fe={details:"details_b_Ee"},qe="alert alert--info";function Ge(e){let{...t}=e;return a.createElement($e,(0,k.Z)({},t,{className:(0,d.Z)(qe,Fe.details,t.className)}))}function Ye(e){return a.createElement(ne.Z,e)}const Je={containsTaskList:"containsTaskList_mC6p"};const Qe={img:"img_ev3q"};const Xe={admonition:"admonition_LlT9",admonitionHeading:"admonitionHeading_tbUL",admonitionIcon:"admonitionIcon_kALy",admonitionContent:"admonitionContent_S0QG"};const Ke={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(b.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(b.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(b.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(b.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(b.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},et={secondary:"note",important:"info",success:"tip",warning:"danger"};function tt(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=a.Children.toArray(e),n=t.find((e=>a.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),o=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return{mdxAdmonitionTitle:n,rest:o}}(e.children);return{...e,title:e.title??t,children:n}}const nt={head:function(e){const t=a.Children.map(e.children,(e=>a.isValidElement(e)?function(e){if(e.props?.mdxType&&e.props.originalType){const{mdxType:t,originalType:n,...o}=e.props;return a.createElement(e.props.originalType,o)}return e}(e):e));return a.createElement(oe.Z,e,t)},code:function(e){const t=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return a.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")||(0,a.isValidElement)(e)&&t.includes(e.props?.mdxType)))?a.createElement("code",e):a.createElement(Ve,e)},a:function(e){return a.createElement(Z.Z,e)},pre:function(e){return a.createElement(Ve,(0,a.isValidElement)(e.children)&&"code"===e.children.props?.originalType?e.children.props:{...e})},details:function(e){const t=a.Children.toArray(e.children),n=t.find((e=>a.isValidElement(e)&&"summary"===e.props?.mdxType)),o=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return a.createElement(Ge,(0,k.Z)({},e,{summary:n}),o)},ul:function(e){return a.createElement("ul",(0,k.Z)({},e,{className:(t=e.className,(0,d.Z)(t,t?.includes("contains-task-list")&&Je.containsTaskList))}));var t},img:function(e){return a.createElement("img",(0,k.Z)({loading:"lazy"},e,{className:(t=e.className,(0,d.Z)(t,Qe.img))}));var t},h1:e=>a.createElement(Ye,(0,k.Z)({as:"h1"},e)),h2:e=>a.createElement(Ye,(0,k.Z)({as:"h2"},e)),h3:e=>a.createElement(Ye,(0,k.Z)({as:"h3"},e)),h4:e=>a.createElement(Ye,(0,k.Z)({as:"h4"},e)),h5:e=>a.createElement(Ye,(0,k.Z)({as:"h5"},e)),h6:e=>a.createElement(Ye,(0,k.Z)({as:"h6"},e)),admonition:function(e){const{children:t,type:n,title:o,icon:r}=tt(e),l=function(e){const t=et[e]??e,n=Ke[t];return n||(console.warn(`No admonition config found for admonition type "${t}". Using Info as fallback.`),Ke.info)}(n),c=o??l.label,{iconComponent:s}=l,i=r??a.createElement(s,null);return a.createElement("div",{className:(0,d.Z)(g.k.common.admonition,g.k.common.admonitionType(e.type),"alert",`alert--${l.infimaClassName}`,Xe.admonition)},a.createElement("div",{className:Xe.admonitionHeading},a.createElement("span",{className:Xe.admonitionIcon},i),c),a.createElement("div",{className:Xe.admonitionContent},t))},mermaid:()=>null};function at(e){let{children:t}=e;return a.createElement(ae.Zo,{components:nt},t)}function ot(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=s();return t.hide_title||void 0!==n?null:e.title}();return a.createElement("div",{className:(0,d.Z)(g.k.docs.docMarkdown,"markdown")},n&&a.createElement("header",null,a.createElement(ne.Z,{as:"h1"},n)),a.createElement(at,null,t))}var rt=n(1310);const lt={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function ct(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=s(),n=(0,m.i)(),o=e.hide_table_of_contents,r=!o&&t.length>0;return{hidden:o,mobile:r?a.createElement(J,null):void 0,desktop:!r||"desktop"!==n&&"ssr"!==n?void 0:a.createElement(te,null)}}();return a.createElement("div",{className:"row"},a.createElement("div",{className:(0,d.Z)("col",!n.hidden&<.docItemCol)},a.createElement(f.Z,null),a.createElement("div",{className:lt.docItemContainer},a.createElement("article",null,a.createElement(rt.Z,null),a.createElement(h.Z,null),n.mobile,a.createElement(ot,null,t),a.createElement(A,null)),a.createElement(p,null))),n.desktop&&a.createElement("div",{className:"col col--3"},n.desktop))}function st(e){const t=`docs-doc-id-${e.content.metadata.unversionedId}`,n=e.content;return a.createElement(c,{content:e.content},a.createElement(o.FG,{className:t},a.createElement(i,null),a.createElement(ct,null,a.createElement(n,null))))}},4966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(87462),o=n(67294),r=n(95999),l=n(86010),c=n(39960);function s(e){const{permalink:t,title:n,subLabel:a,isNext:r}=e;return o.createElement(c.Z,{className:(0,l.Z)("pagination-nav__link",r?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},a&&o.createElement("div",{className:"pagination-nav__sublabel"},a),o.createElement("div",{className:"pagination-nav__label"},n))}function i(e){const{previous:t,next:n}=e;return o.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,r.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"})},t&&o.createElement(s,(0,a.Z)({},t,{subLabel:o.createElement(r.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),n&&o.createElement(s,(0,a.Z)({},n,{subLabel:o.createElement(r.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}},44364:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var a=n(67294),o=n(86010),r=n(95999),l=n(35281),c=n(74477);function s(e){let{className:t}=e;const n=(0,c.E)();return n.badge?a.createElement("span",{className:(0,o.Z)(t,l.k.docs.docVersionBadge,"badge badge--secondary")},a.createElement(r.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label}},"Version: {versionLabel}")):null}},23120:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var a=n(67294),o=n(86010),r=n(52263),l=n(39960),c=n(95999),s=n(80143),i=n(35281),d=n(60373),m=n(74477);const u={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(c.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(c.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function p(e){const t=u[e.versionMetadata.banner];return a.createElement(t,e)}function f(e){let{versionLabel:t,to:n,onClick:o}=e;return a.createElement(c.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:a.createElement("b",null,a.createElement(l.Z,{to:n,onClick:o},a.createElement(c.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function h(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:l}}=(0,r.Z)(),{pluginId:c}=(0,s.gA)({failfast:!0}),{savePreferredVersionName:m}=(0,d.J)(c),{latestDocSuggestion:u,latestVersionSuggestion:h}=(0,s.Jo)(c),g=u??(b=h).docs.find((e=>e.id===b.mainDocId));var b;return a.createElement("div",{className:(0,o.Z)(t,i.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},a.createElement("div",null,a.createElement(p,{siteTitle:l,versionMetadata:n})),a.createElement("div",{className:"margin-top--md"},a.createElement(f,{versionLabel:h.label,to:g.path,onClick:()=>m(h.name)})))}function g(e){let{className:t}=e;const n=(0,m.E)();return n.banner?a.createElement(h,{className:t,versionMetadata:n}):null}},92503:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var a=n(87462),o=n(67294),r=n(86010),l=n(95999),c=n(86668),s=n(39960);const i={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};function d(e){let{as:t,id:n,...d}=e;const{navbar:{hideOnScroll:m}}=(0,c.L)();if("h1"===t||!n)return o.createElement(t,(0,a.Z)({},d,{id:void 0}));const u=(0,l.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof d.children?d.children:n});return o.createElement(t,(0,a.Z)({},d,{className:(0,r.Z)("anchor",m?i.anchorWithHideOnScrollNavbar:i.anchorWithStickyNavbar,d.className),id:n}),d.children,o.createElement(s.Z,{className:"hash-link",to:`#${n}`,"aria-label":u,title:u},"\u200b"))}},87594:(e,t)=>{function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,o,r]=t;if(a&&r){a=parseInt(a),r=parseInt(r);const e=a<r?1:-1;"-"!==o&&".."!==o&&"\u2025"!==o||(r+=e);for(let t=a;t!==r;t+=e)n.push(t)}}return n}t.default=n,e.exports=n}}]); \ No newline at end of file diff --git a/assets/js/65a2e3ff.8cb8b5c4.js b/assets/js/65a2e3ff.8cb8b5c4.js deleted file mode 100644 index 7859985ac84..00000000000 --- a/assets/js/65a2e3ff.8cb8b5c4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3291],{4252:e=>{e.exports=JSON.parse('{"title":"Extra","description":"Extra contents for Fiber.","slug":"/category/extra","permalink":"/next/category/extra","navigation":{"previous":{"title":"\u26a1 Make Fiber Faster","permalink":"/next/guide/faster-fiber"},"next":{"title":"\ud83e\udd14 FAQ","permalink":"/next/extra/faq"}}}')}}]); \ No newline at end of file diff --git a/assets/js/65a2e3ff.95e801c4.js b/assets/js/65a2e3ff.95e801c4.js new file mode 100644 index 00000000000..a89986977f6 --- /dev/null +++ b/assets/js/65a2e3ff.95e801c4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3291],{54252:e=>{e.exports=JSON.parse('{"title":"Extra","description":"Extra contents for Fiber.","slug":"/category/extra","permalink":"/next/category/extra","navigation":{"previous":{"title":"\u26a1 Make Fiber Faster","permalink":"/next/guide/faster-fiber"},"next":{"title":"\ud83e\udd14 FAQ","permalink":"/next/extra/faq"}}}')}}]); \ No newline at end of file diff --git a/assets/js/67e6ce42.a6bca3bb.js b/assets/js/67e6ce42.a6bca3bb.js new file mode 100644 index 00000000000..7e264c90e15 --- /dev/null +++ b/assets/js/67e6ce42.a6bca3bb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[95],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>d});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),f=s(r),m=o,d=f["".concat(p,".").concat(m)]||f[m]||u[m]||i;return r?n.createElement(d,a(a({ref:t},c),{},{components:r})):n.createElement(d,a({ref:t},c))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[f]="string"==typeof e?e:o,a[1]=l;for(var s=2;s<i;s++)a[s]=r[s];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}m.displayName="MDXCreateElement"},23215:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));const i={id:"otelfiber-example",title:"Example"},a=void 0,l={unversionedId:"otelfiber/example/otelfiber-example",id:"version-fibersentry_v1.x.x/otelfiber/example/otelfiber-example",title:"Example",description:"An HTTP server using gofiber fiber and instrumentation. The server has a",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/otelfiber/example/README.md",sourceDirName:"otelfiber/example",slug:"/otelfiber/example/",permalink:"/contrib/fibersentry_v1.x.x/otelfiber/example/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/otelfiber/example/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"otelfiber-example",title:"Example"},sidebar:"tutorialSidebar",previous:{title:"Otelfiber",permalink:"/contrib/fibersentry_v1.x.x/otelfiber/"},next:{title:"Paseto",permalink:"/contrib/fibersentry_v1.x.x/paseto/"}},p={},s=[],c={toc:s},f="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(f,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"An HTTP server using gofiber fiber and instrumentation. The server has a\n",(0,o.kt)("inlineCode",{parentName:"p"},"/users/:id")," endpoint. The server generates span information to\n",(0,o.kt)("inlineCode",{parentName:"p"},"stdout"),"."),(0,o.kt)("p",null,"These instructions expect you have\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/"},"docker-compose")," installed."),(0,o.kt)("p",null,"Bring up the ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," services to run the\nexample:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose up --detach fiber-server fiber-client\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," service sends just one HTTP request to ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server"),"\nand then exits. View the span generated by ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," in the logs:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose logs fiber-server\n")),(0,o.kt)("p",null,"Shut down the services when you are finished with the example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose down\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/67e6ce42.de981432.js b/assets/js/67e6ce42.de981432.js deleted file mode 100644 index 095f8714720..00000000000 --- a/assets/js/67e6ce42.de981432.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[95],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>d});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),f=s(r),m=o,d=f["".concat(p,".").concat(m)]||f[m]||u[m]||i;return r?n.createElement(d,a(a({ref:t},c),{},{components:r})):n.createElement(d,a({ref:t},c))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[f]="string"==typeof e?e:o,a[1]=l;for(var s=2;s<i;s++)a[s]=r[s];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}m.displayName="MDXCreateElement"},3215:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(7462),o=(r(7294),r(3905));const i={id:"otelfiber-example",title:"Example"},a=void 0,l={unversionedId:"otelfiber/example/otelfiber-example",id:"version-fibersentry_v1.x.x/otelfiber/example/otelfiber-example",title:"Example",description:"An HTTP server using gofiber fiber and instrumentation. The server has a",source:"@site/contrib_versioned_docs/version-fibersentry_v1.x.x/otelfiber/example/README.md",sourceDirName:"otelfiber/example",slug:"/otelfiber/example/",permalink:"/contrib/fibersentry_v1.x.x/otelfiber/example/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/otelfiber/example/README.md",tags:[],version:"fibersentry_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"otelfiber-example",title:"Example"},sidebar:"tutorialSidebar",previous:{title:"Otelfiber",permalink:"/contrib/fibersentry_v1.x.x/otelfiber/"},next:{title:"Paseto",permalink:"/contrib/fibersentry_v1.x.x/paseto/"}},p={},s=[],c={toc:s},f="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(f,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"An HTTP server using gofiber fiber and instrumentation. The server has a\n",(0,o.kt)("inlineCode",{parentName:"p"},"/users/:id")," endpoint. The server generates span information to\n",(0,o.kt)("inlineCode",{parentName:"p"},"stdout"),"."),(0,o.kt)("p",null,"These instructions expect you have\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/"},"docker-compose")," installed."),(0,o.kt)("p",null,"Bring up the ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," services to run the\nexample:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose up --detach fiber-server fiber-client\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," service sends just one HTTP request to ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server"),"\nand then exits. View the span generated by ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," in the logs:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose logs fiber-server\n")),(0,o.kt)("p",null,"Shut down the services when you are finished with the example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose down\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/683903ba.170e050f.js b/assets/js/683903ba.170e050f.js new file mode 100644 index 00000000000..73bb7898268 --- /dev/null +++ b/assets/js/683903ba.170e050f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6042],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>g});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function o(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=r.createContext({}),l=function(e){var n=r.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):p(p({},n),e)),t},s=function(e){var n=l(e.components);return r.createElement(u.Provider,{value:n},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},v=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,u=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),c=l(t),v=a,g=c["".concat(u,".").concat(v)]||c[v]||d[v]||i;return t?r.createElement(g,p(p({ref:n},s),{},{components:t})):r.createElement(g,p({ref:n},s))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,p=new Array(i);p[0]=v;var o={};for(var u in n)hasOwnProperty.call(n,u)&&(o[u]=n[u]);o.originalType=e,o[c]="string"==typeof e?e:a,p[1]=o;for(var l=2;l<i;l++)p[l]=t[l];return r.createElement.apply(null,p)}return r.createElement.apply(null,t)}v.displayName="MDXCreateElement"},11809:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var r=t(87462),a=(t(67294),t(3905));const i={id:"grouping",title:"\ud83c\udfad Grouping",sidebar_position:2},p=void 0,o={unversionedId:"guide/grouping",id:"version-v1.x/guide/grouping",title:"\ud83c\udfad Grouping",description:"Paths",source:"@site/versioned_docs/version-v1.x/guide/grouping.md",sourceDirName:"guide",slug:"/guide/grouping",permalink:"/v1.x/guide/grouping",draft:!1,tags:[],version:"v1.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:2,frontMatter:{id:"grouping",title:"\ud83c\udfad Grouping",sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udd0c Routing",permalink:"/v1.x/guide/routing"},next:{title:"\ud83d\udcdd Templates",permalink:"/v1.x/guide/templates"}},u={},l=[{value:"Paths",id:"paths",level:2},{value:"Group Handlers",id:"group-handlers",level:2}],s={toc:l},c="wrapper";function d(e){let{components:n,...t}=e;return(0,a.kt)(c,(0,r.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"paths"},"Paths"),(0,a.kt)("p",null,"Like ",(0,a.kt)("strong",{parentName:"p"},"Routing"),", groups can also have paths that belong to a cluster."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api", cors()) // /api\n\n v1 := api.Group("/v1", mysql()) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2", mongodb()) // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n app.Listen(3000)\n}\n')),(0,a.kt)("p",null,"A ",(0,a.kt)("strong",{parentName:"p"},"Group")," of paths can have an optional handler."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api") // /api\n\n v1 := api.Group("/v1") // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2") // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n app.Listen(3000)\n}\n')),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"Running ",(0,a.kt)("strong",{parentName:"p"},"/api"),", ",(0,a.kt)("strong",{parentName:"p"},"/v1")," or ",(0,a.kt)("strong",{parentName:"p"},"/v2")," will result in ",(0,a.kt)("strong",{parentName:"p"},"404")," error, make sure you have the errors set.")),(0,a.kt)("h2",{id:"group-handlers"},"Group Handlers"),(0,a.kt)("p",null,"Group handlers can also be used as a routing path but they must have ",(0,a.kt)("strong",{parentName:"p"},"Next")," added to them so that the flow can continue."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api") // /api\n\n v1 := api.Group("/v1", func(c *fiber.Ctx) {\n c.JSON(fiber.Map{\n "message": "v1",\n })\n c.Next()\n }) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n app.Listen(3000)\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/683903ba.8a19fcce.js b/assets/js/683903ba.8a19fcce.js deleted file mode 100644 index 74523417ecb..00000000000 --- a/assets/js/683903ba.8a19fcce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6042],{3905:(e,n,t)=>{t.d(n,{Zo:()=>s,kt:()=>g});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function o(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=r.createContext({}),l=function(e){var n=r.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):p(p({},n),e)),t},s=function(e){var n=l(e.components);return r.createElement(u.Provider,{value:n},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},v=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,u=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),c=l(t),v=a,g=c["".concat(u,".").concat(v)]||c[v]||d[v]||i;return t?r.createElement(g,p(p({ref:n},s),{},{components:t})):r.createElement(g,p({ref:n},s))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,p=new Array(i);p[0]=v;var o={};for(var u in n)hasOwnProperty.call(n,u)&&(o[u]=n[u]);o.originalType=e,o[c]="string"==typeof e?e:a,p[1]=o;for(var l=2;l<i;l++)p[l]=t[l];return r.createElement.apply(null,p)}return r.createElement.apply(null,t)}v.displayName="MDXCreateElement"},1809:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var r=t(7462),a=(t(7294),t(3905));const i={id:"grouping",title:"\ud83c\udfad Grouping",sidebar_position:2},p=void 0,o={unversionedId:"guide/grouping",id:"version-v1.x/guide/grouping",title:"\ud83c\udfad Grouping",description:"Paths",source:"@site/versioned_docs/version-v1.x/guide/grouping.md",sourceDirName:"guide",slug:"/guide/grouping",permalink:"/v1.x/guide/grouping",draft:!1,tags:[],version:"v1.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:2,frontMatter:{id:"grouping",title:"\ud83c\udfad Grouping",sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udd0c Routing",permalink:"/v1.x/guide/routing"},next:{title:"\ud83d\udcdd Templates",permalink:"/v1.x/guide/templates"}},u={},l=[{value:"Paths",id:"paths",level:2},{value:"Group Handlers",id:"group-handlers",level:2}],s={toc:l},c="wrapper";function d(e){let{components:n,...t}=e;return(0,a.kt)(c,(0,r.Z)({},s,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"paths"},"Paths"),(0,a.kt)("p",null,"Like ",(0,a.kt)("strong",{parentName:"p"},"Routing"),", groups can also have paths that belong to a cluster."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api", cors()) // /api\n\n v1 := api.Group("/v1", mysql()) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2", mongodb()) // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n app.Listen(3000)\n}\n')),(0,a.kt)("p",null,"A ",(0,a.kt)("strong",{parentName:"p"},"Group")," of paths can have an optional handler."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api") // /api\n\n v1 := api.Group("/v1") // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n v2 := api.Group("/v2") // /api/v2\n v2.Get("/list", handler) // /api/v2/list\n v2.Get("/user", handler) // /api/v2/user\n\n app.Listen(3000)\n}\n')),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"Running ",(0,a.kt)("strong",{parentName:"p"},"/api"),", ",(0,a.kt)("strong",{parentName:"p"},"/v1")," or ",(0,a.kt)("strong",{parentName:"p"},"/v2")," will result in ",(0,a.kt)("strong",{parentName:"p"},"404")," error, make sure you have the errors set.")),(0,a.kt)("h2",{id:"group-handlers"},"Group Handlers"),(0,a.kt)("p",null,"Group handlers can also be used as a routing path but they must have ",(0,a.kt)("strong",{parentName:"p"},"Next")," added to them so that the flow can continue."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n api := app.Group("/api") // /api\n\n v1 := api.Group("/v1", func(c *fiber.Ctx) {\n c.JSON(fiber.Map{\n "message": "v1",\n })\n c.Next()\n }) // /api/v1\n v1.Get("/list", handler) // /api/v1/list\n v1.Get("/user", handler) // /api/v1/user\n\n app.Listen(3000)\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/69615979.26c5be82.js b/assets/js/69615979.26c5be82.js new file mode 100644 index 00000000000..b4978479a23 --- /dev/null +++ b/assets/js/69615979.26c5be82.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2030],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>d});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=s(r),m=o,d=u["".concat(p,".").concat(m)]||u[m]||f[m]||i;return r?n.createElement(d,a(a({ref:t},c),{},{components:r})):n.createElement(d,a({ref:t},c))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:o,a[1]=l;for(var s=2;s<i;s++)a[s]=r[s];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}m.displayName="MDXCreateElement"},20178:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));const i={id:"otelfiber-example",title:"Example"},a=void 0,l={unversionedId:"otelfiber/example/otelfiber-example",id:"version-fiberzerolog_v0.x.x/otelfiber/example/otelfiber-example",title:"Example",description:"An HTTP server using gofiber fiber and instrumentation. The server has a",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/otelfiber/example/README.md",sourceDirName:"otelfiber/example",slug:"/otelfiber/example/",permalink:"/contrib/otelfiber/example/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/otelfiber/example/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"otelfiber-example",title:"Example"},sidebar:"tutorialSidebar",previous:{title:"Otelfiber",permalink:"/contrib/otelfiber/"},next:{title:"Paseto",permalink:"/contrib/paseto/"}},p={},s=[],c={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"An HTTP server using gofiber fiber and instrumentation. The server has a\n",(0,o.kt)("inlineCode",{parentName:"p"},"/users/:id")," endpoint. The server generates span information to\n",(0,o.kt)("inlineCode",{parentName:"p"},"stdout"),"."),(0,o.kt)("p",null,"These instructions expect you have\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/"},"docker-compose")," installed."),(0,o.kt)("p",null,"Bring up the ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," services to run the\nexample:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose up --detach fiber-server fiber-client\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," service sends just one HTTP request to ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server"),"\nand then exits. View the span generated by ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," in the logs:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose logs fiber-server\n")),(0,o.kt)("p",null,"Shut down the services when you are finished with the example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose down\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/69615979.6a8fffce.js b/assets/js/69615979.6a8fffce.js deleted file mode 100644 index 81626edd1ab..00000000000 --- a/assets/js/69615979.6a8fffce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2030],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>d});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=s(r),m=o,d=u["".concat(p,".").concat(m)]||u[m]||f[m]||i;return r?n.createElement(d,a(a({ref:t},c),{},{components:r})):n.createElement(d,a({ref:t},c))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=m;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:o,a[1]=l;for(var s=2;s<i;s++)a[s]=r[s];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}m.displayName="MDXCreateElement"},178:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>a,default:()=>f,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(7462),o=(r(7294),r(3905));const i={id:"otelfiber-example",title:"Example"},a=void 0,l={unversionedId:"otelfiber/example/otelfiber-example",id:"version-fiberzerolog_v0.x.x/otelfiber/example/otelfiber-example",title:"Example",description:"An HTTP server using gofiber fiber and instrumentation. The server has a",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/otelfiber/example/README.md",sourceDirName:"otelfiber/example",slug:"/otelfiber/example/",permalink:"/contrib/otelfiber/example/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/otelfiber/example/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"otelfiber-example",title:"Example"},sidebar:"tutorialSidebar",previous:{title:"Otelfiber",permalink:"/contrib/otelfiber/"},next:{title:"Paseto",permalink:"/contrib/paseto/"}},p={},s=[],c={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"An HTTP server using gofiber fiber and instrumentation. The server has a\n",(0,o.kt)("inlineCode",{parentName:"p"},"/users/:id")," endpoint. The server generates span information to\n",(0,o.kt)("inlineCode",{parentName:"p"},"stdout"),"."),(0,o.kt)("p",null,"These instructions expect you have\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/"},"docker-compose")," installed."),(0,o.kt)("p",null,"Bring up the ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," services to run the\nexample:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose up --detach fiber-server fiber-client\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-client")," service sends just one HTTP request to ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server"),"\nand then exits. View the span generated by ",(0,o.kt)("inlineCode",{parentName:"p"},"fiber-server")," in the logs:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose logs fiber-server\n")),(0,o.kt)("p",null,"Shut down the services when you are finished with the example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-sh"},"docker-compose down\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/696b59c8.060be796.js b/assets/js/696b59c8.060be796.js deleted file mode 100644 index 48ad760b012..00000000000 --- a/assets/js/696b59c8.060be796.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[929],{5718:e=>{e.exports=JSON.parse('{"title":"\ud83e\uddec Middleware","description":"Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.","slug":"/category/-middleware","permalink":"/next/category/-middleware","navigation":{"previous":{"title":"\ud83c\udf0e Client","permalink":"/next/api/client"},"next":{"title":"Adaptor","permalink":"/next/api/middleware/adaptor"}}}')}}]); \ No newline at end of file diff --git a/assets/js/d56ded4a.cc4917eb.js b/assets/js/696b59c8.d440f685.js similarity index 54% rename from assets/js/d56ded4a.cc4917eb.js rename to assets/js/696b59c8.d440f685.js index df5887d9d67..8055625fb74 100644 --- a/assets/js/d56ded4a.cc4917eb.js +++ b/assets/js/696b59c8.d440f685.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3031],{3760:e=>{e.exports=JSON.parse('{"title":"\ud83e\uddec Middleware","description":"Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.","slug":"/category/-middleware","permalink":"/category/-middleware","navigation":{"previous":{"title":"\ud83c\udf0e Client","permalink":"/api/client"},"next":{"title":"Adaptor","permalink":"/api/middleware/adaptor"}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[929],{15718:e=>{e.exports=JSON.parse('{"title":"\ud83e\uddec Middleware","description":"Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.","slug":"/category/-middleware","permalink":"/next/category/-middleware","navigation":{"previous":{"title":"\ud83c\udf0e Client","permalink":"/next/api/client"},"next":{"title":"Adaptor","permalink":"/next/api/middleware/adaptor"}}}')}}]); \ No newline at end of file diff --git a/assets/js/696e1f87.70642067.js b/assets/js/696e1f87.70642067.js new file mode 100644 index 00000000000..ba848e90900 --- /dev/null +++ b/assets/js/696e1f87.70642067.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1586],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),g=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=g(e.components);return a.createElement(o.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=g(n),c=r,d=p["".concat(o,".").concat(c)]||p[c]||m[c]||l;return n?a.createElement(d,i(i({ref:t},u),{},{components:n})):a.createElement(d,i({ref:t},u))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=c;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var g=2;g<l;g++)i[g]=n[g];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}c.displayName="MDXCreateElement"},71362:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>g});var a=n(87462),r=(n(67294),n(3905));const l={id:"client",title:"\ud83c\udf0e Client",description:"The Client struct represents the Fiber HTTP Client.",sidebar_position:5},i=void 0,s={unversionedId:"api/client",id:"version-v2.x/api/client",title:"\ud83c\udf0e Client",description:"The Client struct represents the Fiber HTTP Client.",source:"@site/versioned_docs/version-v2.x/api/client.md",sourceDirName:"api",slug:"/api/client",permalink:"/api/client",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:5,frontMatter:{id:"client",title:"\ud83c\udf0e Client",description:"The Client struct represents the Fiber HTTP Client.",sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udccb Constants",permalink:"/api/constants"},next:{title:"\ud83e\uddec Middleware",permalink:"/category/-middleware"}},o={},g=[{value:"Start request",id:"start-request",level:2},{value:"\u2728 Agent",id:"-agent",level:2},{value:"Parse",id:"parse",level:3},{value:"Set",id:"set",level:3},{value:"Add",id:"add",level:3},{value:"ConnectionClose",id:"connectionclose",level:3},{value:"UserAgent",id:"useragent",level:3},{value:"Cookie",id:"cookie",level:3},{value:"Referer",id:"referer",level:3},{value:"ContentType",id:"contenttype",level:3},{value:"Host",id:"host",level:3},{value:"QueryString",id:"querystring",level:3},{value:"BasicAuth",id:"basicauth",level:3},{value:"Body",id:"body",level:3},{value:"JSON",id:"json",level:3},{value:"XML",id:"xml",level:3},{value:"Form",id:"form",level:3},{value:"MultipartForm",id:"multipartform",level:3},{value:"Boundary",id:"boundary",level:4},{value:"SendFile(s)",id:"sendfiles",level:4},{value:"FileData",id:"filedata",level:4},{value:"Debug",id:"debug",level:3},{value:"Timeout",id:"timeout",level:3},{value:"Reuse",id:"reuse",level:3},{value:"InsecureSkipVerify",id:"insecureskipverify",level:3},{value:"TLSConfig",id:"tlsconfig",level:3},{value:"MaxRedirectsCount",id:"maxredirectscount",level:3},{value:"JSONEncoder",id:"jsonencoder",level:3},{value:"JSONDecoder",id:"jsondecoder",level:3},{value:"Request",id:"request",level:3},{value:"SetResponse",id:"setresponse",level:3},{value:"Dest",id:"dest",level:3},{value:"Bytes",id:"bytes",level:3},{value:"String",id:"string",level:3},{value:"Struct",id:"struct",level:3},{value:"RetryIf",id:"retryif",level:3}],u={toc:g},p="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"start-request"},"Start request"),(0,r.kt)("p",null,"Start a http request with http method and url."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signatures"',title:'"Signatures"'},"// Client http methods\nfunc (c *Client) Get(url string) *Agent\nfunc (c *Client) Head(url string) *Agent\nfunc (c *Client) Post(url string) *Agent\nfunc (c *Client) Put(url string) *Agent\nfunc (c *Client) Patch(url string) *Agent\nfunc (c *Client) Delete(url string) *Agent\n")),(0,r.kt)("h2",{id:"-agent"},"\u2728 Agent"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Agent")," is built on top of FastHTTP's ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/valyala/fasthttp/blob/master/client.go#L603"},(0,r.kt)("inlineCode",{parentName:"a"},"HostClient"))," which has lots of convenient helper methods such as dedicated methods for request methods."),(0,r.kt)("h3",{id:"parse"},"Parse"),(0,r.kt)("p",null,"Parse initializes a HostClient."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Parse"',title:'"Parse"'},'a := AcquireAgent()\nreq := a.Request()\nreq.Header.SetMethod(MethodGet)\nreq.SetRequestURI("http://example.com")\n\nif err := a.Parse(); err != nil {\n panic(err)\n}\n\ncode, body, errs := a.Bytes() // ...\n')),(0,r.kt)("h3",{id:"set"},"Set"),(0,r.kt)("p",null,"Set sets the given ",(0,r.kt)("inlineCode",{parentName:"p"},"key: value")," header."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Set(k, v string) *Agent\nfunc (a *Agent) SetBytesK(k []byte, v string) *Agent\nfunc (a *Agent) SetBytesV(k string, v []byte) *Agent\nfunc (a *Agent) SetBytesKV(k []byte, v []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Set("k1", "v1").\n SetBytesK([]byte("k1"), "v1").\n SetBytesV("k1", []byte("v1")).\n SetBytesKV([]byte("k2"), []byte("v2"))\n// ...\n')),(0,r.kt)("h3",{id:"add"},"Add"),(0,r.kt)("p",null,"Add adds the given ",(0,r.kt)("inlineCode",{parentName:"p"},"key: value")," header. Multiple headers with the same key may be added with this function."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Add(k, v string) *Agent\nfunc (a *Agent) AddBytesK(k []byte, v string) *Agent\nfunc (a *Agent) AddBytesV(k string, v []byte) *Agent\nfunc (a *Agent) AddBytesKV(k []byte, v []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Add("k1", "v1").\n AddBytesK([]byte("k1"), "v1").\n AddBytesV("k1", []byte("v1")).\n AddBytesKV([]byte("k2"), []byte("v2"))\n// Headers:\n// K1: v1\n// K1: v1\n// K1: v1\n// K2: v2\n')),(0,r.kt)("h3",{id:"connectionclose"},"ConnectionClose"),(0,r.kt)("p",null,"ConnectionClose adds the ",(0,r.kt)("inlineCode",{parentName:"p"},"Connection: close")," header."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) ConnectionClose() *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.ConnectionClose()\n// ...\n")),(0,r.kt)("h3",{id:"useragent"},"UserAgent"),(0,r.kt)("p",null,"UserAgent sets ",(0,r.kt)("inlineCode",{parentName:"p"},"User-Agent")," header value."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) UserAgent(userAgent string) *Agent\nfunc (a *Agent) UserAgentBytes(userAgent []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.UserAgent("fiber")\n// ...\n')),(0,r.kt)("h3",{id:"cookie"},"Cookie"),(0,r.kt)("p",null,"Cookie sets a cookie in ",(0,r.kt)("inlineCode",{parentName:"p"},"key: value")," form. ",(0,r.kt)("inlineCode",{parentName:"p"},"Cookies")," can be used to set multiple cookies."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Cookie(key, value string) *Agent\nfunc (a *Agent) CookieBytesK(key []byte, value string) *Agent\nfunc (a *Agent) CookieBytesKV(key, value []byte) *Agent\nfunc (a *Agent) Cookies(kv ...string) *Agent\nfunc (a *Agent) CookiesBytesKV(kv ...[]byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Cookie("k", "v")\nagent.Cookies("k1", "v1", "k2", "v2")\n// ...\n')),(0,r.kt)("h3",{id:"referer"},"Referer"),(0,r.kt)("p",null,"Referer sets the Referer header value."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Referer(referer string) *Agent\nfunc (a *Agent) RefererBytes(referer []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Referer("https://docs.gofiber.io")\n// ...\n')),(0,r.kt)("h3",{id:"contenttype"},"ContentType"),(0,r.kt)("p",null,"ContentType sets Content-Type header value."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) ContentType(contentType string) *Agent\nfunc (a *Agent) ContentTypeBytes(contentType []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.ContentType("custom-type")\n// ...\n')),(0,r.kt)("h3",{id:"host"},"Host"),(0,r.kt)("p",null,"Host sets the Host header."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Host(host string) *Agent\nfunc (a *Agent) HostBytes(host []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Host("example.com")\n// ...\n')),(0,r.kt)("h3",{id:"querystring"},"QueryString"),(0,r.kt)("p",null,"QueryString sets the URI query string."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) QueryString(queryString string) *Agent\nfunc (a *Agent) QueryStringBytes(queryString []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.QueryString("foo=bar")\n// ...\n')),(0,r.kt)("h3",{id:"basicauth"},"BasicAuth"),(0,r.kt)("p",null,"BasicAuth sets the URI username and password using HTTP Basic Auth."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) BasicAuth(username, password string) *Agent\nfunc (a *Agent) BasicAuthBytes(username, password []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.BasicAuth("foo", "bar")\n// ...\n')),(0,r.kt)("h3",{id:"body"},"Body"),(0,r.kt)("p",null,"There are several ways to set request body."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) BodyString(bodyString string) *Agent\nfunc (a *Agent) Body(body []byte) *Agent\n\n// BodyStream sets request body stream and, optionally body size.\n//\n// If bodySize is >= 0, then the bodyStream must provide exactly bodySize bytes\n// before returning io.EOF.\n//\n// If bodySize < 0, then bodyStream is read until io.EOF.\n//\n// bodyStream.Close() is called after finishing reading all body data\n// if it implements io.Closer.\n//\n// Note that GET and HEAD requests cannot have body.\nfunc (a *Agent) BodyStream(bodyStream io.Reader, bodySize int) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.BodyString("foo=bar")\nagent.Body([]byte("bar=baz"))\nagent.BodyStream(strings.NewReader("body=stream"), -1)\n// ...\n')),(0,r.kt)("h3",{id:"json"},"JSON"),(0,r.kt)("p",null,"JSON sends a JSON request by setting the Content-Type header to ",(0,r.kt)("inlineCode",{parentName:"p"},"application/json"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) JSON(v interface{}) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.JSON(fiber.Map{"success": true})\n// ...\n')),(0,r.kt)("h3",{id:"xml"},"XML"),(0,r.kt)("p",null,"XML sends an XML request by setting the Content-Type header to ",(0,r.kt)("inlineCode",{parentName:"p"},"application/xml"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) XML(v interface{}) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.XML(fiber.Map{"success": true})\n// ...\n')),(0,r.kt)("h3",{id:"form"},"Form"),(0,r.kt)("p",null,"Form sends a form request by setting the Content-Type header to ",(0,r.kt)("inlineCode",{parentName:"p"},"application/x-www-form-urlencoded"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"// Form sends form request with body if args is non-nil.\n//\n// It is recommended obtaining args via AcquireArgs and release it\n// manually in performance-critical code.\nfunc (a *Agent) Form(args *Args) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'args := AcquireArgs()\nargs.Set("foo", "bar")\n\nagent.Form(args)\n// ...\nReleaseArgs(args)\n')),(0,r.kt)("h3",{id:"multipartform"},"MultipartForm"),(0,r.kt)("p",null,"MultipartForm sends multipart form request by setting the Content-Type header to ",(0,r.kt)("inlineCode",{parentName:"p"},"multipart/form-data"),". These requests can include key-value's and files."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"// MultipartForm sends multipart form request with k-v and files.\n//\n// It is recommended to obtain args via AcquireArgs and release it\n// manually in performance-critical code.\nfunc (a *Agent) MultipartForm(args *Args) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'args := AcquireArgs()\nargs.Set("foo", "bar")\n\nagent.MultipartForm(args)\n// ...\nReleaseArgs(args)\n')),(0,r.kt)("p",null,"Fiber provides several methods for sending files. Note that they must be called before ",(0,r.kt)("inlineCode",{parentName:"p"},"MultipartForm"),"."),(0,r.kt)("h4",{id:"boundary"},"Boundary"),(0,r.kt)("p",null,"Boundary sets boundary for multipart form request."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Boundary(boundary string) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Boundary("myBoundary")\n .MultipartForm(nil)\n// ...\n')),(0,r.kt)("h4",{id:"sendfiles"},"SendFile","(","s",")"),(0,r.kt)("p",null,"SendFile read a file and appends it to a multipart form request. Sendfiles can be used to append multiple files."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) SendFile(filename string, fieldname ...string) *Agent\nfunc (a *Agent) SendFiles(filenamesAndFieldnames ...string) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.SendFile("f", "field name")\n .SendFiles("f1", "field name1", "f2").\n .MultipartForm(nil)\n// ...\n')),(0,r.kt)("h4",{id:"filedata"},"FileData"),(0,r.kt)("p",null,"FileData appends file data for multipart form request."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"// FormFile represents multipart form file\ntype FormFile struct {\n // Fieldname is form file's field name\n Fieldname string\n // Name is form file's name\n Name string\n // Content is form file's content\n Content []byte\n}\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"// FileData appends files for multipart form request.\n//\n// It is recommended obtaining formFile via AcquireFormFile and release it\n// manually in performance-critical code.\nfunc (a *Agent) FileData(formFiles ...*FormFile) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'ff1 := &FormFile{"filename1", "field name1", []byte("content")}\nff2 := &FormFile{"filename2", "field name2", []byte("content")}\nagent.FileData(ff1, ff2).\n MultipartForm(nil)\n// ...\n')),(0,r.kt)("h3",{id:"debug"},"Debug"),(0,r.kt)("p",null,"Debug mode enables logging request and response detail to ",(0,r.kt)("inlineCode",{parentName:"p"},"io.writer"),"(","default is ",(0,r.kt)("inlineCode",{parentName:"p"},"os.Stdout"),")","."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Debug(w ...io.Writer) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.Debug()\n// ...\n")),(0,r.kt)("h3",{id:"timeout"},"Timeout"),(0,r.kt)("p",null,"Timeout sets request timeout duration."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Timeout(timeout time.Duration) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.Timeout(time.Second)\n// ...\n")),(0,r.kt)("h3",{id:"reuse"},"Reuse"),(0,r.kt)("p",null,"Reuse enables the Agent instance to be used again after one request. If agent is reusable, then it should be released manually when it is no longer used."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Reuse() *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.Reuse()\n// ...\n")),(0,r.kt)("h3",{id:"insecureskipverify"},"InsecureSkipVerify"),(0,r.kt)("p",null,"InsecureSkipVerify controls whether the Agent verifies the server certificate chain and host name."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) InsecureSkipVerify() *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.InsecureSkipVerify()\n// ...\n")),(0,r.kt)("h3",{id:"tlsconfig"},"TLSConfig"),(0,r.kt)("p",null,"TLSConfig sets tls config."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) TLSConfig(config *tls.Config) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Create tls certificate\ncer, _ := tls.LoadX509KeyPair("pem", "key")\n\nconfig := &tls.Config{\n Certificates: []tls.Certificate{cer},\n}\n\nagent.TLSConfig(config)\n// ...\n')),(0,r.kt)("h3",{id:"maxredirectscount"},"MaxRedirectsCount"),(0,r.kt)("p",null,"MaxRedirectsCount sets max redirect count for GET and HEAD."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) MaxRedirectsCount(count int) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.MaxRedirectsCount(7)\n// ...\n")),(0,r.kt)("h3",{id:"jsonencoder"},"JSONEncoder"),(0,r.kt)("p",null,"JSONEncoder sets custom json encoder."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) JSONEncoder(jsonEncoder utils.JSONMarshal) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.JSONEncoder(json.Marshal)\n// ...\n")),(0,r.kt)("h3",{id:"jsondecoder"},"JSONDecoder"),(0,r.kt)("p",null,"JSONDecoder sets custom json decoder."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) JSONDecoder(jsonDecoder utils.JSONUnmarshal) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.JSONDecoder(json.Unmarshal)\n// ...\n")),(0,r.kt)("h3",{id:"request"},"Request"),(0,r.kt)("p",null,"Request returns Agent request instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Request() *Request\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"req := agent.Request()\n// ...\n")),(0,r.kt)("h3",{id:"setresponse"},"SetResponse"),(0,r.kt)("p",null,"SetResponse sets custom response for the Agent instance. It is recommended obtaining custom response via AcquireResponse and release it manually in performance-critical code."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) SetResponse(customResp *Response) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"resp := AcquireResponse()\nagent.SetResponse(resp)\n// ...\nReleaseResponse(resp)\n")),(0,r.kt)("h3",{id:"dest"},"Dest"),(0,r.kt)("p",null,"Dest sets custom dest. The contents of dest will be replaced by the response body, if the dest is too small a new slice will be allocated."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Dest(dest []byte) *Agent {\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.Dest(nil)\n// ...\n")),(0,r.kt)("h3",{id:"bytes"},"Bytes"),(0,r.kt)("p",null,"Bytes returns the status code, bytes body and errors of url."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Bytes() (code int, body []byte, errs []error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"code, body, errs := agent.Bytes()\n// ...\n")),(0,r.kt)("h3",{id:"string"},"String"),(0,r.kt)("p",null,"String returns the status code, string body and errors of url."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) String() (int, string, []error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"code, body, errs := agent.String()\n// ...\n")),(0,r.kt)("h3",{id:"struct"},"Struct"),(0,r.kt)("p",null,"Struct returns the status code, bytes body and errors of url. And bytes body will be unmarshalled to given v."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Struct(v interface{}) (code int, body []byte, errs []error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"var d data\ncode, body, errs := agent.Struct(&d)\n// ...\n")),(0,r.kt)("h3",{id:"retryif"},"RetryIf"),(0,r.kt)("p",null,"RetryIf controls whether a retry should be attempted after an error.\nBy default, will use isIdempotent function from fasthttp"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Get("https://example.com").RetryIf(func (req *fiber.Request) bool {\n return req.URI() == "https://example.com"\n})\n// ...\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/696e1f87.9e6b4678.js b/assets/js/696e1f87.9e6b4678.js deleted file mode 100644 index 5beb7fbfdea..00000000000 --- a/assets/js/696e1f87.9e6b4678.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1586],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),g=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=g(e.components);return a.createElement(o.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=g(n),c=r,d=p["".concat(o,".").concat(c)]||p[c]||m[c]||l;return n?a.createElement(d,i(i({ref:t},u),{},{components:n})):a.createElement(d,i({ref:t},u))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=c;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:r,i[1]=s;for(var g=2;g<l;g++)i[g]=n[g];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}c.displayName="MDXCreateElement"},1362:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>g});var a=n(7462),r=(n(7294),n(3905));const l={id:"client",title:"\ud83c\udf0e Client",description:"The Client struct represents the Fiber HTTP Client.",sidebar_position:5},i=void 0,s={unversionedId:"api/client",id:"version-v2.x/api/client",title:"\ud83c\udf0e Client",description:"The Client struct represents the Fiber HTTP Client.",source:"@site/versioned_docs/version-v2.x/api/client.md",sourceDirName:"api",slug:"/api/client",permalink:"/api/client",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:5,frontMatter:{id:"client",title:"\ud83c\udf0e Client",description:"The Client struct represents the Fiber HTTP Client.",sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udccb Constants",permalink:"/api/constants"},next:{title:"\ud83e\uddec Middleware",permalink:"/category/-middleware"}},o={},g=[{value:"Start request",id:"start-request",level:2},{value:"\u2728 Agent",id:"-agent",level:2},{value:"Parse",id:"parse",level:3},{value:"Set",id:"set",level:3},{value:"Add",id:"add",level:3},{value:"ConnectionClose",id:"connectionclose",level:3},{value:"UserAgent",id:"useragent",level:3},{value:"Cookie",id:"cookie",level:3},{value:"Referer",id:"referer",level:3},{value:"ContentType",id:"contenttype",level:3},{value:"Host",id:"host",level:3},{value:"QueryString",id:"querystring",level:3},{value:"BasicAuth",id:"basicauth",level:3},{value:"Body",id:"body",level:3},{value:"JSON",id:"json",level:3},{value:"XML",id:"xml",level:3},{value:"Form",id:"form",level:3},{value:"MultipartForm",id:"multipartform",level:3},{value:"Boundary",id:"boundary",level:4},{value:"SendFile(s)",id:"sendfiles",level:4},{value:"FileData",id:"filedata",level:4},{value:"Debug",id:"debug",level:3},{value:"Timeout",id:"timeout",level:3},{value:"Reuse",id:"reuse",level:3},{value:"InsecureSkipVerify",id:"insecureskipverify",level:3},{value:"TLSConfig",id:"tlsconfig",level:3},{value:"MaxRedirectsCount",id:"maxredirectscount",level:3},{value:"JSONEncoder",id:"jsonencoder",level:3},{value:"JSONDecoder",id:"jsondecoder",level:3},{value:"Request",id:"request",level:3},{value:"SetResponse",id:"setresponse",level:3},{value:"Dest",id:"dest",level:3},{value:"Bytes",id:"bytes",level:3},{value:"String",id:"string",level:3},{value:"Struct",id:"struct",level:3},{value:"RetryIf",id:"retryif",level:3}],u={toc:g},p="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"start-request"},"Start request"),(0,r.kt)("p",null,"Start a http request with http method and url."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signatures"',title:'"Signatures"'},"// Client http methods\nfunc (c *Client) Get(url string) *Agent\nfunc (c *Client) Head(url string) *Agent\nfunc (c *Client) Post(url string) *Agent\nfunc (c *Client) Put(url string) *Agent\nfunc (c *Client) Patch(url string) *Agent\nfunc (c *Client) Delete(url string) *Agent\n")),(0,r.kt)("h2",{id:"-agent"},"\u2728 Agent"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"Agent")," is built on top of FastHTTP's ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/valyala/fasthttp/blob/master/client.go#L603"},(0,r.kt)("inlineCode",{parentName:"a"},"HostClient"))," which has lots of convenient helper methods such as dedicated methods for request methods."),(0,r.kt)("h3",{id:"parse"},"Parse"),(0,r.kt)("p",null,"Parse initializes a HostClient."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Parse"',title:'"Parse"'},'a := AcquireAgent()\nreq := a.Request()\nreq.Header.SetMethod(MethodGet)\nreq.SetRequestURI("http://example.com")\n\nif err := a.Parse(); err != nil {\n panic(err)\n}\n\ncode, body, errs := a.Bytes() // ...\n')),(0,r.kt)("h3",{id:"set"},"Set"),(0,r.kt)("p",null,"Set sets the given ",(0,r.kt)("inlineCode",{parentName:"p"},"key: value")," header."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Set(k, v string) *Agent\nfunc (a *Agent) SetBytesK(k []byte, v string) *Agent\nfunc (a *Agent) SetBytesV(k string, v []byte) *Agent\nfunc (a *Agent) SetBytesKV(k []byte, v []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Set("k1", "v1").\n SetBytesK([]byte("k1"), "v1").\n SetBytesV("k1", []byte("v1")).\n SetBytesKV([]byte("k2"), []byte("v2"))\n// ...\n')),(0,r.kt)("h3",{id:"add"},"Add"),(0,r.kt)("p",null,"Add adds the given ",(0,r.kt)("inlineCode",{parentName:"p"},"key: value")," header. Multiple headers with the same key may be added with this function."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Add(k, v string) *Agent\nfunc (a *Agent) AddBytesK(k []byte, v string) *Agent\nfunc (a *Agent) AddBytesV(k string, v []byte) *Agent\nfunc (a *Agent) AddBytesKV(k []byte, v []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Add("k1", "v1").\n AddBytesK([]byte("k1"), "v1").\n AddBytesV("k1", []byte("v1")).\n AddBytesKV([]byte("k2"), []byte("v2"))\n// Headers:\n// K1: v1\n// K1: v1\n// K1: v1\n// K2: v2\n')),(0,r.kt)("h3",{id:"connectionclose"},"ConnectionClose"),(0,r.kt)("p",null,"ConnectionClose adds the ",(0,r.kt)("inlineCode",{parentName:"p"},"Connection: close")," header."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) ConnectionClose() *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.ConnectionClose()\n// ...\n")),(0,r.kt)("h3",{id:"useragent"},"UserAgent"),(0,r.kt)("p",null,"UserAgent sets ",(0,r.kt)("inlineCode",{parentName:"p"},"User-Agent")," header value."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) UserAgent(userAgent string) *Agent\nfunc (a *Agent) UserAgentBytes(userAgent []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.UserAgent("fiber")\n// ...\n')),(0,r.kt)("h3",{id:"cookie"},"Cookie"),(0,r.kt)("p",null,"Cookie sets a cookie in ",(0,r.kt)("inlineCode",{parentName:"p"},"key: value")," form. ",(0,r.kt)("inlineCode",{parentName:"p"},"Cookies")," can be used to set multiple cookies."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Cookie(key, value string) *Agent\nfunc (a *Agent) CookieBytesK(key []byte, value string) *Agent\nfunc (a *Agent) CookieBytesKV(key, value []byte) *Agent\nfunc (a *Agent) Cookies(kv ...string) *Agent\nfunc (a *Agent) CookiesBytesKV(kv ...[]byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Cookie("k", "v")\nagent.Cookies("k1", "v1", "k2", "v2")\n// ...\n')),(0,r.kt)("h3",{id:"referer"},"Referer"),(0,r.kt)("p",null,"Referer sets the Referer header value."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Referer(referer string) *Agent\nfunc (a *Agent) RefererBytes(referer []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Referer("https://docs.gofiber.io")\n// ...\n')),(0,r.kt)("h3",{id:"contenttype"},"ContentType"),(0,r.kt)("p",null,"ContentType sets Content-Type header value."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) ContentType(contentType string) *Agent\nfunc (a *Agent) ContentTypeBytes(contentType []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.ContentType("custom-type")\n// ...\n')),(0,r.kt)("h3",{id:"host"},"Host"),(0,r.kt)("p",null,"Host sets the Host header."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Host(host string) *Agent\nfunc (a *Agent) HostBytes(host []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Host("example.com")\n// ...\n')),(0,r.kt)("h3",{id:"querystring"},"QueryString"),(0,r.kt)("p",null,"QueryString sets the URI query string."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) QueryString(queryString string) *Agent\nfunc (a *Agent) QueryStringBytes(queryString []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.QueryString("foo=bar")\n// ...\n')),(0,r.kt)("h3",{id:"basicauth"},"BasicAuth"),(0,r.kt)("p",null,"BasicAuth sets the URI username and password using HTTP Basic Auth."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) BasicAuth(username, password string) *Agent\nfunc (a *Agent) BasicAuthBytes(username, password []byte) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.BasicAuth("foo", "bar")\n// ...\n')),(0,r.kt)("h3",{id:"body"},"Body"),(0,r.kt)("p",null,"There are several ways to set request body."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) BodyString(bodyString string) *Agent\nfunc (a *Agent) Body(body []byte) *Agent\n\n// BodyStream sets request body stream and, optionally body size.\n//\n// If bodySize is >= 0, then the bodyStream must provide exactly bodySize bytes\n// before returning io.EOF.\n//\n// If bodySize < 0, then bodyStream is read until io.EOF.\n//\n// bodyStream.Close() is called after finishing reading all body data\n// if it implements io.Closer.\n//\n// Note that GET and HEAD requests cannot have body.\nfunc (a *Agent) BodyStream(bodyStream io.Reader, bodySize int) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.BodyString("foo=bar")\nagent.Body([]byte("bar=baz"))\nagent.BodyStream(strings.NewReader("body=stream"), -1)\n// ...\n')),(0,r.kt)("h3",{id:"json"},"JSON"),(0,r.kt)("p",null,"JSON sends a JSON request by setting the Content-Type header to ",(0,r.kt)("inlineCode",{parentName:"p"},"application/json"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) JSON(v interface{}) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.JSON(fiber.Map{"success": true})\n// ...\n')),(0,r.kt)("h3",{id:"xml"},"XML"),(0,r.kt)("p",null,"XML sends an XML request by setting the Content-Type header to ",(0,r.kt)("inlineCode",{parentName:"p"},"application/xml"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) XML(v interface{}) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.XML(fiber.Map{"success": true})\n// ...\n')),(0,r.kt)("h3",{id:"form"},"Form"),(0,r.kt)("p",null,"Form sends a form request by setting the Content-Type header to ",(0,r.kt)("inlineCode",{parentName:"p"},"application/x-www-form-urlencoded"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"// Form sends form request with body if args is non-nil.\n//\n// It is recommended obtaining args via AcquireArgs and release it\n// manually in performance-critical code.\nfunc (a *Agent) Form(args *Args) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'args := AcquireArgs()\nargs.Set("foo", "bar")\n\nagent.Form(args)\n// ...\nReleaseArgs(args)\n')),(0,r.kt)("h3",{id:"multipartform"},"MultipartForm"),(0,r.kt)("p",null,"MultipartForm sends multipart form request by setting the Content-Type header to ",(0,r.kt)("inlineCode",{parentName:"p"},"multipart/form-data"),". These requests can include key-value's and files."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"// MultipartForm sends multipart form request with k-v and files.\n//\n// It is recommended to obtain args via AcquireArgs and release it\n// manually in performance-critical code.\nfunc (a *Agent) MultipartForm(args *Args) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'args := AcquireArgs()\nargs.Set("foo", "bar")\n\nagent.MultipartForm(args)\n// ...\nReleaseArgs(args)\n')),(0,r.kt)("p",null,"Fiber provides several methods for sending files. Note that they must be called before ",(0,r.kt)("inlineCode",{parentName:"p"},"MultipartForm"),"."),(0,r.kt)("h4",{id:"boundary"},"Boundary"),(0,r.kt)("p",null,"Boundary sets boundary for multipart form request."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Boundary(boundary string) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Boundary("myBoundary")\n .MultipartForm(nil)\n// ...\n')),(0,r.kt)("h4",{id:"sendfiles"},"SendFile","(","s",")"),(0,r.kt)("p",null,"SendFile read a file and appends it to a multipart form request. Sendfiles can be used to append multiple files."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) SendFile(filename string, fieldname ...string) *Agent\nfunc (a *Agent) SendFiles(filenamesAndFieldnames ...string) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.SendFile("f", "field name")\n .SendFiles("f1", "field name1", "f2").\n .MultipartForm(nil)\n// ...\n')),(0,r.kt)("h4",{id:"filedata"},"FileData"),(0,r.kt)("p",null,"FileData appends file data for multipart form request."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"// FormFile represents multipart form file\ntype FormFile struct {\n // Fieldname is form file's field name\n Fieldname string\n // Name is form file's name\n Name string\n // Content is form file's content\n Content []byte\n}\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"// FileData appends files for multipart form request.\n//\n// It is recommended obtaining formFile via AcquireFormFile and release it\n// manually in performance-critical code.\nfunc (a *Agent) FileData(formFiles ...*FormFile) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'ff1 := &FormFile{"filename1", "field name1", []byte("content")}\nff2 := &FormFile{"filename2", "field name2", []byte("content")}\nagent.FileData(ff1, ff2).\n MultipartForm(nil)\n// ...\n')),(0,r.kt)("h3",{id:"debug"},"Debug"),(0,r.kt)("p",null,"Debug mode enables logging request and response detail to ",(0,r.kt)("inlineCode",{parentName:"p"},"io.writer"),"(","default is ",(0,r.kt)("inlineCode",{parentName:"p"},"os.Stdout"),")","."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Debug(w ...io.Writer) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.Debug()\n// ...\n")),(0,r.kt)("h3",{id:"timeout"},"Timeout"),(0,r.kt)("p",null,"Timeout sets request timeout duration."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Timeout(timeout time.Duration) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.Timeout(time.Second)\n// ...\n")),(0,r.kt)("h3",{id:"reuse"},"Reuse"),(0,r.kt)("p",null,"Reuse enables the Agent instance to be used again after one request. If agent is reusable, then it should be released manually when it is no longer used."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Reuse() *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.Reuse()\n// ...\n")),(0,r.kt)("h3",{id:"insecureskipverify"},"InsecureSkipVerify"),(0,r.kt)("p",null,"InsecureSkipVerify controls whether the Agent verifies the server certificate chain and host name."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) InsecureSkipVerify() *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.InsecureSkipVerify()\n// ...\n")),(0,r.kt)("h3",{id:"tlsconfig"},"TLSConfig"),(0,r.kt)("p",null,"TLSConfig sets tls config."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) TLSConfig(config *tls.Config) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Create tls certificate\ncer, _ := tls.LoadX509KeyPair("pem", "key")\n\nconfig := &tls.Config{\n Certificates: []tls.Certificate{cer},\n}\n\nagent.TLSConfig(config)\n// ...\n')),(0,r.kt)("h3",{id:"maxredirectscount"},"MaxRedirectsCount"),(0,r.kt)("p",null,"MaxRedirectsCount sets max redirect count for GET and HEAD."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) MaxRedirectsCount(count int) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.MaxRedirectsCount(7)\n// ...\n")),(0,r.kt)("h3",{id:"jsonencoder"},"JSONEncoder"),(0,r.kt)("p",null,"JSONEncoder sets custom json encoder."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) JSONEncoder(jsonEncoder utils.JSONMarshal) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.JSONEncoder(json.Marshal)\n// ...\n")),(0,r.kt)("h3",{id:"jsondecoder"},"JSONDecoder"),(0,r.kt)("p",null,"JSONDecoder sets custom json decoder."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) JSONDecoder(jsonDecoder utils.JSONUnmarshal) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.JSONDecoder(json.Unmarshal)\n// ...\n")),(0,r.kt)("h3",{id:"request"},"Request"),(0,r.kt)("p",null,"Request returns Agent request instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Request() *Request\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"req := agent.Request()\n// ...\n")),(0,r.kt)("h3",{id:"setresponse"},"SetResponse"),(0,r.kt)("p",null,"SetResponse sets custom response for the Agent instance. It is recommended obtaining custom response via AcquireResponse and release it manually in performance-critical code."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) SetResponse(customResp *Response) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"resp := AcquireResponse()\nagent.SetResponse(resp)\n// ...\nReleaseResponse(resp)\n")),(0,r.kt)("h3",{id:"dest"},"Dest"),(0,r.kt)("p",null,"Dest sets custom dest. The contents of dest will be replaced by the response body, if the dest is too small a new slice will be allocated."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Dest(dest []byte) *Agent {\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"agent.Dest(nil)\n// ...\n")),(0,r.kt)("h3",{id:"bytes"},"Bytes"),(0,r.kt)("p",null,"Bytes returns the status code, bytes body and errors of url."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Bytes() (code int, body []byte, errs []error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"code, body, errs := agent.Bytes()\n// ...\n")),(0,r.kt)("h3",{id:"string"},"String"),(0,r.kt)("p",null,"String returns the status code, string body and errors of url."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) String() (int, string, []error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"code, body, errs := agent.String()\n// ...\n")),(0,r.kt)("h3",{id:"struct"},"Struct"),(0,r.kt)("p",null,"Struct returns the status code, bytes body and errors of url. And bytes body will be unmarshalled to given v."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) Struct(v interface{}) (code int, body []byte, errs []error)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"var d data\ncode, body, errs := agent.Struct(&d)\n// ...\n")),(0,r.kt)("h3",{id:"retryif"},"RetryIf"),(0,r.kt)("p",null,"RetryIf controls whether a retry should be attempted after an error.\nBy default, will use isIdempotent function from fasthttp"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'agent.Get("https://example.com").RetryIf(func (req *fiber.Request) bool {\n return req.URI() == "https://example.com"\n})\n// ...\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/697acd1f.4a8ccf2e.js b/assets/js/697acd1f.4a8ccf2e.js new file mode 100644 index 00000000000..c5daa693b75 --- /dev/null +++ b/assets/js/697acd1f.4a8ccf2e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7897],{47016:e=>{e.exports=JSON.parse('{"pluginId":"template","version":"current","label":"Next","banner":"unreleased","badge":true,"noIndex":false,"className":"docs-version-current","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/template/next/","docId":"README"},{"type":"link","label":"Ace","href":"/template/next/ace/","docId":"ace/ace"},{"type":"link","label":"Amber","href":"/template/next/amber/","docId":"amber/amber"},{"type":"link","label":"Django","href":"/template/next/django/","docId":"django/django"},{"type":"link","label":"Handlebars","href":"/template/next/handlebars/","docId":"handlebars/handlebars"},{"type":"category","label":"HTML","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Golang Templates Cheatsheet","href":"/template/next/html/TEMPLATES_CHEATSHEET","docId":"html/TEMPLATES_CHEATSHEET"}],"href":"/template/next/html/"},{"type":"link","label":"Jet","href":"/template/next/jet/","docId":"jet/jet"},{"type":"link","label":"Mustache","href":"/template/next/mustache/","docId":"mustache/mustache"},{"type":"link","label":"Pug","href":"/template/next/pug/","docId":"pug/pug"},{"type":"link","label":"Slim","href":"/template/next/slim/","docId":"slim/slim"}]},"docs":{"ace/ace":{"id":"ace/ace","title":"Ace","description":"Release","sidebar":"tutorialSidebar"},"amber/amber":{"id":"amber/amber","title":"Amber","description":"Release","sidebar":"tutorialSidebar"},"django/django":{"id":"django/django","title":"Django","description":"Release","sidebar":"tutorialSidebar"},"handlebars/handlebars":{"id":"handlebars/handlebars","title":"Handlebars","description":"Release","sidebar":"tutorialSidebar"},"html/html":{"id":"html/html","title":"HTML","description":"Release","sidebar":"tutorialSidebar"},"html/TEMPLATES_CHEATSHEET":{"id":"html/TEMPLATES_CHEATSHEET","title":"Golang Templates Cheatsheet","description":"The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.","sidebar":"tutorialSidebar"},"jet/jet":{"id":"jet/jet","title":"Jet","description":"Release","sidebar":"tutorialSidebar"},"mustache/mustache":{"id":"mustache/mustache","title":"Mustache","description":"Release","sidebar":"tutorialSidebar"},"pug/pug":{"id":"pug/pug","title":"Pug","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"\ud83e\uddec Template engine middlewares for Fiber.","sidebar":"tutorialSidebar"},"slim/slim":{"id":"slim/slim","title":"Slim","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/697acd1f.71709ac7.js b/assets/js/697acd1f.71709ac7.js deleted file mode 100644 index be4560b99c8..00000000000 --- a/assets/js/697acd1f.71709ac7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7897],{7016:e=>{e.exports=JSON.parse('{"pluginId":"template","version":"current","label":"Next","banner":"unreleased","badge":true,"noIndex":false,"className":"docs-version-current","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/template/next/","docId":"README"},{"type":"link","label":"Ace","href":"/template/next/ace/","docId":"ace/ace"},{"type":"link","label":"Amber","href":"/template/next/amber/","docId":"amber/amber"},{"type":"link","label":"Django","href":"/template/next/django/","docId":"django/django"},{"type":"link","label":"Handlebars","href":"/template/next/handlebars/","docId":"handlebars/handlebars"},{"type":"category","label":"HTML","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Golang Templates Cheatsheet","href":"/template/next/html/TEMPLATES_CHEATSHEET","docId":"html/TEMPLATES_CHEATSHEET"}],"href":"/template/next/html/"},{"type":"link","label":"Jet","href":"/template/next/jet/","docId":"jet/jet"},{"type":"link","label":"Mustache","href":"/template/next/mustache/","docId":"mustache/mustache"},{"type":"link","label":"Pug","href":"/template/next/pug/","docId":"pug/pug"},{"type":"link","label":"Slim","href":"/template/next/slim/","docId":"slim/slim"}]},"docs":{"ace/ace":{"id":"ace/ace","title":"Ace","description":"Release","sidebar":"tutorialSidebar"},"amber/amber":{"id":"amber/amber","title":"Amber","description":"Release","sidebar":"tutorialSidebar"},"django/django":{"id":"django/django","title":"Django","description":"Release","sidebar":"tutorialSidebar"},"handlebars/handlebars":{"id":"handlebars/handlebars","title":"Handlebars","description":"Release","sidebar":"tutorialSidebar"},"html/html":{"id":"html/html","title":"HTML","description":"Release","sidebar":"tutorialSidebar"},"html/TEMPLATES_CHEATSHEET":{"id":"html/TEMPLATES_CHEATSHEET","title":"Golang Templates Cheatsheet","description":"The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.","sidebar":"tutorialSidebar"},"jet/jet":{"id":"jet/jet","title":"Jet","description":"Release","sidebar":"tutorialSidebar"},"mustache/mustache":{"id":"mustache/mustache","title":"Mustache","description":"Release","sidebar":"tutorialSidebar"},"pug/pug":{"id":"pug/pug","title":"Pug","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"\ud83e\uddec Template engine middlewares for Fiber.","sidebar":"tutorialSidebar"},"slim/slim":{"id":"slim/slim","title":"Slim","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/6a673416.7bb6ef88.js b/assets/js/6a673416.7bb6ef88.js deleted file mode 100644 index d7a46bf2086..00000000000 --- a/assets/js/6a673416.7bb6ef88.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4046],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>g});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=c(n),m=o,g=u["".concat(l,".").concat(m)]||u[m]||p[m]||r;return n?a.createElement(g,i(i({ref:t},d),{},{components:n})):a.createElement(g,i({ref:t},d))}));function g(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:o,i[1]=s;for(var c=2;c<r;c++)i[c]=n[c];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},7027:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var a=n(7462),o=(n(7294),n(3905));const r={id:"dynamodb",title:"DynamoDB"},i=void 0,s={unversionedId:"dynamodb/dynamodb",id:"version-mysql_v1.x.x/dynamodb/dynamodb",title:"DynamoDB",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/dynamodb/README.md",sourceDirName:"dynamodb",slug:"/dynamodb/",permalink:"/storage/mysql_v1.x.x/dynamodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/dynamodb/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"dynamodb",title:"DynamoDB"},sidebar:"tutorialSidebar",previous:{title:"Couchbase",permalink:"/storage/mysql_v1.x.x/couchbase/"},next:{title:"Etcd",permalink:"/storage/mysql_v1.x.x/etcd/"}},l={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],d={toc:c},u="wrapper";function p(e){let{components:t,...n}=e;return(0,o.kt)(u,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=dynamodb*",alt:"Release"}),"\n",(0,o.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?label=Tests",alt:"Test"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,o.kt)("p",null,"A DynamoDB storage driver using ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,o.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,o.kt)("p",null,"...."),(0,o.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,o.kt)("h3",{id:"signatures"},"Signatures"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"func New(config Config) Storage\n\n\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *awsdynamodb.Client\n")),(0,o.kt)("h3",{id:"installation"},"Installation"),(0,o.kt)("p",null,"DynamoDB is tested on the 2 last ",(0,o.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,o.kt)("p",null,"And then install the dynamodb implementation:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/dynamodb\n")),(0,o.kt)("h3",{id:"examples"},"Examples"),(0,o.kt)("p",null,"Import the storage package."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/dynamodb"\n')),(0,o.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize dynamodb\nstore := dynamodb.New(dynamodb.Config{\n \n})\n")),(0,o.kt)("h3",{id:"config"},"Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Region of the DynamoDB service you want to use.\n // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.\n // E.g. "us-west-2".\n // Optional (read from shared config file or environment variable if not set).\n // Environment variable: "AWS_REGION".\n Region string\n\n // Name of the DynamoDB table.\n // Optional ("fiber_storage" by default).\n Table string\n\n // CustomEndpoint allows you to set a custom DynamoDB service endpoint.\n // This is especially useful if you\'re running a "DynamoDB local" Docker container for local testing.\n // Typical value for the Docker container: "http://localhost:8000".\n // See https://hub.docker.com/r/amazon/dynamodb-local/.\n // Optional ("" by default)\n Endpoint string\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // ReadCapacityUnits of the table.\n // Only required when the table doesn\'t exist yet and is created by gokv.\n // Optional (5 by default, which is the same default value as when creating a table in the web console)\n // 25 RCUs are included in the free tier (across all tables).\n // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.\n // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.\n ReadCapacityUnits int64\n\n // ReadCapacityUnits of the table.\n // Only required when the table doesn\'t exist yet and is created by gokv.\n // Optional (5 by default, which is the same default value as when creating a table in the web console)\n // 25 RCUs are included in the free tier (across all tables).\n // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.\n // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.\n WriteCapacityUnits int64\n\n // If the table doesn\'t exist yet, gokv creates it.\n // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.\n // If the table still doesn\'t exist after 15 seconds, an error is returned.\n // If WaitForTableCreation is false, gokv returns the client immediately.\n // In the latter case you need to make sure that you don\'t read from or write to the table before it\'s created,\n // because otherwise you will get ResourceNotFoundException errors.\n // Optional (true by default).\n WaitForTableCreation *bool\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n\n')),(0,o.kt)("h3",{id:"default-config"},"Default Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Table: "fiber_storage",\n Credentials: Credentials{},\n MaxAttempts: 3,\n Reset: false,\n ReadCapacityUnits: 5,\n WriteCapacityUnits: 5,\n WaitForTableCreation: aws.Bool(true),\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6a673416.fd450d05.js b/assets/js/6a673416.fd450d05.js new file mode 100644 index 00000000000..7755849bf66 --- /dev/null +++ b/assets/js/6a673416.fd450d05.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4046],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>g});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=c(n),m=o,g=u["".concat(l,".").concat(m)]||u[m]||p[m]||r;return n?a.createElement(g,i(i({ref:t},d),{},{components:n})):a.createElement(g,i({ref:t},d))}));function g(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:o,i[1]=s;for(var c=2;c<r;c++)i[c]=n[c];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},27027:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var a=n(87462),o=(n(67294),n(3905));const r={id:"dynamodb",title:"DynamoDB"},i=void 0,s={unversionedId:"dynamodb/dynamodb",id:"version-mysql_v1.x.x/dynamodb/dynamodb",title:"DynamoDB",description:"Release",source:"@site/storage_versioned_docs/version-mysql_v1.x.x/dynamodb/README.md",sourceDirName:"dynamodb",slug:"/dynamodb/",permalink:"/storage/mysql_v1.x.x/dynamodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/dynamodb/README.md",tags:[],version:"mysql_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"dynamodb",title:"DynamoDB"},sidebar:"tutorialSidebar",previous:{title:"Couchbase",permalink:"/storage/mysql_v1.x.x/couchbase/"},next:{title:"Etcd",permalink:"/storage/mysql_v1.x.x/etcd/"}},l={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],d={toc:c},u="wrapper";function p(e){let{components:t,...n}=e;return(0,o.kt)(u,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=dynamodb*",alt:"Release"}),"\n",(0,o.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-dynamodb.yml?label=Tests",alt:"Test"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,o.kt)("p",null,"A DynamoDB storage driver using ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/aws/aws-sdk-go-v2"},"aws/aws-sdk-go-v2"),"."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Note:")," If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: ",(0,o.kt)("a",{parentName:"p",href:"https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials"},"specifying credentials")),(0,o.kt)("p",null,"...."),(0,o.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,o.kt)("h3",{id:"signatures"},"Signatures"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"func New(config Config) Storage\n\n\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *awsdynamodb.Client\n")),(0,o.kt)("h3",{id:"installation"},"Installation"),(0,o.kt)("p",null,"DynamoDB is tested on the 2 last ",(0,o.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,o.kt)("p",null,"And then install the dynamodb implementation:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/dynamodb\n")),(0,o.kt)("h3",{id:"examples"},"Examples"),(0,o.kt)("p",null,"Import the storage package."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/dynamodb"\n')),(0,o.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize dynamodb\nstore := dynamodb.New(dynamodb.Config{\n \n})\n")),(0,o.kt)("h3",{id:"config"},"Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Region of the DynamoDB service you want to use.\n // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.\n // E.g. "us-west-2".\n // Optional (read from shared config file or environment variable if not set).\n // Environment variable: "AWS_REGION".\n Region string\n\n // Name of the DynamoDB table.\n // Optional ("fiber_storage" by default).\n Table string\n\n // CustomEndpoint allows you to set a custom DynamoDB service endpoint.\n // This is especially useful if you\'re running a "DynamoDB local" Docker container for local testing.\n // Typical value for the Docker container: "http://localhost:8000".\n // See https://hub.docker.com/r/amazon/dynamodb-local/.\n // Optional ("" by default)\n Endpoint string\n\n // Credentials overrides AWS access key and AWS secret access key. Not recommended.\n //\n // Optional. Default is Credentials{}\n Credentials Credentials\n\n // The maximum number of times requests that encounter retryable failures should be attempted.\n //\n // Optional. Default is 3\n MaxAttempts int\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n\n // ReadCapacityUnits of the table.\n // Only required when the table doesn\'t exist yet and is created by gokv.\n // Optional (5 by default, which is the same default value as when creating a table in the web console)\n // 25 RCUs are included in the free tier (across all tables).\n // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.\n // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.\n ReadCapacityUnits int64\n\n // ReadCapacityUnits of the table.\n // Only required when the table doesn\'t exist yet and is created by gokv.\n // Optional (5 by default, which is the same default value as when creating a table in the web console)\n // 25 RCUs are included in the free tier (across all tables).\n // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.\n // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.\n WriteCapacityUnits int64\n\n // If the table doesn\'t exist yet, gokv creates it.\n // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.\n // If the table still doesn\'t exist after 15 seconds, an error is returned.\n // If WaitForTableCreation is false, gokv returns the client immediately.\n // In the latter case you need to make sure that you don\'t read from or write to the table before it\'s created,\n // because otherwise you will get ResourceNotFoundException errors.\n // Optional (true by default).\n WaitForTableCreation *bool\n}\n\ntype Credentials struct {\n AccessKey string\n SecretAccessKey string\n}\n\n')),(0,o.kt)("h3",{id:"default-config"},"Default Config"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Table: "fiber_storage",\n Credentials: Credentials{},\n MaxAttempts: 3,\n Reset: false,\n ReadCapacityUnits: 5,\n WriteCapacityUnits: 5,\n WaitForTableCreation: aws.Bool(true),\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6a9ae4f0.3dd85153.js b/assets/js/6a9ae4f0.3dd85153.js deleted file mode 100644 index 04afd0a037e..00000000000 --- a/assets/js/6a9ae4f0.3dd85153.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3377],{6776:e=>{e.exports=JSON.parse('{"pluginId":"storage","version":"current","label":"Next","banner":"unreleased","badge":true,"noIndex":false,"className":"docs-version-current","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/storage/next/","docId":"README"},{"type":"link","label":"ArangoDB","href":"/storage/next/arangodb/","docId":"arangodb/arangodb"},{"type":"link","label":"Azure Blob","href":"/storage/next/azureblob/","docId":"azureblob/azureblob"},{"type":"link","label":"Badger","href":"/storage/next/badger/","docId":"badger/badger"},{"type":"link","label":"Bbolt","href":"/storage/next/bbolt/","docId":"bbolt/bbolt"},{"type":"link","label":"Couchbase","href":"/storage/next/couchbase/","docId":"couchbase/couchbase"},{"type":"link","label":"DynamoDB","href":"/storage/next/dynamodb/","docId":"dynamodb/dynamodb"},{"type":"link","label":"Etcd","href":"/storage/next/etcd/","docId":"etcd/etcd"},{"type":"link","label":"Memcache","href":"/storage/next/memcache/","docId":"memcache/memcache"},{"type":"link","label":"Memory","href":"/storage/next/memory/","docId":"memory/memory"},{"type":"link","label":"MongoDB","href":"/storage/next/mongodb/","docId":"mongodb/mongodb"},{"type":"link","label":"MSSQL","href":"/storage/next/mssql/","docId":"mssql/mssql"},{"type":"link","label":"MySQL","href":"/storage/next/mysql/","docId":"mysql/mysql"},{"type":"link","label":"Pebble","href":"/storage/next/pebble/","docId":"pebble/pebble"},{"type":"link","label":"Postgres","href":"/storage/next/postgres/","docId":"postgres/postgres"},{"type":"link","label":"Redis","href":"/storage/next/redis/","docId":"redis/redis"},{"type":"link","label":"Ristretto","href":"/storage/next/ristretto/","docId":"ristretto/ristretto"},{"type":"link","label":"S3","href":"/storage/next/s3/","docId":"s3/s3"},{"type":"link","label":"SQLite3","href":"/storage/next/sqlite3/","docId":"sqlite3/sqlite3"}]},"docs":{"arangodb/arangodb":{"id":"arangodb/arangodb","title":"ArangoDB","description":"Release","sidebar":"tutorialSidebar"},"azureblob/azureblob":{"id":"azureblob/azureblob","title":"Azure Blob","description":"Release","sidebar":"tutorialSidebar"},"badger/badger":{"id":"badger/badger","title":"Badger","description":"Release","sidebar":"tutorialSidebar"},"bbolt/bbolt":{"id":"bbolt/bbolt","title":"Bbolt","description":"Release","sidebar":"tutorialSidebar"},"couchbase/couchbase":{"id":"couchbase/couchbase","title":"Couchbase","description":"Release","sidebar":"tutorialSidebar"},"dynamodb/dynamodb":{"id":"dynamodb/dynamodb","title":"DynamoDB","description":"Release","sidebar":"tutorialSidebar"},"etcd/etcd":{"id":"etcd/etcd","title":"Etcd","description":"Release","sidebar":"tutorialSidebar"},"memcache/memcache":{"id":"memcache/memcache","title":"Memcache","description":"Release","sidebar":"tutorialSidebar"},"memory/memory":{"id":"memory/memory","title":"Memory","description":"Release","sidebar":"tutorialSidebar"},"mongodb/mongodb":{"id":"mongodb/mongodb","title":"MongoDB","description":"Release","sidebar":"tutorialSidebar"},"mssql/mssql":{"id":"mssql/mssql","title":"MSSQL","description":"Release","sidebar":"tutorialSidebar"},"mysql/mysql":{"id":"mysql/mysql","title":"MySQL","description":"Release","sidebar":"tutorialSidebar"},"pebble/pebble":{"id":"pebble/pebble","title":"Pebble","description":"Release","sidebar":"tutorialSidebar"},"postgres/postgres":{"id":"postgres/postgres","title":"Postgres","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.","sidebar":"tutorialSidebar"},"redis/redis":{"id":"redis/redis","title":"Redis","description":"Release","sidebar":"tutorialSidebar"},"ristretto/ristretto":{"id":"ristretto/ristretto","title":"Ristretto","description":"Release","sidebar":"tutorialSidebar"},"s3/s3":{"id":"s3/s3","title":"S3","description":"Release","sidebar":"tutorialSidebar"},"sqlite3/sqlite3":{"id":"sqlite3/sqlite3","title":"SQLite3","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/6a9ae4f0.c09a91fe.js b/assets/js/6a9ae4f0.c09a91fe.js new file mode 100644 index 00000000000..3f3a045eae6 --- /dev/null +++ b/assets/js/6a9ae4f0.c09a91fe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3377],{96776:e=>{e.exports=JSON.parse('{"pluginId":"storage","version":"current","label":"Next","banner":"unreleased","badge":true,"noIndex":false,"className":"docs-version-current","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/storage/next/","docId":"README"},{"type":"link","label":"ArangoDB","href":"/storage/next/arangodb/","docId":"arangodb/arangodb"},{"type":"link","label":"Azure Blob","href":"/storage/next/azureblob/","docId":"azureblob/azureblob"},{"type":"link","label":"Badger","href":"/storage/next/badger/","docId":"badger/badger"},{"type":"link","label":"Bbolt","href":"/storage/next/bbolt/","docId":"bbolt/bbolt"},{"type":"link","label":"Couchbase","href":"/storage/next/couchbase/","docId":"couchbase/couchbase"},{"type":"link","label":"DynamoDB","href":"/storage/next/dynamodb/","docId":"dynamodb/dynamodb"},{"type":"link","label":"Etcd","href":"/storage/next/etcd/","docId":"etcd/etcd"},{"type":"link","label":"Memcache","href":"/storage/next/memcache/","docId":"memcache/memcache"},{"type":"link","label":"Memory","href":"/storage/next/memory/","docId":"memory/memory"},{"type":"link","label":"MongoDB","href":"/storage/next/mongodb/","docId":"mongodb/mongodb"},{"type":"link","label":"MSSQL","href":"/storage/next/mssql/","docId":"mssql/mssql"},{"type":"link","label":"MySQL","href":"/storage/next/mysql/","docId":"mysql/mysql"},{"type":"link","label":"Pebble","href":"/storage/next/pebble/","docId":"pebble/pebble"},{"type":"link","label":"Postgres","href":"/storage/next/postgres/","docId":"postgres/postgres"},{"type":"link","label":"Redis","href":"/storage/next/redis/","docId":"redis/redis"},{"type":"link","label":"Ristretto","href":"/storage/next/ristretto/","docId":"ristretto/ristretto"},{"type":"link","label":"S3","href":"/storage/next/s3/","docId":"s3/s3"},{"type":"link","label":"SQLite3","href":"/storage/next/sqlite3/","docId":"sqlite3/sqlite3"}]},"docs":{"arangodb/arangodb":{"id":"arangodb/arangodb","title":"ArangoDB","description":"Release","sidebar":"tutorialSidebar"},"azureblob/azureblob":{"id":"azureblob/azureblob","title":"Azure Blob","description":"Release","sidebar":"tutorialSidebar"},"badger/badger":{"id":"badger/badger","title":"Badger","description":"Release","sidebar":"tutorialSidebar"},"bbolt/bbolt":{"id":"bbolt/bbolt","title":"Bbolt","description":"Release","sidebar":"tutorialSidebar"},"couchbase/couchbase":{"id":"couchbase/couchbase","title":"Couchbase","description":"Release","sidebar":"tutorialSidebar"},"dynamodb/dynamodb":{"id":"dynamodb/dynamodb","title":"DynamoDB","description":"Release","sidebar":"tutorialSidebar"},"etcd/etcd":{"id":"etcd/etcd","title":"Etcd","description":"Release","sidebar":"tutorialSidebar"},"memcache/memcache":{"id":"memcache/memcache","title":"Memcache","description":"Release","sidebar":"tutorialSidebar"},"memory/memory":{"id":"memory/memory","title":"Memory","description":"Release","sidebar":"tutorialSidebar"},"mongodb/mongodb":{"id":"mongodb/mongodb","title":"MongoDB","description":"Release","sidebar":"tutorialSidebar"},"mssql/mssql":{"id":"mssql/mssql","title":"MSSQL","description":"Release","sidebar":"tutorialSidebar"},"mysql/mysql":{"id":"mysql/mysql","title":"MySQL","description":"Release","sidebar":"tutorialSidebar"},"pebble/pebble":{"id":"pebble/pebble","title":"Pebble","description":"Release","sidebar":"tutorialSidebar"},"postgres/postgres":{"id":"postgres/postgres","title":"Postgres","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"\ud83d\udce6 Premade storage drivers for \ud83d\ude80 Fiber.","sidebar":"tutorialSidebar"},"redis/redis":{"id":"redis/redis","title":"Redis","description":"Release","sidebar":"tutorialSidebar"},"ristretto/ristretto":{"id":"ristretto/ristretto","title":"Ristretto","description":"Release","sidebar":"tutorialSidebar"},"s3/s3":{"id":"s3/s3","title":"S3","description":"Release","sidebar":"tutorialSidebar"},"sqlite3/sqlite3":{"id":"sqlite3/sqlite3","title":"SQLite3","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/6b69f1ff.1af63960.js b/assets/js/6b69f1ff.1af63960.js new file mode 100644 index 00000000000..a9a418a9c57 --- /dev/null +++ b/assets/js/6b69f1ff.1af63960.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9673],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),g=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=g(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=g(n),c=a,m=p["".concat(s,".").concat(c)]||p[c]||d[c]||o;return n?r.createElement(m,i(i({ref:t},u),{},{components:n})):r.createElement(m,i({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=c;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var g=2;g<o;g++)i[g]=n[g];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}c.displayName="MDXCreateElement"},2101:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var r=n(87462),a=(n(67294),n(3905));const o={id:"logger",title:"Logger"},i=void 0,l={unversionedId:"api/middleware/logger",id:"version-v2.x/api/middleware/logger",title:"Logger",description:"Logger middleware for Fiber that logs HTTP request/response details.",source:"@site/versioned_docs/version-v2.x/api/middleware/logger.md",sourceDirName:"api/middleware",slug:"/api/middleware/logger",permalink:"/api/middleware/logger",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"logger",title:"Logger"},sidebar:"tutorialSidebar",previous:{title:"Limiter",permalink:"/api/middleware/limiter"},next:{title:"Monitor",permalink:"/api/middleware/monitor"}},s={},g=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2},{value:"Constants",id:"constants",level:2}],u={toc:g},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Logger middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that logs HTTP request/response details."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/logger"\n)\n')),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"The order of registration plays a role. Only all routes that are registered after this one will be logged.\nThe middleware should therefore be one of the first to be registered.")),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(logger.New())\n\n// Or extend your config for customization\n// Logging remote IP and Port\napp.Use(logger.New(logger.Config{\n Format: "[${ip}]:${port} ${status} - ${method} ${path}\\n",\n}))\n\n// Logging Request ID\napp.Use(requestid.New())\napp.Use(logger.New(logger.Config{\n // For more options, see the Config section\n Format: "${pid} ${locals:requestid} ${status} - ${method} ${path}\u200b\\n",\n}))\n\n// Changing TimeZone & TimeFormat\napp.Use(logger.New(logger.Config{\n Format: "${pid} ${status} - ${method} ${path}\\n",\n TimeFormat: "02-Jan-2006",\n TimeZone: "America/New_York",\n}))\n\n// Custom File Writer\nfile, err := os.OpenFile("./123.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)\nif err != nil {\n log.Fatalf("error opening file: %v", err)\n}\ndefer file.Close()\napp.Use(logger.New(logger.Config{\n Output: file,\n}))\n\n// Add Custom Tags\napp.Use(logger.New(logger.Config{\n CustomTags: map[string]logger.LogFunc{\n "custom_tag": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) {\n return output.WriteString("it is a custom tag")\n },\n },\n}))\n\n// Callback after log is written\napp.Use(logger.New(logger.Config{\n TimeFormat: time.RFC3339Nano,\n TimeZone: "Asia/Shanghai",\n Done: func(c *fiber.Ctx, logString []byte) {\n if c.Response().StatusCode() != fiber.StatusOK {\n reporter.SendToSlack(logString) \n }\n },\n}))\n\n// Disable colors when outputting to default format\napp.Use(logger.New(logger.Config{\n DisableColors: true,\n}))\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n \n // Done is a function that is called after the log string for a request is written to Output,\n // and pass the log string as parameter.\n //\n // Optional. Default: nil\n Done func(c *fiber.Ctx, logString []byte)\n \n // tagFunctions defines the custom tag action\n //\n // Optional. Default: map[string]LogFunc\n CustomTags map[string]LogFunc\n \n // Format defines the logging tags\n //\n // Optional. Default: [${time}] ${status} - ${latency} ${method} ${path}\\n\n Format string\n \n // TimeFormat https://programming.guide/go/format-parse-string-time-date-example.html\n //\n // Optional. Default: 15:04:05\n TimeFormat string\n \n // TimeZone can be specified, such as "UTC" and "America/New_York" and "Asia/Chongqing", etc\n //\n // Optional. Default: "Local"\n TimeZone string\n \n // TimeInterval is the delay before the timestamp is updated\n //\n // Optional. Default: 500 * time.Millisecond\n TimeInterval time.Duration\n \n // Output is a writer where logs are written\n //\n // Default: os.Stdout\n Output io.Writer\n \n // DisableColors defines if the logs output should be colorized\n //\n // Default: false\n DisableColors bool\n \n enableColors bool\n enableLatency bool\n timeZoneLocation *time.Location\n}\ntype LogFunc func(buf logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error)\n')),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n Done: nil,\n Format: "[${time}] ${status} - ${latency} ${method} ${path}\\n",\n TimeFormat: "15:04:05",\n TimeZone: "Local",\n TimeInterval: 500 * time.Millisecond,\n Output: os.Stdout,\n DisableColors: true,\n}\n')),(0,a.kt)("h2",{id:"constants"},"Constants"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Logger variables\nconst (\n TagPid = "pid"\n TagTime = "time"\n TagReferer = "referer"\n TagProtocol = "protocol"\n TagPort = "port"\n TagIP = "ip"\n TagIPs = "ips"\n TagHost = "host"\n TagMethod = "method"\n TagPath = "path"\n TagURL = "url"\n TagUA = "ua"\n TagLatency = "latency"\n TagStatus = "status" // response status\n TagResBody = "resBody" // response body\n TagReqHeaders = "reqHeaders"\n TagQueryStringParams = "queryParams" // request query parameters\n TagBody = "body" // request body\n TagBytesSent = "bytesSent"\n TagBytesReceived = "bytesReceived"\n TagRoute = "route"\n TagError = "error"\n // DEPRECATED: Use TagReqHeader instead\n TagHeader = "header:" // request header\n TagReqHeader = "reqHeader:" // request header\n TagRespHeader = "respHeader:" // response header\n TagQuery = "query:" // request query\n TagForm = "form:" // request form\n TagCookie = "cookie:" // request cookie\n TagLocals = "locals:"\n // colors\n TagBlack = "black"\n TagRed = "red"\n TagGreen = "green"\n TagYellow = "yellow"\n TagBlue = "blue"\n TagMagenta = "magenta"\n TagCyan = "cyan"\n TagWhite = "white"\n TagReset = "reset"\n)\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6b69f1ff.f2194375.js b/assets/js/6b69f1ff.f2194375.js deleted file mode 100644 index 170a067fd2e..00000000000 --- a/assets/js/6b69f1ff.f2194375.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9673],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),g=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=g(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=g(n),c=a,m=p["".concat(s,".").concat(c)]||p[c]||d[c]||o;return n?r.createElement(m,i(i({ref:t},u),{},{components:n})):r.createElement(m,i({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=c;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var g=2;g<o;g++)i[g]=n[g];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}c.displayName="MDXCreateElement"},2101:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var r=n(7462),a=(n(7294),n(3905));const o={id:"logger",title:"Logger"},i=void 0,l={unversionedId:"api/middleware/logger",id:"version-v2.x/api/middleware/logger",title:"Logger",description:"Logger middleware for Fiber that logs HTTP request/response details.",source:"@site/versioned_docs/version-v2.x/api/middleware/logger.md",sourceDirName:"api/middleware",slug:"/api/middleware/logger",permalink:"/api/middleware/logger",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"logger",title:"Logger"},sidebar:"tutorialSidebar",previous:{title:"Limiter",permalink:"/api/middleware/limiter"},next:{title:"Monitor",permalink:"/api/middleware/monitor"}},s={},g=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2},{value:"Constants",id:"constants",level:2}],u={toc:g},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Logger middleware for ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that logs HTTP request/response details."),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/logger"\n)\n')),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"The order of registration plays a role. Only all routes that are registered after this one will be logged.\nThe middleware should therefore be one of the first to be registered.")),(0,a.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(logger.New())\n\n// Or extend your config for customization\n// Logging remote IP and Port\napp.Use(logger.New(logger.Config{\n Format: "[${ip}]:${port} ${status} - ${method} ${path}\\n",\n}))\n\n// Logging Request ID\napp.Use(requestid.New())\napp.Use(logger.New(logger.Config{\n // For more options, see the Config section\n Format: "${pid} ${locals:requestid} ${status} - ${method} ${path}\u200b\\n",\n}))\n\n// Changing TimeZone & TimeFormat\napp.Use(logger.New(logger.Config{\n Format: "${pid} ${status} - ${method} ${path}\\n",\n TimeFormat: "02-Jan-2006",\n TimeZone: "America/New_York",\n}))\n\n// Custom File Writer\nfile, err := os.OpenFile("./123.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)\nif err != nil {\n log.Fatalf("error opening file: %v", err)\n}\ndefer file.Close()\napp.Use(logger.New(logger.Config{\n Output: file,\n}))\n\n// Add Custom Tags\napp.Use(logger.New(logger.Config{\n CustomTags: map[string]logger.LogFunc{\n "custom_tag": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) {\n return output.WriteString("it is a custom tag")\n },\n },\n}))\n\n// Callback after log is written\napp.Use(logger.New(logger.Config{\n TimeFormat: time.RFC3339Nano,\n TimeZone: "Asia/Shanghai",\n Done: func(c *fiber.Ctx, logString []byte) {\n if c.Response().StatusCode() != fiber.StatusOK {\n reporter.SendToSlack(logString) \n }\n },\n}))\n\n// Disable colors when outputting to default format\napp.Use(logger.New(logger.Config{\n DisableColors: true,\n}))\n')),(0,a.kt)("h2",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n \n // Done is a function that is called after the log string for a request is written to Output,\n // and pass the log string as parameter.\n //\n // Optional. Default: nil\n Done func(c *fiber.Ctx, logString []byte)\n \n // tagFunctions defines the custom tag action\n //\n // Optional. Default: map[string]LogFunc\n CustomTags map[string]LogFunc\n \n // Format defines the logging tags\n //\n // Optional. Default: [${time}] ${status} - ${latency} ${method} ${path}\\n\n Format string\n \n // TimeFormat https://programming.guide/go/format-parse-string-time-date-example.html\n //\n // Optional. Default: 15:04:05\n TimeFormat string\n \n // TimeZone can be specified, such as "UTC" and "America/New_York" and "Asia/Chongqing", etc\n //\n // Optional. Default: "Local"\n TimeZone string\n \n // TimeInterval is the delay before the timestamp is updated\n //\n // Optional. Default: 500 * time.Millisecond\n TimeInterval time.Duration\n \n // Output is a writer where logs are written\n //\n // Default: os.Stdout\n Output io.Writer\n \n // DisableColors defines if the logs output should be colorized\n //\n // Default: false\n DisableColors bool\n \n enableColors bool\n enableLatency bool\n timeZoneLocation *time.Location\n}\ntype LogFunc func(buf logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error)\n')),(0,a.kt)("h2",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n Done: nil,\n Format: "[${time}] ${status} - ${latency} ${method} ${path}\\n",\n TimeFormat: "15:04:05",\n TimeZone: "Local",\n TimeInterval: 500 * time.Millisecond,\n Output: os.Stdout,\n DisableColors: true,\n}\n')),(0,a.kt)("h2",{id:"constants"},"Constants"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Logger variables\nconst (\n TagPid = "pid"\n TagTime = "time"\n TagReferer = "referer"\n TagProtocol = "protocol"\n TagPort = "port"\n TagIP = "ip"\n TagIPs = "ips"\n TagHost = "host"\n TagMethod = "method"\n TagPath = "path"\n TagURL = "url"\n TagUA = "ua"\n TagLatency = "latency"\n TagStatus = "status" // response status\n TagResBody = "resBody" // response body\n TagReqHeaders = "reqHeaders"\n TagQueryStringParams = "queryParams" // request query parameters\n TagBody = "body" // request body\n TagBytesSent = "bytesSent"\n TagBytesReceived = "bytesReceived"\n TagRoute = "route"\n TagError = "error"\n // DEPRECATED: Use TagReqHeader instead\n TagHeader = "header:" // request header\n TagReqHeader = "reqHeader:" // request header\n TagRespHeader = "respHeader:" // response header\n TagQuery = "query:" // request query\n TagForm = "form:" // request form\n TagCookie = "cookie:" // request cookie\n TagLocals = "locals:"\n // colors\n TagBlack = "black"\n TagRed = "red"\n TagGreen = "green"\n TagYellow = "yellow"\n TagBlue = "blue"\n TagMagenta = "magenta"\n TagCyan = "cyan"\n TagWhite = "white"\n TagReset = "reset"\n)\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6c633cee.5d525070.js b/assets/js/6c633cee.5d525070.js deleted file mode 100644 index 2f2a12b17bd..00000000000 --- a/assets/js/6c633cee.5d525070.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1900],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),f=c(n),b=i,d=f["".concat(l,".").concat(b)]||f[b]||u[b]||a;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=b;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[f]="string"==typeof e?e:i,o[1]=s;for(var c=2;c<a;c++)o[c]=n[c];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}b.displayName="MDXCreateElement"},3849:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var r=n(7462),i=(n(7294),n(3905));const a={id:"fibersentry",title:"Fibersentry"},o=void 0,s={unversionedId:"fibersentry/fibersentry",id:"version-swagger_v1.x.x/fibersentry/fibersentry",title:"Fibersentry",description:"Release",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/fibersentry/README.md",sourceDirName:"fibersentry",slug:"/fibersentry/",permalink:"/contrib/swagger_v1.x.x/fibersentry/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fibersentry/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fibersentry",title:"Fibersentry"},sidebar:"tutorialSidebar",previous:{title:"Fibernewrelic",permalink:"/contrib/swagger_v1.x.x/fibernewrelic/"},next:{title:"Fiberzap",permalink:"/contrib/swagger_v1.x.x/fiberzap/"}},l={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Accessing Context in <code>BeforeSend</code> callback",id:"accessing-context-in-beforesend-callback",level:3}],p={toc:c},f="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(f,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fibersentry*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://sentry.io/"},"Sentry")," support for Fiber."),(0,i.kt)("h3",{id:"install"},"Install"),(0,i.kt)("p",null,"This middleware supports Fiber v2."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fibersentry\ngo get -u github.com/getsentry/sentry-go\n")),(0,i.kt)("h3",{id:"signature"},"Signature"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"fibersentry.New(config ...Config) fiber.Handler\n")),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic configures whether Sentry should repanic after recovery. Set to true, if ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery configures whether you want to block the request before moving forward with the response. If ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used, it's safe to either skip this option or set it to false."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout for the event delivery requests."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Second * 2"))))),(0,i.kt)("h3",{id:"usage"},"Usage"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry")," attaches an instance of ",(0,i.kt)("inlineCode",{parentName:"p"},"*sentry.Hub")," (",(0,i.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/getsentry/sentry-go#Hub"},"https://godoc.org/github.com/getsentry/sentry-go#Hub"),") to the request's context, which makes it available throughout the rest of the request's lifetime.\nYou can access it by using the ",(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry.GetHubFromContext()")," method on the context itself in any of your proceeding middleware and routes.\nAnd it should be used instead of the global ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureMessage"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureException"),", or any other calls, as it keeps the separation of data between the requests."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Keep in mind that ",(0,i.kt)("inlineCode",{parentName:"strong"},"*sentry.Hub")," won't be available in middleware attached before to ",(0,i.kt)("inlineCode",{parentName:"strong"},"fibersentry"),"!")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "log"\n\n "github.com/getsentry/sentry-go"\n "github.com/gofiber/contrib/fibersentry"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/utils"\n)\n\nfunc main() {\n _ = sentry.Init(sentry.ClientOptions{\n Dsn: "",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(utils.ImmutableString(c.Hostname()))\n }\n }\n fmt.Println(event)\n return event\n },\n Debug: true,\n AttachStacktrace: true,\n })\n\n app := fiber.New()\n\n app.Use(fibersentry.New(fibersentry.Config{\n Repanic: true,\n WaitForDelivery: true,\n }))\n\n enhanceSentryEvent := func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")\n }\n return c.Next()\n }\n\n app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {\n panic("y tho")\n })\n\n app.All("/", func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.WithScope(func(scope *sentry.Scope) {\n scope.SetExtra("unwantedQuery", "someQueryDataMaybe")\n hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")\n })\n }\n return c.SendStatus(fiber.StatusOK)\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,i.kt)("h3",{id:"accessing-context-in-beforesend-callback"},"Accessing Context in ",(0,i.kt)("inlineCode",{parentName:"h3"},"BeforeSend")," callback"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'sentry.Init(sentry.ClientOptions{\n Dsn: "your-public-dsn",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(c.Hostname())\n }\n }\n return event\n },\n})\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6c633cee.ee0344d7.js b/assets/js/6c633cee.ee0344d7.js new file mode 100644 index 00000000000..86e49a43f34 --- /dev/null +++ b/assets/js/6c633cee.ee0344d7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1900],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},f="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),f=c(n),b=i,d=f["".concat(l,".").concat(b)]||f[b]||u[b]||a;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=b;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[f]="string"==typeof e?e:i,o[1]=s;for(var c=2;c<a;c++)o[c]=n[c];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}b.displayName="MDXCreateElement"},53849:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var r=n(87462),i=(n(67294),n(3905));const a={id:"fibersentry",title:"Fibersentry"},o=void 0,s={unversionedId:"fibersentry/fibersentry",id:"version-swagger_v1.x.x/fibersentry/fibersentry",title:"Fibersentry",description:"Release",source:"@site/contrib_versioned_docs/version-swagger_v1.x.x/fibersentry/README.md",sourceDirName:"fibersentry",slug:"/fibersentry/",permalink:"/contrib/swagger_v1.x.x/fibersentry/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fibersentry/README.md",tags:[],version:"swagger_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fibersentry",title:"Fibersentry"},sidebar:"tutorialSidebar",previous:{title:"Fibernewrelic",permalink:"/contrib/swagger_v1.x.x/fibernewrelic/"},next:{title:"Fiberzap",permalink:"/contrib/swagger_v1.x.x/fiberzap/"}},l={},c=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Usage",id:"usage",level:3},{value:"Accessing Context in <code>BeforeSend</code> callback",id:"accessing-context-in-beforesend-callback",level:3}],p={toc:c},f="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(f,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fibersentry*",alt:"Release"}),"\n",(0,i.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,i.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://sentry.io/"},"Sentry")," support for Fiber."),(0,i.kt)("h3",{id:"install"},"Install"),(0,i.kt)("p",null,"This middleware supports Fiber v2."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fibersentry\ngo get -u github.com/getsentry/sentry-go\n")),(0,i.kt)("h3",{id:"signature"},"Signature"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"fibersentry.New(config ...Config) fiber.Handler\n")),(0,i.kt)("h3",{id:"config"},"Config"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Repanic configures whether Sentry should repanic after recovery. Set to true, if ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"bool")),(0,i.kt)("td",{parentName:"tr",align:"left"},"WaitForDelivery configures whether you want to block the request before moving forward with the response. If ",(0,i.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/tree/master/middleware/recover"},"Recover")," middleware is used, it's safe to either skip this option or set it to false."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"false"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout"),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,i.kt)("td",{parentName:"tr",align:"left"},"Timeout for the event delivery requests."),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time.Second * 2"))))),(0,i.kt)("h3",{id:"usage"},"Usage"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry")," attaches an instance of ",(0,i.kt)("inlineCode",{parentName:"p"},"*sentry.Hub")," (",(0,i.kt)("a",{parentName:"p",href:"https://godoc.org/github.com/getsentry/sentry-go#Hub"},"https://godoc.org/github.com/getsentry/sentry-go#Hub"),") to the request's context, which makes it available throughout the rest of the request's lifetime.\nYou can access it by using the ",(0,i.kt)("inlineCode",{parentName:"p"},"fibersentry.GetHubFromContext()")," method on the context itself in any of your proceeding middleware and routes.\nAnd it should be used instead of the global ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureMessage"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"sentry.CaptureException"),", or any other calls, as it keeps the separation of data between the requests."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Keep in mind that ",(0,i.kt)("inlineCode",{parentName:"strong"},"*sentry.Hub")," won't be available in middleware attached before to ",(0,i.kt)("inlineCode",{parentName:"strong"},"fibersentry"),"!")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "log"\n\n "github.com/getsentry/sentry-go"\n "github.com/gofiber/contrib/fibersentry"\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/utils"\n)\n\nfunc main() {\n _ = sentry.Init(sentry.ClientOptions{\n Dsn: "",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(utils.ImmutableString(c.Hostname()))\n }\n }\n fmt.Println(event)\n return event\n },\n Debug: true,\n AttachStacktrace: true,\n })\n\n app := fiber.New()\n\n app.Use(fibersentry.New(fibersentry.Config{\n Repanic: true,\n WaitForDelivery: true,\n }))\n\n enhanceSentryEvent := func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")\n }\n return c.Next()\n }\n\n app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {\n panic("y tho")\n })\n\n app.All("/", func(c *fiber.Ctx) error {\n if hub := fibersentry.GetHubFromContext(c); hub != nil {\n hub.WithScope(func(scope *sentry.Scope) {\n scope.SetExtra("unwantedQuery", "someQueryDataMaybe")\n hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")\n })\n }\n return c.SendStatus(fiber.StatusOK)\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n')),(0,i.kt)("h3",{id:"accessing-context-in-beforesend-callback"},"Accessing Context in ",(0,i.kt)("inlineCode",{parentName:"h3"},"BeforeSend")," callback"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'sentry.Init(sentry.ClientOptions{\n Dsn: "your-public-dsn",\n BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {\n if hint.Context != nil {\n if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {\n // You have access to the original Context if it panicked\n fmt.Println(c.Hostname())\n }\n }\n return event\n },\n})\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6d7ca528.34c93f68.js b/assets/js/6d7ca528.34c93f68.js new file mode 100644 index 00000000000..43dac388038 --- /dev/null +++ b/assets/js/6d7ca528.34c93f68.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[787],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),c=u(r),g=a,m=c["".concat(l,".").concat(g)]||c[g]||f[g]||o;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:a,i[1]=s;for(var u=2;u<o;u++)i[u]=r[u];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}g.displayName="MDXCreateElement"},57828:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var n=r(87462),a=(r(67294),r(3905));const o={id:"ristretto",title:"Ristretto"},i=void 0,s={unversionedId:"ristretto/ristretto",id:"ristretto/ristretto",title:"Ristretto",description:"Release",source:"@site/docs/storage/ristretto/README.md",sourceDirName:"ristretto",slug:"/ristretto/",permalink:"/storage/next/ristretto/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/ristretto/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"ristretto",title:"Ristretto"},sidebar:"tutorialSidebar",previous:{title:"Redis",permalink:"/storage/next/redis/"},next:{title:"S3",permalink:"/storage/next/s3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:u},c="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=ristretto*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-ristretto.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Memory-bound storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/dgraph-io/ristretto"},(0,a.kt)("inlineCode",{parentName:"a"},"dgraph-io/ristretto")),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *ristretto.Cache\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Ristretto is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,a.kt)("p",null,"And then install the ristretto implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/ristretto\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/ristretto"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := ristretto.New()\n\n// Initialize custom config\nstore := ristretto.New(ristretto.Config{\n NumCounters: 1e7, // number of keys to track frequency of (10M).\n MaxCost: 1 << 30, // maximum cost of cache (1GB).\n BufferItems: 64, // number of keys per Get buffer.\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // NumCounters number of keys to track frequency of (10M).\n NumCounters int64\n\n // MaxCost maximum cost of cache (1GB).\n MaxCost int64\n\n // BufferItems number of keys per Get buffer.\n BufferItems int64\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n NumCounters: 1e7,\n MaxCost: 1 << 30,\n BufferItems: 64,\n DefaultCost: 1,\n}\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6d7ca528.71c21c57.js b/assets/js/6d7ca528.71c21c57.js deleted file mode 100644 index 847f450c082..00000000000 --- a/assets/js/6d7ca528.71c21c57.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[787],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),c=u(r),g=a,m=c["".concat(l,".").concat(g)]||c[g]||f[g]||o;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:a,i[1]=s;for(var u=2;u<o;u++)i[u]=r[u];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}g.displayName="MDXCreateElement"},7828:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var n=r(7462),a=(r(7294),r(3905));const o={id:"ristretto",title:"Ristretto"},i=void 0,s={unversionedId:"ristretto/ristretto",id:"ristretto/ristretto",title:"Ristretto",description:"Release",source:"@site/docs/storage/ristretto/README.md",sourceDirName:"ristretto",slug:"/ristretto/",permalink:"/storage/next/ristretto/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/ristretto/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"ristretto",title:"Ristretto"},sidebar:"tutorialSidebar",previous:{title:"Redis",permalink:"/storage/next/redis/"},next:{title:"S3",permalink:"/storage/next/s3/"}},l={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:u},c="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=ristretto*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-ristretto.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Memory-bound storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/dgraph-io/ristretto"},(0,a.kt)("inlineCode",{parentName:"a"},"dgraph-io/ristretto")),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *ristretto.Cache\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Ristretto is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,a.kt)("p",null,"And then install the ristretto implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/ristretto\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/ristretto"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := ristretto.New()\n\n// Initialize custom config\nstore := ristretto.New(ristretto.Config{\n NumCounters: 1e7, // number of keys to track frequency of (10M).\n MaxCost: 1 << 30, // maximum cost of cache (1GB).\n BufferItems: 64, // number of keys per Get buffer.\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // NumCounters number of keys to track frequency of (10M).\n NumCounters int64\n\n // MaxCost maximum cost of cache (1GB).\n MaxCost int64\n\n // BufferItems number of keys per Get buffer.\n BufferItems int64\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n NumCounters: 1e7,\n MaxCost: 1 << 30,\n BufferItems: 64,\n DefaultCost: 1,\n}\n")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6e0f0a87.4641915d.js b/assets/js/6e0f0a87.4641915d.js deleted file mode 100644 index 8cc4b06748f..00000000000 --- a/assets/js/6e0f0a87.4641915d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5979],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>g});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),c=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},p=function(e){var n=c(e.components);return r.createElement(s.Provider,{value:n},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},f=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(t),f=i,g=u["".concat(s,".").concat(f)]||u[f]||d[f]||a;return t?r.createElement(g,o(o({ref:n},p),{},{components:t})):r.createElement(g,o({ref:n},p))}));function g(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var a=t.length,o=new Array(a);o[0]=f;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var c=2;c<a;c++)o[c]=t[c];return r.createElement.apply(null,o)}return r.createElement.apply(null,t)}f.displayName="MDXCreateElement"},1799:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var r=t(7462),i=(t(7294),t(3905));const a={id:"cors",title:"CORS"},o=void 0,l={unversionedId:"api/middleware/cors",id:"api/middleware/cors",title:"CORS",description:"CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.",source:"@site/docs/core/api/middleware/cors.md",sourceDirName:"api/middleware",slug:"/api/middleware/cors",permalink:"/next/api/middleware/cors",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/cors.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"cors",title:"CORS"},sidebar:"tutorialSidebar",previous:{title:"Compress",permalink:"/next/api/middleware/compress"},next:{title:"CSRF",permalink:"/next/api/middleware/csrf"}},s={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],p={toc:c},u="wrapper";function d(e){let{components:n,...t}=e;return(0,i.kt)(u,(0,r.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"CORS middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that can be used to enable ",(0,i.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS"},"Cross-Origin Resource Sharing")," with various options."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/cors"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(cors.New())\n\n// Or extend your config for customization\napp.Use(cors.New(cors.Config{\n AllowOrigins: "https://gofiber.io, https://gofiber.net",\n AllowHeaders: "Origin, Content-Type, Accept",\n}))\n')),(0,i.kt)("p",null,"Using the ",(0,i.kt)("inlineCode",{parentName:"p"},"AllowOriginsFunc")," function. In this example any origin will be allowed via CORS."),(0,i.kt)("p",null,"For example, if a browser running on ",(0,i.kt)("inlineCode",{parentName:"p"},"http://localhost:3000")," sends a request, this will be accepted and the ",(0,i.kt)("inlineCode",{parentName:"p"},"access-control-allow-origin")," response header will be set to ",(0,i.kt)("inlineCode",{parentName:"p"},"http://localhost:3000"),"."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via ",(0,i.kt)("inlineCode",{parentName:"strong"},"AllowOrigins"),".")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(cors.New())\n\napp.Use(cors.New(cors.Config{\n AllowOriginsFunc: func(origin string) bool {\n return os.Getenv("ENVIRONMENT") == "development"\n },\n}))\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // AllowOriginsFunc defines a function that will set the \'access-control-allow-origin\'\n // response header to the \'origin\' request header when returned true.\n // \n // Note: Using this feature is discouraged in production and it\'s best practice to explicitly\n // set CORS origins via \'AllowOrigins\'\n //\n // Optional. Default: nil\n AllowOriginsFunc func(origin string) bool\n\n // AllowOrigin defines a list of origins that may access the resource.\n //\n // Optional. Default value "*"\n AllowOrigins string\n\n // AllowMethods defines a list methods allowed when accessing the resource.\n // This is used in response to a preflight request.\n //\n // Optional. Default value "GET,POST,HEAD,PUT,DELETE,PATCH"\n AllowMethods string\n\n // AllowHeaders defines a list of request headers that can be used when\n // making the actual request. This is in response to a preflight request.\n //\n // Optional. Default value "".\n AllowHeaders string\n\n // AllowCredentials indicates whether or not the response to the request\n // can be exposed when the credentials flag is true. When used as part of\n // a response to a preflight request, this indicates whether or not the\n // actual request can be made using credentials.\n //\n // Optional. Default value false.\n AllowCredentials bool\n\n // ExposeHeaders defines a whitelist headers that clients are allowed to\n // access.\n //\n // Optional. Default value "".\n ExposeHeaders string\n\n // MaxAge indicates how long (in seconds) the results of a preflight request\n // can be cached.\n //\n // Optional. Default value 0.\n MaxAge int\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n AllowOriginsFunc: nil,\n AllowOrigins: "*",\n AllowMethods: strings.Join([]string{\n fiber.MethodGet,\n fiber.MethodPost,\n fiber.MethodHead,\n fiber.MethodPut,\n fiber.MethodDelete,\n fiber.MethodPatch,\n }, ","),\n AllowHeaders: "",\n AllowCredentials: false,\n ExposeHeaders: "",\n MaxAge: 0,\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6e0f0a87.5b95a3ea.js b/assets/js/6e0f0a87.5b95a3ea.js new file mode 100644 index 00000000000..5e23ae447dc --- /dev/null +++ b/assets/js/6e0f0a87.5b95a3ea.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5979],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>g});var r=t(67294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),c=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},p=function(e){var n=c(e.components);return r.createElement(s.Provider,{value:n},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},f=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(t),f=i,g=u["".concat(s,".").concat(f)]||u[f]||d[f]||a;return t?r.createElement(g,o(o({ref:n},p),{},{components:t})):r.createElement(g,o({ref:n},p))}));function g(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var a=t.length,o=new Array(a);o[0]=f;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var c=2;c<a;c++)o[c]=t[c];return r.createElement.apply(null,o)}return r.createElement.apply(null,t)}f.displayName="MDXCreateElement"},21799:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var r=t(87462),i=(t(67294),t(3905));const a={id:"cors",title:"CORS"},o=void 0,l={unversionedId:"api/middleware/cors",id:"api/middleware/cors",title:"CORS",description:"CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.",source:"@site/docs/core/api/middleware/cors.md",sourceDirName:"api/middleware",slug:"/api/middleware/cors",permalink:"/next/api/middleware/cors",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/cors.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"cors",title:"CORS"},sidebar:"tutorialSidebar",previous:{title:"Compress",permalink:"/next/api/middleware/compress"},next:{title:"CSRF",permalink:"/next/api/middleware/csrf"}},s={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],p={toc:c},u="wrapper";function d(e){let{components:n,...t}=e;return(0,i.kt)(u,(0,r.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"CORS middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that can be used to enable ",(0,i.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS"},"Cross-Origin Resource Sharing")," with various options."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/cors"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(cors.New())\n\n// Or extend your config for customization\napp.Use(cors.New(cors.Config{\n AllowOrigins: "https://gofiber.io, https://gofiber.net",\n AllowHeaders: "Origin, Content-Type, Accept",\n}))\n')),(0,i.kt)("p",null,"Using the ",(0,i.kt)("inlineCode",{parentName:"p"},"AllowOriginsFunc")," function. In this example any origin will be allowed via CORS."),(0,i.kt)("p",null,"For example, if a browser running on ",(0,i.kt)("inlineCode",{parentName:"p"},"http://localhost:3000")," sends a request, this will be accepted and the ",(0,i.kt)("inlineCode",{parentName:"p"},"access-control-allow-origin")," response header will be set to ",(0,i.kt)("inlineCode",{parentName:"p"},"http://localhost:3000"),"."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via ",(0,i.kt)("inlineCode",{parentName:"strong"},"AllowOrigins"),".")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(cors.New())\n\napp.Use(cors.New(cors.Config{\n AllowOriginsFunc: func(origin string) bool {\n return os.Getenv("ENVIRONMENT") == "development"\n },\n}))\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // AllowOriginsFunc defines a function that will set the \'access-control-allow-origin\'\n // response header to the \'origin\' request header when returned true.\n // \n // Note: Using this feature is discouraged in production and it\'s best practice to explicitly\n // set CORS origins via \'AllowOrigins\'\n //\n // Optional. Default: nil\n AllowOriginsFunc func(origin string) bool\n\n // AllowOrigin defines a list of origins that may access the resource.\n //\n // Optional. Default value "*"\n AllowOrigins string\n\n // AllowMethods defines a list methods allowed when accessing the resource.\n // This is used in response to a preflight request.\n //\n // Optional. Default value "GET,POST,HEAD,PUT,DELETE,PATCH"\n AllowMethods string\n\n // AllowHeaders defines a list of request headers that can be used when\n // making the actual request. This is in response to a preflight request.\n //\n // Optional. Default value "".\n AllowHeaders string\n\n // AllowCredentials indicates whether or not the response to the request\n // can be exposed when the credentials flag is true. When used as part of\n // a response to a preflight request, this indicates whether or not the\n // actual request can be made using credentials.\n //\n // Optional. Default value false.\n AllowCredentials bool\n\n // ExposeHeaders defines a whitelist headers that clients are allowed to\n // access.\n //\n // Optional. Default value "".\n ExposeHeaders string\n\n // MaxAge indicates how long (in seconds) the results of a preflight request\n // can be cached.\n //\n // Optional. Default value 0.\n MaxAge int\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n AllowOriginsFunc: nil,\n AllowOrigins: "*",\n AllowMethods: strings.Join([]string{\n fiber.MethodGet,\n fiber.MethodPost,\n fiber.MethodHead,\n fiber.MethodPut,\n fiber.MethodDelete,\n fiber.MethodPatch,\n }, ","),\n AllowHeaders: "",\n AllowCredentials: false,\n ExposeHeaders: "",\n MaxAge: 0,\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6ed73382.48bf0c60.js b/assets/js/6ed73382.48bf0c60.js deleted file mode 100644 index 27476c36e55..00000000000 --- a/assets/js/6ed73382.48bf0c60.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9198],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(n),m=r,f=u["".concat(s,".").concat(m)]||u[m]||g[m]||i;return n?a.createElement(f,l(l({ref:t},c),{},{components:n})):a.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var p=2;p<i;p++)l[p]=n[p];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},5071:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var a=n(7462),r=(n(7294),n(3905));const i={id:"mysql",title:"MySQL"},l=void 0,o={unversionedId:"mysql/mysql",id:"version-etcd_v1.x.x/mysql/mysql",title:"MySQL",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/mysql/README.md",sourceDirName:"mysql",slug:"/mysql/",permalink:"/storage/etcd_v1.x.x/mysql/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mysql/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mysql",title:"MySQL"},sidebar:"tutorialSidebar",previous:{title:"MSSQL",permalink:"/storage/etcd_v1.x.x/mssql/"},next:{title:"Pebble",permalink:"/storage/etcd_v1.x.x/pebble/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:p},u="wrapper";function g(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mysql*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MySQL storage driver using ",(0,r.kt)("inlineCode",{parentName:"p"},"database/sql")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/go-sql-driver/mysql"},"go-sql-driver/mysql"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MySQL is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,r.kt)("p",null,"And then install the mysql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mysql\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mysql"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mysql.New()\n\n// Initialize custom config\nstore := mysql.New(mysql.Config{\n Host: "127.0.0.1",\n Port: 3306,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n\n// Initialize custom config using connection string\nstore := mysql.New(mysql.Config{\n ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n\n// Initialize custom config using sql db connection\ndb, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")\nstore := mysql.New(mysql.Config{\n Db: db,\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // DB Will override ConnectionURI and all other authentication values if used\n //\n // Optional. Default is nil\n Db *sql.DB\n \n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 3306\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 3306,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6ed73382.ceb06375.js b/assets/js/6ed73382.ceb06375.js new file mode 100644 index 00000000000..e126d465f6a --- /dev/null +++ b/assets/js/6ed73382.ceb06375.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9198],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(n),m=r,f=u["".concat(s,".").concat(m)]||u[m]||g[m]||i;return n?a.createElement(f,l(l({ref:t},c),{},{components:n})):a.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var p=2;p<i;p++)l[p]=n[p];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},25071:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const i={id:"mysql",title:"MySQL"},l=void 0,o={unversionedId:"mysql/mysql",id:"version-etcd_v1.x.x/mysql/mysql",title:"MySQL",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/mysql/README.md",sourceDirName:"mysql",slug:"/mysql/",permalink:"/storage/etcd_v1.x.x/mysql/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mysql/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mysql",title:"MySQL"},sidebar:"tutorialSidebar",previous:{title:"MSSQL",permalink:"/storage/etcd_v1.x.x/mssql/"},next:{title:"Pebble",permalink:"/storage/etcd_v1.x.x/pebble/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:p},u="wrapper";function g(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mysql*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mysql.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MySQL storage driver using ",(0,r.kt)("inlineCode",{parentName:"p"},"database/sql")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/go-sql-driver/mysql"},"go-sql-driver/mysql"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *sql.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MySQL is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,r.kt)("p",null,"And then install the mysql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mysql\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mysql"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mysql.New()\n\n// Initialize custom config\nstore := mysql.New(mysql.Config{\n Host: "127.0.0.1",\n Port: 3306,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n\n// Initialize custom config using connection string\nstore := mysql.New(mysql.Config{\n ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n\n// Initialize custom config using sql db connection\ndb, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")\nstore := mysql.New(mysql.Config{\n Db: db,\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // DB Will override ConnectionURI and all other authentication values if used\n //\n // Optional. Default is nil\n Db *sql.DB\n \n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 3306\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 3306,\n Database: "fiber",\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6f9f0f49.28341a86.js b/assets/js/6f9f0f49.28341a86.js deleted file mode 100644 index 190ada18050..00000000000 --- a/assets/js/6f9f0f49.28341a86.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1773],{3905:(e,n,t)=>{t.d(n,{Zo:()=>f,kt:()=>m});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var c=r.createContext({}),s=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},f=function(e){var n=s(e.components);return r.createElement(c.Provider,{value:n},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,f=l(e,["components","mdxType","originalType","parentName"]),p=s(t),d=i,m=p["".concat(c,".").concat(d)]||p[d]||u[d]||a;return t?r.createElement(m,o(o({ref:n},f),{},{components:t})):r.createElement(m,o({ref:n},f))}));function m(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var a=t.length,o=new Array(a);o[0]=d;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l[p]="string"==typeof e?e:i,o[1]=l;for(var s=2;s<a;s++)o[s]=t[s];return r.createElement.apply(null,o)}return r.createElement.apply(null,t)}d.displayName="MDXCreateElement"},1928:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var r=t(7462),i=(t(7294),t(3905));const a={id:"favicon",title:"Favicon"},o=void 0,l={unversionedId:"api/middleware/favicon",id:"version-v2.x/api/middleware/favicon",title:"Favicon",description:"Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware.",source:"@site/versioned_docs/version-v2.x/api/middleware/favicon.md",sourceDirName:"api/middleware",slug:"/api/middleware/favicon",permalink:"/api/middleware/favicon",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"favicon",title:"Favicon"},sidebar:"tutorialSidebar",previous:{title:"ExpVar",permalink:"/api/middleware/expvar"},next:{title:"FileSystem",permalink:"/api/middleware/filesystem"}},c={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],f={toc:s},p="wrapper";function u(e){let{components:n,...t}=e;return(0,i.kt)(p,(0,r.Z)({},f,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Favicon middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware."),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This middleware is exclusively for serving the default, implicit favicon, which is GET /favicon.ico or ",(0,i.kt)("a",{parentName:"p",href:"#config"},"custom favicon URL"),".")),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/favicon"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(favicon.New())\n\n// Or extend your config for customization\napp.Use(favicon.New(favicon.Config{\n File: "./favicon.ico",\n URL: "/favicon.ico",\n}))\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // File holds the path to an actual favicon that will be cached\n //\n // Optional. Default: ""\n File string\n \n // URL for favicon handler\n //\n // Optional. Default: "/favicon.ico"\n URL string\n\n // FileSystem is an optional alternate filesystem to search for the favicon in.\n // An example of this could be an embedded or network filesystem\n //\n // Optional. Default: nil\n FileSystem http.FileSystem\n\n // CacheControl defines how the Cache-Control header in the response should be set\n //\n // Optional. Default: "public, max-age=31536000"\n CacheControl string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n File: "",\n URL: fPath,\n CacheControl: "public, max-age=31536000",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6f9f0f49.632e1b1a.js b/assets/js/6f9f0f49.632e1b1a.js new file mode 100644 index 00000000000..ab03049e52c --- /dev/null +++ b/assets/js/6f9f0f49.632e1b1a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1773],{3905:(e,n,t)=>{t.d(n,{Zo:()=>f,kt:()=>m});var r=t(67294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var c=r.createContext({}),s=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},f=function(e){var n=s(e.components);return r.createElement(c.Provider,{value:n},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,f=l(e,["components","mdxType","originalType","parentName"]),p=s(t),d=i,m=p["".concat(c,".").concat(d)]||p[d]||u[d]||a;return t?r.createElement(m,o(o({ref:n},f),{},{components:t})):r.createElement(m,o({ref:n},f))}));function m(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var a=t.length,o=new Array(a);o[0]=d;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l[p]="string"==typeof e?e:i,o[1]=l;for(var s=2;s<a;s++)o[s]=t[s];return r.createElement.apply(null,o)}return r.createElement.apply(null,t)}d.displayName="MDXCreateElement"},1928:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var r=t(87462),i=(t(67294),t(3905));const a={id:"favicon",title:"Favicon"},o=void 0,l={unversionedId:"api/middleware/favicon",id:"version-v2.x/api/middleware/favicon",title:"Favicon",description:"Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware.",source:"@site/versioned_docs/version-v2.x/api/middleware/favicon.md",sourceDirName:"api/middleware",slug:"/api/middleware/favicon",permalink:"/api/middleware/favicon",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"favicon",title:"Favicon"},sidebar:"tutorialSidebar",previous:{title:"ExpVar",permalink:"/api/middleware/expvar"},next:{title:"FileSystem",permalink:"/api/middleware/filesystem"}},c={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],f={toc:s},p="wrapper";function u(e){let{components:n,...t}=e;return(0,i.kt)(p,(0,r.Z)({},f,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Favicon middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware."),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This middleware is exclusively for serving the default, implicit favicon, which is GET /favicon.ico or ",(0,i.kt)("a",{parentName:"p",href:"#config"},"custom favicon URL"),".")),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/favicon"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(favicon.New())\n\n// Or extend your config for customization\napp.Use(favicon.New(favicon.Config{\n File: "./favicon.ico",\n URL: "/favicon.ico",\n}))\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // File holds the path to an actual favicon that will be cached\n //\n // Optional. Default: ""\n File string\n \n // URL for favicon handler\n //\n // Optional. Default: "/favicon.ico"\n URL string\n\n // FileSystem is an optional alternate filesystem to search for the favicon in.\n // An example of this could be an embedded or network filesystem\n //\n // Optional. Default: nil\n FileSystem http.FileSystem\n\n // CacheControl defines how the Cache-Control header in the response should be set\n //\n // Optional. Default: "public, max-age=31536000"\n CacheControl string\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n File: "",\n URL: fPath,\n CacheControl: "public, max-age=31536000",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6fd96d3e.2854f33e.js b/assets/js/6fd96d3e.2854f33e.js deleted file mode 100644 index dc1c775c20f..00000000000 --- a/assets/js/6fd96d3e.2854f33e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4396],{3905:(t,e,r)=>{r.d(e,{Zo:()=>b,kt:()=>g});var i=r(7294);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e){if(null==t)return{};var r,i,o=function(t,e){if(null==t)return{};var r,i,o={},n=Object.keys(t);for(i=0;i<n.length;i++)r=n[i],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(i=0;i<n.length;i++)r=n[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var l=i.createContext({}),c=function(t){var e=i.useContext(l),r=e;return t&&(r="function"==typeof t?t(e):a(a({},e),t)),r},b=function(t){var e=c(t.components);return i.createElement(l.Provider,{value:e},t.children)},m="mdxType",f={inlineCode:"code",wrapper:function(t){var e=t.children;return i.createElement(i.Fragment,{},e)}},p=i.forwardRef((function(t,e){var r=t.components,o=t.mdxType,n=t.originalType,l=t.parentName,b=s(t,["components","mdxType","originalType","parentName"]),m=c(r),p=o,g=m["".concat(l,".").concat(p)]||m[p]||f[p]||n;return r?i.createElement(g,a(a({ref:e},b),{},{components:r})):i.createElement(g,a({ref:e},b))}));function g(t,e){var r=arguments,o=e&&e.mdxType;if("string"==typeof t||o){var n=r.length,a=new Array(n);a[0]=p;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s[m]="string"==typeof t?t:o,a[1]=s;for(var c=2;c<n;c++)a[c]=r[c];return i.createElement.apply(null,a)}return i.createElement.apply(null,r)}p.displayName="MDXCreateElement"},8682:(t,e,r)=>{r.r(e),r.d(e,{assets:()=>l,contentTitle:()=>a,default:()=>f,frontMatter:()=>n,metadata:()=>s,toc:()=>c});var i=r(7462),o=(r(7294),r(3905));const n={title:"\ud83d\udc4b Welcome",sidebar_position:1},a=void 0,s={unversionedId:"README",id:"version-fiberzerolog_v0.x.x/README",title:"\ud83d\udc4b Welcome",description:"Discord",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/contrib/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"Casbin",permalink:"/contrib/casbin/"}},l={},c=[{value:"\ud83d\udcd1 Middleware Implementations",id:"-middleware-implementations",level:2}],b={toc:c},m="wrapper";function f(t){let{components:e,...r}=t;return(0,o.kt)(m,(0,i.Z)({},b,r,{components:e,mdxType:"MDXLayout"}),(0,o.kt)("p",{align:"center"},(0,o.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/contrib/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,o.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/contrib/master/.github/logo.svg#gh-light-mode-only"}),(0,o.kt)("br",null),(0,o.kt)("h1",{id:"contrib"},"Contrib"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,o.kt)("p",null,"Repository for third party middlewares with dependencies.")),(0,o.kt)("h2",{id:"-middleware-implementations"},"\ud83d\udcd1 Middleware Implementations"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/casbin/"},"Casbin")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fiberi18n/"},"Fiberi18n")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry/"},"Fibersentry")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fiberzap/"},"Fiberzap")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fiberzerolog/"},"Fiberzerolog")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/jwt/"},"JWT")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibernewrelic/"},"NewRelic")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/opafiber/"},"Open Policy Agent")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/otelfiber/"},"Otelfiber (OpenTelemetry)")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/paseto/"},"Paseto")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/swagger/"},"Swagger")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/websocket/"},"Websocket")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6fd96d3e.53535b1c.js b/assets/js/6fd96d3e.53535b1c.js new file mode 100644 index 00000000000..27bb6dae09a --- /dev/null +++ b/assets/js/6fd96d3e.53535b1c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4396],{3905:(t,e,r)=>{r.d(e,{Zo:()=>b,kt:()=>g});var i=r(67294);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e){if(null==t)return{};var r,i,o=function(t,e){if(null==t)return{};var r,i,o={},n=Object.keys(t);for(i=0;i<n.length;i++)r=n[i],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(i=0;i<n.length;i++)r=n[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var l=i.createContext({}),c=function(t){var e=i.useContext(l),r=e;return t&&(r="function"==typeof t?t(e):a(a({},e),t)),r},b=function(t){var e=c(t.components);return i.createElement(l.Provider,{value:e},t.children)},m="mdxType",f={inlineCode:"code",wrapper:function(t){var e=t.children;return i.createElement(i.Fragment,{},e)}},p=i.forwardRef((function(t,e){var r=t.components,o=t.mdxType,n=t.originalType,l=t.parentName,b=s(t,["components","mdxType","originalType","parentName"]),m=c(r),p=o,g=m["".concat(l,".").concat(p)]||m[p]||f[p]||n;return r?i.createElement(g,a(a({ref:e},b),{},{components:r})):i.createElement(g,a({ref:e},b))}));function g(t,e){var r=arguments,o=e&&e.mdxType;if("string"==typeof t||o){var n=r.length,a=new Array(n);a[0]=p;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s[m]="string"==typeof t?t:o,a[1]=s;for(var c=2;c<n;c++)a[c]=r[c];return i.createElement.apply(null,a)}return i.createElement.apply(null,r)}p.displayName="MDXCreateElement"},18682:(t,e,r)=>{r.r(e),r.d(e,{assets:()=>l,contentTitle:()=>a,default:()=>f,frontMatter:()=>n,metadata:()=>s,toc:()=>c});var i=r(87462),o=(r(67294),r(3905));const n={title:"\ud83d\udc4b Welcome",sidebar_position:1},a=void 0,s={unversionedId:"README",id:"version-fiberzerolog_v0.x.x/README",title:"\ud83d\udc4b Welcome",description:"Discord",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/README.md",sourceDirName:".",slug:"/",permalink:"/contrib/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{title:"\ud83d\udc4b Welcome",sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"Casbin",permalink:"/contrib/casbin/"}},l={},c=[{value:"\ud83d\udcd1 Middleware Implementations",id:"-middleware-implementations",level:2}],b={toc:c},m="wrapper";function f(t){let{components:e,...r}=t;return(0,o.kt)(m,(0,i.Z)({},b,r,{components:e,mdxType:"MDXLayout"}),(0,o.kt)("p",{align:"center"},(0,o.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/contrib/master/.github/logo-dark.svg#gh-dark-mode-only"}),(0,o.kt)("img",{height:"125",alt:"Fiber",src:"https://raw.githubusercontent.com/gofiber/contrib/master/.github/logo.svg#gh-light-mode-only"}),(0,o.kt)("br",null),(0,o.kt)("h1",{id:"contrib"},"Contrib"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,o.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,o.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,o.kt)("p",null,"Repository for third party middlewares with dependencies.")),(0,o.kt)("h2",{id:"-middleware-implementations"},"\ud83d\udcd1 Middleware Implementations"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/casbin/"},"Casbin")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fiberi18n/"},"Fiberi18n")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibersentry/"},"Fibersentry")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fiberzap/"},"Fiberzap")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fiberzerolog/"},"Fiberzerolog")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/jwt/"},"JWT")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/fibernewrelic/"},"NewRelic")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/opafiber/"},"Open Policy Agent")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/otelfiber/"},"Otelfiber (OpenTelemetry)")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/paseto/"},"Paseto")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/swagger/"},"Swagger")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," ")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/contrib/websocket/"},"Websocket")," ",(0,o.kt)("a",{href:"https://github.com/gofiber/contrib/actions?query=workflow%3A%22Tests%22"}," ",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/gofiber/contrib/test.yml?branch=main&label=%F0%9F%A7%AA%20&style=flat&color=75C46B"})," "))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/70908c7a.5afaaae3.js b/assets/js/70908c7a.5afaaae3.js new file mode 100644 index 00000000000..a0a28ce42dd --- /dev/null +++ b/assets/js/70908c7a.5afaaae3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2565],{3905:(e,t,n)=>{n.d(t,{Zo:()=>f,kt:()=>b});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var d=r.createContext({}),o=function(e){var t=r.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},f=function(e){var t=o(e.components);return r.createElement(d.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,d=e.parentName,f=l(e,["components","mdxType","originalType","parentName"]),c=o(n),u=a,b=c["".concat(d,".").concat(u)]||c[u]||m[u]||i;return n?r.createElement(b,p(p({ref:t},f),{},{components:n})):r.createElement(b,p({ref:t},f))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,p=new Array(i);p[0]=u;var l={};for(var d in t)hasOwnProperty.call(t,d)&&(l[d]=t[d]);l.originalType=e,l[c]="string"==typeof e?e:a,p[1]=l;for(var o=2;o<i;o++)p[o]=n[o];return r.createElement.apply(null,p)}return r.createElement.apply(null,n)}u.displayName="MDXCreateElement"},13700:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>o});var r=n(87462),a=(n(67294),n(3905));const i={id:"adaptor",title:"Adaptor"},p=void 0,l={unversionedId:"api/middleware/adaptor",id:"version-v2.x/api/middleware/adaptor",title:"Adaptor",description:"Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!",source:"@site/versioned_docs/version-v2.x/api/middleware/adaptor.md",sourceDirName:"api/middleware",slug:"/api/middleware/adaptor",permalink:"/api/middleware/adaptor",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"adaptor",title:"Adaptor"},sidebar:"tutorialSidebar",previous:{title:"\ud83e\uddec Middleware",permalink:"/category/-middleware"},next:{title:"BasicAuth",permalink:"/api/middleware/basicauth"}},d={},o=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"net/http to Fiber",id:"nethttp-to-fiber",level:3},{value:"net/http middleware to Fiber",id:"nethttp-middleware-to-fiber",level:3},{value:"Fiber Handler to net/http",id:"fiber-handler-to-nethttp",level:3},{value:"Fiber App to net/http",id:"fiber-app-to-nethttp",level:3},{value:"Fiber Context to (net/http).Request",id:"fiber-context-to-nethttprequest",level:3}],f={toc:o},c="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Converter for net/http handlers to/from Fiber request handlers, special thanks to ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/arsmn"},"@arsmn"),"!"),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Signature"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"HTTPHandler"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"HTTPHandler(h http.Handler) fiber.Handler")),(0,a.kt)("td",{parentName:"tr",align:"left"},"http.Handler -> fiber.Handler")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"HTTPHandlerFunc"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"HTTPHandlerFunc(h http.HandlerFunc) fiber.Handler")),(0,a.kt)("td",{parentName:"tr",align:"left"},"http.HandlerFunc -> fiber.Handler")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"HTTPMiddleware"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"HTTPHandlerFunc(mw func(http.Handler) http.Handler) fiber.Handler")),(0,a.kt)("td",{parentName:"tr",align:"left"},"func(http.Handler) http.Handler -> fiber.Handler")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"FiberHandler"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"FiberHandler(h fiber.Handler) http.Handler")),(0,a.kt)("td",{parentName:"tr",align:"left"},"fiber.Handler -> http.Handler")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"FiberHandlerFunc"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"FiberHandlerFunc(h fiber.Handler) http.HandlerFunc")),(0,a.kt)("td",{parentName:"tr",align:"left"},"fiber.Handler -> http.HandlerFunc")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"FiberApp"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"FiberApp(app *fiber.App) http.HandlerFunc")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Fiber app -> http.HandlerFunc")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"ConvertRequest"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"ConvertRequest(c *fiber.Ctx, forServer bool) (*http.Request, error)")),(0,a.kt)("td",{parentName:"tr",align:"left"},"fiber.Ctx -> http.Request")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"CopyContextToFiberContext"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"CopyContextToFiberContext(context interface{}, requestContext *fasthttp.RequestCtx)")),(0,a.kt)("td",{parentName:"tr",align:"left"},"context.Context -> fasthttp.RequestCtx")))),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("h3",{id:"nethttp-to-fiber"},"net/http to Fiber"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/adaptor"\n)\n\nfunc main() {\n // New fiber app\n app := fiber.New()\n\n // http.Handler -> fiber.Handler\n app.Get("/", adaptor.HTTPHandler(handler(greet)))\n\n // http.HandlerFunc -> fiber.Handler\n app.Get("/func", adaptor.HTTPHandlerFunc(greet))\n\n // Listen on port 3000\n app.Listen(":3000")\n}\n\nfunc handler(f http.HandlerFunc) http.Handler {\n return http.HandlerFunc(f)\n}\n\nfunc greet(w http.ResponseWriter, r *http.Request) {\n fmt.Fprint(w, "Hello World!")\n}\n')),(0,a.kt)("h3",{id:"nethttp-middleware-to-fiber"},"net/http middleware to Fiber"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/adaptor"\n)\n\nfunc main() {\n // New fiber app\n app := fiber.New()\n\n // http middleware -> fiber.Handler\n app.Use(adaptor.HTTPMiddleware(logMiddleware))\n\n // Listen on port 3000\n app.Listen(":3000")\n}\n\nfunc logMiddleware(next http.Handler) http.Handler {\n return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n log.Println("log middleware")\n next.ServeHTTP(w, r)\n })\n}\n')),(0,a.kt)("h3",{id:"fiber-handler-to-nethttp"},"Fiber Handler to net/http"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/adaptor"\n)\n\nfunc main() {\n // fiber.Handler -> http.Handler\n http.Handle("/", adaptor.FiberHandler(greet))\n\n // fiber.Handler -> http.HandlerFunc\n http.HandleFunc("/func", adaptor.FiberHandlerFunc(greet))\n\n // Listen on port 3000\n http.ListenAndServe(":3000", nil)\n}\n\nfunc greet(c *fiber.Ctx) error {\n return c.SendString("Hello World!")\n}\n')),(0,a.kt)("h3",{id:"fiber-app-to-nethttp"},"Fiber App to net/http"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/adaptor"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/greet", greet)\n\n // Listen on port 3000\n http.ListenAndServe(":3000", adaptor.FiberApp(app))\n}\n\nfunc greet(c *fiber.Ctx) error {\n return c.SendString("Hello World!")\n}\n')),(0,a.kt)("h3",{id:"fiber-context-to-nethttprequest"},"Fiber Context to (net/http).Request"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/adaptor"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/greet", greetWithHTTPReq)\n\n // Listen on port 3000\n http.ListenAndServe(":3000", adaptor.FiberApp(app))\n}\n\nfunc greetWithHTTPReq(c *fiber.Ctx) error {\n httpReq, err := adaptor.ConvertRequest(c, false)\n if err != nil {\n return err\n }\n\n return c.SendString("Request URL: " + httpReq.URL.String())\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/70908c7a.b8dbd88c.js b/assets/js/70908c7a.b8dbd88c.js deleted file mode 100644 index d8377d71e18..00000000000 --- a/assets/js/70908c7a.b8dbd88c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2565],{3905:(e,t,n)=>{n.d(t,{Zo:()=>f,kt:()=>b});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var d=r.createContext({}),o=function(e){var t=r.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},f=function(e){var t=o(e.components);return r.createElement(d.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,d=e.parentName,f=l(e,["components","mdxType","originalType","parentName"]),c=o(n),u=a,b=c["".concat(d,".").concat(u)]||c[u]||m[u]||i;return n?r.createElement(b,p(p({ref:t},f),{},{components:n})):r.createElement(b,p({ref:t},f))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,p=new Array(i);p[0]=u;var l={};for(var d in t)hasOwnProperty.call(t,d)&&(l[d]=t[d]);l.originalType=e,l[c]="string"==typeof e?e:a,p[1]=l;for(var o=2;o<i;o++)p[o]=n[o];return r.createElement.apply(null,p)}return r.createElement.apply(null,n)}u.displayName="MDXCreateElement"},3700:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>o});var r=n(7462),a=(n(7294),n(3905));const i={id:"adaptor",title:"Adaptor"},p=void 0,l={unversionedId:"api/middleware/adaptor",id:"version-v2.x/api/middleware/adaptor",title:"Adaptor",description:"Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!",source:"@site/versioned_docs/version-v2.x/api/middleware/adaptor.md",sourceDirName:"api/middleware",slug:"/api/middleware/adaptor",permalink:"/api/middleware/adaptor",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"adaptor",title:"Adaptor"},sidebar:"tutorialSidebar",previous:{title:"\ud83e\uddec Middleware",permalink:"/category/-middleware"},next:{title:"BasicAuth",permalink:"/api/middleware/basicauth"}},d={},o=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"net/http to Fiber",id:"nethttp-to-fiber",level:3},{value:"net/http middleware to Fiber",id:"nethttp-middleware-to-fiber",level:3},{value:"Fiber Handler to net/http",id:"fiber-handler-to-nethttp",level:3},{value:"Fiber App to net/http",id:"fiber-app-to-nethttp",level:3},{value:"Fiber Context to (net/http).Request",id:"fiber-context-to-nethttprequest",level:3}],f={toc:o},c="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Converter for net/http handlers to/from Fiber request handlers, special thanks to ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/arsmn"},"@arsmn"),"!"),(0,a.kt)("h2",{id:"signatures"},"Signatures"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Signature"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"HTTPHandler"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"HTTPHandler(h http.Handler) fiber.Handler")),(0,a.kt)("td",{parentName:"tr",align:"left"},"http.Handler -> fiber.Handler")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"HTTPHandlerFunc"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"HTTPHandlerFunc(h http.HandlerFunc) fiber.Handler")),(0,a.kt)("td",{parentName:"tr",align:"left"},"http.HandlerFunc -> fiber.Handler")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"HTTPMiddleware"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"HTTPHandlerFunc(mw func(http.Handler) http.Handler) fiber.Handler")),(0,a.kt)("td",{parentName:"tr",align:"left"},"func(http.Handler) http.Handler -> fiber.Handler")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"FiberHandler"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"FiberHandler(h fiber.Handler) http.Handler")),(0,a.kt)("td",{parentName:"tr",align:"left"},"fiber.Handler -> http.Handler")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"FiberHandlerFunc"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"FiberHandlerFunc(h fiber.Handler) http.HandlerFunc")),(0,a.kt)("td",{parentName:"tr",align:"left"},"fiber.Handler -> http.HandlerFunc")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"FiberApp"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"FiberApp(app *fiber.App) http.HandlerFunc")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Fiber app -> http.HandlerFunc")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"ConvertRequest"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"ConvertRequest(c *fiber.Ctx, forServer bool) (*http.Request, error)")),(0,a.kt)("td",{parentName:"tr",align:"left"},"fiber.Ctx -> http.Request")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"CopyContextToFiberContext"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"CopyContextToFiberContext(context interface{}, requestContext *fasthttp.RequestCtx)")),(0,a.kt)("td",{parentName:"tr",align:"left"},"context.Context -> fasthttp.RequestCtx")))),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("h3",{id:"nethttp-to-fiber"},"net/http to Fiber"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "fmt"\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/adaptor"\n)\n\nfunc main() {\n // New fiber app\n app := fiber.New()\n\n // http.Handler -> fiber.Handler\n app.Get("/", adaptor.HTTPHandler(handler(greet)))\n\n // http.HandlerFunc -> fiber.Handler\n app.Get("/func", adaptor.HTTPHandlerFunc(greet))\n\n // Listen on port 3000\n app.Listen(":3000")\n}\n\nfunc handler(f http.HandlerFunc) http.Handler {\n return http.HandlerFunc(f)\n}\n\nfunc greet(w http.ResponseWriter, r *http.Request) {\n fmt.Fprint(w, "Hello World!")\n}\n')),(0,a.kt)("h3",{id:"nethttp-middleware-to-fiber"},"net/http middleware to Fiber"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/adaptor"\n)\n\nfunc main() {\n // New fiber app\n app := fiber.New()\n\n // http middleware -> fiber.Handler\n app.Use(adaptor.HTTPMiddleware(logMiddleware))\n\n // Listen on port 3000\n app.Listen(":3000")\n}\n\nfunc logMiddleware(next http.Handler) http.Handler {\n return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n log.Println("log middleware")\n next.ServeHTTP(w, r)\n })\n}\n')),(0,a.kt)("h3",{id:"fiber-handler-to-nethttp"},"Fiber Handler to net/http"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/adaptor"\n)\n\nfunc main() {\n // fiber.Handler -> http.Handler\n http.Handle("/", adaptor.FiberHandler(greet))\n\n // fiber.Handler -> http.HandlerFunc\n http.HandleFunc("/func", adaptor.FiberHandlerFunc(greet))\n\n // Listen on port 3000\n http.ListenAndServe(":3000", nil)\n}\n\nfunc greet(c *fiber.Ctx) error {\n return c.SendString("Hello World!")\n}\n')),(0,a.kt)("h3",{id:"fiber-app-to-nethttp"},"Fiber App to net/http"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/adaptor"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/greet", greet)\n\n // Listen on port 3000\n http.ListenAndServe(":3000", adaptor.FiberApp(app))\n}\n\nfunc greet(c *fiber.Ctx) error {\n return c.SendString("Hello World!")\n}\n')),(0,a.kt)("h3",{id:"fiber-context-to-nethttprequest"},"Fiber Context to (net/http).Request"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "net/http"\n\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/adaptor"\n)\n\nfunc main() {\n app := fiber.New()\n\n app.Get("/greet", greetWithHTTPReq)\n\n // Listen on port 3000\n http.ListenAndServe(":3000", adaptor.FiberApp(app))\n}\n\nfunc greetWithHTTPReq(c *fiber.Ctx) error {\n httpReq, err := adaptor.ConvertRequest(c, false)\n if err != nil {\n return err\n }\n\n return c.SendString("Request URL: " + httpReq.URL.String())\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8ec8555c.a08d8e48.js b/assets/js/70bddfb7.07b64a4b.js similarity index 90% rename from assets/js/8ec8555c.a08d8e48.js rename to assets/js/70bddfb7.07b64a4b.js index ef5d31d5720..f6c17eed6b3 100644 --- a/assets/js/8ec8555c.a08d8e48.js +++ b/assets/js/70bddfb7.07b64a4b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2149],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>N});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),p=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=p(e.components);return a.createElement(d.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),s=p(n),k=r,N=s["".concat(d,".").concat(k)]||s[k]||u[k]||l;return n?a.createElement(N,i(i({ref:t},m),{},{components:n})):a.createElement(N,i({ref:t},m))}));function N(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=k;var o={};for(var d in t)hasOwnProperty.call(t,d)&&(o[d]=t[d]);o.originalType=e,o[s]="string"==typeof e?e:r,i[1]=o;for(var p=2;p<l;p++)i[p]=n[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}k.displayName="MDXCreateElement"},5873:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var a=n(7462),r=(n(7294),n(3905));const l={id:"fiber",title:"\ud83d\udce6 Fiber",description:"Fiber represents the fiber package where you start to create an instance.",sidebar_position:1},i=void 0,o={unversionedId:"api/fiber",id:"version-v2.x/api/fiber",title:"\ud83d\udce6 Fiber",description:"Fiber represents the fiber package where you start to create an instance.",source:"@site/versioned_docs/version-v2.x/api/fiber.md",sourceDirName:"api",slug:"/api/fiber",permalink:"/api/fiber",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{id:"fiber",title:"\ud83d\udce6 Fiber",description:"Fiber represents the fiber package where you start to create an instance.",sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"API",permalink:"/category/api"},next:{title:"\ud83d\ude80 App",permalink:"/api/app"}},d={},p=[{value:"New",id:"new",level:2},{value:"Config",id:"config",level:2},{value:"NewError",id:"newerror",level:2},{value:"IsChild",id:"ischild",level:2}],m={toc:p},s="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(s,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"new"},"New"),(0,r.kt)("p",null,"This method creates a new ",(0,r.kt)("strong",{parentName:"p"},"App")," named instance. You can pass optional ",(0,r.kt)("a",{parentName:"p",href:"#config"},"config "),"when creating a new instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func New(config ...Config) *App\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"// Default config\napp := fiber.New()\n\n// ...\n")),(0,r.kt)("h2",{id:"config"},"Config"),(0,r.kt)("p",null,"You can pass an optional Config when creating a new Fiber instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Custom config\napp := fiber.New(fiber.Config{\n Prefork: true,\n CaseSensitive: true,\n StrictRouting: true,\n ServerHeader: "Fiber",\n AppName: "Test App v1.0.1"\n})\n\n// ...\n')),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Config fields")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Property"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"AppName"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"This allows to setup app name for the app"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"BodyLimit"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"Sets the maximum allowed size for a request body, if the size exceeds the configured limit, it sends ",(0,r.kt)("inlineCode",{parentName:"td"},"413 - Request Entity Too Large")," response."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"4 * 1024 * 1024"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CaseSensitive"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When enabled, ",(0,r.kt)("inlineCode",{parentName:"td"},"/Foo")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," are different routes. When disabled, ",(0,r.kt)("inlineCode",{parentName:"td"},"/Foo"),"and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," are treated the same."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ColorScheme"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/blob/master/color.go"},(0,r.kt)("inlineCode",{parentName:"a"},"Colors"))),(0,r.kt)("td",{parentName:"tr",align:null},"You can define custom color scheme. They'll be used for startup message, route list and some middlewares."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/blob/master/color.go"},(0,r.kt)("inlineCode",{parentName:"a"},"DefaultColors")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CompressedFileSuffix"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds a suffix to the original file name and tries saving the resulting compressed file under the new file name."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'".fiber.gz"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Concurrency"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"Maximum number of concurrent connections."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"256 * 1024"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableDefaultContentType"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true, causes the default Content-Type header to be excluded from the Response."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableDefaultDate"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true causes the default date header to be excluded from the response."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableHeaderNormalizing"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"By default all header names are normalized: conteNT-tYPE -",">"," Content-Type"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableKeepalive"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Disable keep-alive connections, the server will close incoming connections after sending the first response to the client"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisablePreParseMultipartForm"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Will not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableStartupMessage"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true, it will not print out debug information"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ETag"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Enable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method ","(","CRC-32",")",". Weak ETags are the default when enabled."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"EnableIPValidation"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"If set to true, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IPs()")," will validate IP addresses before returning them. Also, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," will return only the first valid IP rather than just the raw header value that may be a comma seperated string.",(0,r.kt)("br",null),(0,r.kt)("br",null),(0,r.kt)("strong",{parentName:"td"},"WARNING:")," There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"EnablePrintRoutes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"EnablePrintRoutes enables print all routes with their method, path, name and handler.."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"EnableTrustedProxyCheck"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true, fiber will check whether proxy is trusted, using TrustedProxies list. ",(0,r.kt)("br",null),(0,r.kt)("br",null),"By default ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Protocol()")," will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," will get value from ",(0,r.kt)("inlineCode",{parentName:"td"},"ProxyHeader")," header, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Hostname()")," will get value from X-Forwarded-Host header. ",(0,r.kt)("br",null)," If ",(0,r.kt)("inlineCode",{parentName:"td"},"EnableTrustedProxyCheck")," is true, and ",(0,r.kt)("inlineCode",{parentName:"td"},"RemoteIP")," is in the list of ",(0,r.kt)("inlineCode",{parentName:"td"},"TrustedProxies")," ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Protocol()"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()"),", and ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Hostname()")," will have the same behaviour when ",(0,r.kt)("inlineCode",{parentName:"td"},"EnableTrustedProxyCheck")," disabled, if ",(0,r.kt)("inlineCode",{parentName:"td"},"RemoteIP")," isn't in the list, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Protocol()")," will return https in case when tls connection is handled by the app, or http otherwise, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," will return RemoteIP() from fasthttp context, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Hostname()")," will return ",(0,r.kt)("inlineCode",{parentName:"td"},"fasthttp.Request.URI().Host()")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ErrorHandler"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"ErrorHandler")),(0,r.kt)("td",{parentName:"tr",align:null},"ErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"DefaultErrorHandler"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"GETOnly"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Rejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"IdleTimeout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,r.kt)("td",{parentName:"tr",align:null},"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."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Immutable"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue ",(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/issues/185"},"#","185"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"JSONDecoder"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"utils.JSONUnmarshal")),(0,r.kt)("td",{parentName:"tr",align:null},"Allowing for flexibility in using another json library for decoding."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"json.Unmarshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"JSONEncoder"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"utils.JSONMarshal")),(0,r.kt)("td",{parentName:"tr",align:null},"Allowing for flexibility in using another json library for encoding."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"json.Marshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Network"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},'Known networks are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only)',(0,r.kt)("br",null),(0,r.kt)("br",null),(0,r.kt)("strong",{parentName:"td"},"WARNING:"),' When prefork is set to true, only "tcp4" and "tcp6" can be chosen.'),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"NetworkTCP4"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"PassLocalsToViews"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"PassLocalsToViews Enables passing of the locals set on a fiber.Ctx to the template engine. See our ",(0,r.kt)("strong",{parentName:"td"},"Template Middleware")," for supported engines."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Prefork"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Enables use of the",(0,r.kt)("a",{parentName:"td",href:"https://lwn.net/Articles/542629/"},(0,r.kt)("inlineCode",{parentName:"a"},"SO_REUSEPORT")),"socket option. This will spawn multiple Go processes listening on the same port. learn more about ",(0,r.kt)("a",{parentName:"td",href:"https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/"},"socket sharding"),". ",(0,r.kt)("strong",{parentName:"td"},"NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with ",(0,r.kt)("inlineCode",{parentName:"strong"},"CMD ./app")," or ",(0,r.kt)("inlineCode",{parentName:"strong"},'CMD ["sh", "-c", "/app"]'),". For more info, see")," ",(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/issues/1021#issuecomment-730537971"},(0,r.kt)("strong",{parentName:"a"},"this"))," ",(0,r.kt)("strong",{parentName:"td"},"issue comment.")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ProxyHeader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"This will enable ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," to return the value of the given header key. By default ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()"),"will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. ",(0,r.kt)("em",{parentName:"td"},"X-Forwarded-","*"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ReadBufferSize"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"per-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers ","(","for example, BIG cookies",")","."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"4096"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ReadTimeout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,r.kt)("td",{parentName:"tr",align:null},"The amount of time allowed to read the full request, including the body. The default timeout is unlimited."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"RequestMethods"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]string")),(0,r.kt)("td",{parentName:"tr",align:null},"RequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"DefaultMethods"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ServerHeader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"Enables the ",(0,r.kt)("inlineCode",{parentName:"td"},"Server")," HTTP header with the given value."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"StreamRequestBody"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"StreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"StrictRouting"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When enabled, the router treats ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo/")," as different. Otherwise, the router treats ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo/")," as the same."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"TrustedProxies"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]string")),(0,r.kt)("td",{parentName:"tr",align:null},"Contains the list of trusted proxy IP's. Look at ",(0,r.kt)("inlineCode",{parentName:"td"},"EnableTrustedProxyCheck")," doc. ",(0,r.kt)("br",null)," ",(0,r.kt)("br",null)," It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]string*__*"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"UnescapePath"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Converts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special characters"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Views"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Views")),(0,r.kt)("td",{parentName:"tr",align:null},"Views is the interface that wraps the Render function. See our ",(0,r.kt)("strong",{parentName:"td"},"Template Middleware")," for supported engines."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ViewsLayout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"Views Layout is the global layout for all template render until override on Render function. See our ",(0,r.kt)("strong",{parentName:"td"},"Template Middleware")," for supported engines."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"WriteBufferSize"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"Per-connection buffer size for responses' writing."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"4096"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"WriteTimeout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,r.kt)("td",{parentName:"tr",align:null},"The maximum duration before timing out writes of the response. The default timeout is unlimited."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"XMLEncoder"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"utils.XMLMarshal")),(0,r.kt)("td",{parentName:"tr",align:null},"Allowing for flexibility in using another XML library for encoding."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"xml.Marshal"))))),(0,r.kt)("h2",{id:"newerror"},"NewError"),(0,r.kt)("p",null,"NewError creates a new HTTPError instance with an optional message."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func NewError(code int, message ...string) *Error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return fiber.NewError(782, "Custom error message")\n})\n')),(0,r.kt)("h2",{id:"ischild"},"IsChild"),(0,r.kt)("p",null,"IsChild determines if the current process is a result of Prefork."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func IsChild() bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Prefork will spawn child processes\napp := fiber.New(fiber.Config{\n Prefork: true,\n})\n\nif !fiber.IsChild() {\n fmt.Println("I\'m the parent process")\n} else {\n fmt.Println("I\'m a child process")\n}\n\n// ...\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[542],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>N});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),p=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=p(e.components);return a.createElement(d.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),s=p(n),k=r,N=s["".concat(d,".").concat(k)]||s[k]||u[k]||l;return n?a.createElement(N,i(i({ref:t},m),{},{components:n})):a.createElement(N,i({ref:t},m))}));function N(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=k;var o={};for(var d in t)hasOwnProperty.call(t,d)&&(o[d]=t[d]);o.originalType=e,o[s]="string"==typeof e?e:r,i[1]=o;for(var p=2;p<l;p++)i[p]=n[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}k.displayName="MDXCreateElement"},61130:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const l={id:"fiber",title:"\ud83d\udce6 Fiber",description:"Fiber represents the fiber package where you start to create an instance.",sidebar_position:1},i=void 0,o={unversionedId:"api/fiber",id:"api/fiber",title:"\ud83d\udce6 Fiber",description:"Fiber represents the fiber package where you start to create an instance.",source:"@site/docs/core/api/fiber.md",sourceDirName:"api",slug:"/api/fiber",permalink:"/next/api/fiber",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/fiber.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{id:"fiber",title:"\ud83d\udce6 Fiber",description:"Fiber represents the fiber package where you start to create an instance.",sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"API",permalink:"/next/category/api"},next:{title:"\ud83d\ude80 App",permalink:"/next/api/app"}},d={},p=[{value:"New",id:"new",level:2},{value:"Config",id:"config",level:2},{value:"NewError",id:"newerror",level:2},{value:"IsChild",id:"ischild",level:2}],m={toc:p},s="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(s,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"new"},"New"),(0,r.kt)("p",null,"This method creates a new ",(0,r.kt)("strong",{parentName:"p"},"App")," named instance. You can pass optional ",(0,r.kt)("a",{parentName:"p",href:"#config"},"config "),"when creating a new instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func New(config ...Config) *App\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"// Default config\napp := fiber.New()\n\n// ...\n")),(0,r.kt)("h2",{id:"config"},"Config"),(0,r.kt)("p",null,"You can pass an optional Config when creating a new Fiber instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Custom config\napp := fiber.New(fiber.Config{\n Prefork: true,\n CaseSensitive: true,\n StrictRouting: true,\n ServerHeader: "Fiber",\n AppName: "Test App v1.0.1",\n})\n\n// ...\n')),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Config fields")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Property"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"AppName"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"This allows to setup app name for the app"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"BodyLimit"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"Sets the maximum allowed size for a request body, if the size exceeds the configured limit, it sends ",(0,r.kt)("inlineCode",{parentName:"td"},"413 - Request Entity Too Large")," response."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"4 * 1024 * 1024"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CaseSensitive"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When enabled, ",(0,r.kt)("inlineCode",{parentName:"td"},"/Foo")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," are different routes. When disabled, ",(0,r.kt)("inlineCode",{parentName:"td"},"/Foo"),"and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," are treated the same."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ColorScheme"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/blob/master/color.go"},(0,r.kt)("inlineCode",{parentName:"a"},"Colors"))),(0,r.kt)("td",{parentName:"tr",align:null},"You can define custom color scheme. They'll be used for startup message, route list and some middlewares."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/blob/master/color.go"},(0,r.kt)("inlineCode",{parentName:"a"},"DefaultColors")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CompressedFileSuffix"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds a suffix to the original file name and tries saving the resulting compressed file under the new file name."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'".fiber.gz"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Concurrency"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"Maximum number of concurrent connections."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"256 * 1024"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableDefaultContentType"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true, causes the default Content-Type header to be excluded from the Response."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableDefaultDate"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true causes the default date header to be excluded from the response."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableHeaderNormalizing"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"By default all header names are normalized: conteNT-tYPE -",">"," Content-Type"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableKeepalive"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Disable keep-alive connections, the server will close incoming connections after sending the first response to the client"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisablePreParseMultipartForm"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Will not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableStartupMessage"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true, it will not print out debug information"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ETag"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Enable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method ","(","CRC-32",")",". Weak ETags are the default when enabled."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"EnableIPValidation"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"If set to true, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IPs()")," will validate IP addresses before returning them. Also, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," will return only the first valid IP rather than just the raw header value that may be a comma seperated string.",(0,r.kt)("br",null),(0,r.kt)("br",null),(0,r.kt)("strong",{parentName:"td"},"WARNING:")," There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"EnablePrintRoutes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"EnablePrintRoutes enables print all routes with their method, path, name and handler.."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"EnableTrustedProxyCheck"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true, fiber will check whether proxy is trusted, using TrustedProxies list. ",(0,r.kt)("br",null),(0,r.kt)("br",null),"By default ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Protocol()")," will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," will get value from ",(0,r.kt)("inlineCode",{parentName:"td"},"ProxyHeader")," header, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Hostname()")," will get value from X-Forwarded-Host header. ",(0,r.kt)("br",null)," If ",(0,r.kt)("inlineCode",{parentName:"td"},"EnableTrustedProxyCheck")," is true, and ",(0,r.kt)("inlineCode",{parentName:"td"},"RemoteIP")," is in the list of ",(0,r.kt)("inlineCode",{parentName:"td"},"TrustedProxies")," ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Protocol()"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()"),", and ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Hostname()")," will have the same behaviour when ",(0,r.kt)("inlineCode",{parentName:"td"},"EnableTrustedProxyCheck")," disabled, if ",(0,r.kt)("inlineCode",{parentName:"td"},"RemoteIP")," isn't in the list, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Protocol()")," will return https in case when tls connection is handled by the app, or http otherwise, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," will return RemoteIP() from fasthttp context, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Hostname()")," will return ",(0,r.kt)("inlineCode",{parentName:"td"},"fasthttp.Request.URI().Host()")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ErrorHandler"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"ErrorHandler")),(0,r.kt)("td",{parentName:"tr",align:null},"ErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"DefaultErrorHandler"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"GETOnly"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Rejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"IdleTimeout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,r.kt)("td",{parentName:"tr",align:null},"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."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Immutable"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue ",(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/issues/185"},"#","185"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"JSONDecoder"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"utils.JSONUnmarshal")),(0,r.kt)("td",{parentName:"tr",align:null},"Allowing for flexibility in using another json library for decoding."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"json.Unmarshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"JSONEncoder"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"utils.JSONMarshal")),(0,r.kt)("td",{parentName:"tr",align:null},"Allowing for flexibility in using another json library for encoding."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"json.Marshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Network"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},'Known networks are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only)',(0,r.kt)("br",null),(0,r.kt)("br",null),(0,r.kt)("strong",{parentName:"td"},"WARNING:"),' When prefork is set to true, only "tcp4" and "tcp6" can be chosen.'),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"NetworkTCP4"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"PassLocalsToViews"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"PassLocalsToViews Enables passing of the locals set on a fiber.Ctx to the template engine. See our ",(0,r.kt)("strong",{parentName:"td"},"Template Middleware")," for supported engines."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Prefork"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Enables use of the",(0,r.kt)("a",{parentName:"td",href:"https://lwn.net/Articles/542629/"},(0,r.kt)("inlineCode",{parentName:"a"},"SO_REUSEPORT")),"socket option. This will spawn multiple Go processes listening on the same port. learn more about ",(0,r.kt)("a",{parentName:"td",href:"https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/"},"socket sharding"),". ",(0,r.kt)("strong",{parentName:"td"},"NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with ",(0,r.kt)("inlineCode",{parentName:"strong"},"CMD ./app")," or ",(0,r.kt)("inlineCode",{parentName:"strong"},'CMD ["sh", "-c", "/app"]'),". For more info, see")," ",(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/issues/1021#issuecomment-730537971"},(0,r.kt)("strong",{parentName:"a"},"this"))," ",(0,r.kt)("strong",{parentName:"td"},"issue comment.")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ProxyHeader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"This will enable ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," to return the value of the given header key. By default ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()"),"will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. ",(0,r.kt)("em",{parentName:"td"},"X-Forwarded-","*"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ReadBufferSize"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"per-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers ","(","for example, BIG cookies",")","."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"4096"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ReadTimeout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,r.kt)("td",{parentName:"tr",align:null},"The amount of time allowed to read the full request, including the body. The default timeout is unlimited."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"RequestMethods"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]string")),(0,r.kt)("td",{parentName:"tr",align:null},"RequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"DefaultMethods"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ServerHeader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"Enables the ",(0,r.kt)("inlineCode",{parentName:"td"},"Server")," HTTP header with the given value."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"StreamRequestBody"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"StreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"StrictRouting"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When enabled, the router treats ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo/")," as different. Otherwise, the router treats ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo/")," as the same."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"TrustedProxies"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]string")),(0,r.kt)("td",{parentName:"tr",align:null},"Contains the list of trusted proxy IP's. Look at ",(0,r.kt)("inlineCode",{parentName:"td"},"EnableTrustedProxyCheck")," doc. ",(0,r.kt)("br",null)," ",(0,r.kt)("br",null)," It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]string*__*"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"UnescapePath"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Converts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special characters"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Views"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Views")),(0,r.kt)("td",{parentName:"tr",align:null},"Views is the interface that wraps the Render function. See our ",(0,r.kt)("strong",{parentName:"td"},"Template Middleware")," for supported engines."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ViewsLayout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"Views Layout is the global layout for all template render until override on Render function. See our ",(0,r.kt)("strong",{parentName:"td"},"Template Middleware")," for supported engines."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"WriteBufferSize"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"Per-connection buffer size for responses' writing."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"4096"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"WriteTimeout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,r.kt)("td",{parentName:"tr",align:null},"The maximum duration before timing out writes of the response. The default timeout is unlimited."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"XMLEncoder"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"utils.XMLMarshal")),(0,r.kt)("td",{parentName:"tr",align:null},"Allowing for flexibility in using another XML library for encoding."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"xml.Marshal"))))),(0,r.kt)("h2",{id:"newerror"},"NewError"),(0,r.kt)("p",null,"NewError creates a new HTTPError instance with an optional message."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func NewError(code int, message ...string) *Error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return fiber.NewError(782, "Custom error message")\n})\n')),(0,r.kt)("h2",{id:"ischild"},"IsChild"),(0,r.kt)("p",null,"IsChild determines if the current process is a result of Prefork."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func IsChild() bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Prefork will spawn child processes\napp := fiber.New(fiber.Config{\n Prefork: true,\n})\n\nif !fiber.IsChild() {\n fmt.Println("I\'m the parent process")\n} else {\n fmt.Println("I\'m a child process")\n}\n\n// ...\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/70bddfb7.e85d5ddc.js b/assets/js/70bddfb7.e85d5ddc.js deleted file mode 100644 index b4ad7fc1160..00000000000 --- a/assets/js/70bddfb7.e85d5ddc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[542],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>N});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),p=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=p(e.components);return a.createElement(d.Provider,{value:t},e.children)},s="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),s=p(n),k=r,N=s["".concat(d,".").concat(k)]||s[k]||u[k]||l;return n?a.createElement(N,i(i({ref:t},m),{},{components:n})):a.createElement(N,i({ref:t},m))}));function N(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,i=new Array(l);i[0]=k;var o={};for(var d in t)hasOwnProperty.call(t,d)&&(o[d]=t[d]);o.originalType=e,o[s]="string"==typeof e?e:r,i[1]=o;for(var p=2;p<l;p++)i[p]=n[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}k.displayName="MDXCreateElement"},1130:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var a=n(7462),r=(n(7294),n(3905));const l={id:"fiber",title:"\ud83d\udce6 Fiber",description:"Fiber represents the fiber package where you start to create an instance.",sidebar_position:1},i=void 0,o={unversionedId:"api/fiber",id:"api/fiber",title:"\ud83d\udce6 Fiber",description:"Fiber represents the fiber package where you start to create an instance.",source:"@site/docs/core/api/fiber.md",sourceDirName:"api",slug:"/api/fiber",permalink:"/next/api/fiber",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/fiber.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:1,frontMatter:{id:"fiber",title:"\ud83d\udce6 Fiber",description:"Fiber represents the fiber package where you start to create an instance.",sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"API",permalink:"/next/category/api"},next:{title:"\ud83d\ude80 App",permalink:"/next/api/app"}},d={},p=[{value:"New",id:"new",level:2},{value:"Config",id:"config",level:2},{value:"NewError",id:"newerror",level:2},{value:"IsChild",id:"ischild",level:2}],m={toc:p},s="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(s,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"new"},"New"),(0,r.kt)("p",null,"This method creates a new ",(0,r.kt)("strong",{parentName:"p"},"App")," named instance. You can pass optional ",(0,r.kt)("a",{parentName:"p",href:"#config"},"config "),"when creating a new instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func New(config ...Config) *App\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},"// Default config\napp := fiber.New()\n\n// ...\n")),(0,r.kt)("h2",{id:"config"},"Config"),(0,r.kt)("p",null,"You can pass an optional Config when creating a new Fiber instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Custom config\napp := fiber.New(fiber.Config{\n Prefork: true,\n CaseSensitive: true,\n StrictRouting: true,\n ServerHeader: "Fiber",\n AppName: "Test App v1.0.1",\n})\n\n// ...\n')),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Config fields")),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Property"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"AppName"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"This allows to setup app name for the app"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"BodyLimit"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"Sets the maximum allowed size for a request body, if the size exceeds the configured limit, it sends ",(0,r.kt)("inlineCode",{parentName:"td"},"413 - Request Entity Too Large")," response."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"4 * 1024 * 1024"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CaseSensitive"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When enabled, ",(0,r.kt)("inlineCode",{parentName:"td"},"/Foo")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," are different routes. When disabled, ",(0,r.kt)("inlineCode",{parentName:"td"},"/Foo"),"and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," are treated the same."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ColorScheme"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/blob/master/color.go"},(0,r.kt)("inlineCode",{parentName:"a"},"Colors"))),(0,r.kt)("td",{parentName:"tr",align:null},"You can define custom color scheme. They'll be used for startup message, route list and some middlewares."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/blob/master/color.go"},(0,r.kt)("inlineCode",{parentName:"a"},"DefaultColors")))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"CompressedFileSuffix"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds a suffix to the original file name and tries saving the resulting compressed file under the new file name."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'".fiber.gz"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Concurrency"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"Maximum number of concurrent connections."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"256 * 1024"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableDefaultContentType"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true, causes the default Content-Type header to be excluded from the Response."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableDefaultDate"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true causes the default date header to be excluded from the response."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableHeaderNormalizing"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"By default all header names are normalized: conteNT-tYPE -",">"," Content-Type"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableKeepalive"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Disable keep-alive connections, the server will close incoming connections after sending the first response to the client"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisablePreParseMultipartForm"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Will not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DisableStartupMessage"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true, it will not print out debug information"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ETag"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Enable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method ","(","CRC-32",")",". Weak ETags are the default when enabled."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"EnableIPValidation"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"If set to true, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IPs()")," will validate IP addresses before returning them. Also, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," will return only the first valid IP rather than just the raw header value that may be a comma seperated string.",(0,r.kt)("br",null),(0,r.kt)("br",null),(0,r.kt)("strong",{parentName:"td"},"WARNING:")," There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"EnablePrintRoutes"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"EnablePrintRoutes enables print all routes with their method, path, name and handler.."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"EnableTrustedProxyCheck"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When set to true, fiber will check whether proxy is trusted, using TrustedProxies list. ",(0,r.kt)("br",null),(0,r.kt)("br",null),"By default ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Protocol()")," will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," will get value from ",(0,r.kt)("inlineCode",{parentName:"td"},"ProxyHeader")," header, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Hostname()")," will get value from X-Forwarded-Host header. ",(0,r.kt)("br",null)," If ",(0,r.kt)("inlineCode",{parentName:"td"},"EnableTrustedProxyCheck")," is true, and ",(0,r.kt)("inlineCode",{parentName:"td"},"RemoteIP")," is in the list of ",(0,r.kt)("inlineCode",{parentName:"td"},"TrustedProxies")," ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Protocol()"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()"),", and ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Hostname()")," will have the same behaviour when ",(0,r.kt)("inlineCode",{parentName:"td"},"EnableTrustedProxyCheck")," disabled, if ",(0,r.kt)("inlineCode",{parentName:"td"},"RemoteIP")," isn't in the list, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Protocol()")," will return https in case when tls connection is handled by the app, or http otherwise, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," will return RemoteIP() from fasthttp context, ",(0,r.kt)("inlineCode",{parentName:"td"},"c.Hostname()")," will return ",(0,r.kt)("inlineCode",{parentName:"td"},"fasthttp.Request.URI().Host()")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ErrorHandler"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"ErrorHandler")),(0,r.kt)("td",{parentName:"tr",align:null},"ErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"DefaultErrorHandler"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"GETOnly"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Rejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"IdleTimeout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,r.kt)("td",{parentName:"tr",align:null},"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."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Immutable"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue ",(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/issues/185"},"#","185"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"JSONDecoder"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"utils.JSONUnmarshal")),(0,r.kt)("td",{parentName:"tr",align:null},"Allowing for flexibility in using another json library for decoding."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"json.Unmarshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"JSONEncoder"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"utils.JSONMarshal")),(0,r.kt)("td",{parentName:"tr",align:null},"Allowing for flexibility in using another json library for encoding."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"json.Marshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Network"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},'Known networks are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only)',(0,r.kt)("br",null),(0,r.kt)("br",null),(0,r.kt)("strong",{parentName:"td"},"WARNING:"),' When prefork is set to true, only "tcp4" and "tcp6" can be chosen.'),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"NetworkTCP4"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"PassLocalsToViews"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"PassLocalsToViews Enables passing of the locals set on a fiber.Ctx to the template engine. See our ",(0,r.kt)("strong",{parentName:"td"},"Template Middleware")," for supported engines."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Prefork"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Enables use of the",(0,r.kt)("a",{parentName:"td",href:"https://lwn.net/Articles/542629/"},(0,r.kt)("inlineCode",{parentName:"a"},"SO_REUSEPORT")),"socket option. This will spawn multiple Go processes listening on the same port. learn more about ",(0,r.kt)("a",{parentName:"td",href:"https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/"},"socket sharding"),". ",(0,r.kt)("strong",{parentName:"td"},"NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with ",(0,r.kt)("inlineCode",{parentName:"strong"},"CMD ./app")," or ",(0,r.kt)("inlineCode",{parentName:"strong"},'CMD ["sh", "-c", "/app"]'),". For more info, see")," ",(0,r.kt)("a",{parentName:"td",href:"https://github.com/gofiber/fiber/issues/1021#issuecomment-730537971"},(0,r.kt)("strong",{parentName:"a"},"this"))," ",(0,r.kt)("strong",{parentName:"td"},"issue comment.")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ProxyHeader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"This will enable ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()")," to return the value of the given header key. By default ",(0,r.kt)("inlineCode",{parentName:"td"},"c.IP()"),"will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. ",(0,r.kt)("em",{parentName:"td"},"X-Forwarded-","*"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ReadBufferSize"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"per-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers ","(","for example, BIG cookies",")","."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"4096"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ReadTimeout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,r.kt)("td",{parentName:"tr",align:null},"The amount of time allowed to read the full request, including the body. The default timeout is unlimited."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"RequestMethods"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]string")),(0,r.kt)("td",{parentName:"tr",align:null},"RequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"DefaultMethods"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ServerHeader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"Enables the ",(0,r.kt)("inlineCode",{parentName:"td"},"Server")," HTTP header with the given value."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"StreamRequestBody"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"StreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"StrictRouting"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"When enabled, the router treats ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo/")," as different. Otherwise, the router treats ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo")," and ",(0,r.kt)("inlineCode",{parentName:"td"},"/foo/")," as the same."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"TrustedProxies"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]string")),(0,r.kt)("td",{parentName:"tr",align:null},"Contains the list of trusted proxy IP's. Look at ",(0,r.kt)("inlineCode",{parentName:"td"},"EnableTrustedProxyCheck")," doc. ",(0,r.kt)("br",null)," ",(0,r.kt)("br",null)," It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]string*__*"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"UnescapePath"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"bool")),(0,r.kt)("td",{parentName:"tr",align:null},"Converts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special characters"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"false"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Views"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Views")),(0,r.kt)("td",{parentName:"tr",align:null},"Views is the interface that wraps the Render function. See our ",(0,r.kt)("strong",{parentName:"td"},"Template Middleware")," for supported engines."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"ViewsLayout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"Views Layout is the global layout for all template render until override on Render function. See our ",(0,r.kt)("strong",{parentName:"td"},"Template Middleware")," for supported engines."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'""'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"WriteBufferSize"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"int")),(0,r.kt)("td",{parentName:"tr",align:null},"Per-connection buffer size for responses' writing."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"4096"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"WriteTimeout"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"time.Duration")),(0,r.kt)("td",{parentName:"tr",align:null},"The maximum duration before timing out writes of the response. The default timeout is unlimited."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"XMLEncoder"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"utils.XMLMarshal")),(0,r.kt)("td",{parentName:"tr",align:null},"Allowing for flexibility in using another XML library for encoding."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"xml.Marshal"))))),(0,r.kt)("h2",{id:"newerror"},"NewError"),(0,r.kt)("p",null,"NewError creates a new HTTPError instance with an optional message."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func NewError(code int, message ...string) *Error\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'app.Get("/", func(c *fiber.Ctx) error {\n return fiber.NewError(782, "Custom error message")\n})\n')),(0,r.kt)("h2",{id:"ischild"},"IsChild"),(0,r.kt)("p",null,"IsChild determines if the current process is a result of Prefork."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Signature"',title:'"Signature"'},"func IsChild() bool\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go",metastring:'title="Example"',title:'"Example"'},'// Prefork will spawn child processes\napp := fiber.New(fiber.Config{\n Prefork: true,\n})\n\nif !fiber.IsChild() {\n fmt.Println("I\'m the parent process")\n} else {\n fmt.Println("I\'m a child process")\n}\n\n// ...\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/70e71bef.99f29036.js b/assets/js/70e71bef.99f29036.js deleted file mode 100644 index 290ada5af59..00000000000 --- a/assets/js/70e71bef.99f29036.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1222],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=m(r),g=a,f=c["".concat(s,".").concat(g)]||c[g]||u[g]||o;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var m=2;m<o;m++)i[m]=r[m];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}g.displayName="MDXCreateElement"},9338:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(7462),a=(r(7294),r(3905));const o={id:"memory",title:"Memory"},i=void 0,l={unversionedId:"memory/memory",id:"version-sqlite3_v1.x.x/memory/memory",title:"Memory",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/memory/README.md",sourceDirName:"memory",slug:"/memory/",permalink:"/storage/sqlite3_v1.x.x/memory/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memory/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memory",title:"Memory"},sidebar:"tutorialSidebar",previous:{title:"Memcache",permalink:"/storage/sqlite3_v1.x.x/memcache/"},next:{title:"MongoDB",permalink:"/storage/sqlite3_v1.x.x/mongodb/"}},s={},m=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:m},c="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memory*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"An in-memory storage driver."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() map[string]entry\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Memory is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,a.kt)("p",null,"And then install the memory implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memory"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := memory.New()\n\n// Initialize custom config\nstore := memory.New(memory.Config{\n GCInterval: 10 * time.Second,\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Time before deleting expired keys\n //\n // Default is 10 * time.Second\n GCInterval time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n GCInterval: 10 * time.Second,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/70e71bef.9ad84559.js b/assets/js/70e71bef.9ad84559.js new file mode 100644 index 00000000000..58eb736ded2 --- /dev/null +++ b/assets/js/70e71bef.9ad84559.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[1222],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),m=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=m(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=m(r),g=a,f=c["".concat(s,".").concat(g)]||c[g]||u[g]||o;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var m=2;m<o;m++)i[m]=r[m];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}g.displayName="MDXCreateElement"},99338:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>m});var n=r(87462),a=(r(67294),r(3905));const o={id:"memory",title:"Memory"},i=void 0,l={unversionedId:"memory/memory",id:"version-sqlite3_v1.x.x/memory/memory",title:"Memory",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/memory/README.md",sourceDirName:"memory",slug:"/memory/",permalink:"/storage/sqlite3_v1.x.x/memory/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memory/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memory",title:"Memory"},sidebar:"tutorialSidebar",previous:{title:"Memcache",permalink:"/storage/sqlite3_v1.x.x/memcache/"},next:{title:"MongoDB",permalink:"/storage/sqlite3_v1.x.x/mongodb/"}},s={},m=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:m},c="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memory*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memory.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"An in-memory storage driver."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() map[string]entry\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Memory is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,a.kt)("p",null,"And then install the memory implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memory"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"// Initialize default config\nstore := memory.New()\n\n// Initialize custom config\nstore := memory.New(memory.Config{\n GCInterval: 10 * time.Second,\n})\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Time before deleting expired keys\n //\n // Default is 10 * time.Second\n GCInterval time.Duration\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"var ConfigDefault = Config{\n GCInterval: 10 * time.Second,\n}\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/71353d04.2257d31b.js b/assets/js/71353d04.2257d31b.js deleted file mode 100644 index 7fabbcf03f3..00000000000 --- a/assets/js/71353d04.2257d31b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6321],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),g=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=g(e.components);return o.createElement(s.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=g(n),m=r,f=u["".concat(s,".").concat(m)]||u[m]||p[m]||a;return n?o.createElement(f,i(i({ref:t},c),{},{components:n})):o.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var g=2;g<a;g++)i[g]=n[g];return o.createElement.apply(null,i)}return o.createElement.apply(null,n)}m.displayName="MDXCreateElement"},154:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>l,toc:()=>g});var o=n(7462),r=(n(7294),n(3905));const a={id:"mongodb",title:"MongoDB"},i=void 0,l={unversionedId:"mongodb/mongodb",id:"version-memcache_v1.x.x/mongodb/mongodb",title:"MongoDB",description:"Release",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/mongodb/README.md",sourceDirName:"mongodb",slug:"/mongodb/",permalink:"/storage/mongodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mongodb/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mongodb",title:"MongoDB"},sidebar:"tutorialSidebar",previous:{title:"Memory",permalink:"/storage/memory/"},next:{title:"MSSQL",permalink:"/storage/mssql/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:g},u="wrapper";function p(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,o.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mongodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MongoDB storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/mongodb/mongo-go-driver"},"mongodb/mongo-go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mongo.Database\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MongoDB is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,r.kt)("p",null,"And then install the mongodb implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mongodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mongodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mongodb.New()\n\n// Initialize custom config\nstore := mongodb.New(mongodb.Config{\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n// Initialize custom config using connection string\nstore := mongodb.New(mongodb.Config{\n ConnectionURI: "mongodb://user:password@127.0.0.1:27017",\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 27017\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n}\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/71353d04.3f3e1fc6.js b/assets/js/71353d04.3f3e1fc6.js new file mode 100644 index 00000000000..bad81ac3912 --- /dev/null +++ b/assets/js/71353d04.3f3e1fc6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6321],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),g=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=g(e.components);return o.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},p=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=g(n),p=r,f=m["".concat(s,".").concat(p)]||m[p]||u[p]||a;return n?o.createElement(f,i(i({ref:t},c),{},{components:n})):o.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=p;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[m]="string"==typeof e?e:r,i[1]=l;for(var g=2;g<a;g++)i[g]=n[g];return o.createElement.apply(null,i)}return o.createElement.apply(null,n)}p.displayName="MDXCreateElement"},70154:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>g});var o=n(87462),r=(n(67294),n(3905));const a={id:"mongodb",title:"MongoDB"},i=void 0,l={unversionedId:"mongodb/mongodb",id:"version-memcache_v1.x.x/mongodb/mongodb",title:"MongoDB",description:"Release",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/mongodb/README.md",sourceDirName:"mongodb",slug:"/mongodb/",permalink:"/storage/memcache_v1.x.x/mongodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/mongodb/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"mongodb",title:"MongoDB"},sidebar:"tutorialSidebar",previous:{title:"Memory",permalink:"/storage/memcache_v1.x.x/memory/"},next:{title:"MSSQL",permalink:"/storage/memcache_v1.x.x/mssql/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:g},m="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,o.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=mongodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-mongodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A MongoDB storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/mongodb/mongo-go-driver"},"mongodb/mongo-go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mongo.Database\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"MongoDB is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,r.kt)("p",null,"And then install the mongodb implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/mongodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/mongodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := mongodb.New()\n\n// Initialize custom config\nstore := mongodb.New(mongodb.Config{\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n// Initialize custom config using connection string\nstore := mongodb.New(mongodb.Config{\n ConnectionURI: "mongodb://user:password@127.0.0.1:27017",\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n})\n\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 27017\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 27017,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/714b2cfa.ca9f83a1.js b/assets/js/714b2cfa.ca9f83a1.js deleted file mode 100644 index f9c266b44f3..00000000000 --- a/assets/js/714b2cfa.ca9f83a1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2119],{3905:(e,t,n)=>{n.d(t,{Zo:()=>f,kt:()=>g});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),d=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},f=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,f=l(e,["components","mdxType","originalType","parentName"]),s=d(n),u=a,g=s["".concat(p,".").concat(u)]||s[u]||c[u]||i;return n?r.createElement(g,o(o({ref:t},f),{},{components:n})):r.createElement(g,o({ref:t},f))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[s]="string"==typeof e?e:a,o[1]=l;for(var d=2;d<i;d++)o[d]=n[d];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}u.displayName="MDXCreateElement"},9797:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var r=n(7462),a=(n(7294),n(3905));const i={id:"opafiber",title:"Opafiber"},o=void 0,l={unversionedId:"opafiber/opafiber",id:"version-fiberzerolog_v0.x.x/opafiber/opafiber",title:"Opafiber",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/opafiber/README.md",sourceDirName:"opafiber",slug:"/opafiber/",permalink:"/contrib/opafiber/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/opafiber/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"opafiber",title:"Opafiber"},sidebar:"tutorialSidebar",previous:{title:"JWT",permalink:"/contrib/jwt/"},next:{title:"Otelfiber",permalink:"/contrib/otelfiber/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Types",id:"types",level:3},{value:"Usage",id:"usage",level:3}],f={toc:d},s="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=opafiber*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/open-policy-agent/opa"},"Open Policy Agent")," support for Fiber."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note: Requires Go 1.18 and above")),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/opafiber\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"opafiber.New(config opafiber.Config) fiber.Handler\n\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"RegoQuery"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Required - Rego query"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"RegoPolicy"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"io.Reader")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Required - Rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"IncludeQueryString"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Include query string as input to rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"false"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"DeniedStatusCode"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"int")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Http status code to return when policy denies request"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"400"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"DeniedResponseMessage"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Http response body text to return when policy denies request"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'""'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"IncludeHeaders"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Include headers as input to rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"InputCreationMethod"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"InputCreationFunc")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Use your own function to provide input for OPA"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)"))))),(0,a.kt)("h3",{id:"types"},"Types"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)\n")),(0,a.kt)("h3",{id:"usage"},"Usage"),(0,a.kt)("p",null,"OPA Fiber middleware sends the following example data to the policy engine as input:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "method": "GET",\n "path": "/somePath",\n "query": {\n "name": ["John Doe"]\n },\n "headers": {\n "Accept": "application/json",\n "Content-Type": "application/json"\n }\n}\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/opafiber"\n)\n\nfunc main() {\n app := fiber.New()\n module := `\npackage example.authz\n\ndefault allow := false\n\nallow {\n input.method == "GET"\n}\n`\n\n cfg := opafiber.Config{\n RegoQuery: "data.example.authz.allow",\n RegoPolicy: bytes.NewBufferString(module),\n IncludeQueryString: true,\n DeniedStatusCode: fiber.StatusForbidden,\n DeniedResponseMessage: "status forbidden",\n IncludeHeaders: []string{"Authorization"},\n InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {\n return map[string]interface{}{\n "method": ctx.Method(),\n "path": ctx.Path(),\n }, nil\n },\n }\n app.Use(opafiber.New(cfg))\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendStatus(200)\n })\n\n app.Listen(":8080")\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/714b2cfa.dd76fe33.js b/assets/js/714b2cfa.dd76fe33.js new file mode 100644 index 00000000000..d704d5c5631 --- /dev/null +++ b/assets/js/714b2cfa.dd76fe33.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2119],{3905:(e,t,n)=>{n.d(t,{Zo:()=>f,kt:()=>g});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),d=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},f=function(e){var t=d(e.components);return r.createElement(p.Provider,{value:t},e.children)},s="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,f=l(e,["components","mdxType","originalType","parentName"]),s=d(n),u=a,g=s["".concat(p,".").concat(u)]||s[u]||c[u]||i;return n?r.createElement(g,o(o({ref:t},f),{},{components:n})):r.createElement(g,o({ref:t},f))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=u;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[s]="string"==typeof e?e:a,o[1]=l;for(var d=2;d<i;d++)o[d]=n[d];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}u.displayName="MDXCreateElement"},79797:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var r=n(87462),a=(n(67294),n(3905));const i={id:"opafiber",title:"Opafiber"},o=void 0,l={unversionedId:"opafiber/opafiber",id:"version-fiberzerolog_v0.x.x/opafiber/opafiber",title:"Opafiber",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/opafiber/README.md",sourceDirName:"opafiber",slug:"/opafiber/",permalink:"/contrib/opafiber/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/opafiber/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"opafiber",title:"Opafiber"},sidebar:"tutorialSidebar",previous:{title:"JWT",permalink:"/contrib/jwt/"},next:{title:"Otelfiber",permalink:"/contrib/otelfiber/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Types",id:"types",level:3},{value:"Usage",id:"usage",level:3}],f={toc:d},s="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=opafiber*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/open-policy-agent/opa"},"Open Policy Agent")," support for Fiber."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Note: Requires Go 1.18 and above")),(0,a.kt)("h3",{id:"install"},"Install"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/opafiber\n")),(0,a.kt)("h3",{id:"signature"},"Signature"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"opafiber.New(config opafiber.Config) fiber.Handler\n\n")),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:"left"},"Property"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Description"),(0,a.kt)("th",{parentName:"tr",align:"left"},"Default"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"RegoQuery"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Required - Rego query"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"RegoPolicy"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"io.Reader")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Required - Rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"IncludeQueryString"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"bool")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Include query string as input to rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"false"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"DeniedStatusCode"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"int")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Http status code to return when policy denies request"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"400"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"DeniedResponseMessage"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Http response body text to return when policy denies request"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},'""'))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"IncludeHeaders"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"[]string")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Include headers as input to rego policy"),(0,a.kt)("td",{parentName:"tr",align:"left"},"-")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:"left"},"InputCreationMethod"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"InputCreationFunc")),(0,a.kt)("td",{parentName:"tr",align:"left"},"Use your own function to provide input for OPA"),(0,a.kt)("td",{parentName:"tr",align:"left"},(0,a.kt)("inlineCode",{parentName:"td"},"func defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)"))))),(0,a.kt)("h3",{id:"types"},"Types"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)\n")),(0,a.kt)("h3",{id:"usage"},"Usage"),(0,a.kt)("p",null,"OPA Fiber middleware sends the following example data to the policy engine as input:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "method": "GET",\n "path": "/somePath",\n "query": {\n "name": ["John Doe"]\n },\n "headers": {\n "Accept": "application/json",\n "Content-Type": "application/json"\n }\n}\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/opafiber"\n)\n\nfunc main() {\n app := fiber.New()\n module := `\npackage example.authz\n\ndefault allow := false\n\nallow {\n input.method == "GET"\n}\n`\n\n cfg := opafiber.Config{\n RegoQuery: "data.example.authz.allow",\n RegoPolicy: bytes.NewBufferString(module),\n IncludeQueryString: true,\n DeniedStatusCode: fiber.StatusForbidden,\n DeniedResponseMessage: "status forbidden",\n IncludeHeaders: []string{"Authorization"},\n InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {\n return map[string]interface{}{\n "method": ctx.Method(),\n "path": ctx.Path(),\n }, nil\n },\n }\n app.Use(opafiber.New(cfg))\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendStatus(200)\n })\n\n app.Listen(":8080")\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/71ec47b0.071274b5.js b/assets/js/71ec47b0.071274b5.js new file mode 100644 index 00000000000..89ddb4e8b0e --- /dev/null +++ b/assets/js/71ec47b0.071274b5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8541],{16963:e=>{e.exports=JSON.parse('{"pluginId":"contrib","version":"fibersentry_v1.x.x","label":"fibersentry_v1.x.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-fibersentry_v1.x.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/contrib/fibersentry_v1.x.x/","docId":"README"},{"type":"link","label":"Casbin","href":"/contrib/fibersentry_v1.x.x/casbin/","docId":"casbin/casbin"},{"type":"link","label":"Fiberi18n","href":"/contrib/fibersentry_v1.x.x/fiberi18n/","docId":"fiberi18n/fiberi18n"},{"type":"link","label":"Fibernewrelic","href":"/contrib/fibersentry_v1.x.x/fibernewrelic/","docId":"fibernewrelic/fibernewrelic"},{"type":"link","label":"Fibersentry","href":"/contrib/fibersentry_v1.x.x/fibersentry/","docId":"fibersentry/fibersentry"},{"type":"link","label":"Fiberzap","href":"/contrib/fibersentry_v1.x.x/fiberzap/","docId":"fiberzap/fiberzap"},{"type":"link","label":"Fiberzerolog","href":"/contrib/fibersentry_v1.x.x/fiberzerolog/","docId":"fiberzerolog/fiberzerolog"},{"type":"link","label":"JWT","href":"/contrib/fibersentry_v1.x.x/jwt/","docId":"jwt/jwt"},{"type":"link","label":"Opafiber","href":"/contrib/fibersentry_v1.x.x/opafiber/","docId":"opafiber/opafiber"},{"type":"category","label":"Otelfiber","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Example","href":"/contrib/fibersentry_v1.x.x/otelfiber/example/","docId":"otelfiber/example/otelfiber-example"}],"href":"/contrib/fibersentry_v1.x.x/otelfiber/"},{"type":"link","label":"Paseto","href":"/contrib/fibersentry_v1.x.x/paseto/","docId":"paseto/paseto"},{"type":"link","label":"Swagger","href":"/contrib/fibersentry_v1.x.x/swagger/","docId":"swagger/swagger"},{"type":"link","label":"Websocket","href":"/contrib/fibersentry_v1.x.x/websocket/","docId":"websocket/websocket"}]},"docs":{"casbin/casbin":{"id":"casbin/casbin","title":"Casbin","description":"Release","sidebar":"tutorialSidebar"},"fiberi18n/fiberi18n":{"id":"fiberi18n/fiberi18n","title":"Fiberi18n","description":"Release","sidebar":"tutorialSidebar"},"fibernewrelic/fibernewrelic":{"id":"fibernewrelic/fibernewrelic","title":"Fibernewrelic","description":"Release","sidebar":"tutorialSidebar"},"fibersentry/fibersentry":{"id":"fibersentry/fibersentry","title":"Fibersentry","description":"Release","sidebar":"tutorialSidebar"},"fiberzap/fiberzap":{"id":"fiberzap/fiberzap","title":"Fiberzap","description":"Release","sidebar":"tutorialSidebar"},"fiberzerolog/fiberzerolog":{"id":"fiberzerolog/fiberzerolog","title":"Fiberzerolog","description":"Release","sidebar":"tutorialSidebar"},"jwt/jwt":{"id":"jwt/jwt","title":"JWT","description":"Release","sidebar":"tutorialSidebar"},"opafiber/opafiber":{"id":"opafiber/opafiber","title":"Opafiber","description":"Release","sidebar":"tutorialSidebar"},"otelfiber/example/otelfiber-example":{"id":"otelfiber/example/otelfiber-example","title":"Example","description":"An HTTP server using gofiber fiber and instrumentation. The server has a","sidebar":"tutorialSidebar"},"otelfiber/otelfiber":{"id":"otelfiber/otelfiber","title":"Otelfiber","description":"Release","sidebar":"tutorialSidebar"},"paseto/paseto":{"id":"paseto/paseto","title":"Paseto","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"Discord","sidebar":"tutorialSidebar"},"swagger/swagger":{"id":"swagger/swagger","title":"Swagger","description":"Release","sidebar":"tutorialSidebar"},"websocket/websocket":{"id":"websocket/websocket","title":"Websocket","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/71ec47b0.118d4fda.js b/assets/js/71ec47b0.118d4fda.js deleted file mode 100644 index df5784b16cf..00000000000 --- a/assets/js/71ec47b0.118d4fda.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[8541],{6963:e=>{e.exports=JSON.parse('{"pluginId":"contrib","version":"fibersentry_v1.x.x","label":"fibersentry_v1.x.x","banner":"unmaintained","badge":true,"noIndex":false,"className":"docs-version-fibersentry_v1.x.x","isLast":false,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"\ud83d\udc4b Welcome","href":"/contrib/fibersentry_v1.x.x/","docId":"README"},{"type":"link","label":"Casbin","href":"/contrib/fibersentry_v1.x.x/casbin/","docId":"casbin/casbin"},{"type":"link","label":"Fiberi18n","href":"/contrib/fibersentry_v1.x.x/fiberi18n/","docId":"fiberi18n/fiberi18n"},{"type":"link","label":"Fibernewrelic","href":"/contrib/fibersentry_v1.x.x/fibernewrelic/","docId":"fibernewrelic/fibernewrelic"},{"type":"link","label":"Fibersentry","href":"/contrib/fibersentry_v1.x.x/fibersentry/","docId":"fibersentry/fibersentry"},{"type":"link","label":"Fiberzap","href":"/contrib/fibersentry_v1.x.x/fiberzap/","docId":"fiberzap/fiberzap"},{"type":"link","label":"Fiberzerolog","href":"/contrib/fibersentry_v1.x.x/fiberzerolog/","docId":"fiberzerolog/fiberzerolog"},{"type":"link","label":"JWT","href":"/contrib/fibersentry_v1.x.x/jwt/","docId":"jwt/jwt"},{"type":"link","label":"Opafiber","href":"/contrib/fibersentry_v1.x.x/opafiber/","docId":"opafiber/opafiber"},{"type":"category","label":"Otelfiber","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Example","href":"/contrib/fibersentry_v1.x.x/otelfiber/example/","docId":"otelfiber/example/otelfiber-example"}],"href":"/contrib/fibersentry_v1.x.x/otelfiber/"},{"type":"link","label":"Paseto","href":"/contrib/fibersentry_v1.x.x/paseto/","docId":"paseto/paseto"},{"type":"link","label":"Swagger","href":"/contrib/fibersentry_v1.x.x/swagger/","docId":"swagger/swagger"},{"type":"link","label":"Websocket","href":"/contrib/fibersentry_v1.x.x/websocket/","docId":"websocket/websocket"}]},"docs":{"casbin/casbin":{"id":"casbin/casbin","title":"Casbin","description":"Release","sidebar":"tutorialSidebar"},"fiberi18n/fiberi18n":{"id":"fiberi18n/fiberi18n","title":"Fiberi18n","description":"Release","sidebar":"tutorialSidebar"},"fibernewrelic/fibernewrelic":{"id":"fibernewrelic/fibernewrelic","title":"Fibernewrelic","description":"Release","sidebar":"tutorialSidebar"},"fibersentry/fibersentry":{"id":"fibersentry/fibersentry","title":"Fibersentry","description":"Release","sidebar":"tutorialSidebar"},"fiberzap/fiberzap":{"id":"fiberzap/fiberzap","title":"Fiberzap","description":"Release","sidebar":"tutorialSidebar"},"fiberzerolog/fiberzerolog":{"id":"fiberzerolog/fiberzerolog","title":"Fiberzerolog","description":"Release","sidebar":"tutorialSidebar"},"jwt/jwt":{"id":"jwt/jwt","title":"JWT","description":"Release","sidebar":"tutorialSidebar"},"opafiber/opafiber":{"id":"opafiber/opafiber","title":"Opafiber","description":"Release","sidebar":"tutorialSidebar"},"otelfiber/example/otelfiber-example":{"id":"otelfiber/example/otelfiber-example","title":"Example","description":"An HTTP server using gofiber fiber and instrumentation. The server has a","sidebar":"tutorialSidebar"},"otelfiber/otelfiber":{"id":"otelfiber/otelfiber","title":"Otelfiber","description":"Release","sidebar":"tutorialSidebar"},"paseto/paseto":{"id":"paseto/paseto","title":"Paseto","description":"Release","sidebar":"tutorialSidebar"},"README":{"id":"README","title":"\ud83d\udc4b Welcome","description":"Discord","sidebar":"tutorialSidebar"},"swagger/swagger":{"id":"swagger/swagger","title":"Swagger","description":"Release","sidebar":"tutorialSidebar"},"websocket/websocket":{"id":"websocket/websocket","title":"Websocket","description":"Release","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/7242dd7d.cf15d5e9.js b/assets/js/7242dd7d.cf15d5e9.js new file mode 100644 index 00000000000..b51255699eb --- /dev/null +++ b/assets/js/7242dd7d.cf15d5e9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7480],{3905:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>f});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},m=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),p=c(r),g=n,f=p["".concat(s,".").concat(g)]||p[g]||u[g]||o;return r?a.createElement(f,i(i({ref:t},m),{},{components:r})):a.createElement(f,i({ref:t},m))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,i[1]=l;for(var c=2;c<o;c++)i[c]=r[c];return a.createElement.apply(null,i)}return a.createElement.apply(null,r)}g.displayName="MDXCreateElement"},38362:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=r(87462),n=(r(67294),r(3905));const o={id:"memcache",title:"Memcache"},i=void 0,l={unversionedId:"memcache/memcache",id:"version-bbolt_v1.x.x/memcache/memcache",title:"Memcache",description:"Release",source:"@site/storage_versioned_docs/version-bbolt_v1.x.x/memcache/README.md",sourceDirName:"memcache",slug:"/memcache/",permalink:"/storage/memcache/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memcache/README.md",tags:[],version:"bbolt_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memcache",title:"Memcache"},sidebar:"tutorialSidebar",previous:{title:"Etcd",permalink:"/storage/etcd/"},next:{title:"Memory",permalink:"/storage/memory/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],m={toc:c},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memcache*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?label=Tests",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,n.kt)("p",null,"A Memcache storage driver using ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/bradfitz/gomemcache"},(0,n.kt)("inlineCode",{parentName:"a"},"bradfitz/gomemcache")),"."),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mc.Client\n")),(0,n.kt)("h3",{id:"installation"},"Installation"),(0,n.kt)("p",null,"Memory is tested on the 2 last ",(0,n.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,n.kt)("p",null,"And then install the memory implementation:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the storage package."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memcache"\n')),(0,n.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := memcache.New()\n\n// Initialize custom config\nstore := memcache.New(memcache.Config{\n Servers: "localhost:11211",\n})\n')),(0,n.kt)("h3",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Server list divided by ,\n // i.e. server1:11211, server2:11212\n //\n // Optional. Default is "127.0.0.1:11211"\n Servers string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Servers: "127.0.0.1:11211",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7304b5d2.69e155e8.js b/assets/js/7304b5d2.69e155e8.js deleted file mode 100644 index b4ab391d589..00000000000 --- a/assets/js/7304b5d2.69e155e8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3878],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),d=a,f=u["".concat(s,".").concat(d)]||u[d]||g[d]||i;return n?r.createElement(f,o(o({ref:t},p),{},{components:n})):r.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var c=2;c<i;c++)o[c]=n[c];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},8611:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=n(7462),a=(n(7294),n(3905));const i={id:"etcd",title:"Etcd"},o=void 0,l={unversionedId:"etcd/etcd",id:"version-sqlite3_v1.x.x/etcd/etcd",title:"Etcd",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/etcd/README.md",sourceDirName:"etcd",slug:"/etcd/",permalink:"/storage/sqlite3_v1.x.x/etcd/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/etcd/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"etcd",title:"Etcd"},sidebar:"tutorialSidebar",previous:{title:"DynamoDB",permalink:"/storage/sqlite3_v1.x.x/dynamodb/"},next:{title:"Memcache",permalink:"/storage/sqlite3_v1.x.x/memcache/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:c},u="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=etcd*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Etcd storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/etcd-io/etcd"},(0,a.kt)("inlineCode",{parentName:"a"},"etcd-io/etcd")),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) *Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *clientv3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Etcd is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,a.kt)("p",null,"And then install the etcd implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/etcd\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/etcd"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := etcd.New()\n\n// Initialize custom config\nstore := etcd.New(Config{\n Endpoints: []string{"localhost:2379"},\n})\n\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Endpoints is a list of URLs.\n Endpoints []string\n // DialTimeout is the timeout for failing to establish a connection.\n DialTimeout time.Duration\n // Username is a username for authentication.\n Username string\n // Password is a password for authentication.\n Password string\n // TLS holds the client secure credentials, if any.\n TLS *tls.Config\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Endpoints: []string{"localhost:2379"},\n DialTimeout: 2 * time.Second,\n Username: "",\n Password: "",\n TLS: nil,\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7304b5d2.7ef2bbf8.js b/assets/js/7304b5d2.7ef2bbf8.js new file mode 100644 index 00000000000..c1b88fedc02 --- /dev/null +++ b/assets/js/7304b5d2.7ef2bbf8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[3878],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),d=a,f=u["".concat(s,".").concat(d)]||u[d]||g[d]||i;return n?r.createElement(f,o(o({ref:t},p),{},{components:n})):r.createElement(f,o({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var c=2;c<i;c++)o[c]=n[c];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},18611:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));const i={id:"etcd",title:"Etcd"},o=void 0,l={unversionedId:"etcd/etcd",id:"version-sqlite3_v1.x.x/etcd/etcd",title:"Etcd",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/etcd/README.md",sourceDirName:"etcd",slug:"/etcd/",permalink:"/storage/sqlite3_v1.x.x/etcd/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/etcd/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"etcd",title:"Etcd"},sidebar:"tutorialSidebar",previous:{title:"DynamoDB",permalink:"/storage/sqlite3_v1.x.x/dynamodb/"},next:{title:"Memcache",permalink:"/storage/sqlite3_v1.x.x/memcache/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:c},u="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=etcd*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-etcd.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Etcd storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/etcd-io/etcd"},(0,a.kt)("inlineCode",{parentName:"a"},"etcd-io/etcd")),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) *Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *clientv3.Client\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Etcd is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,a.kt)("p",null,"And then install the etcd implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/etcd\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/etcd"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := etcd.New()\n\n// Initialize custom config\nstore := etcd.New(Config{\n Endpoints: []string{"localhost:2379"},\n})\n\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"type Config struct {\n // Endpoints is a list of URLs.\n Endpoints []string\n // DialTimeout is the timeout for failing to establish a connection.\n DialTimeout time.Duration\n // Username is a username for authentication.\n Username string\n // Password is a password for authentication.\n Password string\n // TLS holds the client secure credentials, if any.\n TLS *tls.Config\n}\n")),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Endpoints: []string{"localhost:2379"},\n DialTimeout: 2 * time.Second,\n Username: "",\n Password: "",\n TLS: nil,\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7307607e.86ea5d55.js b/assets/js/7307607e.86ea5d55.js new file mode 100644 index 00000000000..557404273d1 --- /dev/null +++ b/assets/js/7307607e.86ea5d55.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9310],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var n=r(67294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),d=s(r),f=i,m=d["".concat(l,".").concat(f)]||d[f]||u[f]||a;return r?n.createElement(m,o(o({ref:t},c),{},{components:r})):n.createElement(m,o({ref:t},c))}));function m(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=f;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[d]="string"==typeof e?e:i,o[1]=p;for(var s=2;s<a;s++)o[s]=r[s];return n.createElement.apply(null,o)}return n.createElement.apply(null,r)}f.displayName="MDXCreateElement"},21540:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>p,toc:()=>s});var n=r(87462),i=(r(67294),r(3905));const a={id:"skip",title:"Skip"},o=void 0,p={unversionedId:"api/middleware/skip",id:"api/middleware/skip",title:"Skip",description:"Skip middleware for Fiber that skips a wrapped handler if a predicate is true.",source:"@site/docs/core/api/middleware/skip.md",sourceDirName:"api/middleware",slug:"/api/middleware/skip",permalink:"/next/api/middleware/skip",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/skip.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"skip",title:"Skip"},sidebar:"tutorialSidebar",previous:{title:"Session",permalink:"/next/api/middleware/session"},next:{title:"Timeout",permalink:"/next/api/middleware/timeout"}},l={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2}],c={toc:s},d="wrapper";function u(e){let{components:t,...r}=e;return(0,i.kt)(d,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Skip middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that skips a wrapped handler if a predicate is true."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/skip"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool {\n return ctx.Method() == fiber.MethodGet\n }))\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendString("It was a GET request!")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\nfunc BasicHandler(ctx *fiber.Ctx) error {\n return ctx.SendString("It was not a GET request!")\n}\n')),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7307607e.99cf9262.js b/assets/js/7307607e.99cf9262.js deleted file mode 100644 index 83ab6cd97cf..00000000000 --- a/assets/js/7307607e.99cf9262.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9310],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},c=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),d=s(r),f=i,m=d["".concat(l,".").concat(f)]||d[f]||u[f]||a;return r?n.createElement(m,o(o({ref:t},c),{},{components:r})):n.createElement(m,o({ref:t},c))}));function m(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=f;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p[d]="string"==typeof e?e:i,o[1]=p;for(var s=2;s<a;s++)o[s]=r[s];return n.createElement.apply(null,o)}return n.createElement.apply(null,r)}f.displayName="MDXCreateElement"},1540:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>p,toc:()=>s});var n=r(7462),i=(r(7294),r(3905));const a={id:"skip",title:"Skip"},o=void 0,p={unversionedId:"api/middleware/skip",id:"api/middleware/skip",title:"Skip",description:"Skip middleware for Fiber that skips a wrapped handler if a predicate is true.",source:"@site/docs/core/api/middleware/skip.md",sourceDirName:"api/middleware",slug:"/api/middleware/skip",permalink:"/next/api/middleware/skip",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/api/middleware/skip.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"skip",title:"Skip"},sidebar:"tutorialSidebar",previous:{title:"Session",permalink:"/next/api/middleware/session"},next:{title:"Timeout",permalink:"/next/api/middleware/timeout"}},l={},s=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2}],c={toc:s},d="wrapper";function u(e){let{components:t,...r}=e;return(0,i.kt)(d,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Skip middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that skips a wrapped handler if a predicate is true."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/skip"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'func main() {\n app := fiber.New()\n\n app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool {\n return ctx.Method() == fiber.MethodGet\n }))\n\n app.Get("/", func(ctx *fiber.Ctx) error {\n return ctx.SendString("It was a GET request!")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\nfunc BasicHandler(ctx *fiber.Ctx) error {\n return ctx.SendString("It was not a GET request!")\n}\n')),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/73b0bf71.1ad3de8e.js b/assets/js/73b0bf71.1ad3de8e.js new file mode 100644 index 00000000000..d14c1bf7fc5 --- /dev/null +++ b/assets/js/73b0bf71.1ad3de8e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[784],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function p(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?s(Object(a),!0).forEach((function(t){n(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):s(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function i(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},s=Object.keys(e);for(r=0;r<s.length;r++)a=s[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),l=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):p(p({},t),e)),a},c=function(e){var t=l(e.components);return r.createElement(o.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,s=e.originalType,o=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=l(a),g=n,h=m["".concat(o,".").concat(g)]||m[g]||d[g]||s;return a?r.createElement(h,p(p({ref:t},c),{},{components:a})):r.createElement(h,p({ref:t},c))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var s=a.length,p=new Array(s);p[0]=g;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[m]="string"==typeof e?e:n,p[1]=i;for(var l=2;l<s;l++)p[l]=a[l];return r.createElement.apply(null,p)}return r.createElement.apply(null,a)}g.displayName="MDXCreateElement"},89595:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>p,default:()=>d,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var r=a(87462),n=(a(67294),a(3905));const s={id:"benchmarks",title:"\ud83d\udcca Benchmarks",description:"These benchmarks aim to compare the performance of Fiber and other web frameworks.",sidebar_position:2},p=void 0,i={unversionedId:"extra/benchmarks",id:"extra/benchmarks",title:"\ud83d\udcca Benchmarks",description:"These benchmarks aim to compare the performance of Fiber and other web frameworks.",source:"@site/docs/core/extra/benchmarks.md",sourceDirName:"extra",slug:"/extra/benchmarks",permalink:"/next/extra/benchmarks",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/extra/benchmarks.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:2,frontMatter:{id:"benchmarks",title:"\ud83d\udcca Benchmarks",description:"These benchmarks aim to compare the performance of Fiber and other web frameworks.",sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"\ud83e\udd14 FAQ",permalink:"/next/extra/faq"}},o={},l=[{value:"TechEmpower",id:"techempower",level:2},{value:"Plaintext",id:"plaintext",level:3},{value:"Data Updates",id:"data-updates",level:3},{value:"Multiple Queries",id:"multiple-queries",level:3},{value:"Single Query",id:"single-query",level:3},{value:"JSON Serialization",id:"json-serialization",level:3},{value:"Go web framework benchmark",id:"go-web-framework-benchmark",level:2}],c={toc:l},m="wrapper";function d(e){let{components:t,...s}=e;return(0,n.kt)(m,(0,r.Z)({},c,s,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"techempower"},"TechEmpower"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=composite"},"TechEmpower")," provides a performance comparison of many web application frameworks executing fundamental tasks such as JSON serialization, database access, and server-side template composition."),(0,n.kt)("p",null,"Each framework is operating in a realistic production configuration. Results are captured on cloud instances and on physical hardware. The test implementations are largely community-contributed and all source is available at the ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/TechEmpower/FrameworkBenchmarks"},"GitHub repository"),"."),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Fiber ",(0,n.kt)("inlineCode",{parentName:"li"},"v1.10.0")),(0,n.kt)("li",{parentName:"ul"},"28 HT Cores Intel","(","R",")"," Xeon","(","R",")"," Gold 5120 CPU @ 2.20GHz"),(0,n.kt)("li",{parentName:"ul"},"32GB RAM"),(0,n.kt)("li",{parentName:"ul"},"Ubuntu 18.04.3 4.15.0-88-generic"),(0,n.kt)("li",{parentName:"ul"},"Dedicated Cisco 10-Gbit Ethernet switch.")),(0,n.kt)("h3",{id:"plaintext"},"Plaintext"),(0,n.kt)("p",null,"The Plaintext test is an exercise of the request-routing fundamentals only, designed to demonstrate the capacity of high-performance platforms in particular. Requests will be sent using HTTP pipelining. The response payload is still small, meaning good performance is still necessary in order to saturate the gigabit Ethernet of the test environment."),(0,n.kt)("p",null,"See ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#single-database-query"},"Plaintext requirements")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Fiber")," - ",(0,n.kt)("strong",{parentName:"p"},"6,162,556")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"2.0")," ms.",(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Express")," - ",(0,n.kt)("strong",{parentName:"p"},"367,069")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"354.1")," ms."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(82137).Z,width:"1130",height:"473"})),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Fiber vs Express",src:a(7093).Z,width:"1130",height:"179"})),(0,n.kt)("h3",{id:"data-updates"},"Data Updates"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Fiber")," handled ",(0,n.kt)("strong",{parentName:"p"},"11,846")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"42.8")," ms.",(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Express")," handled ",(0,n.kt)("strong",{parentName:"p"},"2,066")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"390.44")," ms."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(76551).Z,width:"1132",height:"727"})),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Fiber vs Express",src:a(87792).Z,width:"1130",height:"243"})),(0,n.kt)("h3",{id:"multiple-queries"},"Multiple Queries"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Fiber")," handled ",(0,n.kt)("strong",{parentName:"p"},"19,664")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"25.7")," ms.",(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Express")," handled ",(0,n.kt)("strong",{parentName:"p"},"4,302")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"117.2")," ms."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(2600).Z,width:"1131",height:"746"})),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Fiber vs Express",src:a(31146).Z,width:"1131",height:"242"})),(0,n.kt)("h3",{id:"single-query"},"Single Query"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Fiber")," handled ",(0,n.kt)("strong",{parentName:"p"},"368,647")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"0.7")," ms.",(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Express")," handled ",(0,n.kt)("strong",{parentName:"p"},"57,880")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"4.4")," ms."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(66802).Z,width:"1131",height:"746"})),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Fiber vs Express",src:a(92256).Z,width:"1129",height:"241"})),(0,n.kt)("h3",{id:"json-serialization"},"JSON Serialization"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Fiber")," handled ",(0,n.kt)("strong",{parentName:"p"},"1,146,667")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"0.4")," ms.",(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Express")," handled ",(0,n.kt)("strong",{parentName:"p"},"244,847")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"1.1")," ms."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(7960).Z,width:"1131",height:"601"})),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Fiber vs Express",src:a(23316).Z,width:"1129",height:"179"})),(0,n.kt)("h2",{id:"go-web-framework-benchmark"},"Go web framework benchmark"),(0,n.kt)("p",null,"\ud83d\udd17 ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/smallnest/go-web-framework-benchmark"},"https://github.com/smallnest/go-web-framework-benchmark")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"CPU")," Intel","(","R",")"," Xeon","(","R",")"," Gold 6140 CPU @ 2.30GHz"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"MEM")," 4GB"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"GO")," go1.13.6 linux/amd64"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"OS")," Linux")),(0,n.kt)("p",null,"The first test case is to mock ",(0,n.kt)("strong",{parentName:"p"},"0 ms"),", ",(0,n.kt)("strong",{parentName:"p"},"10 ms"),", ",(0,n.kt)("strong",{parentName:"p"},"100 ms"),", ",(0,n.kt)("strong",{parentName:"p"},"500 ms")," processing time in handlers."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(8281).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"The concurrency clients are ",(0,n.kt)("strong",{parentName:"p"},"5000"),"."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(28132).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"Latency is the time of real processing time by web servers. ",(0,n.kt)("em",{parentName:"p"},"The smaller is the better.")),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(78248).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"Allocs is the heap allocations by web servers when test is running. The unit is MB. ",(0,n.kt)("em",{parentName:"p"},"The smaller is the better.")),(0,n.kt)("p",null,"If we enable ",(0,n.kt)("strong",{parentName:"p"},"http pipelining"),", test result as below:"),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(23065).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"Concurrency test in ",(0,n.kt)("strong",{parentName:"p"},"30 ms")," processing time, the test result for ",(0,n.kt)("strong",{parentName:"p"},"100"),", ",(0,n.kt)("strong",{parentName:"p"},"1000"),", ",(0,n.kt)("strong",{parentName:"p"},"5000")," clients is:"),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(88767).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(31652).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(96235).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"If we enable ",(0,n.kt)("strong",{parentName:"p"},"http pipelining"),", test result as below:"),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(9951).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"Dependency graph for ",(0,n.kt)("inlineCode",{parentName:"p"},"v1.9.0")),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(93209).Z,width:"1307",height:"520"})))}d.isMDXComponent=!0},23065:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/benchmark-pipeline-b49cbb1db36293acdfb0e6c96d844e1a.png"},8281:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/benchmark-18e23fcf42afc7f5e12ea23aceb27885.png"},78248:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/benchmark_alloc-dec96faa96e07bcec84f40a4dfc8d187.png"},28132:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/benchmark_latency-b67a470cf1b261c3092b80cbf42ef16b.png"},9951:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/concurrency-pipeline-b0d3c211d9c7cb5474fd191223a41241.png"},88767:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/concurrency-1307e1d23c01a561a4b2a0f5bdd7e1bc.png"},96235:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/concurrency_alloc-6f2d485576803f7de2fe0a1deca21a09.png"},31652:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/concurrency_latency-5a223848a8bee8df21cc02451f0db2b6.png"},76551:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/data_updates-3be85c418d6971091854c5086af9ed10.png"},87792:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/data_updates_express-2f55d1b0975ec391d29d823b48faf617.png"},93209:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/graph-afbd400b1c3e1c6f137dae3cfc1890ce.svg"},7960:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/json-62868f61b34e3790f3a8b3b52b1a3a3b.png"},23316:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/json_express-aa631b2de86808970aa4bb7c9c9d3edf.png"},2600:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/multiple_queries-2c2e81674208b90b9aeb1cb791a3f0dc.png"},31146:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/multiple_queries_express-ec4dc8013e85dc2a2fa4f5eeb55ce8dd.png"},82137:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/plaintext-e25d187f782d18fdd35b84e3d7c625eb.png"},7093:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/plaintext_express-ef6522843412bb5b14b3c6b6a4f032de.png"},66802:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/single_query-4f7782d3c3ff91e92ac27e382b09f6ac.png"},92256:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/single_query_express-d8e41422b4f5c0a9496272e4a66a97c4.png"}}]); \ No newline at end of file diff --git a/assets/js/73b0bf71.d1189f2f.js b/assets/js/73b0bf71.d1189f2f.js deleted file mode 100644 index ed79208cf75..00000000000 --- a/assets/js/73b0bf71.d1189f2f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[784],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var r=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function p(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?s(Object(a),!0).forEach((function(t){n(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):s(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function i(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},s=Object.keys(e);for(r=0;r<s.length;r++)a=s[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),l=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):p(p({},t),e)),a},c=function(e){var t=l(e.components);return r.createElement(o.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,s=e.originalType,o=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=l(a),g=n,h=m["".concat(o,".").concat(g)]||m[g]||d[g]||s;return a?r.createElement(h,p(p({ref:t},c),{},{components:a})):r.createElement(h,p({ref:t},c))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var s=a.length,p=new Array(s);p[0]=g;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[m]="string"==typeof e?e:n,p[1]=i;for(var l=2;l<s;l++)p[l]=a[l];return r.createElement.apply(null,p)}return r.createElement.apply(null,a)}g.displayName="MDXCreateElement"},9595:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>p,default:()=>d,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var r=a(7462),n=(a(7294),a(3905));const s={id:"benchmarks",title:"\ud83d\udcca Benchmarks",description:"These benchmarks aim to compare the performance of Fiber and other web frameworks.",sidebar_position:2},p=void 0,i={unversionedId:"extra/benchmarks",id:"extra/benchmarks",title:"\ud83d\udcca Benchmarks",description:"These benchmarks aim to compare the performance of Fiber and other web frameworks.",source:"@site/docs/core/extra/benchmarks.md",sourceDirName:"extra",slug:"/extra/benchmarks",permalink:"/next/extra/benchmarks",draft:!1,editUrl:"https://github.com/gofiber/fiber/edit/master/docs/extra/benchmarks.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",sidebarPosition:2,frontMatter:{id:"benchmarks",title:"\ud83d\udcca Benchmarks",description:"These benchmarks aim to compare the performance of Fiber and other web frameworks.",sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"\ud83e\udd14 FAQ",permalink:"/next/extra/faq"}},o={},l=[{value:"TechEmpower",id:"techempower",level:2},{value:"Plaintext",id:"plaintext",level:3},{value:"Data Updates",id:"data-updates",level:3},{value:"Multiple Queries",id:"multiple-queries",level:3},{value:"Single Query",id:"single-query",level:3},{value:"JSON Serialization",id:"json-serialization",level:3},{value:"Go web framework benchmark",id:"go-web-framework-benchmark",level:2}],c={toc:l},m="wrapper";function d(e){let{components:t,...s}=e;return(0,n.kt)(m,(0,r.Z)({},c,s,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"techempower"},"TechEmpower"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=composite"},"TechEmpower")," provides a performance comparison of many web application frameworks executing fundamental tasks such as JSON serialization, database access, and server-side template composition."),(0,n.kt)("p",null,"Each framework is operating in a realistic production configuration. Results are captured on cloud instances and on physical hardware. The test implementations are largely community-contributed and all source is available at the ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/TechEmpower/FrameworkBenchmarks"},"GitHub repository"),"."),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Fiber ",(0,n.kt)("inlineCode",{parentName:"li"},"v1.10.0")),(0,n.kt)("li",{parentName:"ul"},"28 HT Cores Intel","(","R",")"," Xeon","(","R",")"," Gold 5120 CPU @ 2.20GHz"),(0,n.kt)("li",{parentName:"ul"},"32GB RAM"),(0,n.kt)("li",{parentName:"ul"},"Ubuntu 18.04.3 4.15.0-88-generic"),(0,n.kt)("li",{parentName:"ul"},"Dedicated Cisco 10-Gbit Ethernet switch.")),(0,n.kt)("h3",{id:"plaintext"},"Plaintext"),(0,n.kt)("p",null,"The Plaintext test is an exercise of the request-routing fundamentals only, designed to demonstrate the capacity of high-performance platforms in particular. Requests will be sent using HTTP pipelining. The response payload is still small, meaning good performance is still necessary in order to saturate the gigabit Ethernet of the test environment."),(0,n.kt)("p",null,"See ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#single-database-query"},"Plaintext requirements")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Fiber")," - ",(0,n.kt)("strong",{parentName:"p"},"6,162,556")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"2.0")," ms.",(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Express")," - ",(0,n.kt)("strong",{parentName:"p"},"367,069")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"354.1")," ms."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(2137).Z,width:"1130",height:"473"})),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Fiber vs Express",src:a(7093).Z,width:"1130",height:"179"})),(0,n.kt)("h3",{id:"data-updates"},"Data Updates"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Fiber")," handled ",(0,n.kt)("strong",{parentName:"p"},"11,846")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"42.8")," ms.",(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Express")," handled ",(0,n.kt)("strong",{parentName:"p"},"2,066")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"390.44")," ms."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(6551).Z,width:"1132",height:"727"})),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Fiber vs Express",src:a(7792).Z,width:"1130",height:"243"})),(0,n.kt)("h3",{id:"multiple-queries"},"Multiple Queries"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Fiber")," handled ",(0,n.kt)("strong",{parentName:"p"},"19,664")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"25.7")," ms.",(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Express")," handled ",(0,n.kt)("strong",{parentName:"p"},"4,302")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"117.2")," ms."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(2600).Z,width:"1131",height:"746"})),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Fiber vs Express",src:a(1146).Z,width:"1131",height:"242"})),(0,n.kt)("h3",{id:"single-query"},"Single Query"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Fiber")," handled ",(0,n.kt)("strong",{parentName:"p"},"368,647")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"0.7")," ms.",(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Express")," handled ",(0,n.kt)("strong",{parentName:"p"},"57,880")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"4.4")," ms."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(6802).Z,width:"1131",height:"746"})),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Fiber vs Express",src:a(2256).Z,width:"1129",height:"241"})),(0,n.kt)("h3",{id:"json-serialization"},"JSON Serialization"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Fiber")," handled ",(0,n.kt)("strong",{parentName:"p"},"1,146,667")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"0.4")," ms.",(0,n.kt)("br",{parentName:"p"}),"\n",(0,n.kt)("strong",{parentName:"p"},"Express")," handled ",(0,n.kt)("strong",{parentName:"p"},"244,847")," responses per second with an average latency of ",(0,n.kt)("strong",{parentName:"p"},"1.1")," ms."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(7960).Z,width:"1131",height:"601"})),(0,n.kt)("p",null,(0,n.kt)("img",{alt:"Fiber vs Express",src:a(3316).Z,width:"1129",height:"179"})),(0,n.kt)("h2",{id:"go-web-framework-benchmark"},"Go web framework benchmark"),(0,n.kt)("p",null,"\ud83d\udd17 ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/smallnest/go-web-framework-benchmark"},"https://github.com/smallnest/go-web-framework-benchmark")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"CPU")," Intel","(","R",")"," Xeon","(","R",")"," Gold 6140 CPU @ 2.30GHz"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"MEM")," 4GB"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"GO")," go1.13.6 linux/amd64"),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"OS")," Linux")),(0,n.kt)("p",null,"The first test case is to mock ",(0,n.kt)("strong",{parentName:"p"},"0 ms"),", ",(0,n.kt)("strong",{parentName:"p"},"10 ms"),", ",(0,n.kt)("strong",{parentName:"p"},"100 ms"),", ",(0,n.kt)("strong",{parentName:"p"},"500 ms")," processing time in handlers."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(8281).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"The concurrency clients are ",(0,n.kt)("strong",{parentName:"p"},"5000"),"."),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(8132).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"Latency is the time of real processing time by web servers. ",(0,n.kt)("em",{parentName:"p"},"The smaller is the better.")),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(8248).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"Allocs is the heap allocations by web servers when test is running. The unit is MB. ",(0,n.kt)("em",{parentName:"p"},"The smaller is the better.")),(0,n.kt)("p",null,"If we enable ",(0,n.kt)("strong",{parentName:"p"},"http pipelining"),", test result as below:"),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(3065).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"Concurrency test in ",(0,n.kt)("strong",{parentName:"p"},"30 ms")," processing time, the test result for ",(0,n.kt)("strong",{parentName:"p"},"100"),", ",(0,n.kt)("strong",{parentName:"p"},"1000"),", ",(0,n.kt)("strong",{parentName:"p"},"5000")," clients is:"),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(8767).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(1652).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(6235).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"If we enable ",(0,n.kt)("strong",{parentName:"p"},"http pipelining"),", test result as below:"),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(9951).Z,width:"1024",height:"600"})),(0,n.kt)("p",null,"Dependency graph for ",(0,n.kt)("inlineCode",{parentName:"p"},"v1.9.0")),(0,n.kt)("p",null,(0,n.kt)("img",{src:a(3209).Z,width:"1307",height:"520"})))}d.isMDXComponent=!0},3065:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/benchmark-pipeline-b49cbb1db36293acdfb0e6c96d844e1a.png"},8281:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/benchmark-18e23fcf42afc7f5e12ea23aceb27885.png"},8248:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/benchmark_alloc-dec96faa96e07bcec84f40a4dfc8d187.png"},8132:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/benchmark_latency-b67a470cf1b261c3092b80cbf42ef16b.png"},9951:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/concurrency-pipeline-b0d3c211d9c7cb5474fd191223a41241.png"},8767:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/concurrency-1307e1d23c01a561a4b2a0f5bdd7e1bc.png"},6235:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/concurrency_alloc-6f2d485576803f7de2fe0a1deca21a09.png"},1652:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/concurrency_latency-5a223848a8bee8df21cc02451f0db2b6.png"},6551:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/data_updates-3be85c418d6971091854c5086af9ed10.png"},7792:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/data_updates_express-2f55d1b0975ec391d29d823b48faf617.png"},3209:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/graph-afbd400b1c3e1c6f137dae3cfc1890ce.svg"},7960:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/json-62868f61b34e3790f3a8b3b52b1a3a3b.png"},3316:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/json_express-aa631b2de86808970aa4bb7c9c9d3edf.png"},2600:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/multiple_queries-2c2e81674208b90b9aeb1cb791a3f0dc.png"},1146:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/multiple_queries_express-ec4dc8013e85dc2a2fa4f5eeb55ce8dd.png"},2137:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/plaintext-e25d187f782d18fdd35b84e3d7c625eb.png"},7093:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/plaintext_express-ef6522843412bb5b14b3c6b6a4f032de.png"},6802:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/single_query-4f7782d3c3ff91e92ac27e382b09f6ac.png"},2256:(e,t,a)=>{a.d(t,{Z:()=>r});const r=a.p+"assets/images/single_query_express-d8e41422b4f5c0a9496272e4a66a97c4.png"}}]); \ No newline at end of file diff --git a/assets/js/7449d9ed.56ffc42d.js b/assets/js/7449d9ed.56ffc42d.js new file mode 100644 index 00000000000..42d079a79b1 --- /dev/null +++ b/assets/js/7449d9ed.56ffc42d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[974],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>g});var r=t(67294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),c=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},p=function(e){var n=c(e.components);return r.createElement(s.Provider,{value:n},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},f=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(t),f=i,g=u["".concat(s,".").concat(f)]||u[f]||d[f]||o;return t?r.createElement(g,a(a({ref:n},p),{},{components:t})):r.createElement(g,a({ref:n},p))}));function g(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=f;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[u]="string"==typeof e?e:i,a[1]=l;for(var c=2;c<o;c++)a[c]=t[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,t)}f.displayName="MDXCreateElement"},52749:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var r=t(87462),i=(t(67294),t(3905));const o={id:"cors",title:"CORS"},a=void 0,l={unversionedId:"api/middleware/cors",id:"version-v2.x/api/middleware/cors",title:"CORS",description:"CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.",source:"@site/versioned_docs/version-v2.x/api/middleware/cors.md",sourceDirName:"api/middleware",slug:"/api/middleware/cors",permalink:"/api/middleware/cors",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"cors",title:"CORS"},sidebar:"tutorialSidebar",previous:{title:"Compress",permalink:"/api/middleware/compress"},next:{title:"CSRF",permalink:"/api/middleware/csrf"}},s={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],p={toc:c},u="wrapper";function d(e){let{components:n,...t}=e;return(0,i.kt)(u,(0,r.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"CORS middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that can be used to enable ",(0,i.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS"},"Cross-Origin Resource Sharing")," with various options."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/cors"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(cors.New())\n\n// Or extend your config for customization\napp.Use(cors.New(cors.Config{\n AllowOrigins: "https://gofiber.io, https://gofiber.net",\n AllowHeaders: "Origin, Content-Type, Accept",\n}))\n')),(0,i.kt)("p",null,"Using the ",(0,i.kt)("inlineCode",{parentName:"p"},"AllowOriginsFunc")," function. In this example any origin will be allowed via CORS."),(0,i.kt)("p",null,"For example, if a browser running on ",(0,i.kt)("inlineCode",{parentName:"p"},"http://localhost:3000")," sends a request, this will be accepted and the ",(0,i.kt)("inlineCode",{parentName:"p"},"access-control-allow-origin")," response header will be set to ",(0,i.kt)("inlineCode",{parentName:"p"},"http://localhost:3000"),"."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via ",(0,i.kt)("inlineCode",{parentName:"strong"},"AllowOrigins"),".")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(cors.New())\n\napp.Use(cors.New(cors.Config{\n AllowOriginsFunc: func(origin string) bool {\n return os.Getenv("ENVIRONMENT") == "development"\n },\n}))\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // AllowOriginsFunc defines a function that will set the \'access-control-allow-origin\'\n // response header to the \'origin\' request header when returned true.\n // \n // Note: Using this feature is discouraged in production and it\'s best practice to explicitly\n // set CORS origins via \'AllowOrigins\'\n //\n // Optional. Default: nil\n AllowOriginsFunc func(origin string) bool\n\n // AllowOrigin defines a list of origins that may access the resource.\n //\n // Optional. Default value "*"\n AllowOrigins string\n\n // AllowMethods defines a list methods allowed when accessing the resource.\n // This is used in response to a preflight request.\n //\n // Optional. Default value "GET,POST,HEAD,PUT,DELETE,PATCH"\n AllowMethods string\n\n // AllowHeaders defines a list of request headers that can be used when\n // making the actual request. This is in response to a preflight request.\n //\n // Optional. Default value "".\n AllowHeaders string\n\n // AllowCredentials indicates whether or not the response to the request\n // can be exposed when the credentials flag is true. When used as part of\n // a response to a preflight request, this indicates whether or not the\n // actual request can be made using credentials.\n //\n // Optional. Default value false.\n AllowCredentials bool\n\n // ExposeHeaders defines a whitelist headers that clients are allowed to\n // access.\n //\n // Optional. Default value "".\n ExposeHeaders string\n\n // MaxAge indicates how long (in seconds) the results of a preflight request\n // can be cached.\n //\n // Optional. Default value 0.\n MaxAge int\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n AllowOriginsFunc: nil,\n AllowOrigins: "*",\n AllowMethods: strings.Join([]string{\n fiber.MethodGet,\n fiber.MethodPost,\n fiber.MethodHead,\n fiber.MethodPut,\n fiber.MethodDelete,\n fiber.MethodPatch,\n }, ","),\n AllowHeaders: "",\n AllowCredentials: false,\n ExposeHeaders: "",\n MaxAge: 0,\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7449d9ed.c3aabec4.js b/assets/js/7449d9ed.c3aabec4.js deleted file mode 100644 index 37ad3c4c316..00000000000 --- a/assets/js/7449d9ed.c3aabec4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[974],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>g});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),c=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},p=function(e){var n=c(e.components);return r.createElement(s.Provider,{value:n},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},f=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(t),f=i,g=u["".concat(s,".").concat(f)]||u[f]||d[f]||o;return t?r.createElement(g,a(a({ref:n},p),{},{components:t})):r.createElement(g,a({ref:n},p))}));function g(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=f;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[u]="string"==typeof e?e:i,a[1]=l;for(var c=2;c<o;c++)a[c]=t[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,t)}f.displayName="MDXCreateElement"},2749:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var r=t(7462),i=(t(7294),t(3905));const o={id:"cors",title:"CORS"},a=void 0,l={unversionedId:"api/middleware/cors",id:"version-v2.x/api/middleware/cors",title:"CORS",description:"CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.",source:"@site/versioned_docs/version-v2.x/api/middleware/cors.md",sourceDirName:"api/middleware",slug:"/api/middleware/cors",permalink:"/api/middleware/cors",draft:!1,tags:[],version:"v2.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"cors",title:"CORS"},sidebar:"tutorialSidebar",previous:{title:"Compress",permalink:"/api/middleware/compress"},next:{title:"CSRF",permalink:"/api/middleware/csrf"}},s={},c=[{value:"Signatures",id:"signatures",level:2},{value:"Examples",id:"examples",level:2},{value:"Config",id:"config",level:2},{value:"Default Config",id:"default-config",level:2}],p={toc:c},u="wrapper";function d(e){let{components:n,...t}=e;return(0,i.kt)(u,(0,r.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"CORS middleware for ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber")," that can be used to enable ",(0,i.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS"},"Cross-Origin Resource Sharing")," with various options."),(0,i.kt)("h2",{id:"signatures"},"Signatures"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,i.kt)("h2",{id:"examples"},"Examples"),(0,i.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/fiber/v2/middleware/cors"\n)\n')),(0,i.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\napp.Use(cors.New())\n\n// Or extend your config for customization\napp.Use(cors.New(cors.Config{\n AllowOrigins: "https://gofiber.io, https://gofiber.net",\n AllowHeaders: "Origin, Content-Type, Accept",\n}))\n')),(0,i.kt)("p",null,"Using the ",(0,i.kt)("inlineCode",{parentName:"p"},"AllowOriginsFunc")," function. In this example any origin will be allowed via CORS."),(0,i.kt)("p",null,"For example, if a browser running on ",(0,i.kt)("inlineCode",{parentName:"p"},"http://localhost:3000")," sends a request, this will be accepted and the ",(0,i.kt)("inlineCode",{parentName:"p"},"access-control-allow-origin")," response header will be set to ",(0,i.kt)("inlineCode",{parentName:"p"},"http://localhost:3000"),"."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via ",(0,i.kt)("inlineCode",{parentName:"strong"},"AllowOrigins"),".")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'app.Use(cors.New())\n\napp.Use(cors.New(cors.Config{\n AllowOriginsFunc: func(origin string) bool {\n return os.Getenv("ENVIRONMENT") == "development"\n },\n}))\n')),(0,i.kt)("h2",{id:"config"},"Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for middleware.\ntype Config struct {\n // Next defines a function to skip this middleware when returned true.\n //\n // Optional. Default: nil\n Next func(c *fiber.Ctx) bool\n\n // AllowOriginsFunc defines a function that will set the \'access-control-allow-origin\'\n // response header to the \'origin\' request header when returned true.\n // \n // Note: Using this feature is discouraged in production and it\'s best practice to explicitly\n // set CORS origins via \'AllowOrigins\'\n //\n // Optional. Default: nil\n AllowOriginsFunc func(origin string) bool\n\n // AllowOrigin defines a list of origins that may access the resource.\n //\n // Optional. Default value "*"\n AllowOrigins string\n\n // AllowMethods defines a list methods allowed when accessing the resource.\n // This is used in response to a preflight request.\n //\n // Optional. Default value "GET,POST,HEAD,PUT,DELETE,PATCH"\n AllowMethods string\n\n // AllowHeaders defines a list of request headers that can be used when\n // making the actual request. This is in response to a preflight request.\n //\n // Optional. Default value "".\n AllowHeaders string\n\n // AllowCredentials indicates whether or not the response to the request\n // can be exposed when the credentials flag is true. When used as part of\n // a response to a preflight request, this indicates whether or not the\n // actual request can be made using credentials.\n //\n // Optional. Default value false.\n AllowCredentials bool\n\n // ExposeHeaders defines a whitelist headers that clients are allowed to\n // access.\n //\n // Optional. Default value "".\n ExposeHeaders string\n\n // MaxAge indicates how long (in seconds) the results of a preflight request\n // can be cached.\n //\n // Optional. Default value 0.\n MaxAge int\n}\n')),(0,i.kt)("h2",{id:"default-config"},"Default Config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Next: nil,\n AllowOriginsFunc: nil,\n AllowOrigins: "*",\n AllowMethods: strings.Join([]string{\n fiber.MethodGet,\n fiber.MethodPost,\n fiber.MethodHead,\n fiber.MethodPut,\n fiber.MethodDelete,\n fiber.MethodPatch,\n }, ","),\n AllowHeaders: "",\n AllowCredentials: false,\n ExposeHeaders: "",\n MaxAge: 0,\n}\n')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/746fc7bc.6ec5ba41.js b/assets/js/746fc7bc.6ec5ba41.js new file mode 100644 index 00000000000..03a91f3f354 --- /dev/null +++ b/assets/js/746fc7bc.6ec5ba41.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7048],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),g=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=g(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=g(r),f=n,m=p["".concat(s,".").concat(f)]||p[f]||u[f]||o;return r?a.createElement(m,i(i({ref:t},c),{},{components:r})):a.createElement(m,i({ref:t},c))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,i[1]=l;for(var g=2;g<o;g++)i[g]=r[g];return a.createElement.apply(null,i)}return a.createElement.apply(null,r)}f.displayName="MDXCreateElement"},68635:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var a=r(87462),n=(r(67294),r(3905));const o={id:"swagger",title:"Swagger"},i=void 0,l={unversionedId:"swagger/swagger",id:"version-fiberzerolog_v0.x.x/swagger/swagger",title:"Swagger",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/swagger/README.md",sourceDirName:"swagger",slug:"/swagger/",permalink:"/contrib/swagger/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/swagger/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"swagger",title:"Swagger"},sidebar:"tutorialSidebar",previous:{title:"Paseto",permalink:"/contrib/paseto/"},next:{title:"Websocket",permalink:"/contrib/websocket/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Examples",id:"examples",level:3},{value:"Default Config",id:"default-config",level:3},{value:"Custom Config",id:"custom-config",level:3}],c={toc:g},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=swagger*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,n.kt)("p",null,"Swagger middleware for ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),". The middleware handles Swagger UI. "),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/swagger"\n)\n')),(0,n.kt)("p",null,"Then create a Fiber app with app := fiber.New()."),(0,n.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"app.Use(swagger.New(cfg))\n")),(0,n.kt)("h3",{id:"custom-config"},"Custom Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'cfg := swagger.Config{\n BasePath: "/", //swagger ui base path\n FilePath: "./docs/swagger.json",\n}\n\napp.Use(swagger.New(cfg))\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/746fc7bc.f7e30157.js b/assets/js/746fc7bc.f7e30157.js deleted file mode 100644 index ef007cf758b..00000000000 --- a/assets/js/746fc7bc.f7e30157.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[7048],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>m});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),g=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=g(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=g(r),f=n,m=p["".concat(s,".").concat(f)]||p[f]||u[f]||o;return r?a.createElement(m,i(i({ref:t},c),{},{components:r})):a.createElement(m,i({ref:t},c))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,i[1]=l;for(var g=2;g<o;g++)i[g]=r[g];return a.createElement.apply(null,i)}return a.createElement.apply(null,r)}f.displayName="MDXCreateElement"},8635:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var a=r(7462),n=(r(7294),r(3905));const o={id:"swagger",title:"Swagger"},i=void 0,l={unversionedId:"swagger/swagger",id:"version-fiberzerolog_v0.x.x/swagger/swagger",title:"Swagger",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/swagger/README.md",sourceDirName:"swagger",slug:"/swagger/",permalink:"/contrib/swagger/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/swagger/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"swagger",title:"Swagger"},sidebar:"tutorialSidebar",previous:{title:"Paseto",permalink:"/contrib/paseto/"},next:{title:"Websocket",permalink:"/contrib/websocket/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Examples",id:"examples",level:3},{value:"Default Config",id:"default-config",level:3},{value:"Custom Config",id:"custom-config",level:3}],c={toc:g},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=swagger*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,n.kt)("p",null,"Swagger middleware for ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/gofiber/fiber"},"Fiber"),". The middleware handles Swagger UI. "),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) fiber.Handler\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the middleware package that is part of the Fiber web framework"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import (\n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/contrib/swagger"\n)\n')),(0,n.kt)("p",null,"Then create a Fiber app with app := fiber.New()."),(0,n.kt)("p",null,"After you initiate your Fiber app, you can use the following possibilities:"),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"app.Use(swagger.New(cfg))\n")),(0,n.kt)("h3",{id:"custom-config"},"Custom Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'cfg := swagger.Config{\n BasePath: "/", //swagger ui base path\n FilePath: "./docs/swagger.json",\n}\n\napp.Use(swagger.New(cfg))\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7494fa4d.02ec7ea9.js b/assets/js/7494fa4d.02ec7ea9.js deleted file mode 100644 index c57218632b6..00000000000 --- a/assets/js/7494fa4d.02ec7ea9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6263],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>s});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},g=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),u=d(n),c=r,s=u["".concat(p,".").concat(c)]||u[c]||m[c]||i;return n?a.createElement(s,l(l({ref:t},g),{},{components:n})):a.createElement(s,l({ref:t},g))}));function s(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var d=2;d<i;d++)l[d]=n[d];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}c.displayName="MDXCreateElement"},5383:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var a=n(7462),r=(n(7294),n(3905));const i={id:"fiberi18n",title:"Fiberi18n"},l=void 0,o={unversionedId:"fiberi18n/fiberi18n",id:"version-fiberzerolog_v0.x.x/fiberi18n/fiberi18n",title:"Fiberi18n",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/fiberi18n/README.md",sourceDirName:"fiberi18n",slug:"/fiberi18n/",permalink:"/contrib/fiberi18n/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fiberi18n/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fiberi18n",title:"Fiberi18n"},sidebar:"tutorialSidebar",previous:{title:"Casbin",permalink:"/contrib/casbin/"},next:{title:"Fibernewrelic",permalink:"/contrib/fibernewrelic/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Example",id:"example",level:3}],g={toc:d},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fiberi18n*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/nicksnyder/go-i18n"},"go-i18n")," support for Fiber."),(0,r.kt)("h3",{id:"install"},"Install"),(0,r.kt)("p",null,"This middleware supports Fiber v2."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fiberi18n\n")),(0,r.kt)("h3",{id:"signature"},"Signature"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"fiberi18n.New(config ...*Config) fiber.Handler\n")),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Property"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Next"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(c *fiber.Ctx) bool")),(0,r.kt)("td",{parentName:"tr",align:null},"A function to skip this middleware when returned ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"RootPath"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The i18n template folder path."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"./example/localize"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"AcceptLanguages"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"A collection of languages that can be processed."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag{language.Chinese, language.English}"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"FormatBundleFile"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The type of the template file."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"yaml"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DefaultLanguage"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"The default returned language type."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.English"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Loader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Loader")),(0,r.kt)("td",{parentName:"tr",align:null},"The implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"LoaderFunc(os.ReadFile)"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"UnmarshalFunc"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"i18n.UnmarshalFunc")),(0,r.kt)("td",{parentName:"tr",align:null},"The function used for decoding template files."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"yaml.Unmarshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"LangHandler"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(ctx *fiber.Ctx, defaultLang string) string")),(0,r.kt)("td",{parentName:"tr",align:null},"Used to get the kind of language handled by *fiber.Ctx and defaultLang."),(0,r.kt)("td",{parentName:"tr",align:null},"Retrieved from the request header ",(0,r.kt)("inlineCode",{parentName:"td"},"Accept-Language")," or query parameter ",(0,r.kt)("inlineCode",{parentName:"td"},"lang"),".")))),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/contrib/fiberi18n"\n "github.com/gofiber/fiber/v2"\n "github.com/nicksnyder/go-i18n/v2/i18n"\n "golang.org/x/text/language"\n)\n\nfunc main() {\n app := fiber.New()\n app.Use(\n fiberi18n.New(&fiberi18n.Config{\n RootPath: "./example/localize",\n AcceptLanguages: []language.Tag{language.Chinese, language.English},\n DefaultLanguage: language.Chinese,\n }),\n )\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString(fiberi18n.MustGetMessage("welcome"))\n })\n app.Get("/:name", func(ctx *fiber.Ctx) error {\n return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{\n MessageID: "welcomeWithName",\n TemplateData: map[string]string{\n "name": ctx.Params("name"),\n },\n }))\n })\n app.Listen("127.0.0.1:3000")\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7494fa4d.b0c275d5.js b/assets/js/7494fa4d.b0c275d5.js new file mode 100644 index 00000000000..17534f3692f --- /dev/null +++ b/assets/js/7494fa4d.b0c275d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6263],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>s});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},g=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,g=o(e,["components","mdxType","originalType","parentName"]),u=d(n),c=r,s=u["".concat(p,".").concat(c)]||u[c]||m[c]||i;return n?a.createElement(s,l(l({ref:t},g),{},{components:n})):a.createElement(s,l({ref:t},g))}));function s(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var d=2;d<i;d++)l[d]=n[d];return a.createElement.apply(null,l)}return a.createElement.apply(null,n)}c.displayName="MDXCreateElement"},75383:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var a=n(87462),r=(n(67294),n(3905));const i={id:"fiberi18n",title:"Fiberi18n"},l=void 0,o={unversionedId:"fiberi18n/fiberi18n",id:"version-fiberzerolog_v0.x.x/fiberi18n/fiberi18n",title:"Fiberi18n",description:"Release",source:"@site/contrib_versioned_docs/version-fiberzerolog_v0.x.x/fiberi18n/README.md",sourceDirName:"fiberi18n",slug:"/fiberi18n/",permalink:"/contrib/fiberi18n/",draft:!1,editUrl:"https://github.com/gofiber/contrib/edit/main/fiberi18n/README.md",tags:[],version:"fiberzerolog_v0.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"fiberi18n",title:"Fiberi18n"},sidebar:"tutorialSidebar",previous:{title:"Casbin",permalink:"/contrib/casbin/"},next:{title:"Fibernewrelic",permalink:"/contrib/fibernewrelic/"}},p={},d=[{value:"Install",id:"install",level:3},{value:"Signature",id:"signature",level:3},{value:"Config",id:"config",level:3},{value:"Example",id:"example",level:3}],g={toc:d},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/contrib?filter=fiberi18n*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://github.com/gofiber/contrib/workflows/Linter/badge.svg",alt:"Linter"})),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/nicksnyder/go-i18n"},"go-i18n")," support for Fiber."),(0,r.kt)("h3",{id:"install"},"Install"),(0,r.kt)("p",null,"This middleware supports Fiber v2."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"go get -u github.com/gofiber/fiber/v2\ngo get -u github.com/gofiber/contrib/fiberi18n\n")),(0,r.kt)("h3",{id:"signature"},"Signature"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"fiberi18n.New(config ...*Config) fiber.Handler\n")),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Property"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"),(0,r.kt)("th",{parentName:"tr",align:null},"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Next"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(c *fiber.Ctx) bool")),(0,r.kt)("td",{parentName:"tr",align:null},"A function to skip this middleware when returned ",(0,r.kt)("inlineCode",{parentName:"td"},"true"),"."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"nil"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"RootPath"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The i18n template folder path."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"./example/localize"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"AcceptLanguages"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"A collection of languages that can be processed."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"[]language.Tag{language.Chinese, language.English}"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"FormatBundleFile"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"string")),(0,r.kt)("td",{parentName:"tr",align:null},"The type of the template file."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},'"yaml"'))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"DefaultLanguage"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.Tag")),(0,r.kt)("td",{parentName:"tr",align:null},"The default returned language type."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"language.English"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Loader"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Loader")),(0,r.kt)("td",{parentName:"tr",align:null},"The implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"LoaderFunc(os.ReadFile)"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"UnmarshalFunc"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"i18n.UnmarshalFunc")),(0,r.kt)("td",{parentName:"tr",align:null},"The function used for decoding template files."),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"yaml.Unmarshal"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"LangHandler"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"func(ctx *fiber.Ctx, defaultLang string) string")),(0,r.kt)("td",{parentName:"tr",align:null},"Used to get the kind of language handled by *fiber.Ctx and defaultLang."),(0,r.kt)("td",{parentName:"tr",align:null},"Retrieved from the request header ",(0,r.kt)("inlineCode",{parentName:"td"},"Accept-Language")," or query parameter ",(0,r.kt)("inlineCode",{parentName:"td"},"lang"),".")))),(0,r.kt)("h3",{id:"example"},"Example"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "github.com/gofiber/contrib/fiberi18n"\n "github.com/gofiber/fiber/v2"\n "github.com/nicksnyder/go-i18n/v2/i18n"\n "golang.org/x/text/language"\n)\n\nfunc main() {\n app := fiber.New()\n app.Use(\n fiberi18n.New(&fiberi18n.Config{\n RootPath: "./example/localize",\n AcceptLanguages: []language.Tag{language.Chinese, language.English},\n DefaultLanguage: language.Chinese,\n }),\n )\n app.Get("/", func(c *fiber.Ctx) error {\n return c.SendString(fiberi18n.MustGetMessage("welcome"))\n })\n app.Get("/:name", func(ctx *fiber.Ctx) error {\n return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{\n MessageID: "welcomeWithName",\n TemplateData: map[string]string{\n "name": ctx.Params("name"),\n },\n }))\n })\n app.Listen("127.0.0.1:3000")\n}\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/74efe321.1b311c15.js b/assets/js/74efe321.1b311c15.js new file mode 100644 index 00000000000..f6937aaff12 --- /dev/null +++ b/assets/js/74efe321.1b311c15.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2991],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function i(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},o=Object.keys(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(a),g=r,b=p["".concat(s,".").concat(g)]||p[g]||f[g]||o;return a?n.createElement(b,l(l({ref:t},c),{},{components:a})):n.createElement(b,l({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=g;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,l[1]=i;for(var u=2;u<o;u++)l[u]=a[u];return n.createElement.apply(null,l)}return n.createElement.apply(null,a)}g.displayName="MDXCreateElement"},69458:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>f,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=a(87462),r=(a(67294),a(3905));const o={id:"bbolt",title:"Bbolt"},l=void 0,i={unversionedId:"bbolt/bbolt",id:"version-etcd_v1.x.x/bbolt/bbolt",title:"Bbolt",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/bbolt/README.md",sourceDirName:"bbolt",slug:"/bbolt/",permalink:"/storage/etcd_v1.x.x/bbolt/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/bbolt/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"bbolt",title:"Bbolt"},sidebar:"tutorialSidebar",previous:{title:"Badger",permalink:"/storage/etcd_v1.x.x/badger/"},next:{title:"Couchbase",permalink:"/storage/etcd_v1.x.x/couchbase/"}},s={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},p="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(p,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=bbolt*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A Bbolt storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/etcd-io/bbolt"},"etcd-io/bbolt"),". Bolt is a pure Go key/value store inspired by ",(0,r.kt)("a",{parentName:"p",href:"https://twitter.com/hyc_symas"},"Howard Chu's")," ",(0,r.kt)("a",{parentName:"p",href:"https://www.symas.com/symas-embedded-database-lmdb"},"LMDB project"),". The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *bbolt.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"Bbolt is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,r.kt)("p",null,"And then install the s3 implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/bbolt\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/bbolt"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := bbolt.New()\n\n// Initialize custom config\nstore := bbolt.New(bbolt.Config{\n Database: "my_database.db",\n Bucket: "my-bucket",\n Reset: false,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Database path\n //\n // Optional. Default is "fiber.db"\n Database string\n\n // Bbolt bucket name\n //\n // Optional. Default is "fiber_storage"\n Bucket string\n\n // Timeout is the amount of time to wait to obtain a file lock.\n // Only available on Darwin and Linux.\n //\n // Optional. Default is 60 * time.Second.\n Timeout time.Duration\n\n // Open database in read-only mode.\n //\n // Optional. Default is false\n ReadOnly bool\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Database: "fiber.db",\n Bucket: "fiber_storage",\n Timeout: 60 * time.Second,\n ReadOnly: false,\n Reset: false,\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/74efe321.deefbb0c.js b/assets/js/74efe321.deefbb0c.js deleted file mode 100644 index 2ebe1afdb76..00000000000 --- a/assets/js/74efe321.deefbb0c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[2991],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>b});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function i(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},o=Object.keys(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),u=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(a),g=r,b=p["".concat(s,".").concat(g)]||p[g]||f[g]||o;return a?n.createElement(b,l(l({ref:t},c),{},{components:a})):n.createElement(b,l({ref:t},c))}));function b(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=g;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:r,l[1]=i;for(var u=2;u<o;u++)l[u]=a[u];return n.createElement.apply(null,l)}return n.createElement.apply(null,a)}g.displayName="MDXCreateElement"},9458:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>f,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=a(7462),r=(a(7294),a(3905));const o={id:"bbolt",title:"Bbolt"},l=void 0,i={unversionedId:"bbolt/bbolt",id:"version-etcd_v1.x.x/bbolt/bbolt",title:"Bbolt",description:"Release",source:"@site/storage_versioned_docs/version-etcd_v1.x.x/bbolt/README.md",sourceDirName:"bbolt",slug:"/bbolt/",permalink:"/storage/etcd_v1.x.x/bbolt/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/bbolt/README.md",tags:[],version:"etcd_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"bbolt",title:"Bbolt"},sidebar:"tutorialSidebar",previous:{title:"Badger",permalink:"/storage/etcd_v1.x.x/badger/"},next:{title:"Couchbase",permalink:"/storage/etcd_v1.x.x/couchbase/"}},s={},u=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:u},p="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(p,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=bbolt*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-bbolt.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A Bbolt storage driver using ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/etcd-io/bbolt"},"etcd-io/bbolt"),". Bolt is a pure Go key/value store inspired by ",(0,r.kt)("a",{parentName:"p",href:"https://twitter.com/hyc_symas"},"Howard Chu's")," ",(0,r.kt)("a",{parentName:"p",href:"https://www.symas.com/symas-embedded-database-lmdb"},"LMDB project"),". The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *bbolt.DB\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"Bbolt is tested on the 2 last ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,r.kt)("p",null,"And then install the s3 implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/bbolt\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/bbolt"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := bbolt.New()\n\n// Initialize custom config\nstore := bbolt.New(bbolt.Config{\n Database: "my_database.db",\n Bucket: "my-bucket",\n Reset: false,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // Database path\n //\n // Optional. Default is "fiber.db"\n Database string\n\n // Bbolt bucket name\n //\n // Optional. Default is "fiber_storage"\n Bucket string\n\n // Timeout is the amount of time to wait to obtain a file lock.\n // Only available on Darwin and Linux.\n //\n // Optional. Default is 60 * time.Second.\n Timeout time.Duration\n\n // Open database in read-only mode.\n //\n // Optional. Default is false\n ReadOnly bool\n\n // Reset clears any existing keys in existing Bucket\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n Database: "fiber.db",\n Bucket: "fiber_storage",\n Timeout: 60 * time.Second,\n ReadOnly: false,\n Reset: false,\n}\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7506f0f5.68182e50.js b/assets/js/7506f0f5.68182e50.js deleted file mode 100644 index bc896ce03ec..00000000000 --- a/assets/js/7506f0f5.68182e50.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9752],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),g=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=g(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=g(n),f=r,d=u["".concat(s,".").concat(f)]||u[f]||c[f]||o;return n?a.createElement(d,i(i({ref:t},p),{},{components:n})):a.createElement(d,i({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var g=2;g<o;g++)i[g]=n[g];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}f.displayName="MDXCreateElement"},4159:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var a=n(7462),r=(n(7294),n(3905));const o={id:"arangodb",title:"ArangoDB"},i=void 0,l={unversionedId:"arangodb/arangodb",id:"arangodb/arangodb",title:"ArangoDB",description:"Release",source:"@site/docs/storage/arangodb/README.md",sourceDirName:"arangodb",slug:"/arangodb/",permalink:"/storage/next/arangodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/arangodb/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"arangodb",title:"ArangoDB"},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc4b Welcome",permalink:"/storage/next/"},next:{title:"Azure Blob",permalink:"/storage/next/azureblob/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:g},u="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=arangodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A ArangoDB storage driver using ",(0,r.kt)("inlineCode",{parentName:"p"},"arangodb/go-driver")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/arangodb/go-driver"},"arangodb/go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() driver.Client\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"ArangoDB is tested on the 2 last (1.14/1.15) ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,r.kt)("p",null,"And then install the mysql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/arangodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/arangodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := arangodb.New()\n\n// Initialize custom config\nstore := arangodb.New(arangodb.Config{\n Host: "http://127.0.0.1",\n Port: 8529,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "http://127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 8529\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing collection\n //\n // Optional. Default is false\n Reset bool\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("p",null,"Used only for optional fields"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "http://127.0.0.1",\n Port: 8529,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7506f0f5.f106f4e0.js b/assets/js/7506f0f5.f106f4e0.js new file mode 100644 index 00000000000..59c3bfa15e4 --- /dev/null +++ b/assets/js/7506f0f5.f106f4e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9752],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),g=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=g(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=g(n),f=r,d=u["".concat(s,".").concat(f)]||u[f]||c[f]||o;return n?a.createElement(d,i(i({ref:t},p),{},{components:n})):a.createElement(d,i({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var g=2;g<o;g++)i[g]=n[g];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}f.displayName="MDXCreateElement"},44159:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>g});var a=n(87462),r=(n(67294),n(3905));const o={id:"arangodb",title:"ArangoDB"},i=void 0,l={unversionedId:"arangodb/arangodb",id:"arangodb/arangodb",title:"ArangoDB",description:"Release",source:"@site/docs/storage/arangodb/README.md",sourceDirName:"arangodb",slug:"/arangodb/",permalink:"/storage/next/arangodb/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/arangodb/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"arangodb",title:"ArangoDB"},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc4b Welcome",permalink:"/storage/next/"},next:{title:"Azure Blob",permalink:"/storage/next/azureblob/"}},s={},g=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],p={toc:g},u="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=arangodb*",alt:"Release"}),"\n",(0,r.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-arangodb.yml?label=Tests",alt:"Test"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,r.kt)("p",null,"A ArangoDB storage driver using ",(0,r.kt)("inlineCode",{parentName:"p"},"arangodb/go-driver")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/arangodb/go-driver"},"arangodb/go-driver"),"."),(0,r.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,r.kt)("h3",{id:"signatures"},"Signatures"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() driver.Client\n")),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("p",null,"ArangoDB is tested on the 2 last (1.14/1.15) ",(0,r.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,r.kt)("p",null,"And then install the mysql implementation:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/arangodb\n")),(0,r.kt)("h3",{id:"examples"},"Examples"),(0,r.kt)("p",null,"Import the storage package."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/arangodb"\n')),(0,r.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := arangodb.New()\n\n// Initialize custom config\nstore := arangodb.New(arangodb.Config{\n Host: "http://127.0.0.1",\n Port: 8529,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,r.kt)("h3",{id:"config"},"Config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Host name where the DB is hosted\n //\n // Optional. Default is "http://127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 8529\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Collection name\n //\n // Optional. Default is "fiber_storage"\n Collection string\n\n // Reset clears any existing keys in existing collection\n //\n // Optional. Default is false\n Reset bool\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,r.kt)("h3",{id:"default-config"},"Default Config"),(0,r.kt)("p",null,"Used only for optional fields"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Host: "http://127.0.0.1",\n Port: 8529,\n Database: "fiber",\n Collection: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/75542ae5.3589daba.js b/assets/js/75542ae5.3589daba.js new file mode 100644 index 00000000000..2cab9bc13f4 --- /dev/null +++ b/assets/js/75542ae5.3589daba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4193],{3905:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>f});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},m=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),p=c(r),g=n,f=p["".concat(s,".").concat(g)]||p[g]||u[g]||o;return r?a.createElement(f,i(i({ref:t},m),{},{components:r})):a.createElement(f,i({ref:t},m))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,i[1]=l;for(var c=2;c<o;c++)i[c]=r[c];return a.createElement.apply(null,i)}return a.createElement.apply(null,r)}g.displayName="MDXCreateElement"},66593:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=r(87462),n=(r(67294),r(3905));const o={id:"memcache",title:"Memcache"},i=void 0,l={unversionedId:"memcache/memcache",id:"memcache/memcache",title:"Memcache",description:"Release",source:"@site/docs/storage/memcache/README.md",sourceDirName:"memcache",slug:"/memcache/",permalink:"/storage/next/memcache/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memcache/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memcache",title:"Memcache"},sidebar:"tutorialSidebar",previous:{title:"Etcd",permalink:"/storage/next/etcd/"},next:{title:"Memory",permalink:"/storage/next/memory/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],m={toc:c},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memcache*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?label=Tests",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,n.kt)("p",null,"A Memcache storage driver using ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/bradfitz/gomemcache"},(0,n.kt)("inlineCode",{parentName:"a"},"bradfitz/gomemcache")),"."),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mc.Client\n")),(0,n.kt)("h3",{id:"installation"},"Installation"),(0,n.kt)("p",null,"Memory is tested on the 2 last ",(0,n.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,n.kt)("p",null,"And then install the memory implementation:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the storage package."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memcache"\n')),(0,n.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := memcache.New()\n\n// Initialize custom config\nstore := memcache.New(memcache.Config{\n Servers: "localhost:11211",\n})\n')),(0,n.kt)("h3",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Server list divided by ,\n // i.e. server1:11211, server2:11212\n //\n // Optional. Default is "127.0.0.1:11211"\n Servers string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Servers: "127.0.0.1:11211",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/75542ae5.79d4804f.js b/assets/js/75542ae5.79d4804f.js deleted file mode 100644 index a1dd342a4d8..00000000000 --- a/assets/js/75542ae5.79d4804f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[4193],{3905:(e,t,r)=>{r.d(t,{Zo:()=>m,kt:()=>f});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},m=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),p=c(r),g=n,f=p["".concat(s,".").concat(g)]||p[g]||u[g]||o;return r?a.createElement(f,i(i({ref:t},m),{},{components:r})):a.createElement(f,i({ref:t},m))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:n,i[1]=l;for(var c=2;c<o;c++)i[c]=r[c];return a.createElement.apply(null,i)}return a.createElement.apply(null,r)}g.displayName="MDXCreateElement"},6593:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var a=r(7462),n=(r(7294),r(3905));const o={id:"memcache",title:"Memcache"},i=void 0,l={unversionedId:"memcache/memcache",id:"memcache/memcache",title:"Memcache",description:"Release",source:"@site/docs/storage/memcache/README.md",sourceDirName:"memcache",slug:"/memcache/",permalink:"/storage/next/memcache/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/memcache/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"memcache",title:"Memcache"},sidebar:"tutorialSidebar",previous:{title:"Etcd",permalink:"/storage/next/etcd/"},next:{title:"Memory",permalink:"/storage/next/memory/"}},s={},c=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],m={toc:c},p="wrapper";function u(e){let{components:t,...r}=e;return(0,n.kt)(p,(0,a.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=memcache*",alt:"Release"}),"\n",(0,n.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,n.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-memcache.yml?label=Tests",alt:"Test"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,n.kt)("p",null,"A Memcache storage driver using ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/bradfitz/gomemcache"},(0,n.kt)("inlineCode",{parentName:"a"},"bradfitz/gomemcache")),"."),(0,n.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,n.kt)("h3",{id:"signatures"},"Signatures"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *mc.Client\n")),(0,n.kt)("h3",{id:"installation"},"Installation"),(0,n.kt)("p",null,"Memory is tested on the 2 last ",(0,n.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,n.kt)("p",null,"And then install the memory implementation:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/memory\n")),(0,n.kt)("h3",{id:"examples"},"Examples"),(0,n.kt)("p",null,"Import the storage package."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/memcache"\n')),(0,n.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := memcache.New()\n\n// Initialize custom config\nstore := memcache.New(memcache.Config{\n Servers: "localhost:11211",\n})\n')),(0,n.kt)("h3",{id:"config"},"Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Server list divided by ,\n // i.e. server1:11211, server2:11212\n //\n // Optional. Default is "127.0.0.1:11211"\n Servers string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n}\n')),(0,n.kt)("h3",{id:"default-config"},"Default Config"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Servers: "127.0.0.1:11211",\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7585ab27.2af6135f.js b/assets/js/7585ab27.2af6135f.js deleted file mode 100644 index a2ba12a5ef3..00000000000 --- a/assets/js/7585ab27.2af6135f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6271],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>m});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},g=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,g=s(e,["components","mdxType","originalType","parentName"]),u=p(n),f=a,m=u["".concat(l,".").concat(f)]||u[f]||c[f]||o;return n?r.createElement(m,i(i({ref:t},g),{},{components:n})):r.createElement(m,i({ref:t},g))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var p=2;p<o;p++)i[p]=n[p];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}f.displayName="MDXCreateElement"},2082:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const o={id:"postgres",title:"Postgres"},i=void 0,s={unversionedId:"postgres/postgres",id:"version-sqlite3_v1.x.x/postgres/postgres",title:"Postgres",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/postgres/README.md",sourceDirName:"postgres",slug:"/postgres/",permalink:"/storage/sqlite3_v1.x.x/postgres/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/postgres/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"postgres",title:"Postgres"},sidebar:"tutorialSidebar",previous:{title:"Pebble",permalink:"/storage/sqlite3_v1.x.x/pebble/"},next:{title:"Redis",permalink:"/storage/sqlite3_v1.x.x/redis/"}},l={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:p},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=postgres*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Postgres storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/jackc/pgx"},"jackc/pgx"),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *pgxpool.Pool\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Postgres is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,a.kt)("p",null,"And then install the postgres implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/postgres/v2\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/postgres/v2"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := postgres.New()\n\n// Initialize custom config\nstore := postgres.New(postgres.Config{\n Db: dbPool,\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // DB pgxpool.Pool object will override connection uri and other connection fields\n //\n // Optional. Default is nil\n DB *pgxpool.Pool\n\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 5432\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SSLMode string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 5432,\n Database: "fiber",\n Table: "fiber_storage",\n SSLMode: "disable",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7585ab27.9a6e21cc.js b/assets/js/7585ab27.9a6e21cc.js new file mode 100644 index 00000000000..110578b0a76 --- /dev/null +++ b/assets/js/7585ab27.9a6e21cc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6271],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},g=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,g=s(e,["components","mdxType","originalType","parentName"]),u=p(n),f=a,m=u["".concat(l,".").concat(f)]||u[f]||c[f]||o;return n?r.createElement(m,i(i({ref:t},g),{},{components:n})):r.createElement(m,i({ref:t},g))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var p=2;p<o;p++)i[p]=n[p];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}f.displayName="MDXCreateElement"},92082:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const o={id:"postgres",title:"Postgres"},i=void 0,s={unversionedId:"postgres/postgres",id:"version-sqlite3_v1.x.x/postgres/postgres",title:"Postgres",description:"Release",source:"@site/storage_versioned_docs/version-sqlite3_v1.x.x/postgres/README.md",sourceDirName:"postgres",slug:"/postgres/",permalink:"/storage/sqlite3_v1.x.x/postgres/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/postgres/README.md",tags:[],version:"sqlite3_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"postgres",title:"Postgres"},sidebar:"tutorialSidebar",previous:{title:"Pebble",permalink:"/storage/sqlite3_v1.x.x/pebble/"},next:{title:"Redis",permalink:"/storage/sqlite3_v1.x.x/redis/"}},l={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],g={toc:p},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},g,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=postgres*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-postgres.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A Postgres storage driver using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/jackc/pgx"},"jackc/pgx"),"."),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *pgxpool.Pool\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Postgres is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com/<user>/<repo>\n")),(0,a.kt)("p",null,"And then install the postgres implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/postgres/v2\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/postgres/v2"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := postgres.New()\n\n// Initialize custom config\nstore := postgres.New(postgres.Config{\n Db: dbPool,\n Table: "fiber_storage",\n Reset: false,\n GCInterval: 10 * time.Second,\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Config defines the config for storage.\ntype Config struct {\n // DB pgxpool.Pool object will override connection uri and other connection fields\n //\n // Optional. Default is nil\n DB *pgxpool.Pool\n\n // Connection string to use for DB. Will override all other authentication values if used\n //\n // Optional. Default is ""\n ConnectionURI string\n\n // Host name where the DB is hosted\n //\n // Optional. Default is "127.0.0.1"\n Host string\n\n // Port where the DB is listening on\n //\n // Optional. Default is 5432\n Port int\n\n // Server username\n //\n // Optional. Default is ""\n Username string\n\n // Server password\n //\n // Optional. Default is ""\n Password string\n\n // Database name\n //\n // Optional. Default is "fiber"\n Database string\n\n // Table name\n //\n // Optional. Default is "fiber_storage"\n Table string\n\n // The SSL mode for the connection\n //\n // Optional. Default is "disable"\n SSLMode string\n\n // Reset clears any existing keys in existing Table\n //\n // Optional. Default is false\n Reset bool\n\n // Time before deleting expired keys\n //\n // Optional. Default is 10 * time.Second\n GCInterval time.Duration\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// ConfigDefault is the default config\nvar ConfigDefault = Config{\n ConnectionURI: "",\n Host: "127.0.0.1",\n Port: 5432,\n Database: "fiber",\n Table: "fiber_storage",\n SSLMode: "disable",\n Reset: false,\n GCInterval: 10 * time.Second,\n}\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/78d978a7.3afe19aa.js b/assets/js/78d978a7.3afe19aa.js deleted file mode 100644 index a7ae11ff55b..00000000000 --- a/assets/js/78d978a7.3afe19aa.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6131],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),c=s(n),d=a,f=c["".concat(p,".").concat(d)]||c[d]||u[d]||i;return n?r.createElement(f,l(l({ref:t},m),{},{components:n})):r.createElement(f,l({ref:t},m))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[c]="string"==typeof e?e:a,l[1]=o;for(var s=2;s<i;s++)l[s]=n[s];return r.createElement.apply(null,l)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},4212:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var r=n(7462),a=(n(7294),n(3905));const i={id:"jet",title:"Jet"},l=void 0,o={unversionedId:"jet/jet",id:"jet/jet",title:"Jet",description:"Release",source:"@site/docs/template/jet/README.md",sourceDirName:"jet",slug:"/jet/",permalink:"/template/next/jet/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/jet/README.md",tags:[],version:"current",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"jet",title:"Jet"},sidebar:"tutorialSidebar",previous:{title:"Golang Templates Cheatsheet",permalink:"/template/next/html/TEMPLATES_CHEATSHEET"},next:{title:"Mustache",permalink:"/template/next/mustache/"}},p={},s=[{value:"Basic Example",id:"basic-example",level:3}],m={toc:s},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Jet is a template engine create by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/CloudyKit/jet"},"cloudykit"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/CloudyKit/jet/wiki/3.-Jet-template-syntax"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},'{{include "partials/header"}}\n\n<h1>{{ Title }}</h1>\n\n{{include "partials/footer"}}\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"<h2>Header</h2>\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"<h2>Footer</h2>\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"<!DOCTYPE html>\n<html>\n\n<head>\n <title>Title\n\n\n\n {{ embed() }}\n\n\n\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n \n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/jet/v2"\n)\n\nfunc main() {\n // Create a new engine\n engine := jet.New("./views", ".jet")\n\n // Or from an embedded system\n // See github.com/gofiber/embed for examples\n // engine := jet.NewFileSystem(http.Dir("./views", ".jet"))\n\n // Pass the engine to the views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/78d978a7.5ef588d3.js b/assets/js/78d978a7.5ef588d3.js new file mode 100644 index 00000000000..a6486c2e50d --- /dev/null +++ b/assets/js/78d978a7.5ef588d3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[6131],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),c=s(n),d=a,f=c["".concat(p,".").concat(d)]||c[d]||u[d]||i;return n?r.createElement(f,l(l({ref:t},m),{},{components:n})):r.createElement(f,l({ref:t},m))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o[c]="string"==typeof e?e:a,l[1]=o;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));const i={id:"jet",title:"Jet"},l=void 0,o={unversionedId:"jet/jet",id:"jet/jet",title:"Jet",description:"Release",source:"@site/docs/template/jet/README.md",sourceDirName:"jet",slug:"/jet/",permalink:"/template/next/jet/",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/jet/README.md",tags:[],version:"current",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"jet",title:"Jet"},sidebar:"tutorialSidebar",previous:{title:"Golang Templates Cheatsheet",permalink:"/template/next/html/TEMPLATES_CHEATSHEET"},next:{title:"Mustache",permalink:"/template/next/mustache/"}},p={},s=[{value:"Basic Example",id:"basic-example",level:3}],m={toc:s},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/template?filter=django*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Tests/badge.svg",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Security/badge.svg",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://github.com/gofiber/template/workflows/Linter/badge.svg",alt:"Linter"})),(0,a.kt)("p",null,"Jet is a template engine create by ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/CloudyKit/jet"},"cloudykit"),", to see the original syntax documentation please ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/CloudyKit/jet/wiki/3.-Jet-template-syntax"},"click here")),(0,a.kt)("h3",{id:"basic-example"},"Basic Example"),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/index.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},'{{include "partials/header"}}\n\n

{{ Title }}

\n\n{{include "partials/footer"}}\n')),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/header.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Header

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/partials/footer.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"

Footer

\n")),(0,a.kt)("p",null,(0,a.kt)("em",{parentName:"p"},(0,a.kt)("strong",{parentName:"em"},"./views/layouts/main.jet"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-html"},"\n\n\n\n Title\n\n\n\n {{ embed() }}\n\n\n\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'package main\n\nimport (\n "log"\n \n "github.com/gofiber/fiber/v2"\n "github.com/gofiber/template/jet/v2"\n)\n\nfunc main() {\n // Create a new engine\n engine := jet.New("./views", ".jet")\n\n // Or from an embedded system\n // See github.com/gofiber/embed for examples\n // engine := jet.NewFileSystem(http.Dir("./views", ".jet"))\n\n // Pass the engine to the views\n app := fiber.New(fiber.Config{\n Views: engine,\n })\n\n app.Get("/", func(c *fiber.Ctx) error {\n // Render index\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n })\n })\n\n app.Get("/layout", func(c *fiber.Ctx) error {\n // Render index within layouts/main\n return c.Render("index", fiber.Map{\n "Title": "Hello, World!",\n }, "layouts/main")\n })\n\n log.Fatal(app.Listen(":3000"))\n}\n\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7902b5a9.cb8d6b33.js b/assets/js/7902b5a9.cb8d6b33.js deleted file mode 100644 index ad8bf77a7ba..00000000000 --- a/assets/js/7902b5a9.cb8d6b33.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5831],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=p(n),b=a,f=u["".concat(s,".").concat(b)]||u[b]||g[b]||l;return n?r.createElement(f,o(o({ref:t},c),{},{components:n})):r.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=b;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:a,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const l={id:"pebble",title:"Pebble"},o=void 0,i={unversionedId:"pebble/pebble",id:"version-memcache_v1.x.x/pebble/pebble",title:"Pebble",description:"Release",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/pebble/README.md",sourceDirName:"pebble",slug:"/pebble/",permalink:"/storage/pebble/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/pebble/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"pebble",title:"Pebble"},sidebar:"tutorialSidebar",previous:{title:"MySQL",permalink:"/storage/mysql/"},next:{title:"Postgres",permalink:"/storage/postgres/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:p},u="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=pebble*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A fast key-value DB using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cockroachdb/pebble"},"cockroachdb/pebble")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Pebble is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"Note: This step is only required if you don't have an existing module."),(0,a.kt)("p",null,"And then install the Pebble implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/pebble\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/pebble"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := pebble.New()\n\n// Initialize custom config\nstore := pebble.New(pebble.Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./db"\n Path string\n\n // Pass write options during write operations\n //\n // Optional. Default is nil\n WriteOptions &pebble.WriteOptions{}\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7902b5a9.f55de494.js b/assets/js/7902b5a9.f55de494.js new file mode 100644 index 00000000000..9d149d6b4be --- /dev/null +++ b/assets/js/7902b5a9.f55de494.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[5831],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=p(n),b=a,m=u["".concat(s,".").concat(b)]||u[b]||g[b]||l;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=b;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:a,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>g,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const l={id:"pebble",title:"Pebble"},o=void 0,i={unversionedId:"pebble/pebble",id:"version-memcache_v1.x.x/pebble/pebble",title:"Pebble",description:"Release",source:"@site/storage_versioned_docs/version-memcache_v1.x.x/pebble/README.md",sourceDirName:"pebble",slug:"/pebble/",permalink:"/storage/memcache_v1.x.x/pebble/",draft:!1,editUrl:"https://github.com/gofiber/storage/edit/main/pebble/README.md",tags:[],version:"memcache_v1.x.x",lastUpdatedAt:1688920089,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{id:"pebble",title:"Pebble"},sidebar:"tutorialSidebar",previous:{title:"MySQL",permalink:"/storage/memcache_v1.x.x/mysql/"},next:{title:"Postgres",permalink:"/storage/memcache_v1.x.x/postgres/"}},s={},p=[{value:"Table of Contents",id:"table-of-contents",level:3},{value:"Signatures",id:"signatures",level:3},{value:"Installation",id:"installation",level:3},{value:"Examples",id:"examples",level:3},{value:"Config",id:"config",level:3},{value:"Default Config",id:"default-config",level:3}],c={toc:p},u="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/v/tag/gofiber/storage?filter=pebble*",alt:"Release"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://gofiber.io/discord"},(0,a.kt)("img",{parentName:"a",src:"https://img.shields.io/discord/704680098577514527?style=flat&label=%F0%9F%92%AC%20discord&color=00ACD7",alt:"Discord"})),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/test-pebble.yml?label=Tests",alt:"Test"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/gosec.yml?label=Security",alt:"Security"}),"\n",(0,a.kt)("img",{parentName:"p",src:"https://img.shields.io/github/actions/workflow/status/gofiber/storage/linter.yml?label=Linter",alt:"Linter"})),(0,a.kt)("p",null,"A fast key-value DB using ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/cockroachdb/pebble"},"cockroachdb/pebble")),(0,a.kt)("h3",{id:"table-of-contents"},"Table of Contents"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#signatures"},"Signatures")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#installation"},"Installation")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#examples"},"Examples")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#config"},"Config")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"#default-config"},"Default Config"))),(0,a.kt)("h3",{id:"signatures"},"Signatures"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},"func New(config ...Config) Storage\nfunc (s *Storage) Get(key string) ([]byte, error)\nfunc (s *Storage) Set(key string, val []byte, exp time.Duration) error\nfunc (s *Storage) Delete(key string) error\nfunc (s *Storage) Reset() error\nfunc (s *Storage) Close() error\nfunc (s *Storage) Conn() *badger.DB\n")),(0,a.kt)("h3",{id:"installation"},"Installation"),(0,a.kt)("p",null,"Pebble is tested on the 2 last ",(0,a.kt)("a",{parentName:"p",href:"https://golang.org/dl/"},"Go versions")," with support for modules. So make sure to initialize one first if you didn't do that yet:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go mod init github.com//\n")),(0,a.kt)("p",null,"Note: This step is only required if you don't have an existing module."),(0,a.kt)("p",null,"And then install the Pebble implementation:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"go get github.com/gofiber/storage/pebble\n")),(0,a.kt)("h3",{id:"examples"},"Examples"),(0,a.kt)("p",null,"Import the storage package."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'import "github.com/gofiber/storage/pebble"\n')),(0,a.kt)("p",null,"You can use the following possibilities to create a storage:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'// Initialize default config\nstore := pebble.New()\n\n// Initialize custom config\nstore := pebble.New(pebble.Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n})\n')),(0,a.kt)("h3",{id:"config"},"Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'type Config struct {\n // Database name\n //\n // Optional. Default is "./db"\n Path string\n\n // Pass write options during write operations\n //\n // Optional. Default is nil\n WriteOptions &pebble.WriteOptions{}\n}\n')),(0,a.kt)("h3",{id:"default-config"},"Default Config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'var ConfigDefault = Config{\n Path: "db",\n WriteOptions: &pebble.WriteOptions{},\n}\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/79f166e2.7599cdcf.js b/assets/js/79f166e2.7599cdcf.js deleted file mode 100644 index ba8258a6d57..00000000000 --- a/assets/js/79f166e2.7599cdcf.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfiber_docs=self.webpackChunkfiber_docs||[]).push([[9],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>d});var n=a(7294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var o=n.createContext({}),p=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},m=function(e){var t=p(e.components);return n.createElement(o.Provider,{value:t},e.children)},u="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},c=n.forwardRef((function(e,t){var a=e.components,l=e.mdxType,i=e.originalType,o=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),u=p(a),c=l,d=u["".concat(o,".").concat(c)]||u[c]||h[c]||i;return a?n.createElement(d,r(r({ref:t},m),{},{components:a})):n.createElement(d,r({ref:t},m))}));function d(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=a.length,r=new Array(i);r[0]=c;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[u]="string"==typeof e?e:l,r[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>p});var n=a(7462),l=(a(7294),a(3905));const i={},r="Golang Templates Cheatsheet",s={unversionedId:"html/TEMPLATES_CHEATSHEET",id:"version-slim_v2.x.x/html/TEMPLATES_CHEATSHEET",title:"Golang Templates Cheatsheet",description:"The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.",source:"@site/template_versioned_docs/version-slim_v2.x.x/html/TEMPLATES_CHEATSHEET.md",sourceDirName:"html",slug:"/html/TEMPLATES_CHEATSHEET",permalink:"/template/html/TEMPLATES_CHEATSHEET",draft:!1,editUrl:"https://github.com/gofiber/template/edit/main/html/TEMPLATES_CHEATSHEET.md",tags:[],version:"slim_v2.x.x",lastUpdatedAt:1688919916,formattedLastUpdatedAt:"Jul 9, 2023",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"HTML",permalink:"/template/html/"},next:{title:"Jet",permalink:"/template/jet/"}},o={},p=[{value:"Table of Contents",id:"table-of-contents",level:2},{value:"Parsing and Creating Templates",id:"parsing-and-creating-templates",level:2},{value:"Naming Templates",id:"naming-templates",level:4},{value:"Creating a Template",id:"creating-a-template",level:4},{value:"Parsing Multiple Templates",id:"parsing-multiple-templates",level:4},{value:"Executing Templates",id:"executing-templates",level:2},{value:"Execute a Single Template",id:"execute-a-single-template",level:4},{value:"Executing a Named Template",id:"executing-a-named-template",level:4},{value:"Template Encoding and HTML",id:"template-encoding-and-html",level:2},{value:"Contextual Encoding",id:"contextual-encoding",level:4},{value:"Safe Strings and HTML Comments",id:"safe-strings-and-html-comments",level:4},{value:"Template Variables",id:"template-variables",level:2},{value:"The dot character (.)",id:"the-dot-character-",level:4},{value:"Variables in Templates",id:"variables-in-templates",level:4},{value:"Template Actions",id:"template-actions",level:2},{value:"If/Else Statements",id:"ifelse-statements",level:4},{value:"Removing Whitespace",id:"removing-whitespace",level:4},{value:"Range Blocks",id:"range-blocks",level:4},{value:"Template Functions",id:"template-functions",level:2},{value:"Indexing structures in Templates",id:"indexing-structures-in-templates",level:4},{value:"The and Function",id:"the-and-function",level:4},{value:"The or Function",id:"the-or-function",level:4},{value:"The not Function",id:"the-not-function",level:4},{value:"Template Comparison Functions",id:"template-comparison-functions",level:2},{value:"Comparisons",id:"comparisons",level:4},{value:"Nested Templates and Layouts",id:"nested-templates-and-layouts",level:2},{value:"Nesting Templates",id:"nesting-templates",level:4},{value:"Passing Variables between Templates",id:"passing-variables-between-templates",level:4},{value:"Creating Layouts",id:"creating-layouts",level:4},{value:"Templates Calling Functions",id:"templates-calling-functions",level:2},{value:"Function Variables (calling struct methods)",id:"function-variables-calling-struct-methods",level:4},{value:"Function Variables (call)",id:"function-variables-call",level:4},{value:"Custom Functions",id:"custom-functions",level:4},{value:"Custom Functions (Globally)",id:"custom-functions-globally",level:4}],m={toc:p},u="wrapper";function h(e){let{components:t,...a}=e;return(0,l.kt)(u,(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"golang-templates-cheatsheet"},"Golang Templates Cheatsheet"),(0,l.kt)("p",null,"The Go standard library provides a set of packages to generate output. The ",(0,l.kt)("a",{parentName:"p",href:"https://archive.is/o/2HksZ/https://golang.org/pkg/text/template/"},"text/template")," package implements templates for generating text output, while the ",(0,l.kt)("a",{parentName:"p",href:"https://archive.is/o/2HksZ/https://golang.org/pkg/html/template/"},"html/template")," package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"table-of-contents"},"Table of Contents"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#parsing-and-creating-templates"},"Parsing and Creating Templates")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#executing-templates"},"Executing Templates")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#template-encoding-and-html"},"Template Encoding and HTML")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#template-variables"},"Template Variables")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#template-actions"},"Template Actions")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#template-functions"},"Template Functions")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#template-comparison-functions"},"Template Comparison Functions")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#nested-templates-and-layouts"},"Nested Templates and Layouts")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#templates-calling-functions"},"Templates Calling Functions"))),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"parsing-and-creating-templates"},"Parsing and Creating Templates"),(0,l.kt)("h4",{id:"naming-templates"},"Naming Templates"),(0,l.kt)("p",null,"There is no defined file extension for Go templates. One of the most popular is ",(0,l.kt)("inlineCode",{parentName:"p"},".tmpl")," supported by vim-go and ",(0,l.kt)("a",{parentName:"p",href:"https://archive.is/o/2HksZ/golang.org/pkg/text/template/%23example_Template_helpers"},"referenced in the text/template godocs"),". The extension ",(0,l.kt)("inlineCode",{parentName:"p"},".gohtml")," supports syntax highlighting in both Atom and GoSublime editors. Finally analysis of large Go codebases finds that ",(0,l.kt)("inlineCode",{parentName:"p"},".tpl")," is often used by developers. While the extension is not important it is still good to be consistent within a project for clarity."),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"creating-a-template"},"Creating a Template"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"tpl, err := template.Parse(filename)")," will get the template at filename and store it in tpl. tpl can then be executed to show the template."),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"parsing-multiple-templates"},"Parsing Multiple Templates"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"template.ParseFiles(filenames)")," takes a list of filenames and stores all templates. ",(0,l.kt)("inlineCode",{parentName:"p"},"template.ParseGlob(pattern)")," will find all templates matching the pattern and store the templates."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"executing-templates"},"Executing Templates"),(0,l.kt)("h4",{id:"execute-a-single-template"},"Execute a Single Template"),(0,l.kt)("p",null,"Once a template has been parsed there are two options to execute them. A single template ",(0,l.kt)("inlineCode",{parentName:"p"},"tpl")," can be executed using ",(0,l.kt)("inlineCode",{parentName:"p"},"tpl.Execute(io.Writer, data)"),". The content of tpl will be written to the io.Writer. Data is an interface passed to the template that will be useable in the template."),(0,l.kt)("hr",null),(0,l.kt)("h4",{id:"executing-a-named-template"},"Executing a Named Template"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"tpl.ExecuteTemplate(io.Writer, name, data)")," works the same as execute but allows for a string name of the template the user wants to execute."),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"template-encoding-and-html"},"Template Encoding and HTML"),(0,l.kt)("h4",{id:"contextual-encoding"},"Contextual Encoding"),(0,l.kt)("p",null,"Go\u2019s html/template package does encoding based on the context of the code. As a result, html/template encodes any characters that need encoding to be rendered correctly."),(0,l.kt)("p",null,"For example the < and > in ",(0,l.kt)("inlineCode",{parentName:"p"},'"

A header!

"')," will be encoded as ",(0,l.kt)("inlineCode",{parentName:"p"},"<h1>A header!</h1>")," ."),(0,l.kt)("p",null,"Type ",(0,l.kt)("inlineCode",{parentName:"p"},"template.HTML")," can be used to skip encoding by telling Go the string is safe. ",(0,l.kt)("inlineCode",{parentName:"p"},'template.HTML("

A Safe header

")')," will then be ",(0,l.kt)("inlineCode",{parentName:"p"},"

A Safe header

")," . Using this type with user input is dangerous and leaves the application vulnerable."),(0,l.kt)("p",null,"The go ",(0,l.kt)("inlineCode",{parentName:"p"},"html/template")," package is aware of attributes within the template and will encode values differently based on the attribute."),(0,l.kt)("p",null,"Go templates can also be used with javascript. Structs and maps will be expanded into JSON objects and quotes will be added to strings for use in function parameters and as variable values."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-go"},' // Go\n type Cat struct {\n Name string\n Age int\n }\n\n kitten := Cat{"Sam", 12}\n')),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-html"},"// Template\n
Version: v2.x

🧬 Middleware

Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.

- - + + \ No newline at end of file diff --git a/category/api/index.html b/category/api/index.html index 13597895b8b..404325d3379 100644 --- a/category/api/index.html +++ b/category/api/index.html @@ -6,13 +6,13 @@ API | Fiber - - + + - - + + \ No newline at end of file diff --git a/category/extra/index.html b/category/extra/index.html index 12f971baed7..87de2de4ec7 100644 --- a/category/extra/index.html +++ b/category/extra/index.html @@ -6,13 +6,13 @@ Extra | Fiber - - + + - - + + \ No newline at end of file diff --git a/category/guide/index.html b/category/guide/index.html index b9d685179c0..ecbb6fc3c60 100644 --- a/category/guide/index.html +++ b/category/guide/index.html @@ -6,13 +6,13 @@ Guide | Fiber - - + + - - + + \ No newline at end of file diff --git a/contrib/casbin/index.html b/contrib/casbin/index.html index 8734f485ed7..b578a388b99 100644 --- a/contrib/casbin/index.html +++ b/contrib/casbin/index.html @@ -6,8 +6,8 @@ Casbin | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Casbin middleware for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/casbin

choose an adapter from here

go get -u github.com/casbin/xorm-adapter

Signature

casbin.New(config ...casbin.Config) *casbin.Middleware

Config

PropertyTypeDescriptionDefault
ModelFilePathstringModel file path"./model.conf"
PolicyAdapterpersist.AdapterDatabase adapter for policies./policy.csv
Enforcer*casbin.EnforcerCustom casbin enforcerMiddleware generated enforcer using ModelFilePath & PolicyAdapter
Lookupfunc(*fiber.Ctx) stringLook up for current subject""
Unauthorizedfunc(*fiber.Ctx) errorResponse body for unauthorized responsesUnauthorized
Forbiddenfunc(*fiber.Ctx) errorResponse body for forbidden responsesForbidden

Examples

CustomPermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Post("/blog",
authz.RequiresPermissions([]string{"blog:create"}, casbin.WithValidationRule(casbin.MatchAllRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Delete("/blog/:id",
authz.RequiresPermissions([]string{"blog:create", "blog:delete"}, casbin.WithValidationRule(casbin.AtLeastOneRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoutePermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

// check permission with Method and Path
app.Post("/blog",
authz.RoutePermission(),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoleAuthorization

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Put("/blog/:id",
authz.RequiresRoles([]string{"admin"}),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}
- - +Linter

Casbin middleware for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/casbin

choose an adapter from here

go get -u github.com/casbin/xorm-adapter

Signature

casbin.New(config ...casbin.Config) *casbin.Middleware

Config

PropertyTypeDescriptionDefault
ModelFilePathstringModel file path"./model.conf"
PolicyAdapterpersist.AdapterDatabase adapter for policies./policy.csv
Enforcer*casbin.EnforcerCustom casbin enforcerMiddleware generated enforcer using ModelFilePath & PolicyAdapter
Lookupfunc(*fiber.Ctx) stringLook up for current subject""
Unauthorizedfunc(*fiber.Ctx) errorResponse body for unauthorized responsesUnauthorized
Forbiddenfunc(*fiber.Ctx) errorResponse body for forbidden responsesForbidden

Examples

CustomPermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Post("/blog",
authz.RequiresPermissions([]string{"blog:create"}, casbin.WithValidationRule(casbin.MatchAllRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Delete("/blog/:id",
authz.RequiresPermissions([]string{"blog:create", "blog:delete"}, casbin.WithValidationRule(casbin.AtLeastOneRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoutePermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

// check permission with Method and Path
app.Post("/blog",
authz.RoutePermission(),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoleAuthorization

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Put("/blog/:id",
authz.RequiresRoles([]string{"admin"}),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/fiberi18n/index.html b/contrib/fiberi18n/index.html index e6cb91da50d..cf8ee68919b 100644 --- a/contrib/fiberi18n/index.html +++ b/contrib/fiberi18n/index.html @@ -6,8 +6,8 @@ Fiberi18n | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

go-i18n support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberi18n

Signature

fiberi18n.New(config ...*Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(c *fiber.Ctx) boolA function to skip this middleware when returned true.nil
RootPathstringThe i18n template folder path."./example/localize"
AcceptLanguages[]language.TagA collection of languages that can be processed.[]language.Tag{language.Chinese, language.English}
FormatBundleFilestringThe type of the template file."yaml"
DefaultLanguagelanguage.TagThe default returned language type.language.English
LoaderLoaderThe implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile.LoaderFunc(os.ReadFile)
UnmarshalFunci18n.UnmarshalFuncThe function used for decoding template files.yaml.Unmarshal
LangHandlerfunc(ctx *fiber.Ctx, defaultLang string) stringUsed to get the kind of language handled by *fiber.Ctx and defaultLang.Retrieved from the request header Accept-Language or query parameter lang.

Example

package main

import (
"github.com/gofiber/contrib/fiberi18n"
"github.com/gofiber/fiber/v2"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
)

func main() {
app := fiber.New()
app.Use(
fiberi18n.New(&fiberi18n.Config{
RootPath: "./example/localize",
AcceptLanguages: []language.Tag{language.Chinese, language.English},
DefaultLanguage: language.Chinese,
}),
)
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(fiberi18n.MustGetMessage("welcome"))
})
app.Get("/:name", func(ctx *fiber.Ctx) error {
return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{
MessageID: "welcomeWithName",
TemplateData: map[string]string{
"name": ctx.Params("name"),
},
}))
})
app.Listen("127.0.0.1:3000")
}
- - +Linter

go-i18n support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberi18n

Signature

fiberi18n.New(config ...*Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(c *fiber.Ctx) boolA function to skip this middleware when returned true.nil
RootPathstringThe i18n template folder path."./example/localize"
AcceptLanguages[]language.TagA collection of languages that can be processed.[]language.Tag{language.Chinese, language.English}
FormatBundleFilestringThe type of the template file."yaml"
DefaultLanguagelanguage.TagThe default returned language type.language.English
LoaderLoaderThe implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile.LoaderFunc(os.ReadFile)
UnmarshalFunci18n.UnmarshalFuncThe function used for decoding template files.yaml.Unmarshal
LangHandlerfunc(ctx *fiber.Ctx, defaultLang string) stringUsed to get the kind of language handled by *fiber.Ctx and defaultLang.Retrieved from the request header Accept-Language or query parameter lang.

Example

package main

import (
"github.com/gofiber/contrib/fiberi18n"
"github.com/gofiber/fiber/v2"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
)

func main() {
app := fiber.New()
app.Use(
fiberi18n.New(&fiberi18n.Config{
RootPath: "./example/localize",
AcceptLanguages: []language.Tag{language.Chinese, language.English},
DefaultLanguage: language.Chinese,
}),
)
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(fiberi18n.MustGetMessage("welcome"))
})
app.Get("/:name", func(ctx *fiber.Ctx) error {
return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{
MessageID: "welcomeWithName",
TemplateData: map[string]string{
"name": ctx.Params("name"),
},
}))
})
app.Listen("127.0.0.1:3000")
}
+ + \ No newline at end of file diff --git a/contrib/fibernewrelic/index.html b/contrib/fibernewrelic/index.html index 4bbe566a3b1..06135efee2f 100644 --- a/contrib/fibernewrelic/index.html +++ b/contrib/fibernewrelic/index.html @@ -6,8 +6,8 @@ Fibernewrelic | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

NewRelic support for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibernewrelic

Signature

fibernewrelic.New(config fibernewrelic.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
LicensestringRequired - New Relic License Key""
AppNamestringNew Relic Application Namefiber-api
EnabledboolEnable/Disable New Relicfalse
TransportTypestringCan be HTTP or HTTPS (Deprecated)"HTTP"
ApplicationApplicationExisting New Relic Appnil
ErrorStatusCodeHandlerfunc(c *fiber.Ctx, err error) intIf you want to change newrelic status code, you can use it.DefaultErrorStatusCodeHandler

Usage

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
)

func main() {
app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
License: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
AppName: "MyCustomApi",
Enabled: true,
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}

Usage with existing New Relic application

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
"github.com/newrelic/go-agent/v3/newrelic"
)

func main() {
newrelicApp, err := newrelic.NewApplication(
newrelic.ConfigAppName("MyCustomApi"),
newrelic.ConfigLicense("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
newrelic.ConfigEnabled(true),
)

app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
Application: newrelicApp
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}
- - +Linter

NewRelic support for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibernewrelic

Signature

fibernewrelic.New(config fibernewrelic.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
LicensestringRequired - New Relic License Key""
AppNamestringNew Relic Application Namefiber-api
EnabledboolEnable/Disable New Relicfalse
TransportTypestringCan be HTTP or HTTPS (Deprecated)"HTTP"
ApplicationApplicationExisting New Relic Appnil
ErrorStatusCodeHandlerfunc(c *fiber.Ctx, err error) intIf you want to change newrelic status code, you can use it.DefaultErrorStatusCodeHandler

Usage

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
)

func main() {
app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
License: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
AppName: "MyCustomApi",
Enabled: true,
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}

Usage with existing New Relic application

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
"github.com/newrelic/go-agent/v3/newrelic"
)

func main() {
newrelicApp, err := newrelic.NewApplication(
newrelic.ConfigAppName("MyCustomApi"),
newrelic.ConfigLicense("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
newrelic.ConfigEnabled(true),
)

app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
Application: newrelicApp
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/fibersentry/index.html b/contrib/fibersentry/index.html index 009740c0f06..26ba905086e 100644 --- a/contrib/fibersentry/index.html +++ b/contrib/fibersentry/index.html @@ -6,8 +6,8 @@ Fibersentry | Fiber - - + +
@@ -17,8 +17,8 @@ Security Linter

Sentry support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibersentry
go get -u github.com/getsentry/sentry-go

Signature

fibersentry.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RepanicboolRepanic configures whether Sentry should repanic after recovery. Set to true, if Recover middleware is used.false
WaitForDeliveryboolWaitForDelivery configures whether you want to block the request before moving forward with the response. If Recover middleware is used, it's safe to either skip this option or set it to false.false
Timeouttime.DurationTimeout for the event delivery requests.time.Second * 2

Usage

fibersentry attaches an instance of *sentry.Hub (https://godoc.org/github.com/getsentry/sentry-go#Hub) to the request's context, which makes it available throughout the rest of the request's lifetime. You can access it by using the fibersentry.GetHubFromContext() method on the context itself in any of your proceeding middleware and routes. -And it should be used instead of the global sentry.CaptureMessage, sentry.CaptureException, or any other calls, as it keeps the separation of data between the requests.

Keep in mind that *sentry.Hub won't be available in middleware attached before to fibersentry!

package main

import (
"fmt"
"log"

"github.com/getsentry/sentry-go"
"github.com/gofiber/contrib/fibersentry"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/utils"
)

func main() {
_ = sentry.Init(sentry.ClientOptions{
Dsn: "",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(utils.ImmutableString(c.Hostname()))
}
}
fmt.Println(event)
return event
},
Debug: true,
AttachStacktrace: true,
})

app := fiber.New()

app.Use(fibersentry.New(fibersentry.Config{
Repanic: true,
WaitForDelivery: true,
}))

enhanceSentryEvent := func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")
}
return c.Next()
}

app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {
panic("y tho")
})

app.All("/", func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.WithScope(func(scope *sentry.Scope) {
scope.SetExtra("unwantedQuery", "someQueryDataMaybe")
hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")
})
}
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

Accessing Context in BeforeSend callback

sentry.Init(sentry.ClientOptions{
Dsn: "your-public-dsn",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(c.Hostname())
}
}
return event
},
})
- - +And it should be used instead of the global sentry.CaptureMessage, sentry.CaptureException, or any other calls, as it keeps the separation of data between the requests.

Keep in mind that *sentry.Hub won't be available in middleware attached before to fibersentry!

package main

import (
"fmt"
"log"

"github.com/getsentry/sentry-go"
"github.com/gofiber/contrib/fibersentry"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/utils"
)

func main() {
_ = sentry.Init(sentry.ClientOptions{
Dsn: "",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(utils.ImmutableString(c.Hostname()))
}
}
fmt.Println(event)
return event
},
Debug: true,
AttachStacktrace: true,
})

app := fiber.New()

app.Use(fibersentry.New(fibersentry.Config{
Repanic: true,
WaitForDelivery: true,
}))

enhanceSentryEvent := func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")
}
return c.Next()
}

app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {
panic("y tho")
})

app.All("/", func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.WithScope(func(scope *sentry.Scope) {
scope.SetExtra("unwantedQuery", "someQueryDataMaybe")
hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")
})
}
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

Accessing Context in BeforeSend callback

sentry.Init(sentry.ClientOptions{
Dsn: "your-public-dsn",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(c.Hostname())
}
}
return event
},
})
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/casbin/index.html b/contrib/fibersentry_v1.x.x/casbin/index.html index be4b2e80cd8..76acc35ed1c 100644 --- a/contrib/fibersentry_v1.x.x/casbin/index.html +++ b/contrib/fibersentry_v1.x.x/casbin/index.html @@ -6,8 +6,8 @@ Casbin | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Casbin middleware for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/casbin

choose an adapter from here

go get -u github.com/casbin/xorm-adapter

Signature

casbin.New(config ...casbin.Config) *casbin.Middleware

Config

PropertyTypeDescriptionDefault
ModelFilePathstringModel file path"./model.conf"
PolicyAdapterpersist.AdapterDatabase adapter for policies./policy.csv
Enforcer*casbin.EnforcerCustom casbin enforcerMiddleware generated enforcer using ModelFilePath & PolicyAdapter
Lookupfunc(*fiber.Ctx) stringLook up for current subject""
Unauthorizedfunc(*fiber.Ctx) errorResponse body for unauthorized responsesUnauthorized
Forbiddenfunc(*fiber.Ctx) errorResponse body for forbidden responsesForbidden

Examples

CustomPermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Post("/blog",
authz.RequiresPermissions([]string{"blog:create"}, casbin.WithValidationRule(casbin.MatchAllRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Delete("/blog/:id",
authz.RequiresPermissions([]string{"blog:create", "blog:delete"}, casbin.WithValidationRule(casbin.AtLeastOneRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoutePermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

// check permission with Method and Path
app.Post("/blog",
authz.RoutePermission(),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoleAuthorization

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Put("/blog/:id",
authz.RequiresRoles([]string{"admin"}),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}
- - +Linter

Casbin middleware for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/casbin

choose an adapter from here

go get -u github.com/casbin/xorm-adapter

Signature

casbin.New(config ...casbin.Config) *casbin.Middleware

Config

PropertyTypeDescriptionDefault
ModelFilePathstringModel file path"./model.conf"
PolicyAdapterpersist.AdapterDatabase adapter for policies./policy.csv
Enforcer*casbin.EnforcerCustom casbin enforcerMiddleware generated enforcer using ModelFilePath & PolicyAdapter
Lookupfunc(*fiber.Ctx) stringLook up for current subject""
Unauthorizedfunc(*fiber.Ctx) errorResponse body for unauthorized responsesUnauthorized
Forbiddenfunc(*fiber.Ctx) errorResponse body for forbidden responsesForbidden

Examples

CustomPermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Post("/blog",
authz.RequiresPermissions([]string{"blog:create"}, casbin.WithValidationRule(casbin.MatchAllRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Delete("/blog/:id",
authz.RequiresPermissions([]string{"blog:create", "blog:delete"}, casbin.WithValidationRule(casbin.AtLeastOneRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoutePermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

// check permission with Method and Path
app.Post("/blog",
authz.RoutePermission(),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoleAuthorization

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Put("/blog/:id",
authz.RequiresRoles([]string{"admin"}),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/fiberi18n/index.html b/contrib/fibersentry_v1.x.x/fiberi18n/index.html index 4c04614a153..3503685ec36 100644 --- a/contrib/fibersentry_v1.x.x/fiberi18n/index.html +++ b/contrib/fibersentry_v1.x.x/fiberi18n/index.html @@ -6,8 +6,8 @@ Fiberi18n | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

go-i18n support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberi18n

Signature

fiberi18n.New(config ...*Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(c *fiber.Ctx) boolA function to skip this middleware when returned true.nil
RootPathstringThe i18n template folder path."./example/localize"
AcceptLanguages[]language.TagA collection of languages that can be processed.[]language.Tag{language.Chinese, language.English}
FormatBundleFilestringThe type of the template file."yaml"
DefaultLanguagelanguage.TagThe default returned language type.language.English
LoaderLoaderThe implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile.LoaderFunc(os.ReadFile)
UnmarshalFunci18n.UnmarshalFuncThe function used for decoding template files.yaml.Unmarshal
LangHandlerfunc(ctx *fiber.Ctx, defaultLang string) stringUsed to get the kind of language handled by *fiber.Ctx and defaultLang.Retrieved from the request header Accept-Language or query parameter lang.

Example

package main

import (
"github.com/gofiber/contrib/fiberi18n"
"github.com/gofiber/fiber/v2"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
)

func main() {
app := fiber.New()
app.Use(
fiberi18n.New(&fiberi18n.Config{
RootPath: "./example/localize",
AcceptLanguages: []language.Tag{language.Chinese, language.English},
DefaultLanguage: language.Chinese,
}),
)
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(fiberi18n.MustGetMessage("welcome"))
})
app.Get("/:name", func(ctx *fiber.Ctx) error {
return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{
MessageID: "welcomeWithName",
TemplateData: map[string]string{
"name": ctx.Params("name"),
},
}))
})
app.Listen("127.0.0.1:3000")
}
- - +Linter

go-i18n support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberi18n

Signature

fiberi18n.New(config ...*Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(c *fiber.Ctx) boolA function to skip this middleware when returned true.nil
RootPathstringThe i18n template folder path."./example/localize"
AcceptLanguages[]language.TagA collection of languages that can be processed.[]language.Tag{language.Chinese, language.English}
FormatBundleFilestringThe type of the template file."yaml"
DefaultLanguagelanguage.TagThe default returned language type.language.English
LoaderLoaderThe implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile.LoaderFunc(os.ReadFile)
UnmarshalFunci18n.UnmarshalFuncThe function used for decoding template files.yaml.Unmarshal
LangHandlerfunc(ctx *fiber.Ctx, defaultLang string) stringUsed to get the kind of language handled by *fiber.Ctx and defaultLang.Retrieved from the request header Accept-Language or query parameter lang.

Example

package main

import (
"github.com/gofiber/contrib/fiberi18n"
"github.com/gofiber/fiber/v2"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
)

func main() {
app := fiber.New()
app.Use(
fiberi18n.New(&fiberi18n.Config{
RootPath: "./example/localize",
AcceptLanguages: []language.Tag{language.Chinese, language.English},
DefaultLanguage: language.Chinese,
}),
)
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(fiberi18n.MustGetMessage("welcome"))
})
app.Get("/:name", func(ctx *fiber.Ctx) error {
return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{
MessageID: "welcomeWithName",
TemplateData: map[string]string{
"name": ctx.Params("name"),
},
}))
})
app.Listen("127.0.0.1:3000")
}
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/fibernewrelic/index.html b/contrib/fibersentry_v1.x.x/fibernewrelic/index.html index 694167aa6ef..7f79522688c 100644 --- a/contrib/fibersentry_v1.x.x/fibernewrelic/index.html +++ b/contrib/fibersentry_v1.x.x/fibernewrelic/index.html @@ -6,8 +6,8 @@ Fibernewrelic | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

NewRelic support for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibernewrelic

Signature

fibernewrelic.New(config fibernewrelic.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
LicensestringRequired - New Relic License Key""
AppNamestringNew Relic Application Namefiber-api
EnabledboolEnable/Disable New Relicfalse
TransportTypestringCan be HTTP or HTTPS (Deprecated)"HTTP"
ApplicationApplicationExisting New Relic Appnil
ErrorStatusCodeHandlerfunc(c *fiber.Ctx, err error) intIf you want to change newrelic status code, you can use it.DefaultErrorStatusCodeHandler

Usage

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
)

func main() {
app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
License: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
AppName: "MyCustomApi",
Enabled: true,
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}

Usage with existing New Relic application

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
"github.com/newrelic/go-agent/v3/newrelic"
)

func main() {
newrelicApp, err := newrelic.NewApplication(
newrelic.ConfigAppName("MyCustomApi"),
newrelic.ConfigLicense("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
newrelic.ConfigEnabled(true),
)

app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
Application: newrelicApp
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}
- - +Linter

NewRelic support for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibernewrelic

Signature

fibernewrelic.New(config fibernewrelic.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
LicensestringRequired - New Relic License Key""
AppNamestringNew Relic Application Namefiber-api
EnabledboolEnable/Disable New Relicfalse
TransportTypestringCan be HTTP or HTTPS (Deprecated)"HTTP"
ApplicationApplicationExisting New Relic Appnil
ErrorStatusCodeHandlerfunc(c *fiber.Ctx, err error) intIf you want to change newrelic status code, you can use it.DefaultErrorStatusCodeHandler

Usage

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
)

func main() {
app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
License: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
AppName: "MyCustomApi",
Enabled: true,
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}

Usage with existing New Relic application

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
"github.com/newrelic/go-agent/v3/newrelic"
)

func main() {
newrelicApp, err := newrelic.NewApplication(
newrelic.ConfigAppName("MyCustomApi"),
newrelic.ConfigLicense("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
newrelic.ConfigEnabled(true),
)

app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
Application: newrelicApp
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/fibersentry/index.html b/contrib/fibersentry_v1.x.x/fibersentry/index.html index d512ba96149..23f9b486194 100644 --- a/contrib/fibersentry_v1.x.x/fibersentry/index.html +++ b/contrib/fibersentry_v1.x.x/fibersentry/index.html @@ -6,8 +6,8 @@ Fibersentry | Fiber - - + +
@@ -17,8 +17,8 @@ Security Linter

Sentry support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibersentry
go get -u github.com/getsentry/sentry-go

Signature

fibersentry.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RepanicboolRepanic configures whether Sentry should repanic after recovery. Set to true, if Recover middleware is used.false
WaitForDeliveryboolWaitForDelivery configures whether you want to block the request before moving forward with the response. If Recover middleware is used, it's safe to either skip this option or set it to false.false
Timeouttime.DurationTimeout for the event delivery requests.time.Second * 2

Usage

fibersentry attaches an instance of *sentry.Hub (https://godoc.org/github.com/getsentry/sentry-go#Hub) to the request's context, which makes it available throughout the rest of the request's lifetime. You can access it by using the fibersentry.GetHubFromContext() method on the context itself in any of your proceeding middleware and routes. -And it should be used instead of the global sentry.CaptureMessage, sentry.CaptureException, or any other calls, as it keeps the separation of data between the requests.

Keep in mind that *sentry.Hub won't be available in middleware attached before to fibersentry!

package main

import (
"fmt"
"log"

"github.com/getsentry/sentry-go"
"github.com/gofiber/contrib/fibersentry"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/utils"
)

func main() {
_ = sentry.Init(sentry.ClientOptions{
Dsn: "",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(utils.ImmutableString(c.Hostname()))
}
}
fmt.Println(event)
return event
},
Debug: true,
AttachStacktrace: true,
})

app := fiber.New()

app.Use(fibersentry.New(fibersentry.Config{
Repanic: true,
WaitForDelivery: true,
}))

enhanceSentryEvent := func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")
}
return c.Next()
}

app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {
panic("y tho")
})

app.All("/", func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.WithScope(func(scope *sentry.Scope) {
scope.SetExtra("unwantedQuery", "someQueryDataMaybe")
hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")
})
}
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

Accessing Context in BeforeSend callback

sentry.Init(sentry.ClientOptions{
Dsn: "your-public-dsn",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(c.Hostname())
}
}
return event
},
})
- - +And it should be used instead of the global sentry.CaptureMessage, sentry.CaptureException, or any other calls, as it keeps the separation of data between the requests.

Keep in mind that *sentry.Hub won't be available in middleware attached before to fibersentry!

package main

import (
"fmt"
"log"

"github.com/getsentry/sentry-go"
"github.com/gofiber/contrib/fibersentry"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/utils"
)

func main() {
_ = sentry.Init(sentry.ClientOptions{
Dsn: "",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(utils.ImmutableString(c.Hostname()))
}
}
fmt.Println(event)
return event
},
Debug: true,
AttachStacktrace: true,
})

app := fiber.New()

app.Use(fibersentry.New(fibersentry.Config{
Repanic: true,
WaitForDelivery: true,
}))

enhanceSentryEvent := func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")
}
return c.Next()
}

app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {
panic("y tho")
})

app.All("/", func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.WithScope(func(scope *sentry.Scope) {
scope.SetExtra("unwantedQuery", "someQueryDataMaybe")
hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")
})
}
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

Accessing Context in BeforeSend callback

sentry.Init(sentry.ClientOptions{
Dsn: "your-public-dsn",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(c.Hostname())
}
}
return event
},
})
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/fiberzap/index.html b/contrib/fibersentry_v1.x.x/fiberzap/index.html index 12ee951a844..776736ef836 100644 --- a/contrib/fibersentry_v1.x.x/fiberzap/index.html +++ b/contrib/fibersentry_v1.x.x/fiberzap/index.html @@ -6,8 +6,8 @@ Fiberzap | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Zap logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzap
go get -u go.uber.org/zap

Signature

fiberzap.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zap.LoggerAdd custom zap logger.zap.NewDevelopment()
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zapcore.LevelCustom response levels.[]zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzap"
"go.uber.org/zap"
)

func main() {
app := fiber.New()
logger, _ := zap.NewProduction()

app.Use(fiberzap.New(fiberzap.Config{
Logger: logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

log.Fatal(app.Listen(":3000"))
}
- - +Linter

Zap logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzap
go get -u go.uber.org/zap

Signature

fiberzap.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zap.LoggerAdd custom zap logger.zap.NewDevelopment()
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zapcore.LevelCustom response levels.[]zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzap"
"go.uber.org/zap"
)

func main() {
app := fiber.New()
logger, _ := zap.NewProduction()

app.Use(fiberzap.New(fiberzap.Config{
Logger: logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

log.Fatal(app.Listen(":3000"))
}
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/fiberzerolog/index.html b/contrib/fibersentry_v1.x.x/fiberzerolog/index.html index d62ca1ae729..8bbb65d9550 100644 --- a/contrib/fibersentry_v1.x.x/fiberzerolog/index.html +++ b/contrib/fibersentry_v1.x.x/fiberzerolog/index.html @@ -6,8 +6,8 @@ Fiberzerolog | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Zerolog logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzerolog
go get -u github.com/rs/zerolog/log

Signature

fiberzerolog.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zerolog.LoggerAdd custom zerolog logger.zerolog.New(os.Stderr).With().Timestamp().Logger()
GetLoggerfunc(*fiber.Ctx) zerolog.LoggerGet custom zerolog logger, if it's defined the returned logger will replace the Logger value.nil
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url", "error"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zerolog.LevelCustom response levels.[]zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzerolog"
"github.com/rs/zerolog"
)

func main() {
app := fiber.New()
logger := zerolog.New(os.Stderr).With().Timestamp().Logger()

app.Use(fiberzerolog.New(fiberzerolog.Config{
Logger: &logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

if err := app.Listen(":3000"); err != nil {
logger.Fatal().Err(err).Msg("Fiber app error")
}
}
- - +Linter

Zerolog logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzerolog
go get -u github.com/rs/zerolog/log

Signature

fiberzerolog.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zerolog.LoggerAdd custom zerolog logger.zerolog.New(os.Stderr).With().Timestamp().Logger()
GetLoggerfunc(*fiber.Ctx) zerolog.LoggerGet custom zerolog logger, if it's defined the returned logger will replace the Logger value.nil
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url", "error"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zerolog.LevelCustom response levels.[]zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzerolog"
"github.com/rs/zerolog"
)

func main() {
app := fiber.New()
logger := zerolog.New(os.Stderr).With().Timestamp().Logger()

app.Use(fiberzerolog.New(fiberzerolog.Config{
Logger: &logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

if err := app.Listen(":3000"); err != nil {
logger.Fatal().Err(err).Msg("Fiber app error")
}
}
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/index.html b/contrib/fibersentry_v1.x.x/index.html index c42aebfd50e..187c5f3ac83 100644 --- a/contrib/fibersentry_v1.x.x/index.html +++ b/contrib/fibersentry_v1.x.x/index.html @@ -6,16 +6,16 @@ 👋 Welcome | Fiber - - + + - - +Linter

Repository for third party middlewares with dependencies.

📑 Middleware Implementations

+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/jwt/index.html b/contrib/fibersentry_v1.x.x/jwt/index.html index 7f035ff5e7d..c00575adfe1 100644 --- a/contrib/fibersentry_v1.x.x/jwt/index.html +++ b/contrib/fibersentry_v1.x.x/jwt/index.html @@ -6,8 +6,8 @@ JWT | Fiber - - + +
@@ -24,8 +24,8 @@ This is one of the three options to provide a token validation key. The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey. Required if neither SigningKeys nor SigningKey is provided. -Default to an internal implementation verifying the signing algorithm and selecting the proper key.

package main

import (
"fmt"
"github.com/gofiber/fiber/v2"

jwtware "github.com/gofiber/contrib/jwt"
"github.com/golang-jwt/jwt/v5"
)

func main() {
app := fiber.New()

app.Use(jwtware.New(jwtware.Config{
KeyFunc: customKeyFunc(),
}))

app.Get("/ok", func(c *fiber.Ctx) error {
return c.SendString("OK")
})
}

func customKeyFunc() jwt.Keyfunc {
return func(t *jwt.Token) (interface{}, error) {
// Always check the signing method
if t.Method.Alg() != jwtware.HS256 {
return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])
}

// TODO custom implementation of loading signing key like from a database
signingKey := "secret"

return []byte(signingKey), nil
}
}
- - +Default to an internal implementation verifying the signing algorithm and selecting the proper key.

package main

import (
"fmt"
"github.com/gofiber/fiber/v2"

jwtware "github.com/gofiber/contrib/jwt"
"github.com/golang-jwt/jwt/v5"
)

func main() {
app := fiber.New()

app.Use(jwtware.New(jwtware.Config{
KeyFunc: customKeyFunc(),
}))

app.Get("/ok", func(c *fiber.Ctx) error {
return c.SendString("OK")
})
}

func customKeyFunc() jwt.Keyfunc {
return func(t *jwt.Token) (interface{}, error) {
// Always check the signing method
if t.Method.Alg() != jwtware.HS256 {
return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])
}

// TODO custom implementation of loading signing key like from a database
signingKey := "secret"

return []byte(signingKey), nil
}
}
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/opafiber/index.html b/contrib/fibersentry_v1.x.x/opafiber/index.html index 6b2926b0667..196b6f21223 100644 --- a/contrib/fibersentry_v1.x.x/opafiber/index.html +++ b/contrib/fibersentry_v1.x.x/opafiber/index.html @@ -6,8 +6,8 @@ Opafiber | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Open Policy Agent support for Fiber.

Note: Requires Go 1.18 and above

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/opafiber

Signature

opafiber.New(config opafiber.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RegoQuerystringRequired - Rego query-
RegoPolicyio.ReaderRequired - Rego policy-
IncludeQueryStringboolInclude query string as input to rego policyfalse
DeniedStatusCodeintHttp status code to return when policy denies request400
DeniedResponseMessagestringHttp response body text to return when policy denies request""
IncludeHeaders[]stringInclude headers as input to rego policy-
InputCreationMethodInputCreationFuncUse your own function to provide input for OPAfunc defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)

Types

type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)

Usage

OPA Fiber middleware sends the following example data to the policy engine as input:

{
"method": "GET",
"path": "/somePath",
"query": {
"name": ["John Doe"]
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
}
}
package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/opafiber"
)

func main() {
app := fiber.New()
module := `
package example.authz

default allow := false

allow {
input.method == "GET"
}
`

cfg := opafiber.Config{
RegoQuery: "data.example.authz.allow",
RegoPolicy: bytes.NewBufferString(module),
IncludeQueryString: true,
DeniedStatusCode: fiber.StatusForbidden,
DeniedResponseMessage: "status forbidden",
IncludeHeaders: []string{"Authorization"},
InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {
return map[string]interface{}{
"method": ctx.Method(),
"path": ctx.Path(),
}, nil
},
}
app.Use(opafiber.New(cfg))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

app.Listen(":8080")
}
- - +Linter

Open Policy Agent support for Fiber.

Note: Requires Go 1.18 and above

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/opafiber

Signature

opafiber.New(config opafiber.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RegoQuerystringRequired - Rego query-
RegoPolicyio.ReaderRequired - Rego policy-
IncludeQueryStringboolInclude query string as input to rego policyfalse
DeniedStatusCodeintHttp status code to return when policy denies request400
DeniedResponseMessagestringHttp response body text to return when policy denies request""
IncludeHeaders[]stringInclude headers as input to rego policy-
InputCreationMethodInputCreationFuncUse your own function to provide input for OPAfunc defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)

Types

type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)

Usage

OPA Fiber middleware sends the following example data to the policy engine as input:

{
"method": "GET",
"path": "/somePath",
"query": {
"name": ["John Doe"]
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
}
}
package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/opafiber"
)

func main() {
app := fiber.New()
module := `
package example.authz

default allow := false

allow {
input.method == "GET"
}
`

cfg := opafiber.Config{
RegoQuery: "data.example.authz.allow",
RegoPolicy: bytes.NewBufferString(module),
IncludeQueryString: true,
DeniedStatusCode: fiber.StatusForbidden,
DeniedResponseMessage: "status forbidden",
IncludeHeaders: []string{"Authorization"},
InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {
return map[string]interface{}{
"method": ctx.Method(),
"path": ctx.Path(),
}, nil
},
}
app.Use(opafiber.New(cfg))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/otelfiber/example/index.html b/contrib/fibersentry_v1.x.x/otelfiber/example/index.html index 28d50f6f8d4..7c1eec106ce 100644 --- a/contrib/fibersentry_v1.x.x/otelfiber/example/index.html +++ b/contrib/fibersentry_v1.x.x/otelfiber/example/index.html @@ -6,8 +6,8 @@ Example | Fiber - - + +
@@ -16,8 +16,8 @@ stdout.

These instructions expect you have docker-compose installed.

Bring up the fiber-server and fiber-client services to run the example:

docker-compose up --detach fiber-server fiber-client

The fiber-client service sends just one HTTP request to fiber-server -and then exits. View the span generated by fiber-server in the logs:

docker-compose logs fiber-server

Shut down the services when you are finished with the example:

docker-compose down
- - +and then exits. View the span generated by fiber-server in the logs:

docker-compose logs fiber-server

Shut down the services when you are finished with the example:

docker-compose down
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/otelfiber/index.html b/contrib/fibersentry_v1.x.x/otelfiber/index.html index 219a6e173c2..5089605b670 100644 --- a/contrib/fibersentry_v1.x.x/otelfiber/index.html +++ b/contrib/fibersentry_v1.x.x/otelfiber/index.html @@ -6,8 +6,8 @@ Otelfiber | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

OpenTelemetry support for Fiber.

Can be found on OpenTelemetry Registry.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/contrib/otelfiber

Signature

otelfiber.Middleware(opts ...Option) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*fiber.Ctx) boolDefine a function to skip this middleware when returned trueRequired - Rego quernil
TracerProvideroteltrace.TracerProviderSpecifies a tracer provider to use for creating a tracernil - the global tracer provider is used
MeterProviderotelmetric.MeterProviderSpecifies a meter provider to use for reportingnil - the global meter provider is used
Port*intSpecifies the value to use when setting the net.host.port attribute on metrics/spansRequired: If not default (80 for http, 443 for https)
Propagatorspropagation.TextMapPropagatorSpecifies propagators to use for extracting information from the HTTP requestsIf none are specified, global ones will be used
ServerName*stringspecifies the value to use when setting the http.server_name attribute on metrics/spans-
SpanNameFormatterfunc(*fiber.Ctx) stringTakes a function that will be called on every request and the returned string will become the Span Namedefault formatter returns the route pathRaw

Usage

Please refer to example

Example

package main

import (
"context"
"errors"
"log"

"go.opentelemetry.io/otel/sdk/resource"

"github.com/gofiber/fiber/v2"

"github.com/gofiber/contrib/otelfiber"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"

//"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
oteltrace "go.opentelemetry.io/otel/trace"
)

var tracer = otel.Tracer("fiber-server")

func main() {
tp := initTracer()
defer func() {
if err := tp.Shutdown(context.Background()); err != nil {
log.Printf("Error shutting down tracer provider: %v", err)
}
}()

app := fiber.New()

app.Use(otelfiber.Middleware())

app.Get("/error", func(ctx *fiber.Ctx) error {
return errors.New("abc")
})

app.Get("/users/:id", func(c *fiber.Ctx) error {
id := c.Params("id")
name := getUser(c.UserContext(), id)
return c.JSON(fiber.Map{"id": id, name: name})
})

log.Fatal(app.Listen(":3000"))
}

func initTracer() *sdktrace.TracerProvider {
exporter, err := stdout.New(stdout.WithPrettyPrint())
if err != nil {
log.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("my-service"),
)),
)
otel.SetTracerProvider(tp)
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
return tp
}

func getUser(ctx context.Context, id string) string {
_, span := tracer.Start(ctx, "getUser", oteltrace.WithAttributes(attribute.String("id", id)))
defer span.End()
if id == "123" {
return "otelfiber tester"
}
return "unknown"
}
- - +Linter

OpenTelemetry support for Fiber.

Can be found on OpenTelemetry Registry.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/contrib/otelfiber

Signature

otelfiber.Middleware(opts ...Option) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*fiber.Ctx) boolDefine a function to skip this middleware when returned trueRequired - Rego quernil
TracerProvideroteltrace.TracerProviderSpecifies a tracer provider to use for creating a tracernil - the global tracer provider is used
MeterProviderotelmetric.MeterProviderSpecifies a meter provider to use for reportingnil - the global meter provider is used
Port*intSpecifies the value to use when setting the net.host.port attribute on metrics/spansRequired: If not default (80 for http, 443 for https)
Propagatorspropagation.TextMapPropagatorSpecifies propagators to use for extracting information from the HTTP requestsIf none are specified, global ones will be used
ServerName*stringspecifies the value to use when setting the http.server_name attribute on metrics/spans-
SpanNameFormatterfunc(*fiber.Ctx) stringTakes a function that will be called on every request and the returned string will become the Span Namedefault formatter returns the route pathRaw

Usage

Please refer to example

Example

package main

import (
"context"
"errors"
"log"

"go.opentelemetry.io/otel/sdk/resource"

"github.com/gofiber/fiber/v2"

"github.com/gofiber/contrib/otelfiber"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"

//"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
oteltrace "go.opentelemetry.io/otel/trace"
)

var tracer = otel.Tracer("fiber-server")

func main() {
tp := initTracer()
defer func() {
if err := tp.Shutdown(context.Background()); err != nil {
log.Printf("Error shutting down tracer provider: %v", err)
}
}()

app := fiber.New()

app.Use(otelfiber.Middleware())

app.Get("/error", func(ctx *fiber.Ctx) error {
return errors.New("abc")
})

app.Get("/users/:id", func(c *fiber.Ctx) error {
id := c.Params("id")
name := getUser(c.UserContext(), id)
return c.JSON(fiber.Map{"id": id, name: name})
})

log.Fatal(app.Listen(":3000"))
}

func initTracer() *sdktrace.TracerProvider {
exporter, err := stdout.New(stdout.WithPrettyPrint())
if err != nil {
log.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("my-service"),
)),
)
otel.SetTracerProvider(tp)
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
return tp
}

func getUser(ctx context.Context, id string) string {
_, span := tracer.Start(ctx, "getUser", oteltrace.WithAttributes(attribute.String("id", id)))
defer span.End()
if id == "123" {
return "otelfiber tester"
}
return "unknown"
}
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/paseto/index.html b/contrib/fibersentry_v1.x.x/paseto/index.html index 2ac32e3359f..0219de516ff 100644 --- a/contrib/fibersentry_v1.x.x/paseto/index.html +++ b/contrib/fibersentry_v1.x.x/paseto/index.html @@ -6,8 +6,8 @@ Paseto | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

PASETO returns a Web Token (PASETO) auth middleware.

  • For valid token, it sets the payload data in Ctx.Locals and calls next handler.
  • For invalid token, it returns "401 - Unauthorized" error.
  • For missing token, it returns "400 - BadRequest" error.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/paseto
go get -u github.com/o1egl/paseto

Signature

pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefines a function to skip middlewarenil
SuccessHandlerfunc(*fiber.Ctx) errorSuccessHandler defines a function which is executed for a valid token.c.Next()
ErrorHandlerfunc(*fiber.Ctx, error) errorErrorHandler defines a function which is executed for an invalid token.401 Invalid or expired PASETO
ValidatePayloadValidatorDefines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided.nil
SymmetricKey[]byteSecret key to encrypt token. If present the middleware will generate local tokens.nil
PrivateKeyed25519.PrivateKeySecret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens.nil
PublicKeycrypto.PublicKeyPublic key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens.nil
ContextKeystringContext key to store user information from the token into context."auth-token"
TokenLookup[2]stringTokenLookup is a string slice with size 2, that is used to extract token from the request["header","Authorization"]

Instructions

When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token.

Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token.

In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.

- - +Linter

PASETO returns a Web Token (PASETO) auth middleware.

  • For valid token, it sets the payload data in Ctx.Locals and calls next handler.
  • For invalid token, it returns "401 - Unauthorized" error.
  • For missing token, it returns "400 - BadRequest" error.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/paseto
go get -u github.com/o1egl/paseto

Signature

pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefines a function to skip middlewarenil
SuccessHandlerfunc(*fiber.Ctx) errorSuccessHandler defines a function which is executed for a valid token.c.Next()
ErrorHandlerfunc(*fiber.Ctx, error) errorErrorHandler defines a function which is executed for an invalid token.401 Invalid or expired PASETO
ValidatePayloadValidatorDefines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided.nil
SymmetricKey[]byteSecret key to encrypt token. If present the middleware will generate local tokens.nil
PrivateKeyed25519.PrivateKeySecret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens.nil
PublicKeycrypto.PublicKeyPublic key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens.nil
ContextKeystringContext key to store user information from the token into context."auth-token"
TokenLookup[2]stringTokenLookup is a string slice with size 2, that is used to extract token from the request["header","Authorization"]

Instructions

When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token.

Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token.

In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.

+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/swagger/index.html b/contrib/fibersentry_v1.x.x/swagger/index.html index 010caac2920..73578648e0f 100644 --- a/contrib/fibersentry_v1.x.x/swagger/index.html +++ b/contrib/fibersentry_v1.x.x/swagger/index.html @@ -6,8 +6,8 @@ Swagger | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Swagger middleware for Fiber. The middleware handles Swagger UI.

Table of Contents

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/swagger"
)

Then create a Fiber app with app := fiber.New().

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(swagger.New(cfg))

Custom Config

cfg := swagger.Config{
BasePath: "/", //swagger ui base path
FilePath: "./docs/swagger.json",
}

app.Use(swagger.New(cfg))
- - +Linter

Swagger middleware for Fiber. The middleware handles Swagger UI.

Table of Contents

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/swagger"
)

Then create a Fiber app with app := fiber.New().

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(swagger.New(cfg))

Custom Config

cfg := swagger.Config{
BasePath: "/", //swagger ui base path
FilePath: "./docs/swagger.json",
}

app.Use(swagger.New(cfg))
+ + \ No newline at end of file diff --git a/contrib/fibersentry_v1.x.x/websocket/index.html b/contrib/fibersentry_v1.x.x/websocket/index.html index 569a70d353b..3270feb7bc9 100644 --- a/contrib/fibersentry_v1.x.x/websocket/index.html +++ b/contrib/fibersentry_v1.x.x/websocket/index.html @@ -6,8 +6,8 @@ Websocket | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/websocket

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/websocket"
)

func main() {
app := fiber.New()

app.Use("/ws", func(c *fiber.Ctx) error {
// IsWebSocketUpgrade returns true if the client
// requested upgrade to the WebSocket protocol.
if websocket.IsWebSocketUpgrade(c) {
c.Locals("allowed", true)
return c.Next()
}
return fiber.ErrUpgradeRequired
})

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {
// c.Locals is added to the *websocket.Conn
log.Println(c.Locals("allowed")) // true
log.Println(c.Params("id")) // 123
log.Println(c.Query("v")) // 1.0
log.Println(c.Cookies("session")) // ""

// websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index
var (
mt int
msg []byte
err error
)
for {
if mt, msg, err = c.ReadMessage(); err != nil {
log.Println("read:", err)
break
}
log.Printf("recv: %s", msg)

if err = c.WriteMessage(mt, msg); err != nil {
log.Println("write:", err)
break
}
}

}))

log.Fatal(app.Listen(":3000"))
// Access the websocket server: ws://localhost:3000/ws/123?v=1.0
// https://www.websocket.org/echo.html
}

Note with cache middleware

If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path.

app := fiber.New()
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return strings.Contains(c.Route().Path, "/ws")
},
}))

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {}))
- - +Linter

Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/websocket

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/websocket"
)

func main() {
app := fiber.New()

app.Use("/ws", func(c *fiber.Ctx) error {
// IsWebSocketUpgrade returns true if the client
// requested upgrade to the WebSocket protocol.
if websocket.IsWebSocketUpgrade(c) {
c.Locals("allowed", true)
return c.Next()
}
return fiber.ErrUpgradeRequired
})

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {
// c.Locals is added to the *websocket.Conn
log.Println(c.Locals("allowed")) // true
log.Println(c.Params("id")) // 123
log.Println(c.Query("v")) // 1.0
log.Println(c.Cookies("session")) // ""

// websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index
var (
mt int
msg []byte
err error
)
for {
if mt, msg, err = c.ReadMessage(); err != nil {
log.Println("read:", err)
break
}
log.Printf("recv: %s", msg)

if err = c.WriteMessage(mt, msg); err != nil {
log.Println("write:", err)
break
}
}

}))

log.Fatal(app.Listen(":3000"))
// Access the websocket server: ws://localhost:3000/ws/123?v=1.0
// https://www.websocket.org/echo.html
}

Note with cache middleware

If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path.

app := fiber.New()
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return strings.Contains(c.Route().Path, "/ws")
},
}))

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {}))
+ + \ No newline at end of file diff --git a/contrib/fiberzap/index.html b/contrib/fiberzap/index.html index ba47e2ea35b..819d9f0900f 100644 --- a/contrib/fiberzap/index.html +++ b/contrib/fiberzap/index.html @@ -6,8 +6,8 @@ Fiberzap | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Zap logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzap
go get -u go.uber.org/zap

Signature

fiberzap.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zap.LoggerAdd custom zap logger.zap.NewDevelopment()
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zapcore.LevelCustom response levels.[]zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzap"
"go.uber.org/zap"
)

func main() {
app := fiber.New()
logger, _ := zap.NewProduction()

app.Use(fiberzap.New(fiberzap.Config{
Logger: logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

log.Fatal(app.Listen(":3000"))
}
- - +Linter

Zap logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzap
go get -u go.uber.org/zap

Signature

fiberzap.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zap.LoggerAdd custom zap logger.zap.NewDevelopment()
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zapcore.LevelCustom response levels.[]zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzap"
"go.uber.org/zap"
)

func main() {
app := fiber.New()
logger, _ := zap.NewProduction()

app.Use(fiberzap.New(fiberzap.Config{
Logger: logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

log.Fatal(app.Listen(":3000"))
}
+ + \ No newline at end of file diff --git a/contrib/fiberzerolog/index.html b/contrib/fiberzerolog/index.html index 2b9bf8cf987..58243fe4f48 100644 --- a/contrib/fiberzerolog/index.html +++ b/contrib/fiberzerolog/index.html @@ -6,8 +6,8 @@ Fiberzerolog | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Zerolog logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzerolog
go get -u github.com/rs/zerolog/log

Signature

fiberzerolog.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zerolog.LoggerAdd custom zerolog logger.zerolog.New(os.Stderr).With().Timestamp().Logger()
GetLoggerfunc(*fiber.Ctx) zerolog.LoggerGet custom zerolog logger, if it's defined the returned logger will replace the Logger value.nil
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url", "error"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zerolog.LevelCustom response levels.[]zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzerolog"
"github.com/rs/zerolog"
)

func main() {
app := fiber.New()
logger := zerolog.New(os.Stderr).With().Timestamp().Logger()

app.Use(fiberzerolog.New(fiberzerolog.Config{
Logger: &logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

if err := app.Listen(":3000"); err != nil {
logger.Fatal().Err(err).Msg("Fiber app error")
}
}
- - +Linter

Zerolog logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzerolog
go get -u github.com/rs/zerolog/log

Signature

fiberzerolog.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zerolog.LoggerAdd custom zerolog logger.zerolog.New(os.Stderr).With().Timestamp().Logger()
GetLoggerfunc(*fiber.Ctx) zerolog.LoggerGet custom zerolog logger, if it's defined the returned logger will replace the Logger value.nil
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url", "error"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zerolog.LevelCustom response levels.[]zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzerolog"
"github.com/rs/zerolog"
)

func main() {
app := fiber.New()
logger := zerolog.New(os.Stderr).With().Timestamp().Logger()

app.Use(fiberzerolog.New(fiberzerolog.Config{
Logger: &logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

if err := app.Listen(":3000"); err != nil {
logger.Fatal().Err(err).Msg("Fiber app error")
}
}
+ + \ No newline at end of file diff --git a/contrib/index.html b/contrib/index.html index 3b978623dd8..1b41e0aba6b 100644 --- a/contrib/index.html +++ b/contrib/index.html @@ -6,16 +6,16 @@ 👋 Welcome | Fiber - - + + - - +Linter

Repository for third party middlewares with dependencies.

📑 Middleware Implementations

+ + \ No newline at end of file diff --git a/contrib/jwt/index.html b/contrib/jwt/index.html index 13a71688bed..81e2f6e1845 100644 --- a/contrib/jwt/index.html +++ b/contrib/jwt/index.html @@ -6,8 +6,8 @@ JWT | Fiber - - + +
@@ -24,8 +24,8 @@ This is one of the three options to provide a token validation key. The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey. Required if neither SigningKeys nor SigningKey is provided. -Default to an internal implementation verifying the signing algorithm and selecting the proper key.

package main

import (
"fmt"
"github.com/gofiber/fiber/v2"

jwtware "github.com/gofiber/contrib/jwt"
"github.com/golang-jwt/jwt/v5"
)

func main() {
app := fiber.New()

app.Use(jwtware.New(jwtware.Config{
KeyFunc: customKeyFunc(),
}))

app.Get("/ok", func(c *fiber.Ctx) error {
return c.SendString("OK")
})
}

func customKeyFunc() jwt.Keyfunc {
return func(t *jwt.Token) (interface{}, error) {
// Always check the signing method
if t.Method.Alg() != jwtware.HS256 {
return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])
}

// TODO custom implementation of loading signing key like from a database
signingKey := "secret"

return []byte(signingKey), nil
}
}
- - +Default to an internal implementation verifying the signing algorithm and selecting the proper key.

package main

import (
"fmt"
"github.com/gofiber/fiber/v2"

jwtware "github.com/gofiber/contrib/jwt"
"github.com/golang-jwt/jwt/v5"
)

func main() {
app := fiber.New()

app.Use(jwtware.New(jwtware.Config{
KeyFunc: customKeyFunc(),
}))

app.Get("/ok", func(c *fiber.Ctx) error {
return c.SendString("OK")
})
}

func customKeyFunc() jwt.Keyfunc {
return func(t *jwt.Token) (interface{}, error) {
// Always check the signing method
if t.Method.Alg() != jwtware.HS256 {
return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])
}

// TODO custom implementation of loading signing key like from a database
signingKey := "secret"

return []byte(signingKey), nil
}
}
+ + \ No newline at end of file diff --git a/contrib/next/casbin/index.html b/contrib/next/casbin/index.html index af1c277145b..6d52627760f 100644 --- a/contrib/next/casbin/index.html +++ b/contrib/next/casbin/index.html @@ -6,8 +6,8 @@ Casbin | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Casbin middleware for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/casbin

choose an adapter from here

go get -u github.com/casbin/xorm-adapter

Signature

casbin.New(config ...casbin.Config) *casbin.Middleware

Config

PropertyTypeDescriptionDefault
ModelFilePathstringModel file path"./model.conf"
PolicyAdapterpersist.AdapterDatabase adapter for policies./policy.csv
Enforcer*casbin.EnforcerCustom casbin enforcerMiddleware generated enforcer using ModelFilePath & PolicyAdapter
Lookupfunc(*fiber.Ctx) stringLook up for current subject""
Unauthorizedfunc(*fiber.Ctx) errorResponse body for unauthorized responsesUnauthorized
Forbiddenfunc(*fiber.Ctx) errorResponse body for forbidden responsesForbidden

Examples

CustomPermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Post("/blog",
authz.RequiresPermissions([]string{"blog:create"}, casbin.WithValidationRule(casbin.MatchAllRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Delete("/blog/:id",
authz.RequiresPermissions([]string{"blog:create", "blog:delete"}, casbin.WithValidationRule(casbin.AtLeastOneRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoutePermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

// check permission with Method and Path
app.Post("/blog",
authz.RoutePermission(),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoleAuthorization

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Put("/blog/:id",
authz.RequiresRoles([]string{"admin"}),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}
- - +Linter

Casbin middleware for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/casbin

choose an adapter from here

go get -u github.com/casbin/xorm-adapter

Signature

casbin.New(config ...casbin.Config) *casbin.Middleware

Config

PropertyTypeDescriptionDefault
ModelFilePathstringModel file path"./model.conf"
PolicyAdapterpersist.AdapterDatabase adapter for policies./policy.csv
Enforcer*casbin.EnforcerCustom casbin enforcerMiddleware generated enforcer using ModelFilePath & PolicyAdapter
Lookupfunc(*fiber.Ctx) stringLook up for current subject""
Unauthorizedfunc(*fiber.Ctx) errorResponse body for unauthorized responsesUnauthorized
Forbiddenfunc(*fiber.Ctx) errorResponse body for forbidden responsesForbidden

Examples

CustomPermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Post("/blog",
authz.RequiresPermissions([]string{"blog:create"}, casbin.WithValidationRule(casbin.MatchAllRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Delete("/blog/:id",
authz.RequiresPermissions([]string{"blog:create", "blog:delete"}, casbin.WithValidationRule(casbin.AtLeastOneRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoutePermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

// check permission with Method and Path
app.Post("/blog",
authz.RoutePermission(),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoleAuthorization

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Put("/blog/:id",
authz.RequiresRoles([]string{"admin"}),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/next/fiberi18n/index.html b/contrib/next/fiberi18n/index.html index e52dc1b9bcc..141833fe3ad 100644 --- a/contrib/next/fiberi18n/index.html +++ b/contrib/next/fiberi18n/index.html @@ -6,8 +6,8 @@ Fiberi18n | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

go-i18n support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberi18n

Signature

fiberi18n.New(config ...*Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(c *fiber.Ctx) boolA function to skip this middleware when returned true.nil
RootPathstringThe i18n template folder path."./example/localize"
AcceptLanguages[]language.TagA collection of languages that can be processed.[]language.Tag{language.Chinese, language.English}
FormatBundleFilestringThe type of the template file."yaml"
DefaultLanguagelanguage.TagThe default returned language type.language.English
LoaderLoaderThe implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile.LoaderFunc(os.ReadFile)
UnmarshalFunci18n.UnmarshalFuncThe function used for decoding template files.yaml.Unmarshal
LangHandlerfunc(ctx *fiber.Ctx, defaultLang string) stringUsed to get the kind of language handled by *fiber.Ctx and defaultLang.Retrieved from the request header Accept-Language or query parameter lang.

Example

package main

import (
"github.com/gofiber/contrib/fiberi18n"
"github.com/gofiber/fiber/v2"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
)

func main() {
app := fiber.New()
app.Use(
fiberi18n.New(&fiberi18n.Config{
RootPath: "./example/localize",
AcceptLanguages: []language.Tag{language.Chinese, language.English},
DefaultLanguage: language.Chinese,
}),
)
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(fiberi18n.MustGetMessage("welcome"))
})
app.Get("/:name", func(ctx *fiber.Ctx) error {
return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{
MessageID: "welcomeWithName",
TemplateData: map[string]string{
"name": ctx.Params("name"),
},
}))
})
app.Listen("127.0.0.1:3000")
}
- - +Linter

go-i18n support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberi18n

Signature

fiberi18n.New(config ...*Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(c *fiber.Ctx) boolA function to skip this middleware when returned true.nil
RootPathstringThe i18n template folder path."./example/localize"
AcceptLanguages[]language.TagA collection of languages that can be processed.[]language.Tag{language.Chinese, language.English}
FormatBundleFilestringThe type of the template file."yaml"
DefaultLanguagelanguage.TagThe default returned language type.language.English
LoaderLoaderThe implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile.LoaderFunc(os.ReadFile)
UnmarshalFunci18n.UnmarshalFuncThe function used for decoding template files.yaml.Unmarshal
LangHandlerfunc(ctx *fiber.Ctx, defaultLang string) stringUsed to get the kind of language handled by *fiber.Ctx and defaultLang.Retrieved from the request header Accept-Language or query parameter lang.

Example

package main

import (
"github.com/gofiber/contrib/fiberi18n"
"github.com/gofiber/fiber/v2"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
)

func main() {
app := fiber.New()
app.Use(
fiberi18n.New(&fiberi18n.Config{
RootPath: "./example/localize",
AcceptLanguages: []language.Tag{language.Chinese, language.English},
DefaultLanguage: language.Chinese,
}),
)
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(fiberi18n.MustGetMessage("welcome"))
})
app.Get("/:name", func(ctx *fiber.Ctx) error {
return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{
MessageID: "welcomeWithName",
TemplateData: map[string]string{
"name": ctx.Params("name"),
},
}))
})
app.Listen("127.0.0.1:3000")
}
+ + \ No newline at end of file diff --git a/contrib/next/fibernewrelic/index.html b/contrib/next/fibernewrelic/index.html index b8a0a53535b..c66d7231c1c 100644 --- a/contrib/next/fibernewrelic/index.html +++ b/contrib/next/fibernewrelic/index.html @@ -6,8 +6,8 @@ Fibernewrelic | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

NewRelic support for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibernewrelic

Signature

fibernewrelic.New(config fibernewrelic.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
LicensestringRequired - New Relic License Key""
AppNamestringNew Relic Application Namefiber-api
EnabledboolEnable/Disable New Relicfalse
TransportTypestringCan be HTTP or HTTPS (Deprecated)"HTTP"
ApplicationApplicationExisting New Relic Appnil
ErrorStatusCodeHandlerfunc(c *fiber.Ctx, err error) intIf you want to change newrelic status code, you can use it.DefaultErrorStatusCodeHandler

Usage

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
)

func main() {
app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
License: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
AppName: "MyCustomApi",
Enabled: true,
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}

Usage with existing New Relic application

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
"github.com/newrelic/go-agent/v3/newrelic"
)

func main() {
newrelicApp, err := newrelic.NewApplication(
newrelic.ConfigAppName("MyCustomApi"),
newrelic.ConfigLicense("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
newrelic.ConfigEnabled(true),
)

app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
Application: newrelicApp
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}
- - +Linter

NewRelic support for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibernewrelic

Signature

fibernewrelic.New(config fibernewrelic.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
LicensestringRequired - New Relic License Key""
AppNamestringNew Relic Application Namefiber-api
EnabledboolEnable/Disable New Relicfalse
TransportTypestringCan be HTTP or HTTPS (Deprecated)"HTTP"
ApplicationApplicationExisting New Relic Appnil
ErrorStatusCodeHandlerfunc(c *fiber.Ctx, err error) intIf you want to change newrelic status code, you can use it.DefaultErrorStatusCodeHandler

Usage

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
)

func main() {
app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
License: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
AppName: "MyCustomApi",
Enabled: true,
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}

Usage with existing New Relic application

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
"github.com/newrelic/go-agent/v3/newrelic"
)

func main() {
newrelicApp, err := newrelic.NewApplication(
newrelic.ConfigAppName("MyCustomApi"),
newrelic.ConfigLicense("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
newrelic.ConfigEnabled(true),
)

app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
Application: newrelicApp
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/next/fibersentry/index.html b/contrib/next/fibersentry/index.html index 8eb0d256367..fc3dd90a1c6 100644 --- a/contrib/next/fibersentry/index.html +++ b/contrib/next/fibersentry/index.html @@ -6,8 +6,8 @@ Fibersentry | Fiber - - + +
@@ -17,8 +17,8 @@ Security Linter

Sentry support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibersentry
go get -u github.com/getsentry/sentry-go

Signature

fibersentry.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RepanicboolRepanic configures whether Sentry should repanic after recovery. Set to true, if Recover middleware is used.false
WaitForDeliveryboolWaitForDelivery configures whether you want to block the request before moving forward with the response. If Recover middleware is used, it's safe to either skip this option or set it to false.false
Timeouttime.DurationTimeout for the event delivery requests.time.Second * 2

Usage

fibersentry attaches an instance of *sentry.Hub (https://godoc.org/github.com/getsentry/sentry-go#Hub) to the request's context, which makes it available throughout the rest of the request's lifetime. You can access it by using the fibersentry.GetHubFromContext() method on the context itself in any of your proceeding middleware and routes. -And it should be used instead of the global sentry.CaptureMessage, sentry.CaptureException, or any other calls, as it keeps the separation of data between the requests.

Keep in mind that *sentry.Hub won't be available in middleware attached before to fibersentry!

package main

import (
"fmt"
"log"

"github.com/getsentry/sentry-go"
"github.com/gofiber/contrib/fibersentry"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/utils"
)

func main() {
_ = sentry.Init(sentry.ClientOptions{
Dsn: "",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(utils.ImmutableString(c.Hostname()))
}
}
fmt.Println(event)
return event
},
Debug: true,
AttachStacktrace: true,
})

app := fiber.New()

app.Use(fibersentry.New(fibersentry.Config{
Repanic: true,
WaitForDelivery: true,
}))

enhanceSentryEvent := func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")
}
return c.Next()
}

app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {
panic("y tho")
})

app.All("/", func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.WithScope(func(scope *sentry.Scope) {
scope.SetExtra("unwantedQuery", "someQueryDataMaybe")
hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")
})
}
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

Accessing Context in BeforeSend callback

sentry.Init(sentry.ClientOptions{
Dsn: "your-public-dsn",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(c.Hostname())
}
}
return event
},
})
- - +And it should be used instead of the global sentry.CaptureMessage, sentry.CaptureException, or any other calls, as it keeps the separation of data between the requests.

Keep in mind that *sentry.Hub won't be available in middleware attached before to fibersentry!

package main

import (
"fmt"
"log"

"github.com/getsentry/sentry-go"
"github.com/gofiber/contrib/fibersentry"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/utils"
)

func main() {
_ = sentry.Init(sentry.ClientOptions{
Dsn: "",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(utils.ImmutableString(c.Hostname()))
}
}
fmt.Println(event)
return event
},
Debug: true,
AttachStacktrace: true,
})

app := fiber.New()

app.Use(fibersentry.New(fibersentry.Config{
Repanic: true,
WaitForDelivery: true,
}))

enhanceSentryEvent := func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")
}
return c.Next()
}

app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {
panic("y tho")
})

app.All("/", func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.WithScope(func(scope *sentry.Scope) {
scope.SetExtra("unwantedQuery", "someQueryDataMaybe")
hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")
})
}
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

Accessing Context in BeforeSend callback

sentry.Init(sentry.ClientOptions{
Dsn: "your-public-dsn",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(c.Hostname())
}
}
return event
},
})
+ + \ No newline at end of file diff --git a/contrib/next/fiberzap/index.html b/contrib/next/fiberzap/index.html index 3656b33e8f4..96e626a5414 100644 --- a/contrib/next/fiberzap/index.html +++ b/contrib/next/fiberzap/index.html @@ -6,8 +6,8 @@ Fiberzap | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Zap logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzap
go get -u go.uber.org/zap

Signature

fiberzap.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zap.LoggerAdd custom zap logger.zap.NewDevelopment()
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zapcore.LevelCustom response levels.[]zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzap"
"go.uber.org/zap"
)

func main() {
app := fiber.New()
logger, _ := zap.NewProduction()

app.Use(fiberzap.New(fiberzap.Config{
Logger: logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

log.Fatal(app.Listen(":3000"))
}
- - +Linter

Zap logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzap
go get -u go.uber.org/zap

Signature

fiberzap.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zap.LoggerAdd custom zap logger.zap.NewDevelopment()
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zapcore.LevelCustom response levels.[]zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzap"
"go.uber.org/zap"
)

func main() {
app := fiber.New()
logger, _ := zap.NewProduction()

app.Use(fiberzap.New(fiberzap.Config{
Logger: logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

log.Fatal(app.Listen(":3000"))
}
+ + \ No newline at end of file diff --git a/contrib/next/fiberzerolog/index.html b/contrib/next/fiberzerolog/index.html index 6451ffd5fc4..91dfeeeeb05 100644 --- a/contrib/next/fiberzerolog/index.html +++ b/contrib/next/fiberzerolog/index.html @@ -6,8 +6,8 @@ Fiberzerolog | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Zerolog logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzerolog
go get -u github.com/rs/zerolog/log

Signature

fiberzerolog.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zerolog.LoggerAdd custom zerolog logger.zerolog.New(os.Stderr).With().Timestamp().Logger()
GetLoggerfunc(*fiber.Ctx) zerolog.LoggerGet custom zerolog logger, if it's defined the returned logger will replace the Logger value.nil
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url", "error"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zerolog.LevelCustom response levels.[]zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzerolog"
"github.com/rs/zerolog"
)

func main() {
app := fiber.New()
logger := zerolog.New(os.Stderr).With().Timestamp().Logger()

app.Use(fiberzerolog.New(fiberzerolog.Config{
Logger: &logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

if err := app.Listen(":3000"); err != nil {
logger.Fatal().Err(err).Msg("Fiber app error")
}
}
- - +Linter

Zerolog logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzerolog
go get -u github.com/rs/zerolog/log

Signature

fiberzerolog.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zerolog.LoggerAdd custom zerolog logger.zerolog.New(os.Stderr).With().Timestamp().Logger()
GetLoggerfunc(*fiber.Ctx) zerolog.LoggerGet custom zerolog logger, if it's defined the returned logger will replace the Logger value.nil
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url", "error"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zerolog.LevelCustom response levels.[]zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzerolog"
"github.com/rs/zerolog"
)

func main() {
app := fiber.New()
logger := zerolog.New(os.Stderr).With().Timestamp().Logger()

app.Use(fiberzerolog.New(fiberzerolog.Config{
Logger: &logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

if err := app.Listen(":3000"); err != nil {
logger.Fatal().Err(err).Msg("Fiber app error")
}
}
+ + \ No newline at end of file diff --git a/contrib/next/index.html b/contrib/next/index.html index 85ff708169d..a33030722c6 100644 --- a/contrib/next/index.html +++ b/contrib/next/index.html @@ -6,16 +6,16 @@ 👋 Welcome | Fiber - - + +
- - +Linter

Repository for third party middlewares with dependencies.

📑 Middleware Implementations

+ + \ No newline at end of file diff --git a/contrib/next/jwt/index.html b/contrib/next/jwt/index.html index 7bd89b194cc..5b59ec9383c 100644 --- a/contrib/next/jwt/index.html +++ b/contrib/next/jwt/index.html @@ -6,8 +6,8 @@ JWT | Fiber - - + +
@@ -24,8 +24,8 @@ This is one of the three options to provide a token validation key. The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey. Required if neither SigningKeys nor SigningKey is provided. -Default to an internal implementation verifying the signing algorithm and selecting the proper key.

package main

import (
"fmt"
"github.com/gofiber/fiber/v2"

jwtware "github.com/gofiber/contrib/jwt"
"github.com/golang-jwt/jwt/v5"
)

func main() {
app := fiber.New()

app.Use(jwtware.New(jwtware.Config{
KeyFunc: customKeyFunc(),
}))

app.Get("/ok", func(c *fiber.Ctx) error {
return c.SendString("OK")
})
}

func customKeyFunc() jwt.Keyfunc {
return func(t *jwt.Token) (interface{}, error) {
// Always check the signing method
if t.Method.Alg() != jwtware.HS256 {
return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])
}

// TODO custom implementation of loading signing key like from a database
signingKey := "secret"

return []byte(signingKey), nil
}
}
- - +Default to an internal implementation verifying the signing algorithm and selecting the proper key.

package main

import (
"fmt"
"github.com/gofiber/fiber/v2"

jwtware "github.com/gofiber/contrib/jwt"
"github.com/golang-jwt/jwt/v5"
)

func main() {
app := fiber.New()

app.Use(jwtware.New(jwtware.Config{
KeyFunc: customKeyFunc(),
}))

app.Get("/ok", func(c *fiber.Ctx) error {
return c.SendString("OK")
})
}

func customKeyFunc() jwt.Keyfunc {
return func(t *jwt.Token) (interface{}, error) {
// Always check the signing method
if t.Method.Alg() != jwtware.HS256 {
return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])
}

// TODO custom implementation of loading signing key like from a database
signingKey := "secret"

return []byte(signingKey), nil
}
}
+ + \ No newline at end of file diff --git a/contrib/next/opafiber/index.html b/contrib/next/opafiber/index.html index 3c4d1bc6de0..8df14da7a66 100644 --- a/contrib/next/opafiber/index.html +++ b/contrib/next/opafiber/index.html @@ -6,8 +6,8 @@ Opafiber | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Open Policy Agent support for Fiber.

Note: Requires Go 1.18 and above

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/opafiber

Signature

opafiber.New(config opafiber.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RegoQuerystringRequired - Rego query-
RegoPolicyio.ReaderRequired - Rego policy-
IncludeQueryStringboolInclude query string as input to rego policyfalse
DeniedStatusCodeintHttp status code to return when policy denies request400
DeniedResponseMessagestringHttp response body text to return when policy denies request""
IncludeHeaders[]stringInclude headers as input to rego policy-
InputCreationMethodInputCreationFuncUse your own function to provide input for OPAfunc defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)

Types

type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)

Usage

OPA Fiber middleware sends the following example data to the policy engine as input:

{
"method": "GET",
"path": "/somePath",
"query": {
"name": ["John Doe"]
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
}
}
package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/opafiber"
)

func main() {
app := fiber.New()
module := `
package example.authz

default allow := false

allow {
input.method == "GET"
}
`

cfg := opafiber.Config{
RegoQuery: "data.example.authz.allow",
RegoPolicy: bytes.NewBufferString(module),
IncludeQueryString: true,
DeniedStatusCode: fiber.StatusForbidden,
DeniedResponseMessage: "status forbidden",
IncludeHeaders: []string{"Authorization"},
InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {
return map[string]interface{}{
"method": ctx.Method(),
"path": ctx.Path(),
}, nil
},
}
app.Use(opafiber.New(cfg))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

app.Listen(":8080")
}
- - +Linter

Open Policy Agent support for Fiber.

Note: Requires Go 1.18 and above

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/opafiber

Signature

opafiber.New(config opafiber.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RegoQuerystringRequired - Rego query-
RegoPolicyio.ReaderRequired - Rego policy-
IncludeQueryStringboolInclude query string as input to rego policyfalse
DeniedStatusCodeintHttp status code to return when policy denies request400
DeniedResponseMessagestringHttp response body text to return when policy denies request""
IncludeHeaders[]stringInclude headers as input to rego policy-
InputCreationMethodInputCreationFuncUse your own function to provide input for OPAfunc defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)

Types

type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)

Usage

OPA Fiber middleware sends the following example data to the policy engine as input:

{
"method": "GET",
"path": "/somePath",
"query": {
"name": ["John Doe"]
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
}
}
package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/opafiber"
)

func main() {
app := fiber.New()
module := `
package example.authz

default allow := false

allow {
input.method == "GET"
}
`

cfg := opafiber.Config{
RegoQuery: "data.example.authz.allow",
RegoPolicy: bytes.NewBufferString(module),
IncludeQueryString: true,
DeniedStatusCode: fiber.StatusForbidden,
DeniedResponseMessage: "status forbidden",
IncludeHeaders: []string{"Authorization"},
InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {
return map[string]interface{}{
"method": ctx.Method(),
"path": ctx.Path(),
}, nil
},
}
app.Use(opafiber.New(cfg))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/next/otelfiber/example/index.html b/contrib/next/otelfiber/example/index.html index 97434dfb74e..92431f72ae3 100644 --- a/contrib/next/otelfiber/example/index.html +++ b/contrib/next/otelfiber/example/index.html @@ -6,8 +6,8 @@ Example | Fiber - - + +
@@ -16,8 +16,8 @@ stdout.

These instructions expect you have docker-compose installed.

Bring up the fiber-server and fiber-client services to run the example:

docker-compose up --detach fiber-server fiber-client

The fiber-client service sends just one HTTP request to fiber-server -and then exits. View the span generated by fiber-server in the logs:

docker-compose logs fiber-server

Shut down the services when you are finished with the example:

docker-compose down
- - +and then exits. View the span generated by fiber-server in the logs:

docker-compose logs fiber-server

Shut down the services when you are finished with the example:

docker-compose down
+ + \ No newline at end of file diff --git a/contrib/next/otelfiber/index.html b/contrib/next/otelfiber/index.html index d3604dad822..d20cae03dc1 100644 --- a/contrib/next/otelfiber/index.html +++ b/contrib/next/otelfiber/index.html @@ -6,8 +6,8 @@ Otelfiber | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

OpenTelemetry support for Fiber.

Can be found on OpenTelemetry Registry.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/contrib/otelfiber

Signature

otelfiber.Middleware(opts ...Option) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*fiber.Ctx) boolDefine a function to skip this middleware when returned trueRequired - Rego quernil
TracerProvideroteltrace.TracerProviderSpecifies a tracer provider to use for creating a tracernil - the global tracer provider is used
MeterProviderotelmetric.MeterProviderSpecifies a meter provider to use for reportingnil - the global meter provider is used
Port*intSpecifies the value to use when setting the net.host.port attribute on metrics/spansRequired: If not default (80 for http, 443 for https)
Propagatorspropagation.TextMapPropagatorSpecifies propagators to use for extracting information from the HTTP requestsIf none are specified, global ones will be used
ServerName*stringspecifies the value to use when setting the http.server_name attribute on metrics/spans-
SpanNameFormatterfunc(*fiber.Ctx) stringTakes a function that will be called on every request and the returned string will become the Span Namedefault formatter returns the route pathRaw

Usage

Please refer to example

Example

package main

import (
"context"
"errors"
"log"

"go.opentelemetry.io/otel/sdk/resource"

"github.com/gofiber/fiber/v2"

"github.com/gofiber/contrib/otelfiber"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"

//"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
oteltrace "go.opentelemetry.io/otel/trace"
)

var tracer = otel.Tracer("fiber-server")

func main() {
tp := initTracer()
defer func() {
if err := tp.Shutdown(context.Background()); err != nil {
log.Printf("Error shutting down tracer provider: %v", err)
}
}()

app := fiber.New()

app.Use(otelfiber.Middleware())

app.Get("/error", func(ctx *fiber.Ctx) error {
return errors.New("abc")
})

app.Get("/users/:id", func(c *fiber.Ctx) error {
id := c.Params("id")
name := getUser(c.UserContext(), id)
return c.JSON(fiber.Map{"id": id, name: name})
})

log.Fatal(app.Listen(":3000"))
}

func initTracer() *sdktrace.TracerProvider {
exporter, err := stdout.New(stdout.WithPrettyPrint())
if err != nil {
log.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("my-service"),
)),
)
otel.SetTracerProvider(tp)
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
return tp
}

func getUser(ctx context.Context, id string) string {
_, span := tracer.Start(ctx, "getUser", oteltrace.WithAttributes(attribute.String("id", id)))
defer span.End()
if id == "123" {
return "otelfiber tester"
}
return "unknown"
}
- - +Linter

OpenTelemetry support for Fiber.

Can be found on OpenTelemetry Registry.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/contrib/otelfiber

Signature

otelfiber.Middleware(opts ...Option) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*fiber.Ctx) boolDefine a function to skip this middleware when returned trueRequired - Rego quernil
TracerProvideroteltrace.TracerProviderSpecifies a tracer provider to use for creating a tracernil - the global tracer provider is used
MeterProviderotelmetric.MeterProviderSpecifies a meter provider to use for reportingnil - the global meter provider is used
Port*intSpecifies the value to use when setting the net.host.port attribute on metrics/spansRequired: If not default (80 for http, 443 for https)
Propagatorspropagation.TextMapPropagatorSpecifies propagators to use for extracting information from the HTTP requestsIf none are specified, global ones will be used
ServerName*stringspecifies the value to use when setting the http.server_name attribute on metrics/spans-
SpanNameFormatterfunc(*fiber.Ctx) stringTakes a function that will be called on every request and the returned string will become the Span Namedefault formatter returns the route pathRaw

Usage

Please refer to example

Example

package main

import (
"context"
"errors"
"log"

"go.opentelemetry.io/otel/sdk/resource"

"github.com/gofiber/fiber/v2"

"github.com/gofiber/contrib/otelfiber"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"

//"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
oteltrace "go.opentelemetry.io/otel/trace"
)

var tracer = otel.Tracer("fiber-server")

func main() {
tp := initTracer()
defer func() {
if err := tp.Shutdown(context.Background()); err != nil {
log.Printf("Error shutting down tracer provider: %v", err)
}
}()

app := fiber.New()

app.Use(otelfiber.Middleware())

app.Get("/error", func(ctx *fiber.Ctx) error {
return errors.New("abc")
})

app.Get("/users/:id", func(c *fiber.Ctx) error {
id := c.Params("id")
name := getUser(c.UserContext(), id)
return c.JSON(fiber.Map{"id": id, name: name})
})

log.Fatal(app.Listen(":3000"))
}

func initTracer() *sdktrace.TracerProvider {
exporter, err := stdout.New(stdout.WithPrettyPrint())
if err != nil {
log.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("my-service"),
)),
)
otel.SetTracerProvider(tp)
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
return tp
}

func getUser(ctx context.Context, id string) string {
_, span := tracer.Start(ctx, "getUser", oteltrace.WithAttributes(attribute.String("id", id)))
defer span.End()
if id == "123" {
return "otelfiber tester"
}
return "unknown"
}
+ + \ No newline at end of file diff --git a/contrib/next/paseto/index.html b/contrib/next/paseto/index.html index f2cdbf92a5c..904831f1ea4 100644 --- a/contrib/next/paseto/index.html +++ b/contrib/next/paseto/index.html @@ -6,8 +6,8 @@ Paseto | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

PASETO returns a Web Token (PASETO) auth middleware.

  • For valid token, it sets the payload data in Ctx.Locals and calls next handler.
  • For invalid token, it returns "401 - Unauthorized" error.
  • For missing token, it returns "400 - BadRequest" error.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/paseto
go get -u github.com/o1egl/paseto

Signature

pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefines a function to skip middlewarenil
SuccessHandlerfunc(*fiber.Ctx) errorSuccessHandler defines a function which is executed for a valid token.c.Next()
ErrorHandlerfunc(*fiber.Ctx, error) errorErrorHandler defines a function which is executed for an invalid token.401 Invalid or expired PASETO
ValidatePayloadValidatorDefines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided.nil
SymmetricKey[]byteSecret key to encrypt token. If present the middleware will generate local tokens.nil
PrivateKeyed25519.PrivateKeySecret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens.nil
PublicKeycrypto.PublicKeyPublic key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens.nil
ContextKeystringContext key to store user information from the token into context."auth-token"
TokenLookup[2]stringTokenLookup is a string slice with size 2, that is used to extract token from the request["header","Authorization"]

Instructions

When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token.

Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token.

In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.

- - +Linter

PASETO returns a Web Token (PASETO) auth middleware.

  • For valid token, it sets the payload data in Ctx.Locals and calls next handler.
  • For invalid token, it returns "401 - Unauthorized" error.
  • For missing token, it returns "400 - BadRequest" error.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/paseto
go get -u github.com/o1egl/paseto

Signature

pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefines a function to skip middlewarenil
SuccessHandlerfunc(*fiber.Ctx) errorSuccessHandler defines a function which is executed for a valid token.c.Next()
ErrorHandlerfunc(*fiber.Ctx, error) errorErrorHandler defines a function which is executed for an invalid token.401 Invalid or expired PASETO
ValidatePayloadValidatorDefines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided.nil
SymmetricKey[]byteSecret key to encrypt token. If present the middleware will generate local tokens.nil
PrivateKeyed25519.PrivateKeySecret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens.nil
PublicKeycrypto.PublicKeyPublic key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens.nil
ContextKeystringContext key to store user information from the token into context."auth-token"
TokenLookup[2]stringTokenLookup is a string slice with size 2, that is used to extract token from the request["header","Authorization"]

Instructions

When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token.

Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token.

In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.

+ + \ No newline at end of file diff --git a/contrib/next/swagger/index.html b/contrib/next/swagger/index.html index 237f6fc5e08..3e596164492 100644 --- a/contrib/next/swagger/index.html +++ b/contrib/next/swagger/index.html @@ -6,8 +6,8 @@ Swagger | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Swagger middleware for Fiber. The middleware handles Swagger UI.

Table of Contents

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/swagger"
)

Then create a Fiber app with app := fiber.New().

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(swagger.New(cfg))

Custom Config

cfg := swagger.Config{
BasePath: "/", //swagger ui base path
FilePath: "./docs/swagger.json",
}

app.Use(swagger.New(cfg))
- - +Linter

Swagger middleware for Fiber. The middleware handles Swagger UI.

Table of Contents

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/swagger"
)

Then create a Fiber app with app := fiber.New().

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(swagger.New(cfg))

Custom Config

cfg := swagger.Config{
BasePath: "/", //swagger ui base path
FilePath: "./docs/swagger.json",
}

app.Use(swagger.New(cfg))
+ + \ No newline at end of file diff --git a/contrib/next/websocket/index.html b/contrib/next/websocket/index.html index bf194828006..2b19fad65cd 100644 --- a/contrib/next/websocket/index.html +++ b/contrib/next/websocket/index.html @@ -6,8 +6,8 @@ Websocket | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/websocket

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/websocket"
)

func main() {
app := fiber.New()

app.Use("/ws", func(c *fiber.Ctx) error {
// IsWebSocketUpgrade returns true if the client
// requested upgrade to the WebSocket protocol.
if websocket.IsWebSocketUpgrade(c) {
c.Locals("allowed", true)
return c.Next()
}
return fiber.ErrUpgradeRequired
})

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {
// c.Locals is added to the *websocket.Conn
log.Println(c.Locals("allowed")) // true
log.Println(c.Params("id")) // 123
log.Println(c.Query("v")) // 1.0
log.Println(c.Cookies("session")) // ""

// websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index
var (
mt int
msg []byte
err error
)
for {
if mt, msg, err = c.ReadMessage(); err != nil {
log.Println("read:", err)
break
}
log.Printf("recv: %s", msg)

if err = c.WriteMessage(mt, msg); err != nil {
log.Println("write:", err)
break
}
}

}))

log.Fatal(app.Listen(":3000"))
// Access the websocket server: ws://localhost:3000/ws/123?v=1.0
// https://www.websocket.org/echo.html
}

Note with cache middleware

If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path.

app := fiber.New()
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return strings.Contains(c.Route().Path, "/ws")
},
}))

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {}))
- - +Linter

Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/websocket

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/websocket"
)

func main() {
app := fiber.New()

app.Use("/ws", func(c *fiber.Ctx) error {
// IsWebSocketUpgrade returns true if the client
// requested upgrade to the WebSocket protocol.
if websocket.IsWebSocketUpgrade(c) {
c.Locals("allowed", true)
return c.Next()
}
return fiber.ErrUpgradeRequired
})

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {
// c.Locals is added to the *websocket.Conn
log.Println(c.Locals("allowed")) // true
log.Println(c.Params("id")) // 123
log.Println(c.Query("v")) // 1.0
log.Println(c.Cookies("session")) // ""

// websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index
var (
mt int
msg []byte
err error
)
for {
if mt, msg, err = c.ReadMessage(); err != nil {
log.Println("read:", err)
break
}
log.Printf("recv: %s", msg)

if err = c.WriteMessage(mt, msg); err != nil {
log.Println("write:", err)
break
}
}

}))

log.Fatal(app.Listen(":3000"))
// Access the websocket server: ws://localhost:3000/ws/123?v=1.0
// https://www.websocket.org/echo.html
}

Note with cache middleware

If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path.

app := fiber.New()
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return strings.Contains(c.Route().Path, "/ws")
},
}))

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {}))
+ + \ No newline at end of file diff --git a/contrib/opafiber/index.html b/contrib/opafiber/index.html index 6a9a207fc22..e5dd5ea8eeb 100644 --- a/contrib/opafiber/index.html +++ b/contrib/opafiber/index.html @@ -6,8 +6,8 @@ Opafiber | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Open Policy Agent support for Fiber.

Note: Requires Go 1.18 and above

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/opafiber

Signature

opafiber.New(config opafiber.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RegoQuerystringRequired - Rego query-
RegoPolicyio.ReaderRequired - Rego policy-
IncludeQueryStringboolInclude query string as input to rego policyfalse
DeniedStatusCodeintHttp status code to return when policy denies request400
DeniedResponseMessagestringHttp response body text to return when policy denies request""
IncludeHeaders[]stringInclude headers as input to rego policy-
InputCreationMethodInputCreationFuncUse your own function to provide input for OPAfunc defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)

Types

type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)

Usage

OPA Fiber middleware sends the following example data to the policy engine as input:

{
"method": "GET",
"path": "/somePath",
"query": {
"name": ["John Doe"]
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
}
}
package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/opafiber"
)

func main() {
app := fiber.New()
module := `
package example.authz

default allow := false

allow {
input.method == "GET"
}
`

cfg := opafiber.Config{
RegoQuery: "data.example.authz.allow",
RegoPolicy: bytes.NewBufferString(module),
IncludeQueryString: true,
DeniedStatusCode: fiber.StatusForbidden,
DeniedResponseMessage: "status forbidden",
IncludeHeaders: []string{"Authorization"},
InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {
return map[string]interface{}{
"method": ctx.Method(),
"path": ctx.Path(),
}, nil
},
}
app.Use(opafiber.New(cfg))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

app.Listen(":8080")
}
- - +Linter

Open Policy Agent support for Fiber.

Note: Requires Go 1.18 and above

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/opafiber

Signature

opafiber.New(config opafiber.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RegoQuerystringRequired - Rego query-
RegoPolicyio.ReaderRequired - Rego policy-
IncludeQueryStringboolInclude query string as input to rego policyfalse
DeniedStatusCodeintHttp status code to return when policy denies request400
DeniedResponseMessagestringHttp response body text to return when policy denies request""
IncludeHeaders[]stringInclude headers as input to rego policy-
InputCreationMethodInputCreationFuncUse your own function to provide input for OPAfunc defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)

Types

type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)

Usage

OPA Fiber middleware sends the following example data to the policy engine as input:

{
"method": "GET",
"path": "/somePath",
"query": {
"name": ["John Doe"]
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
}
}
package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/opafiber"
)

func main() {
app := fiber.New()
module := `
package example.authz

default allow := false

allow {
input.method == "GET"
}
`

cfg := opafiber.Config{
RegoQuery: "data.example.authz.allow",
RegoPolicy: bytes.NewBufferString(module),
IncludeQueryString: true,
DeniedStatusCode: fiber.StatusForbidden,
DeniedResponseMessage: "status forbidden",
IncludeHeaders: []string{"Authorization"},
InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {
return map[string]interface{}{
"method": ctx.Method(),
"path": ctx.Path(),
}, nil
},
}
app.Use(opafiber.New(cfg))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/otelfiber/example/index.html b/contrib/otelfiber/example/index.html index b56d2278867..436e1251323 100644 --- a/contrib/otelfiber/example/index.html +++ b/contrib/otelfiber/example/index.html @@ -6,8 +6,8 @@ Example | Fiber - - + +
@@ -16,8 +16,8 @@ stdout.

These instructions expect you have docker-compose installed.

Bring up the fiber-server and fiber-client services to run the example:

docker-compose up --detach fiber-server fiber-client

The fiber-client service sends just one HTTP request to fiber-server -and then exits. View the span generated by fiber-server in the logs:

docker-compose logs fiber-server

Shut down the services when you are finished with the example:

docker-compose down
- - +and then exits. View the span generated by fiber-server in the logs:

docker-compose logs fiber-server

Shut down the services when you are finished with the example:

docker-compose down
+ + \ No newline at end of file diff --git a/contrib/otelfiber/index.html b/contrib/otelfiber/index.html index c63d2de7504..e28877ef990 100644 --- a/contrib/otelfiber/index.html +++ b/contrib/otelfiber/index.html @@ -6,8 +6,8 @@ Otelfiber | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

OpenTelemetry support for Fiber.

Can be found on OpenTelemetry Registry.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/contrib/otelfiber

Signature

otelfiber.Middleware(opts ...Option) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*fiber.Ctx) boolDefine a function to skip this middleware when returned trueRequired - Rego quernil
TracerProvideroteltrace.TracerProviderSpecifies a tracer provider to use for creating a tracernil - the global tracer provider is used
MeterProviderotelmetric.MeterProviderSpecifies a meter provider to use for reportingnil - the global meter provider is used
Port*intSpecifies the value to use when setting the net.host.port attribute on metrics/spansRequired: If not default (80 for http, 443 for https)
Propagatorspropagation.TextMapPropagatorSpecifies propagators to use for extracting information from the HTTP requestsIf none are specified, global ones will be used
ServerName*stringspecifies the value to use when setting the http.server_name attribute on metrics/spans-
SpanNameFormatterfunc(*fiber.Ctx) stringTakes a function that will be called on every request and the returned string will become the Span Namedefault formatter returns the route pathRaw

Usage

Please refer to example

Example

package main

import (
"context"
"errors"
"log"

"go.opentelemetry.io/otel/sdk/resource"

"github.com/gofiber/fiber/v2"

"github.com/gofiber/contrib/otelfiber"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"

//"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
oteltrace "go.opentelemetry.io/otel/trace"
)

var tracer = otel.Tracer("fiber-server")

func main() {
tp := initTracer()
defer func() {
if err := tp.Shutdown(context.Background()); err != nil {
log.Printf("Error shutting down tracer provider: %v", err)
}
}()

app := fiber.New()

app.Use(otelfiber.Middleware())

app.Get("/error", func(ctx *fiber.Ctx) error {
return errors.New("abc")
})

app.Get("/users/:id", func(c *fiber.Ctx) error {
id := c.Params("id")
name := getUser(c.UserContext(), id)
return c.JSON(fiber.Map{"id": id, name: name})
})

log.Fatal(app.Listen(":3000"))
}

func initTracer() *sdktrace.TracerProvider {
exporter, err := stdout.New(stdout.WithPrettyPrint())
if err != nil {
log.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("my-service"),
)),
)
otel.SetTracerProvider(tp)
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
return tp
}

func getUser(ctx context.Context, id string) string {
_, span := tracer.Start(ctx, "getUser", oteltrace.WithAttributes(attribute.String("id", id)))
defer span.End()
if id == "123" {
return "otelfiber tester"
}
return "unknown"
}
- - +Linter

OpenTelemetry support for Fiber.

Can be found on OpenTelemetry Registry.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/contrib/otelfiber

Signature

otelfiber.Middleware(opts ...Option) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*fiber.Ctx) boolDefine a function to skip this middleware when returned trueRequired - Rego quernil
TracerProvideroteltrace.TracerProviderSpecifies a tracer provider to use for creating a tracernil - the global tracer provider is used
MeterProviderotelmetric.MeterProviderSpecifies a meter provider to use for reportingnil - the global meter provider is used
Port*intSpecifies the value to use when setting the net.host.port attribute on metrics/spansRequired: If not default (80 for http, 443 for https)
Propagatorspropagation.TextMapPropagatorSpecifies propagators to use for extracting information from the HTTP requestsIf none are specified, global ones will be used
ServerName*stringspecifies the value to use when setting the http.server_name attribute on metrics/spans-
SpanNameFormatterfunc(*fiber.Ctx) stringTakes a function that will be called on every request and the returned string will become the Span Namedefault formatter returns the route pathRaw

Usage

Please refer to example

Example

package main

import (
"context"
"errors"
"log"

"go.opentelemetry.io/otel/sdk/resource"

"github.com/gofiber/fiber/v2"

"github.com/gofiber/contrib/otelfiber"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"

//"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
oteltrace "go.opentelemetry.io/otel/trace"
)

var tracer = otel.Tracer("fiber-server")

func main() {
tp := initTracer()
defer func() {
if err := tp.Shutdown(context.Background()); err != nil {
log.Printf("Error shutting down tracer provider: %v", err)
}
}()

app := fiber.New()

app.Use(otelfiber.Middleware())

app.Get("/error", func(ctx *fiber.Ctx) error {
return errors.New("abc")
})

app.Get("/users/:id", func(c *fiber.Ctx) error {
id := c.Params("id")
name := getUser(c.UserContext(), id)
return c.JSON(fiber.Map{"id": id, name: name})
})

log.Fatal(app.Listen(":3000"))
}

func initTracer() *sdktrace.TracerProvider {
exporter, err := stdout.New(stdout.WithPrettyPrint())
if err != nil {
log.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("my-service"),
)),
)
otel.SetTracerProvider(tp)
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
return tp
}

func getUser(ctx context.Context, id string) string {
_, span := tracer.Start(ctx, "getUser", oteltrace.WithAttributes(attribute.String("id", id)))
defer span.End()
if id == "123" {
return "otelfiber tester"
}
return "unknown"
}
+ + \ No newline at end of file diff --git a/contrib/paseto/index.html b/contrib/paseto/index.html index 4f552bea6c9..3946153649e 100644 --- a/contrib/paseto/index.html +++ b/contrib/paseto/index.html @@ -6,8 +6,8 @@ Paseto | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

PASETO returns a Web Token (PASETO) auth middleware.

  • For valid token, it sets the payload data in Ctx.Locals and calls next handler.
  • For invalid token, it returns "401 - Unauthorized" error.
  • For missing token, it returns "400 - BadRequest" error.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/paseto
go get -u github.com/o1egl/paseto

Signature

pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefines a function to skip middlewarenil
SuccessHandlerfunc(*fiber.Ctx) errorSuccessHandler defines a function which is executed for a valid token.c.Next()
ErrorHandlerfunc(*fiber.Ctx, error) errorErrorHandler defines a function which is executed for an invalid token.401 Invalid or expired PASETO
ValidatePayloadValidatorDefines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided.nil
SymmetricKey[]byteSecret key to encrypt token. If present the middleware will generate local tokens.nil
PrivateKeyed25519.PrivateKeySecret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens.nil
PublicKeycrypto.PublicKeyPublic key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens.nil
ContextKeystringContext key to store user information from the token into context."auth-token"
TokenLookup[2]stringTokenLookup is a string slice with size 2, that is used to extract token from the request["header","Authorization"]

Instructions

When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token.

Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token.

In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.

- - +Linter

PASETO returns a Web Token (PASETO) auth middleware.

  • For valid token, it sets the payload data in Ctx.Locals and calls next handler.
  • For invalid token, it returns "401 - Unauthorized" error.
  • For missing token, it returns "400 - BadRequest" error.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/paseto
go get -u github.com/o1egl/paseto

Signature

pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefines a function to skip middlewarenil
SuccessHandlerfunc(*fiber.Ctx) errorSuccessHandler defines a function which is executed for a valid token.c.Next()
ErrorHandlerfunc(*fiber.Ctx, error) errorErrorHandler defines a function which is executed for an invalid token.401 Invalid or expired PASETO
ValidatePayloadValidatorDefines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided.nil
SymmetricKey[]byteSecret key to encrypt token. If present the middleware will generate local tokens.nil
PrivateKeyed25519.PrivateKeySecret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens.nil
PublicKeycrypto.PublicKeyPublic key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens.nil
ContextKeystringContext key to store user information from the token into context."auth-token"
TokenLookup[2]stringTokenLookup is a string slice with size 2, that is used to extract token from the request["header","Authorization"]

Instructions

When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token.

Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token.

In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.

+ + \ No newline at end of file diff --git a/contrib/swagger/index.html b/contrib/swagger/index.html index 023207c4577..1620073fc1c 100644 --- a/contrib/swagger/index.html +++ b/contrib/swagger/index.html @@ -6,8 +6,8 @@ Swagger | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Swagger middleware for Fiber. The middleware handles Swagger UI.

Table of Contents

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/swagger"
)

Then create a Fiber app with app := fiber.New().

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(swagger.New(cfg))

Custom Config

cfg := swagger.Config{
BasePath: "/", //swagger ui base path
FilePath: "./docs/swagger.json",
}

app.Use(swagger.New(cfg))
- - +Linter

Swagger middleware for Fiber. The middleware handles Swagger UI.

Table of Contents

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/swagger"
)

Then create a Fiber app with app := fiber.New().

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(swagger.New(cfg))

Custom Config

cfg := swagger.Config{
BasePath: "/", //swagger ui base path
FilePath: "./docs/swagger.json",
}

app.Use(swagger.New(cfg))
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/casbin/index.html b/contrib/swagger_v1.x.x/casbin/index.html index e8bf97aa4da..91739c52b4b 100644 --- a/contrib/swagger_v1.x.x/casbin/index.html +++ b/contrib/swagger_v1.x.x/casbin/index.html @@ -6,8 +6,8 @@ Casbin | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Casbin middleware for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/casbin

choose an adapter from here

go get -u github.com/casbin/xorm-adapter

Signature

casbin.New(config ...casbin.Config) *casbin.Middleware

Config

PropertyTypeDescriptionDefault
ModelFilePathstringModel file path"./model.conf"
PolicyAdapterpersist.AdapterDatabase adapter for policies./policy.csv
Enforcer*casbin.EnforcerCustom casbin enforcerMiddleware generated enforcer using ModelFilePath & PolicyAdapter
Lookupfunc(*fiber.Ctx) stringLook up for current subject""
Unauthorizedfunc(*fiber.Ctx) errorResponse body for unauthorized responsesUnauthorized
Forbiddenfunc(*fiber.Ctx) errorResponse body for forbidden responsesForbidden

Examples

CustomPermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Post("/blog",
authz.RequiresPermissions([]string{"blog:create"}, casbin.WithValidationRule(casbin.MatchAllRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Delete("/blog/:id",
authz.RequiresPermissions([]string{"blog:create", "blog:delete"}, casbin.WithValidationRule(casbin.AtLeastOneRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoutePermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

// check permission with Method and Path
app.Post("/blog",
authz.RoutePermission(),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoleAuthorization

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Put("/blog/:id",
authz.RequiresRoles([]string{"admin"}),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}
- - +Linter

Casbin middleware for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/casbin

choose an adapter from here

go get -u github.com/casbin/xorm-adapter

Signature

casbin.New(config ...casbin.Config) *casbin.Middleware

Config

PropertyTypeDescriptionDefault
ModelFilePathstringModel file path"./model.conf"
PolicyAdapterpersist.AdapterDatabase adapter for policies./policy.csv
Enforcer*casbin.EnforcerCustom casbin enforcerMiddleware generated enforcer using ModelFilePath & PolicyAdapter
Lookupfunc(*fiber.Ctx) stringLook up for current subject""
Unauthorizedfunc(*fiber.Ctx) errorResponse body for unauthorized responsesUnauthorized
Forbiddenfunc(*fiber.Ctx) errorResponse body for forbidden responsesForbidden

Examples

CustomPermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Post("/blog",
authz.RequiresPermissions([]string{"blog:create"}, casbin.WithValidationRule(casbin.MatchAllRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Delete("/blog/:id",
authz.RequiresPermissions([]string{"blog:create", "blog:delete"}, casbin.WithValidationRule(casbin.AtLeastOneRule)),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoutePermission

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

// check permission with Method and Path
app.Post("/blog",
authz.RoutePermission(),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}

RoleAuthorization

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/casbin"
_ "github.com/go-sql-driver/mysql"
"github.com/casbin/xorm-adapter/v2"
)

func main() {
app := fiber.New()

authz := casbin.New(casbin.Config{
ModelFilePath: "path/to/rbac_model.conf",
PolicyAdapter: xormadapter.NewAdapter("mysql", "root:@tcp(127.0.0.1:3306)/"),
Lookup: func(c *fiber.Ctx) string {
// fetch authenticated user subject
},
})

app.Put("/blog/:id",
authz.RequiresRoles([]string{"admin"}),
func(c *fiber.Ctx) error {
// your handler
},
)

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/fiberi18n/index.html b/contrib/swagger_v1.x.x/fiberi18n/index.html index e9eb60b100b..352184148d8 100644 --- a/contrib/swagger_v1.x.x/fiberi18n/index.html +++ b/contrib/swagger_v1.x.x/fiberi18n/index.html @@ -6,8 +6,8 @@ Fiberi18n | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

go-i18n support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberi18n

Signature

fiberi18n.New(config ...*Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(c *fiber.Ctx) boolA function to skip this middleware when returned true.nil
RootPathstringThe i18n template folder path."./example/localize"
AcceptLanguages[]language.TagA collection of languages that can be processed.[]language.Tag{language.Chinese, language.English}
FormatBundleFilestringThe type of the template file."yaml"
DefaultLanguagelanguage.TagThe default returned language type.language.English
LoaderLoaderThe implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile.LoaderFunc(os.ReadFile)
UnmarshalFunci18n.UnmarshalFuncThe function used for decoding template files.yaml.Unmarshal
LangHandlerfunc(ctx *fiber.Ctx, defaultLang string) stringUsed to get the kind of language handled by *fiber.Ctx and defaultLang.Retrieved from the request header Accept-Language or query parameter lang.

Example

package main

import (
"github.com/gofiber/contrib/fiberi18n"
"github.com/gofiber/fiber/v2"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
)

func main() {
app := fiber.New()
app.Use(
fiberi18n.New(&fiberi18n.Config{
RootPath: "./example/localize",
AcceptLanguages: []language.Tag{language.Chinese, language.English},
DefaultLanguage: language.Chinese,
}),
)
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(fiberi18n.MustGetMessage("welcome"))
})
app.Get("/:name", func(ctx *fiber.Ctx) error {
return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{
MessageID: "welcomeWithName",
TemplateData: map[string]string{
"name": ctx.Params("name"),
},
}))
})
app.Listen("127.0.0.1:3000")
}
- - +Linter

go-i18n support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberi18n

Signature

fiberi18n.New(config ...*Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(c *fiber.Ctx) boolA function to skip this middleware when returned true.nil
RootPathstringThe i18n template folder path."./example/localize"
AcceptLanguages[]language.TagA collection of languages that can be processed.[]language.Tag{language.Chinese, language.English}
FormatBundleFilestringThe type of the template file."yaml"
DefaultLanguagelanguage.TagThe default returned language type.language.English
LoaderLoaderThe implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile.LoaderFunc(os.ReadFile)
UnmarshalFunci18n.UnmarshalFuncThe function used for decoding template files.yaml.Unmarshal
LangHandlerfunc(ctx *fiber.Ctx, defaultLang string) stringUsed to get the kind of language handled by *fiber.Ctx and defaultLang.Retrieved from the request header Accept-Language or query parameter lang.

Example

package main

import (
"github.com/gofiber/contrib/fiberi18n"
"github.com/gofiber/fiber/v2"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
)

func main() {
app := fiber.New()
app.Use(
fiberi18n.New(&fiberi18n.Config{
RootPath: "./example/localize",
AcceptLanguages: []language.Tag{language.Chinese, language.English},
DefaultLanguage: language.Chinese,
}),
)
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(fiberi18n.MustGetMessage("welcome"))
})
app.Get("/:name", func(ctx *fiber.Ctx) error {
return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{
MessageID: "welcomeWithName",
TemplateData: map[string]string{
"name": ctx.Params("name"),
},
}))
})
app.Listen("127.0.0.1:3000")
}
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/fibernewrelic/index.html b/contrib/swagger_v1.x.x/fibernewrelic/index.html index 2e878b1bf01..6bbf6009a3b 100644 --- a/contrib/swagger_v1.x.x/fibernewrelic/index.html +++ b/contrib/swagger_v1.x.x/fibernewrelic/index.html @@ -6,8 +6,8 @@ Fibernewrelic | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

NewRelic support for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibernewrelic

Signature

fibernewrelic.New(config fibernewrelic.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
LicensestringRequired - New Relic License Key""
AppNamestringNew Relic Application Namefiber-api
EnabledboolEnable/Disable New Relicfalse
TransportTypestringCan be HTTP or HTTPS (Deprecated)"HTTP"
ApplicationApplicationExisting New Relic Appnil
ErrorStatusCodeHandlerfunc(c *fiber.Ctx, err error) intIf you want to change newrelic status code, you can use it.DefaultErrorStatusCodeHandler

Usage

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
)

func main() {
app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
License: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
AppName: "MyCustomApi",
Enabled: true,
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}

Usage with existing New Relic application

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
"github.com/newrelic/go-agent/v3/newrelic"
)

func main() {
newrelicApp, err := newrelic.NewApplication(
newrelic.ConfigAppName("MyCustomApi"),
newrelic.ConfigLicense("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
newrelic.ConfigEnabled(true),
)

app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
Application: newrelicApp
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}
- - +Linter

NewRelic support for Fiber.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibernewrelic

Signature

fibernewrelic.New(config fibernewrelic.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
LicensestringRequired - New Relic License Key""
AppNamestringNew Relic Application Namefiber-api
EnabledboolEnable/Disable New Relicfalse
TransportTypestringCan be HTTP or HTTPS (Deprecated)"HTTP"
ApplicationApplicationExisting New Relic Appnil
ErrorStatusCodeHandlerfunc(c *fiber.Ctx, err error) intIf you want to change newrelic status code, you can use it.DefaultErrorStatusCodeHandler

Usage

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
)

func main() {
app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
License: "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
AppName: "MyCustomApi",
Enabled: true,
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}

Usage with existing New Relic application

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fibernewrelic"
"github.com/newrelic/go-agent/v3/newrelic"
)

func main() {
newrelicApp, err := newrelic.NewApplication(
newrelic.ConfigAppName("MyCustomApi"),
newrelic.ConfigLicense("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
newrelic.ConfigEnabled(true),
)

app := fiber.New()

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

cfg := fibernewrelic.Config{
Application: newrelicApp
}

app.Use(fibernewrelic.New(cfg))

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/fibersentry/index.html b/contrib/swagger_v1.x.x/fibersentry/index.html index e3c0ad883e0..48f3f984e69 100644 --- a/contrib/swagger_v1.x.x/fibersentry/index.html +++ b/contrib/swagger_v1.x.x/fibersentry/index.html @@ -6,8 +6,8 @@ Fibersentry | Fiber - - + +
@@ -17,8 +17,8 @@ Security Linter

Sentry support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fibersentry
go get -u github.com/getsentry/sentry-go

Signature

fibersentry.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RepanicboolRepanic configures whether Sentry should repanic after recovery. Set to true, if Recover middleware is used.false
WaitForDeliveryboolWaitForDelivery configures whether you want to block the request before moving forward with the response. If Recover middleware is used, it's safe to either skip this option or set it to false.false
Timeouttime.DurationTimeout for the event delivery requests.time.Second * 2

Usage

fibersentry attaches an instance of *sentry.Hub (https://godoc.org/github.com/getsentry/sentry-go#Hub) to the request's context, which makes it available throughout the rest of the request's lifetime. You can access it by using the fibersentry.GetHubFromContext() method on the context itself in any of your proceeding middleware and routes. -And it should be used instead of the global sentry.CaptureMessage, sentry.CaptureException, or any other calls, as it keeps the separation of data between the requests.

Keep in mind that *sentry.Hub won't be available in middleware attached before to fibersentry!

package main

import (
"fmt"
"log"

"github.com/getsentry/sentry-go"
"github.com/gofiber/contrib/fibersentry"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/utils"
)

func main() {
_ = sentry.Init(sentry.ClientOptions{
Dsn: "",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(utils.ImmutableString(c.Hostname()))
}
}
fmt.Println(event)
return event
},
Debug: true,
AttachStacktrace: true,
})

app := fiber.New()

app.Use(fibersentry.New(fibersentry.Config{
Repanic: true,
WaitForDelivery: true,
}))

enhanceSentryEvent := func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")
}
return c.Next()
}

app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {
panic("y tho")
})

app.All("/", func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.WithScope(func(scope *sentry.Scope) {
scope.SetExtra("unwantedQuery", "someQueryDataMaybe")
hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")
})
}
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

Accessing Context in BeforeSend callback

sentry.Init(sentry.ClientOptions{
Dsn: "your-public-dsn",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(c.Hostname())
}
}
return event
},
})
- - +And it should be used instead of the global sentry.CaptureMessage, sentry.CaptureException, or any other calls, as it keeps the separation of data between the requests.

Keep in mind that *sentry.Hub won't be available in middleware attached before to fibersentry!

package main

import (
"fmt"
"log"

"github.com/getsentry/sentry-go"
"github.com/gofiber/contrib/fibersentry"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/utils"
)

func main() {
_ = sentry.Init(sentry.ClientOptions{
Dsn: "",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(utils.ImmutableString(c.Hostname()))
}
}
fmt.Println(event)
return event
},
Debug: true,
AttachStacktrace: true,
})

app := fiber.New()

app.Use(fibersentry.New(fibersentry.Config{
Repanic: true,
WaitForDelivery: true,
}))

enhanceSentryEvent := func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.Scope().SetTag("someRandomTag", "maybeYouNeedIt")
}
return c.Next()
}

app.All("/foo", enhanceSentryEvent, func(c *fiber.Ctx) error {
panic("y tho")
})

app.All("/", func(c *fiber.Ctx) error {
if hub := fibersentry.GetHubFromContext(c); hub != nil {
hub.WithScope(func(scope *sentry.Scope) {
scope.SetExtra("unwantedQuery", "someQueryDataMaybe")
hub.CaptureMessage("User provided unwanted query string, but we recovered just fine")
})
}
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

Accessing Context in BeforeSend callback

sentry.Init(sentry.ClientOptions{
Dsn: "your-public-dsn",
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if hint.Context != nil {
if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok {
// You have access to the original Context if it panicked
fmt.Println(c.Hostname())
}
}
return event
},
})
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/fiberzap/index.html b/contrib/swagger_v1.x.x/fiberzap/index.html index 77e6f9a6d87..2220fd4d360 100644 --- a/contrib/swagger_v1.x.x/fiberzap/index.html +++ b/contrib/swagger_v1.x.x/fiberzap/index.html @@ -6,8 +6,8 @@ Fiberzap | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Zap logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzap
go get -u go.uber.org/zap

Signature

fiberzap.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zap.LoggerAdd custom zap logger.zap.NewDevelopment()
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zapcore.LevelCustom response levels.[]zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzap"
"go.uber.org/zap"
)

func main() {
app := fiber.New()
logger, _ := zap.NewProduction()

app.Use(fiberzap.New(fiberzap.Config{
Logger: logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

log.Fatal(app.Listen(":3000"))
}
- - +Linter

Zap logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzap
go get -u go.uber.org/zap

Signature

fiberzap.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zap.LoggerAdd custom zap logger.zap.NewDevelopment()
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zapcore.LevelCustom response levels.[]zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzap"
"go.uber.org/zap"
)

func main() {
app := fiber.New()
logger, _ := zap.NewProduction()

app.Use(fiberzap.New(fiberzap.Config{
Logger: logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

log.Fatal(app.Listen(":3000"))
}
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/fiberzerolog/index.html b/contrib/swagger_v1.x.x/fiberzerolog/index.html index c60b84ac1e1..02c0b27ae5b 100644 --- a/contrib/swagger_v1.x.x/fiberzerolog/index.html +++ b/contrib/swagger_v1.x.x/fiberzerolog/index.html @@ -6,8 +6,8 @@ Fiberzerolog | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Zerolog logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzerolog
go get -u github.com/rs/zerolog/log

Signature

fiberzerolog.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zerolog.LoggerAdd custom zerolog logger.zerolog.New(os.Stderr).With().Timestamp().Logger()
GetLoggerfunc(*fiber.Ctx) zerolog.LoggerGet custom zerolog logger, if it's defined the returned logger will replace the Logger value.nil
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url", "error"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zerolog.LevelCustom response levels.[]zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzerolog"
"github.com/rs/zerolog"
)

func main() {
app := fiber.New()
logger := zerolog.New(os.Stderr).With().Timestamp().Logger()

app.Use(fiberzerolog.New(fiberzerolog.Config{
Logger: &logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

if err := app.Listen(":3000"); err != nil {
logger.Fatal().Err(err).Msg("Fiber app error")
}
}
- - +Linter

Zerolog logging support for Fiber.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/fiberzerolog
go get -u github.com/rs/zerolog/log

Signature

fiberzerolog.New(config ...Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefine a function to skip this middleware when returned truenil
Logger*zerolog.LoggerAdd custom zerolog logger.zerolog.New(os.Stderr).With().Timestamp().Logger()
GetLoggerfunc(*fiber.Ctx) zerolog.LoggerGet custom zerolog logger, if it's defined the returned logger will replace the Logger value.nil
Fields[]stringAdd fields what you want see.[]string{"latency", "status", "method", "url", "error"}
Messages[]stringCustom response messages.[]string{"Server error", "Client error", "Success"}
Levels[]zerolog.LevelCustom response levels.[]zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel}
SkipURIs[]stringSkip logging these URI.[]string{}
GetResBodyfunc(c *fiber.Ctx) []byteDefine a function to get response body when return non-nil.
eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody.
nil

Example

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/fiberzerolog"
"github.com/rs/zerolog"
)

func main() {
app := fiber.New()
logger := zerolog.New(os.Stderr).With().Timestamp().Logger()

app.Use(fiberzerolog.New(fiberzerolog.Config{
Logger: &logger,
}))

app.Get("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

if err := app.Listen(":3000"); err != nil {
logger.Fatal().Err(err).Msg("Fiber app error")
}
}
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/index.html b/contrib/swagger_v1.x.x/index.html index 86bc86db0d0..eac398f23ff 100644 --- a/contrib/swagger_v1.x.x/index.html +++ b/contrib/swagger_v1.x.x/index.html @@ -6,16 +6,16 @@ 👋 Welcome | Fiber - - + + - - +Linter

Repository for third party middlewares with dependencies.

📑 Middleware Implementations

+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/jwt/index.html b/contrib/swagger_v1.x.x/jwt/index.html index b6b25df1b02..142c439e475 100644 --- a/contrib/swagger_v1.x.x/jwt/index.html +++ b/contrib/swagger_v1.x.x/jwt/index.html @@ -6,8 +6,8 @@ JWT | Fiber - - + +
@@ -24,8 +24,8 @@ This is one of the three options to provide a token validation key. The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey. Required if neither SigningKeys nor SigningKey is provided. -Default to an internal implementation verifying the signing algorithm and selecting the proper key.

package main

import (
"fmt"
"github.com/gofiber/fiber/v2"

jwtware "github.com/gofiber/contrib/jwt"
"github.com/golang-jwt/jwt/v5"
)

func main() {
app := fiber.New()

app.Use(jwtware.New(jwtware.Config{
KeyFunc: customKeyFunc(),
}))

app.Get("/ok", func(c *fiber.Ctx) error {
return c.SendString("OK")
})
}

func customKeyFunc() jwt.Keyfunc {
return func(t *jwt.Token) (interface{}, error) {
// Always check the signing method
if t.Method.Alg() != jwtware.HS256 {
return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])
}

// TODO custom implementation of loading signing key like from a database
signingKey := "secret"

return []byte(signingKey), nil
}
}
- - +Default to an internal implementation verifying the signing algorithm and selecting the proper key.

package main

import (
"fmt"
"github.com/gofiber/fiber/v2"

jwtware "github.com/gofiber/contrib/jwt"
"github.com/golang-jwt/jwt/v5"
)

func main() {
app := fiber.New()

app.Use(jwtware.New(jwtware.Config{
KeyFunc: customKeyFunc(),
}))

app.Get("/ok", func(c *fiber.Ctx) error {
return c.SendString("OK")
})
}

func customKeyFunc() jwt.Keyfunc {
return func(t *jwt.Token) (interface{}, error) {
// Always check the signing method
if t.Method.Alg() != jwtware.HS256 {
return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])
}

// TODO custom implementation of loading signing key like from a database
signingKey := "secret"

return []byte(signingKey), nil
}
}
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/opafiber/index.html b/contrib/swagger_v1.x.x/opafiber/index.html index e4d62181fb5..95d40ed8fbf 100644 --- a/contrib/swagger_v1.x.x/opafiber/index.html +++ b/contrib/swagger_v1.x.x/opafiber/index.html @@ -6,8 +6,8 @@ Opafiber | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Open Policy Agent support for Fiber.

Note: Requires Go 1.18 and above

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/opafiber

Signature

opafiber.New(config opafiber.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RegoQuerystringRequired - Rego query-
RegoPolicyio.ReaderRequired - Rego policy-
IncludeQueryStringboolInclude query string as input to rego policyfalse
DeniedStatusCodeintHttp status code to return when policy denies request400
DeniedResponseMessagestringHttp response body text to return when policy denies request""
IncludeHeaders[]stringInclude headers as input to rego policy-
InputCreationMethodInputCreationFuncUse your own function to provide input for OPAfunc defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)

Types

type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)

Usage

OPA Fiber middleware sends the following example data to the policy engine as input:

{
"method": "GET",
"path": "/somePath",
"query": {
"name": ["John Doe"]
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
}
}
package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/opafiber"
)

func main() {
app := fiber.New()
module := `
package example.authz

default allow := false

allow {
input.method == "GET"
}
`

cfg := opafiber.Config{
RegoQuery: "data.example.authz.allow",
RegoPolicy: bytes.NewBufferString(module),
IncludeQueryString: true,
DeniedStatusCode: fiber.StatusForbidden,
DeniedResponseMessage: "status forbidden",
IncludeHeaders: []string{"Authorization"},
InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {
return map[string]interface{}{
"method": ctx.Method(),
"path": ctx.Path(),
}, nil
},
}
app.Use(opafiber.New(cfg))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

app.Listen(":8080")
}
- - +Linter

Open Policy Agent support for Fiber.

Note: Requires Go 1.18 and above

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/opafiber

Signature

opafiber.New(config opafiber.Config) fiber.Handler

Config

PropertyTypeDescriptionDefault
RegoQuerystringRequired - Rego query-
RegoPolicyio.ReaderRequired - Rego policy-
IncludeQueryStringboolInclude query string as input to rego policyfalse
DeniedStatusCodeintHttp status code to return when policy denies request400
DeniedResponseMessagestringHttp response body text to return when policy denies request""
IncludeHeaders[]stringInclude headers as input to rego policy-
InputCreationMethodInputCreationFuncUse your own function to provide input for OPAfunc defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)

Types

type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)

Usage

OPA Fiber middleware sends the following example data to the policy engine as input:

{
"method": "GET",
"path": "/somePath",
"query": {
"name": ["John Doe"]
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
}
}
package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/opafiber"
)

func main() {
app := fiber.New()
module := `
package example.authz

default allow := false

allow {
input.method == "GET"
}
`

cfg := opafiber.Config{
RegoQuery: "data.example.authz.allow",
RegoPolicy: bytes.NewBufferString(module),
IncludeQueryString: true,
DeniedStatusCode: fiber.StatusForbidden,
DeniedResponseMessage: "status forbidden",
IncludeHeaders: []string{"Authorization"},
InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) {
return map[string]interface{}{
"method": ctx.Method(),
"path": ctx.Path(),
}, nil
},
}
app.Use(opafiber.New(cfg))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

app.Listen(":8080")
}
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/otelfiber/example/index.html b/contrib/swagger_v1.x.x/otelfiber/example/index.html index c8db13d69db..a812d7f50d3 100644 --- a/contrib/swagger_v1.x.x/otelfiber/example/index.html +++ b/contrib/swagger_v1.x.x/otelfiber/example/index.html @@ -6,8 +6,8 @@ Example | Fiber - - + +
@@ -16,8 +16,8 @@ stdout.

These instructions expect you have docker-compose installed.

Bring up the fiber-server and fiber-client services to run the example:

docker-compose up --detach fiber-server fiber-client

The fiber-client service sends just one HTTP request to fiber-server -and then exits. View the span generated by fiber-server in the logs:

docker-compose logs fiber-server

Shut down the services when you are finished with the example:

docker-compose down
- - +and then exits. View the span generated by fiber-server in the logs:

docker-compose logs fiber-server

Shut down the services when you are finished with the example:

docker-compose down
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/otelfiber/index.html b/contrib/swagger_v1.x.x/otelfiber/index.html index 619da48624b..9a1eb6d6714 100644 --- a/contrib/swagger_v1.x.x/otelfiber/index.html +++ b/contrib/swagger_v1.x.x/otelfiber/index.html @@ -6,8 +6,8 @@ Otelfiber | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

OpenTelemetry support for Fiber.

Can be found on OpenTelemetry Registry.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/contrib/otelfiber

Signature

otelfiber.Middleware(opts ...Option) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*fiber.Ctx) boolDefine a function to skip this middleware when returned trueRequired - Rego quernil
TracerProvideroteltrace.TracerProviderSpecifies a tracer provider to use for creating a tracernil - the global tracer provider is used
MeterProviderotelmetric.MeterProviderSpecifies a meter provider to use for reportingnil - the global meter provider is used
Port*intSpecifies the value to use when setting the net.host.port attribute on metrics/spansRequired: If not default (80 for http, 443 for https)
Propagatorspropagation.TextMapPropagatorSpecifies propagators to use for extracting information from the HTTP requestsIf none are specified, global ones will be used
ServerName*stringspecifies the value to use when setting the http.server_name attribute on metrics/spans-
SpanNameFormatterfunc(*fiber.Ctx) stringTakes a function that will be called on every request and the returned string will become the Span Namedefault formatter returns the route pathRaw

Usage

Please refer to example

Example

package main

import (
"context"
"errors"
"log"

"go.opentelemetry.io/otel/sdk/resource"

"github.com/gofiber/fiber/v2"

"github.com/gofiber/contrib/otelfiber"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"

//"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
oteltrace "go.opentelemetry.io/otel/trace"
)

var tracer = otel.Tracer("fiber-server")

func main() {
tp := initTracer()
defer func() {
if err := tp.Shutdown(context.Background()); err != nil {
log.Printf("Error shutting down tracer provider: %v", err)
}
}()

app := fiber.New()

app.Use(otelfiber.Middleware())

app.Get("/error", func(ctx *fiber.Ctx) error {
return errors.New("abc")
})

app.Get("/users/:id", func(c *fiber.Ctx) error {
id := c.Params("id")
name := getUser(c.UserContext(), id)
return c.JSON(fiber.Map{"id": id, name: name})
})

log.Fatal(app.Listen(":3000"))
}

func initTracer() *sdktrace.TracerProvider {
exporter, err := stdout.New(stdout.WithPrettyPrint())
if err != nil {
log.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("my-service"),
)),
)
otel.SetTracerProvider(tp)
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
return tp
}

func getUser(ctx context.Context, id string) string {
_, span := tracer.Start(ctx, "getUser", oteltrace.WithAttributes(attribute.String("id", id)))
defer span.End()
if id == "123" {
return "otelfiber tester"
}
return "unknown"
}
- - +Linter

OpenTelemetry support for Fiber.

Can be found on OpenTelemetry Registry.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/contrib/otelfiber

Signature

otelfiber.Middleware(opts ...Option) fiber.Handler

Config

PropertyTypeDescriptionDefault
Nextfunc(*fiber.Ctx) boolDefine a function to skip this middleware when returned trueRequired - Rego quernil
TracerProvideroteltrace.TracerProviderSpecifies a tracer provider to use for creating a tracernil - the global tracer provider is used
MeterProviderotelmetric.MeterProviderSpecifies a meter provider to use for reportingnil - the global meter provider is used
Port*intSpecifies the value to use when setting the net.host.port attribute on metrics/spansRequired: If not default (80 for http, 443 for https)
Propagatorspropagation.TextMapPropagatorSpecifies propagators to use for extracting information from the HTTP requestsIf none are specified, global ones will be used
ServerName*stringspecifies the value to use when setting the http.server_name attribute on metrics/spans-
SpanNameFormatterfunc(*fiber.Ctx) stringTakes a function that will be called on every request and the returned string will become the Span Namedefault formatter returns the route pathRaw

Usage

Please refer to example

Example

package main

import (
"context"
"errors"
"log"

"go.opentelemetry.io/otel/sdk/resource"

"github.com/gofiber/fiber/v2"

"github.com/gofiber/contrib/otelfiber"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"

//"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
oteltrace "go.opentelemetry.io/otel/trace"
)

var tracer = otel.Tracer("fiber-server")

func main() {
tp := initTracer()
defer func() {
if err := tp.Shutdown(context.Background()); err != nil {
log.Printf("Error shutting down tracer provider: %v", err)
}
}()

app := fiber.New()

app.Use(otelfiber.Middleware())

app.Get("/error", func(ctx *fiber.Ctx) error {
return errors.New("abc")
})

app.Get("/users/:id", func(c *fiber.Ctx) error {
id := c.Params("id")
name := getUser(c.UserContext(), id)
return c.JSON(fiber.Map{"id": id, name: name})
})

log.Fatal(app.Listen(":3000"))
}

func initTracer() *sdktrace.TracerProvider {
exporter, err := stdout.New(stdout.WithPrettyPrint())
if err != nil {
log.Fatal(err)
}
tp := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceNameKey.String("my-service"),
)),
)
otel.SetTracerProvider(tp)
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
return tp
}

func getUser(ctx context.Context, id string) string {
_, span := tracer.Start(ctx, "getUser", oteltrace.WithAttributes(attribute.String("id", id)))
defer span.End()
if id == "123" {
return "otelfiber tester"
}
return "unknown"
}
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/paseto/index.html b/contrib/swagger_v1.x.x/paseto/index.html index fb0821653b1..14eca342c09 100644 --- a/contrib/swagger_v1.x.x/paseto/index.html +++ b/contrib/swagger_v1.x.x/paseto/index.html @@ -6,8 +6,8 @@ Paseto | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

PASETO returns a Web Token (PASETO) auth middleware.

  • For valid token, it sets the payload data in Ctx.Locals and calls next handler.
  • For invalid token, it returns "401 - Unauthorized" error.
  • For missing token, it returns "400 - BadRequest" error.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/paseto
go get -u github.com/o1egl/paseto

Signature

pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefines a function to skip middlewarenil
SuccessHandlerfunc(*fiber.Ctx) errorSuccessHandler defines a function which is executed for a valid token.c.Next()
ErrorHandlerfunc(*fiber.Ctx, error) errorErrorHandler defines a function which is executed for an invalid token.401 Invalid or expired PASETO
ValidatePayloadValidatorDefines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided.nil
SymmetricKey[]byteSecret key to encrypt token. If present the middleware will generate local tokens.nil
PrivateKeyed25519.PrivateKeySecret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens.nil
PublicKeycrypto.PublicKeyPublic key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens.nil
ContextKeystringContext key to store user information from the token into context."auth-token"
TokenLookup[2]stringTokenLookup is a string slice with size 2, that is used to extract token from the request["header","Authorization"]

Instructions

When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token.

Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token.

In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.

- - +Linter

PASETO returns a Web Token (PASETO) auth middleware.

  • For valid token, it sets the payload data in Ctx.Locals and calls next handler.
  • For invalid token, it returns "401 - Unauthorized" error.
  • For missing token, it returns "400 - BadRequest" error.

Install

This middleware supports Fiber v2.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/paseto
go get -u github.com/o1egl/paseto

Signature

pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error

Config

PropertyTypeDescriptionDefault
Nextfunc(*Ctx) boolDefines a function to skip middlewarenil
SuccessHandlerfunc(*fiber.Ctx) errorSuccessHandler defines a function which is executed for a valid token.c.Next()
ErrorHandlerfunc(*fiber.Ctx, error) errorErrorHandler defines a function which is executed for an invalid token.401 Invalid or expired PASETO
ValidatePayloadValidatorDefines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided.nil
SymmetricKey[]byteSecret key to encrypt token. If present the middleware will generate local tokens.nil
PrivateKeyed25519.PrivateKeySecret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens.nil
PublicKeycrypto.PublicKeyPublic key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens.nil
ContextKeystringContext key to store user information from the token into context."auth-token"
TokenLookup[2]stringTokenLookup is a string slice with size 2, that is used to extract token from the request["header","Authorization"]

Instructions

When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token.

Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token.

In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.

+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/search-index.json b/contrib/swagger_v1.x.x/search-index.json index 17068470cb1..a86b66d5b4c 100644 --- a/contrib/swagger_v1.x.x/search-index.json +++ b/contrib/swagger_v1.x.x/search-index.json @@ -1 +1 @@ -[{"documents":[{"i":2419,"t":"👋 Welcome","u":"/contrib/swagger_v1.x.x/","b":[]},{"i":2424,"t":"Casbin","u":"/contrib/swagger_v1.x.x/casbin/","b":[]},{"i":2440,"t":"Fiberi18n","u":"/contrib/swagger_v1.x.x/fiberi18n/","b":[]},{"i":2450,"t":"Fibernewrelic","u":"/contrib/swagger_v1.x.x/fibernewrelic/","b":[]},{"i":2462,"t":"Fibersentry","u":"/contrib/swagger_v1.x.x/fibersentry/","b":[]},{"i":2474,"t":"Fiberzap","u":"/contrib/swagger_v1.x.x/fiberzap/","b":[]},{"i":2484,"t":"JWT","u":"/contrib/swagger_v1.x.x/jwt/","b":[]},{"i":2504,"t":"Opafiber","u":"/contrib/swagger_v1.x.x/opafiber/","b":[]},{"i":2516,"t":"Otelfiber","u":"/contrib/swagger_v1.x.x/otelfiber/","b":["Otelfiber"]},{"i":2528,"t":"Example","u":"/contrib/swagger_v1.x.x/otelfiber/example/","b":["Otelfiber"]},{"i":2530,"t":"Paseto","u":"/contrib/swagger_v1.x.x/paseto/","b":[]},{"i":2540,"t":"Swagger","u":"/contrib/swagger_v1.x.x/swagger/","b":[]},{"i":2552,"t":"Websocket","u":"/contrib/swagger_v1.x.x/websocket/","b":[]},{"i":2560,"t":"Fiberzerolog","u":"/contrib/swagger_v1.x.x/fiberzerolog/","b":[]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2419",[0,1.7,1,1.7]],["t/2424",[2,2.367]],["t/2440",[3,2.367]],["t/2450",[4,2.367]],["t/2462",[5,2.367]],["t/2474",[6,2.367]],["t/2484",[7,2.367]],["t/2504",[8,2.367]],["t/2516",[9,2.367]],["t/2528",[10,2.367]],["t/2530",[11,2.367]],["t/2540",[12,2.367]],["t/2552",[13,2.367]],["t/2560",[14,2.367]]],"invertedIndex":[["",{"_index":0,"t":{"2419":{"position":[[0,2]]}}}],["casbin",{"_index":2,"t":{"2424":{"position":[[0,6]]}}}],["exampl",{"_index":10,"t":{"2528":{"position":[[0,7]]}}}],["fiberi18n",{"_index":3,"t":{"2440":{"position":[[0,9]]}}}],["fibernewrel",{"_index":4,"t":{"2450":{"position":[[0,13]]}}}],["fibersentri",{"_index":5,"t":{"2462":{"position":[[0,11]]}}}],["fiberzap",{"_index":6,"t":{"2474":{"position":[[0,8]]}}}],["fiberzerolog",{"_index":14,"t":{"2560":{"position":[[0,12]]}}}],["jwt",{"_index":7,"t":{"2484":{"position":[[0,3]]}}}],["opafib",{"_index":8,"t":{"2504":{"position":[[0,8]]}}}],["otelfib",{"_index":9,"t":{"2516":{"position":[[0,9]]}}}],["paseto",{"_index":11,"t":{"2530":{"position":[[0,6]]}}}],["swagger",{"_index":12,"t":{"2540":{"position":[[0,7]]}}}],["websocket",{"_index":13,"t":{"2552":{"position":[[0,9]]}}}],["welcom",{"_index":1,"t":{"2419":{"position":[[3,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":2420,"t":"Contrib","u":"/contrib/swagger_v1.x.x/","h":"","p":2419},{"i":2422,"t":"📑 Middleware Implementations","u":"/contrib/swagger_v1.x.x/","h":"#-middleware-implementations","p":2419},{"i":2426,"t":"Install","u":"/contrib/swagger_v1.x.x/casbin/","h":"#install","p":2424},{"i":2428,"t":"Signature","u":"/contrib/swagger_v1.x.x/casbin/","h":"#signature","p":2424},{"i":2430,"t":"Config","u":"/contrib/swagger_v1.x.x/casbin/","h":"#config","p":2424},{"i":2432,"t":"Examples","u":"/contrib/swagger_v1.x.x/casbin/","h":"#examples","p":2424},{"i":2434,"t":"CustomPermission","u":"/contrib/swagger_v1.x.x/casbin/","h":"#custompermission","p":2424},{"i":2436,"t":"RoutePermission","u":"/contrib/swagger_v1.x.x/casbin/","h":"#routepermission","p":2424},{"i":2438,"t":"RoleAuthorization","u":"/contrib/swagger_v1.x.x/casbin/","h":"#roleauthorization","p":2424},{"i":2442,"t":"Install","u":"/contrib/swagger_v1.x.x/fiberi18n/","h":"#install","p":2440},{"i":2444,"t":"Signature","u":"/contrib/swagger_v1.x.x/fiberi18n/","h":"#signature","p":2440},{"i":2446,"t":"Config","u":"/contrib/swagger_v1.x.x/fiberi18n/","h":"#config","p":2440},{"i":2448,"t":"Example","u":"/contrib/swagger_v1.x.x/fiberi18n/","h":"#example","p":2440},{"i":2452,"t":"Install","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"#install","p":2450},{"i":2454,"t":"Signature","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"#signature","p":2450},{"i":2456,"t":"Config","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"#config","p":2450},{"i":2458,"t":"Usage","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"#usage","p":2450},{"i":2460,"t":"Usage with existing New Relic application","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"#usage-with-existing-new-relic-application","p":2450},{"i":2464,"t":"Install","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"#install","p":2462},{"i":2466,"t":"Signature","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"#signature","p":2462},{"i":2468,"t":"Config","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"#config","p":2462},{"i":2470,"t":"Usage","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"#usage","p":2462},{"i":2472,"t":"Accessing Context in BeforeSend callback","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"#accessing-context-in-beforesend-callback","p":2462},{"i":2476,"t":"Install","u":"/contrib/swagger_v1.x.x/fiberzap/","h":"#install","p":2474},{"i":2478,"t":"Signature","u":"/contrib/swagger_v1.x.x/fiberzap/","h":"#signature","p":2474},{"i":2480,"t":"Config","u":"/contrib/swagger_v1.x.x/fiberzap/","h":"#config","p":2474},{"i":2482,"t":"Example","u":"/contrib/swagger_v1.x.x/fiberzap/","h":"#example","p":2474},{"i":2486,"t":"Install","u":"/contrib/swagger_v1.x.x/jwt/","h":"#install","p":2484},{"i":2488,"t":"Signature","u":"/contrib/swagger_v1.x.x/jwt/","h":"#signature","p":2484},{"i":2490,"t":"Config","u":"/contrib/swagger_v1.x.x/jwt/","h":"#config","p":2484},{"i":2492,"t":"HS256 Example","u":"/contrib/swagger_v1.x.x/jwt/","h":"#hs256-example","p":2484},{"i":2494,"t":"HS256 Test","u":"/contrib/swagger_v1.x.x/jwt/","h":"#hs256-test","p":2484},{"i":2496,"t":"RS256 Example","u":"/contrib/swagger_v1.x.x/jwt/","h":"#rs256-example","p":2484},{"i":2498,"t":"RS256 Test","u":"/contrib/swagger_v1.x.x/jwt/","h":"#rs256-test","p":2484},{"i":2500,"t":"JWK Set Test","u":"/contrib/swagger_v1.x.x/jwt/","h":"#jwk-set-test","p":2484},{"i":2502,"t":"Custom KeyFunc example","u":"/contrib/swagger_v1.x.x/jwt/","h":"#custom-keyfunc-example","p":2484},{"i":2506,"t":"Install","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#install","p":2504},{"i":2508,"t":"Signature","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#signature","p":2504},{"i":2510,"t":"Config","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#config","p":2504},{"i":2512,"t":"Types","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#types","p":2504},{"i":2514,"t":"Usage","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#usage","p":2504},{"i":2518,"t":"Install","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#install","p":2516},{"i":2520,"t":"Signature","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#signature","p":2516},{"i":2522,"t":"Config","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#config","p":2516},{"i":2524,"t":"Usage","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#usage","p":2516},{"i":2526,"t":"Example","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#example","p":2516},{"i":2532,"t":"Install","u":"/contrib/swagger_v1.x.x/paseto/","h":"#install","p":2530},{"i":2534,"t":"Signature","u":"/contrib/swagger_v1.x.x/paseto/","h":"#signature","p":2530},{"i":2536,"t":"Config","u":"/contrib/swagger_v1.x.x/paseto/","h":"#config","p":2530},{"i":2538,"t":"Instructions","u":"/contrib/swagger_v1.x.x/paseto/","h":"#instructions","p":2530},{"i":2542,"t":"Table of Contents","u":"/contrib/swagger_v1.x.x/swagger/","h":"#table-of-contents","p":2540},{"i":2544,"t":"Signatures","u":"/contrib/swagger_v1.x.x/swagger/","h":"#signatures","p":2540},{"i":2546,"t":"Examples","u":"/contrib/swagger_v1.x.x/swagger/","h":"#examples","p":2540},{"i":2548,"t":"Default Config","u":"/contrib/swagger_v1.x.x/swagger/","h":"#default-config","p":2540},{"i":2550,"t":"Custom Config","u":"/contrib/swagger_v1.x.x/swagger/","h":"#custom-config","p":2540},{"i":2554,"t":"Install","u":"/contrib/swagger_v1.x.x/websocket/","h":"#install","p":2552},{"i":2556,"t":"Example","u":"/contrib/swagger_v1.x.x/websocket/","h":"#example","p":2552},{"i":2558,"t":"Note with cache middleware","u":"/contrib/swagger_v1.x.x/websocket/","h":"#note-with-cache-middleware","p":2552},{"i":2562,"t":"Install","u":"/contrib/swagger_v1.x.x/fiberzerolog/","h":"#install","p":2560},{"i":2564,"t":"Signature","u":"/contrib/swagger_v1.x.x/fiberzerolog/","h":"#signature","p":2560},{"i":2566,"t":"Config","u":"/contrib/swagger_v1.x.x/fiberzerolog/","h":"#config","p":2560},{"i":2568,"t":"Example","u":"/contrib/swagger_v1.x.x/fiberzerolog/","h":"#example","p":2560}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2420",[0,4.186]],["t/2422",[1,2.497,2,2.156,3,2.497]],["t/2426",[4,1.905]],["t/2428",[5,1.905]],["t/2430",[6,1.811]],["t/2432",[7,2.007]],["t/2434",[8,4.186]],["t/2436",[9,4.186]],["t/2438",[10,4.186]],["t/2442",[4,1.905]],["t/2444",[5,1.905]],["t/2446",[6,1.811]],["t/2448",[7,2.007]],["t/2452",[4,1.905]],["t/2454",[5,1.905]],["t/2456",[6,1.811]],["t/2458",[11,2.731]],["t/2460",[11,1.161,12,1.779,13,1.779,14,1.779,15,1.779]],["t/2464",[4,1.905]],["t/2466",[5,1.905]],["t/2468",[6,1.811]],["t/2470",[11,2.731]],["t/2472",[16,2.078,17,2.078,18,2.078,19,2.078]],["t/2476",[4,1.905]],["t/2478",[5,1.905]],["t/2480",[6,1.811]],["t/2482",[7,2.007]],["t/2486",[4,1.905]],["t/2488",[5,1.905]],["t/2490",[6,1.811]],["t/2492",[7,1.5,20,2.701]],["t/2494",[20,2.701,21,2.419]],["t/2496",[7,1.5,22,2.701]],["t/2498",[21,2.419,22,2.701]],["t/2500",[21,1.931,23,2.497,24,2.497]],["t/2502",[7,1.197,25,2.156,26,2.497]],["t/2506",[4,1.905]],["t/2508",[5,1.905]],["t/2510",[6,1.811]],["t/2512",[27,4.186]],["t/2514",[11,2.731]],["t/2518",[4,1.905]],["t/2520",[5,1.905]],["t/2522",[6,1.811]],["t/2524",[11,2.731]],["t/2526",[7,2.007]],["t/2532",[4,1.905]],["t/2534",[5,1.905]],["t/2536",[6,1.811]],["t/2538",[28,4.186]],["t/2542",[29,3.128,30,3.128]],["t/2544",[5,1.905]],["t/2546",[7,2.007]],["t/2548",[6,1.354,31,3.128]],["t/2550",[6,1.354,25,2.701]],["t/2554",[4,1.905]],["t/2556",[7,2.007]],["t/2558",[2,2.156,32,2.497,33,2.497]],["t/2562",[4,1.905]],["t/2564",[5,1.905]],["t/2566",[6,1.811]],["t/2568",[7,2.007]]],"invertedIndex":[["",{"_index":1,"t":{"2422":{"position":[[0,2]]}}}],["access",{"_index":16,"t":{"2472":{"position":[[0,9]]}}}],["applic",{"_index":15,"t":{"2460":{"position":[[30,11]]}}}],["beforesend",{"_index":18,"t":{"2472":{"position":[[21,10]]}}}],["cach",{"_index":33,"t":{"2558":{"position":[[10,5]]}}}],["callback",{"_index":19,"t":{"2472":{"position":[[32,8]]}}}],["config",{"_index":6,"t":{"2430":{"position":[[0,6]]},"2446":{"position":[[0,6]]},"2456":{"position":[[0,6]]},"2468":{"position":[[0,6]]},"2480":{"position":[[0,6]]},"2490":{"position":[[0,6]]},"2510":{"position":[[0,6]]},"2522":{"position":[[0,6]]},"2536":{"position":[[0,6]]},"2548":{"position":[[8,6]]},"2550":{"position":[[7,6]]},"2566":{"position":[[0,6]]}}}],["content",{"_index":30,"t":{"2542":{"position":[[9,8]]}}}],["context",{"_index":17,"t":{"2472":{"position":[[10,7]]}}}],["contrib",{"_index":0,"t":{"2420":{"position":[[0,7]]}}}],["custom",{"_index":25,"t":{"2502":{"position":[[0,6]]},"2550":{"position":[[0,6]]}}}],["custompermiss",{"_index":8,"t":{"2434":{"position":[[0,16]]}}}],["default",{"_index":31,"t":{"2548":{"position":[[0,7]]}}}],["exampl",{"_index":7,"t":{"2432":{"position":[[0,8]]},"2448":{"position":[[0,7]]},"2482":{"position":[[0,7]]},"2492":{"position":[[6,7]]},"2496":{"position":[[6,7]]},"2502":{"position":[[15,7]]},"2526":{"position":[[0,7]]},"2546":{"position":[[0,8]]},"2556":{"position":[[0,7]]},"2568":{"position":[[0,7]]}}}],["exist",{"_index":12,"t":{"2460":{"position":[[11,8]]}}}],["hs256",{"_index":20,"t":{"2492":{"position":[[0,5]]},"2494":{"position":[[0,5]]}}}],["implement",{"_index":3,"t":{"2422":{"position":[[14,15]]}}}],["instal",{"_index":4,"t":{"2426":{"position":[[0,7]]},"2442":{"position":[[0,7]]},"2452":{"position":[[0,7]]},"2464":{"position":[[0,7]]},"2476":{"position":[[0,7]]},"2486":{"position":[[0,7]]},"2506":{"position":[[0,7]]},"2518":{"position":[[0,7]]},"2532":{"position":[[0,7]]},"2554":{"position":[[0,7]]},"2562":{"position":[[0,7]]}}}],["instruct",{"_index":28,"t":{"2538":{"position":[[0,12]]}}}],["jwk",{"_index":23,"t":{"2500":{"position":[[0,3]]}}}],["keyfunc",{"_index":26,"t":{"2502":{"position":[[7,7]]}}}],["middlewar",{"_index":2,"t":{"2422":{"position":[[3,10]]},"2558":{"position":[[16,10]]}}}],["new",{"_index":13,"t":{"2460":{"position":[[20,3]]}}}],["note",{"_index":32,"t":{"2558":{"position":[[0,4]]}}}],["relic",{"_index":14,"t":{"2460":{"position":[[24,5]]}}}],["roleauthor",{"_index":10,"t":{"2438":{"position":[[0,17]]}}}],["routepermiss",{"_index":9,"t":{"2436":{"position":[[0,15]]}}}],["rs256",{"_index":22,"t":{"2496":{"position":[[0,5]]},"2498":{"position":[[0,5]]}}}],["set",{"_index":24,"t":{"2500":{"position":[[4,3]]}}}],["signatur",{"_index":5,"t":{"2428":{"position":[[0,9]]},"2444":{"position":[[0,9]]},"2454":{"position":[[0,9]]},"2466":{"position":[[0,9]]},"2478":{"position":[[0,9]]},"2488":{"position":[[0,9]]},"2508":{"position":[[0,9]]},"2520":{"position":[[0,9]]},"2534":{"position":[[0,9]]},"2544":{"position":[[0,10]]},"2564":{"position":[[0,9]]}}}],["tabl",{"_index":29,"t":{"2542":{"position":[[0,5]]}}}],["test",{"_index":21,"t":{"2494":{"position":[[6,4]]},"2498":{"position":[[6,4]]},"2500":{"position":[[8,4]]}}}],["type",{"_index":27,"t":{"2512":{"position":[[0,5]]}}}],["usag",{"_index":11,"t":{"2458":{"position":[[0,5]]},"2460":{"position":[[0,5]]},"2470":{"position":[[0,5]]},"2514":{"position":[[0,5]]},"2524":{"position":[[0,5]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":2421,"t":"Repository for third party middlewares with dependencies.","s":"Contrib","u":"/contrib/swagger_v1.x.x/","h":"","p":2419},{"i":2423,"t":"Casbin Fiberi18n Fibersentry Fiberzap Fiberzerolog JWT NewRelic Open Policy Agent Otelfiber (OpenTelemetry) Paseto Swagger Websocket","s":"📑 Middleware Implementations","u":"/contrib/swagger_v1.x.x/","h":"#-middleware-implementations","p":2419},{"i":2425,"t":"Casbin middleware for Fiber.","s":"Casbin","u":"/contrib/swagger_v1.x.x/casbin/","h":"","p":2424},{"i":2427,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/casbin choose an adapter from here go get -u github.com/casbin/xorm-adapter","s":"Install","u":"/contrib/swagger_v1.x.x/casbin/","h":"#install","p":2424},{"i":2429,"t":"casbin.New(config ...casbin.Config) *casbin.Middleware","s":"Signature","u":"/contrib/swagger_v1.x.x/casbin/","h":"#signature","p":2424},{"i":2431,"t":"Property Type Description Default ModelFilePath string Model file path \"./model.conf\" PolicyAdapter persist.Adapter Database adapter for policies ./policy.csv Enforcer *casbin.Enforcer Custom casbin enforcer Middleware generated enforcer using ModelFilePath & PolicyAdapter Lookup func(*fiber.Ctx) string Look up for current subject \"\" Unauthorized func(*fiber.Ctx) error Response body for unauthorized responses Unauthorized Forbidden func(*fiber.Ctx) error Response body for forbidden responses Forbidden","s":"Config","u":"/contrib/swagger_v1.x.x/casbin/","h":"#config","p":2424},{"i":2433,"t":"Gorm Adapter File Adapter","s":"Examples","u":"/contrib/swagger_v1.x.x/casbin/","h":"#examples","p":2424},{"i":2435,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/casbin\" _ \"github.com/go-sql-driver/mysql\" \"github.com/casbin/xorm-adapter/v2\" ) func main() { app := fiber.New() authz := casbin.New(casbin.Config{ ModelFilePath: \"path/to/rbac_model.conf\", PolicyAdapter: xormadapter.NewAdapter(\"mysql\", \"root:@tcp(127.0.0.1:3306)/\"), Lookup: func(c *fiber.Ctx) string { // fetch authenticated user subject }, }) app.Post(\"/blog\", authz.RequiresPermissions([]string{\"blog:create\"}, casbin.WithValidationRule(casbin.MatchAllRule)), func(c *fiber.Ctx) error { // your handler }, ) app.Delete(\"/blog/:id\", authz.RequiresPermissions([]string{\"blog:create\", \"blog:delete\"}, casbin.WithValidationRule(casbin.AtLeastOneRule)), func(c *fiber.Ctx) error { // your handler }, ) app.Listen(\":8080\") }","s":"CustomPermission","u":"/contrib/swagger_v1.x.x/casbin/","h":"#custompermission","p":2424},{"i":2437,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/casbin\" _ \"github.com/go-sql-driver/mysql\" \"github.com/casbin/xorm-adapter/v2\" ) func main() { app := fiber.New() authz := casbin.New(casbin.Config{ ModelFilePath: \"path/to/rbac_model.conf\", PolicyAdapter: xormadapter.NewAdapter(\"mysql\", \"root:@tcp(127.0.0.1:3306)/\"), Lookup: func(c *fiber.Ctx) string { // fetch authenticated user subject }, }) // check permission with Method and Path app.Post(\"/blog\", authz.RoutePermission(), func(c *fiber.Ctx) error { // your handler }, ) app.Listen(\":8080\") }","s":"RoutePermission","u":"/contrib/swagger_v1.x.x/casbin/","h":"#routepermission","p":2424},{"i":2439,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/casbin\" _ \"github.com/go-sql-driver/mysql\" \"github.com/casbin/xorm-adapter/v2\" ) func main() { app := fiber.New() authz := casbin.New(casbin.Config{ ModelFilePath: \"path/to/rbac_model.conf\", PolicyAdapter: xormadapter.NewAdapter(\"mysql\", \"root:@tcp(127.0.0.1:3306)/\"), Lookup: func(c *fiber.Ctx) string { // fetch authenticated user subject }, }) app.Put(\"/blog/:id\", authz.RequiresRoles([]string{\"admin\"}), func(c *fiber.Ctx) error { // your handler }, ) app.Listen(\":8080\") }","s":"RoleAuthorization","u":"/contrib/swagger_v1.x.x/casbin/","h":"#roleauthorization","p":2424},{"i":2441,"t":"go-i18n support for Fiber.","s":"Fiberi18n","u":"/contrib/swagger_v1.x.x/fiberi18n/","h":"","p":2440},{"i":2443,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/fiberi18n","s":"Install","u":"/contrib/swagger_v1.x.x/fiberi18n/","h":"#install","p":2440},{"i":2445,"t":"fiberi18n.New(config ...*Config) fiber.Handler","s":"Signature","u":"/contrib/swagger_v1.x.x/fiberi18n/","h":"#signature","p":2440},{"i":2447,"t":"Property Type Description Default Next func(c *fiber.Ctx) bool A function to skip this middleware when returned true. nil RootPath string The i18n template folder path. \"./example/localize\" AcceptLanguages []language.Tag A collection of languages that can be processed. []language.Tag{language.Chinese, language.English} FormatBundleFile string The type of the template file. \"yaml\" DefaultLanguage language.Tag The default returned language type. language.English Loader Loader The implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile. LoaderFunc(os.ReadFile) UnmarshalFunc i18n.UnmarshalFunc The function used for decoding template files. yaml.Unmarshal LangHandler func(ctx *fiber.Ctx, defaultLang string) string Used to get the kind of language handled by *fiber.Ctx and defaultLang. Retrieved from the request header Accept-Language or query parameter lang.","s":"Config","u":"/contrib/swagger_v1.x.x/fiberi18n/","h":"#config","p":2440},{"i":2449,"t":"package main import ( \"github.com/gofiber/contrib/fiberi18n\" \"github.com/gofiber/fiber/v2\" \"github.com/nicksnyder/go-i18n/v2/i18n\" \"golang.org/x/text/language\" ) func main() { app := fiber.New() app.Use( fiberi18n.New(&fiberi18n.Config{ RootPath: \"./example/localize\", AcceptLanguages: []language.Tag{language.Chinese, language.English}, DefaultLanguage: language.Chinese, }), ) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(fiberi18n.MustGetMessage(\"welcome\")) }) app.Get(\"/:name\", func(ctx *fiber.Ctx) error { return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{ MessageID: \"welcomeWithName\", TemplateData: map[string]string{ \"name\": ctx.Params(\"name\"), }, })) }) app.Listen(\"127.0.0.1:3000\") }","s":"Example","u":"/contrib/swagger_v1.x.x/fiberi18n/","h":"#example","p":2440},{"i":2451,"t":"NewRelic support for Fiber.","s":"Fibernewrelic","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"","p":2450},{"i":2453,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/fibernewrelic","s":"Install","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"#install","p":2450},{"i":2455,"t":"fibernewrelic.New(config fibernewrelic.Config) fiber.Handler","s":"Signature","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"#signature","p":2450},{"i":2457,"t":"Property Type Description Default License string Required - New Relic License Key \"\" AppName string New Relic Application Name fiber-api Enabled bool Enable/Disable New Relic false TransportType string Can be HTTP or HTTPS (Deprecated) \"HTTP\" Application Application Existing New Relic App nil ErrorStatusCodeHandler func(c *fiber.Ctx, err error) int If you want to change newrelic status code, you can use it. DefaultErrorStatusCodeHandler","s":"Config","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"#config","p":2450},{"i":2459,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/fibernewrelic\" ) func main() { app := fiber.New() app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendStatus(200) }) cfg := fibernewrelic.Config{ License: \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\", AppName: \"MyCustomApi\", Enabled: true, } app.Use(fibernewrelic.New(cfg)) app.Listen(\":8080\") }","s":"Usage","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"#usage","p":2450},{"i":2461,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/fibernewrelic\" \"github.com/newrelic/go-agent/v3/newrelic\" ) func main() { newrelicApp, err := newrelic.NewApplication( newrelic.ConfigAppName(\"MyCustomApi\"), newrelic.ConfigLicense(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\"), newrelic.ConfigEnabled(true), ) app := fiber.New() app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendStatus(200) }) cfg := fibernewrelic.Config{ Application: newrelicApp } app.Use(fibernewrelic.New(cfg)) app.Listen(\":8080\") }","s":"Usage with existing New Relic application","u":"/contrib/swagger_v1.x.x/fibernewrelic/","h":"#usage-with-existing-new-relic-application","p":2450},{"i":2463,"t":"Sentry support for Fiber.","s":"Fibersentry","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"","p":2462},{"i":2465,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/fibersentry go get -u github.com/getsentry/sentry-go","s":"Install","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"#install","p":2462},{"i":2467,"t":"fibersentry.New(config ...Config) fiber.Handler","s":"Signature","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"#signature","p":2462},{"i":2469,"t":"Property Type Description Default Repanic bool Repanic configures whether Sentry should repanic after recovery. Set to true, if Recover middleware is used. false WaitForDelivery bool WaitForDelivery configures whether you want to block the request before moving forward with the response. If Recover middleware is used, it's safe to either skip this option or set it to false. false Timeout time.Duration Timeout for the event delivery requests. time.Second * 2","s":"Config","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"#config","p":2462},{"i":2471,"t":"fibersentry attaches an instance of *sentry.Hub (https://godoc.org/github.com/getsentry/sentry-go#Hub) to the request's context, which makes it available throughout the rest of the request's lifetime. You can access it by using the fibersentry.GetHubFromContext() method on the context itself in any of your proceeding middleware and routes. And it should be used instead of the global sentry.CaptureMessage, sentry.CaptureException, or any other calls, as it keeps the separation of data between the requests. Keep in mind that *sentry.Hub won't be available in middleware attached before to fibersentry! package main import ( \"fmt\" \"log\" \"github.com/getsentry/sentry-go\" \"github.com/gofiber/contrib/fibersentry\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/utils\" ) func main() { _ = sentry.Init(sentry.ClientOptions{ Dsn: \"\", BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event { if hint.Context != nil { if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok { // You have access to the original Context if it panicked fmt.Println(utils.ImmutableString(c.Hostname())) } } fmt.Println(event) return event }, Debug: true, AttachStacktrace: true, }) app := fiber.New() app.Use(fibersentry.New(fibersentry.Config{ Repanic: true, WaitForDelivery: true, })) enhanceSentryEvent := func(c *fiber.Ctx) error { if hub := fibersentry.GetHubFromContext(c); hub != nil { hub.Scope().SetTag(\"someRandomTag\", \"maybeYouNeedIt\") } return c.Next() } app.All(\"/foo\", enhanceSentryEvent, func(c *fiber.Ctx) error { panic(\"y tho\") }) app.All(\"/\", func(c *fiber.Ctx) error { if hub := fibersentry.GetHubFromContext(c); hub != nil { hub.WithScope(func(scope *sentry.Scope) { scope.SetExtra(\"unwantedQuery\", \"someQueryDataMaybe\") hub.CaptureMessage(\"User provided unwanted query string, but we recovered just fine\") }) } return c.SendStatus(fiber.StatusOK) }) log.Fatal(app.Listen(\":3000\")) }","s":"Usage","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"#usage","p":2462},{"i":2473,"t":"sentry.Init(sentry.ClientOptions{ Dsn: \"your-public-dsn\", BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event { if hint.Context != nil { if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok { // You have access to the original Context if it panicked fmt.Println(c.Hostname()) } } return event }, })","s":"Accessing Context in BeforeSend callback","u":"/contrib/swagger_v1.x.x/fibersentry/","h":"#accessing-context-in-beforesend-callback","p":2462},{"i":2475,"t":"Zap logging support for Fiber.","s":"Fiberzap","u":"/contrib/swagger_v1.x.x/fiberzap/","h":"","p":2474},{"i":2477,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/fiberzap go get -u go.uber.org/zap","s":"Install","u":"/contrib/swagger_v1.x.x/fiberzap/","h":"#install","p":2474},{"i":2479,"t":"fiberzap.New(config ...Config) fiber.Handler","s":"Signature","u":"/contrib/swagger_v1.x.x/fiberzap/","h":"#signature","p":2474},{"i":2481,"t":"Property Type Description Default Next func(*Ctx) bool Define a function to skip this middleware when returned true nil Logger *zap.Logger Add custom zap logger. zap.NewDevelopment() Fields []string Add fields what you want see. []string{\"latency\", \"status\", \"method\", \"url\"} Messages []string Custom response messages. []string{\"Server error\", \"Client error\", \"Success\"} Levels []zapcore.Level Custom response levels. []zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel} SkipURIs []string Skip logging these URI. []string{} GetResBody func(c *fiber.Ctx) []byte Define a function to get response body when return non-nil. eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody. nil","s":"Config","u":"/contrib/swagger_v1.x.x/fiberzap/","h":"#config","p":2474},{"i":2483,"t":"package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/fiberzap\" \"go.uber.org/zap\" ) func main() { app := fiber.New() logger, _ := zap.NewProduction() app.Use(fiberzap.New(fiberzap.Config{ Logger: logger, })) app.Get(\"/\", func (c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Example","u":"/contrib/swagger_v1.x.x/fiberzap/","h":"#example","p":2474},{"i":2485,"t":"JWT returns a JSON Web Token (JWT) auth middleware. For valid token, it sets the user in Ctx.Locals and calls next handler. For invalid token, it returns \"401 - Unauthorized\" error. For missing token, it returns \"400 - Bad Request\" error. Special thanks and credits to Echo","s":"JWT","u":"/contrib/swagger_v1.x.x/jwt/","h":"","p":2484},{"i":2487,"t":"This middleware supports Fiber v1 & v2, install accordingly. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/jwt go get -u github.com/golang-jwt/jwt/v5","s":"Install","u":"/contrib/swagger_v1.x.x/jwt/","h":"#install","p":2484},{"i":2489,"t":"jwtware.New(config ...jwtware.Config) func(*fiber.Ctx) error","s":"Signature","u":"/contrib/swagger_v1.x.x/jwt/","h":"#signature","p":2484},{"i":2491,"t":"Property Type Description Default Filter func(*fiber.Ctx) bool Defines a function to skip middleware nil SuccessHandler func(*fiber.Ctx) error SuccessHandler defines a function which is executed for a valid token. nil ErrorHandler func(*fiber.Ctx, error) error ErrorHandler defines a function which is executed for an invalid token. 401 Invalid or expired JWT SigningKey interface{} Signing key to validate token. Used as fallback if SigningKeys has length 0. nil SigningKeys map[string]interface{} Map of signing keys to validate token with kid field usage. nil ContextKey string Context key to store user information from the token into context. \"user\" Claims jwt.Claim Claims are extendable claims data defining token content. jwt.MapClaims{} TokenLookup string TokenLookup is a string in the form of : that is used \"header:Authorization\" AuthScheme string AuthScheme to be used in the Authorization header. The default value (\"Bearer\") will only be used in conjuction with the default TokenLookup value. \"Bearer\" KeyFunc func() jwt.Keyfunc KeyFunc defines a user-defined function that supplies the public key for a token validation. jwtKeyFunc JWKSetURLs []string A slice of unique JSON Web Key (JWK) Set URLs to used to parse JWTs. nil","s":"Config","u":"/contrib/swagger_v1.x.x/jwt/","h":"#config","p":2484},{"i":2493,"t":"package main import ( \"time\" \"github.com/gofiber/fiber/v2\" jwtware \"github.com/gofiber/contrib/jwt\" \"github.com/golang-jwt/jwt/v5\" ) func main() { app := fiber.New() // Login route app.Post(\"/login\", login) // Unauthenticated route app.Get(\"/\", accessible) // JWT Middleware app.Use(jwtware.New(jwtware.Config{ SigningKey: jwtware.SigningKey{Key: []byte(\"secret\")}, })) // Restricted Routes app.Get(\"/restricted\", restricted) app.Listen(\":3000\") } func login(c *fiber.Ctx) error { user := c.FormValue(\"user\") pass := c.FormValue(\"pass\") // Throws Unauthorized error if user != \"john\" || pass != \"doe\" { return c.SendStatus(fiber.StatusUnauthorized) } // Create the Claims claims := jwt.MapClaims{ \"name\": \"John Doe\", \"admin\": true, \"exp\": time.Now().Add(time.Hour * 72).Unix(), } // Create token token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) // Generate encoded token and send it as response. t, err := token.SignedString([]byte(\"secret\")) if err != nil { return c.SendStatus(fiber.StatusInternalServerError) } return c.JSON(fiber.Map{\"token\": t}) } func accessible(c *fiber.Ctx) error { return c.SendString(\"Accessible\") } func restricted(c *fiber.Ctx) error { user := c.Locals(\"user\").(*jwt.Token) claims := user.Claims.(jwt.MapClaims) name := claims[\"name\"].(string) return c.SendString(\"Welcome \" + name) }","s":"HS256 Example","u":"/contrib/swagger_v1.x.x/jwt/","h":"#hs256-example","p":2484},{"i":2495,"t":"Login using username and password to retrieve a token. curl --data \"user=john&pass=doe\" http://localhost:3000/login Response { \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY\" } Request a restricted resource using the token in Authorization request header. curl localhost:3000/restricted -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY\" Response Welcome John Doe","s":"HS256 Test","u":"/contrib/swagger_v1.x.x/jwt/","h":"#hs256-test","p":2484},{"i":2497,"t":"package main import ( \"crypto/rand\" \"crypto/rsa\" \"log\" \"time\" \"github.com/gofiber/fiber/v2\" \"github.com/golang-jwt/jwt/v5\" jwtware \"github.com/gofiber/contrib/jwt\" ) var ( // Obviously, this is just a test example. Do not do this in production. // In production, you would have the private key and public key pair generated // in advance. NEVER add a private key to any GitHub repo. privateKey *rsa.PrivateKey ) func main() { app := fiber.New() // Just as a demo, generate a new private/public key pair on each run. See note above. rng := rand.Reader var err error privateKey, err = rsa.GenerateKey(rng, 2048) if err != nil { log.Fatalf(\"rsa.GenerateKey: %v\", err) } // Login route app.Post(\"/login\", login) // Unauthenticated route app.Get(\"/\", accessible) // JWT Middleware app.Use(jwtware.New(jwtware.Config{ SigningKey: jwtware.SigningKey{ JWTAlg: jwtware.RS256, Key: privateKey.Public(), }, })) // Restricted Routes app.Get(\"/restricted\", restricted) app.Listen(\":3000\") } func login(c *fiber.Ctx) error { user := c.FormValue(\"user\") pass := c.FormValue(\"pass\") // Throws Unauthorized error if user != \"john\" || pass != \"doe\" { return c.SendStatus(fiber.StatusUnauthorized) } // Create the Claims claims := jwt.MapClaims{ \"name\": \"John Doe\", \"admin\": true, \"exp\": time.Now().Add(time.Hour * 72).Unix(), } // Create token token := jwt.NewWithClaims(jwt.SigningMethodRS256, claims) // Generate encoded token and send it as response. t, err := token.SignedString(privateKey) if err != nil { log.Printf(\"token.SignedString: %v\", err) return c.SendStatus(fiber.StatusInternalServerError) } return c.JSON(fiber.Map{\"token\": t}) } func accessible(c *fiber.Ctx) error { return c.SendString(\"Accessible\") } func restricted(c *fiber.Ctx) error { user := c.Locals(\"user\").(*jwt.Token) claims := user.Claims.(jwt.MapClaims) name := claims[\"name\"].(string) return c.SendString(\"Welcome \" + name) }","s":"RS256 Example","u":"/contrib/swagger_v1.x.x/jwt/","h":"#rs256-example","p":2484},{"i":2499,"t":"The RS256 is actually identical to the HS256 test above.","s":"RS256 Test","u":"/contrib/swagger_v1.x.x/jwt/","h":"#rs256-test","p":2484},{"i":2501,"t":"The tests are identical to basic JWT tests above, with exception that JWKSetURLs to valid public keys collection in JSON Web Key (JWK) Set format should be supplied. See RFC 7517.","s":"JWK Set Test","u":"/contrib/swagger_v1.x.x/jwt/","h":"#jwk-set-test","p":2484},{"i":2503,"t":"KeyFunc defines a user-defined function that supplies the public key for a token validation. The function shall take care of verifying the signing algorithm and selecting the proper key. A user-defined KeyFunc can be useful if tokens are issued by an external party. When a user-defined KeyFunc is provided, SigningKey, SigningKeys, and SigningMethod are ignored. This is one of the three options to provide a token validation key. The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey. Required if neither SigningKeys nor SigningKey is provided. Default to an internal implementation verifying the signing algorithm and selecting the proper key. package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" jwtware \"github.com/gofiber/contrib/jwt\" \"github.com/golang-jwt/jwt/v5\" ) func main() { app := fiber.New() app.Use(jwtware.New(jwtware.Config{ KeyFunc: customKeyFunc(), })) app.Get(\"/ok\", func(c *fiber.Ctx) error { return c.SendString(\"OK\") }) } func customKeyFunc() jwt.Keyfunc { return func(t *jwt.Token) (interface{}, error) { // Always check the signing method if t.Method.Alg() != jwtware.HS256 { return nil, fmt.Errorf(\"Unexpected jwt signing method=%v\", t.Header[\"alg\"]) } // TODO custom implementation of loading signing key like from a database signingKey := \"secret\" return []byte(signingKey), nil } }","s":"Custom KeyFunc example","u":"/contrib/swagger_v1.x.x/jwt/","h":"#custom-keyfunc-example","p":2484},{"i":2505,"t":"Open Policy Agent support for Fiber. Note: Requires Go 1.18 and above","s":"Opafiber","u":"/contrib/swagger_v1.x.x/opafiber/","h":"","p":2504},{"i":2507,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/opafiber","s":"Install","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#install","p":2504},{"i":2509,"t":"opafiber.New(config opafiber.Config) fiber.Handler","s":"Signature","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#signature","p":2504},{"i":2511,"t":"Property Type Description Default RegoQuery string Required - Rego query - RegoPolicy io.Reader Required - Rego policy - IncludeQueryString bool Include query string as input to rego policy false DeniedStatusCode int Http status code to return when policy denies request 400 DeniedResponseMessage string Http response body text to return when policy denies request \"\" IncludeHeaders []string Include headers as input to rego policy - InputCreationMethod InputCreationFunc Use your own function to provide input for OPA func defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)","s":"Config","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#config","p":2504},{"i":2513,"t":"type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)","s":"Types","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#types","p":2504},{"i":2515,"t":"OPA Fiber middleware sends the following example data to the policy engine as input: { \"method\": \"GET\", \"path\": \"/somePath\", \"query\": { \"name\": [\"John Doe\"] }, \"headers\": { \"Accept\": \"application/json\", \"Content-Type\": \"application/json\" } } package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/opafiber\" ) func main() { app := fiber.New() module := ` package example.authz default allow := false allow { input.method == \"GET\" } ` cfg := opafiber.Config{ RegoQuery: \"data.example.authz.allow\", RegoPolicy: bytes.NewBufferString(module), IncludeQueryString: true, DeniedStatusCode: fiber.StatusForbidden, DeniedResponseMessage: \"status forbidden\", IncludeHeaders: []string{\"Authorization\"}, InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) { return map[string]interface{}{ \"method\": ctx.Method(), \"path\": ctx.Path(), }, nil }, } app.Use(opafiber.New(cfg)) app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendStatus(200) }) app.Listen(\":8080\") }","s":"Usage","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#usage","p":2504},{"i":2517,"t":"OpenTelemetry support for Fiber. Can be found on OpenTelemetry Registry.","s":"Otelfiber","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"","p":2516},{"i":2519,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/contrib/otelfiber","s":"Install","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#install","p":2516},{"i":2521,"t":"otelfiber.Middleware(opts ...Option) fiber.Handler","s":"Signature","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#signature","p":2516},{"i":2523,"t":"Property Type Description Default Next func(*fiber.Ctx) bool Define a function to skip this middleware when returned trueRequired - Rego quer nil TracerProvider oteltrace.TracerProvider Specifies a tracer provider to use for creating a tracer nil - the global tracer provider is used MeterProvider otelmetric.MeterProvider Specifies a meter provider to use for reporting nil - the global meter provider is used Port *int Specifies the value to use when setting the net.host.port attribute on metrics/spans Required: If not default (80 for http, 443 for https) Propagators propagation.TextMapPropagator Specifies propagators to use for extracting information from the HTTP requests If none are specified, global ones will be used ServerName *string specifies the value to use when setting the http.server_name attribute on metrics/spans - SpanNameFormatter func(*fiber.Ctx) string Takes a function that will be called on every request and the returned string will become the Span Name default formatter returns the route pathRaw","s":"Config","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#config","p":2516},{"i":2525,"t":"Please refer to example","s":"Usage","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#usage","p":2516},{"i":2527,"t":"package main import ( \"context\" \"errors\" \"log\" \"go.opentelemetry.io/otel/sdk/resource\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/otelfiber\" \"go.opentelemetry.io/otel\" \"go.opentelemetry.io/otel/attribute\" stdout \"go.opentelemetry.io/otel/exporters/stdout/stdouttrace\" //\"go.opentelemetry.io/otel/exporters/jaeger\" \"go.opentelemetry.io/otel/propagation\" sdktrace \"go.opentelemetry.io/otel/sdk/trace\" semconv \"go.opentelemetry.io/otel/semconv/v1.4.0\" oteltrace \"go.opentelemetry.io/otel/trace\" ) var tracer = otel.Tracer(\"fiber-server\") func main() { tp := initTracer() defer func() { if err := tp.Shutdown(context.Background()); err != nil { log.Printf(\"Error shutting down tracer provider: %v\", err) } }() app := fiber.New() app.Use(otelfiber.Middleware()) app.Get(\"/error\", func(ctx *fiber.Ctx) error { return errors.New(\"abc\") }) app.Get(\"/users/:id\", func(c *fiber.Ctx) error { id := c.Params(\"id\") name := getUser(c.UserContext(), id) return c.JSON(fiber.Map{\"id\": id, name: name}) }) log.Fatal(app.Listen(\":3000\")) } func initTracer() *sdktrace.TracerProvider { exporter, err := stdout.New(stdout.WithPrettyPrint()) if err != nil { log.Fatal(err) } tp := sdktrace.NewTracerProvider( sdktrace.WithSampler(sdktrace.AlwaysSample()), sdktrace.WithBatcher(exporter), sdktrace.WithResource( resource.NewWithAttributes( semconv.SchemaURL, semconv.ServiceNameKey.String(\"my-service\"), )), ) otel.SetTracerProvider(tp) otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{})) return tp } func getUser(ctx context.Context, id string) string { _, span := tracer.Start(ctx, \"getUser\", oteltrace.WithAttributes(attribute.String(\"id\", id))) defer span.End() if id == \"123\" { return \"otelfiber tester\" } return \"unknown\" }","s":"Example","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#example","p":2516},{"i":2529,"t":"An HTTP server using gofiber fiber and instrumentation. The server has a /users/:id endpoint. The server generates span information to stdout. These instructions expect you have docker-compose installed. Bring up the fiber-server and fiber-client services to run the example: docker-compose up --detach fiber-server fiber-client The fiber-client service sends just one HTTP request to fiber-server and then exits. View the span generated by fiber-server in the logs: docker-compose logs fiber-server Shut down the services when you are finished with the example: docker-compose down","s":"Example","u":"/contrib/swagger_v1.x.x/otelfiber/example/","h":"","p":2528},{"i":2531,"t":"PASETO returns a Web Token (PASETO) auth middleware. For valid token, it sets the payload data in Ctx.Locals and calls next handler. For invalid token, it returns \"401 - Unauthorized\" error. For missing token, it returns \"400 - BadRequest\" error.","s":"Paseto","u":"/contrib/swagger_v1.x.x/paseto/","h":"","p":2530},{"i":2533,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/paseto go get -u github.com/o1egl/paseto","s":"Install","u":"/contrib/swagger_v1.x.x/paseto/","h":"#install","p":2530},{"i":2535,"t":"pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error","s":"Signature","u":"/contrib/swagger_v1.x.x/paseto/","h":"#signature","p":2530},{"i":2537,"t":"Property Type Description Default Next func(*Ctx) bool Defines a function to skip middleware nil SuccessHandler func(*fiber.Ctx) error SuccessHandler defines a function which is executed for a valid token. c.Next() ErrorHandler func(*fiber.Ctx, error) error ErrorHandler defines a function which is executed for an invalid token. 401 Invalid or expired PASETO Validate PayloadValidator Defines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided. nil SymmetricKey []byte Secret key to encrypt token. If present the middleware will generate local tokens. nil PrivateKey ed25519.PrivateKey Secret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens. nil PublicKey crypto.PublicKey Public key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens. nil ContextKey string Context key to store user information from the token into context. \"auth-token\" TokenLookup [2]string TokenLookup is a string slice with size 2, that is used to extract token from the request [\"header\",\"Authorization\"]","s":"Config","u":"/contrib/swagger_v1.x.x/paseto/","h":"#config","p":2530},{"i":2539,"t":"When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token. Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token. In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.","s":"Instructions","u":"/contrib/swagger_v1.x.x/paseto/","h":"#instructions","p":2530},{"i":2541,"t":"Swagger middleware for Fiber. The middleware handles Swagger UI.","s":"Swagger","u":"/contrib/swagger_v1.x.x/swagger/","h":"","p":2540},{"i":2543,"t":"Signatures Examples","s":"Table of Contents","u":"/contrib/swagger_v1.x.x/swagger/","h":"#table-of-contents","p":2540},{"i":2545,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/contrib/swagger_v1.x.x/swagger/","h":"#signatures","p":2540},{"i":2547,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/swagger\" ) Then create a Fiber app with app := fiber.New(). After you initiate your Fiber app, you can use the following possibilities:","s":"Examples","u":"/contrib/swagger_v1.x.x/swagger/","h":"#examples","p":2540},{"i":2549,"t":"app.Use(swagger.New(cfg))","s":"Default Config","u":"/contrib/swagger_v1.x.x/swagger/","h":"#default-config","p":2540},{"i":2551,"t":"cfg := swagger.Config{ BasePath: \"/\", //swagger ui base path FilePath: \"./docs/swagger.json\", } app.Use(swagger.New(cfg))","s":"Custom Config","u":"/contrib/swagger_v1.x.x/swagger/","h":"#custom-config","p":2540},{"i":2553,"t":"Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.","s":"Websocket","u":"/contrib/swagger_v1.x.x/websocket/","h":"","p":2552},{"i":2555,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/websocket","s":"Install","u":"/contrib/swagger_v1.x.x/websocket/","h":"#install","p":2552},{"i":2557,"t":"package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/websocket\" ) func main() { app := fiber.New() app.Use(\"/ws\", func(c *fiber.Ctx) error { // IsWebSocketUpgrade returns true if the client // requested upgrade to the WebSocket protocol. if websocket.IsWebSocketUpgrade(c) { c.Locals(\"allowed\", true) return c.Next() } return fiber.ErrUpgradeRequired }) app.Get(\"/ws/:id\", websocket.New(func(c *websocket.Conn) { // c.Locals is added to the *websocket.Conn log.Println(c.Locals(\"allowed\")) // true log.Println(c.Params(\"id\")) // 123 log.Println(c.Query(\"v\")) // 1.0 log.Println(c.Cookies(\"session\")) // \"\" // websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index var ( mt int msg []byte err error ) for { if mt, msg, err = c.ReadMessage(); err != nil { log.Println(\"read:\", err) break } log.Printf(\"recv: %s\", msg) if err = c.WriteMessage(mt, msg); err != nil { log.Println(\"write:\", err) break } } })) log.Fatal(app.Listen(\":3000\")) // Access the websocket server: ws://localhost:3000/ws/123?v=1.0 // https://www.websocket.org/echo.html }","s":"Example","u":"/contrib/swagger_v1.x.x/websocket/","h":"#example","p":2552},{"i":2559,"t":"If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path. app := fiber.New() app.Use(cache.New(cache.Config{ Next: func(c *fiber.Ctx) bool { return strings.Contains(c.Route().Path, \"/ws\") }, })) app.Get(\"/ws/:id\", websocket.New(func(c *websocket.Conn) {}))","s":"Note with cache middleware","u":"/contrib/swagger_v1.x.x/websocket/","h":"#note-with-cache-middleware","p":2552},{"i":2561,"t":"Zerolog logging support for Fiber.","s":"Fiberzerolog","u":"/contrib/swagger_v1.x.x/fiberzerolog/","h":"","p":2560},{"i":2563,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/fiberzerolog go get -u github.com/rs/zerolog/log","s":"Install","u":"/contrib/swagger_v1.x.x/fiberzerolog/","h":"#install","p":2560},{"i":2565,"t":"fiberzerolog.New(config ...Config) fiber.Handler","s":"Signature","u":"/contrib/swagger_v1.x.x/fiberzerolog/","h":"#signature","p":2560},{"i":2567,"t":"Property Type Description Default Next func(*Ctx) bool Define a function to skip this middleware when returned true nil Logger *zerolog.Logger Add custom zerolog logger. zerolog.New(os.Stderr).With().Timestamp().Logger() GetLogger func(*fiber.Ctx) zerolog.Logger Get custom zerolog logger, if it's defined the returned logger will replace the Logger value. nil Fields []string Add fields what you want see. []string{\"latency\", \"status\", \"method\", \"url\", \"error\"} Messages []string Custom response messages. []string{\"Server error\", \"Client error\", \"Success\"} Levels []zerolog.Level Custom response levels. []zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel} SkipURIs []string Skip logging these URI. []string{} GetResBody func(c *fiber.Ctx) []byte Define a function to get response body when return non-nil. eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody. nil","s":"Config","u":"/contrib/swagger_v1.x.x/fiberzerolog/","h":"#config","p":2560},{"i":2569,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/fiberzerolog\" \"github.com/rs/zerolog\" ) func main() { app := fiber.New() logger := zerolog.New(os.Stderr).With().Timestamp().Logger() app.Use(fiberzerolog.New(fiberzerolog.Config{ Logger: &logger, })) app.Get(\"/\", func (c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) if err := app.Listen(\":3000\"); err != nil { logger.Fatal().Err(err).Msg(\"Fiber app error\") } }","s":"Example","u":"/contrib/swagger_v1.x.x/fiberzerolog/","h":"#example","p":2560}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2421",[0,6.075,1,6.075,2,5.285,3,1.573,4,6.075]],["t/2423",[5,4.069,6,5.189,7,4.513,8,5.189,9,5.189,10,3.061,11,4.069,12,4.513,13,3.471,14,4.513,15,4.513,16,4.513,17,3.736,18,4.069,19,3.736]],["t/2425",[3,1.629,5,4.932,20,2.023]],["t/2427",[21,3.024,22,3.447,23,1.435,24,3.849,25,5.345,26,5.177,27,5.345,28,3.849]],["t/2429",[29,6.29,30,6.29,31,6.29]],["t/2431",[3,0.873,5,2.642,13,2.254,26,2.642,32,1.699,33,1.549,34,1.699,35,1.549,36,3.491,37,2.046,38,3.369,39,2.642,40,2.111,41,3.369,42,3.491,43,3.369,44,2.931,45,3.369,46,5.678,47,3.369,48,2.426,49,2.254,50,1.261,51,1.349,52,2.426,53,3.35,54,3.369,55,2.931,56,3.369,57,2.426,58,3.798,59,1.169,60,3.465,61,3.491,62,4.939]],["t/2433",[26,5.65,39,4.847,63,6.181]],["t/2435",[23,0.812,24,2.179,28,2.179,36,2.179,37,1.277,42,2.179,51,2.178,52,2.179,57,2.179,59,1.08,64,1.177,65,1.815,66,1.177,67,1.895,68,2.372,69,2.372,70,2.372,71,2.372,72,1.01,73,1.089,74,1.132,75,2.372,76,2.372,77,2.372,78,2.372,79,2.372,80,2.252,81,1.596,82,2.372,83,2.179,84,1.603,85,2.632,86,4.481,87,3.025,88,2.998,89,3.025,90,3.025,91,3.025,92,1.895]],["t/2437",[23,0.871,24,2.338,28,2.338,36,2.338,37,1.37,40,2.034,42,2.338,51,2.163,52,2.338,57,2.338,59,0.783,64,1.263,65,1.911,66,1.263,67,2.034,68,2.545,69,2.545,70,2.545,71,2.545,72,1.084,73,1.169,74,1.214,75,2.545,76,2.545,77,2.545,78,2.545,79,2.545,80,1.991,81,1.411,82,2.545,83,2.338,84,1.72,85,2.824,88,2.172,92,2.034,93,2.824,94,3.246,95,1.915,96,3.246]],["t/2439",[23,0.913,24,2.449,28,2.449,36,2.449,37,1.436,42,2.449,51,2.165,52,2.449,57,2.449,59,0.82,64,1.324,65,1.977,66,1.324,67,2.131,68,2.667,69,2.667,70,2.667,71,2.667,72,1.135,73,1.224,74,1.273,75,2.667,76,2.667,77,2.667,78,2.667,79,2.667,80,2.06,81,1.459,82,2.667,83,2.449,84,1.802,88,2.276,92,2.131,97,3.402,98,3.402]],["t/2441",[20,1.988,21,2.609,99,5.376,100,2.609]],["t/2443",[3,1.449,20,1.8,21,2.866,22,3.267,23,1.502,100,2.362,101,3.302,102,4.869]],["t/2445",[103,6.29,104,3.94,105,3.511]],["t/2447",[3,0.679,32,1.323,33,2.251,34,1.323,35,1.851,37,2.317,39,3.839,40,1.643,50,1.506,80,1.107,81,1.464,99,2.282,106,1.464,107,1.323,108,2.132,109,1.464,110,1.248,111,1.323,112,1.021,113,2.282,114,4.896,115,2.623,116,2.282,117,2.282,118,4.024,119,2.282,120,5.49,121,2.623,122,2.282,123,3.501,124,2.623,125,2.623,126,2.282,127,4.896,128,2.282,129,2.057,130,1.548,131,2.623,132,1.464,133,2.623,134,2.623,135,2.623,136,2.623,137,2.623,138,2.623,139,2.623,140,2.623,141,2.623,142,1.643,143,4.024,144,2.623,145,2.282,146,2.282,147,1.323,148,1.755,149,2.282,150,1.755,151,2.623,152,2.623]],["t/2449",[23,0.896,51,2.141,59,1.161,64,1.299,65,1.95,66,1.299,72,1.114,73,1.201,74,1.249,80,1.409,81,1.44,102,2.903,110,1.493,113,2.903,116,2.903,117,2.903,122,2.903,123,2.903,126,2.903,142,2.091,153,3.338,154,3.338,155,3.338,156,3.338,157,3.338,158,3.338,159,1.863,160,3.338,161,3.338,162,3.338,163,3.338,164,3.338,165,3.338,166,3.338,167,1.969,168,3.338,169,3.338]],["t/2451",[11,4.932,20,2.023,100,2.655]],["t/2453",[21,2.98,22,3.397,23,1.603,170,4.684]],["t/2455",[105,3.511,171,6.29,172,4.932]],["t/2457",[11,2.642,20,1.084,32,1.699,33,1.549,34,1.699,35,1.549,37,2.396,50,1.261,51,0.937,59,0.812,73,1.213,80,1.422,81,1.007,107,1.699,112,1.311,167,1.988,173,4.216,174,2.254,175,5.401,176,6.209,177,2.111,178,2.931,179,4.939,180,3.369,181,2.931,182,3.369,183,2.426,184,3.369,185,4.088,186,3.369,187,3.369,188,3.369,189,1.988,190,2.426,191,2.254,192,3.369,193,2.254,194,2.931,195,3.369]],["t/2459",[23,1.09,51,2.135,59,0.979,64,1.581,65,2.238,66,1.581,72,1.356,73,1.462,74,1.52,81,1.215,92,2.545,110,1.26,111,2.048,142,2.545,159,2.267,170,3.185,172,3.185,173,3.534,178,3.534,181,3.534,196,3.185,197,2.925,198,4.062,199,4.062,200,3.534]],["t/2461",[23,1.02,51,2.154,59,0.917,64,1.479,65,2.138,66,1.479,72,1.269,73,1.368,74,1.422,81,1.137,92,2.381,110,1.179,142,2.381,159,2.122,170,2.981,172,2.981,179,3.307,189,2.243,196,2.981,197,2.738,200,3.307,201,3.802,202,3.802,203,5.279,204,3.802,205,3.802,206,3.802,207,3.802]],["t/2463",[20,2.023,100,2.655,208,5.472]],["t/2465",[3,1.364,20,1.694,21,3.142,22,3.424,23,1.413,100,2.222,101,3.107,209,4.58,210,4.58]],["t/2467",[104,3.94,105,3.511,211,6.29]],["t/2469",[3,1.282,32,1.749,33,1.595,34,1.749,35,1.595,50,1.851,51,0.965,60,1.935,107,2.495,109,1.935,111,1.749,147,2.495,183,4.155,191,2.32,208,3.017,212,5.019,213,4.949,214,4.949,215,3.468,216,2.762,217,4.305,218,4.305,219,3.468,220,3.017,221,3.468,222,3.468,223,3.017,224,3.468,225,2.497,226,4.949,227,3.468,228,2.719,229,3.468,230,3.468,231,3.017]],["t/2471",[3,0.709,7,2.382,21,0.687,23,0.437,37,0.687,50,1.024,51,2.139,59,0.855,64,0.633,65,1.109,66,0.633,67,1.019,72,0.543,73,0.586,74,0.609,80,1.496,81,1.06,95,0.96,110,1.099,111,2.097,112,1.379,132,0.908,147,0.82,150,1.088,209,1.415,210,1.415,212,1.415,217,1.415,218,1.415,220,1.415,228,1.276,232,2.738,233,1.627,234,2.738,235,1.627,236,1.627,237,2.738,238,2.372,239,1.627,240,2.382,241,1.627,242,1.627,243,1.627,244,1.832,245,1.627,246,1.627,247,1.627,248,1.172,249,1.627,250,1.415,251,1.627,252,1.627,253,1.172,254,2.738,255,1.627,256,1.019,257,1.627,258,1.627,259,1.627,260,1.415,261,0.82,262,1.627,263,1.415,264,1.415,265,1.415,266,1.415,267,2.382,268,1.415,269,1.415,270,1.415,271,1.172,272,2.382,273,1.415,274,1.415,275,1.415,276,1.627,277,1.627,278,1.627,279,1.627,280,1.627,281,2.738,282,4.158,283,2.738,284,1.627,285,1.627,286,1.276,287,1.627,288,1.627,289,1.627,290,1.627,291,1.627,292,1.627,293,1.627,294,1.627,295,1.627,296,1.627,297,1.627,298,1.627,299,1.172]],["t/2473",[51,2.164,110,1.274,112,1.599,228,3.222,238,2.749,244,2.749,263,3.574,264,4.844,265,3.574,266,3.574,267,4.844,268,3.574,269,3.574,270,3.574,271,2.959,272,4.844,273,3.574,274,3.574,275,3.574,300,2.424,301,4.109]],["t/2475",[20,1.988,100,2.609,261,3.117,302,5.376]],["t/2477",[3,1.384,20,1.719,21,3.024,22,3.447,23,1.435,100,2.256,101,3.153,303,4.649,304,4.649]],["t/2479",[104,3.94,105,3.511,305,6.29]],["t/2481",[3,1.066,32,1.363,33,1.243,34,1.363,35,1.243,37,2.353,48,3.591,50,1.011,59,0.993,60,2.783,61,1.947,72,0.902,80,1.141,81,0.808,95,1.595,106,1.509,107,1.363,108,2.181,109,2.298,110,1.277,111,1.363,112,1.941,130,2.429,191,1.808,193,1.808,216,1.509,261,1.363,302,2.351,306,2.12,307,2.965,308,2.703,309,3.229,310,2.703,311,3.229,312,1.947,313,2.351,314,2.12,315,3.582,316,2.351,317,1.947,318,2.351,319,3.582,320,2.703,321,2.703,322,2.703,323,2.703,324,2.351,325,2.351,326,3.582,327,1.947,328,2.351,329,2.351,330,2.351,331,3.582,332,2.351,333,2.351]],["t/2483",[23,1.078,51,2.13,59,0.968,64,1.563,65,2.221,66,1.563,67,2.516,72,1.83,73,1.446,74,1.503,81,1.201,110,1.245,159,2.241,261,2.025,271,2.892,299,2.892,303,3.494,304,3.494,307,4.495,334,4.016,335,4.016,336,3.494,337,3.494]],["t/2485",[3,1.064,10,3.285,58,2.749,59,1.343,84,2.177,88,2.749,106,2.293,110,1.959,147,2.072,216,2.293,253,2.959,338,3.222,339,2.749,340,3.587,341,3.222,342,2.424,343,3.574,344,2.959,345,2.959,346,3.574,347,3.222,348,3.574,349,4.109,350,4.109,351,4.109,352,4.109]],["t/2487",[3,1.287,20,1.599,21,2.926,22,3.335,23,1.334,51,1.383,100,2.098,101,2.933,353,4.971,354,4.324,355,4.971,356,3.58,357,3.58,358,3.58]],["t/2489",[53,3.647,59,1.49,359,6.181,360,6.181]],["t/2491",[3,0.502,10,1.867,32,0.977,33,0.891,34,0.977,35,1.845,37,2.155,50,1.91,53,2.367,59,0.967,72,0.647,84,2.125,107,0.977,108,2.454,109,1.081,112,1.987,129,1.519,130,3.232,148,1.296,177,3.198,216,1.081,238,2.117,256,1.214,300,1.143,311,1.519,314,1.519,338,1.519,339,1.296,340,3.062,342,2.733,344,2.279,345,1.395,361,1.937,362,2.753,363,2.753,364,2.753,365,1.685,366,2.889,367,2.279,368,1.937,369,1.937,370,1.937,371,1.395,372,1.937,373,1.937,374,1.937,375,1.685,376,1.519,377,1.395,378,3.146,379,1.937,380,1.937,381,1.685,382,1.519,383,3.49,384,1.937,385,1.937,386,1.937,387,3.165,388,1.685,389,2.482,390,2.753,391,1.937,392,2.753,393,1.685,394,1.519,395,1.937,396,1.685,397,1.685,398,1.937,399,1.685,400,1.937]],["t/2493",[3,0.476,10,1.084,23,0.493,49,1.229,51,2.199,58,1.229,59,1.081,60,1.025,64,0.715,65,1.227,66,0.715,72,1.497,73,0.661,74,0.687,81,1.156,84,2.048,110,1.539,111,0.926,112,0.715,159,1.025,167,2.281,189,1.788,244,1.229,248,2.784,340,2.048,356,1.323,357,1.323,358,1.323,366,1.323,378,3.517,382,1.441,401,1.598,402,1.441,403,2.376,404,1.598,405,1.598,406,1.441,407,1.837,408,1.837,409,2.376,410,1.598,411,1.441,412,1.598,413,1.598,414,2.376,415,1.598,416,1.598,417,2.182,418,2.182,419,1.598,420,1.898,421,1.598,422,1.598,423,1.598,424,1.598,425,1.837,426,1.598,427,1.323,428,2.635,429,1.837,430,1.598,431,1.598,432,1.598,433,1.598,434,1.598,435,1.598,436,1.598,437,1.598,438,1.598]],["t/2495",[50,2.051,51,1.525,60,3.06,146,3.494,147,2.765,148,2.687,256,2.516,340,3.307,388,4.769,390,3.494,403,3.149,409,3.149,417,2.892,418,2.892,439,4.016,440,4.016,441,5.483,442,4.016,443,4.016,444,5.483,445,5.483,446,4.016,447,4.016,448,4.016,449,4.016]],["t/2497",[3,0.353,10,0.805,23,0.366,49,2.081,51,2.179,58,0.913,59,1.008,60,0.762,64,0.531,65,0.955,66,0.531,72,1.236,73,0.491,74,0.511,81,0.93,84,1.648,110,1.296,111,0.688,112,0.917,159,0.762,167,1.835,175,1.187,177,2.619,189,2.893,244,0.913,248,2.24,261,0.688,300,0.805,309,1.07,312,0.983,340,1.648,356,0.983,357,0.983,358,0.983,366,0.983,378,2.904,382,1.07,401,1.187,402,1.07,403,1.848,404,1.187,405,1.187,406,1.07,409,1.848,410,1.187,411,1.07,412,1.187,413,1.187,414,1.848,415,1.187,416,1.187,417,1.697,418,1.697,419,1.187,420,1.476,421,1.187,422,1.187,423,1.187,424,1.187,426,1.187,427,0.983,428,2.05,430,1.187,431,1.187,432,1.187,433,1.187,434,1.187,435,1.187,436,1.187,437,1.187,438,1.187,450,1.365,451,1.365,452,1.848,453,1.365,454,1.07,455,0.913,456,2.357,457,2.357,458,2.357,459,1.365,460,1.365,461,1.365,462,1.365,463,1.848,464,1.365,465,1.365,466,1.365,467,1.365,468,1.187,469,1.187,470,0.983,471,1.365,472,1.365,473,1.365,474,1.365,475,1.365,476,2.05,477,1.365,478,1.365,479,1.365,480,1.365,481,1.365,482,1.365,483,1.365]],["t/2499",[454,4.684,470,4.301,484,5.973,485,5.973,486,5.196,487,5.973]],["t/2501",[10,2.777,119,4.095,177,3.817,216,2.627,300,2.777,312,3.39,338,3.691,339,3.149,342,2.777,394,3.691,396,4.095,399,4.095,454,4.778,470,3.39,486,4.095,488,4.708,489,4.708,490,4.708,491,4.708,492,4.708]],["t/2503",[2,1.632,10,1.107,23,0.504,35,0.863,44,1.632,48,1.351,50,0.702,51,2.002,59,0.743,64,0.73,65,1.248,66,0.73,72,1.029,73,0.675,74,0.702,80,0.792,81,0.561,84,2.407,93,1.632,95,1.107,108,1.633,110,1.409,112,1.199,128,2.681,129,1.471,130,2.961,132,2.19,174,1.255,177,3.144,225,1.351,260,1.632,300,1.107,340,2.078,342,1.818,356,1.351,357,1.351,358,1.351,366,4.105,367,3.614,392,4.366,393,1.632,394,1.471,402,1.471,406,1.471,493,1.876,494,1.632,495,1.876,496,2.681,497,3.082,498,3.082,499,3.082,500,1.876,501,1.876,502,1.876,503,1.876,504,1.471,505,1.876,506,1.876,507,1.876,508,1.876,509,3.082,510,1.876,511,1.876,512,1.876,513,1.876,514,1.876,515,1.876,516,1.876,517,1.876,518,1.876,519,1.876,520,1.876,521,1.876,522,1.632,523,1.876]],["t/2505",[12,4.869,13,3.744,14,4.869,20,1.8,21,2.362,100,2.362,174,3.744,469,4.869,470,4.031,524,5.597]],["t/2507",[21,2.98,22,3.397,23,1.603,525,5.196]],["t/2509",[105,3.511,526,6.29,527,5.472]],["t/2511",[13,4.229,32,1.539,33,1.403,34,1.539,35,1.403,37,2.5,50,1.142,51,0.849,59,0.736,60,1.703,61,2.197,72,1.019,81,0.912,107,1.539,108,1.616,110,1.398,132,1.703,147,2.274,148,2.041,150,3.017,174,3.017,183,2.197,185,3.247,190,2.197,193,2.041,194,2.654,347,2.393,371,2.197,528,2.654,529,5.154,530,2.654,531,3.051,532,2.654,533,4.509,534,4.665,535,2.654,536,4.509,537,2.654,538,3.051,539,2.654,540,2.654,541,2.654,542,2.654,543,3.051]],["t/2513",[33,2.747,59,1.44,80,2.521,81,1.786,371,4.301,541,5.196]],["t/2515",[3,0.596,13,1.539,20,0.74,23,0.618,33,1.058,35,1.058,40,2.276,51,2.164,59,0.876,62,2.001,64,1.414,65,1.472,66,0.895,72,1.213,73,0.828,74,0.861,81,1.087,92,1.441,95,2.144,110,1.127,111,1.16,112,0.895,142,1.441,148,1.539,149,2.001,150,1.539,159,1.284,167,1.357,183,1.657,193,1.539,196,1.804,197,1.657,256,1.441,371,2.617,381,2.001,417,1.657,418,1.657,427,1.657,455,1.539,525,2.001,527,2.001,528,2.001,530,2.001,532,2.001,534,2.001,535,2.001,537,2.001,539,2.001,540,2.001,542,2.001,544,2.001,545,2.301,546,2.301,547,3.634,548,2.301,549,2.301,550,3.634,551,2.301,552,2.301,553,2.301,554,2.301,555,2.301,556,2.301,557,2.301,558,2.301,559,2.301]],["t/2517",[16,6.143,20,1.921,100,2.521,560,5.973,561,5.973]],["t/2519",[3,1.521,20,1.89,21,2.479,22,2.826,100,2.479,101,3.466,562,5.11]],["t/2521",[105,3.511,225,4.53,563,6.29]],["t/2523",[3,0.616,32,1.199,33,1.093,34,1.199,35,2.115,37,1.941,50,2.431,53,2.2,106,1.327,107,1.199,108,1.975,109,1.327,110,1.426,112,1.79,130,1.403,132,2.907,147,1.88,167,1.403,174,1.591,185,3.313,190,1.712,216,2.081,248,1.712,250,4.001,253,1.712,377,1.712,389,2.924,420,1.49,494,2.068,504,1.865,529,2.068,564,2.378,565,2.378,566,2.378,567,2.378,568,6.003,569,4.001,570,2.378,571,2.378,572,3.729,573,2.378,574,2.378,575,2.378,576,3.729,577,3.729,578,2.378,579,2.378,580,3.729,581,2.378,582,2.068,583,2.378,584,2.378,585,2.378,586,2.378,587,2.378,588,1.865,589,2.378,590,2.378]],["t/2525",[455,4.208,591,5.472,592,6.29]],["t/2527",[15,1.566,23,0.483,37,1.257,51,2.161,59,0.919,64,0.7,65,1.207,66,0.7,67,1.128,72,1.479,73,0.648,74,0.673,80,0.76,81,0.891,110,1.522,112,1.159,132,1.005,142,1.128,167,2.248,189,2.896,238,1.204,261,0.908,299,1.296,452,1.411,476,1.566,562,1.566,569,2.591,588,1.411,593,1.8,594,1.8,595,1.8,596,1.566,597,1.8,598,1.8,599,1.8,600,1.8,601,1.8,602,1.8,603,1.8,604,1.8,605,1.8,606,1.8,607,1.411,608,3.811,609,2.979,610,2.979,611,1.8,612,1.8,613,1.566,614,1.566,615,1.8,616,1.8,617,1.8,618,1.8,619,5.288,620,1.8,621,1.8,622,1.8,623,1.8,624,1.8,625,1.8,626,1.8,627,1.8,628,1.8,629,1.8,630,1.8,631,1.8,632,1.8,633,1.8,634,1.566,635,1.8,636,1.8,637,1.8,638,1.8,639,1.8,640,1.8,641,1.8,642,1.8,643,1.8,644,1.566,645,1.8,646,1.8]],["t/2529",[20,2.298,49,2.979,50,1.122,55,3.873,147,1.513,185,3.206,261,2.245,317,3.824,354,2.609,377,2.16,427,2.16,455,2.979,468,2.609,504,2.352,588,3.492,596,2.609,607,5.484,613,2.609,614,3.873,634,4.619,647,3,648,3,649,3,650,3,651,3,652,3,653,5.876,654,5.876,655,3,656,3,657,3,658,3,659,3]],["t/2531",[3,1.129,17,4.173,58,2.918,59,1.397,88,2.918,106,2.434,110,2.018,216,2.434,253,3.141,256,2.732,339,2.918,340,3.674,341,3.42,342,2.573,343,3.794,344,3.141,345,3.141,346,3.794,347,3.42,660,3.794,661,4.361]],["t/2533",[3,1.384,20,1.719,21,3.024,22,3.447,23,1.435,100,2.256,101,3.153,662,5.345,663,5.345]],["t/2535",[53,3.647,59,1.49,664,6.181,665,6.181]],["t/2537",[3,1.232,17,1.459,32,1.021,33,0.931,34,1.021,35,0.931,37,1.385,49,2.767,50,1.779,53,1.936,59,0.997,84,1.073,106,1.13,107,1.021,108,3.12,109,1.13,112,2.033,130,2.806,132,1.13,147,1.021,177,2.979,225,1.459,231,1.762,238,2.195,286,1.588,300,2.44,306,1.588,327,1.459,340,3.597,341,1.588,342,2.806,344,2.363,345,1.459,362,2.854,363,2.854,364,2.854,365,1.762,367,1.459,375,1.762,376,1.588,377,1.459,383,2.854,397,1.762,420,2.056,463,2.573,496,1.762,522,2.854,582,1.762,660,2.854,666,2.026,667,1.762,668,2.026,669,2.026,670,1.762,671,1.762,672,4.136,673,1.588,674,2.026,675,3.281,676,2.854,677,2.026,678,2.026,679,2.026,680,2.026]],["t/2539",[3,0.944,17,2.625,50,2.219,59,0.879,83,2.625,104,2.284,108,2.716,110,1.59,132,2.035,191,2.439,256,3.212,300,2.151,340,3.725,342,2.151,367,3.692,376,2.859,414,4.02,420,3.212,463,2.859,667,3.171,670,3.171,671,4.46,673,2.859,676,3.171,681,3.646,682,5.127,683,3.646,684,3.646,685,3.646]],["t/2541",[3,1.811,18,5.483,20,1.89,145,5.11,686,5.11]],["t/2543",[455,4.284,687,6.403]],["t/2545",[72,2.063,104,3.872,105,3.449,688,6.181]],["t/2547",[3,1.188,20,2.146,23,1.231,50,1.716,51,1.856,64,1.785,66,2.331,73,2.402,74,1.716,339,3.068,420,2.873,544,3.989,689,4.586,690,4.586,691,4.586,692,4.586,693,4.586]],["t/2549",[694,5.672]],["t/2551",[18,4.191,40,3.348,51,1.993,197,3.849,686,4.649,694,4.649,695,5.345,696,5.345,697,4.649,698,5.345,699,5.345]],["t/2553",[19,3.968,20,1.773,81,1.648,95,3.251,150,3.686,240,4.793,673,4.321,697,4.793,700,5.51,701,5.51,702,5.51]],["t/2555",[21,2.98,22,3.397,23,1.603,703,5.196]],["t/2557",[19,2.465,23,0.573,51,2.205,59,0.825,64,0.831,65,1.387,66,0.831,72,0.713,73,0.769,74,0.799,80,0.901,81,0.638,110,1.329,111,2.161,112,1.332,147,1.077,189,3.551,190,1.537,244,1.428,261,1.077,286,1.674,299,1.537,317,1.537,327,1.537,452,1.674,607,1.674,644,1.857,703,1.857,704,2.135,705,2.135,706,2.135,707,2.135,708,2.135,709,2.135,710,2.135,711,1.857,712,1.857,713,3.728,714,2.135,715,2.135,716,2.135,717,2.135,718,2.135,719,2.135,720,2.135,721,2.135,722,2.135,723,2.135,724,3.424,725,4.903,726,2.135,727,2.135,728,3.424,729,2.135,730,2.135,731,2.135,732,2.135,733,2.135,734,2.135]],["t/2559",[3,1.089,19,4.074,40,2.635,50,2.116,51,1.985,59,1.014,73,1.514,74,1.574,80,1.775,81,1.258,106,2.348,107,2.121,109,2.348,110,1.304,348,3.659,591,3.659,711,3.659,712,3.659,713,3.659,735,4.206,736,4.206,737,4.206,738,4.206,739,4.206,740,4.206]],["t/2561",[20,1.988,100,2.609,261,3.117,741,5.376]],["t/2563",[3,1.384,20,1.719,21,3.024,22,3.447,23,1.435,100,2.256,101,3.153,742,4.649,743,5.345]],["t/2565",[104,3.94,105,3.511,744,6.29]],["t/2567",[3,0.981,32,1.224,33,1.116,34,1.224,35,1.116,37,2.223,48,3.792,50,0.908,53,1.432,59,1.124,60,2.601,61,1.747,72,0.81,80,1.024,81,0.726,95,1.432,106,1.354,107,1.224,108,2.007,109,2.114,110,1.445,111,1.224,112,2.049,130,2.75,191,1.623,193,1.623,216,1.354,223,2.111,261,1.224,306,1.903,307,4.113,309,2.971,311,2.971,312,1.747,313,2.111,314,1.903,315,3.295,316,2.111,317,1.747,318,2.111,319,3.295,324,2.111,325,2.111,326,3.295,327,1.747,328,2.111,329,2.111,330,2.111,331,3.295,332,2.111,333,2.111,389,1.903,741,3.295,745,3.788,746,2.111,747,2.426,748,2.426,749,2.426,750,2.426,751,2.426,752,2.426]],["t/2569",[23,0.989,51,2.177,59,1.245,64,1.433,65,2.092,66,1.433,72,1.724,73,1.859,74,1.378,81,1.101,110,1.142,112,1.433,159,2.056,189,3.047,271,2.653,307,4.294,336,3.204,337,3.204,411,2.888,742,3.204,746,3.204,753,3.683,754,3.683,755,3.683]]],"invertedIndex":[["",{"_index":51,"t":{"2431":{"position":[[258,1],[333,2]]},"2435":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[570,1],[572,2],[588,2],[591,1],[759,1],[761,2],[777,2],[780,1],[802,1]]},"2437":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[427,2],[536,1],[538,2],[554,2],[557,1],[579,1]]},"2439":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[513,1],[515,2],[531,2],[534,1],[556,1]]},"2449":{"position":[[20,1],[160,1],[174,1],[180,2],[373,3],[377,1],[417,1],[476,2],[524,1],[686,2],[689,3],[693,2],[725,1]]},"2457":{"position":[[82,2]]},"2459":{"position":[[20,1],[95,1],[109,1],[115,2],[170,1],[199,2],[206,2],[323,1],[377,1]]},"2461":{"position":[[20,1],[138,1],[152,1],[171,2],[336,1],[342,2],[397,1],[426,2],[433,2],[483,1],[537,1]]},"2469":{"position":[[458,1]]},"2471":{"position":[[626,1],[780,1],[794,1],[798,1],[839,3],[919,1],[937,2],[944,1],[955,2],[1020,1],[1022,2],[1129,1],[1131,1],[1165,2],[1205,2],[1212,2],[1309,3],[1332,2],[1360,1],[1369,2],[1410,2],[1417,1],[1473,1],[1491,1],[1554,1],[1571,2],[1612,1],[1621,2],[1662,2],[1669,1],[1711,1],[1853,2],[1856,1],[1894,2],[1928,1]]},"2473":{"position":[[134,1],[152,2],[159,1],[170,2],[235,1],[237,2],[321,1],[323,1],[338,2],[341,2]]},"2483":{"position":[[20,1],[114,1],[128,1],[134,2],[159,2],[236,3],[279,1],[318,2],[352,1]]},"2487":{"position":[[34,1]]},"2493":{"position":[[20,1],[131,1],[145,1],[151,2],[166,2],[207,2],[257,2],[366,3],[370,2],[446,1],[479,1],[486,2],[514,2],[537,2],[574,2],[584,2],[592,2],[601,1],[649,1],[651,2],[679,2],[764,1],[778,1],[780,2],[802,2],[855,2],[913,2],[960,2],[967,1],[1022,1],[1061,1],[1099,1],[1135,1],[1173,1],[1180,2],[1220,2],[1256,2],[1312,1],[1314,1],[1322,1]]},"2495":{"position":[[125,1],[244,1]]},"2497":{"position":[[20,1],[164,1],[170,1],[172,2],[245,2],[324,2],[410,1],[424,1],[430,2],[445,2],[536,2],[581,1],[617,2],[624,1],[665,1],[667,2],[708,2],[758,2],[893,2],[896,3],[900,2],[976,1],[1009,1],[1016,2],[1044,2],[1067,2],[1104,2],[1114,2],[1122,2],[1131,1],[1179,1],[1181,2],[1209,2],[1294,1],[1308,1],[1310,2],[1332,2],[1385,2],[1443,2],[1484,2],[1491,1],[1588,1],[1627,1],[1665,1],[1701,1],[1739,1],[1746,2],[1786,2],[1822,2],[1878,1],[1880,1],[1888,1]]},"2503":{"position":[[691,1],[801,1],[815,1],[821,2],[898,3],[942,1],[970,2],[973,1],[1008,1],[1057,1],[1059,2],[1112,2],[1129,1],[1207,1],[1209,2],[1294,2],[1337,1],[1339,1]]},"2511":{"position":[[365,2]]},"2515":{"position":[[85,1],[134,1],[157,2],[171,1],[238,1],[240,1],[262,1],[332,1],[346,1],[352,2],[374,2],[377,1],[415,2],[430,1],[445,2],[454,1],[456,1],[462,2],[792,1],[869,2],[876,2],[879,1],[948,1],[977,2],[1000,1]]},"2527":{"position":[[20,1],[507,1],[520,1],[562,1],[567,2],[596,1],[605,2],[647,2],[654,1],[715,1],[717,3],[725,2],[817,1],[844,2],[894,1],[899,2],[922,2],[1001,2],[1035,1],[1080,1],[1096,2],[1143,2],[1150,1],[1167,1],[1172,2],[1397,3],[1401,1],[1560,1],[1614,1],[1624,2],[1733,2],[1742,1],[1770,1],[1789,1]]},"2547":{"position":[[77,1],[146,1],[181,2]]},"2551":{"position":[[4,2],[33,4],[94,1]]},"2557":{"position":[[20,1],[97,1],[111,1],[117,2],[172,1],[174,2],[223,2],[306,1],[350,1],[384,2],[444,1],[446,2],[523,2],[559,2],[592,2],[633,2],[636,2],[639,2],[737,1],[767,1],[773,1],[791,1],[814,2],[821,1],[855,1],[892,1],[923,2],[930,1],[965,1],[967,1],[969,3],[1004,2],[1069,2],[1108,1]]},"2559":{"position":[[130,2],[207,1],[256,2],[259,3],[320,4]]},"2569":{"position":[[20,1],[118,1],[132,1],[138,2],[160,2],[277,3],[320,1],[359,2],[369,2],[397,2],[404,1],[453,1],[455,1]]}}}],["0",{"_index":370,"t":{"2491":{"position":[[457,2]]}}}],["1.0",{"_index":719,"t":{"2557":{"position":[[595,3]]}}}],["1.18",{"_index":524,"t":{"2505":{"position":[[55,4]]}}}],["123",{"_index":644,"t":{"2527":{"position":[[1736,5]]},"2557":{"position":[[562,3]]}}}],["2",{"_index":231,"t":{"2469":{"position":[[460,1]]},"2537":{"position":[[1145,2]]}}}],["2048",{"_index":474,"t":{"2497":{"position":[[604,5]]}}}],["2]string",{"_index":678,"t":{"2537":{"position":[[1095,9]]}}}],["400",{"_index":347,"t":{"2485":{"position":[[212,4]]},"2511":{"position":[[271,3]]},"2531":{"position":[[221,4]]}}}],["401",{"_index":345,"t":{"2485":{"position":[[154,4]]},"2491":{"position":[[333,3]]},"2531":{"position":[[163,4]]},"2537":{"position":[[330,3]]}}}],["443",{"_index":579,"t":{"2523":{"position":[[545,3]]}}}],["72).unix",{"_index":424,"t":{"2493":{"position":[[766,11]]},"2497":{"position":[[1296,11]]}}}],["7517",{"_index":492,"t":{"2501":{"position":[[174,5]]}}}],["80",{"_index":578,"t":{"2523":{"position":[[531,3]]}}}],["_",{"_index":67,"t":{"2435":{"position":[[88,1]]},"2437":{"position":[[88,1]]},"2439":{"position":[[88,1]]},"2471":{"position":[[796,1]]},"2483":{"position":[[157,1]]},"2527":{"position":[[1616,2]]}}}],["abov",{"_index":470,"t":{"2497":{"position":[[525,6]]},"2499":{"position":[[50,6]]},"2501":{"position":[[43,6]]},"2505":{"position":[[64,5]]}}}],["accept",{"_index":149,"t":{"2447":{"position":[[895,6]]},"2515":{"position":[[173,9]]}}}],["acceptlanguag",{"_index":117,"t":{"2447":{"position":[[190,15]]},"2449":{"position":[[269,16]]}}}],["access",{"_index":244,"t":{"2471":{"position":[[209,6],[1034,6]]},"2473":{"position":[[249,6]]},"2493":{"position":[[245,11]]},"2497":{"position":[[746,11]]},"2557":{"position":[[1007,6]]}}}],["accessible(c",{"_index":432,"t":{"2493":{"position":[[1068,12]]},"2497":{"position":[[1634,12]]}}}],["accordingli",{"_index":355,"t":{"2487":{"position":[[48,12]]}}}],["actual",{"_index":485,"t":{"2499":{"position":[[13,8]]}}}],["ad",{"_index":715,"t":{"2557":{"position":[[461,5]]}}}],["adapt",{"_index":26,"t":{"2427":{"position":[[92,7],[143,7]]},"2431":{"position":[[125,7]]},"2433":{"position":[[5,7],[18,7]]}}}],["adapter/v2",{"_index":71,"t":{"2435":{"position":[[147,11]]},"2437":{"position":[[147,11]]},"2439":{"position":[[147,11]]}}}],["add",{"_index":309,"t":{"2481":{"position":[[139,3],[199,3]]},"2497":{"position":[[345,3]]},"2567":{"position":[[143,3],[377,3]]}}}],["admin",{"_index":421,"t":{"2493":{"position":[[717,8]]},"2497":{"position":[[1247,8]]}}}],["advanc",{"_index":459,"t":{"2497":{"position":[[330,8]]}}}],["agent",{"_index":14,"t":{"2423":{"position":[[76,5]]},"2505":{"position":[[12,5]]}}}],["agent/v3/newrel",{"_index":202,"t":{"2461":{"position":[[119,18]]}}}],["algorithm",{"_index":497,"t":{"2503":{"position":[[147,9],[631,9]]}}}],["allow",{"_index":550,"t":{"2515":{"position":[[409,5],[424,5]]}}}],["along",{"_index":675,"t":{"2537":{"position":[[767,6],[913,6]]}}}],["alway",{"_index":514,"t":{"2503":{"position":[[1062,6]]}}}],["anoth",{"_index":669,"t":{"2537":{"position":[[534,7]]}}}],["api",{"_index":180,"t":{"2457":{"position":[[133,3]]}}}],["app",{"_index":73,"t":{"2435":{"position":[[175,3]]},"2437":{"position":[[175,3]]},"2439":{"position":[[175,3]]},"2449":{"position":[[176,3]]},"2457":{"position":[[286,3]]},"2459":{"position":[[111,3]]},"2461":{"position":[[338,3]]},"2471":{"position":[[1208,3]]},"2483":{"position":[[130,3]]},"2493":{"position":[[147,3]]},"2497":{"position":[[426,3]]},"2503":{"position":[[817,3]]},"2515":{"position":[[348,3]]},"2527":{"position":[[721,3]]},"2547":{"position":[[168,3],[177,3],[227,4]]},"2557":{"position":[[113,3]]},"2559":{"position":[[126,3]]},"2569":{"position":[[134,3],[441,3]]}}}],["app.al",{"_index":290,"t":{"2471":{"position":[[1574,12]]}}}],["app.all(\"/foo",{"_index":287,"t":{"2471":{"position":[[1493,15]]}}}],["app.delete(\"/blog/:id",{"_index":89,"t":{"2435":{"position":[[593,23]]}}}],["app.get",{"_index":159,"t":{"2449":{"position":[[379,12]]},"2459":{"position":[[130,12]]},"2461":{"position":[[357,12]]},"2483":{"position":[[240,12]]},"2493":{"position":[[232,12]]},"2497":{"position":[[733,12]]},"2515":{"position":[[908,12]]},"2569":{"position":[[281,12]]}}}],["app.get(\"/:nam",{"_index":161,"t":{"2449":{"position":[[479,17]]}}}],["app.get(\"/error",{"_index":616,"t":{"2527":{"position":[[772,17]]}}}],["app.get(\"/ok",{"_index":510,"t":{"2503":{"position":[[902,14]]}}}],["app.get(\"/restrict",{"_index":410,"t":{"2493":{"position":[[391,22]]},"2497":{"position":[[921,22]]}}}],["app.get(\"/users/:id",{"_index":618,"t":{"2527":{"position":[[847,21]]}}}],["app.get(\"/ws/:id",{"_index":711,"t":{"2557":{"position":[[387,18]]},"2559":{"position":[[263,18]]}}}],["app.listen(\"127.0.0.1:3000",{"_index":169,"t":{"2449":{"position":[[696,28]]}}}],["app.listen(\":3000",{"_index":411,"t":{"2493":{"position":[[426,19]]},"2497":{"position":[[956,19]]},"2569":{"position":[[372,20]]}}}],["app.listen(\":8080",{"_index":92,"t":{"2435":{"position":[[782,19]]},"2437":{"position":[[559,19]]},"2439":{"position":[[536,19]]},"2459":{"position":[[357,19]]},"2461":{"position":[[517,19]]},"2515":{"position":[[980,19]]}}}],["app.post(\"/blog",{"_index":85,"t":{"2435":{"position":[[427,17]]},"2437":{"position":[[468,17]]}}}],["app.post(\"/login",{"_index":404,"t":{"2493":{"position":[[181,18]]},"2497":{"position":[[682,18]]}}}],["app.put(\"/blog/:id",{"_index":97,"t":{"2439":{"position":[[427,20]]}}}],["app.us",{"_index":156,"t":{"2449":{"position":[[195,8]]}}}],["app.use(\"/w",{"_index":704,"t":{"2557":{"position":[[132,14]]}}}],["app.use(cache.new(cache.config",{"_index":738,"t":{"2559":{"position":[[145,31]]}}}],["app.use(fibernewrelic.new(cfg",{"_index":200,"t":{"2459":{"position":[[325,31]]},"2461":{"position":[[485,31]]}}}],["app.use(fibersentry.new(fibersentry.config",{"_index":280,"t":{"2471":{"position":[[1227,43]]}}}],["app.use(fiberzap.new(fiberzap.config",{"_index":335,"t":{"2483":{"position":[[182,37]]}}}],["app.use(fiberzerolog.new(fiberzerolog.config",{"_index":754,"t":{"2569":{"position":[[214,45]]}}}],["app.use(jwtware.new(jwtware.config",{"_index":406,"t":{"2493":{"position":[[275,35]]},"2497":{"position":[[776,35]]},"2503":{"position":[[836,35]]}}}],["app.use(opafiber.new(cfg",{"_index":559,"t":{"2515":{"position":[[881,26]]}}}],["app.use(otelfiber.middlewar",{"_index":615,"t":{"2527":{"position":[[740,31]]}}}],["app.use(swagger.new(cfg",{"_index":694,"t":{"2549":{"position":[[0,25]]},"2551":{"position":[[96,25]]}}}],["applic",{"_index":179,"t":{"2457":{"position":[[110,11],[243,11],[255,11]]},"2461":{"position":[[458,12]]}}}],["application/json",{"_index":547,"t":{"2515":{"position":[[183,19],[219,18]]}}}],["appnam",{"_index":178,"t":{"2457":{"position":[[85,7]]},"2459":{"position":[[284,8]]}}}],["attach",{"_index":232,"t":{"2471":{"position":[[12,8],[574,8]]}}}],["attachstacktrac",{"_index":279,"t":{"2471":{"position":[[1181,17]]}}}],["attribut",{"_index":576,"t":{"2523":{"position":[[479,9],[809,9]]}}}],["auth",{"_index":341,"t":{"2485":{"position":[[35,4]]},"2531":{"position":[[36,4]]},"2537":{"position":[[1070,5]]}}}],["authent",{"_index":83,"t":{"2435":{"position":[[394,13]]},"2437":{"position":[[394,13]]},"2439":{"position":[[394,13]]},"2539":{"position":[[53,15]]}}}],["author",{"_index":388,"t":{"2491":{"position":[[903,13]]},"2495":{"position":[[295,13],[359,15]]}}}],["authschem",{"_index":387,"t":{"2491":{"position":[[856,10],[874,10]]}}}],["authz",{"_index":75,"t":{"2435":{"position":[[194,5]]},"2437":{"position":[[194,5]]},"2439":{"position":[[194,5]]}}}],["authz.requirespermissions([]string{\"blog:cr",{"_index":86,"t":{"2435":{"position":[[445,50],[617,49]]}}}],["authz.requiresroles([]string{\"admin",{"_index":98,"t":{"2439":{"position":[[448,39]]}}}],["authz.routepermiss",{"_index":96,"t":{"2437":{"position":[[486,24]]}}}],["avail",{"_index":240,"t":{"2471":{"position":[[144,9],[550,9]]},"2553":{"position":[[43,9]]}}}],["bad",{"_index":348,"t":{"2485":{"position":[[219,3]]},"2559":{"position":[[32,3]]}}}],["badrequest",{"_index":661,"t":{"2531":{"position":[[228,11]]}}}],["base",{"_index":697,"t":{"2551":{"position":[[51,4]]},"2553":{"position":[[0,5]]}}}],["basepath",{"_index":696,"t":{"2551":{"position":[[23,9]]}}}],["basic",{"_index":488,"t":{"2501":{"position":[[27,5]]}}}],["bearer",{"_index":390,"t":{"2491":{"position":[[943,10],[1022,8]]},"2495":{"position":[[375,6]]}}}],["becom",{"_index":587,"t":{"2523":{"position":[[963,6]]}}}],["befor",{"_index":220,"t":{"2469":{"position":[[248,6]]},"2471":{"position":[[583,6]]}}}],["beforesend",{"_index":265,"t":{"2471":{"position":[[843,11]]},"2473":{"position":[[58,11]]}}}],["between",{"_index":257,"t":{"2471":{"position":[[489,7]]}}}],["bind",{"_index":721,"t":{"2557":{"position":[[657,8]]}}}],["block",{"_index":219,"t":{"2469":{"position":[[230,5]]}}}],["blog:delet",{"_index":90,"t":{"2435":{"position":[[667,15]]}}}],["bodi",{"_index":61,"t":{"2431":{"position":[[381,4],[468,4]]},"2481":{"position":[[617,4]]},"2511":{"position":[[318,4]]},"2567":{"position":[[804,4]]}}}],["bool",{"_index":107,"t":{"2447":{"position":[[58,4]]},"2457":{"position":[[145,4]]},"2469":{"position":[[42,4],[178,4]]},"2481":{"position":[[50,4]]},"2491":{"position":[[58,4]]},"2511":{"position":[[140,4]]},"2523":{"position":[[56,4]]},"2537":{"position":[[50,4]]},"2559":{"position":[[202,4]]},"2567":{"position":[[50,4]]}}}],["both",{"_index":133,"t":{"2447":{"position":[[570,4]]}}}],["break",{"_index":728,"t":{"2557":{"position":[[849,5],[959,5]]}}}],["bring",{"_index":655,"t":{"2529":{"position":[[204,5]]}}}],["byte",{"_index":327,"t":{"2481":{"position":[[576,6]]},"2537":{"position":[[601,6]]},"2557":{"position":[[750,6]]},"2567":{"position":[[763,6]]}}}],["byte(\"secret",{"_index":408,"t":{"2493":{"position":[[347,18]]}}}],["byte(signingkey",{"_index":523,"t":{"2503":{"position":[[1313,19]]}}}],["bytes.newbufferstring(modul",{"_index":553,"t":{"2515":{"position":[[533,30]]}}}],["c",{"_index":271,"t":{"2471":{"position":[[949,2]]},"2473":{"position":[[164,2]]},"2483":{"position":[[258,2]]},"2569":{"position":[[299,2]]}}}],["c.formvalue(\"pass",{"_index":415,"t":{"2493":{"position":[[517,19]]},"2497":{"position":[[1047,19]]}}}],["c.formvalue(\"us",{"_index":413,"t":{"2493":{"position":[[489,19]]},"2497":{"position":[[1019,19]]}}}],["c.json(fiber.map{\"id",{"_index":622,"t":{"2527":{"position":[[961,22]]}}}],["c.json(fiber.map{\"token",{"_index":431,"t":{"2493":{"position":[[1031,25]]},"2497":{"position":[[1597,25]]}}}],["c.local",{"_index":714,"t":{"2557":{"position":[[449,8]]}}}],["c.locals(\"allow",{"_index":709,"t":{"2557":{"position":[[308,19]]}}}],["c.locals(\"user\").(*jwt.token",{"_index":435,"t":{"2493":{"position":[[1183,29]]},"2497":{"position":[[1749,29]]}}}],["c.next",{"_index":286,"t":{"2471":{"position":[[1482,8]]},"2537":{"position":[[206,8]]},"2557":{"position":[[341,8]]}}}],["c.params(\"id",{"_index":620,"t":{"2527":{"position":[[902,14]]}}}],["c.readmessag",{"_index":726,"t":{"2557":{"position":[[793,16]]}}}],["c.sendstatus(fiber.statusinternalservererror",{"_index":430,"t":{"2493":{"position":[[976,45]]},"2497":{"position":[[1542,45]]}}}],["c.sendstatus(fiber.statusok",{"_index":298,"t":{"2471":{"position":[[1865,28]]}}}],["c.sendstatus(fiber.statusunauthor",{"_index":419,"t":{"2493":{"position":[[610,38]]},"2497":{"position":[[1140,38]]}}}],["c.sendstring(\"access",{"_index":433,"t":{"2493":{"position":[[1108,26]]},"2497":{"position":[[1674,26]]}}}],["c.sendstring(\"hello",{"_index":336,"t":{"2483":{"position":[[288,20]]},"2569":{"position":[[329,20]]}}}],["c.sendstring(\"ok",{"_index":511,"t":{"2503":{"position":[[951,18]]}}}],["c.sendstring(\"welcom",{"_index":438,"t":{"2493":{"position":[[1290,21]]},"2497":{"position":[[1856,21]]}}}],["c.sendstring(fiberi18n.mustgetmessage(\"welcom",{"_index":160,"t":{"2449":{"position":[[426,49]]}}}],["c.writemessage(mt",{"_index":731,"t":{"2557":{"position":[[894,18]]}}}],["cach",{"_index":736,"t":{"2559":{"position":[[61,5]]}}}],["call",{"_index":253,"t":{"2471":{"position":[[447,6]]},"2485":{"position":[[104,5]]},"2523":{"position":[[910,6]]},"2531":{"position":[[113,5]]}}}],["care",{"_index":495,"t":{"2503":{"position":[[117,4]]}}}],["casbin",{"_index":5,"t":{"2423":{"position":[[0,6]]},"2425":{"position":[[0,6]]},"2431":{"position":[[192,6]]}}}],["casbin.config",{"_index":30,"t":{"2429":{"position":[[18,17]]}}}],["casbin.enforc",{"_index":47,"t":{"2431":{"position":[[168,16]]}}}],["casbin.middlewar",{"_index":31,"t":{"2429":{"position":[[36,18]]}}}],["casbin.new(casbin.config",{"_index":76,"t":{"2435":{"position":[[203,25]]},"2437":{"position":[[203,25]]},"2439":{"position":[[203,25]]}}}],["casbin.new(config",{"_index":29,"t":{"2429":{"position":[[0,17]]}}}],["casbin.withvalidationrule(casbin.atleastonerul",{"_index":91,"t":{"2435":{"position":[[683,50]]}}}],["casbin.withvalidationrule(casbin.matchallrul",{"_index":87,"t":{"2435":{"position":[[496,48]]}}}],["case",{"_index":667,"t":{"2537":{"position":[[451,4]]},"2539":{"position":[[348,4]]}}}],["cfg",{"_index":197,"t":{"2459":{"position":[[202,3]]},"2461":{"position":[[429,3]]},"2515":{"position":[[458,3]]},"2551":{"position":[[0,3]]}}}],["chang",{"_index":192,"t":{"2457":{"position":[[366,6]]}}}],["check",{"_index":93,"t":{"2437":{"position":[[430,5]]},"2503":{"position":[[1069,5]]}}}],["choos",{"_index":25,"t":{"2427":{"position":[[82,6]]}}}],["claim",{"_index":378,"t":{"2491":{"position":[[655,6],[672,6],[694,6]]},"2493":{"position":[[665,6],[672,6],[847,7],[1213,6]]},"2497":{"position":[[1195,6],[1202,6],[1377,7],[1779,6]]}}}],["claims[\"name\"].(str",{"_index":437,"t":{"2493":{"position":[[1259,23]]},"2497":{"position":[[1825,23]]}}}],["client",{"_index":317,"t":{"2481":{"position":[[345,7]]},"2529":{"position":[[240,6],[322,6],[339,6]]},"2557":{"position":[[216,6]]},"2567":{"position":[[532,7]]}}}],["code",{"_index":194,"t":{"2457":{"position":[[389,5]]},"2511":{"position":[[229,4]]}}}],["collect",{"_index":119,"t":{"2447":{"position":[[223,10]]},"2501":{"position":[[102,10]]}}}],["compos",{"_index":654,"t":{"2529":{"position":[[185,7],[283,7],[474,7],[570,7]]}}}],["compress",{"_index":330,"t":{"2481":{"position":[[656,8]]},"2567":{"position":[[843,8]]}}}],["config",{"_index":104,"t":{"2445":{"position":[[21,11]]},"2467":{"position":[[23,10]]},"2479":{"position":[[20,10]]},"2539":{"position":[[223,6]]},"2545":{"position":[[16,10]]},"2565":{"position":[[24,10]]}}}],["config.next",{"_index":737,"t":{"2559":{"position":[[90,11]]}}}],["configur",{"_index":213,"t":{"2469":{"position":[[55,10],[199,10]]}}}],["conjuct",{"_index":391,"t":{"2491":{"position":[[975,10]]}}}],["content",{"_index":381,"t":{"2491":{"position":[[721,8]]},"2515":{"position":[[203,8]]}}}],["context",{"_index":238,"t":{"2471":{"position":[[120,8],[278,7],[1057,7]]},"2473":{"position":[[272,7]]},"2491":{"position":[[581,7],[639,8]]},"2527":{"position":[[22,9]]},"2537":{"position":[[1003,7],[1061,8]]}}}],["context.context",{"_index":639,"t":{"2527":{"position":[[1579,16]]}}}],["contextkey",{"_index":375,"t":{"2491":{"position":[[563,10]]},"2537":{"position":[[985,10]]}}}],["cooki",{"_index":702,"t":{"2553":{"position":[[103,8]]}}}],["creat",{"_index":420,"t":{"2493":{"position":[[654,6],[783,6]]},"2497":{"position":[[1184,6],[1313,6]]},"2523":{"position":[[225,8]]},"2537":{"position":[[472,7],[520,7]]},"2539":{"position":[[32,8],[128,6]]},"2547":{"position":[[153,6]]}}}],["createtoken",{"_index":668,"t":{"2537":{"position":[[486,11]]}}}],["credit",{"_index":351,"t":{"2485":{"position":[[258,7]]}}}],["crypto.publickey",{"_index":677,"t":{"2537":{"position":[[852,16]]}}}],["crypto/rand",{"_index":450,"t":{"2497":{"position":[[22,13]]}}}],["crypto/rsa",{"_index":451,"t":{"2497":{"position":[[36,12]]}}}],["ctx",{"_index":556,"t":{"2515":{"position":[[743,4]]}}}],["ctx.local",{"_index":343,"t":{"2485":{"position":[[89,10]]},"2531":{"position":[[98,10]]}}}],["ctx.method",{"_index":557,"t":{"2515":{"position":[[835,13]]}}}],["ctx.params(\"nam",{"_index":168,"t":{"2449":{"position":[[666,19]]}}}],["ctx.path",{"_index":558,"t":{"2515":{"position":[[857,11]]}}}],["ctx.sendstatus(200",{"_index":196,"t":{"2459":{"position":[[179,19]]},"2461":{"position":[[406,19]]},"2515":{"position":[[957,19]]}}}],["ctx.sendstring(fiberi18n.mustgetmessage(&i18n.localizeconfig",{"_index":162,"t":{"2449":{"position":[[533,61]]}}}],["curl",{"_index":441,"t":{"2495":{"position":[[55,4],[325,4]]}}}],["current",{"_index":56,"t":{"2431":{"position":[[317,7]]}}}],["custom",{"_index":48,"t":{"2431":{"position":[[185,6]]},"2481":{"position":[[143,6],[294,6],[395,6]]},"2503":{"position":[[1217,6]]},"2567":{"position":[[147,6],[267,6],[481,6],[582,6]]}}}],["customkeyfunc",{"_index":509,"t":{"2503":{"position":[[881,16],[980,15]]}}}],["data",{"_index":256,"t":{"2471":{"position":[[484,4]]},"2491":{"position":[[701,4]]},"2495":{"position":[[62,4]]},"2515":{"position":[[49,4]]},"2531":{"position":[[90,4]]},"2539":{"position":[[378,4],[478,4]]}}}],["data.example.authz.allow",{"_index":552,"t":{"2515":{"position":[[493,27]]}}}],["databas",{"_index":44,"t":{"2431":{"position":[[116,8]]},"2503":{"position":[[1274,8]]}}}],["debug",{"_index":278,"t":{"2471":{"position":[[1168,6]]}}}],["decod",{"_index":139,"t":{"2447":{"position":[[689,8]]}}}],["default",{"_index":35,"t":{"2431":{"position":[[26,7]]},"2447":{"position":[[26,7],[416,7]]},"2457":{"position":[[26,7]]},"2469":{"position":[[26,7]]},"2481":{"position":[[26,7]]},"2491":{"position":[[26,7],[929,7],[995,7]]},"2503":{"position":[[571,7]]},"2511":{"position":[[26,7]]},"2515":{"position":[[401,7]]},"2523":{"position":[[26,7],[523,7],[984,7]]},"2537":{"position":[[26,7]]},"2567":{"position":[[26,7]]}}}],["defaulterrorstatuscodehandl",{"_index":195,"t":{"2457":{"position":[[411,29]]}}}],["defaultinput(ctx",{"_index":543,"t":{"2511":{"position":[[524,16]]}}}],["defaultlang",{"_index":143,"t":{"2447":{"position":[[762,11],[848,12]]}}}],["defaultlanguag",{"_index":126,"t":{"2447":{"position":[[383,15]]},"2449":{"position":[[338,16]]}}}],["defer",{"_index":610,"t":{"2527":{"position":[[583,5],[1710,5]]}}}],["defin",{"_index":130,"t":{"2447":{"position":[[529,7]]},"2481":{"position":[[55,6],[583,6]]},"2491":{"position":[[63,7],[158,7],[274,7],[706,8],[1066,7],[1081,7]]},"2503":{"position":[[8,7],[23,7],[194,7],[279,7],[466,7]]},"2523":{"position":[[61,6]]},"2537":{"position":[[55,7],[150,7],[271,7],[386,7]]},"2567":{"position":[[55,6],[298,7],[770,6]]}}}],["deliveri",{"_index":229,"t":{"2469":{"position":[[427,8]]}}}],["demo",{"_index":465,"t":{"2497":{"position":[[458,5]]}}}],["deni",{"_index":536,"t":{"2511":{"position":[[256,6],[350,6]]}}}],["deniedresponsemessag",{"_index":537,"t":{"2511":{"position":[[275,21]]},"2515":{"position":[[631,22]]}}}],["deniedstatuscod",{"_index":535,"t":{"2511":{"position":[[196,16]]},"2515":{"position":[[590,17]]}}}],["depend",{"_index":4,"t":{"2421":{"position":[[44,13]]}}}],["deprec",{"_index":186,"t":{"2457":{"position":[[223,12]]}}}],["descript",{"_index":34,"t":{"2431":{"position":[[14,11]]},"2447":{"position":[[14,11]]},"2457":{"position":[[14,11]]},"2469":{"position":[[14,11]]},"2481":{"position":[[14,11]]},"2491":{"position":[[14,11]]},"2511":{"position":[[14,11]]},"2523":{"position":[[14,11]]},"2537":{"position":[[14,11]]},"2567":{"position":[[14,11]]}}}],["detach",{"_index":656,"t":{"2529":{"position":[[296,6]]}}}],["docker",{"_index":653,"t":{"2529":{"position":[[178,6],[276,6],[467,6],[563,6]]}}}],["docs/swagger.json",{"_index":699,"t":{"2551":{"position":[[71,22]]}}}],["doe",{"_index":418,"t":{"2493":{"position":[[595,5],[711,5]]},"2495":{"position":[[511,3]]},"2497":{"position":[[1125,5],[1241,5]]},"2515":{"position":[[151,5]]}}}],["down",{"_index":614,"t":{"2527":{"position":[[683,4]]},"2529":{"position":[[505,4],[578,4]]}}}],["driver/mysql",{"_index":70,"t":{"2435":{"position":[[109,13]]},"2437":{"position":[[109,13]]},"2439":{"position":[[109,13]]}}}],["dsn",{"_index":264,"t":{"2471":{"position":[[834,4]]},"2473":{"position":[[34,4],[52,5]]}}}],["each",{"_index":467,"t":{"2497":{"position":[[506,4]]}}}],["echo",{"_index":352,"t":{"2485":{"position":[[269,4]]}}}],["ed25519.privatekey",{"_index":674,"t":{"2537":{"position":[[706,18]]}}}],["eg",{"_index":329,"t":{"2481":{"position":[[643,3]]},"2567":{"position":[[830,3]]}}}],["embed.fs.readfil",{"_index":135,"t":{"2447":{"position":[[591,18]]}}}],["enabl",{"_index":181,"t":{"2457":{"position":[[137,7]]},"2459":{"position":[[308,8]]}}}],["enable/dis",{"_index":182,"t":{"2457":{"position":[[150,14]]}}}],["encod",{"_index":426,"t":{"2493":{"position":[[867,7]]},"2497":{"position":[[1397,7]]}}}],["encrypt",{"_index":671,"t":{"2537":{"position":[[622,7]]},"2539":{"position":[[144,7],[249,11]]}}}],["endpoint",{"_index":650,"t":{"2529":{"position":[[84,9]]}}}],["enforc",{"_index":46,"t":{"2431":{"position":[[159,8],[199,8],[229,8]]}}}],["engin",{"_index":545,"t":{"2515":{"position":[[68,6]]}}}],["enhancesentryev",{"_index":281,"t":{"2471":{"position":[[1313,18],[1509,19]]}}}],["err",{"_index":189,"t":{"2457":{"position":[[336,3]]},"2461":{"position":[[167,3]]},"2493":{"position":[[909,3],[956,3]]},"2497":{"position":[[555,3],[577,3],[613,3],[660,4],[1439,3],[1480,3],[1530,4]]},"2527":{"position":[[601,3],[643,3],[710,4],[1092,3],[1139,3]]},"2557":{"position":[[757,3],[787,3],[810,3],[844,4],[888,3],[919,3],[954,4]]},"2569":{"position":[[365,3],[393,3]]}}}],["error",{"_index":59,"t":{"2431":{"position":[[366,5],[453,5]]},"2435":{"position":[[564,5],[753,5]]},"2437":{"position":[[530,5]]},"2439":{"position":[[507,5]]},"2449":{"position":[[411,5],[518,5]]},"2457":{"position":[[340,6]]},"2459":{"position":[[164,5]]},"2461":{"position":[[391,5]]},"2471":{"position":[[1354,5],[1548,5],[1606,5]]},"2481":{"position":[[337,7],[353,7]]},"2483":{"position":[[273,5]]},"2485":{"position":[[175,6],[232,6]]},"2489":{"position":[[55,5]]},"2491":{"position":[[137,5],[248,6],[255,5]]},"2493":{"position":[[473,5],[560,5],[1093,5],[1167,5]]},"2497":{"position":[[559,5],[1003,5],[1090,5],[1659,5],[1733,5]]},"2503":{"position":[[936,5],[1050,6]]},"2511":{"position":[[578,6]]},"2513":{"position":[[67,6]]},"2515":{"position":[[785,6],[942,5]]},"2527":{"position":[[32,8],[811,5],[888,5]]},"2531":{"position":[[184,6],[240,6]]},"2535":{"position":[[61,5]]},"2537":{"position":[[129,5],[245,6],[252,5]]},"2539":{"position":[[510,6]]},"2557":{"position":[[166,5],[761,5]]},"2559":{"position":[[15,5]]},"2567":{"position":[[454,8],[524,7],[540,7]]},"2569":{"position":[[314,5],[445,7]]}}}],["errorhandl",{"_index":364,"t":{"2491":{"position":[[218,12],[261,12]]},"2537":{"position":[[215,12],[258,12]]}}}],["errors.new(\"abc",{"_index":617,"t":{"2527":{"position":[[826,17]]}}}],["errorstatuscodehandl",{"_index":188,"t":{"2457":{"position":[[294,22]]}}}],["event",{"_index":228,"t":{"2469":{"position":[[421,5]]},"2471":{"position":[[1159,5]]},"2473":{"position":[[332,5]]}}}],["exampl",{"_index":455,"t":{"2497":{"position":[[206,8]]},"2515":{"position":[[41,7]]},"2525":{"position":[[16,7]]},"2529":{"position":[[267,8],[554,8]]},"2543":{"position":[[11,8]]}}}],["example.authz",{"_index":549,"t":{"2515":{"position":[[387,13]]}}}],["example/loc",{"_index":116,"t":{"2447":{"position":[[169,20]]},"2449":{"position":[[247,21]]}}}],["except",{"_index":489,"t":{"2501":{"position":[[55,9]]}}}],["execut",{"_index":363,"t":{"2491":{"position":[[186,8],[302,8]]},"2537":{"position":[[178,8],[299,8]]}}}],["exist",{"_index":187,"t":{"2457":{"position":[[267,8]]}}}],["exit",{"_index":657,"t":{"2529":{"position":[[407,6]]}}}],["exp",{"_index":422,"t":{"2493":{"position":[[732,6]]},"2497":{"position":[[1262,6]]}}}],["expect",{"_index":652,"t":{"2529":{"position":[[162,6]]}}}],["expir",{"_index":365,"t":{"2491":{"position":[[348,7]]},"2537":{"position":[[345,7]]}}}],["export",{"_index":624,"t":{"2527":{"position":[[1082,9]]}}}],["extend",{"_index":380,"t":{"2491":{"position":[[683,10]]}}}],["extern",{"_index":501,"t":{"2503":{"position":[[251,8]]}}}],["extract",{"_index":582,"t":{"2523":{"position":[[635,10]]},"2537":{"position":[[1164,7]]}}}],["eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyjlehaioje0nje5ntcxmzz9.rb3arc4",{"_index":444,"t":{"2495":{"position":[[136,70],[382,69]]}}}],["fallback",{"_index":368,"t":{"2491":{"position":[[422,8]]}}}],["fals",{"_index":183,"t":{"2457":{"position":[[175,5]]},"2469":{"position":[[156,5],[370,6],[377,5]]},"2511":{"position":[[190,5]]},"2515":{"position":[[418,5]]}}}],["fasthttp",{"_index":700,"t":{"2553":{"position":[[9,8]]}}}],["fetch",{"_index":82,"t":{"2435":{"position":[[388,5]]},"2437":{"position":[[388,5]]},"2439":{"position":[[388,5]]}}}],["ffffffffffffffffffffffffffffffffffffffff",{"_index":198,"t":{"2459":{"position":[[240,43]]}}}],["fiber",{"_index":20,"t":{"2425":{"position":[[22,6]]},"2441":{"position":[[20,6]]},"2443":{"position":[[25,5]]},"2451":{"position":[[21,6]]},"2457":{"position":[[127,5]]},"2463":{"position":[[19,6]]},"2465":{"position":[[25,5]]},"2475":{"position":[[24,6]]},"2477":{"position":[[25,5]]},"2487":{"position":[[25,5]]},"2505":{"position":[[30,6]]},"2515":{"position":[[4,5]]},"2517":{"position":[[26,6]]},"2519":{"position":[[25,5]]},"2529":{"position":[[29,5],[217,5],[234,5],[303,5],[316,5],[333,5],[385,5],[441,5],[487,5]]},"2533":{"position":[[25,5]]},"2541":{"position":[[23,6]]},"2547":{"position":[[50,5],[162,5],[221,5]]},"2553":{"position":[[32,5]]},"2561":{"position":[[28,6]]},"2563":{"position":[[25,5]]}}}],["fiber.ctx",{"_index":81,"t":{"2435":{"position":[[364,11],[552,11],[741,11]]},"2437":{"position":[[364,11],[518,11]]},"2439":{"position":[[364,11],[495,11]]},"2447":{"position":[[46,11],[750,11],[833,10]]},"2449":{"position":[[399,11],[506,11]]},"2457":{"position":[[324,11]]},"2459":{"position":[[152,11]]},"2461":{"position":[[379,11]]},"2471":{"position":[[1342,11],[1536,11],[1594,11]]},"2481":{"position":[[564,11]]},"2483":{"position":[[261,11]]},"2493":{"position":[[461,11],[1081,11],[1155,11]]},"2497":{"position":[[991,11],[1647,11],[1721,11]]},"2503":{"position":[[924,11]]},"2511":{"position":[[541,11]]},"2513":{"position":[[30,11]]},"2515":{"position":[[748,11],[930,11]]},"2527":{"position":[[799,11],[876,11]]},"2553":{"position":[[53,10]]},"2557":{"position":[[154,11]]},"2559":{"position":[[190,11]]},"2567":{"position":[[751,11]]},"2569":{"position":[[302,11]]}}}],["fiber.errupgraderequir",{"_index":710,"t":{"2557":{"position":[[359,24]]}}}],["fiber.handl",{"_index":105,"t":{"2445":{"position":[[33,13]]},"2455":{"position":[[47,13]]},"2467":{"position":[[34,13]]},"2479":{"position":[[31,13]]},"2509":{"position":[[37,13]]},"2521":{"position":[[37,13]]},"2545":{"position":[[27,13]]},"2565":{"position":[[35,13]]}}}],["fiber.new",{"_index":74,"t":{"2435":{"position":[[182,11]]},"2437":{"position":[[182,11]]},"2439":{"position":[[182,11]]},"2449":{"position":[[183,11]]},"2459":{"position":[[118,11]]},"2461":{"position":[[345,11]]},"2471":{"position":[[1215,11]]},"2483":{"position":[[137,11]]},"2493":{"position":[[154,11]]},"2497":{"position":[[433,11]]},"2503":{"position":[[824,11]]},"2515":{"position":[[355,11]]},"2527":{"position":[[728,11]]},"2547":{"position":[[184,12]]},"2557":{"position":[[120,11]]},"2559":{"position":[[133,11]]},"2569":{"position":[[141,11]]}}}],["fiber.statusforbidden",{"_index":554,"t":{"2515":{"position":[[608,22]]}}}],["fiberi18n",{"_index":6,"t":{"2423":{"position":[[7,9]]}}}],["fiberi18n.new(&fiberi18n.config",{"_index":157,"t":{"2449":{"position":[[204,32]]}}}],["fiberi18n.new(config",{"_index":103,"t":{"2445":{"position":[[0,20]]}}}],["fibernewrelic.config",{"_index":172,"t":{"2455":{"position":[[25,21]]},"2459":{"position":[[209,21]]},"2461":{"position":[[436,21]]}}}],["fibernewrelic.new(config",{"_index":171,"t":{"2455":{"position":[[0,24]]}}}],["fibersentri",{"_index":7,"t":{"2423":{"position":[[17,11]]},"2471":{"position":[[0,11],[593,12]]}}}],["fibersentry.gethubfromcontext",{"_index":245,"t":{"2471":{"position":[[232,31]]}}}],["fibersentry.gethubfromcontext(c",{"_index":283,"t":{"2471":{"position":[[1372,33],[1624,33]]}}}],["fibersentry.new(config",{"_index":211,"t":{"2467":{"position":[[0,22]]}}}],["fiberzap",{"_index":8,"t":{"2423":{"position":[[29,8]]}}}],["fiberzap.new(config",{"_index":305,"t":{"2479":{"position":[[0,19]]}}}],["fiberzerolog",{"_index":9,"t":{"2423":{"position":[[38,12]]}}}],["fiberzerolog.new(config",{"_index":744,"t":{"2565":{"position":[[0,23]]}}}],["field",{"_index":311,"t":{"2481":{"position":[[183,6],[203,6]]},"2491":{"position":[[546,5]]},"2567":{"position":[[361,6],[381,6]]}}}],["file",{"_index":39,"t":{"2431":{"position":[[61,4]]},"2433":{"position":[[13,4]]},"2447":{"position":[[370,5],[553,5],[707,6]]}}}],["filepath",{"_index":698,"t":{"2551":{"position":[[61,9]]}}}],["filter",{"_index":361,"t":{"2491":{"position":[[34,6]]}}}],["fine",{"_index":297,"t":{"2471":{"position":[[1846,6]]}}}],["finish",{"_index":659,"t":{"2529":{"position":[[536,8]]}}}],["fmt",{"_index":260,"t":{"2471":{"position":[[628,5]]},"2503":{"position":[[693,5]]}}}],["fmt.errorf(\"unexpect",{"_index":517,"t":{"2503":{"position":[[1143,22]]}}}],["fmt.println(c.hostnam",{"_index":301,"t":{"2473":{"position":[[295,25]]}}}],["fmt.println(ev",{"_index":277,"t":{"2471":{"position":[[1133,18]]}}}],["fmt.println(utils.immutablestring(c.hostnam",{"_index":276,"t":{"2471":{"position":[[1080,48]]}}}],["folder",{"_index":115,"t":{"2447":{"position":[[156,6]]}}}],["follow",{"_index":544,"t":{"2515":{"position":[[31,9]]},"2547":{"position":[[248,9]]}}}],["forbidden",{"_index":62,"t":{"2431":{"position":[[426,9],[477,9],[497,9]]},"2515":{"position":[[662,11]]}}}],["form",{"_index":384,"t":{"2491":{"position":[[796,4]]}}}],["format",{"_index":490,"t":{"2501":{"position":[[139,6]]}}}],["formatbundlefil",{"_index":124,"t":{"2447":{"position":[[321,16]]}}}],["formatt",{"_index":589,"t":{"2523":{"position":[[992,9]]}}}],["forward",{"_index":222,"t":{"2469":{"position":[[262,7]]}}}],["found",{"_index":560,"t":{"2517":{"position":[[40,5]]}}}],["framework",{"_index":690,"t":{"2547":{"position":[[60,9]]}}}],["func",{"_index":72,"t":{"2435":{"position":[[161,4]]},"2437":{"position":[[161,4]]},"2439":{"position":[[161,4]]},"2449":{"position":[[162,4]]},"2459":{"position":[[97,4]]},"2461":{"position":[[140,4]]},"2471":{"position":[[782,4]]},"2481":{"position":[[723,4]]},"2483":{"position":[[116,4],[253,4]]},"2491":{"position":[[1039,6]]},"2493":{"position":[[133,4],[448,4],[1063,4],[1137,4]]},"2497":{"position":[[412,4],[978,4],[1629,4],[1703,4]]},"2503":{"position":[[803,4],[975,4]]},"2511":{"position":[[519,4]]},"2515":{"position":[[334,4],[738,4]]},"2527":{"position":[[550,4],[589,6],[1037,4],[1562,4]]},"2545":{"position":[[0,4]]},"2557":{"position":[[99,4]]},"2567":{"position":[[910,4]]},"2569":{"position":[[120,4],[294,4]]}}}],["func(*ctx",{"_index":306,"t":{"2481":{"position":[[39,10]]},"2537":{"position":[[39,10]]},"2567":{"position":[[39,10]]}}}],["func(*fiber.ctx",{"_index":53,"t":{"2431":{"position":[[281,16],[349,16],[436,16]]},"2489":{"position":[[38,16]]},"2491":{"position":[[41,16],[120,16],[231,16]]},"2523":{"position":[[39,16],[856,16]]},"2535":{"position":[[44,16]]},"2537":{"position":[[112,16],[228,16]]},"2567":{"position":[[231,16]]}}}],["func(c",{"_index":80,"t":{"2435":{"position":[[357,6],[545,6],[734,6]]},"2437":{"position":[[357,6],[511,6]]},"2439":{"position":[[357,6],[488,6]]},"2447":{"position":[[39,6]]},"2449":{"position":[[392,6]]},"2457":{"position":[[317,6]]},"2471":{"position":[[1335,6],[1529,6],[1587,6]]},"2481":{"position":[[557,6]]},"2503":{"position":[[917,6]]},"2513":{"position":[[23,6]]},"2527":{"position":[[869,6]]},"2557":{"position":[[147,6]]},"2559":{"position":[[183,6]]},"2567":{"position":[[744,6]]}}}],["func(ctx",{"_index":142,"t":{"2447":{"position":[[741,8]]},"2449":{"position":[[497,8]]},"2459":{"position":[[143,8]]},"2461":{"position":[[370,8]]},"2515":{"position":[[921,8]]},"2527":{"position":[[790,8]]}}}],["func(ev",{"_index":266,"t":{"2471":{"position":[[855,10]]},"2473":{"position":[[70,10]]}}}],["func(t",{"_index":512,"t":{"2503":{"position":[[1017,6]]}}}],["function",{"_index":108,"t":{"2447":{"position":[[65,8],[671,8]]},"2481":{"position":[[64,8],[592,8]]},"2491":{"position":[[73,8],[168,8],[284,8],[1089,8]]},"2503":{"position":[[31,8],[97,8]]},"2511":{"position":[[485,8]]},"2523":{"position":[[70,8],[888,8]]},"2537":{"position":[[65,8],[160,8],[281,8],[396,8],[498,9],[542,9],[557,8]]},"2539":{"position":[[85,8],[428,8]]},"2567":{"position":[[64,8],[779,8]]}}}],["gener",{"_index":49,"t":{"2431":{"position":[[219,9]]},"2493":{"position":[[858,8]]},"2497":{"position":[[314,9],[464,8],[1388,8]]},"2529":{"position":[[105,9],[428,9]]},"2537":{"position":[[668,8],[814,8],[957,8]]}}}],["getlogg",{"_index":747,"t":{"2567":{"position":[[221,9]]}}}],["getresbodi",{"_index":326,"t":{"2481":{"position":[[546,10],[712,10]]},"2567":{"position":[[733,10],[899,10]]}}}],["getus",{"_index":641,"t":{"2527":{"position":[[1645,10]]}}}],["getuser(c.usercontext",{"_index":621,"t":{"2527":{"position":[[925,24]]}}}],["getuser(ctx",{"_index":638,"t":{"2527":{"position":[[1567,11]]}}}],["github",{"_index":461,"t":{"2497":{"position":[[370,6]]}}}],["github.com/casbin/xorm",{"_index":28,"t":{"2427":{"position":[[120,22]]},"2435":{"position":[[123,23]]},"2437":{"position":[[123,23]]},"2439":{"position":[[123,23]]}}}],["github.com/getsentry/sentri",{"_index":210,"t":{"2465":{"position":[[132,27]]},"2471":{"position":[[640,28]]}}}],["github.com/go",{"_index":68,"t":{"2435":{"position":[[90,14]]},"2437":{"position":[[90,14]]},"2439":{"position":[[90,14]]}}}],["github.com/gofiber/contrib/casbin",{"_index":24,"t":{"2427":{"position":[[48,33]]},"2435":{"position":[[52,35]]},"2437":{"position":[[52,35]]},"2439":{"position":[[52,35]]}}}],["github.com/gofiber/contrib/fiberi18n",{"_index":102,"t":{"2443":{"position":[[83,36]]},"2449":{"position":[[22,38]]}}}],["github.com/gofiber/contrib/fibernewrel",{"_index":170,"t":{"2453":{"position":[[48,40]]},"2459":{"position":[[52,42]]},"2461":{"position":[[52,42]]}}}],["github.com/gofiber/contrib/fibersentri",{"_index":209,"t":{"2465":{"position":[[83,38]]},"2471":{"position":[[673,40]]}}}],["github.com/gofiber/contrib/fiberzap",{"_index":303,"t":{"2477":{"position":[[83,35]]},"2483":{"position":[[58,37]]}}}],["github.com/gofiber/contrib/fiberzerolog",{"_index":742,"t":{"2563":{"position":[[83,39]]},"2569":{"position":[[52,41]]}}}],["github.com/gofiber/contrib/jwt",{"_index":356,"t":{"2487":{"position":[[109,30]]},"2493":{"position":[[67,32]]},"2497":{"position":[[131,32]]},"2503":{"position":[[737,32]]}}}],["github.com/gofiber/contrib/opafib",{"_index":525,"t":{"2507":{"position":[[48,35]]},"2515":{"position":[[294,37]]}}}],["github.com/gofiber/contrib/otelfib",{"_index":562,"t":{"2519":{"position":[[45,36]]},"2527":{"position":[[117,38]]}}}],["github.com/gofiber/contrib/paseto",{"_index":662,"t":{"2533":{"position":[[83,33]]}}}],["github.com/gofiber/contrib/swagg",{"_index":691,"t":{"2547":{"position":[[109,36]]}}}],["github.com/gofiber/contrib/websocket",{"_index":703,"t":{"2555":{"position":[[48,36]]},"2557":{"position":[[58,38]]}}}],["github.com/gofiber/fiber/v2",{"_index":23,"t":{"2427":{"position":[[10,27]]},"2435":{"position":[[22,29]]},"2437":{"position":[[22,29]]},"2439":{"position":[[22,29]]},"2443":{"position":[[45,27]]},"2449":{"position":[[61,29]]},"2453":{"position":[[10,27]]},"2459":{"position":[[22,29]]},"2461":{"position":[[22,29]]},"2465":{"position":[[45,27]]},"2471":{"position":[[714,29]]},"2477":{"position":[[45,27]]},"2483":{"position":[[28,29]]},"2487":{"position":[[71,27]]},"2493":{"position":[[29,29]]},"2497":{"position":[[62,29]]},"2503":{"position":[[699,29]]},"2507":{"position":[[10,27]]},"2515":{"position":[[264,29]]},"2527":{"position":[[87,29]]},"2533":{"position":[[45,27]]},"2547":{"position":[[79,29]]},"2555":{"position":[[10,27]]},"2557":{"position":[[28,29]]},"2563":{"position":[[45,27]]},"2569":{"position":[[22,29]]}}}],["github.com/gofiber/fiber/v2/util",{"_index":262,"t":{"2471":{"position":[[744,35]]}}}],["github.com/golang",{"_index":357,"t":{"2487":{"position":[[150,17]]},"2493":{"position":[[100,18]]},"2497":{"position":[[92,18]]},"2503":{"position":[[770,18]]}}}],["github.com/newrelic/go",{"_index":201,"t":{"2461":{"position":[[95,23]]}}}],["github.com/nicksnyder/go",{"_index":153,"t":{"2449":{"position":[[91,25]]}}}],["github.com/o1egl/paseto",{"_index":663,"t":{"2533":{"position":[[127,23]]}}}],["github.com/rs/zerolog",{"_index":753,"t":{"2569":{"position":[[94,23]]}}}],["github.com/rs/zerolog/log",{"_index":743,"t":{"2563":{"position":[[133,25]]}}}],["global",{"_index":250,"t":{"2471":{"position":[[379,6]]},"2523":{"position":[[253,6],[381,6],[704,6]]}}}],["go",{"_index":21,"t":{"2427":{"position":[[0,2],[38,2],[110,2]]},"2441":{"position":[[0,2]]},"2443":{"position":[[35,2],[73,2]]},"2453":{"position":[[0,2],[38,2]]},"2465":{"position":[[35,2],[73,2],[122,2],[160,2]]},"2471":{"position":[[669,3]]},"2477":{"position":[[35,2],[73,2],[119,2]]},"2487":{"position":[[61,2],[99,2],[140,2]]},"2505":{"position":[[52,2]]},"2507":{"position":[[0,2],[38,2]]},"2519":{"position":[[35,2]]},"2533":{"position":[[35,2],[73,2],[117,2]]},"2555":{"position":[[0,2],[38,2]]},"2563":{"position":[[35,2],[73,2],[123,2]]}}}],["go#hub",{"_index":236,"t":{"2471":{"position":[[95,7]]}}}],["go.opentelemetry.io/otel",{"_index":594,"t":{"2527":{"position":[[156,26]]}}}],["go.opentelemetry.io/otel/attribut",{"_index":595,"t":{"2527":{"position":[[183,36]]}}}],["go.opentelemetry.io/otel/exporters/jaeg",{"_index":598,"t":{"2527":{"position":[[283,45]]}}}],["go.opentelemetry.io/otel/exporters/stdout/stdouttrac",{"_index":597,"t":{"2527":{"position":[[227,55]]}}}],["go.opentelemetry.io/otel/propag",{"_index":599,"t":{"2527":{"position":[[329,38]]}}}],["go.opentelemetry.io/otel/sdk/resourc",{"_index":593,"t":{"2527":{"position":[[47,39]]}}}],["go.opentelemetry.io/otel/sdk/trac",{"_index":601,"t":{"2527":{"position":[[377,36]]}}}],["go.opentelemetry.io/otel/semconv/v1.4.0",{"_index":603,"t":{"2527":{"position":[[422,41]]}}}],["go.opentelemetry.io/otel/trac",{"_index":605,"t":{"2527":{"position":[[474,32]]}}}],["go.uber.org/zap",{"_index":304,"t":{"2477":{"position":[[129,15]]},"2483":{"position":[[96,17]]}}}],["gofib",{"_index":647,"t":{"2529":{"position":[[21,7]]}}}],["golang.org/x/text/languag",{"_index":155,"t":{"2449":{"position":[[131,28]]}}}],["gorm",{"_index":63,"t":{"2433":{"position":[[0,4]]}}}],["h",{"_index":448,"t":{"2495":{"position":[[357,1]]}}}],["handl",{"_index":145,"t":{"2447":{"position":[[822,7]]},"2541":{"position":[[45,7]]}}}],["handler",{"_index":88,"t":{"2435":{"position":[[580,7],[769,7]]},"2437":{"position":[[546,7]]},"2439":{"position":[[523,7]]},"2485":{"position":[[115,8]]},"2531":{"position":[[124,8]]}}}],["handshak",{"_index":735,"t":{"2559":{"position":[[36,9]]}}}],["header",{"_index":148,"t":{"2447":{"position":[[888,6]]},"2491":{"position":[[917,7]]},"2495":{"position":[[317,7]]},"2511":{"position":[[400,7]]},"2515":{"position":[[160,10]]}}}],["header\",\"author",{"_index":680,"t":{"2537":{"position":[[1195,26]]}}}],["header:author",{"_index":386,"t":{"2491":{"position":[[833,22]]}}}],["here",{"_index":27,"t":{"2427":{"position":[[105,4]]}}}],["hint",{"_index":268,"t":{"2471":{"position":[[881,4]]},"2473":{"position":[[96,4]]}}}],["hint.context",{"_index":270,"t":{"2471":{"position":[[924,12]]},"2473":{"position":[[139,12]]}}}],["hint.context.value(sentry.requestcontextkey).(*fiber.ctx",{"_index":273,"t":{"2471":{"position":[[958,58]]},"2473":{"position":[[173,58]]}}}],["hs256",{"_index":487,"t":{"2499":{"position":[[39,5]]}}}],["http",{"_index":185,"t":{"2457":{"position":[[209,4],[217,5],[236,6]]},"2511":{"position":[[217,4],[304,4]]},"2523":{"position":[[539,5],[553,6],[667,4]]},"2529":{"position":[[3,4],[369,4]]}}}],["http.server_nam",{"_index":585,"t":{"2523":{"position":[[792,16]]}}}],["http://localhost:3000/login",{"_index":443,"t":{"2495":{"position":[[88,27]]}}}],["https://godoc.org/github.com/getsentry/sentri",{"_index":235,"t":{"2471":{"position":[[48,46]]}}}],["https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg",{"_index":722,"t":{"2557":{"position":[[666,60]]}}}],["https://www.websocket.org/echo.html",{"_index":734,"t":{"2557":{"position":[[1072,35]]}}}],["hub",{"_index":282,"t":{"2471":{"position":[[1365,3],[1406,3],[1617,3],[1658,3]]}}}],["hub.capturemessage(\"us",{"_index":295,"t":{"2471":{"position":[[1767,24]]}}}],["hub.scope().settag(\"somerandomtag",{"_index":284,"t":{"2471":{"position":[[1419,35]]}}}],["hub.withscope(func(scop",{"_index":291,"t":{"2471":{"position":[[1671,24]]}}}],["i18n",{"_index":99,"t":{"2441":{"position":[[3,4]]},"2447":{"position":[[142,4]]}}}],["i18n.unmarshalfunc",{"_index":138,"t":{"2447":{"position":[[648,18]]}}}],["i18n/v2/i18n",{"_index":154,"t":{"2449":{"position":[[117,13]]}}}],["id",{"_index":619,"t":{"2527":{"position":[[896,2],[950,3],[984,3],[1596,2],[1704,5],[1730,2]]}}}],["ident",{"_index":486,"t":{"2499":{"position":[[22,9]]},"2501":{"position":[[14,9]]}}}],["ignor",{"_index":503,"t":{"2503":{"position":[[355,8]]}}}],["implement",{"_index":128,"t":{"2447":{"position":[[483,14]]},"2503":{"position":[[594,14],[1224,14]]}}}],["import",{"_index":66,"t":{"2435":{"position":[[13,6]]},"2437":{"position":[[13,6]]},"2439":{"position":[[13,6]]},"2449":{"position":[[13,6]]},"2459":{"position":[[13,6]]},"2461":{"position":[[13,6]]},"2471":{"position":[[619,6]]},"2483":{"position":[[13,6]]},"2493":{"position":[[13,6]]},"2497":{"position":[[13,6]]},"2503":{"position":[[684,6]]},"2515":{"position":[[255,6]]},"2527":{"position":[[13,6]]},"2547":{"position":[[0,6],[70,6]]},"2557":{"position":[[13,6]]},"2569":{"position":[[13,6]]}}}],["includ",{"_index":533,"t":{"2511":{"position":[[145,7],[392,7]]}}}],["includehead",{"_index":539,"t":{"2511":{"position":[[368,14]]},"2515":{"position":[[674,15]]}}}],["includequerystr",{"_index":532,"t":{"2511":{"position":[[121,18]]},"2515":{"position":[[564,19]]}}}],["index",{"_index":723,"t":{"2557":{"position":[[727,5]]}}}],["inform",{"_index":377,"t":{"2491":{"position":[[607,11]]},"2523":{"position":[[646,11]]},"2529":{"position":[[120,11]]},"2537":{"position":[[1029,11]]}}}],["initi",{"_index":692,"t":{"2547":{"position":[[207,8]]}}}],["inittrac",{"_index":609,"t":{"2527":{"position":[[570,12],[1042,12]]}}}],["input",{"_index":534,"t":{"2511":{"position":[[169,5],[411,5],[505,5]]},"2515":{"position":[[78,6]]}}}],["input.method",{"_index":551,"t":{"2515":{"position":[[432,12]]}}}],["inputcreationfunc",{"_index":541,"t":{"2511":{"position":[[454,17]]},"2513":{"position":[[5,17]]}}}],["inputcreationmethod",{"_index":540,"t":{"2511":{"position":[[434,19]]},"2515":{"position":[[717,20]]}}}],["instal",{"_index":354,"t":{"2487":{"position":[[40,7]]},"2529":{"position":[[193,10]]}}}],["instanc",{"_index":233,"t":{"2471":{"position":[[24,8]]}}}],["instead",{"_index":249,"t":{"2471":{"position":[[364,7]]}}}],["instruct",{"_index":651,"t":{"2529":{"position":[[149,12]]}}}],["instrument",{"_index":648,"t":{"2529":{"position":[[39,16]]}}}],["int",{"_index":190,"t":{"2457":{"position":[[347,3]]},"2511":{"position":[[213,3]]},"2523":{"position":[[416,4]]},"2557":{"position":[[742,3]]}}}],["interfac",{"_index":129,"t":{"2447":{"position":[[512,10]]},"2491":{"position":[[371,11]]},"2503":{"position":[[1036,13]]}}}],["intern",{"_index":508,"t":{"2503":{"position":[[585,8]]}}}],["invalid",{"_index":344,"t":{"2485":{"position":[[128,7]]},"2491":{"position":[[318,7],[337,7]]},"2531":{"position":[[137,7]]},"2537":{"position":[[315,7],[334,7]]}}}],["io.read",{"_index":531,"t":{"2511":{"position":[[86,9]]}}}],["issu",{"_index":500,"t":{"2503":{"position":[[238,6]]}}}],["iswebsocketupgrad",{"_index":705,"t":{"2557":{"position":[[177,18]]}}}],["it'",{"_index":223,"t":{"2469":{"position":[[320,4]]},"2567":{"position":[[293,4]]}}}],["itself",{"_index":246,"t":{"2471":{"position":[[286,6]]}}}],["john",{"_index":417,"t":{"2493":{"position":[[577,6],[705,5]]},"2495":{"position":[[506,4]]},"2497":{"position":[[1107,6],[1235,5]]},"2515":{"position":[[144,6]]}}}],["json",{"_index":338,"t":{"2485":{"position":[[14,4]]},"2491":{"position":[[1200,4]]},"2501":{"position":[[116,4]]}}}],["jwk",{"_index":399,"t":{"2491":{"position":[[1213,5]]},"2501":{"position":[[129,5]]}}}],["jwkseturl",{"_index":396,"t":{"2491":{"position":[[1162,10]]},"2501":{"position":[[70,10]]}}}],["jwt",{"_index":10,"t":{"2423":{"position":[[51,3]]},"2485":{"position":[[0,3],[29,5]]},"2491":{"position":[[356,3],[1245,5]]},"2493":{"position":[[260,3]]},"2497":{"position":[[761,3]]},"2501":{"position":[[33,3]]},"2503":{"position":[[1166,3]]}}}],["jwt.claim",{"_index":379,"t":{"2491":{"position":[[662,9]]}}}],["jwt.keyfunc",{"_index":393,"t":{"2491":{"position":[[1046,11]]},"2503":{"position":[[996,11]]}}}],["jwt.mapclaim",{"_index":382,"t":{"2491":{"position":[[730,15]]},"2493":{"position":[[682,14]]},"2497":{"position":[[1212,14]]}}}],["jwt.newwithclaims(jwt.signingmethodhs256",{"_index":425,"t":{"2493":{"position":[[805,41]]}}}],["jwt.newwithclaims(jwt.signingmethodrs256",{"_index":481,"t":{"2497":{"position":[[1335,41]]}}}],["jwt.token",{"_index":513,"t":{"2503":{"position":[[1024,11]]}}}],["jwt/jwt/v5",{"_index":358,"t":{"2487":{"position":[[168,10]]},"2493":{"position":[[119,11]]},"2497":{"position":[[111,11]]},"2503":{"position":[[789,11]]}}}],["jwtalg",{"_index":478,"t":{"2497":{"position":[[844,7]]}}}],["jwtkeyfunc",{"_index":395,"t":{"2491":{"position":[[1151,10]]}}}],["jwtware",{"_index":402,"t":{"2493":{"position":[[59,7]]},"2497":{"position":[[123,7]]},"2503":{"position":[[729,7]]}}}],["jwtware.config",{"_index":360,"t":{"2489":{"position":[[19,18]]}}}],["jwtware.hs256",{"_index":516,"t":{"2503":{"position":[[1115,13]]}}}],["jwtware.new(config",{"_index":359,"t":{"2489":{"position":[[0,18]]}}}],["jwtware.rs256",{"_index":479,"t":{"2497":{"position":[[852,14]]}}}],["jwtware.signingkey",{"_index":477,"t":{"2497":{"position":[[824,19]]}}}],["jwtware.signingkey{key",{"_index":407,"t":{"2493":{"position":[[323,23]]}}}],["keep",{"_index":254,"t":{"2471":{"position":[[460,5],[511,4]]}}}],["key",{"_index":177,"t":{"2457":{"position":[[78,3]]},"2491":{"position":[[391,3],[514,4],[589,3],[1123,3],[1209,3]]},"2497":{"position":[[290,3],[305,3],[359,3],[494,3],[867,4]]},"2501":{"position":[[97,4],[125,3]]},"2503":{"position":[[65,3],[182,4],[427,4],[666,4],[1258,3]]},"2537":{"position":[[615,3],[732,3],[876,3],[1011,3]]}}}],["keyfunc",{"_index":392,"t":{"2491":{"position":[[1031,7],[1058,7]]},"2503":{"position":[[0,7],[202,7],[287,7],[474,8],[872,8]]}}}],["kid",{"_index":373,"t":{"2491":{"position":[[542,3]]}}}],["kind",{"_index":144,"t":{"2447":{"position":[[805,4]]}}}],["lang",{"_index":152,"t":{"2447":{"position":[[930,5]]}}}],["langhandl",{"_index":141,"t":{"2447":{"position":[[729,11]]}}}],["languag",{"_index":120,"t":{"2447":{"position":[[237,9],[433,8],[813,8],[902,8]]}}}],["language.chines",{"_index":158,"t":{"2449":{"position":[[355,17]]}}}],["language.english",{"_index":123,"t":{"2447":{"position":[[303,17],[448,16]]},"2449":{"position":[[319,18]]}}}],["language.tag",{"_index":118,"t":{"2447":{"position":[[206,14],[399,12]]}}}],["language.tag{language.chines",{"_index":122,"t":{"2447":{"position":[[270,32]]},"2449":{"position":[[286,32]]}}}],["length",{"_index":369,"t":{"2491":{"position":[[450,6]]}}}],["level",{"_index":319,"t":{"2481":{"position":[[372,6],[411,7]]},"2567":{"position":[[559,6],[598,7]]}}}],["licens",{"_index":173,"t":{"2457":{"position":[[34,7],[70,7]]},"2459":{"position":[[231,8]]}}}],["lifetim",{"_index":243,"t":{"2471":{"position":[[191,9]]}}}],["load",{"_index":521,"t":{"2503":{"position":[[1242,7]]}}}],["loader",{"_index":127,"t":{"2447":{"position":[[465,6],[472,6],[505,6]]}}}],["loaderfunc(os.readfil",{"_index":136,"t":{"2447":{"position":[[610,23]]}}}],["local",{"_index":673,"t":{"2537":{"position":[[677,5]]},"2539":{"position":[[243,5]]},"2553":{"position":[[77,7]]}}}],["localhost:3000/restrict",{"_index":447,"t":{"2495":{"position":[[330,25]]}}}],["log",{"_index":261,"t":{"2471":{"position":[[634,5]]},"2475":{"position":[[4,7]]},"2481":{"position":[[516,7]]},"2483":{"position":[[22,5]]},"2497":{"position":[[49,5]]},"2527":{"position":[[41,5]]},"2529":{"position":[[461,5],[482,4]]},"2557":{"position":[[22,5]]},"2561":{"position":[[8,7]]},"2567":{"position":[[703,7]]}}}],["log.fatal(app.listen(\":3000",{"_index":299,"t":{"2471":{"position":[[1897,30]]},"2483":{"position":[[321,30]]},"2527":{"position":[[1004,30]]},"2557":{"position":[[973,30]]}}}],["log.fatal(err",{"_index":626,"t":{"2527":{"position":[[1152,14]]}}}],["log.fatalf(\"rsa.generatekey",{"_index":475,"t":{"2497":{"position":[[626,28]]}}}],["log.printf(\"error",{"_index":612,"t":{"2527":{"position":[[656,17]]}}}],["log.printf(\"recv",{"_index":729,"t":{"2557":{"position":[[857,17]]}}}],["log.printf(\"token.signedstr",{"_index":483,"t":{"2497":{"position":[[1493,31]]}}}],["log.println(\"read",{"_index":727,"t":{"2557":{"position":[[823,20]]}}}],["log.println(\"writ",{"_index":732,"t":{"2557":{"position":[[932,21]]}}}],["log.println(c.cookies(\"sess",{"_index":720,"t":{"2557":{"position":[[599,33]]}}}],["log.println(c.locals(\"allow",{"_index":716,"t":{"2557":{"position":[[490,32]]}}}],["log.println(c.params(\"id",{"_index":717,"t":{"2557":{"position":[[531,27]]}}}],["log.println(c.query(\"v",{"_index":718,"t":{"2557":{"position":[[566,25]]}}}],["logger",{"_index":307,"t":{"2481":{"position":[[120,6],[154,7]]},"2483":{"position":[[149,7],[220,7],[228,7]]},"2567":{"position":[[120,6],[162,7],[282,7],[319,6],[343,6]]},"2569":{"position":[[153,6],[260,7],[268,8]]}}}],["logger.fatal().err(err).msg(\"fib",{"_index":755,"t":{"2569":{"position":[[406,34]]}}}],["login",{"_index":403,"t":{"2493":{"position":[[169,5],[200,6]]},"2495":{"position":[[0,5]]},"2497":{"position":[[670,5],[701,6]]}}}],["login(c",{"_index":412,"t":{"2493":{"position":[[453,7]]},"2497":{"position":[[983,7]]}}}],["look",{"_index":54,"t":{"2431":{"position":[[305,4]]}}}],["lookup",{"_index":52,"t":{"2431":{"position":[[274,6]]},"2435":{"position":[[349,7]]},"2437":{"position":[[349,7]]},"2439":{"position":[[349,7]]}}}],["main",{"_index":65,"t":{"2435":{"position":[[8,4],[166,6]]},"2437":{"position":[[8,4],[166,6]]},"2439":{"position":[[8,4],[166,6]]},"2449":{"position":[[8,4],[167,6]]},"2459":{"position":[[8,4],[102,6]]},"2461":{"position":[[8,4],[145,6]]},"2471":{"position":[[614,4],[787,6]]},"2483":{"position":[[8,4],[121,6]]},"2493":{"position":[[8,4],[138,6]]},"2497":{"position":[[8,4],[417,6]]},"2503":{"position":[[679,4],[808,6]]},"2515":{"position":[[250,4],[339,6]]},"2527":{"position":[[8,4],[555,6]]},"2557":{"position":[[8,4],[104,6]]},"2569":{"position":[[8,4],[125,6]]}}}],["make",{"_index":239,"t":{"2471":{"position":[[135,5]]}}}],["map",{"_index":372,"t":{"2491":{"position":[[499,3]]}}}],["map[string]interfac",{"_index":371,"t":{"2491":{"position":[[476,22]]},"2511":{"position":[[553,24]]},"2513":{"position":[[42,24]]},"2515":{"position":[[760,24],[801,23]]}}}],["map[string]str",{"_index":166,"t":{"2449":{"position":[[639,18]]}}}],["maybeyouneedit",{"_index":285,"t":{"2471":{"position":[[1455,17]]}}}],["messag",{"_index":315,"t":{"2481":{"position":[[276,8],[310,9]]},"2567":{"position":[[463,8],[497,9]]}}}],["messageid",{"_index":163,"t":{"2449":{"position":[[595,10]]}}}],["meter",{"_index":572,"t":{"2523":{"position":[[335,5],[388,5]]}}}],["meterprovid",{"_index":570,"t":{"2523":{"position":[[284,13]]}}}],["method",{"_index":95,"t":{"2437":{"position":[[452,6]]},"2471":{"position":[[264,6]]},"2481":{"position":[[259,9]]},"2503":{"position":[[1087,6]]},"2515":{"position":[[87,9],[825,9]]},"2553":{"position":[[64,7]]},"2567":{"position":[[437,9]]}}}],["method=%v",{"_index":518,"t":{"2503":{"position":[[1178,11]]}}}],["metrics/span",{"_index":577,"t":{"2523":{"position":[[492,13],[822,13]]}}}],["middlewar",{"_index":3,"t":{"2421":{"position":[[27,11]]},"2425":{"position":[[7,10]]},"2431":{"position":[[208,10]]},"2443":{"position":[[5,10]]},"2447":{"position":[[87,10]]},"2465":{"position":[[5,10]]},"2469":{"position":[[136,10],[300,10]]},"2471":{"position":[[319,10],[563,10]]},"2477":{"position":[[5,10]]},"2481":{"position":[[86,10],[665,11]]},"2485":{"position":[[40,11]]},"2487":{"position":[[5,10]]},"2491":{"position":[[90,10]]},"2493":{"position":[[264,10]]},"2497":{"position":[[765,10]]},"2515":{"position":[[10,10]]},"2519":{"position":[[5,10]]},"2523":{"position":[[92,10]]},"2531":{"position":[[41,11]]},"2533":{"position":[[5,10]]},"2537":{"position":[[82,10],[652,10],[798,10],[941,10]]},"2539":{"position":[[16,11]]},"2541":{"position":[[8,10],[34,10]]},"2547":{"position":[[11,10]]},"2559":{"position":[[67,11]]},"2563":{"position":[[5,10]]},"2567":{"position":[[86,10],[852,11]]}}}],["mind",{"_index":258,"t":{"2471":{"position":[[519,4]]}}}],["miss",{"_index":346,"t":{"2485":{"position":[[186,7]]},"2531":{"position":[[195,7]]}}}],["model",{"_index":38,"t":{"2431":{"position":[[55,5]]}}}],["model.conf",{"_index":41,"t":{"2431":{"position":[[71,14]]}}}],["modelfilepath",{"_index":36,"t":{"2431":{"position":[[34,13],[244,13]]},"2435":{"position":[[229,14]]},"2437":{"position":[[229,14]]},"2439":{"position":[[229,14]]}}}],["modul",{"_index":548,"t":{"2515":{"position":[[367,6]]}}}],["move",{"_index":221,"t":{"2469":{"position":[[255,6]]}}}],["msg",{"_index":725,"t":{"2557":{"position":[[746,3],[782,4],[880,4],[913,5]]}}}],["mt",{"_index":724,"t":{"2557":{"position":[[739,2],[778,3]]}}}],["mycustomapi",{"_index":199,"t":{"2459":{"position":[[293,14]]}}}],["name",{"_index":167,"t":{"2449":{"position":[[658,7]]},"2457":{"position":[[122,4]]},"2493":{"position":[[697,7],[1251,4],[1316,5]]},"2497":{"position":[[1227,7],[1817,4],[1882,5]]},"2515":{"position":[[136,7]]},"2523":{"position":[[979,4]]},"2527":{"position":[[917,4],[988,5],[994,6]]}}}],["need",{"_index":684,"t":{"2539":{"position":[[397,6]]}}}],["net.host.port",{"_index":575,"t":{"2523":{"position":[[465,13]]}}}],["never",{"_index":460,"t":{"2497":{"position":[[339,5]]}}}],["new",{"_index":175,"t":{"2457":{"position":[[60,3],[100,3],[165,3],[276,3]]},"2497":{"position":[[475,3]]}}}],["new(config",{"_index":688,"t":{"2545":{"position":[[5,10]]}}}],["newrel",{"_index":11,"t":{"2423":{"position":[[55,8]]},"2451":{"position":[[0,8]]},"2457":{"position":[[373,8]]}}}],["newrelic.configappname(\"mycustomapi",{"_index":205,"t":{"2461":{"position":[[199,38]]}}}],["newrelic.configenabled(tru",{"_index":207,"t":{"2461":{"position":[[306,29]]}}}],["newrelic.configlicense(\"ffffffffffffffffffffffffffffffffffffffff",{"_index":206,"t":{"2461":{"position":[[238,67]]}}}],["newrelic.newappl",{"_index":204,"t":{"2461":{"position":[[174,24]]}}}],["newrelicapp",{"_index":203,"t":{"2461":{"position":[[154,12],[471,11]]}}}],["next",{"_index":106,"t":{"2447":{"position":[[34,4]]},"2481":{"position":[[34,4]]},"2485":{"position":[[110,4]]},"2523":{"position":[[34,4]]},"2531":{"position":[[119,4]]},"2537":{"position":[[34,4]]},"2559":{"position":[[177,5]]},"2567":{"position":[[34,4]]}}}],["nil",{"_index":112,"t":{"2447":{"position":[[118,3]]},"2457":{"position":[[290,3]]},"2471":{"position":[[940,3],[1413,3],[1665,3]]},"2473":{"position":[[155,3]]},"2481":{"position":[[116,3],[638,4],[753,3]]},"2491":{"position":[[101,3],[214,3],[460,3],[559,3],[1251,3]]},"2493":{"position":[[963,3]]},"2497":{"position":[[620,3],[1487,3]]},"2503":{"position":[[1138,4],[1333,3]]},"2515":{"position":[[872,3]]},"2523":{"position":[[142,3],[243,3],[371,3]]},"2527":{"position":[[650,3],[1146,3]]},"2537":{"position":[[93,3],[584,3],[691,3],[838,3],[981,3]]},"2557":{"position":[[817,3],[926,3]]},"2567":{"position":[[116,3],[357,3],[825,4],[940,3]]},"2569":{"position":[[400,3]]}}}],["non",{"_index":328,"t":{"2481":{"position":[[634,3]]},"2567":{"position":[[821,3]]}}}],["none",{"_index":583,"t":{"2523":{"position":[[684,4]]}}}],["note",{"_index":469,"t":{"2497":{"position":[[520,4]]},"2505":{"position":[[37,5]]}}}],["obvious",{"_index":453,"t":{"2497":{"position":[[175,10]]}}}],["ok",{"_index":272,"t":{"2471":{"position":[[952,2],[1017,2]]},"2473":{"position":[[167,2],[232,2]]}}}],["on",{"_index":504,"t":{"2503":{"position":[[372,3]]},"2523":{"position":[[711,4]]},"2529":{"position":[[365,3]]}}}],["opa",{"_index":542,"t":{"2511":{"position":[[515,3]]},"2515":{"position":[[0,3]]}}}],["opafiber.config",{"_index":527,"t":{"2509":{"position":[[20,16]]},"2515":{"position":[[465,16]]}}}],["opafiber.new(config",{"_index":526,"t":{"2509":{"position":[[0,19]]}}}],["open",{"_index":12,"t":{"2423":{"position":[[64,4]]},"2505":{"position":[[0,4]]}}}],["opentelemetri",{"_index":16,"t":{"2423":{"position":[[92,15]]},"2517":{"position":[[0,13],[49,13]]}}}],["option",{"_index":225,"t":{"2469":{"position":[[350,6]]},"2503":{"position":[[389,7]]},"2521":{"position":[[26,10]]},"2537":{"position":[[438,9]]}}}],["order",{"_index":506,"t":{"2503":{"position":[[436,5]]}}}],["origin",{"_index":274,"t":{"2471":{"position":[[1048,8]]},"2473":{"position":[[263,8]]}}}],["os.readfil",{"_index":134,"t":{"2447":{"position":[[575,11]]}}}],["otel.settextmappropagator(propagation.newcompositetextmappropagator(propagation.tracecontext",{"_index":636,"t":{"2527":{"position":[[1430,95]]}}}],["otel.settracerprovider(tp",{"_index":635,"t":{"2527":{"position":[[1403,26]]}}}],["otel.tracer(\"fib",{"_index":606,"t":{"2527":{"position":[[522,18]]}}}],["otelfib",{"_index":15,"t":{"2423":{"position":[[82,9]]},"2527":{"position":[[1751,10]]}}}],["otelfiber.middleware(opt",{"_index":563,"t":{"2521":{"position":[[0,25]]}}}],["otelmetric.meterprovid",{"_index":571,"t":{"2523":{"position":[[298,24]]}}}],["oteltrac",{"_index":604,"t":{"2527":{"position":[[464,9]]}}}],["oteltrace.tracerprovid",{"_index":567,"t":{"2523":{"position":[[161,24]]}}}],["oteltrace.withattributes(attribute.string(\"id",{"_index":642,"t":{"2527":{"position":[[1656,47]]}}}],["oyzasaauhc2w3rewaxat_z2fd3bn4awtgey",{"_index":445,"t":{"2495":{"position":[[207,36],[452,36]]}}}],["packag",{"_index":64,"t":{"2435":{"position":[[0,7]]},"2437":{"position":[[0,7]]},"2439":{"position":[[0,7]]},"2449":{"position":[[0,7]]},"2459":{"position":[[0,7]]},"2461":{"position":[[0,7]]},"2471":{"position":[[606,7]]},"2483":{"position":[[0,7]]},"2493":{"position":[[0,7]]},"2497":{"position":[[0,7]]},"2503":{"position":[[671,7]]},"2515":{"position":[[242,7],[379,7]]},"2527":{"position":[[0,7]]},"2547":{"position":[[22,7]]},"2557":{"position":[[0,7]]},"2569":{"position":[[0,7]]}}}],["pair",{"_index":458,"t":{"2497":{"position":[[309,4],[498,4]]}}}],["panic(\"i",{"_index":288,"t":{"2471":{"position":[[1556,8]]}}}],["panick",{"_index":275,"t":{"2471":{"position":[[1071,8]]},"2473":{"position":[[286,8]]}}}],["param",{"_index":701,"t":{"2553":{"position":[[85,7]]}}}],["paramet",{"_index":151,"t":{"2447":{"position":[[920,9]]}}}],["pars",{"_index":400,"t":{"2491":{"position":[[1239,5]]}}}],["part",{"_index":689,"t":{"2547":{"position":[[38,4]]}}}],["parti",{"_index":2,"t":{"2421":{"position":[[21,5]]},"2503":{"position":[[260,6]]}}}],["paseto",{"_index":17,"t":{"2423":{"position":[[108,6]]},"2531":{"position":[[0,6],[27,8]]},"2537":{"position":[[353,6]]},"2539":{"position":[[179,6]]}}}],["pasetoware.config",{"_index":665,"t":{"2535":{"position":[[22,21]]}}}],["pasetoware.createtoken",{"_index":681,"t":{"2539":{"position":[[94,23]]}}}],["pasetoware.new(config",{"_index":664,"t":{"2535":{"position":[[0,21]]}}}],["paseware.config",{"_index":685,"t":{"2539":{"position":[[440,16]]}}}],["pass",{"_index":414,"t":{"2493":{"position":[[509,4],[587,4]]},"2497":{"position":[[1039,4],[1117,4]]},"2539":{"position":[[193,7],[274,7]]}}}],["password",{"_index":440,"t":{"2495":{"position":[[25,8]]}}}],["path",{"_index":40,"t":{"2431":{"position":[[66,4]]},"2437":{"position":[[463,4]]},"2447":{"position":[[163,5]]},"2515":{"position":[[104,7],[849,7]]},"2551":{"position":[[56,4]]},"2559":{"position":[[120,5]]}}}],["path/to/rbac_model.conf",{"_index":77,"t":{"2435":{"position":[[244,26]]},"2437":{"position":[[244,26]]},"2439":{"position":[[244,26]]}}}],["pathraw",{"_index":590,"t":{"2523":{"position":[[1020,7]]}}}],["payload",{"_index":660,"t":{"2531":{"position":[[82,7]]},"2537":{"position":[[420,7],[456,7]]}}}],["payloadvalid",{"_index":666,"t":{"2537":{"position":[[369,16]]}}}],["permiss",{"_index":94,"t":{"2437":{"position":[[436,10]]}}}],["persist.adapt",{"_index":43,"t":{"2431":{"position":[[100,15]]}}}],["pleas",{"_index":591,"t":{"2525":{"position":[[0,6]]},"2559":{"position":[[79,6]]}}}],["polici",{"_index":13,"t":{"2423":{"position":[[69,6]]},"2431":{"position":[[137,8]]},"2505":{"position":[[5,6]]},"2511":{"position":[[112,6],[183,6],[249,6],[343,6],[425,6]]},"2515":{"position":[[61,6]]}}}],["policy.csv",{"_index":45,"t":{"2431":{"position":[[146,12]]}}}],["policyadapt",{"_index":42,"t":{"2431":{"position":[[86,13],[260,13]]},"2435":{"position":[[271,14]]},"2437":{"position":[[271,14]]},"2439":{"position":[[271,14]]}}}],["port",{"_index":574,"t":{"2523":{"position":[[411,4]]}}}],["possibl",{"_index":693,"t":{"2547":{"position":[[258,14]]}}}],["preced",{"_index":507,"t":{"2503":{"position":[[445,10]]}}}],["present",{"_index":672,"t":{"2537":{"position":[[640,7],[759,7],[905,7]]}}}],["privat",{"_index":457,"t":{"2497":{"position":[[282,7],[351,7]]}}}],["private/publ",{"_index":466,"t":{"2497":{"position":[[479,14]]}}}],["privatekey",{"_index":463,"t":{"2497":{"position":[[383,10],[565,11]]},"2537":{"position":[[695,10],[925,11]]},"2539":{"position":[[298,10]]}}}],["privatekey.publ",{"_index":480,"t":{"2497":{"position":[[872,20]]}}}],["proceed",{"_index":247,"t":{"2471":{"position":[[308,10]]}}}],["process",{"_index":121,"t":{"2447":{"position":[[259,10]]}}}],["product",{"_index":456,"t":{"2497":{"position":[[233,11],[251,11]]}}}],["propag",{"_index":580,"t":{"2523":{"position":[[560,11],[612,11]]}}}],["propagation.baggag",{"_index":637,"t":{"2527":{"position":[[1526,23]]}}}],["propagation.textmappropag",{"_index":581,"t":{"2523":{"position":[[572,29]]}}}],["proper",{"_index":499,"t":{"2503":{"position":[[175,6],[659,6]]}}}],["properti",{"_index":32,"t":{"2431":{"position":[[0,8]]},"2447":{"position":[[0,8]]},"2457":{"position":[[0,8]]},"2469":{"position":[[0,8]]},"2481":{"position":[[0,8]]},"2491":{"position":[[0,8]]},"2511":{"position":[[0,8]]},"2523":{"position":[[0,8]]},"2537":{"position":[[0,8]]},"2567":{"position":[[0,8]]}}}],["protocol",{"_index":707,"t":{"2557":{"position":[[261,9]]}}}],["provid",{"_index":132,"t":{"2447":{"position":[[562,7]]},"2471":{"position":[[1792,8]]},"2503":{"position":[[298,9],[400,7],[561,9]]},"2511":{"position":[[497,7]]},"2523":{"position":[[205,8],[267,8],[341,8],[394,8]]},"2527":{"position":[[695,9]]},"2537":{"position":[[574,9]]},"2539":{"position":[[407,7]]}}}],["public",{"_index":300,"t":{"2473":{"position":[[45,6]]},"2491":{"position":[[1116,6]]},"2497":{"position":[[298,6]]},"2501":{"position":[[90,6]]},"2503":{"position":[[58,6]]},"2537":{"position":[[823,6],[869,6],[966,6]]},"2539":{"position":[[322,6]]}}}],["publickey",{"_index":676,"t":{"2537":{"position":[[783,10],[842,9]]},"2539":{"position":[[284,9]]}}}],["quer",{"_index":565,"t":{"2523":{"position":[[137,4]]}}}],["queri",{"_index":150,"t":{"2447":{"position":[[914,5]]},"2471":{"position":[[1810,5]]},"2511":{"position":[[67,5],[153,5]]},"2515":{"position":[[125,8]]},"2553":{"position":[[93,5]]}}}],["rand.read",{"_index":472,"t":{"2497":{"position":[[539,11]]}}}],["read",{"_index":131,"t":{"2447":{"position":[[544,4]]}}}],["readabl",{"_index":333,"t":{"2481":{"position":[[735,8]]},"2567":{"position":[[922,8]]}}}],["recov",{"_index":217,"t":{"2469":{"position":[[128,7],[292,7]]},"2471":{"position":[[1831,9]]}}}],["recoveri",{"_index":215,"t":{"2469":{"position":[[102,9]]}}}],["refer",{"_index":592,"t":{"2525":{"position":[[7,5]]}}}],["registri",{"_index":561,"t":{"2517":{"position":[[63,9]]}}}],["rego",{"_index":529,"t":{"2511":{"position":[[62,4],[107,4],[178,4],[420,4]]},"2523":{"position":[[132,4]]}}}],["regopolici",{"_index":530,"t":{"2511":{"position":[[75,10]]},"2515":{"position":[[521,11]]}}}],["regoqueri",{"_index":528,"t":{"2511":{"position":[[34,9]]},"2515":{"position":[[482,10]]}}}],["relic",{"_index":176,"t":{"2457":{"position":[[64,5],[104,5],[169,5],[280,5]]}}}],["repan",{"_index":212,"t":{"2469":{"position":[[34,7],[47,7],[88,7]]},"2471":{"position":[[1271,8]]}}}],["replac",{"_index":748,"t":{"2567":{"position":[[331,7]]}}}],["repo",{"_index":462,"t":{"2497":{"position":[[377,5]]}}}],["report",{"_index":573,"t":{"2523":{"position":[[361,9]]}}}],["repositori",{"_index":0,"t":{"2421":{"position":[[0,10]]}}}],["request",{"_index":147,"t":{"2447":{"position":[[880,7]]},"2469":{"position":[[240,7],[436,9]]},"2471":{"position":[[501,9]]},"2485":{"position":[[223,8]]},"2495":{"position":[[246,7],[309,7]]},"2511":{"position":[[263,7],[357,7]]},"2523":{"position":[[672,8],[926,7]]},"2529":{"position":[[374,7]]},"2537":{"position":[[1187,7]]},"2557":{"position":[[226,9]]}}}],["request'",{"_index":237,"t":{"2471":{"position":[[110,9],[181,9]]}}}],["requir",{"_index":174,"t":{"2457":{"position":[[49,8]]},"2503":{"position":[[511,8]]},"2505":{"position":[[43,8]]},"2511":{"position":[[51,8],[96,8]]},"2523":{"position":[[506,9]]}}}],["resbodi",{"_index":331,"t":{"2481":{"position":[[677,7],[744,8]]},"2567":{"position":[[864,7],[931,8]]}}}],["resourc",{"_index":446,"t":{"2495":{"position":[[267,8]]}}}],["resource.newwithattribut",{"_index":631,"t":{"2527":{"position":[[1305,27]]}}}],["respons",{"_index":60,"t":{"2431":{"position":[[372,8],[403,9],[459,8],[487,9]]},"2469":{"position":[[279,9]]},"2481":{"position":[[301,8],[402,8],[608,8]]},"2493":{"position":[[896,9]]},"2495":{"position":[[116,8],[489,8]]},"2497":{"position":[[1426,9]]},"2511":{"position":[[309,8]]},"2567":{"position":[[488,8],[589,8],[795,8]]}}}],["rest",{"_index":242,"t":{"2471":{"position":[[169,4]]}}}],["restrict",{"_index":409,"t":{"2493":{"position":[[373,10],[414,11]]},"2495":{"position":[[256,10]]},"2497":{"position":[[903,10],[944,11]]}}}],["restricted(c",{"_index":434,"t":{"2493":{"position":[[1142,12]]},"2497":{"position":[[1708,12]]}}}],["result",{"_index":682,"t":{"2539":{"position":[[230,7],[309,7]]}}}],["retriev",{"_index":146,"t":{"2447":{"position":[[861,9]]},"2495":{"position":[[37,8]]}}}],["return",{"_index":110,"t":{"2447":{"position":[[103,8],[424,8]]},"2449":{"position":[[419,6],[526,6]]},"2459":{"position":[[172,6]]},"2461":{"position":[[399,6]]},"2471":{"position":[[1152,6],[1475,6],[1858,6]]},"2473":{"position":[[325,6]]},"2481":{"position":[[102,8],[627,6]]},"2483":{"position":[[281,6]]},"2485":{"position":[[4,7],[146,7],[204,7]]},"2493":{"position":[[603,6],[969,6],[1024,6],[1101,6],[1283,6]]},"2497":{"position":[[1133,6],[1535,6],[1590,6],[1667,6],[1849,6]]},"2503":{"position":[[944,6],[1010,6],[1131,6],[1306,6]]},"2511":{"position":[[237,6],[331,6]]},"2515":{"position":[[794,6],[950,6]]},"2523":{"position":[[108,8],[942,8],[1002,7]]},"2527":{"position":[[819,6],[954,6],[1550,6],[1744,6],[1772,6]]},"2531":{"position":[[7,7],[155,7],[213,7]]},"2539":{"position":[[167,7],[467,6]]},"2557":{"position":[[196,7],[334,6],[352,6]]},"2559":{"position":[[209,6]]},"2567":{"position":[[102,8],[310,8],[814,6]]},"2569":{"position":[[322,6]]}}}],["rfc",{"_index":491,"t":{"2501":{"position":[[170,3]]}}}],["rng",{"_index":471,"t":{"2497":{"position":[[532,3]]}}}],["root:@tcp(127.0.0.1:3306",{"_index":79,"t":{"2435":{"position":[[318,30]]},"2437":{"position":[[318,30]]},"2439":{"position":[[318,30]]}}}],["rootpath",{"_index":113,"t":{"2447":{"position":[[122,8]]},"2449":{"position":[[237,9]]}}}],["rout",{"_index":248,"t":{"2471":{"position":[[334,7]]},"2493":{"position":[[175,5],[226,5],[384,6]]},"2497":{"position":[[676,5],[727,5],[914,6]]},"2523":{"position":[[1014,5]]}}}],["rs256",{"_index":484,"t":{"2499":{"position":[[4,5]]}}}],["rsa.generatekey(rng",{"_index":473,"t":{"2497":{"position":[[583,20]]}}}],["rsa.privatekey",{"_index":464,"t":{"2497":{"position":[[394,15]]}}}],["run",{"_index":468,"t":{"2497":{"position":[[511,4]]},"2529":{"position":[[259,3]]}}}],["s",{"_index":730,"t":{"2557":{"position":[[875,4]]}}}],["safe",{"_index":224,"t":{"2469":{"position":[[325,4]]}}}],["scope.setextra(\"unwantedqueri",{"_index":293,"t":{"2471":{"position":[[1713,31]]}}}],["sdktrace",{"_index":600,"t":{"2527":{"position":[[368,8]]}}}],["sdktrace.newtracerprovid",{"_index":627,"t":{"2527":{"position":[[1175,27]]}}}],["sdktrace.tracerprovid",{"_index":623,"t":{"2527":{"position":[[1055,24]]}}}],["sdktrace.withbatcher(export",{"_index":629,"t":{"2527":{"position":[[1250,31]]}}}],["sdktrace.withresourc",{"_index":630,"t":{"2527":{"position":[[1282,22]]}}}],["sdktrace.withsampler(sdktrace.alwayssampl",{"_index":628,"t":{"2527":{"position":[[1203,46]]}}}],["secret",{"_index":522,"t":{"2503":{"position":[[1297,8]]},"2537":{"position":[[608,6],[725,6]]}}}],["see",{"_index":312,"t":{"2481":{"position":[[224,4]]},"2497":{"position":[[516,3]]},"2501":{"position":[[166,3]]},"2567":{"position":[[402,4]]}}}],["select",{"_index":498,"t":{"2503":{"position":[[161,9],[645,9]]}}}],["semconv",{"_index":602,"t":{"2527":{"position":[[414,7]]}}}],["semconv.schemaurl",{"_index":632,"t":{"2527":{"position":[[1333,18]]}}}],["semconv.servicenamekey.string(\"mi",{"_index":633,"t":{"2527":{"position":[[1352,33]]}}}],["send",{"_index":427,"t":{"2493":{"position":[[885,4]]},"2497":{"position":[[1415,4]]},"2515":{"position":[[21,5]]},"2529":{"position":[[354,5]]}}}],["sentri",{"_index":208,"t":{"2463":{"position":[[0,6]]},"2469":{"position":[[74,6]]}}}],["sentry.captureexcept",{"_index":252,"t":{"2471":{"position":[[409,24]]}}}],["sentry.capturemessag",{"_index":251,"t":{"2471":{"position":[[386,22]]}}}],["sentry.ev",{"_index":267,"t":{"2471":{"position":[[866,14],[905,13]]},"2473":{"position":[[81,14],[120,13]]}}}],["sentry.eventhint",{"_index":269,"t":{"2471":{"position":[[886,18]]},"2473":{"position":[[101,18]]}}}],["sentry.hub",{"_index":234,"t":{"2471":{"position":[[36,11],[529,11]]}}}],["sentry.init(sentry.clientopt",{"_index":263,"t":{"2471":{"position":[[800,33]]},"2473":{"position":[[0,33]]}}}],["sentry.scop",{"_index":292,"t":{"2471":{"position":[[1696,14]]}}}],["separ",{"_index":255,"t":{"2471":{"position":[[470,10]]}}}],["server",{"_index":607,"t":{"2527":{"position":[[541,8]]},"2529":{"position":[[8,6],[60,6],[98,6],[223,6],[309,6],[391,6],[447,6],[493,6]]},"2557":{"position":[[1028,7]]}}}],["servernam",{"_index":584,"t":{"2523":{"position":[[729,10]]}}}],["servic",{"_index":634,"t":{"2527":{"position":[[1386,10]]},"2529":{"position":[[247,8],[346,7],[514,8]]}}}],["set",{"_index":216,"t":{"2469":{"position":[[112,3],[360,3]]},"2481":{"position":[[708,3]]},"2485":{"position":[[72,4]]},"2491":{"position":[[1219,3]]},"2501":{"position":[[135,3]]},"2523":{"position":[[453,7],[780,7]]},"2531":{"position":[[73,4]]},"2567":{"position":[[895,3]]}}}],["shall",{"_index":493,"t":{"2503":{"position":[[106,5]]}}}],["shut",{"_index":613,"t":{"2527":{"position":[[674,8]]},"2529":{"position":[[500,4]]}}}],["sign",{"_index":367,"t":{"2491":{"position":[[383,7],[506,7]]},"2503":{"position":[[139,7],[623,7],[1079,7],[1170,7],[1250,7]]},"2537":{"position":[[739,4]]},"2539":{"position":[[155,4],[329,8]]}}}],["signatur",{"_index":687,"t":{"2543":{"position":[[0,10]]}}}],["signingkey",{"_index":366,"t":{"2491":{"position":[[360,10],[434,11],[464,11]]},"2493":{"position":[[311,11]]},"2497":{"position":[[812,11]]},"2503":{"position":[[308,11],[320,12],[483,11],[499,11],[531,11],[547,10],[1283,10]]}}}],["signingmethod",{"_index":502,"t":{"2503":{"position":[[337,13]]}}}],["size",{"_index":679,"t":{"2537":{"position":[[1140,4]]}}}],["skip",{"_index":109,"t":{"2447":{"position":[[77,4]]},"2469":{"position":[[340,4]]},"2481":{"position":[[76,4],[511,4]]},"2491":{"position":[[85,4]]},"2523":{"position":[[82,4]]},"2537":{"position":[[77,4]]},"2559":{"position":[[105,4]]},"2567":{"position":[[76,4],[698,4]]}}}],["skipuri",{"_index":324,"t":{"2481":{"position":[[493,8]]},"2567":{"position":[[680,8]]}}}],["slice",{"_index":397,"t":{"2491":{"position":[[1184,5]]},"2537":{"position":[[1129,5]]}}}],["somepath",{"_index":546,"t":{"2515":{"position":[[112,12]]}}}],["somequerydatamayb",{"_index":294,"t":{"2471":{"position":[[1745,21]]}}}],["source>:: that is used \"header:Authorization\" AuthScheme string AuthScheme to be used in the Authorization header. The default value (\"Bearer\") will only be used in conjuction with the default TokenLookup value. \"Bearer\" KeyFunc func() jwt.Keyfunc KeyFunc defines a user-defined function that supplies the public key for a token validation. jwtKeyFunc JWKSetURLs []string A slice of unique JSON Web Key (JWK) Set URLs to used to parse JWTs. nil","s":"Config","u":"/contrib/swagger_v1.x.x/jwt/","h":"#config","p":2494},{"i":2503,"t":"package main import ( \"time\" \"github.com/gofiber/fiber/v2\" jwtware \"github.com/gofiber/contrib/jwt\" \"github.com/golang-jwt/jwt/v5\" ) func main() { app := fiber.New() // Login route app.Post(\"/login\", login) // Unauthenticated route app.Get(\"/\", accessible) // JWT Middleware app.Use(jwtware.New(jwtware.Config{ SigningKey: jwtware.SigningKey{Key: []byte(\"secret\")}, })) // Restricted Routes app.Get(\"/restricted\", restricted) app.Listen(\":3000\") } func login(c *fiber.Ctx) error { user := c.FormValue(\"user\") pass := c.FormValue(\"pass\") // Throws Unauthorized error if user != \"john\" || pass != \"doe\" { return c.SendStatus(fiber.StatusUnauthorized) } // Create the Claims claims := jwt.MapClaims{ \"name\": \"John Doe\", \"admin\": true, \"exp\": time.Now().Add(time.Hour * 72).Unix(), } // Create token token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) // Generate encoded token and send it as response. t, err := token.SignedString([]byte(\"secret\")) if err != nil { return c.SendStatus(fiber.StatusInternalServerError) } return c.JSON(fiber.Map{\"token\": t}) } func accessible(c *fiber.Ctx) error { return c.SendString(\"Accessible\") } func restricted(c *fiber.Ctx) error { user := c.Locals(\"user\").(*jwt.Token) claims := user.Claims.(jwt.MapClaims) name := claims[\"name\"].(string) return c.SendString(\"Welcome \" + name) }","s":"HS256 Example","u":"/contrib/swagger_v1.x.x/jwt/","h":"#hs256-example","p":2494},{"i":2505,"t":"Login using username and password to retrieve a token. curl --data \"user=john&pass=doe\" http://localhost:3000/login Response { \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY\" } Request a restricted resource using the token in Authorization request header. curl localhost:3000/restricted -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY\" Response Welcome John Doe","s":"HS256 Test","u":"/contrib/swagger_v1.x.x/jwt/","h":"#hs256-test","p":2494},{"i":2507,"t":"package main import ( \"crypto/rand\" \"crypto/rsa\" \"log\" \"time\" \"github.com/gofiber/fiber/v2\" \"github.com/golang-jwt/jwt/v5\" jwtware \"github.com/gofiber/contrib/jwt\" ) var ( // Obviously, this is just a test example. Do not do this in production. // In production, you would have the private key and public key pair generated // in advance. NEVER add a private key to any GitHub repo. privateKey *rsa.PrivateKey ) func main() { app := fiber.New() // Just as a demo, generate a new private/public key pair on each run. See note above. rng := rand.Reader var err error privateKey, err = rsa.GenerateKey(rng, 2048) if err != nil { log.Fatalf(\"rsa.GenerateKey: %v\", err) } // Login route app.Post(\"/login\", login) // Unauthenticated route app.Get(\"/\", accessible) // JWT Middleware app.Use(jwtware.New(jwtware.Config{ SigningKey: jwtware.SigningKey{ JWTAlg: jwtware.RS256, Key: privateKey.Public(), }, })) // Restricted Routes app.Get(\"/restricted\", restricted) app.Listen(\":3000\") } func login(c *fiber.Ctx) error { user := c.FormValue(\"user\") pass := c.FormValue(\"pass\") // Throws Unauthorized error if user != \"john\" || pass != \"doe\" { return c.SendStatus(fiber.StatusUnauthorized) } // Create the Claims claims := jwt.MapClaims{ \"name\": \"John Doe\", \"admin\": true, \"exp\": time.Now().Add(time.Hour * 72).Unix(), } // Create token token := jwt.NewWithClaims(jwt.SigningMethodRS256, claims) // Generate encoded token and send it as response. t, err := token.SignedString(privateKey) if err != nil { log.Printf(\"token.SignedString: %v\", err) return c.SendStatus(fiber.StatusInternalServerError) } return c.JSON(fiber.Map{\"token\": t}) } func accessible(c *fiber.Ctx) error { return c.SendString(\"Accessible\") } func restricted(c *fiber.Ctx) error { user := c.Locals(\"user\").(*jwt.Token) claims := user.Claims.(jwt.MapClaims) name := claims[\"name\"].(string) return c.SendString(\"Welcome \" + name) }","s":"RS256 Example","u":"/contrib/swagger_v1.x.x/jwt/","h":"#rs256-example","p":2494},{"i":2509,"t":"The RS256 is actually identical to the HS256 test above.","s":"RS256 Test","u":"/contrib/swagger_v1.x.x/jwt/","h":"#rs256-test","p":2494},{"i":2511,"t":"The tests are identical to basic JWT tests above, with exception that JWKSetURLs to valid public keys collection in JSON Web Key (JWK) Set format should be supplied. See RFC 7517.","s":"JWK Set Test","u":"/contrib/swagger_v1.x.x/jwt/","h":"#jwk-set-test","p":2494},{"i":2513,"t":"KeyFunc defines a user-defined function that supplies the public key for a token validation. The function shall take care of verifying the signing algorithm and selecting the proper key. A user-defined KeyFunc can be useful if tokens are issued by an external party. When a user-defined KeyFunc is provided, SigningKey, SigningKeys, and SigningMethod are ignored. This is one of the three options to provide a token validation key. The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey. Required if neither SigningKeys nor SigningKey is provided. Default to an internal implementation verifying the signing algorithm and selecting the proper key. package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" jwtware \"github.com/gofiber/contrib/jwt\" \"github.com/golang-jwt/jwt/v5\" ) func main() { app := fiber.New() app.Use(jwtware.New(jwtware.Config{ KeyFunc: customKeyFunc(), })) app.Get(\"/ok\", func(c *fiber.Ctx) error { return c.SendString(\"OK\") }) } func customKeyFunc() jwt.Keyfunc { return func(t *jwt.Token) (interface{}, error) { // Always check the signing method if t.Method.Alg() != jwtware.HS256 { return nil, fmt.Errorf(\"Unexpected jwt signing method=%v\", t.Header[\"alg\"]) } // TODO custom implementation of loading signing key like from a database signingKey := \"secret\" return []byte(signingKey), nil } }","s":"Custom KeyFunc example","u":"/contrib/swagger_v1.x.x/jwt/","h":"#custom-keyfunc-example","p":2494},{"i":2515,"t":"Open Policy Agent support for Fiber. Note: Requires Go 1.18 and above","s":"Opafiber","u":"/contrib/swagger_v1.x.x/opafiber/","h":"","p":2514},{"i":2517,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/opafiber","s":"Install","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#install","p":2514},{"i":2519,"t":"opafiber.New(config opafiber.Config) fiber.Handler","s":"Signature","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#signature","p":2514},{"i":2521,"t":"Property Type Description Default RegoQuery string Required - Rego query - RegoPolicy io.Reader Required - Rego policy - IncludeQueryString bool Include query string as input to rego policy false DeniedStatusCode int Http status code to return when policy denies request 400 DeniedResponseMessage string Http response body text to return when policy denies request \"\" IncludeHeaders []string Include headers as input to rego policy - InputCreationMethod InputCreationFunc Use your own function to provide input for OPA func defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)","s":"Config","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#config","p":2514},{"i":2523,"t":"type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)","s":"Types","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#types","p":2514},{"i":2525,"t":"OPA Fiber middleware sends the following example data to the policy engine as input: { \"method\": \"GET\", \"path\": \"/somePath\", \"query\": { \"name\": [\"John Doe\"] }, \"headers\": { \"Accept\": \"application/json\", \"Content-Type\": \"application/json\" } } package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/opafiber\" ) func main() { app := fiber.New() module := ` package example.authz default allow := false allow { input.method == \"GET\" } ` cfg := opafiber.Config{ RegoQuery: \"data.example.authz.allow\", RegoPolicy: bytes.NewBufferString(module), IncludeQueryString: true, DeniedStatusCode: fiber.StatusForbidden, DeniedResponseMessage: \"status forbidden\", IncludeHeaders: []string{\"Authorization\"}, InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) { return map[string]interface{}{ \"method\": ctx.Method(), \"path\": ctx.Path(), }, nil }, } app.Use(opafiber.New(cfg)) app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendStatus(200) }) app.Listen(\":8080\") }","s":"Usage","u":"/contrib/swagger_v1.x.x/opafiber/","h":"#usage","p":2514},{"i":2527,"t":"OpenTelemetry support for Fiber. Can be found on OpenTelemetry Registry.","s":"Otelfiber","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"","p":2526},{"i":2529,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/contrib/otelfiber","s":"Install","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#install","p":2526},{"i":2531,"t":"otelfiber.Middleware(opts ...Option) fiber.Handler","s":"Signature","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#signature","p":2526},{"i":2533,"t":"Property Type Description Default Next func(*fiber.Ctx) bool Define a function to skip this middleware when returned trueRequired - Rego quer nil TracerProvider oteltrace.TracerProvider Specifies a tracer provider to use for creating a tracer nil - the global tracer provider is used MeterProvider otelmetric.MeterProvider Specifies a meter provider to use for reporting nil - the global meter provider is used Port *int Specifies the value to use when setting the net.host.port attribute on metrics/spans Required: If not default (80 for http, 443 for https) Propagators propagation.TextMapPropagator Specifies propagators to use for extracting information from the HTTP requests If none are specified, global ones will be used ServerName *string specifies the value to use when setting the http.server_name attribute on metrics/spans - SpanNameFormatter func(*fiber.Ctx) string Takes a function that will be called on every request and the returned string will become the Span Name default formatter returns the route pathRaw","s":"Config","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#config","p":2526},{"i":2535,"t":"Please refer to example","s":"Usage","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#usage","p":2526},{"i":2537,"t":"package main import ( \"context\" \"errors\" \"log\" \"go.opentelemetry.io/otel/sdk/resource\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/otelfiber\" \"go.opentelemetry.io/otel\" \"go.opentelemetry.io/otel/attribute\" stdout \"go.opentelemetry.io/otel/exporters/stdout/stdouttrace\" //\"go.opentelemetry.io/otel/exporters/jaeger\" \"go.opentelemetry.io/otel/propagation\" sdktrace \"go.opentelemetry.io/otel/sdk/trace\" semconv \"go.opentelemetry.io/otel/semconv/v1.4.0\" oteltrace \"go.opentelemetry.io/otel/trace\" ) var tracer = otel.Tracer(\"fiber-server\") func main() { tp := initTracer() defer func() { if err := tp.Shutdown(context.Background()); err != nil { log.Printf(\"Error shutting down tracer provider: %v\", err) } }() app := fiber.New() app.Use(otelfiber.Middleware()) app.Get(\"/error\", func(ctx *fiber.Ctx) error { return errors.New(\"abc\") }) app.Get(\"/users/:id\", func(c *fiber.Ctx) error { id := c.Params(\"id\") name := getUser(c.UserContext(), id) return c.JSON(fiber.Map{\"id\": id, name: name}) }) log.Fatal(app.Listen(\":3000\")) } func initTracer() *sdktrace.TracerProvider { exporter, err := stdout.New(stdout.WithPrettyPrint()) if err != nil { log.Fatal(err) } tp := sdktrace.NewTracerProvider( sdktrace.WithSampler(sdktrace.AlwaysSample()), sdktrace.WithBatcher(exporter), sdktrace.WithResource( resource.NewWithAttributes( semconv.SchemaURL, semconv.ServiceNameKey.String(\"my-service\"), )), ) otel.SetTracerProvider(tp) otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{})) return tp } func getUser(ctx context.Context, id string) string { _, span := tracer.Start(ctx, \"getUser\", oteltrace.WithAttributes(attribute.String(\"id\", id))) defer span.End() if id == \"123\" { return \"otelfiber tester\" } return \"unknown\" }","s":"Example","u":"/contrib/swagger_v1.x.x/otelfiber/","h":"#example","p":2526},{"i":2539,"t":"An HTTP server using gofiber fiber and instrumentation. The server has a /users/:id endpoint. The server generates span information to stdout. These instructions expect you have docker-compose installed. Bring up the fiber-server and fiber-client services to run the example: docker-compose up --detach fiber-server fiber-client The fiber-client service sends just one HTTP request to fiber-server and then exits. View the span generated by fiber-server in the logs: docker-compose logs fiber-server Shut down the services when you are finished with the example: docker-compose down","s":"Example","u":"/contrib/swagger_v1.x.x/otelfiber/example/","h":"","p":2538},{"i":2541,"t":"PASETO returns a Web Token (PASETO) auth middleware. For valid token, it sets the payload data in Ctx.Locals and calls next handler. For invalid token, it returns \"401 - Unauthorized\" error. For missing token, it returns \"400 - BadRequest\" error.","s":"Paseto","u":"/contrib/swagger_v1.x.x/paseto/","h":"","p":2540},{"i":2543,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/paseto go get -u github.com/o1egl/paseto","s":"Install","u":"/contrib/swagger_v1.x.x/paseto/","h":"#install","p":2540},{"i":2545,"t":"pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error","s":"Signature","u":"/contrib/swagger_v1.x.x/paseto/","h":"#signature","p":2540},{"i":2547,"t":"Property Type Description Default Next func(*Ctx) bool Defines a function to skip middleware nil SuccessHandler func(*fiber.Ctx) error SuccessHandler defines a function which is executed for a valid token. c.Next() ErrorHandler func(*fiber.Ctx, error) error ErrorHandler defines a function which is executed for an invalid token. 401 Invalid or expired PASETO Validate PayloadValidator Defines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided. nil SymmetricKey []byte Secret key to encrypt token. If present the middleware will generate local tokens. nil PrivateKey ed25519.PrivateKey Secret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens. nil PublicKey crypto.PublicKey Public key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens. nil ContextKey string Context key to store user information from the token into context. \"auth-token\" TokenLookup [2]string TokenLookup is a string slice with size 2, that is used to extract token from the request [\"header\",\"Authorization\"]","s":"Config","u":"/contrib/swagger_v1.x.x/paseto/","h":"#config","p":2540},{"i":2549,"t":"When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token. Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token. In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.","s":"Instructions","u":"/contrib/swagger_v1.x.x/paseto/","h":"#instructions","p":2540},{"i":2551,"t":"Swagger middleware for Fiber. The middleware handles Swagger UI.","s":"Swagger","u":"/contrib/swagger_v1.x.x/swagger/","h":"","p":2550},{"i":2553,"t":"Signatures Examples","s":"Table of Contents","u":"/contrib/swagger_v1.x.x/swagger/","h":"#table-of-contents","p":2550},{"i":2555,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/contrib/swagger_v1.x.x/swagger/","h":"#signatures","p":2550},{"i":2557,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/swagger\" ) Then create a Fiber app with app := fiber.New(). After you initiate your Fiber app, you can use the following possibilities:","s":"Examples","u":"/contrib/swagger_v1.x.x/swagger/","h":"#examples","p":2550},{"i":2559,"t":"app.Use(swagger.New(cfg))","s":"Default Config","u":"/contrib/swagger_v1.x.x/swagger/","h":"#default-config","p":2550},{"i":2561,"t":"cfg := swagger.Config{ BasePath: \"/\", //swagger ui base path FilePath: \"./docs/swagger.json\", } app.Use(swagger.New(cfg))","s":"Custom Config","u":"/contrib/swagger_v1.x.x/swagger/","h":"#custom-config","p":2550},{"i":2563,"t":"Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.","s":"Websocket","u":"/contrib/swagger_v1.x.x/websocket/","h":"","p":2562},{"i":2565,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/websocket","s":"Install","u":"/contrib/swagger_v1.x.x/websocket/","h":"#install","p":2562},{"i":2567,"t":"package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/websocket\" ) func main() { app := fiber.New() app.Use(\"/ws\", func(c *fiber.Ctx) error { // IsWebSocketUpgrade returns true if the client // requested upgrade to the WebSocket protocol. if websocket.IsWebSocketUpgrade(c) { c.Locals(\"allowed\", true) return c.Next() } return fiber.ErrUpgradeRequired }) app.Get(\"/ws/:id\", websocket.New(func(c *websocket.Conn) { // c.Locals is added to the *websocket.Conn log.Println(c.Locals(\"allowed\")) // true log.Println(c.Params(\"id\")) // 123 log.Println(c.Query(\"v\")) // 1.0 log.Println(c.Cookies(\"session\")) // \"\" // websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index var ( mt int msg []byte err error ) for { if mt, msg, err = c.ReadMessage(); err != nil { log.Println(\"read:\", err) break } log.Printf(\"recv: %s\", msg) if err = c.WriteMessage(mt, msg); err != nil { log.Println(\"write:\", err) break } } })) log.Fatal(app.Listen(\":3000\")) // Access the websocket server: ws://localhost:3000/ws/123?v=1.0 // https://www.websocket.org/echo.html }","s":"Example","u":"/contrib/swagger_v1.x.x/websocket/","h":"#example","p":2562},{"i":2569,"t":"If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path. app := fiber.New() app.Use(cache.New(cache.Config{ Next: func(c *fiber.Ctx) bool { return strings.Contains(c.Route().Path, \"/ws\") }, })) app.Get(\"/ws/:id\", websocket.New(func(c *websocket.Conn) {}))","s":"Note with cache middleware","u":"/contrib/swagger_v1.x.x/websocket/","h":"#note-with-cache-middleware","p":2562}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2421",[0,6.075,1,6.075,2,5.285,3,1.573,4,6.075]],["t/2423",[5,4.069,6,5.189,7,4.513,8,5.189,9,5.189,10,3.061,11,4.069,12,4.513,13,3.471,14,4.513,15,4.513,16,4.513,17,3.736,18,4.069,19,3.736]],["t/2425",[3,1.629,5,4.932,20,2.023]],["t/2427",[21,3.024,22,3.447,23,1.435,24,3.849,25,5.345,26,5.177,27,5.345,28,3.849]],["t/2429",[29,6.29,30,6.29,31,6.29]],["t/2431",[3,0.873,5,2.642,13,2.254,26,2.642,32,1.699,33,1.549,34,1.699,35,1.549,36,3.491,37,2.046,38,3.369,39,2.642,40,2.111,41,3.369,42,3.491,43,3.369,44,2.931,45,3.369,46,5.678,47,3.369,48,2.426,49,2.254,50,1.261,51,1.349,52,2.426,53,3.35,54,3.369,55,2.931,56,3.369,57,2.426,58,3.798,59,1.169,60,3.465,61,3.491,62,4.939]],["t/2433",[26,5.65,39,4.847,63,6.181]],["t/2435",[23,0.812,24,2.179,28,2.179,36,2.179,37,1.277,42,2.179,51,2.178,52,2.179,57,2.179,59,1.08,64,1.177,65,1.815,66,1.177,67,1.895,68,2.372,69,2.372,70,2.372,71,2.372,72,1.01,73,1.089,74,1.132,75,2.372,76,2.372,77,2.372,78,2.372,79,2.372,80,2.252,81,1.596,82,2.372,83,2.179,84,1.603,85,2.632,86,4.481,87,3.025,88,2.998,89,3.025,90,3.025,91,3.025,92,1.895]],["t/2437",[23,0.871,24,2.338,28,2.338,36,2.338,37,1.37,40,2.034,42,2.338,51,2.163,52,2.338,57,2.338,59,0.783,64,1.263,65,1.911,66,1.263,67,2.034,68,2.545,69,2.545,70,2.545,71,2.545,72,1.084,73,1.169,74,1.214,75,2.545,76,2.545,77,2.545,78,2.545,79,2.545,80,1.991,81,1.411,82,2.545,83,2.338,84,1.72,85,2.824,88,2.172,92,2.034,93,2.824,94,3.246,95,1.915,96,3.246]],["t/2439",[23,0.913,24,2.449,28,2.449,36,2.449,37,1.436,42,2.449,51,2.165,52,2.449,57,2.449,59,0.82,64,1.324,65,1.977,66,1.324,67,2.131,68,2.667,69,2.667,70,2.667,71,2.667,72,1.135,73,1.224,74,1.273,75,2.667,76,2.667,77,2.667,78,2.667,79,2.667,80,2.06,81,1.459,82,2.667,83,2.449,84,1.802,88,2.276,92,2.131,97,3.402,98,3.402]],["t/2441",[20,1.988,21,2.609,99,5.376,100,2.609]],["t/2443",[3,1.449,20,1.8,21,2.866,22,3.267,23,1.502,100,2.362,101,3.302,102,4.869]],["t/2445",[103,6.29,104,3.94,105,3.511]],["t/2447",[3,0.679,32,1.323,33,2.251,34,1.323,35,1.851,37,2.317,39,3.839,40,1.643,50,1.506,80,1.107,81,1.464,99,2.282,106,1.464,107,1.323,108,2.132,109,1.464,110,1.248,111,1.323,112,1.021,113,2.282,114,4.896,115,2.623,116,2.282,117,2.282,118,4.024,119,2.282,120,5.49,121,2.623,122,2.282,123,3.501,124,2.623,125,2.623,126,2.282,127,4.896,128,2.282,129,2.057,130,1.548,131,2.623,132,1.464,133,2.623,134,2.623,135,2.623,136,2.623,137,2.623,138,2.623,139,2.623,140,2.623,141,2.623,142,1.643,143,4.024,144,2.623,145,2.282,146,2.282,147,1.323,148,1.755,149,2.282,150,1.755,151,2.623,152,2.623]],["t/2449",[23,0.896,51,2.141,59,1.161,64,1.299,65,1.95,66,1.299,72,1.114,73,1.201,74,1.249,80,1.409,81,1.44,102,2.903,110,1.493,113,2.903,116,2.903,117,2.903,122,2.903,123,2.903,126,2.903,142,2.091,153,3.338,154,3.338,155,3.338,156,3.338,157,3.338,158,3.338,159,1.863,160,3.338,161,3.338,162,3.338,163,3.338,164,3.338,165,3.338,166,3.338,167,1.969,168,3.338,169,3.338]],["t/2451",[11,4.932,20,2.023,100,2.655]],["t/2453",[21,2.98,22,3.397,23,1.603,170,4.684]],["t/2455",[105,3.511,171,6.29,172,4.932]],["t/2457",[11,2.642,20,1.084,32,1.699,33,1.549,34,1.699,35,1.549,37,2.396,50,1.261,51,0.937,59,0.812,73,1.213,80,1.422,81,1.007,107,1.699,112,1.311,167,1.988,173,4.216,174,2.254,175,5.401,176,6.209,177,2.111,178,2.931,179,4.939,180,3.369,181,2.931,182,3.369,183,2.426,184,3.369,185,4.088,186,3.369,187,3.369,188,3.369,189,1.988,190,2.426,191,2.254,192,3.369,193,2.254,194,2.931,195,3.369]],["t/2459",[23,1.09,51,2.135,59,0.979,64,1.581,65,2.238,66,1.581,72,1.356,73,1.462,74,1.52,81,1.215,92,2.545,110,1.26,111,2.048,142,2.545,159,2.267,170,3.185,172,3.185,173,3.534,178,3.534,181,3.534,196,3.185,197,2.925,198,4.062,199,4.062,200,3.534]],["t/2461",[23,1.02,51,2.154,59,0.917,64,1.479,65,2.138,66,1.479,72,1.269,73,1.368,74,1.422,81,1.137,92,2.381,110,1.179,142,2.381,159,2.122,170,2.981,172,2.981,179,3.307,189,2.243,196,2.981,197,2.738,200,3.307,201,3.802,202,3.802,203,5.279,204,3.802,205,3.802,206,3.802,207,3.802]],["t/2463",[20,2.023,100,2.655,208,5.472]],["t/2465",[3,1.364,20,1.694,21,3.142,22,3.424,23,1.413,100,2.222,101,3.107,209,4.58,210,4.58]],["t/2467",[104,3.94,105,3.511,211,6.29]],["t/2469",[3,1.282,32,1.749,33,1.595,34,1.749,35,1.595,50,1.851,51,0.965,60,1.935,107,2.495,109,1.935,111,1.749,147,2.495,183,4.155,191,2.32,208,3.017,212,5.019,213,4.949,214,4.949,215,3.468,216,2.762,217,4.305,218,4.305,219,3.468,220,3.017,221,3.468,222,3.468,223,3.017,224,3.468,225,2.497,226,4.949,227,3.468,228,2.719,229,3.468,230,3.468,231,3.017]],["t/2471",[3,0.709,7,2.382,21,0.687,23,0.437,37,0.687,50,1.024,51,2.139,59,0.855,64,0.633,65,1.109,66,0.633,67,1.019,72,0.543,73,0.586,74,0.609,80,1.496,81,1.06,95,0.96,110,1.099,111,2.097,112,1.379,132,0.908,147,0.82,150,1.088,209,1.415,210,1.415,212,1.415,217,1.415,218,1.415,220,1.415,228,1.276,232,2.738,233,1.627,234,2.738,235,1.627,236,1.627,237,2.738,238,2.372,239,1.627,240,2.382,241,1.627,242,1.627,243,1.627,244,1.832,245,1.627,246,1.627,247,1.627,248,1.172,249,1.627,250,1.415,251,1.627,252,1.627,253,1.172,254,2.738,255,1.627,256,1.019,257,1.627,258,1.627,259,1.627,260,1.415,261,0.82,262,1.627,263,1.415,264,1.415,265,1.415,266,1.415,267,2.382,268,1.415,269,1.415,270,1.415,271,1.172,272,2.382,273,1.415,274,1.415,275,1.415,276,1.627,277,1.627,278,1.627,279,1.627,280,1.627,281,2.738,282,4.158,283,2.738,284,1.627,285,1.627,286,1.276,287,1.627,288,1.627,289,1.627,290,1.627,291,1.627,292,1.627,293,1.627,294,1.627,295,1.627,296,1.627,297,1.627,298,1.627,299,1.172]],["t/2473",[51,2.164,110,1.274,112,1.599,228,3.222,238,2.749,244,2.749,263,3.574,264,4.844,265,3.574,266,3.574,267,4.844,268,3.574,269,3.574,270,3.574,271,2.959,272,4.844,273,3.574,274,3.574,275,3.574,300,2.424,301,4.109]],["t/2475",[20,1.988,100,2.609,261,3.117,302,5.376]],["t/2477",[3,1.384,20,1.719,21,3.024,22,3.447,23,1.435,100,2.256,101,3.153,303,4.649,304,4.649]],["t/2479",[104,3.94,105,3.511,305,6.29]],["t/2481",[3,1.066,32,1.363,33,1.243,34,1.363,35,1.243,37,2.353,48,3.591,50,1.011,59,0.993,60,2.783,61,1.947,72,0.902,80,1.141,81,0.808,95,1.595,106,1.509,107,1.363,108,2.181,109,2.298,110,1.277,111,1.363,112,1.941,130,2.429,191,1.808,193,1.808,216,1.509,261,1.363,302,2.351,306,2.12,307,2.965,308,2.703,309,3.229,310,2.703,311,3.229,312,1.947,313,2.351,314,2.12,315,3.582,316,2.351,317,1.947,318,2.351,319,3.582,320,2.703,321,2.703,322,2.703,323,2.703,324,2.351,325,2.351,326,3.582,327,1.947,328,2.351,329,2.351,330,2.351,331,3.582,332,2.351,333,2.351]],["t/2483",[23,1.078,51,2.13,59,0.968,64,1.563,65,2.221,66,1.563,67,2.516,72,1.83,73,1.446,74,1.503,81,1.201,110,1.245,159,2.241,261,2.025,271,2.892,299,2.892,303,3.494,304,3.494,307,4.495,334,4.016,335,4.016,336,3.494,337,3.494]],["t/2485",[20,1.988,100,2.609,261,3.117,338,5.376]],["t/2487",[3,1.384,20,1.719,21,3.024,22,3.447,23,1.435,100,2.256,101,3.153,339,4.649,340,5.345]],["t/2489",[104,3.94,105,3.511,341,6.29]],["t/2491",[3,0.981,32,1.224,33,1.116,34,1.224,35,1.116,37,2.223,48,3.792,50,0.908,53,1.432,59,1.124,60,2.601,61,1.747,72,0.81,80,1.024,81,0.726,95,1.432,106,1.354,107,1.224,108,2.007,109,2.114,110,1.445,111,1.224,112,2.049,130,2.75,191,1.623,193,1.623,216,1.354,223,2.111,261,1.224,306,1.903,307,4.113,309,2.971,311,2.971,312,1.747,313,2.111,314,1.903,315,3.295,316,2.111,317,1.747,318,2.111,319,3.295,324,2.111,325,2.111,326,3.295,327,1.747,328,2.111,329,2.111,330,2.111,331,3.295,332,2.111,333,2.111,338,3.295,342,3.788,343,2.111,344,2.426,345,2.426,346,1.903,347,2.426,348,2.426,349,2.426,350,2.426]],["t/2493",[23,0.989,51,2.177,59,1.245,64,1.433,65,2.092,66,1.433,72,1.724,73,1.859,74,1.378,81,1.101,110,1.142,112,1.433,159,2.056,189,3.047,271,2.653,307,4.294,336,3.204,337,3.204,339,3.204,343,3.204,351,3.683,352,3.683,353,2.888,354,3.683]],["t/2495",[3,1.064,10,3.285,58,2.749,59,1.343,84,2.177,88,2.749,106,2.293,110,1.959,147,2.072,216,2.293,253,2.959,355,3.222,356,2.749,357,3.587,358,3.222,359,2.424,360,3.574,361,2.959,362,2.959,363,3.574,364,3.222,365,3.574,366,4.109,367,4.109,368,4.109,369,4.109]],["t/2497",[3,1.287,20,1.599,21,2.926,22,3.335,23,1.334,51,1.383,100,2.098,101,2.933,370,4.971,371,4.324,372,4.971,373,3.58,374,3.58,375,3.58]],["t/2499",[53,3.647,59,1.49,376,6.181,377,6.181]],["t/2501",[3,0.502,10,1.867,32,0.977,33,0.891,34,0.977,35,1.845,37,2.155,50,1.91,53,2.367,59,0.967,72,0.647,84,2.125,107,0.977,108,2.454,109,1.081,112,1.987,129,1.519,130,3.232,148,1.296,177,3.198,216,1.081,238,2.117,256,1.214,300,1.143,311,1.519,314,1.519,346,2.482,355,1.519,356,1.296,357,3.062,359,2.733,361,2.279,362,1.395,378,1.937,379,2.753,380,2.753,381,2.753,382,1.685,383,2.889,384,2.279,385,1.937,386,1.937,387,1.937,388,1.395,389,1.937,390,1.937,391,1.937,392,1.685,393,1.519,394,1.395,395,3.146,396,1.937,397,1.937,398,1.685,399,1.519,400,3.49,401,1.937,402,1.937,403,1.937,404,3.165,405,1.685,406,2.753,407,1.937,408,2.753,409,1.685,410,1.519,411,1.937,412,1.685,413,1.685,414,1.937,415,1.685,416,1.937]],["t/2503",[3,0.476,10,1.084,23,0.493,49,1.229,51,2.199,58,1.229,59,1.081,60,1.025,64,0.715,65,1.227,66,0.715,72,1.497,73,0.661,74,0.687,81,1.156,84,2.048,110,1.539,111,0.926,112,0.715,159,1.025,167,2.281,189,1.788,244,1.229,248,2.784,353,1.441,357,2.048,373,1.323,374,1.323,375,1.323,383,1.323,395,3.517,399,1.441,417,1.598,418,1.441,419,2.376,420,1.598,421,1.598,422,1.441,423,1.837,424,1.837,425,2.376,426,1.598,427,1.598,428,1.598,429,2.376,430,1.598,431,1.598,432,2.182,433,2.182,434,1.598,435,1.898,436,1.598,437,1.598,438,1.598,439,1.598,440,1.837,441,1.598,442,1.323,443,2.635,444,1.837,445,1.598,446,1.598,447,1.598,448,1.598,449,1.598,450,1.598,451,1.598,452,1.598,453,1.598]],["t/2505",[50,2.051,51,1.525,60,3.06,146,3.494,147,2.765,148,2.687,256,2.516,357,3.307,405,4.769,406,3.494,419,3.149,425,3.149,432,2.892,433,2.892,454,4.016,455,4.016,456,5.483,457,4.016,458,4.016,459,5.483,460,5.483,461,4.016,462,4.016,463,4.016,464,4.016]],["t/2507",[3,0.353,10,0.805,23,0.366,49,2.081,51,2.179,58,0.913,59,1.008,60,0.762,64,0.531,65,0.955,66,0.531,72,1.236,73,0.491,74,0.511,81,0.93,84,1.648,110,1.296,111,0.688,112,0.917,159,0.762,167,1.835,175,1.187,177,2.619,189,2.893,244,0.913,248,2.24,261,0.688,300,0.805,309,1.07,312,0.983,353,1.07,357,1.648,373,0.983,374,0.983,375,0.983,383,0.983,395,2.904,399,1.07,417,1.187,418,1.07,419,1.848,420,1.187,421,1.187,422,1.07,425,1.848,426,1.187,427,1.187,428,1.187,429,1.848,430,1.187,431,1.187,432,1.697,433,1.697,434,1.187,435,1.476,436,1.187,437,1.187,438,1.187,439,1.187,441,1.187,442,0.983,443,2.05,445,1.187,446,1.187,447,1.187,448,1.187,449,1.187,450,1.187,451,1.187,452,1.187,453,1.187,465,1.365,466,1.365,467,1.848,468,1.365,469,1.07,470,0.913,471,2.357,472,2.357,473,2.357,474,1.365,475,1.365,476,1.365,477,1.365,478,1.848,479,1.365,480,1.365,481,1.365,482,1.365,483,1.187,484,1.187,485,0.983,486,1.365,487,1.365,488,1.365,489,1.365,490,1.365,491,2.05,492,1.365,493,1.365,494,1.365,495,1.365,496,1.365,497,1.365,498,1.365]],["t/2509",[469,4.684,485,4.301,499,5.973,500,5.973,501,5.196,502,5.973]],["t/2511",[10,2.777,119,4.095,177,3.817,216,2.627,300,2.777,312,3.39,355,3.691,356,3.149,359,2.777,410,3.691,412,4.095,415,4.095,469,4.778,485,3.39,501,4.095,503,4.708,504,4.708,505,4.708,506,4.708,507,4.708]],["t/2513",[2,1.632,10,1.107,23,0.504,35,0.863,44,1.632,48,1.351,50,0.702,51,2.002,59,0.743,64,0.73,65,1.248,66,0.73,72,1.029,73,0.675,74,0.702,80,0.792,81,0.561,84,2.407,93,1.632,95,1.107,108,1.633,110,1.409,112,1.199,128,2.681,129,1.471,130,2.961,132,2.19,174,1.255,177,3.144,225,1.351,260,1.632,300,1.107,357,2.078,359,1.818,373,1.351,374,1.351,375,1.351,383,4.105,384,3.614,408,4.366,409,1.632,410,1.471,418,1.471,422,1.471,508,1.876,509,1.632,510,1.876,511,2.681,512,3.082,513,3.082,514,3.082,515,1.876,516,1.876,517,1.876,518,1.876,519,1.471,520,1.876,521,1.876,522,1.876,523,1.876,524,3.082,525,1.876,526,1.876,527,1.876,528,1.876,529,1.876,530,1.876,531,1.876,532,1.876,533,1.876,534,1.876,535,1.876,536,1.876,537,1.632,538,1.876]],["t/2515",[12,4.869,13,3.744,14,4.869,20,1.8,21,2.362,100,2.362,174,3.744,484,4.869,485,4.031,539,5.597]],["t/2517",[21,2.98,22,3.397,23,1.603,540,5.196]],["t/2519",[105,3.511,541,6.29,542,5.472]],["t/2521",[13,4.229,32,1.539,33,1.403,34,1.539,35,1.403,37,2.5,50,1.142,51,0.849,59,0.736,60,1.703,61,2.197,72,1.019,81,0.912,107,1.539,108,1.616,110,1.398,132,1.703,147,2.274,148,2.041,150,3.017,174,3.017,183,2.197,185,3.247,190,2.197,193,2.041,194,2.654,364,2.393,388,2.197,543,2.654,544,5.154,545,2.654,546,3.051,547,2.654,548,4.509,549,4.665,550,2.654,551,4.509,552,2.654,553,3.051,554,2.654,555,2.654,556,2.654,557,2.654,558,3.051]],["t/2523",[33,2.747,59,1.44,80,2.521,81,1.786,388,4.301,556,5.196]],["t/2525",[3,0.596,13,1.539,20,0.74,23,0.618,33,1.058,35,1.058,40,2.276,51,2.164,59,0.876,62,2.001,64,1.414,65,1.472,66,0.895,72,1.213,73,0.828,74,0.861,81,1.087,92,1.441,95,2.144,110,1.127,111,1.16,112,0.895,142,1.441,148,1.539,149,2.001,150,1.539,159,1.284,167,1.357,183,1.657,193,1.539,196,1.804,197,1.657,256,1.441,388,2.617,398,2.001,432,1.657,433,1.657,442,1.657,470,1.539,540,2.001,542,2.001,543,2.001,545,2.001,547,2.001,549,2.001,550,2.001,552,2.001,554,2.001,555,2.001,557,2.001,559,2.001,560,2.301,561,2.301,562,3.634,563,2.301,564,2.301,565,3.634,566,2.301,567,2.301,568,2.301,569,2.301,570,2.301,571,2.301,572,2.301,573,2.301,574,2.301]],["t/2527",[16,6.143,20,1.921,100,2.521,575,5.973,576,5.973]],["t/2529",[3,1.521,20,1.89,21,2.479,22,2.826,100,2.479,101,3.466,577,5.11]],["t/2531",[105,3.511,225,4.53,578,6.29]],["t/2533",[3,0.616,32,1.199,33,1.093,34,1.199,35,2.115,37,1.941,50,2.431,53,2.2,106,1.327,107,1.199,108,1.975,109,1.327,110,1.426,112,1.79,130,1.403,132,2.907,147,1.88,167,1.403,174,1.591,185,3.313,190,1.712,216,2.081,248,1.712,250,4.001,253,1.712,346,2.924,394,1.712,435,1.49,509,2.068,519,1.865,544,2.068,579,2.378,580,2.378,581,2.378,582,2.378,583,6.003,584,4.001,585,2.378,586,2.378,587,3.729,588,2.378,589,2.378,590,2.378,591,3.729,592,3.729,593,2.378,594,2.378,595,3.729,596,2.378,597,2.068,598,2.378,599,2.378,600,2.378,601,2.378,602,2.378,603,1.865,604,2.378,605,2.378]],["t/2535",[470,4.208,606,5.472,607,6.29]],["t/2537",[15,1.566,23,0.483,37,1.257,51,2.161,59,0.919,64,0.7,65,1.207,66,0.7,67,1.128,72,1.479,73,0.648,74,0.673,80,0.76,81,0.891,110,1.522,112,1.159,132,1.005,142,1.128,167,2.248,189,2.896,238,1.204,261,0.908,299,1.296,467,1.411,491,1.566,577,1.566,584,2.591,603,1.411,608,1.8,609,1.8,610,1.8,611,1.566,612,1.8,613,1.8,614,1.8,615,1.8,616,1.8,617,1.8,618,1.8,619,1.8,620,1.8,621,1.8,622,1.411,623,3.811,624,2.979,625,2.979,626,1.8,627,1.8,628,1.566,629,1.566,630,1.8,631,1.8,632,1.8,633,1.8,634,5.288,635,1.8,636,1.8,637,1.8,638,1.8,639,1.8,640,1.8,641,1.8,642,1.8,643,1.8,644,1.8,645,1.8,646,1.8,647,1.8,648,1.8,649,1.566,650,1.8,651,1.8,652,1.8,653,1.8,654,1.8,655,1.8,656,1.8,657,1.8,658,1.8,659,1.566,660,1.8,661,1.8]],["t/2539",[20,2.298,49,2.979,50,1.122,55,3.873,147,1.513,185,3.206,261,2.245,317,3.824,371,2.609,394,2.16,442,2.16,470,2.979,483,2.609,519,2.352,603,3.492,611,2.609,622,5.484,628,2.609,629,3.873,649,4.619,662,3,663,3,664,3,665,3,666,3,667,3,668,5.876,669,5.876,670,3,671,3,672,3,673,3,674,3]],["t/2541",[3,1.129,17,4.173,58,2.918,59,1.397,88,2.918,106,2.434,110,2.018,216,2.434,253,3.141,256,2.732,356,2.918,357,3.674,358,3.42,359,2.573,360,3.794,361,3.141,362,3.141,363,3.794,364,3.42,675,3.794,676,4.361]],["t/2543",[3,1.384,20,1.719,21,3.024,22,3.447,23,1.435,100,2.256,101,3.153,677,5.345,678,5.345]],["t/2545",[53,3.647,59,1.49,679,6.181,680,6.181]],["t/2547",[3,1.232,17,1.459,32,1.021,33,0.931,34,1.021,35,0.931,37,1.385,49,2.767,50,1.779,53,1.936,59,0.997,84,1.073,106,1.13,107,1.021,108,3.12,109,1.13,112,2.033,130,2.806,132,1.13,147,1.021,177,2.979,225,1.459,231,1.762,238,2.195,286,1.588,300,2.44,306,1.588,327,1.459,357,3.597,358,1.588,359,2.806,361,2.363,362,1.459,379,2.854,380,2.854,381,2.854,382,1.762,384,1.459,392,1.762,393,1.588,394,1.459,400,2.854,413,1.762,435,2.056,478,2.573,511,1.762,537,2.854,597,1.762,675,2.854,681,2.026,682,1.762,683,2.026,684,2.026,685,1.762,686,1.762,687,4.136,688,1.588,689,2.026,690,3.281,691,2.854,692,2.026,693,2.026,694,2.026,695,2.026]],["t/2549",[3,0.944,17,2.625,50,2.219,59,0.879,83,2.625,104,2.284,108,2.716,110,1.59,132,2.035,191,2.439,256,3.212,300,2.151,357,3.725,359,2.151,384,3.692,393,2.859,429,4.02,435,3.212,478,2.859,682,3.171,685,3.171,686,4.46,688,2.859,691,3.171,696,3.646,697,5.127,698,3.646,699,3.646,700,3.646]],["t/2551",[3,1.811,18,5.483,20,1.89,145,5.11,701,5.11]],["t/2553",[470,4.284,702,6.403]],["t/2555",[72,2.063,104,3.872,105,3.449,703,6.181]],["t/2557",[3,1.188,20,2.146,23,1.231,50,1.716,51,1.856,64,1.785,66,2.331,73,2.402,74,1.716,356,3.068,435,2.873,559,3.989,704,4.586,705,4.586,706,4.586,707,4.586,708,4.586]],["t/2559",[709,5.672]],["t/2561",[18,4.191,40,3.348,51,1.993,197,3.849,701,4.649,709,4.649,710,5.345,711,5.345,712,4.649,713,5.345,714,5.345]],["t/2563",[19,3.968,20,1.773,81,1.648,95,3.251,150,3.686,240,4.793,688,4.321,712,4.793,715,5.51,716,5.51,717,5.51]],["t/2565",[21,2.98,22,3.397,23,1.603,718,5.196]],["t/2567",[19,2.465,23,0.573,51,2.205,59,0.825,64,0.831,65,1.387,66,0.831,72,0.713,73,0.769,74,0.799,80,0.901,81,0.638,110,1.329,111,2.161,112,1.332,147,1.077,189,3.551,190,1.537,244,1.428,261,1.077,286,1.674,299,1.537,317,1.537,327,1.537,467,1.674,622,1.674,659,1.857,718,1.857,719,2.135,720,2.135,721,2.135,722,2.135,723,2.135,724,2.135,725,2.135,726,1.857,727,1.857,728,3.728,729,2.135,730,2.135,731,2.135,732,2.135,733,2.135,734,2.135,735,2.135,736,2.135,737,2.135,738,2.135,739,3.424,740,4.903,741,2.135,742,2.135,743,3.424,744,2.135,745,2.135,746,2.135,747,2.135,748,2.135,749,2.135]],["t/2569",[3,1.089,19,4.074,40,2.635,50,2.116,51,1.985,59,1.014,73,1.514,74,1.574,80,1.775,81,1.258,106,2.348,107,2.121,109,2.348,110,1.304,365,3.659,606,3.659,726,3.659,727,3.659,728,3.659,750,4.206,751,4.206,752,4.206,753,4.206,754,4.206,755,4.206]]],"invertedIndex":[["",{"_index":51,"t":{"2431":{"position":[[258,1],[333,2]]},"2435":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[570,1],[572,2],[588,2],[591,1],[759,1],[761,2],[777,2],[780,1],[802,1]]},"2437":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[427,2],[536,1],[538,2],[554,2],[557,1],[579,1]]},"2439":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[513,1],[515,2],[531,2],[534,1],[556,1]]},"2449":{"position":[[20,1],[160,1],[174,1],[180,2],[373,3],[377,1],[417,1],[476,2],[524,1],[686,2],[689,3],[693,2],[725,1]]},"2457":{"position":[[82,2]]},"2459":{"position":[[20,1],[95,1],[109,1],[115,2],[170,1],[199,2],[206,2],[323,1],[377,1]]},"2461":{"position":[[20,1],[138,1],[152,1],[171,2],[336,1],[342,2],[397,1],[426,2],[433,2],[483,1],[537,1]]},"2469":{"position":[[458,1]]},"2471":{"position":[[626,1],[780,1],[794,1],[798,1],[839,3],[919,1],[937,2],[944,1],[955,2],[1020,1],[1022,2],[1129,1],[1131,1],[1165,2],[1205,2],[1212,2],[1309,3],[1332,2],[1360,1],[1369,2],[1410,2],[1417,1],[1473,1],[1491,1],[1554,1],[1571,2],[1612,1],[1621,2],[1662,2],[1669,1],[1711,1],[1853,2],[1856,1],[1894,2],[1928,1]]},"2473":{"position":[[134,1],[152,2],[159,1],[170,2],[235,1],[237,2],[321,1],[323,1],[338,2],[341,2]]},"2483":{"position":[[20,1],[114,1],[128,1],[134,2],[159,2],[236,3],[279,1],[318,2],[352,1]]},"2493":{"position":[[20,1],[118,1],[132,1],[138,2],[160,2],[277,3],[320,1],[359,2],[369,2],[397,2],[404,1],[453,1],[455,1]]},"2497":{"position":[[34,1]]},"2503":{"position":[[20,1],[131,1],[145,1],[151,2],[166,2],[207,2],[257,2],[366,3],[370,2],[446,1],[479,1],[486,2],[514,2],[537,2],[574,2],[584,2],[592,2],[601,1],[649,1],[651,2],[679,2],[764,1],[778,1],[780,2],[802,2],[855,2],[913,2],[960,2],[967,1],[1022,1],[1061,1],[1099,1],[1135,1],[1173,1],[1180,2],[1220,2],[1256,2],[1312,1],[1314,1],[1322,1]]},"2505":{"position":[[125,1],[244,1]]},"2507":{"position":[[20,1],[164,1],[170,1],[172,2],[245,2],[324,2],[410,1],[424,1],[430,2],[445,2],[536,2],[581,1],[617,2],[624,1],[665,1],[667,2],[708,2],[758,2],[893,2],[896,3],[900,2],[976,1],[1009,1],[1016,2],[1044,2],[1067,2],[1104,2],[1114,2],[1122,2],[1131,1],[1179,1],[1181,2],[1209,2],[1294,1],[1308,1],[1310,2],[1332,2],[1385,2],[1443,2],[1484,2],[1491,1],[1588,1],[1627,1],[1665,1],[1701,1],[1739,1],[1746,2],[1786,2],[1822,2],[1878,1],[1880,1],[1888,1]]},"2513":{"position":[[691,1],[801,1],[815,1],[821,2],[898,3],[942,1],[970,2],[973,1],[1008,1],[1057,1],[1059,2],[1112,2],[1129,1],[1207,1],[1209,2],[1294,2],[1337,1],[1339,1]]},"2521":{"position":[[365,2]]},"2525":{"position":[[85,1],[134,1],[157,2],[171,1],[238,1],[240,1],[262,1],[332,1],[346,1],[352,2],[374,2],[377,1],[415,2],[430,1],[445,2],[454,1],[456,1],[462,2],[792,1],[869,2],[876,2],[879,1],[948,1],[977,2],[1000,1]]},"2537":{"position":[[20,1],[507,1],[520,1],[562,1],[567,2],[596,1],[605,2],[647,2],[654,1],[715,1],[717,3],[725,2],[817,1],[844,2],[894,1],[899,2],[922,2],[1001,2],[1035,1],[1080,1],[1096,2],[1143,2],[1150,1],[1167,1],[1172,2],[1397,3],[1401,1],[1560,1],[1614,1],[1624,2],[1733,2],[1742,1],[1770,1],[1789,1]]},"2557":{"position":[[77,1],[146,1],[181,2]]},"2561":{"position":[[4,2],[33,4],[94,1]]},"2567":{"position":[[20,1],[97,1],[111,1],[117,2],[172,1],[174,2],[223,2],[306,1],[350,1],[384,2],[444,1],[446,2],[523,2],[559,2],[592,2],[633,2],[636,2],[639,2],[737,1],[767,1],[773,1],[791,1],[814,2],[821,1],[855,1],[892,1],[923,2],[930,1],[965,1],[967,1],[969,3],[1004,2],[1069,2],[1108,1]]},"2569":{"position":[[130,2],[207,1],[256,2],[259,3],[320,4]]}}}],["0",{"_index":387,"t":{"2501":{"position":[[457,2]]}}}],["1.0",{"_index":734,"t":{"2567":{"position":[[595,3]]}}}],["1.18",{"_index":539,"t":{"2515":{"position":[[55,4]]}}}],["123",{"_index":659,"t":{"2537":{"position":[[1736,5]]},"2567":{"position":[[562,3]]}}}],["2",{"_index":231,"t":{"2469":{"position":[[460,1]]},"2547":{"position":[[1145,2]]}}}],["2048",{"_index":489,"t":{"2507":{"position":[[604,5]]}}}],["2]string",{"_index":693,"t":{"2547":{"position":[[1095,9]]}}}],["400",{"_index":364,"t":{"2495":{"position":[[212,4]]},"2521":{"position":[[271,3]]},"2541":{"position":[[221,4]]}}}],["401",{"_index":362,"t":{"2495":{"position":[[154,4]]},"2501":{"position":[[333,3]]},"2541":{"position":[[163,4]]},"2547":{"position":[[330,3]]}}}],["443",{"_index":594,"t":{"2533":{"position":[[545,3]]}}}],["72).unix",{"_index":439,"t":{"2503":{"position":[[766,11]]},"2507":{"position":[[1296,11]]}}}],["7517",{"_index":507,"t":{"2511":{"position":[[174,5]]}}}],["80",{"_index":593,"t":{"2533":{"position":[[531,3]]}}}],["_",{"_index":67,"t":{"2435":{"position":[[88,1]]},"2437":{"position":[[88,1]]},"2439":{"position":[[88,1]]},"2471":{"position":[[796,1]]},"2483":{"position":[[157,1]]},"2537":{"position":[[1616,2]]}}}],["abov",{"_index":485,"t":{"2507":{"position":[[525,6]]},"2509":{"position":[[50,6]]},"2511":{"position":[[43,6]]},"2515":{"position":[[64,5]]}}}],["accept",{"_index":149,"t":{"2447":{"position":[[895,6]]},"2525":{"position":[[173,9]]}}}],["acceptlanguag",{"_index":117,"t":{"2447":{"position":[[190,15]]},"2449":{"position":[[269,16]]}}}],["access",{"_index":244,"t":{"2471":{"position":[[209,6],[1034,6]]},"2473":{"position":[[249,6]]},"2503":{"position":[[245,11]]},"2507":{"position":[[746,11]]},"2567":{"position":[[1007,6]]}}}],["accessible(c",{"_index":447,"t":{"2503":{"position":[[1068,12]]},"2507":{"position":[[1634,12]]}}}],["accordingli",{"_index":372,"t":{"2497":{"position":[[48,12]]}}}],["actual",{"_index":500,"t":{"2509":{"position":[[13,8]]}}}],["ad",{"_index":730,"t":{"2567":{"position":[[461,5]]}}}],["adapt",{"_index":26,"t":{"2427":{"position":[[92,7],[143,7]]},"2431":{"position":[[125,7]]},"2433":{"position":[[5,7],[18,7]]}}}],["adapter/v2",{"_index":71,"t":{"2435":{"position":[[147,11]]},"2437":{"position":[[147,11]]},"2439":{"position":[[147,11]]}}}],["add",{"_index":309,"t":{"2481":{"position":[[139,3],[199,3]]},"2491":{"position":[[143,3],[377,3]]},"2507":{"position":[[345,3]]}}}],["admin",{"_index":436,"t":{"2503":{"position":[[717,8]]},"2507":{"position":[[1247,8]]}}}],["advanc",{"_index":474,"t":{"2507":{"position":[[330,8]]}}}],["agent",{"_index":14,"t":{"2423":{"position":[[76,5]]},"2515":{"position":[[12,5]]}}}],["agent/v3/newrel",{"_index":202,"t":{"2461":{"position":[[119,18]]}}}],["algorithm",{"_index":512,"t":{"2513":{"position":[[147,9],[631,9]]}}}],["allow",{"_index":565,"t":{"2525":{"position":[[409,5],[424,5]]}}}],["along",{"_index":690,"t":{"2547":{"position":[[767,6],[913,6]]}}}],["alway",{"_index":529,"t":{"2513":{"position":[[1062,6]]}}}],["anoth",{"_index":684,"t":{"2547":{"position":[[534,7]]}}}],["api",{"_index":180,"t":{"2457":{"position":[[133,3]]}}}],["app",{"_index":73,"t":{"2435":{"position":[[175,3]]},"2437":{"position":[[175,3]]},"2439":{"position":[[175,3]]},"2449":{"position":[[176,3]]},"2457":{"position":[[286,3]]},"2459":{"position":[[111,3]]},"2461":{"position":[[338,3]]},"2471":{"position":[[1208,3]]},"2483":{"position":[[130,3]]},"2493":{"position":[[134,3],[441,3]]},"2503":{"position":[[147,3]]},"2507":{"position":[[426,3]]},"2513":{"position":[[817,3]]},"2525":{"position":[[348,3]]},"2537":{"position":[[721,3]]},"2557":{"position":[[168,3],[177,3],[227,4]]},"2567":{"position":[[113,3]]},"2569":{"position":[[126,3]]}}}],["app.al",{"_index":290,"t":{"2471":{"position":[[1574,12]]}}}],["app.all(\"/foo",{"_index":287,"t":{"2471":{"position":[[1493,15]]}}}],["app.delete(\"/blog/:id",{"_index":89,"t":{"2435":{"position":[[593,23]]}}}],["app.get",{"_index":159,"t":{"2449":{"position":[[379,12]]},"2459":{"position":[[130,12]]},"2461":{"position":[[357,12]]},"2483":{"position":[[240,12]]},"2493":{"position":[[281,12]]},"2503":{"position":[[232,12]]},"2507":{"position":[[733,12]]},"2525":{"position":[[908,12]]}}}],["app.get(\"/:nam",{"_index":161,"t":{"2449":{"position":[[479,17]]}}}],["app.get(\"/error",{"_index":631,"t":{"2537":{"position":[[772,17]]}}}],["app.get(\"/ok",{"_index":525,"t":{"2513":{"position":[[902,14]]}}}],["app.get(\"/restrict",{"_index":426,"t":{"2503":{"position":[[391,22]]},"2507":{"position":[[921,22]]}}}],["app.get(\"/users/:id",{"_index":633,"t":{"2537":{"position":[[847,21]]}}}],["app.get(\"/ws/:id",{"_index":726,"t":{"2567":{"position":[[387,18]]},"2569":{"position":[[263,18]]}}}],["app.listen(\"127.0.0.1:3000",{"_index":169,"t":{"2449":{"position":[[696,28]]}}}],["app.listen(\":3000",{"_index":353,"t":{"2493":{"position":[[372,20]]},"2503":{"position":[[426,19]]},"2507":{"position":[[956,19]]}}}],["app.listen(\":8080",{"_index":92,"t":{"2435":{"position":[[782,19]]},"2437":{"position":[[559,19]]},"2439":{"position":[[536,19]]},"2459":{"position":[[357,19]]},"2461":{"position":[[517,19]]},"2525":{"position":[[980,19]]}}}],["app.post(\"/blog",{"_index":85,"t":{"2435":{"position":[[427,17]]},"2437":{"position":[[468,17]]}}}],["app.post(\"/login",{"_index":420,"t":{"2503":{"position":[[181,18]]},"2507":{"position":[[682,18]]}}}],["app.put(\"/blog/:id",{"_index":97,"t":{"2439":{"position":[[427,20]]}}}],["app.us",{"_index":156,"t":{"2449":{"position":[[195,8]]}}}],["app.use(\"/w",{"_index":719,"t":{"2567":{"position":[[132,14]]}}}],["app.use(cache.new(cache.config",{"_index":753,"t":{"2569":{"position":[[145,31]]}}}],["app.use(fibernewrelic.new(cfg",{"_index":200,"t":{"2459":{"position":[[325,31]]},"2461":{"position":[[485,31]]}}}],["app.use(fibersentry.new(fibersentry.config",{"_index":280,"t":{"2471":{"position":[[1227,43]]}}}],["app.use(fiberzap.new(fiberzap.config",{"_index":335,"t":{"2483":{"position":[[182,37]]}}}],["app.use(fiberzerolog.new(fiberzerolog.config",{"_index":352,"t":{"2493":{"position":[[214,45]]}}}],["app.use(jwtware.new(jwtware.config",{"_index":422,"t":{"2503":{"position":[[275,35]]},"2507":{"position":[[776,35]]},"2513":{"position":[[836,35]]}}}],["app.use(opafiber.new(cfg",{"_index":574,"t":{"2525":{"position":[[881,26]]}}}],["app.use(otelfiber.middlewar",{"_index":630,"t":{"2537":{"position":[[740,31]]}}}],["app.use(swagger.new(cfg",{"_index":709,"t":{"2559":{"position":[[0,25]]},"2561":{"position":[[96,25]]}}}],["applic",{"_index":179,"t":{"2457":{"position":[[110,11],[243,11],[255,11]]},"2461":{"position":[[458,12]]}}}],["application/json",{"_index":562,"t":{"2525":{"position":[[183,19],[219,18]]}}}],["appnam",{"_index":178,"t":{"2457":{"position":[[85,7]]},"2459":{"position":[[284,8]]}}}],["attach",{"_index":232,"t":{"2471":{"position":[[12,8],[574,8]]}}}],["attachstacktrac",{"_index":279,"t":{"2471":{"position":[[1181,17]]}}}],["attribut",{"_index":591,"t":{"2533":{"position":[[479,9],[809,9]]}}}],["auth",{"_index":358,"t":{"2495":{"position":[[35,4]]},"2541":{"position":[[36,4]]},"2547":{"position":[[1070,5]]}}}],["authent",{"_index":83,"t":{"2435":{"position":[[394,13]]},"2437":{"position":[[394,13]]},"2439":{"position":[[394,13]]},"2549":{"position":[[53,15]]}}}],["author",{"_index":405,"t":{"2501":{"position":[[903,13]]},"2505":{"position":[[295,13],[359,15]]}}}],["authschem",{"_index":404,"t":{"2501":{"position":[[856,10],[874,10]]}}}],["authz",{"_index":75,"t":{"2435":{"position":[[194,5]]},"2437":{"position":[[194,5]]},"2439":{"position":[[194,5]]}}}],["authz.requirespermissions([]string{\"blog:cr",{"_index":86,"t":{"2435":{"position":[[445,50],[617,49]]}}}],["authz.requiresroles([]string{\"admin",{"_index":98,"t":{"2439":{"position":[[448,39]]}}}],["authz.routepermiss",{"_index":96,"t":{"2437":{"position":[[486,24]]}}}],["avail",{"_index":240,"t":{"2471":{"position":[[144,9],[550,9]]},"2563":{"position":[[43,9]]}}}],["bad",{"_index":365,"t":{"2495":{"position":[[219,3]]},"2569":{"position":[[32,3]]}}}],["badrequest",{"_index":676,"t":{"2541":{"position":[[228,11]]}}}],["base",{"_index":712,"t":{"2561":{"position":[[51,4]]},"2563":{"position":[[0,5]]}}}],["basepath",{"_index":711,"t":{"2561":{"position":[[23,9]]}}}],["basic",{"_index":503,"t":{"2511":{"position":[[27,5]]}}}],["bearer",{"_index":406,"t":{"2501":{"position":[[943,10],[1022,8]]},"2505":{"position":[[375,6]]}}}],["becom",{"_index":602,"t":{"2533":{"position":[[963,6]]}}}],["befor",{"_index":220,"t":{"2469":{"position":[[248,6]]},"2471":{"position":[[583,6]]}}}],["beforesend",{"_index":265,"t":{"2471":{"position":[[843,11]]},"2473":{"position":[[58,11]]}}}],["between",{"_index":257,"t":{"2471":{"position":[[489,7]]}}}],["bind",{"_index":736,"t":{"2567":{"position":[[657,8]]}}}],["block",{"_index":219,"t":{"2469":{"position":[[230,5]]}}}],["blog:delet",{"_index":90,"t":{"2435":{"position":[[667,15]]}}}],["bodi",{"_index":61,"t":{"2431":{"position":[[381,4],[468,4]]},"2481":{"position":[[617,4]]},"2491":{"position":[[804,4]]},"2521":{"position":[[318,4]]}}}],["bool",{"_index":107,"t":{"2447":{"position":[[58,4]]},"2457":{"position":[[145,4]]},"2469":{"position":[[42,4],[178,4]]},"2481":{"position":[[50,4]]},"2491":{"position":[[50,4]]},"2501":{"position":[[58,4]]},"2521":{"position":[[140,4]]},"2533":{"position":[[56,4]]},"2547":{"position":[[50,4]]},"2569":{"position":[[202,4]]}}}],["both",{"_index":133,"t":{"2447":{"position":[[570,4]]}}}],["break",{"_index":743,"t":{"2567":{"position":[[849,5],[959,5]]}}}],["bring",{"_index":670,"t":{"2539":{"position":[[204,5]]}}}],["byte",{"_index":327,"t":{"2481":{"position":[[576,6]]},"2491":{"position":[[763,6]]},"2547":{"position":[[601,6]]},"2567":{"position":[[750,6]]}}}],["byte(\"secret",{"_index":424,"t":{"2503":{"position":[[347,18]]}}}],["byte(signingkey",{"_index":538,"t":{"2513":{"position":[[1313,19]]}}}],["bytes.newbufferstring(modul",{"_index":568,"t":{"2525":{"position":[[533,30]]}}}],["c",{"_index":271,"t":{"2471":{"position":[[949,2]]},"2473":{"position":[[164,2]]},"2483":{"position":[[258,2]]},"2493":{"position":[[299,2]]}}}],["c.formvalue(\"pass",{"_index":430,"t":{"2503":{"position":[[517,19]]},"2507":{"position":[[1047,19]]}}}],["c.formvalue(\"us",{"_index":428,"t":{"2503":{"position":[[489,19]]},"2507":{"position":[[1019,19]]}}}],["c.json(fiber.map{\"id",{"_index":637,"t":{"2537":{"position":[[961,22]]}}}],["c.json(fiber.map{\"token",{"_index":446,"t":{"2503":{"position":[[1031,25]]},"2507":{"position":[[1597,25]]}}}],["c.local",{"_index":729,"t":{"2567":{"position":[[449,8]]}}}],["c.locals(\"allow",{"_index":724,"t":{"2567":{"position":[[308,19]]}}}],["c.locals(\"user\").(*jwt.token",{"_index":450,"t":{"2503":{"position":[[1183,29]]},"2507":{"position":[[1749,29]]}}}],["c.next",{"_index":286,"t":{"2471":{"position":[[1482,8]]},"2547":{"position":[[206,8]]},"2567":{"position":[[341,8]]}}}],["c.params(\"id",{"_index":635,"t":{"2537":{"position":[[902,14]]}}}],["c.readmessag",{"_index":741,"t":{"2567":{"position":[[793,16]]}}}],["c.sendstatus(fiber.statusinternalservererror",{"_index":445,"t":{"2503":{"position":[[976,45]]},"2507":{"position":[[1542,45]]}}}],["c.sendstatus(fiber.statusok",{"_index":298,"t":{"2471":{"position":[[1865,28]]}}}],["c.sendstatus(fiber.statusunauthor",{"_index":434,"t":{"2503":{"position":[[610,38]]},"2507":{"position":[[1140,38]]}}}],["c.sendstring(\"access",{"_index":448,"t":{"2503":{"position":[[1108,26]]},"2507":{"position":[[1674,26]]}}}],["c.sendstring(\"hello",{"_index":336,"t":{"2483":{"position":[[288,20]]},"2493":{"position":[[329,20]]}}}],["c.sendstring(\"ok",{"_index":526,"t":{"2513":{"position":[[951,18]]}}}],["c.sendstring(\"welcom",{"_index":453,"t":{"2503":{"position":[[1290,21]]},"2507":{"position":[[1856,21]]}}}],["c.sendstring(fiberi18n.mustgetmessage(\"welcom",{"_index":160,"t":{"2449":{"position":[[426,49]]}}}],["c.writemessage(mt",{"_index":746,"t":{"2567":{"position":[[894,18]]}}}],["cach",{"_index":751,"t":{"2569":{"position":[[61,5]]}}}],["call",{"_index":253,"t":{"2471":{"position":[[447,6]]},"2495":{"position":[[104,5]]},"2533":{"position":[[910,6]]},"2541":{"position":[[113,5]]}}}],["care",{"_index":510,"t":{"2513":{"position":[[117,4]]}}}],["casbin",{"_index":5,"t":{"2423":{"position":[[0,6]]},"2425":{"position":[[0,6]]},"2431":{"position":[[192,6]]}}}],["casbin.config",{"_index":30,"t":{"2429":{"position":[[18,17]]}}}],["casbin.enforc",{"_index":47,"t":{"2431":{"position":[[168,16]]}}}],["casbin.middlewar",{"_index":31,"t":{"2429":{"position":[[36,18]]}}}],["casbin.new(casbin.config",{"_index":76,"t":{"2435":{"position":[[203,25]]},"2437":{"position":[[203,25]]},"2439":{"position":[[203,25]]}}}],["casbin.new(config",{"_index":29,"t":{"2429":{"position":[[0,17]]}}}],["casbin.withvalidationrule(casbin.atleastonerul",{"_index":91,"t":{"2435":{"position":[[683,50]]}}}],["casbin.withvalidationrule(casbin.matchallrul",{"_index":87,"t":{"2435":{"position":[[496,48]]}}}],["case",{"_index":682,"t":{"2547":{"position":[[451,4]]},"2549":{"position":[[348,4]]}}}],["cfg",{"_index":197,"t":{"2459":{"position":[[202,3]]},"2461":{"position":[[429,3]]},"2525":{"position":[[458,3]]},"2561":{"position":[[0,3]]}}}],["chang",{"_index":192,"t":{"2457":{"position":[[366,6]]}}}],["check",{"_index":93,"t":{"2437":{"position":[[430,5]]},"2513":{"position":[[1069,5]]}}}],["choos",{"_index":25,"t":{"2427":{"position":[[82,6]]}}}],["claim",{"_index":395,"t":{"2501":{"position":[[655,6],[672,6],[694,6]]},"2503":{"position":[[665,6],[672,6],[847,7],[1213,6]]},"2507":{"position":[[1195,6],[1202,6],[1377,7],[1779,6]]}}}],["claims[\"name\"].(str",{"_index":452,"t":{"2503":{"position":[[1259,23]]},"2507":{"position":[[1825,23]]}}}],["client",{"_index":317,"t":{"2481":{"position":[[345,7]]},"2491":{"position":[[532,7]]},"2539":{"position":[[240,6],[322,6],[339,6]]},"2567":{"position":[[216,6]]}}}],["code",{"_index":194,"t":{"2457":{"position":[[389,5]]},"2521":{"position":[[229,4]]}}}],["collect",{"_index":119,"t":{"2447":{"position":[[223,10]]},"2511":{"position":[[102,10]]}}}],["compos",{"_index":669,"t":{"2539":{"position":[[185,7],[283,7],[474,7],[570,7]]}}}],["compress",{"_index":330,"t":{"2481":{"position":[[656,8]]},"2491":{"position":[[843,8]]}}}],["config",{"_index":104,"t":{"2445":{"position":[[21,11]]},"2467":{"position":[[23,10]]},"2479":{"position":[[20,10]]},"2489":{"position":[[24,10]]},"2549":{"position":[[223,6]]},"2555":{"position":[[16,10]]}}}],["config.next",{"_index":752,"t":{"2569":{"position":[[90,11]]}}}],["configur",{"_index":213,"t":{"2469":{"position":[[55,10],[199,10]]}}}],["conjuct",{"_index":407,"t":{"2501":{"position":[[975,10]]}}}],["content",{"_index":398,"t":{"2501":{"position":[[721,8]]},"2525":{"position":[[203,8]]}}}],["context",{"_index":238,"t":{"2471":{"position":[[120,8],[278,7],[1057,7]]},"2473":{"position":[[272,7]]},"2501":{"position":[[581,7],[639,8]]},"2537":{"position":[[22,9]]},"2547":{"position":[[1003,7],[1061,8]]}}}],["context.context",{"_index":654,"t":{"2537":{"position":[[1579,16]]}}}],["contextkey",{"_index":392,"t":{"2501":{"position":[[563,10]]},"2547":{"position":[[985,10]]}}}],["cooki",{"_index":717,"t":{"2563":{"position":[[103,8]]}}}],["creat",{"_index":435,"t":{"2503":{"position":[[654,6],[783,6]]},"2507":{"position":[[1184,6],[1313,6]]},"2533":{"position":[[225,8]]},"2547":{"position":[[472,7],[520,7]]},"2549":{"position":[[32,8],[128,6]]},"2557":{"position":[[153,6]]}}}],["createtoken",{"_index":683,"t":{"2547":{"position":[[486,11]]}}}],["credit",{"_index":368,"t":{"2495":{"position":[[258,7]]}}}],["crypto.publickey",{"_index":692,"t":{"2547":{"position":[[852,16]]}}}],["crypto/rand",{"_index":465,"t":{"2507":{"position":[[22,13]]}}}],["crypto/rsa",{"_index":466,"t":{"2507":{"position":[[36,12]]}}}],["ctx",{"_index":571,"t":{"2525":{"position":[[743,4]]}}}],["ctx.local",{"_index":360,"t":{"2495":{"position":[[89,10]]},"2541":{"position":[[98,10]]}}}],["ctx.method",{"_index":572,"t":{"2525":{"position":[[835,13]]}}}],["ctx.params(\"nam",{"_index":168,"t":{"2449":{"position":[[666,19]]}}}],["ctx.path",{"_index":573,"t":{"2525":{"position":[[857,11]]}}}],["ctx.sendstatus(200",{"_index":196,"t":{"2459":{"position":[[179,19]]},"2461":{"position":[[406,19]]},"2525":{"position":[[957,19]]}}}],["ctx.sendstring(fiberi18n.mustgetmessage(&i18n.localizeconfig",{"_index":162,"t":{"2449":{"position":[[533,61]]}}}],["curl",{"_index":456,"t":{"2505":{"position":[[55,4],[325,4]]}}}],["current",{"_index":56,"t":{"2431":{"position":[[317,7]]}}}],["custom",{"_index":48,"t":{"2431":{"position":[[185,6]]},"2481":{"position":[[143,6],[294,6],[395,6]]},"2491":{"position":[[147,6],[267,6],[481,6],[582,6]]},"2513":{"position":[[1217,6]]}}}],["customkeyfunc",{"_index":524,"t":{"2513":{"position":[[881,16],[980,15]]}}}],["data",{"_index":256,"t":{"2471":{"position":[[484,4]]},"2501":{"position":[[701,4]]},"2505":{"position":[[62,4]]},"2525":{"position":[[49,4]]},"2541":{"position":[[90,4]]},"2549":{"position":[[378,4],[478,4]]}}}],["data.example.authz.allow",{"_index":567,"t":{"2525":{"position":[[493,27]]}}}],["databas",{"_index":44,"t":{"2431":{"position":[[116,8]]},"2513":{"position":[[1274,8]]}}}],["debug",{"_index":278,"t":{"2471":{"position":[[1168,6]]}}}],["decod",{"_index":139,"t":{"2447":{"position":[[689,8]]}}}],["default",{"_index":35,"t":{"2431":{"position":[[26,7]]},"2447":{"position":[[26,7],[416,7]]},"2457":{"position":[[26,7]]},"2469":{"position":[[26,7]]},"2481":{"position":[[26,7]]},"2491":{"position":[[26,7]]},"2501":{"position":[[26,7],[929,7],[995,7]]},"2513":{"position":[[571,7]]},"2521":{"position":[[26,7]]},"2525":{"position":[[401,7]]},"2533":{"position":[[26,7],[523,7],[984,7]]},"2547":{"position":[[26,7]]}}}],["defaulterrorstatuscodehandl",{"_index":195,"t":{"2457":{"position":[[411,29]]}}}],["defaultinput(ctx",{"_index":558,"t":{"2521":{"position":[[524,16]]}}}],["defaultlang",{"_index":143,"t":{"2447":{"position":[[762,11],[848,12]]}}}],["defaultlanguag",{"_index":126,"t":{"2447":{"position":[[383,15]]},"2449":{"position":[[338,16]]}}}],["defer",{"_index":625,"t":{"2537":{"position":[[583,5],[1710,5]]}}}],["defin",{"_index":130,"t":{"2447":{"position":[[529,7]]},"2481":{"position":[[55,6],[583,6]]},"2491":{"position":[[55,6],[298,7],[770,6]]},"2501":{"position":[[63,7],[158,7],[274,7],[706,8],[1066,7],[1081,7]]},"2513":{"position":[[8,7],[23,7],[194,7],[279,7],[466,7]]},"2533":{"position":[[61,6]]},"2547":{"position":[[55,7],[150,7],[271,7],[386,7]]}}}],["deliveri",{"_index":229,"t":{"2469":{"position":[[427,8]]}}}],["demo",{"_index":480,"t":{"2507":{"position":[[458,5]]}}}],["deni",{"_index":551,"t":{"2521":{"position":[[256,6],[350,6]]}}}],["deniedresponsemessag",{"_index":552,"t":{"2521":{"position":[[275,21]]},"2525":{"position":[[631,22]]}}}],["deniedstatuscod",{"_index":550,"t":{"2521":{"position":[[196,16]]},"2525":{"position":[[590,17]]}}}],["depend",{"_index":4,"t":{"2421":{"position":[[44,13]]}}}],["deprec",{"_index":186,"t":{"2457":{"position":[[223,12]]}}}],["descript",{"_index":34,"t":{"2431":{"position":[[14,11]]},"2447":{"position":[[14,11]]},"2457":{"position":[[14,11]]},"2469":{"position":[[14,11]]},"2481":{"position":[[14,11]]},"2491":{"position":[[14,11]]},"2501":{"position":[[14,11]]},"2521":{"position":[[14,11]]},"2533":{"position":[[14,11]]},"2547":{"position":[[14,11]]}}}],["detach",{"_index":671,"t":{"2539":{"position":[[296,6]]}}}],["docker",{"_index":668,"t":{"2539":{"position":[[178,6],[276,6],[467,6],[563,6]]}}}],["docs/swagger.json",{"_index":714,"t":{"2561":{"position":[[71,22]]}}}],["doe",{"_index":433,"t":{"2503":{"position":[[595,5],[711,5]]},"2505":{"position":[[511,3]]},"2507":{"position":[[1125,5],[1241,5]]},"2525":{"position":[[151,5]]}}}],["down",{"_index":629,"t":{"2537":{"position":[[683,4]]},"2539":{"position":[[505,4],[578,4]]}}}],["driver/mysql",{"_index":70,"t":{"2435":{"position":[[109,13]]},"2437":{"position":[[109,13]]},"2439":{"position":[[109,13]]}}}],["dsn",{"_index":264,"t":{"2471":{"position":[[834,4]]},"2473":{"position":[[34,4],[52,5]]}}}],["each",{"_index":482,"t":{"2507":{"position":[[506,4]]}}}],["echo",{"_index":369,"t":{"2495":{"position":[[269,4]]}}}],["ed25519.privatekey",{"_index":689,"t":{"2547":{"position":[[706,18]]}}}],["eg",{"_index":329,"t":{"2481":{"position":[[643,3]]},"2491":{"position":[[830,3]]}}}],["embed.fs.readfil",{"_index":135,"t":{"2447":{"position":[[591,18]]}}}],["enabl",{"_index":181,"t":{"2457":{"position":[[137,7]]},"2459":{"position":[[308,8]]}}}],["enable/dis",{"_index":182,"t":{"2457":{"position":[[150,14]]}}}],["encod",{"_index":441,"t":{"2503":{"position":[[867,7]]},"2507":{"position":[[1397,7]]}}}],["encrypt",{"_index":686,"t":{"2547":{"position":[[622,7]]},"2549":{"position":[[144,7],[249,11]]}}}],["endpoint",{"_index":665,"t":{"2539":{"position":[[84,9]]}}}],["enforc",{"_index":46,"t":{"2431":{"position":[[159,8],[199,8],[229,8]]}}}],["engin",{"_index":560,"t":{"2525":{"position":[[68,6]]}}}],["enhancesentryev",{"_index":281,"t":{"2471":{"position":[[1313,18],[1509,19]]}}}],["err",{"_index":189,"t":{"2457":{"position":[[336,3]]},"2461":{"position":[[167,3]]},"2493":{"position":[[365,3],[393,3]]},"2503":{"position":[[909,3],[956,3]]},"2507":{"position":[[555,3],[577,3],[613,3],[660,4],[1439,3],[1480,3],[1530,4]]},"2537":{"position":[[601,3],[643,3],[710,4],[1092,3],[1139,3]]},"2567":{"position":[[757,3],[787,3],[810,3],[844,4],[888,3],[919,3],[954,4]]}}}],["error",{"_index":59,"t":{"2431":{"position":[[366,5],[453,5]]},"2435":{"position":[[564,5],[753,5]]},"2437":{"position":[[530,5]]},"2439":{"position":[[507,5]]},"2449":{"position":[[411,5],[518,5]]},"2457":{"position":[[340,6]]},"2459":{"position":[[164,5]]},"2461":{"position":[[391,5]]},"2471":{"position":[[1354,5],[1548,5],[1606,5]]},"2481":{"position":[[337,7],[353,7]]},"2483":{"position":[[273,5]]},"2491":{"position":[[454,8],[524,7],[540,7]]},"2493":{"position":[[314,5],[445,7]]},"2495":{"position":[[175,6],[232,6]]},"2499":{"position":[[55,5]]},"2501":{"position":[[137,5],[248,6],[255,5]]},"2503":{"position":[[473,5],[560,5],[1093,5],[1167,5]]},"2507":{"position":[[559,5],[1003,5],[1090,5],[1659,5],[1733,5]]},"2513":{"position":[[936,5],[1050,6]]},"2521":{"position":[[578,6]]},"2523":{"position":[[67,6]]},"2525":{"position":[[785,6],[942,5]]},"2537":{"position":[[32,8],[811,5],[888,5]]},"2541":{"position":[[184,6],[240,6]]},"2545":{"position":[[61,5]]},"2547":{"position":[[129,5],[245,6],[252,5]]},"2549":{"position":[[510,6]]},"2567":{"position":[[166,5],[761,5]]},"2569":{"position":[[15,5]]}}}],["errorhandl",{"_index":381,"t":{"2501":{"position":[[218,12],[261,12]]},"2547":{"position":[[215,12],[258,12]]}}}],["errors.new(\"abc",{"_index":632,"t":{"2537":{"position":[[826,17]]}}}],["errorstatuscodehandl",{"_index":188,"t":{"2457":{"position":[[294,22]]}}}],["event",{"_index":228,"t":{"2469":{"position":[[421,5]]},"2471":{"position":[[1159,5]]},"2473":{"position":[[332,5]]}}}],["exampl",{"_index":470,"t":{"2507":{"position":[[206,8]]},"2525":{"position":[[41,7]]},"2535":{"position":[[16,7]]},"2539":{"position":[[267,8],[554,8]]},"2553":{"position":[[11,8]]}}}],["example.authz",{"_index":564,"t":{"2525":{"position":[[387,13]]}}}],["example/loc",{"_index":116,"t":{"2447":{"position":[[169,20]]},"2449":{"position":[[247,21]]}}}],["except",{"_index":504,"t":{"2511":{"position":[[55,9]]}}}],["execut",{"_index":380,"t":{"2501":{"position":[[186,8],[302,8]]},"2547":{"position":[[178,8],[299,8]]}}}],["exist",{"_index":187,"t":{"2457":{"position":[[267,8]]}}}],["exit",{"_index":672,"t":{"2539":{"position":[[407,6]]}}}],["exp",{"_index":437,"t":{"2503":{"position":[[732,6]]},"2507":{"position":[[1262,6]]}}}],["expect",{"_index":667,"t":{"2539":{"position":[[162,6]]}}}],["expir",{"_index":382,"t":{"2501":{"position":[[348,7]]},"2547":{"position":[[345,7]]}}}],["export",{"_index":639,"t":{"2537":{"position":[[1082,9]]}}}],["extend",{"_index":397,"t":{"2501":{"position":[[683,10]]}}}],["extern",{"_index":516,"t":{"2513":{"position":[[251,8]]}}}],["extract",{"_index":597,"t":{"2533":{"position":[[635,10]]},"2547":{"position":[[1164,7]]}}}],["eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyjlehaioje0nje5ntcxmzz9.rb3arc4",{"_index":459,"t":{"2505":{"position":[[136,70],[382,69]]}}}],["fallback",{"_index":385,"t":{"2501":{"position":[[422,8]]}}}],["fals",{"_index":183,"t":{"2457":{"position":[[175,5]]},"2469":{"position":[[156,5],[370,6],[377,5]]},"2521":{"position":[[190,5]]},"2525":{"position":[[418,5]]}}}],["fasthttp",{"_index":715,"t":{"2563":{"position":[[9,8]]}}}],["fetch",{"_index":82,"t":{"2435":{"position":[[388,5]]},"2437":{"position":[[388,5]]},"2439":{"position":[[388,5]]}}}],["ffffffffffffffffffffffffffffffffffffffff",{"_index":198,"t":{"2459":{"position":[[240,43]]}}}],["fiber",{"_index":20,"t":{"2425":{"position":[[22,6]]},"2441":{"position":[[20,6]]},"2443":{"position":[[25,5]]},"2451":{"position":[[21,6]]},"2457":{"position":[[127,5]]},"2463":{"position":[[19,6]]},"2465":{"position":[[25,5]]},"2475":{"position":[[24,6]]},"2477":{"position":[[25,5]]},"2485":{"position":[[28,6]]},"2487":{"position":[[25,5]]},"2497":{"position":[[25,5]]},"2515":{"position":[[30,6]]},"2525":{"position":[[4,5]]},"2527":{"position":[[26,6]]},"2529":{"position":[[25,5]]},"2539":{"position":[[29,5],[217,5],[234,5],[303,5],[316,5],[333,5],[385,5],[441,5],[487,5]]},"2543":{"position":[[25,5]]},"2551":{"position":[[23,6]]},"2557":{"position":[[50,5],[162,5],[221,5]]},"2563":{"position":[[32,5]]}}}],["fiber.ctx",{"_index":81,"t":{"2435":{"position":[[364,11],[552,11],[741,11]]},"2437":{"position":[[364,11],[518,11]]},"2439":{"position":[[364,11],[495,11]]},"2447":{"position":[[46,11],[750,11],[833,10]]},"2449":{"position":[[399,11],[506,11]]},"2457":{"position":[[324,11]]},"2459":{"position":[[152,11]]},"2461":{"position":[[379,11]]},"2471":{"position":[[1342,11],[1536,11],[1594,11]]},"2481":{"position":[[564,11]]},"2483":{"position":[[261,11]]},"2491":{"position":[[751,11]]},"2493":{"position":[[302,11]]},"2503":{"position":[[461,11],[1081,11],[1155,11]]},"2507":{"position":[[991,11],[1647,11],[1721,11]]},"2513":{"position":[[924,11]]},"2521":{"position":[[541,11]]},"2523":{"position":[[30,11]]},"2525":{"position":[[748,11],[930,11]]},"2537":{"position":[[799,11],[876,11]]},"2563":{"position":[[53,10]]},"2567":{"position":[[154,11]]},"2569":{"position":[[190,11]]}}}],["fiber.errupgraderequir",{"_index":725,"t":{"2567":{"position":[[359,24]]}}}],["fiber.handl",{"_index":105,"t":{"2445":{"position":[[33,13]]},"2455":{"position":[[47,13]]},"2467":{"position":[[34,13]]},"2479":{"position":[[31,13]]},"2489":{"position":[[35,13]]},"2519":{"position":[[37,13]]},"2531":{"position":[[37,13]]},"2555":{"position":[[27,13]]}}}],["fiber.new",{"_index":74,"t":{"2435":{"position":[[182,11]]},"2437":{"position":[[182,11]]},"2439":{"position":[[182,11]]},"2449":{"position":[[183,11]]},"2459":{"position":[[118,11]]},"2461":{"position":[[345,11]]},"2471":{"position":[[1215,11]]},"2483":{"position":[[137,11]]},"2493":{"position":[[141,11]]},"2503":{"position":[[154,11]]},"2507":{"position":[[433,11]]},"2513":{"position":[[824,11]]},"2525":{"position":[[355,11]]},"2537":{"position":[[728,11]]},"2557":{"position":[[184,12]]},"2567":{"position":[[120,11]]},"2569":{"position":[[133,11]]}}}],["fiber.statusforbidden",{"_index":569,"t":{"2525":{"position":[[608,22]]}}}],["fiberi18n",{"_index":6,"t":{"2423":{"position":[[7,9]]}}}],["fiberi18n.new(&fiberi18n.config",{"_index":157,"t":{"2449":{"position":[[204,32]]}}}],["fiberi18n.new(config",{"_index":103,"t":{"2445":{"position":[[0,20]]}}}],["fibernewrelic.config",{"_index":172,"t":{"2455":{"position":[[25,21]]},"2459":{"position":[[209,21]]},"2461":{"position":[[436,21]]}}}],["fibernewrelic.new(config",{"_index":171,"t":{"2455":{"position":[[0,24]]}}}],["fibersentri",{"_index":7,"t":{"2423":{"position":[[17,11]]},"2471":{"position":[[0,11],[593,12]]}}}],["fibersentry.gethubfromcontext",{"_index":245,"t":{"2471":{"position":[[232,31]]}}}],["fibersentry.gethubfromcontext(c",{"_index":283,"t":{"2471":{"position":[[1372,33],[1624,33]]}}}],["fibersentry.new(config",{"_index":211,"t":{"2467":{"position":[[0,22]]}}}],["fiberzap",{"_index":8,"t":{"2423":{"position":[[29,8]]}}}],["fiberzap.new(config",{"_index":305,"t":{"2479":{"position":[[0,19]]}}}],["fiberzerolog",{"_index":9,"t":{"2423":{"position":[[38,12]]}}}],["fiberzerolog.new(config",{"_index":341,"t":{"2489":{"position":[[0,23]]}}}],["field",{"_index":311,"t":{"2481":{"position":[[183,6],[203,6]]},"2491":{"position":[[361,6],[381,6]]},"2501":{"position":[[546,5]]}}}],["file",{"_index":39,"t":{"2431":{"position":[[61,4]]},"2433":{"position":[[13,4]]},"2447":{"position":[[370,5],[553,5],[707,6]]}}}],["filepath",{"_index":713,"t":{"2561":{"position":[[61,9]]}}}],["filter",{"_index":378,"t":{"2501":{"position":[[34,6]]}}}],["fine",{"_index":297,"t":{"2471":{"position":[[1846,6]]}}}],["finish",{"_index":674,"t":{"2539":{"position":[[536,8]]}}}],["fmt",{"_index":260,"t":{"2471":{"position":[[628,5]]},"2513":{"position":[[693,5]]}}}],["fmt.errorf(\"unexpect",{"_index":532,"t":{"2513":{"position":[[1143,22]]}}}],["fmt.println(c.hostnam",{"_index":301,"t":{"2473":{"position":[[295,25]]}}}],["fmt.println(ev",{"_index":277,"t":{"2471":{"position":[[1133,18]]}}}],["fmt.println(utils.immutablestring(c.hostnam",{"_index":276,"t":{"2471":{"position":[[1080,48]]}}}],["folder",{"_index":115,"t":{"2447":{"position":[[156,6]]}}}],["follow",{"_index":559,"t":{"2525":{"position":[[31,9]]},"2557":{"position":[[248,9]]}}}],["forbidden",{"_index":62,"t":{"2431":{"position":[[426,9],[477,9],[497,9]]},"2525":{"position":[[662,11]]}}}],["form",{"_index":401,"t":{"2501":{"position":[[796,4]]}}}],["format",{"_index":505,"t":{"2511":{"position":[[139,6]]}}}],["formatbundlefil",{"_index":124,"t":{"2447":{"position":[[321,16]]}}}],["formatt",{"_index":604,"t":{"2533":{"position":[[992,9]]}}}],["forward",{"_index":222,"t":{"2469":{"position":[[262,7]]}}}],["found",{"_index":575,"t":{"2527":{"position":[[40,5]]}}}],["framework",{"_index":705,"t":{"2557":{"position":[[60,9]]}}}],["func",{"_index":72,"t":{"2435":{"position":[[161,4]]},"2437":{"position":[[161,4]]},"2439":{"position":[[161,4]]},"2449":{"position":[[162,4]]},"2459":{"position":[[97,4]]},"2461":{"position":[[140,4]]},"2471":{"position":[[782,4]]},"2481":{"position":[[723,4]]},"2483":{"position":[[116,4],[253,4]]},"2491":{"position":[[910,4]]},"2493":{"position":[[120,4],[294,4]]},"2501":{"position":[[1039,6]]},"2503":{"position":[[133,4],[448,4],[1063,4],[1137,4]]},"2507":{"position":[[412,4],[978,4],[1629,4],[1703,4]]},"2513":{"position":[[803,4],[975,4]]},"2521":{"position":[[519,4]]},"2525":{"position":[[334,4],[738,4]]},"2537":{"position":[[550,4],[589,6],[1037,4],[1562,4]]},"2555":{"position":[[0,4]]},"2567":{"position":[[99,4]]}}}],["func(*ctx",{"_index":306,"t":{"2481":{"position":[[39,10]]},"2491":{"position":[[39,10]]},"2547":{"position":[[39,10]]}}}],["func(*fiber.ctx",{"_index":53,"t":{"2431":{"position":[[281,16],[349,16],[436,16]]},"2491":{"position":[[231,16]]},"2499":{"position":[[38,16]]},"2501":{"position":[[41,16],[120,16],[231,16]]},"2533":{"position":[[39,16],[856,16]]},"2545":{"position":[[44,16]]},"2547":{"position":[[112,16],[228,16]]}}}],["func(c",{"_index":80,"t":{"2435":{"position":[[357,6],[545,6],[734,6]]},"2437":{"position":[[357,6],[511,6]]},"2439":{"position":[[357,6],[488,6]]},"2447":{"position":[[39,6]]},"2449":{"position":[[392,6]]},"2457":{"position":[[317,6]]},"2471":{"position":[[1335,6],[1529,6],[1587,6]]},"2481":{"position":[[557,6]]},"2491":{"position":[[744,6]]},"2513":{"position":[[917,6]]},"2523":{"position":[[23,6]]},"2537":{"position":[[869,6]]},"2567":{"position":[[147,6]]},"2569":{"position":[[183,6]]}}}],["func(ctx",{"_index":142,"t":{"2447":{"position":[[741,8]]},"2449":{"position":[[497,8]]},"2459":{"position":[[143,8]]},"2461":{"position":[[370,8]]},"2525":{"position":[[921,8]]},"2537":{"position":[[790,8]]}}}],["func(ev",{"_index":266,"t":{"2471":{"position":[[855,10]]},"2473":{"position":[[70,10]]}}}],["func(t",{"_index":527,"t":{"2513":{"position":[[1017,6]]}}}],["function",{"_index":108,"t":{"2447":{"position":[[65,8],[671,8]]},"2481":{"position":[[64,8],[592,8]]},"2491":{"position":[[64,8],[779,8]]},"2501":{"position":[[73,8],[168,8],[284,8],[1089,8]]},"2513":{"position":[[31,8],[97,8]]},"2521":{"position":[[485,8]]},"2533":{"position":[[70,8],[888,8]]},"2547":{"position":[[65,8],[160,8],[281,8],[396,8],[498,9],[542,9],[557,8]]},"2549":{"position":[[85,8],[428,8]]}}}],["gener",{"_index":49,"t":{"2431":{"position":[[219,9]]},"2503":{"position":[[858,8]]},"2507":{"position":[[314,9],[464,8],[1388,8]]},"2539":{"position":[[105,9],[428,9]]},"2547":{"position":[[668,8],[814,8],[957,8]]}}}],["getlogg",{"_index":344,"t":{"2491":{"position":[[221,9]]}}}],["getresbodi",{"_index":326,"t":{"2481":{"position":[[546,10],[712,10]]},"2491":{"position":[[733,10],[899,10]]}}}],["getus",{"_index":656,"t":{"2537":{"position":[[1645,10]]}}}],["getuser(c.usercontext",{"_index":636,"t":{"2537":{"position":[[925,24]]}}}],["getuser(ctx",{"_index":653,"t":{"2537":{"position":[[1567,11]]}}}],["github",{"_index":476,"t":{"2507":{"position":[[370,6]]}}}],["github.com/casbin/xorm",{"_index":28,"t":{"2427":{"position":[[120,22]]},"2435":{"position":[[123,23]]},"2437":{"position":[[123,23]]},"2439":{"position":[[123,23]]}}}],["github.com/getsentry/sentri",{"_index":210,"t":{"2465":{"position":[[132,27]]},"2471":{"position":[[640,28]]}}}],["github.com/go",{"_index":68,"t":{"2435":{"position":[[90,14]]},"2437":{"position":[[90,14]]},"2439":{"position":[[90,14]]}}}],["github.com/gofiber/contrib/casbin",{"_index":24,"t":{"2427":{"position":[[48,33]]},"2435":{"position":[[52,35]]},"2437":{"position":[[52,35]]},"2439":{"position":[[52,35]]}}}],["github.com/gofiber/contrib/fiberi18n",{"_index":102,"t":{"2443":{"position":[[83,36]]},"2449":{"position":[[22,38]]}}}],["github.com/gofiber/contrib/fibernewrel",{"_index":170,"t":{"2453":{"position":[[48,40]]},"2459":{"position":[[52,42]]},"2461":{"position":[[52,42]]}}}],["github.com/gofiber/contrib/fibersentri",{"_index":209,"t":{"2465":{"position":[[83,38]]},"2471":{"position":[[673,40]]}}}],["github.com/gofiber/contrib/fiberzap",{"_index":303,"t":{"2477":{"position":[[83,35]]},"2483":{"position":[[58,37]]}}}],["github.com/gofiber/contrib/fiberzerolog",{"_index":339,"t":{"2487":{"position":[[83,39]]},"2493":{"position":[[52,41]]}}}],["github.com/gofiber/contrib/jwt",{"_index":373,"t":{"2497":{"position":[[109,30]]},"2503":{"position":[[67,32]]},"2507":{"position":[[131,32]]},"2513":{"position":[[737,32]]}}}],["github.com/gofiber/contrib/opafib",{"_index":540,"t":{"2517":{"position":[[48,35]]},"2525":{"position":[[294,37]]}}}],["github.com/gofiber/contrib/otelfib",{"_index":577,"t":{"2529":{"position":[[45,36]]},"2537":{"position":[[117,38]]}}}],["github.com/gofiber/contrib/paseto",{"_index":677,"t":{"2543":{"position":[[83,33]]}}}],["github.com/gofiber/contrib/swagg",{"_index":706,"t":{"2557":{"position":[[109,36]]}}}],["github.com/gofiber/contrib/websocket",{"_index":718,"t":{"2565":{"position":[[48,36]]},"2567":{"position":[[58,38]]}}}],["github.com/gofiber/fiber/v2",{"_index":23,"t":{"2427":{"position":[[10,27]]},"2435":{"position":[[22,29]]},"2437":{"position":[[22,29]]},"2439":{"position":[[22,29]]},"2443":{"position":[[45,27]]},"2449":{"position":[[61,29]]},"2453":{"position":[[10,27]]},"2459":{"position":[[22,29]]},"2461":{"position":[[22,29]]},"2465":{"position":[[45,27]]},"2471":{"position":[[714,29]]},"2477":{"position":[[45,27]]},"2483":{"position":[[28,29]]},"2487":{"position":[[45,27]]},"2493":{"position":[[22,29]]},"2497":{"position":[[71,27]]},"2503":{"position":[[29,29]]},"2507":{"position":[[62,29]]},"2513":{"position":[[699,29]]},"2517":{"position":[[10,27]]},"2525":{"position":[[264,29]]},"2537":{"position":[[87,29]]},"2543":{"position":[[45,27]]},"2557":{"position":[[79,29]]},"2565":{"position":[[10,27]]},"2567":{"position":[[28,29]]}}}],["github.com/gofiber/fiber/v2/util",{"_index":262,"t":{"2471":{"position":[[744,35]]}}}],["github.com/golang",{"_index":374,"t":{"2497":{"position":[[150,17]]},"2503":{"position":[[100,18]]},"2507":{"position":[[92,18]]},"2513":{"position":[[770,18]]}}}],["github.com/newrelic/go",{"_index":201,"t":{"2461":{"position":[[95,23]]}}}],["github.com/nicksnyder/go",{"_index":153,"t":{"2449":{"position":[[91,25]]}}}],["github.com/o1egl/paseto",{"_index":678,"t":{"2543":{"position":[[127,23]]}}}],["github.com/rs/zerolog",{"_index":351,"t":{"2493":{"position":[[94,23]]}}}],["github.com/rs/zerolog/log",{"_index":340,"t":{"2487":{"position":[[133,25]]}}}],["global",{"_index":250,"t":{"2471":{"position":[[379,6]]},"2533":{"position":[[253,6],[381,6],[704,6]]}}}],["go",{"_index":21,"t":{"2427":{"position":[[0,2],[38,2],[110,2]]},"2441":{"position":[[0,2]]},"2443":{"position":[[35,2],[73,2]]},"2453":{"position":[[0,2],[38,2]]},"2465":{"position":[[35,2],[73,2],[122,2],[160,2]]},"2471":{"position":[[669,3]]},"2477":{"position":[[35,2],[73,2],[119,2]]},"2487":{"position":[[35,2],[73,2],[123,2]]},"2497":{"position":[[61,2],[99,2],[140,2]]},"2515":{"position":[[52,2]]},"2517":{"position":[[0,2],[38,2]]},"2529":{"position":[[35,2]]},"2543":{"position":[[35,2],[73,2],[117,2]]},"2565":{"position":[[0,2],[38,2]]}}}],["go#hub",{"_index":236,"t":{"2471":{"position":[[95,7]]}}}],["go.opentelemetry.io/otel",{"_index":609,"t":{"2537":{"position":[[156,26]]}}}],["go.opentelemetry.io/otel/attribut",{"_index":610,"t":{"2537":{"position":[[183,36]]}}}],["go.opentelemetry.io/otel/exporters/jaeg",{"_index":613,"t":{"2537":{"position":[[283,45]]}}}],["go.opentelemetry.io/otel/exporters/stdout/stdouttrac",{"_index":612,"t":{"2537":{"position":[[227,55]]}}}],["go.opentelemetry.io/otel/propag",{"_index":614,"t":{"2537":{"position":[[329,38]]}}}],["go.opentelemetry.io/otel/sdk/resourc",{"_index":608,"t":{"2537":{"position":[[47,39]]}}}],["go.opentelemetry.io/otel/sdk/trac",{"_index":616,"t":{"2537":{"position":[[377,36]]}}}],["go.opentelemetry.io/otel/semconv/v1.4.0",{"_index":618,"t":{"2537":{"position":[[422,41]]}}}],["go.opentelemetry.io/otel/trac",{"_index":620,"t":{"2537":{"position":[[474,32]]}}}],["go.uber.org/zap",{"_index":304,"t":{"2477":{"position":[[129,15]]},"2483":{"position":[[96,17]]}}}],["gofib",{"_index":662,"t":{"2539":{"position":[[21,7]]}}}],["golang.org/x/text/languag",{"_index":155,"t":{"2449":{"position":[[131,28]]}}}],["gorm",{"_index":63,"t":{"2433":{"position":[[0,4]]}}}],["h",{"_index":463,"t":{"2505":{"position":[[357,1]]}}}],["handl",{"_index":145,"t":{"2447":{"position":[[822,7]]},"2551":{"position":[[45,7]]}}}],["handler",{"_index":88,"t":{"2435":{"position":[[580,7],[769,7]]},"2437":{"position":[[546,7]]},"2439":{"position":[[523,7]]},"2495":{"position":[[115,8]]},"2541":{"position":[[124,8]]}}}],["handshak",{"_index":750,"t":{"2569":{"position":[[36,9]]}}}],["header",{"_index":148,"t":{"2447":{"position":[[888,6]]},"2501":{"position":[[917,7]]},"2505":{"position":[[317,7]]},"2521":{"position":[[400,7]]},"2525":{"position":[[160,10]]}}}],["header\",\"author",{"_index":695,"t":{"2547":{"position":[[1195,26]]}}}],["header:author",{"_index":403,"t":{"2501":{"position":[[833,22]]}}}],["here",{"_index":27,"t":{"2427":{"position":[[105,4]]}}}],["hint",{"_index":268,"t":{"2471":{"position":[[881,4]]},"2473":{"position":[[96,4]]}}}],["hint.context",{"_index":270,"t":{"2471":{"position":[[924,12]]},"2473":{"position":[[139,12]]}}}],["hint.context.value(sentry.requestcontextkey).(*fiber.ctx",{"_index":273,"t":{"2471":{"position":[[958,58]]},"2473":{"position":[[173,58]]}}}],["hs256",{"_index":502,"t":{"2509":{"position":[[39,5]]}}}],["http",{"_index":185,"t":{"2457":{"position":[[209,4],[217,5],[236,6]]},"2521":{"position":[[217,4],[304,4]]},"2533":{"position":[[539,5],[553,6],[667,4]]},"2539":{"position":[[3,4],[369,4]]}}}],["http.server_nam",{"_index":600,"t":{"2533":{"position":[[792,16]]}}}],["http://localhost:3000/login",{"_index":458,"t":{"2505":{"position":[[88,27]]}}}],["https://godoc.org/github.com/getsentry/sentri",{"_index":235,"t":{"2471":{"position":[[48,46]]}}}],["https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg",{"_index":737,"t":{"2567":{"position":[[666,60]]}}}],["https://www.websocket.org/echo.html",{"_index":749,"t":{"2567":{"position":[[1072,35]]}}}],["hub",{"_index":282,"t":{"2471":{"position":[[1365,3],[1406,3],[1617,3],[1658,3]]}}}],["hub.capturemessage(\"us",{"_index":295,"t":{"2471":{"position":[[1767,24]]}}}],["hub.scope().settag(\"somerandomtag",{"_index":284,"t":{"2471":{"position":[[1419,35]]}}}],["hub.withscope(func(scop",{"_index":291,"t":{"2471":{"position":[[1671,24]]}}}],["i18n",{"_index":99,"t":{"2441":{"position":[[3,4]]},"2447":{"position":[[142,4]]}}}],["i18n.unmarshalfunc",{"_index":138,"t":{"2447":{"position":[[648,18]]}}}],["i18n/v2/i18n",{"_index":154,"t":{"2449":{"position":[[117,13]]}}}],["id",{"_index":634,"t":{"2537":{"position":[[896,2],[950,3],[984,3],[1596,2],[1704,5],[1730,2]]}}}],["ident",{"_index":501,"t":{"2509":{"position":[[22,9]]},"2511":{"position":[[14,9]]}}}],["ignor",{"_index":518,"t":{"2513":{"position":[[355,8]]}}}],["implement",{"_index":128,"t":{"2447":{"position":[[483,14]]},"2513":{"position":[[594,14],[1224,14]]}}}],["import",{"_index":66,"t":{"2435":{"position":[[13,6]]},"2437":{"position":[[13,6]]},"2439":{"position":[[13,6]]},"2449":{"position":[[13,6]]},"2459":{"position":[[13,6]]},"2461":{"position":[[13,6]]},"2471":{"position":[[619,6]]},"2483":{"position":[[13,6]]},"2493":{"position":[[13,6]]},"2503":{"position":[[13,6]]},"2507":{"position":[[13,6]]},"2513":{"position":[[684,6]]},"2525":{"position":[[255,6]]},"2537":{"position":[[13,6]]},"2557":{"position":[[0,6],[70,6]]},"2567":{"position":[[13,6]]}}}],["includ",{"_index":548,"t":{"2521":{"position":[[145,7],[392,7]]}}}],["includehead",{"_index":554,"t":{"2521":{"position":[[368,14]]},"2525":{"position":[[674,15]]}}}],["includequerystr",{"_index":547,"t":{"2521":{"position":[[121,18]]},"2525":{"position":[[564,19]]}}}],["index",{"_index":738,"t":{"2567":{"position":[[727,5]]}}}],["inform",{"_index":394,"t":{"2501":{"position":[[607,11]]},"2533":{"position":[[646,11]]},"2539":{"position":[[120,11]]},"2547":{"position":[[1029,11]]}}}],["initi",{"_index":707,"t":{"2557":{"position":[[207,8]]}}}],["inittrac",{"_index":624,"t":{"2537":{"position":[[570,12],[1042,12]]}}}],["input",{"_index":549,"t":{"2521":{"position":[[169,5],[411,5],[505,5]]},"2525":{"position":[[78,6]]}}}],["input.method",{"_index":566,"t":{"2525":{"position":[[432,12]]}}}],["inputcreationfunc",{"_index":556,"t":{"2521":{"position":[[454,17]]},"2523":{"position":[[5,17]]}}}],["inputcreationmethod",{"_index":555,"t":{"2521":{"position":[[434,19]]},"2525":{"position":[[717,20]]}}}],["instal",{"_index":371,"t":{"2497":{"position":[[40,7]]},"2539":{"position":[[193,10]]}}}],["instanc",{"_index":233,"t":{"2471":{"position":[[24,8]]}}}],["instead",{"_index":249,"t":{"2471":{"position":[[364,7]]}}}],["instruct",{"_index":666,"t":{"2539":{"position":[[149,12]]}}}],["instrument",{"_index":663,"t":{"2539":{"position":[[39,16]]}}}],["int",{"_index":190,"t":{"2457":{"position":[[347,3]]},"2521":{"position":[[213,3]]},"2533":{"position":[[416,4]]},"2567":{"position":[[742,3]]}}}],["interfac",{"_index":129,"t":{"2447":{"position":[[512,10]]},"2501":{"position":[[371,11]]},"2513":{"position":[[1036,13]]}}}],["intern",{"_index":523,"t":{"2513":{"position":[[585,8]]}}}],["invalid",{"_index":361,"t":{"2495":{"position":[[128,7]]},"2501":{"position":[[318,7],[337,7]]},"2541":{"position":[[137,7]]},"2547":{"position":[[315,7],[334,7]]}}}],["io.read",{"_index":546,"t":{"2521":{"position":[[86,9]]}}}],["issu",{"_index":515,"t":{"2513":{"position":[[238,6]]}}}],["iswebsocketupgrad",{"_index":720,"t":{"2567":{"position":[[177,18]]}}}],["it'",{"_index":223,"t":{"2469":{"position":[[320,4]]},"2491":{"position":[[293,4]]}}}],["itself",{"_index":246,"t":{"2471":{"position":[[286,6]]}}}],["john",{"_index":432,"t":{"2503":{"position":[[577,6],[705,5]]},"2505":{"position":[[506,4]]},"2507":{"position":[[1107,6],[1235,5]]},"2525":{"position":[[144,6]]}}}],["json",{"_index":355,"t":{"2495":{"position":[[14,4]]},"2501":{"position":[[1200,4]]},"2511":{"position":[[116,4]]}}}],["jwk",{"_index":415,"t":{"2501":{"position":[[1213,5]]},"2511":{"position":[[129,5]]}}}],["jwkseturl",{"_index":412,"t":{"2501":{"position":[[1162,10]]},"2511":{"position":[[70,10]]}}}],["jwt",{"_index":10,"t":{"2423":{"position":[[51,3]]},"2495":{"position":[[0,3],[29,5]]},"2501":{"position":[[356,3],[1245,5]]},"2503":{"position":[[260,3]]},"2507":{"position":[[761,3]]},"2511":{"position":[[33,3]]},"2513":{"position":[[1166,3]]}}}],["jwt.claim",{"_index":396,"t":{"2501":{"position":[[662,9]]}}}],["jwt.keyfunc",{"_index":409,"t":{"2501":{"position":[[1046,11]]},"2513":{"position":[[996,11]]}}}],["jwt.mapclaim",{"_index":399,"t":{"2501":{"position":[[730,15]]},"2503":{"position":[[682,14]]},"2507":{"position":[[1212,14]]}}}],["jwt.newwithclaims(jwt.signingmethodhs256",{"_index":440,"t":{"2503":{"position":[[805,41]]}}}],["jwt.newwithclaims(jwt.signingmethodrs256",{"_index":496,"t":{"2507":{"position":[[1335,41]]}}}],["jwt.token",{"_index":528,"t":{"2513":{"position":[[1024,11]]}}}],["jwt/jwt/v5",{"_index":375,"t":{"2497":{"position":[[168,10]]},"2503":{"position":[[119,11]]},"2507":{"position":[[111,11]]},"2513":{"position":[[789,11]]}}}],["jwtalg",{"_index":493,"t":{"2507":{"position":[[844,7]]}}}],["jwtkeyfunc",{"_index":411,"t":{"2501":{"position":[[1151,10]]}}}],["jwtware",{"_index":418,"t":{"2503":{"position":[[59,7]]},"2507":{"position":[[123,7]]},"2513":{"position":[[729,7]]}}}],["jwtware.config",{"_index":377,"t":{"2499":{"position":[[19,18]]}}}],["jwtware.hs256",{"_index":531,"t":{"2513":{"position":[[1115,13]]}}}],["jwtware.new(config",{"_index":376,"t":{"2499":{"position":[[0,18]]}}}],["jwtware.rs256",{"_index":494,"t":{"2507":{"position":[[852,14]]}}}],["jwtware.signingkey",{"_index":492,"t":{"2507":{"position":[[824,19]]}}}],["jwtware.signingkey{key",{"_index":423,"t":{"2503":{"position":[[323,23]]}}}],["keep",{"_index":254,"t":{"2471":{"position":[[460,5],[511,4]]}}}],["key",{"_index":177,"t":{"2457":{"position":[[78,3]]},"2501":{"position":[[391,3],[514,4],[589,3],[1123,3],[1209,3]]},"2507":{"position":[[290,3],[305,3],[359,3],[494,3],[867,4]]},"2511":{"position":[[97,4],[125,3]]},"2513":{"position":[[65,3],[182,4],[427,4],[666,4],[1258,3]]},"2547":{"position":[[615,3],[732,3],[876,3],[1011,3]]}}}],["keyfunc",{"_index":408,"t":{"2501":{"position":[[1031,7],[1058,7]]},"2513":{"position":[[0,7],[202,7],[287,7],[474,8],[872,8]]}}}],["kid",{"_index":390,"t":{"2501":{"position":[[542,3]]}}}],["kind",{"_index":144,"t":{"2447":{"position":[[805,4]]}}}],["lang",{"_index":152,"t":{"2447":{"position":[[930,5]]}}}],["langhandl",{"_index":141,"t":{"2447":{"position":[[729,11]]}}}],["languag",{"_index":120,"t":{"2447":{"position":[[237,9],[433,8],[813,8],[902,8]]}}}],["language.chines",{"_index":158,"t":{"2449":{"position":[[355,17]]}}}],["language.english",{"_index":123,"t":{"2447":{"position":[[303,17],[448,16]]},"2449":{"position":[[319,18]]}}}],["language.tag",{"_index":118,"t":{"2447":{"position":[[206,14],[399,12]]}}}],["language.tag{language.chines",{"_index":122,"t":{"2447":{"position":[[270,32]]},"2449":{"position":[[286,32]]}}}],["length",{"_index":386,"t":{"2501":{"position":[[450,6]]}}}],["level",{"_index":319,"t":{"2481":{"position":[[372,6],[411,7]]},"2491":{"position":[[559,6],[598,7]]}}}],["licens",{"_index":173,"t":{"2457":{"position":[[34,7],[70,7]]},"2459":{"position":[[231,8]]}}}],["lifetim",{"_index":243,"t":{"2471":{"position":[[191,9]]}}}],["load",{"_index":536,"t":{"2513":{"position":[[1242,7]]}}}],["loader",{"_index":127,"t":{"2447":{"position":[[465,6],[472,6],[505,6]]}}}],["loaderfunc(os.readfil",{"_index":136,"t":{"2447":{"position":[[610,23]]}}}],["local",{"_index":688,"t":{"2547":{"position":[[677,5]]},"2549":{"position":[[243,5]]},"2563":{"position":[[77,7]]}}}],["localhost:3000/restrict",{"_index":462,"t":{"2505":{"position":[[330,25]]}}}],["log",{"_index":261,"t":{"2471":{"position":[[634,5]]},"2475":{"position":[[4,7]]},"2481":{"position":[[516,7]]},"2483":{"position":[[22,5]]},"2485":{"position":[[8,7]]},"2491":{"position":[[703,7]]},"2507":{"position":[[49,5]]},"2537":{"position":[[41,5]]},"2539":{"position":[[461,5],[482,4]]},"2567":{"position":[[22,5]]}}}],["log.fatal(app.listen(\":3000",{"_index":299,"t":{"2471":{"position":[[1897,30]]},"2483":{"position":[[321,30]]},"2537":{"position":[[1004,30]]},"2567":{"position":[[973,30]]}}}],["log.fatal(err",{"_index":641,"t":{"2537":{"position":[[1152,14]]}}}],["log.fatalf(\"rsa.generatekey",{"_index":490,"t":{"2507":{"position":[[626,28]]}}}],["log.printf(\"error",{"_index":627,"t":{"2537":{"position":[[656,17]]}}}],["log.printf(\"recv",{"_index":744,"t":{"2567":{"position":[[857,17]]}}}],["log.printf(\"token.signedstr",{"_index":498,"t":{"2507":{"position":[[1493,31]]}}}],["log.println(\"read",{"_index":742,"t":{"2567":{"position":[[823,20]]}}}],["log.println(\"writ",{"_index":747,"t":{"2567":{"position":[[932,21]]}}}],["log.println(c.cookies(\"sess",{"_index":735,"t":{"2567":{"position":[[599,33]]}}}],["log.println(c.locals(\"allow",{"_index":731,"t":{"2567":{"position":[[490,32]]}}}],["log.println(c.params(\"id",{"_index":732,"t":{"2567":{"position":[[531,27]]}}}],["log.println(c.query(\"v",{"_index":733,"t":{"2567":{"position":[[566,25]]}}}],["logger",{"_index":307,"t":{"2481":{"position":[[120,6],[154,7]]},"2483":{"position":[[149,7],[220,7],[228,7]]},"2491":{"position":[[120,6],[162,7],[282,7],[319,6],[343,6]]},"2493":{"position":[[153,6],[260,7],[268,8]]}}}],["logger.fatal().err(err).msg(\"fib",{"_index":354,"t":{"2493":{"position":[[406,34]]}}}],["login",{"_index":419,"t":{"2503":{"position":[[169,5],[200,6]]},"2505":{"position":[[0,5]]},"2507":{"position":[[670,5],[701,6]]}}}],["login(c",{"_index":427,"t":{"2503":{"position":[[453,7]]},"2507":{"position":[[983,7]]}}}],["look",{"_index":54,"t":{"2431":{"position":[[305,4]]}}}],["lookup",{"_index":52,"t":{"2431":{"position":[[274,6]]},"2435":{"position":[[349,7]]},"2437":{"position":[[349,7]]},"2439":{"position":[[349,7]]}}}],["main",{"_index":65,"t":{"2435":{"position":[[8,4],[166,6]]},"2437":{"position":[[8,4],[166,6]]},"2439":{"position":[[8,4],[166,6]]},"2449":{"position":[[8,4],[167,6]]},"2459":{"position":[[8,4],[102,6]]},"2461":{"position":[[8,4],[145,6]]},"2471":{"position":[[614,4],[787,6]]},"2483":{"position":[[8,4],[121,6]]},"2493":{"position":[[8,4],[125,6]]},"2503":{"position":[[8,4],[138,6]]},"2507":{"position":[[8,4],[417,6]]},"2513":{"position":[[679,4],[808,6]]},"2525":{"position":[[250,4],[339,6]]},"2537":{"position":[[8,4],[555,6]]},"2567":{"position":[[8,4],[104,6]]}}}],["make",{"_index":239,"t":{"2471":{"position":[[135,5]]}}}],["map",{"_index":389,"t":{"2501":{"position":[[499,3]]}}}],["map[string]interfac",{"_index":388,"t":{"2501":{"position":[[476,22]]},"2521":{"position":[[553,24]]},"2523":{"position":[[42,24]]},"2525":{"position":[[760,24],[801,23]]}}}],["map[string]str",{"_index":166,"t":{"2449":{"position":[[639,18]]}}}],["maybeyouneedit",{"_index":285,"t":{"2471":{"position":[[1455,17]]}}}],["messag",{"_index":315,"t":{"2481":{"position":[[276,8],[310,9]]},"2491":{"position":[[463,8],[497,9]]}}}],["messageid",{"_index":163,"t":{"2449":{"position":[[595,10]]}}}],["meter",{"_index":587,"t":{"2533":{"position":[[335,5],[388,5]]}}}],["meterprovid",{"_index":585,"t":{"2533":{"position":[[284,13]]}}}],["method",{"_index":95,"t":{"2437":{"position":[[452,6]]},"2471":{"position":[[264,6]]},"2481":{"position":[[259,9]]},"2491":{"position":[[437,9]]},"2513":{"position":[[1087,6]]},"2525":{"position":[[87,9],[825,9]]},"2563":{"position":[[64,7]]}}}],["method=%v",{"_index":533,"t":{"2513":{"position":[[1178,11]]}}}],["metrics/span",{"_index":592,"t":{"2533":{"position":[[492,13],[822,13]]}}}],["middlewar",{"_index":3,"t":{"2421":{"position":[[27,11]]},"2425":{"position":[[7,10]]},"2431":{"position":[[208,10]]},"2443":{"position":[[5,10]]},"2447":{"position":[[87,10]]},"2465":{"position":[[5,10]]},"2469":{"position":[[136,10],[300,10]]},"2471":{"position":[[319,10],[563,10]]},"2477":{"position":[[5,10]]},"2481":{"position":[[86,10],[665,11]]},"2487":{"position":[[5,10]]},"2491":{"position":[[86,10],[852,11]]},"2495":{"position":[[40,11]]},"2497":{"position":[[5,10]]},"2501":{"position":[[90,10]]},"2503":{"position":[[264,10]]},"2507":{"position":[[765,10]]},"2525":{"position":[[10,10]]},"2529":{"position":[[5,10]]},"2533":{"position":[[92,10]]},"2541":{"position":[[41,11]]},"2543":{"position":[[5,10]]},"2547":{"position":[[82,10],[652,10],[798,10],[941,10]]},"2549":{"position":[[16,11]]},"2551":{"position":[[8,10],[34,10]]},"2557":{"position":[[11,10]]},"2569":{"position":[[67,11]]}}}],["mind",{"_index":258,"t":{"2471":{"position":[[519,4]]}}}],["miss",{"_index":363,"t":{"2495":{"position":[[186,7]]},"2541":{"position":[[195,7]]}}}],["model",{"_index":38,"t":{"2431":{"position":[[55,5]]}}}],["model.conf",{"_index":41,"t":{"2431":{"position":[[71,14]]}}}],["modelfilepath",{"_index":36,"t":{"2431":{"position":[[34,13],[244,13]]},"2435":{"position":[[229,14]]},"2437":{"position":[[229,14]]},"2439":{"position":[[229,14]]}}}],["modul",{"_index":563,"t":{"2525":{"position":[[367,6]]}}}],["move",{"_index":221,"t":{"2469":{"position":[[255,6]]}}}],["msg",{"_index":740,"t":{"2567":{"position":[[746,3],[782,4],[880,4],[913,5]]}}}],["mt",{"_index":739,"t":{"2567":{"position":[[739,2],[778,3]]}}}],["mycustomapi",{"_index":199,"t":{"2459":{"position":[[293,14]]}}}],["name",{"_index":167,"t":{"2449":{"position":[[658,7]]},"2457":{"position":[[122,4]]},"2503":{"position":[[697,7],[1251,4],[1316,5]]},"2507":{"position":[[1227,7],[1817,4],[1882,5]]},"2525":{"position":[[136,7]]},"2533":{"position":[[979,4]]},"2537":{"position":[[917,4],[988,5],[994,6]]}}}],["need",{"_index":699,"t":{"2549":{"position":[[397,6]]}}}],["net.host.port",{"_index":590,"t":{"2533":{"position":[[465,13]]}}}],["never",{"_index":475,"t":{"2507":{"position":[[339,5]]}}}],["new",{"_index":175,"t":{"2457":{"position":[[60,3],[100,3],[165,3],[276,3]]},"2507":{"position":[[475,3]]}}}],["new(config",{"_index":703,"t":{"2555":{"position":[[5,10]]}}}],["newrel",{"_index":11,"t":{"2423":{"position":[[55,8]]},"2451":{"position":[[0,8]]},"2457":{"position":[[373,8]]}}}],["newrelic.configappname(\"mycustomapi",{"_index":205,"t":{"2461":{"position":[[199,38]]}}}],["newrelic.configenabled(tru",{"_index":207,"t":{"2461":{"position":[[306,29]]}}}],["newrelic.configlicense(\"ffffffffffffffffffffffffffffffffffffffff",{"_index":206,"t":{"2461":{"position":[[238,67]]}}}],["newrelic.newappl",{"_index":204,"t":{"2461":{"position":[[174,24]]}}}],["newrelicapp",{"_index":203,"t":{"2461":{"position":[[154,12],[471,11]]}}}],["next",{"_index":106,"t":{"2447":{"position":[[34,4]]},"2481":{"position":[[34,4]]},"2491":{"position":[[34,4]]},"2495":{"position":[[110,4]]},"2533":{"position":[[34,4]]},"2541":{"position":[[119,4]]},"2547":{"position":[[34,4]]},"2569":{"position":[[177,5]]}}}],["nil",{"_index":112,"t":{"2447":{"position":[[118,3]]},"2457":{"position":[[290,3]]},"2471":{"position":[[940,3],[1413,3],[1665,3]]},"2473":{"position":[[155,3]]},"2481":{"position":[[116,3],[638,4],[753,3]]},"2491":{"position":[[116,3],[357,3],[825,4],[940,3]]},"2493":{"position":[[400,3]]},"2501":{"position":[[101,3],[214,3],[460,3],[559,3],[1251,3]]},"2503":{"position":[[963,3]]},"2507":{"position":[[620,3],[1487,3]]},"2513":{"position":[[1138,4],[1333,3]]},"2525":{"position":[[872,3]]},"2533":{"position":[[142,3],[243,3],[371,3]]},"2537":{"position":[[650,3],[1146,3]]},"2547":{"position":[[93,3],[584,3],[691,3],[838,3],[981,3]]},"2567":{"position":[[817,3],[926,3]]}}}],["non",{"_index":328,"t":{"2481":{"position":[[634,3]]},"2491":{"position":[[821,3]]}}}],["none",{"_index":598,"t":{"2533":{"position":[[684,4]]}}}],["note",{"_index":484,"t":{"2507":{"position":[[520,4]]},"2515":{"position":[[37,5]]}}}],["obvious",{"_index":468,"t":{"2507":{"position":[[175,10]]}}}],["ok",{"_index":272,"t":{"2471":{"position":[[952,2],[1017,2]]},"2473":{"position":[[167,2],[232,2]]}}}],["on",{"_index":519,"t":{"2513":{"position":[[372,3]]},"2533":{"position":[[711,4]]},"2539":{"position":[[365,3]]}}}],["opa",{"_index":557,"t":{"2521":{"position":[[515,3]]},"2525":{"position":[[0,3]]}}}],["opafiber.config",{"_index":542,"t":{"2519":{"position":[[20,16]]},"2525":{"position":[[465,16]]}}}],["opafiber.new(config",{"_index":541,"t":{"2519":{"position":[[0,19]]}}}],["open",{"_index":12,"t":{"2423":{"position":[[64,4]]},"2515":{"position":[[0,4]]}}}],["opentelemetri",{"_index":16,"t":{"2423":{"position":[[92,15]]},"2527":{"position":[[0,13],[49,13]]}}}],["option",{"_index":225,"t":{"2469":{"position":[[350,6]]},"2513":{"position":[[389,7]]},"2531":{"position":[[26,10]]},"2547":{"position":[[438,9]]}}}],["order",{"_index":521,"t":{"2513":{"position":[[436,5]]}}}],["origin",{"_index":274,"t":{"2471":{"position":[[1048,8]]},"2473":{"position":[[263,8]]}}}],["os.readfil",{"_index":134,"t":{"2447":{"position":[[575,11]]}}}],["otel.settextmappropagator(propagation.newcompositetextmappropagator(propagation.tracecontext",{"_index":651,"t":{"2537":{"position":[[1430,95]]}}}],["otel.settracerprovider(tp",{"_index":650,"t":{"2537":{"position":[[1403,26]]}}}],["otel.tracer(\"fib",{"_index":621,"t":{"2537":{"position":[[522,18]]}}}],["otelfib",{"_index":15,"t":{"2423":{"position":[[82,9]]},"2537":{"position":[[1751,10]]}}}],["otelfiber.middleware(opt",{"_index":578,"t":{"2531":{"position":[[0,25]]}}}],["otelmetric.meterprovid",{"_index":586,"t":{"2533":{"position":[[298,24]]}}}],["oteltrac",{"_index":619,"t":{"2537":{"position":[[464,9]]}}}],["oteltrace.tracerprovid",{"_index":582,"t":{"2533":{"position":[[161,24]]}}}],["oteltrace.withattributes(attribute.string(\"id",{"_index":657,"t":{"2537":{"position":[[1656,47]]}}}],["oyzasaauhc2w3rewaxat_z2fd3bn4awtgey",{"_index":460,"t":{"2505":{"position":[[207,36],[452,36]]}}}],["packag",{"_index":64,"t":{"2435":{"position":[[0,7]]},"2437":{"position":[[0,7]]},"2439":{"position":[[0,7]]},"2449":{"position":[[0,7]]},"2459":{"position":[[0,7]]},"2461":{"position":[[0,7]]},"2471":{"position":[[606,7]]},"2483":{"position":[[0,7]]},"2493":{"position":[[0,7]]},"2503":{"position":[[0,7]]},"2507":{"position":[[0,7]]},"2513":{"position":[[671,7]]},"2525":{"position":[[242,7],[379,7]]},"2537":{"position":[[0,7]]},"2557":{"position":[[22,7]]},"2567":{"position":[[0,7]]}}}],["pair",{"_index":473,"t":{"2507":{"position":[[309,4],[498,4]]}}}],["panic(\"i",{"_index":288,"t":{"2471":{"position":[[1556,8]]}}}],["panick",{"_index":275,"t":{"2471":{"position":[[1071,8]]},"2473":{"position":[[286,8]]}}}],["param",{"_index":716,"t":{"2563":{"position":[[85,7]]}}}],["paramet",{"_index":151,"t":{"2447":{"position":[[920,9]]}}}],["pars",{"_index":416,"t":{"2501":{"position":[[1239,5]]}}}],["part",{"_index":704,"t":{"2557":{"position":[[38,4]]}}}],["parti",{"_index":2,"t":{"2421":{"position":[[21,5]]},"2513":{"position":[[260,6]]}}}],["paseto",{"_index":17,"t":{"2423":{"position":[[108,6]]},"2541":{"position":[[0,6],[27,8]]},"2547":{"position":[[353,6]]},"2549":{"position":[[179,6]]}}}],["pasetoware.config",{"_index":680,"t":{"2545":{"position":[[22,21]]}}}],["pasetoware.createtoken",{"_index":696,"t":{"2549":{"position":[[94,23]]}}}],["pasetoware.new(config",{"_index":679,"t":{"2545":{"position":[[0,21]]}}}],["paseware.config",{"_index":700,"t":{"2549":{"position":[[440,16]]}}}],["pass",{"_index":429,"t":{"2503":{"position":[[509,4],[587,4]]},"2507":{"position":[[1039,4],[1117,4]]},"2549":{"position":[[193,7],[274,7]]}}}],["password",{"_index":455,"t":{"2505":{"position":[[25,8]]}}}],["path",{"_index":40,"t":{"2431":{"position":[[66,4]]},"2437":{"position":[[463,4]]},"2447":{"position":[[163,5]]},"2525":{"position":[[104,7],[849,7]]},"2561":{"position":[[56,4]]},"2569":{"position":[[120,5]]}}}],["path/to/rbac_model.conf",{"_index":77,"t":{"2435":{"position":[[244,26]]},"2437":{"position":[[244,26]]},"2439":{"position":[[244,26]]}}}],["pathraw",{"_index":605,"t":{"2533":{"position":[[1020,7]]}}}],["payload",{"_index":675,"t":{"2541":{"position":[[82,7]]},"2547":{"position":[[420,7],[456,7]]}}}],["payloadvalid",{"_index":681,"t":{"2547":{"position":[[369,16]]}}}],["permiss",{"_index":94,"t":{"2437":{"position":[[436,10]]}}}],["persist.adapt",{"_index":43,"t":{"2431":{"position":[[100,15]]}}}],["pleas",{"_index":606,"t":{"2535":{"position":[[0,6]]},"2569":{"position":[[79,6]]}}}],["polici",{"_index":13,"t":{"2423":{"position":[[69,6]]},"2431":{"position":[[137,8]]},"2515":{"position":[[5,6]]},"2521":{"position":[[112,6],[183,6],[249,6],[343,6],[425,6]]},"2525":{"position":[[61,6]]}}}],["policy.csv",{"_index":45,"t":{"2431":{"position":[[146,12]]}}}],["policyadapt",{"_index":42,"t":{"2431":{"position":[[86,13],[260,13]]},"2435":{"position":[[271,14]]},"2437":{"position":[[271,14]]},"2439":{"position":[[271,14]]}}}],["port",{"_index":589,"t":{"2533":{"position":[[411,4]]}}}],["possibl",{"_index":708,"t":{"2557":{"position":[[258,14]]}}}],["preced",{"_index":522,"t":{"2513":{"position":[[445,10]]}}}],["present",{"_index":687,"t":{"2547":{"position":[[640,7],[759,7],[905,7]]}}}],["privat",{"_index":472,"t":{"2507":{"position":[[282,7],[351,7]]}}}],["private/publ",{"_index":481,"t":{"2507":{"position":[[479,14]]}}}],["privatekey",{"_index":478,"t":{"2507":{"position":[[383,10],[565,11]]},"2547":{"position":[[695,10],[925,11]]},"2549":{"position":[[298,10]]}}}],["privatekey.publ",{"_index":495,"t":{"2507":{"position":[[872,20]]}}}],["proceed",{"_index":247,"t":{"2471":{"position":[[308,10]]}}}],["process",{"_index":121,"t":{"2447":{"position":[[259,10]]}}}],["product",{"_index":471,"t":{"2507":{"position":[[233,11],[251,11]]}}}],["propag",{"_index":595,"t":{"2533":{"position":[[560,11],[612,11]]}}}],["propagation.baggag",{"_index":652,"t":{"2537":{"position":[[1526,23]]}}}],["propagation.textmappropag",{"_index":596,"t":{"2533":{"position":[[572,29]]}}}],["proper",{"_index":514,"t":{"2513":{"position":[[175,6],[659,6]]}}}],["properti",{"_index":32,"t":{"2431":{"position":[[0,8]]},"2447":{"position":[[0,8]]},"2457":{"position":[[0,8]]},"2469":{"position":[[0,8]]},"2481":{"position":[[0,8]]},"2491":{"position":[[0,8]]},"2501":{"position":[[0,8]]},"2521":{"position":[[0,8]]},"2533":{"position":[[0,8]]},"2547":{"position":[[0,8]]}}}],["protocol",{"_index":722,"t":{"2567":{"position":[[261,9]]}}}],["provid",{"_index":132,"t":{"2447":{"position":[[562,7]]},"2471":{"position":[[1792,8]]},"2513":{"position":[[298,9],[400,7],[561,9]]},"2521":{"position":[[497,7]]},"2533":{"position":[[205,8],[267,8],[341,8],[394,8]]},"2537":{"position":[[695,9]]},"2547":{"position":[[574,9]]},"2549":{"position":[[407,7]]}}}],["public",{"_index":300,"t":{"2473":{"position":[[45,6]]},"2501":{"position":[[1116,6]]},"2507":{"position":[[298,6]]},"2511":{"position":[[90,6]]},"2513":{"position":[[58,6]]},"2547":{"position":[[823,6],[869,6],[966,6]]},"2549":{"position":[[322,6]]}}}],["publickey",{"_index":691,"t":{"2547":{"position":[[783,10],[842,9]]},"2549":{"position":[[284,9]]}}}],["quer",{"_index":580,"t":{"2533":{"position":[[137,4]]}}}],["queri",{"_index":150,"t":{"2447":{"position":[[914,5]]},"2471":{"position":[[1810,5]]},"2521":{"position":[[67,5],[153,5]]},"2525":{"position":[[125,8]]},"2563":{"position":[[93,5]]}}}],["rand.read",{"_index":487,"t":{"2507":{"position":[[539,11]]}}}],["read",{"_index":131,"t":{"2447":{"position":[[544,4]]}}}],["readabl",{"_index":333,"t":{"2481":{"position":[[735,8]]},"2491":{"position":[[922,8]]}}}],["recov",{"_index":217,"t":{"2469":{"position":[[128,7],[292,7]]},"2471":{"position":[[1831,9]]}}}],["recoveri",{"_index":215,"t":{"2469":{"position":[[102,9]]}}}],["refer",{"_index":607,"t":{"2535":{"position":[[7,5]]}}}],["registri",{"_index":576,"t":{"2527":{"position":[[63,9]]}}}],["rego",{"_index":544,"t":{"2521":{"position":[[62,4],[107,4],[178,4],[420,4]]},"2533":{"position":[[132,4]]}}}],["regopolici",{"_index":545,"t":{"2521":{"position":[[75,10]]},"2525":{"position":[[521,11]]}}}],["regoqueri",{"_index":543,"t":{"2521":{"position":[[34,9]]},"2525":{"position":[[482,10]]}}}],["relic",{"_index":176,"t":{"2457":{"position":[[64,5],[104,5],[169,5],[280,5]]}}}],["repan",{"_index":212,"t":{"2469":{"position":[[34,7],[47,7],[88,7]]},"2471":{"position":[[1271,8]]}}}],["replac",{"_index":345,"t":{"2491":{"position":[[331,7]]}}}],["repo",{"_index":477,"t":{"2507":{"position":[[377,5]]}}}],["report",{"_index":588,"t":{"2533":{"position":[[361,9]]}}}],["repositori",{"_index":0,"t":{"2421":{"position":[[0,10]]}}}],["request",{"_index":147,"t":{"2447":{"position":[[880,7]]},"2469":{"position":[[240,7],[436,9]]},"2471":{"position":[[501,9]]},"2495":{"position":[[223,8]]},"2505":{"position":[[246,7],[309,7]]},"2521":{"position":[[263,7],[357,7]]},"2533":{"position":[[672,8],[926,7]]},"2539":{"position":[[374,7]]},"2547":{"position":[[1187,7]]},"2567":{"position":[[226,9]]}}}],["request'",{"_index":237,"t":{"2471":{"position":[[110,9],[181,9]]}}}],["requir",{"_index":174,"t":{"2457":{"position":[[49,8]]},"2513":{"position":[[511,8]]},"2515":{"position":[[43,8]]},"2521":{"position":[[51,8],[96,8]]},"2533":{"position":[[506,9]]}}}],["resbodi",{"_index":331,"t":{"2481":{"position":[[677,7],[744,8]]},"2491":{"position":[[864,7],[931,8]]}}}],["resourc",{"_index":461,"t":{"2505":{"position":[[267,8]]}}}],["resource.newwithattribut",{"_index":646,"t":{"2537":{"position":[[1305,27]]}}}],["respons",{"_index":60,"t":{"2431":{"position":[[372,8],[403,9],[459,8],[487,9]]},"2469":{"position":[[279,9]]},"2481":{"position":[[301,8],[402,8],[608,8]]},"2491":{"position":[[488,8],[589,8],[795,8]]},"2503":{"position":[[896,9]]},"2505":{"position":[[116,8],[489,8]]},"2507":{"position":[[1426,9]]},"2521":{"position":[[309,8]]}}}],["rest",{"_index":242,"t":{"2471":{"position":[[169,4]]}}}],["restrict",{"_index":425,"t":{"2503":{"position":[[373,10],[414,11]]},"2505":{"position":[[256,10]]},"2507":{"position":[[903,10],[944,11]]}}}],["restricted(c",{"_index":449,"t":{"2503":{"position":[[1142,12]]},"2507":{"position":[[1708,12]]}}}],["result",{"_index":697,"t":{"2549":{"position":[[230,7],[309,7]]}}}],["retriev",{"_index":146,"t":{"2447":{"position":[[861,9]]},"2505":{"position":[[37,8]]}}}],["return",{"_index":110,"t":{"2447":{"position":[[103,8],[424,8]]},"2449":{"position":[[419,6],[526,6]]},"2459":{"position":[[172,6]]},"2461":{"position":[[399,6]]},"2471":{"position":[[1152,6],[1475,6],[1858,6]]},"2473":{"position":[[325,6]]},"2481":{"position":[[102,8],[627,6]]},"2483":{"position":[[281,6]]},"2491":{"position":[[102,8],[310,8],[814,6]]},"2493":{"position":[[322,6]]},"2495":{"position":[[4,7],[146,7],[204,7]]},"2503":{"position":[[603,6],[969,6],[1024,6],[1101,6],[1283,6]]},"2507":{"position":[[1133,6],[1535,6],[1590,6],[1667,6],[1849,6]]},"2513":{"position":[[944,6],[1010,6],[1131,6],[1306,6]]},"2521":{"position":[[237,6],[331,6]]},"2525":{"position":[[794,6],[950,6]]},"2533":{"position":[[108,8],[942,8],[1002,7]]},"2537":{"position":[[819,6],[954,6],[1550,6],[1744,6],[1772,6]]},"2541":{"position":[[7,7],[155,7],[213,7]]},"2549":{"position":[[167,7],[467,6]]},"2567":{"position":[[196,7],[334,6],[352,6]]},"2569":{"position":[[209,6]]}}}],["rfc",{"_index":506,"t":{"2511":{"position":[[170,3]]}}}],["rng",{"_index":486,"t":{"2507":{"position":[[532,3]]}}}],["root:@tcp(127.0.0.1:3306",{"_index":79,"t":{"2435":{"position":[[318,30]]},"2437":{"position":[[318,30]]},"2439":{"position":[[318,30]]}}}],["rootpath",{"_index":113,"t":{"2447":{"position":[[122,8]]},"2449":{"position":[[237,9]]}}}],["rout",{"_index":248,"t":{"2471":{"position":[[334,7]]},"2503":{"position":[[175,5],[226,5],[384,6]]},"2507":{"position":[[676,5],[727,5],[914,6]]},"2533":{"position":[[1014,5]]}}}],["rs256",{"_index":499,"t":{"2509":{"position":[[4,5]]}}}],["rsa.generatekey(rng",{"_index":488,"t":{"2507":{"position":[[583,20]]}}}],["rsa.privatekey",{"_index":479,"t":{"2507":{"position":[[394,15]]}}}],["run",{"_index":483,"t":{"2507":{"position":[[511,4]]},"2539":{"position":[[259,3]]}}}],["s",{"_index":745,"t":{"2567":{"position":[[875,4]]}}}],["safe",{"_index":224,"t":{"2469":{"position":[[325,4]]}}}],["scope.setextra(\"unwantedqueri",{"_index":293,"t":{"2471":{"position":[[1713,31]]}}}],["sdktrace",{"_index":615,"t":{"2537":{"position":[[368,8]]}}}],["sdktrace.newtracerprovid",{"_index":642,"t":{"2537":{"position":[[1175,27]]}}}],["sdktrace.tracerprovid",{"_index":638,"t":{"2537":{"position":[[1055,24]]}}}],["sdktrace.withbatcher(export",{"_index":644,"t":{"2537":{"position":[[1250,31]]}}}],["sdktrace.withresourc",{"_index":645,"t":{"2537":{"position":[[1282,22]]}}}],["sdktrace.withsampler(sdktrace.alwayssampl",{"_index":643,"t":{"2537":{"position":[[1203,46]]}}}],["secret",{"_index":537,"t":{"2513":{"position":[[1297,8]]},"2547":{"position":[[608,6],[725,6]]}}}],["see",{"_index":312,"t":{"2481":{"position":[[224,4]]},"2491":{"position":[[402,4]]},"2507":{"position":[[516,3]]},"2511":{"position":[[166,3]]}}}],["select",{"_index":513,"t":{"2513":{"position":[[161,9],[645,9]]}}}],["semconv",{"_index":617,"t":{"2537":{"position":[[414,7]]}}}],["semconv.schemaurl",{"_index":647,"t":{"2537":{"position":[[1333,18]]}}}],["semconv.servicenamekey.string(\"mi",{"_index":648,"t":{"2537":{"position":[[1352,33]]}}}],["send",{"_index":442,"t":{"2503":{"position":[[885,4]]},"2507":{"position":[[1415,4]]},"2525":{"position":[[21,5]]},"2539":{"position":[[354,5]]}}}],["sentri",{"_index":208,"t":{"2463":{"position":[[0,6]]},"2469":{"position":[[74,6]]}}}],["sentry.captureexcept",{"_index":252,"t":{"2471":{"position":[[409,24]]}}}],["sentry.capturemessag",{"_index":251,"t":{"2471":{"position":[[386,22]]}}}],["sentry.ev",{"_index":267,"t":{"2471":{"position":[[866,14],[905,13]]},"2473":{"position":[[81,14],[120,13]]}}}],["sentry.eventhint",{"_index":269,"t":{"2471":{"position":[[886,18]]},"2473":{"position":[[101,18]]}}}],["sentry.hub",{"_index":234,"t":{"2471":{"position":[[36,11],[529,11]]}}}],["sentry.init(sentry.clientopt",{"_index":263,"t":{"2471":{"position":[[800,33]]},"2473":{"position":[[0,33]]}}}],["sentry.scop",{"_index":292,"t":{"2471":{"position":[[1696,14]]}}}],["separ",{"_index":255,"t":{"2471":{"position":[[470,10]]}}}],["server",{"_index":622,"t":{"2537":{"position":[[541,8]]},"2539":{"position":[[8,6],[60,6],[98,6],[223,6],[309,6],[391,6],[447,6],[493,6]]},"2567":{"position":[[1028,7]]}}}],["servernam",{"_index":599,"t":{"2533":{"position":[[729,10]]}}}],["servic",{"_index":649,"t":{"2537":{"position":[[1386,10]]},"2539":{"position":[[247,8],[346,7],[514,8]]}}}],["set",{"_index":216,"t":{"2469":{"position":[[112,3],[360,3]]},"2481":{"position":[[708,3]]},"2491":{"position":[[895,3]]},"2495":{"position":[[72,4]]},"2501":{"position":[[1219,3]]},"2511":{"position":[[135,3]]},"2533":{"position":[[453,7],[780,7]]},"2541":{"position":[[73,4]]}}}],["shall",{"_index":508,"t":{"2513":{"position":[[106,5]]}}}],["shut",{"_index":628,"t":{"2537":{"position":[[674,8]]},"2539":{"position":[[500,4]]}}}],["sign",{"_index":384,"t":{"2501":{"position":[[383,7],[506,7]]},"2513":{"position":[[139,7],[623,7],[1079,7],[1170,7],[1250,7]]},"2547":{"position":[[739,4]]},"2549":{"position":[[155,4],[329,8]]}}}],["signatur",{"_index":702,"t":{"2553":{"position":[[0,10]]}}}],["signingkey",{"_index":383,"t":{"2501":{"position":[[360,10],[434,11],[464,11]]},"2503":{"position":[[311,11]]},"2507":{"position":[[812,11]]},"2513":{"position":[[308,11],[320,12],[483,11],[499,11],[531,11],[547,10],[1283,10]]}}}],["signingmethod",{"_index":517,"t":{"2513":{"position":[[337,13]]}}}],["size",{"_index":694,"t":{"2547":{"position":[[1140,4]]}}}],["skip",{"_index":109,"t":{"2447":{"position":[[77,4]]},"2469":{"position":[[340,4]]},"2481":{"position":[[76,4],[511,4]]},"2491":{"position":[[76,4],[698,4]]},"2501":{"position":[[85,4]]},"2533":{"position":[[82,4]]},"2547":{"position":[[77,4]]},"2569":{"position":[[105,4]]}}}],["skipuri",{"_index":324,"t":{"2481":{"position":[[493,8]]},"2491":{"position":[[680,8]]}}}],["slice",{"_index":413,"t":{"2501":{"position":[[1184,5]]},"2547":{"position":[[1129,5]]}}}],["somepath",{"_index":561,"t":{"2525":{"position":[[112,12]]}}}],["somequerydatamayb",{"_index":294,"t":{"2471":{"position":[[1745,21]]}}}],["source>:Swagger | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Swagger middleware for Fiber. The middleware handles Swagger UI.

Table of Contents

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/swagger"
)

Then create a Fiber app with app := fiber.New().

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(swagger.New(cfg))

Custom Config

cfg := swagger.Config{
BasePath: "/", //swagger ui base path
FilePath: "./docs/swagger.json",
}

app.Use(swagger.New(cfg))
- - +Linter

Swagger middleware for Fiber. The middleware handles Swagger UI.

Table of Contents

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/swagger"
)

Then create a Fiber app with app := fiber.New().

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(swagger.New(cfg))

Custom Config

cfg := swagger.Config{
BasePath: "/", //swagger ui base path
FilePath: "./docs/swagger.json",
}

app.Use(swagger.New(cfg))
+ + \ No newline at end of file diff --git a/contrib/swagger_v1.x.x/websocket/index.html b/contrib/swagger_v1.x.x/websocket/index.html index c6eb85e7a7b..ebfffc3e465 100644 --- a/contrib/swagger_v1.x.x/websocket/index.html +++ b/contrib/swagger_v1.x.x/websocket/index.html @@ -6,8 +6,8 @@ Websocket | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/websocket

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/websocket"
)

func main() {
app := fiber.New()

app.Use("/ws", func(c *fiber.Ctx) error {
// IsWebSocketUpgrade returns true if the client
// requested upgrade to the WebSocket protocol.
if websocket.IsWebSocketUpgrade(c) {
c.Locals("allowed", true)
return c.Next()
}
return fiber.ErrUpgradeRequired
})

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {
// c.Locals is added to the *websocket.Conn
log.Println(c.Locals("allowed")) // true
log.Println(c.Params("id")) // 123
log.Println(c.Query("v")) // 1.0
log.Println(c.Cookies("session")) // ""

// websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index
var (
mt int
msg []byte
err error
)
for {
if mt, msg, err = c.ReadMessage(); err != nil {
log.Println("read:", err)
break
}
log.Printf("recv: %s", msg)

if err = c.WriteMessage(mt, msg); err != nil {
log.Println("write:", err)
break
}
}

}))

log.Fatal(app.Listen(":3000"))
// Access the websocket server: ws://localhost:3000/ws/123?v=1.0
// https://www.websocket.org/echo.html
}

Note with cache middleware

If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path.

app := fiber.New()
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return strings.Contains(c.Route().Path, "/ws")
},
}))

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {}))
- - +Linter

Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/websocket

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/websocket"
)

func main() {
app := fiber.New()

app.Use("/ws", func(c *fiber.Ctx) error {
// IsWebSocketUpgrade returns true if the client
// requested upgrade to the WebSocket protocol.
if websocket.IsWebSocketUpgrade(c) {
c.Locals("allowed", true)
return c.Next()
}
return fiber.ErrUpgradeRequired
})

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {
// c.Locals is added to the *websocket.Conn
log.Println(c.Locals("allowed")) // true
log.Println(c.Params("id")) // 123
log.Println(c.Query("v")) // 1.0
log.Println(c.Cookies("session")) // ""

// websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index
var (
mt int
msg []byte
err error
)
for {
if mt, msg, err = c.ReadMessage(); err != nil {
log.Println("read:", err)
break
}
log.Printf("recv: %s", msg)

if err = c.WriteMessage(mt, msg); err != nil {
log.Println("write:", err)
break
}
}

}))

log.Fatal(app.Listen(":3000"))
// Access the websocket server: ws://localhost:3000/ws/123?v=1.0
// https://www.websocket.org/echo.html
}

Note with cache middleware

If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path.

app := fiber.New()
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return strings.Contains(c.Route().Path, "/ws")
},
}))

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {}))
+ + \ No newline at end of file diff --git a/contrib/websocket/index.html b/contrib/websocket/index.html index 1c2f8dde153..f0f8af79774 100644 --- a/contrib/websocket/index.html +++ b/contrib/websocket/index.html @@ -6,8 +6,8 @@ Websocket | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/websocket

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/websocket"
)

func main() {
app := fiber.New()

app.Use("/ws", func(c *fiber.Ctx) error {
// IsWebSocketUpgrade returns true if the client
// requested upgrade to the WebSocket protocol.
if websocket.IsWebSocketUpgrade(c) {
c.Locals("allowed", true)
return c.Next()
}
return fiber.ErrUpgradeRequired
})

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {
// c.Locals is added to the *websocket.Conn
log.Println(c.Locals("allowed")) // true
log.Println(c.Params("id")) // 123
log.Println(c.Query("v")) // 1.0
log.Println(c.Cookies("session")) // ""

// websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index
var (
mt int
msg []byte
err error
)
for {
if mt, msg, err = c.ReadMessage(); err != nil {
log.Println("read:", err)
break
}
log.Printf("recv: %s", msg)

if err = c.WriteMessage(mt, msg); err != nil {
log.Println("write:", err)
break
}
}

}))

log.Fatal(app.Listen(":3000"))
// Access the websocket server: ws://localhost:3000/ws/123?v=1.0
// https://www.websocket.org/echo.html
}

Note with cache middleware

If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path.

app := fiber.New()
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return strings.Contains(c.Route().Path, "/ws")
},
}))

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {}))
- - +Linter

Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.

Install

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/contrib/websocket

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/contrib/websocket"
)

func main() {
app := fiber.New()

app.Use("/ws", func(c *fiber.Ctx) error {
// IsWebSocketUpgrade returns true if the client
// requested upgrade to the WebSocket protocol.
if websocket.IsWebSocketUpgrade(c) {
c.Locals("allowed", true)
return c.Next()
}
return fiber.ErrUpgradeRequired
})

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {
// c.Locals is added to the *websocket.Conn
log.Println(c.Locals("allowed")) // true
log.Println(c.Params("id")) // 123
log.Println(c.Query("v")) // 1.0
log.Println(c.Cookies("session")) // ""

// websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index
var (
mt int
msg []byte
err error
)
for {
if mt, msg, err = c.ReadMessage(); err != nil {
log.Println("read:", err)
break
}
log.Printf("recv: %s", msg)

if err = c.WriteMessage(mt, msg); err != nil {
log.Println("write:", err)
break
}
}

}))

log.Fatal(app.Listen(":3000"))
// Access the websocket server: ws://localhost:3000/ws/123?v=1.0
// https://www.websocket.org/echo.html
}

Note with cache middleware

If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path.

app := fiber.New()
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return strings.Contains(c.Route().Path, "/ws")
},
}))

app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {}))
+ + \ No newline at end of file diff --git a/extra/benchmarks/index.html b/extra/benchmarks/index.html index 6397c13aa54..d50011733e9 100644 --- a/extra/benchmarks/index.html +++ b/extra/benchmarks/index.html @@ -6,8 +6,8 @@ 📊 Benchmarks | Fiber - - + +
@@ -16,8 +16,8 @@ Express handled 2,066 responses per second with an average latency of 390.44 ms.

Fiber vs Express

Multiple Queries

Fiber handled 19,664 responses per second with an average latency of 25.7 ms.
Express handled 4,302 responses per second with an average latency of 117.2 ms.

Fiber vs Express

Single Query

Fiber handled 368,647 responses per second with an average latency of 0.7 ms.
Express handled 57,880 responses per second with an average latency of 4.4 ms.

Fiber vs Express

JSON Serialization

Fiber handled 1,146,667 responses per second with an average latency of 0.4 ms.
-Express handled 244,847 responses per second with an average latency of 1.1 ms.

Fiber vs Express

Go web framework benchmark

🔗 https://github.com/smallnest/go-web-framework-benchmark

  • CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
  • MEM 4GB
  • GO go1.13.6 linux/amd64
  • OS Linux

The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers.

The concurrency clients are 5000.

Latency is the time of real processing time by web servers. The smaller is the better.

Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better.

If we enable http pipelining, test result as below:

Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is:

If we enable http pipelining, test result as below:

Dependency graph for v1.9.0

- - +Express handled 244,847 responses per second with an average latency of 1.1 ms.

Fiber vs Express

Go web framework benchmark

🔗 https://github.com/smallnest/go-web-framework-benchmark

  • CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
  • MEM 4GB
  • GO go1.13.6 linux/amd64
  • OS Linux

The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers.

The concurrency clients are 5000.

Latency is the time of real processing time by web servers. The smaller is the better.

Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better.

If we enable http pipelining, test result as below:

Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is:

If we enable http pipelining, test result as below:

Dependency graph for v1.9.0

+ + \ No newline at end of file diff --git a/extra/faq/index.html b/extra/faq/index.html index c4f0e525631..ae812221f97 100644 --- a/extra/faq/index.html +++ b/extra/faq/index.html @@ -6,15 +6,15 @@ 🤔 FAQ | Fiber - - + +
Version: v2.x

🤔 FAQ

How should I structure my application?

There is no definitive answer to this question. The answer depends on the scale of your application and the team that is involved. To be as flexible as possible, Fiber makes no assumptions in terms of structure.

Routes and other application-specific logic can live in as many files as you wish, in any directory structure you prefer. View the following examples for inspiration:

How do I handle custom 404 responses?

If you're using v2.32.0 or later, all you need to do is to implement a custom error handler. See below, or see a more detailed explanation at Error Handling.

If you're using v2.31.0 or earlier, the error handler will not capture 404 errors. Instead, you need to add a middleware function at the very bottom of the stack (below all other functions) to handle a 404 response:

Example
app.Use(func(c *fiber.Ctx) error {
return c.Status(fiber.StatusNotFound).SendString("Sorry can't find that!")
})

How can i use live reload ?

Air is a handy tool that automatically restarts your Go applications whenever the source code changes, making your development process faster and more efficient.

To use Air in a Fiber project, follow these steps:

  1. Install Air by downloading the appropriate binary for your operating system from the GitHub release page or by building the tool directly from source.
  2. Create a configuration file for Air in your project directory. This file can be named, for example, .air.toml or air.conf. Here's a sample configuration file that works with Fiber:
# .air.toml
root = "."
tmp_dir = "tmp"
[build]
cmd = "go build -o ./tmp/main ."
bin = "./tmp/main"
delay = 1000 # ms
exclude_dir = ["assets", "tmp", "vendor"]
include_ext = ["go", "tpl", "tmpl", "html"]
exclude_regex = ["_test\\.go"]
  1. Start your Fiber application using Air by running the following command in the terminal:
air

As you make changes to your source code, Air will detect them and automatically restart the application.

A complete example demonstrating the use of Air with Fiber can be found in the Fiber Recipes repository. This example shows how to configure and use Air in a Fiber project to create an efficient development environment.

How do I set up an error handler?

To override the default error handler, you can override the default when providing a Config when initiating a new Fiber instance.

Example
app := fiber.New(fiber.Config{
ErrorHandler: func(c *fiber.Ctx, err error) error {
return c.Status(fiber.StatusInternalServerError).SendString(err.Error())
},
})

We have a dedicated page explaining how error handling works in Fiber, see Error Handling.

Which template engines does Fiber support?

Fiber currently supports 8 template engines in our gofiber/template middleware:

To learn more about using Templates in Fiber, see Templates.

Does Fiber have a community chat?

Yes, we have our own Discord server, where we hang out. We have different rooms for every subject.
If you have questions or just want to have a chat, feel free to join us via this > invite link <.

Does fiber support sub domain routing ?

Yes we do, here are some examples: -This example works v2

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/logger"
)

type Host struct {
Fiber *fiber.App
}

func main() {
// Hosts
hosts := map[string]*Host{}
//-----
// API
//-----
api := fiber.New()
api.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))
hosts["api.localhost:3000"] = &Host{api}
api.Get("/", func(c *fiber.Ctx) error {
return c.SendString("API")
})
//------
// Blog
//------
blog := fiber.New()
blog.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))
hosts["blog.localhost:3000"] = &Host{blog}
blog.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Blog")
})
//---------
// Website
//---------
site := fiber.New()
site.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))

hosts["localhost:3000"] = &Host{site}
site.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Website")
})
// Server
app := fiber.New()
app.Use(func(c *fiber.Ctx) error {
host := hosts[c.Hostname()]
if host == nil {
return c.SendStatus(fiber.StatusNotFound)
} else {
host.Fiber.Handler()(c.Context())
return nil
}
})
log.Fatal(app.Listen(":3000"))
}

If more information is needed, please refer to this issue #750

- - +This example works v2

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/logger"
)

type Host struct {
Fiber *fiber.App
}

func main() {
// Hosts
hosts := map[string]*Host{}
//-----
// API
//-----
api := fiber.New()
api.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))
hosts["api.localhost:3000"] = &Host{api}
api.Get("/", func(c *fiber.Ctx) error {
return c.SendString("API")
})
//------
// Blog
//------
blog := fiber.New()
blog.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))
hosts["blog.localhost:3000"] = &Host{blog}
blog.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Blog")
})
//---------
// Website
//---------
site := fiber.New()
site.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))

hosts["localhost:3000"] = &Host{site}
site.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Website")
})
// Server
app := fiber.New()
app.Use(func(c *fiber.Ctx) error {
host := hosts[c.Hostname()]
if host == nil {
return c.SendStatus(fiber.StatusNotFound)
} else {
host.Fiber.Handler()(c.Context())
return nil
}
})
log.Fatal(app.Listen(":3000"))
}

If more information is needed, please refer to this issue #750

+ + \ No newline at end of file diff --git a/guide/error-handling/index.html b/guide/error-handling/index.html index fa7e2d4d104..e86001aa302 100644 --- a/guide/error-handling/index.html +++ b/guide/error-handling/index.html @@ -6,13 +6,13 @@ 🐛 Error Handling | Fiber - - + +
-
Version: v2.x

🐛 Error Handling

Catching Errors

It’s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them.

app.Get("/", func(c *fiber.Ctx) error {
// Pass error to Fiber
return c.SendFile("file-does-not-exist")
})

Fiber does not handle panics by default. To recover from a panic thrown by any handler in the stack, you need to include the Recover middleware below:

Example
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/recover"
)

func main() {
app := fiber.New()

app.Use(recover.New())

app.Get("/", func(c *fiber.Ctx) error {
panic("This panic is caught by fiber")
})

log.Fatal(app.Listen(":3000"))
}

You could use Fiber's custom error struct to pass an additional status code using fiber.NewError(). It's optional to pass a message; if this is left empty, it will default to the status code message (404 equals Not Found).

Example
app.Get("/", func(c *fiber.Ctx) error {
// 503 Service Unavailable
return fiber.ErrServiceUnavailable

// 503 On vacation!
return fiber.NewError(fiber.StatusServiceUnavailable, "On vacation!")
})

Default Error Handler

Fiber provides an error handler by default. For a standard error, the response is sent as 500 Internal Server Error. If the error is of type fiber.Error, the response is sent with the provided status code and message.

Example
// Default error handler
var DefaultErrorHandler = func(c *fiber.Ctx, err error) error {
// Status code defaults to 500
code := fiber.StatusInternalServerError

// Retrieve the custom status code if it's a *fiber.Error
var e *fiber.Error
if errors.As(err, &e) {
code = e.Code
}

// Set Content-Type: text/plain; charset=utf-8
c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)

// Return status code with error message
return c.Status(code).SendString(err.Error())
}

Custom Error Handler

A custom error handler can be set using a Config when initializing a Fiber instance.

In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response.

The following example shows how to display error pages for different types of errors.

Example
// Create a new fiber instance with custom config
app := fiber.New(fiber.Config{
// Override default error handler
ErrorHandler: func(ctx *fiber.Ctx, err error) error {
// Status code defaults to 500
code := fiber.StatusInternalServerError

// Retrieve the custom status code if it's a *fiber.Error
var e *fiber.Error
if errors.As(err, &e) {
code = e.Code
}

// Send custom error page
err = ctx.Status(code).SendFile(fmt.Sprintf("./%d.html", code))
if err != nil {
// In case the SendFile fails
return ctx.Status(fiber.StatusInternalServerError).SendString("Internal Server Error")
}

// Return from handler
return nil
},
})

// ...

Special thanks to the Echo & Express framework for inspiration regarding error handling.

- - +
Version: v2.x

🐛 Error Handling

Catching Errors

It’s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them.

app.Get("/", func(c *fiber.Ctx) error {
// Pass error to Fiber
return c.SendFile("file-does-not-exist")
})

Fiber does not handle panics by default. To recover from a panic thrown by any handler in the stack, you need to include the Recover middleware below:

Example
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/recover"
)

func main() {
app := fiber.New()

app.Use(recover.New())

app.Get("/", func(c *fiber.Ctx) error {
panic("This panic is caught by fiber")
})

log.Fatal(app.Listen(":3000"))
}

You could use Fiber's custom error struct to pass an additional status code using fiber.NewError(). It's optional to pass a message; if this is left empty, it will default to the status code message (404 equals Not Found).

Example
app.Get("/", func(c *fiber.Ctx) error {
// 503 Service Unavailable
return fiber.ErrServiceUnavailable

// 503 On vacation!
return fiber.NewError(fiber.StatusServiceUnavailable, "On vacation!")
})

Default Error Handler

Fiber provides an error handler by default. For a standard error, the response is sent as 500 Internal Server Error. If the error is of type fiber.Error, the response is sent with the provided status code and message.

Example
// Default error handler
var DefaultErrorHandler = func(c *fiber.Ctx, err error) error {
// Status code defaults to 500
code := fiber.StatusInternalServerError

// Retrieve the custom status code if it's a *fiber.Error
var e *fiber.Error
if errors.As(err, &e) {
code = e.Code
}

// Set Content-Type: text/plain; charset=utf-8
c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)

// Return status code with error message
return c.Status(code).SendString(err.Error())
}

Custom Error Handler

A custom error handler can be set using a Config when initializing a Fiber instance.

In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response.

The following example shows how to display error pages for different types of errors.

Example
// Create a new fiber instance with custom config
app := fiber.New(fiber.Config{
// Override default error handler
ErrorHandler: func(ctx *fiber.Ctx, err error) error {
// Status code defaults to 500
code := fiber.StatusInternalServerError

// Retrieve the custom status code if it's a *fiber.Error
var e *fiber.Error
if errors.As(err, &e) {
code = e.Code
}

// Send custom error page
err = ctx.Status(code).SendFile(fmt.Sprintf("./%d.html", code))
if err != nil {
// In case the SendFile fails
return ctx.Status(fiber.StatusInternalServerError).SendString("Internal Server Error")
}

// Return from handler
return nil
},
})

// ...

Special thanks to the Echo & Express framework for inspiration regarding error handling.

+ + \ No newline at end of file diff --git a/guide/faster-fiber/index.html b/guide/faster-fiber/index.html index d5db016c809..05b3c6947e2 100644 --- a/guide/faster-fiber/index.html +++ b/guide/faster-fiber/index.html @@ -6,13 +6,13 @@ ⚡ Make Fiber Faster | Fiber - - + +
-
Version: v2.x

⚡ Make Fiber Faster

Custom JSON Encoder/Decoder

Since Fiber v2.32.0, we use encoding/json as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of encoding/json, we recommend you to use these libraries:

Example
package main

import "github.com/gofiber/fiber/v2"
import "github.com/goccy/go-json"

func main() {
app := fiber.New(fiber.Config{
JSONEncoder: json.Marshal,
JSONDecoder: json.Unmarshal,
})

# ...
}

References

- - +
Version: v2.x

⚡ Make Fiber Faster

Custom JSON Encoder/Decoder

Since Fiber v2.32.0, we use encoding/json as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of encoding/json, we recommend you to use these libraries:

Example
package main

import "github.com/gofiber/fiber/v2"
import "github.com/goccy/go-json"

func main() {
app := fiber.New(fiber.Config{
JSONEncoder: json.Marshal,
JSONDecoder: json.Unmarshal,
})

# ...
}

References

+ + \ No newline at end of file diff --git a/guide/grouping/index.html b/guide/grouping/index.html index 931b8f00646..b523a1faad7 100644 --- a/guide/grouping/index.html +++ b/guide/grouping/index.html @@ -6,13 +6,13 @@ 🎭 Grouping | Fiber - - + +
-
Version: v2.x

🎭 Grouping

info

In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.

Paths

Like Routing, groups can also have paths that belong to a cluster.

func main() {
app := fiber.New()

api := app.Group("/api", middleware) // /api

v1 := api.Group("/v1", middleware) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", middleware) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

A Group of paths can have an optional handler.

func main() {
app := fiber.New()

api := app.Group("/api") // /api

v1 := api.Group("/v1") // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2") // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}
caution

Running /api, /v1 or /v2 will result in 404 error, make sure you have the errors set.

Group Handlers

Group handlers can also be used as a routing path but they must have Next added to them so that the flow can continue.

func main() {
app := fiber.New()

handler := func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusOK)
}
api := app.Group("/api") // /api

v1 := api.Group("/v1", func(c *fiber.Ctx) error { // middleware for /api/v1
c.Set("Version", "v1")
return c.Next()
})
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

log.Fatal(app.Listen(":3000"))
}
- - +
Version: v2.x

🎭 Grouping

info

In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.

Paths

Like Routing, groups can also have paths that belong to a cluster.

func main() {
app := fiber.New()

api := app.Group("/api", middleware) // /api

v1 := api.Group("/v1", middleware) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", middleware) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

A Group of paths can have an optional handler.

func main() {
app := fiber.New()

api := app.Group("/api") // /api

v1 := api.Group("/v1") // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2") // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}
caution

Running /api, /v1 or /v2 will result in 404 error, make sure you have the errors set.

Group Handlers

Group handlers can also be used as a routing path but they must have Next added to them so that the flow can continue.

func main() {
app := fiber.New()

handler := func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusOK)
}
api := app.Group("/api") // /api

v1 := api.Group("/v1", func(c *fiber.Ctx) error { // middleware for /api/v1
c.Set("Version", "v1")
return c.Next()
})
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

log.Fatal(app.Listen(":3000"))
}
+ + \ No newline at end of file diff --git a/guide/hooks/index.html b/guide/hooks/index.html index 4f543831c5a..5b7e4514df6 100644 --- a/guide/hooks/index.html +++ b/guide/hooks/index.html @@ -6,13 +6,13 @@ 🪝 Hooks | Fiber - - + +
-
Version: v2.x

🪝 Hooks

With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:

Constants

// Handlers define a function to create hooks for Fiber.
type OnRouteHandler = func(Route) error
type OnNameHandler = OnRouteHandler
type OnGroupHandler = func(Group) error
type OnGroupNameHandler = OnGroupHandler
type OnListenHandler = func() error
type OnForkHandler = func(int) error
type OnShutdownHandler = OnListenHandler
type OnMountHandler = func(*App) error

OnRoute

OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by route parameter.

Signature
func (app *App) OnRoute(handler ...OnRouteHandler)

OnName

OnName is a hook to execute user functions on each route naming. Also you can get route properties by route parameter.

caution

OnName only works with naming routes, not groups.

Signature
func (app *App) OnName(handler ...OnNameHandler)
package main

import (
"fmt"

"github.com/gofiber/fiber/v2"
)

func main() {
app := fiber.New()

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("index")

app.Hooks().OnName(func(r fiber.Route) error {
fmt.Print("Name: " + r.Name + ", ")

return nil
})

app.Hooks().OnName(func(r fiber.Route) error {
fmt.Print("Method: " + r.Method + "\n")

return nil
})

app.Get("/add/user", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("addUser")

app.Delete("/destroy/user", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("destroyUser")

app.Listen(":5000")
}

// Results:
// Name: addUser, Method: GET
// Name: destroyUser, Method: DELETE

OnGroup

OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by group parameter.

Signature
func (app *App) OnGroup(handler ...OnGroupHandler)

OnGroupName

OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by group parameter.

caution

OnGroupName only works with naming groups, not routes.

Signature
func (app *App) OnGroupName(handler ...OnGroupNameHandler)

OnListen

OnListen is a hook to execute user functions on Listen, ListenTLS, Listener.

Signature
func (app *App) OnListen(handler ...OnListenHandler)

OnFork

OnFork is a hook to execute user functions on Fork.

Signature
func (app *App) OnFork(handler ...OnForkHandler)

OnShutdown

OnShutdown is a hook to execute user functions after Shutdown.

Signature
func (app *App) OnShutdown(handler ...OnShutdownHandler)

OnMount

OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting.

Signature
func (h *Hooks) OnMount(handler ...OnMountHandler) 
package main

import (
"fmt"

"github.com/gofiber/fiber/v2"
)

func main() {
app := New()
app.Get("/", testSimpleHandler).Name("x")

subApp := New()
subApp.Get("/test", testSimpleHandler)

subApp.Hooks().OnMount(func(parent *fiber.App) error {
fmt.Print("Mount path of parent app: "+parent.MountPath())
// ...

return nil
})

app.Mount("/sub", subApp)
}

// Result:
// Mount path of parent app:
caution

OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.

- - +
Version: v2.x

🪝 Hooks

With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:

Constants

// Handlers define a function to create hooks for Fiber.
type OnRouteHandler = func(Route) error
type OnNameHandler = OnRouteHandler
type OnGroupHandler = func(Group) error
type OnGroupNameHandler = OnGroupHandler
type OnListenHandler = func() error
type OnForkHandler = func(int) error
type OnShutdownHandler = OnListenHandler
type OnMountHandler = func(*App) error

OnRoute

OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by route parameter.

Signature
func (app *App) OnRoute(handler ...OnRouteHandler)

OnName

OnName is a hook to execute user functions on each route naming. Also you can get route properties by route parameter.

caution

OnName only works with naming routes, not groups.

Signature
func (app *App) OnName(handler ...OnNameHandler)
package main

import (
"fmt"

"github.com/gofiber/fiber/v2"
)

func main() {
app := fiber.New()

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("index")

app.Hooks().OnName(func(r fiber.Route) error {
fmt.Print("Name: " + r.Name + ", ")

return nil
})

app.Hooks().OnName(func(r fiber.Route) error {
fmt.Print("Method: " + r.Method + "\n")

return nil
})

app.Get("/add/user", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("addUser")

app.Delete("/destroy/user", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("destroyUser")

app.Listen(":5000")
}

// Results:
// Name: addUser, Method: GET
// Name: destroyUser, Method: DELETE

OnGroup

OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by group parameter.

Signature
func (app *App) OnGroup(handler ...OnGroupHandler)

OnGroupName

OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by group parameter.

caution

OnGroupName only works with naming groups, not routes.

Signature
func (app *App) OnGroupName(handler ...OnGroupNameHandler)

OnListen

OnListen is a hook to execute user functions on Listen, ListenTLS, Listener.

Signature
func (app *App) OnListen(handler ...OnListenHandler)

OnFork

OnFork is a hook to execute user functions on Fork.

Signature
func (app *App) OnFork(handler ...OnForkHandler)

OnShutdown

OnShutdown is a hook to execute user functions after Shutdown.

Signature
func (app *App) OnShutdown(handler ...OnShutdownHandler)

OnMount

OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting.

Signature
func (h *Hooks) OnMount(handler ...OnMountHandler) 
package main

import (
"fmt"

"github.com/gofiber/fiber/v2"
)

func main() {
app := New()
app.Get("/", testSimpleHandler).Name("x")

subApp := New()
subApp.Get("/test", testSimpleHandler)

subApp.Hooks().OnMount(func(parent *fiber.App) error {
fmt.Print("Mount path of parent app: "+parent.MountPath())
// ...

return nil
})

app.Mount("/sub", subApp)
}

// Result:
// Mount path of parent app:
caution

OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.

+ + \ No newline at end of file diff --git a/guide/routing/index.html b/guide/routing/index.html index c9dde3d4b30..bb5a0fc9553 100644 --- a/guide/routing/index.html +++ b/guide/routing/index.html @@ -6,14 +6,14 @@ 🔌 Routing | Fiber - - + +
Version: v2.x

🔌 Routing

Handlers

Registers a route bound to a specific HTTP method.

Signatures
// HTTP methods
func (app *App) Get(path string, handlers ...Handler) Router
func (app *App) Head(path string, handlers ...Handler) Router
func (app *App) Post(path string, handlers ...Handler) Router
func (app *App) Put(path string, handlers ...Handler) Router
func (app *App) Delete(path string, handlers ...Handler) Router
func (app *App) Connect(path string, handlers ...Handler) Router
func (app *App) Options(path string, handlers ...Handler) Router
func (app *App) Trace(path string, handlers ...Handler) Router
func (app *App) Patch(path string, handlers ...Handler) Router

// Add allows you to specifiy a method as value
func (app *App) Add(method, path string, handlers ...Handler) Router

// All will register the route on all HTTP methods
// Almost the same as app.Use but not bound to prefixes
func (app *App) All(path string, handlers ...Handler) Router
Examples
// Simple GET handler
app.Get("/api/list", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")
})

// Simple POST handler
app.Post("/api/register", func(c *fiber.Ctx) error {
return c.SendString("I'm a POST request!")
})

Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc

Signature
func (app *App) Use(args ...interface{}) Router
Examples
// Match any request
app.Use(func(c *fiber.Ctx) error {
return c.Next()
})

// Match request starting with /api
app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})

// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})

// Attach multiple handlers
app.Use("/api", func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
return c.Next()
}, func(c *fiber.Ctx) error {
return c.Next()
})

Paths

Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be strings or string patterns.

Examples of route paths based on strings

// This route path will match requests to the root route, "/":
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("root")
})

// This route path will match requests to "/about":
app.Get("/about", func(c *fiber.Ctx) error {
return c.SendString("about")
})

// This route path will match requests to "/random.txt":
app.Get("/random.txt", func(c *fiber.Ctx) error {
return c.SendString("random.txt")
})

As with the expressJs framework, the order of the route declaration plays a role. -When a request is received, the routes are checked in the order in which they are declared.

info

So please be careful to write routes with variable parameters after the routes that contain fixed parts, so that these variable parts do not match instead and unexpected behavior occurs.

Parameters

Route parameters are dynamic elements in the route, which are named or not named segments. This segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the Params function, with the name of the route parameter specified in the path as their respective keys or for unnamed parameters the character(*, +) and the counter of this.

The characters :, +, and * are characters that introduce a parameter.

Greedy parameters are indicated by wildcard(*) or plus(+) signs.

The routing also offers the possibility to use optional parameters, for the named parameters these are marked with a final "?", unlike the plus sign which is not optional, you can use the wildcard character for a parameter range which is optional and greedy.

Example of define routes with route parameters

// Parameters
app.Get("/user/:name/books/:title", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s\n", c.Params("name"))
fmt.Fprintf(c, "%s\n", c.Params("title"))
return nil
})
// Plus - greedy - not optional
app.Get("/user/+", func(c *fiber.Ctx) error {
return c.SendString(c.Params("+"))
})

// Optional parameter
app.Get("/user/:name?", func(c *fiber.Ctx) error {
return c.SendString(c.Params("name"))
})

// Wildcard - greedy - optional
app.Get("/user/*", func(c *fiber.Ctx) error {
return c.SendString(c.Params("*"))
})

// This route path will match requests to "/v1/some/resource/name:customVerb", since the parameter character is escaped
app.Get("/v1/some/resource/name\\:customVerb", func(c *fiber.Ctx) error {
return c.SendString("Hello, Community")
})
info

Since the hyphen (-) and the dot (.) are interpreted literally, they can be used along with route parameters for useful purposes.

info

All special parameter characters can also be escaped with "\\" and lose their value, so you can use them in the route if you want, like in the custom methods of the google api design guide.

// http://localhost:3000/plantae/prunus.persica
app.Get("/plantae/:genus.:species", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s.%s\n", c.Params("genus"), c.Params("species"))
return nil // prunus.persica
})
// http://localhost:3000/flights/LAX-SFO
app.Get("/flights/:from-:to", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s-%s\n", c.Params("from"), c.Params("to"))
return nil // LAX-SFO
})

Our intelligent router recognizes that the introductory parameter characters should be part of the request route in this case and can process them as such.

// http://localhost:3000/shop/product/color:blue/size:xs
app.Get("/shop/product/color::color/size::size", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s:%s\n", c.Params("color"), c.Params("size"))
return nil // blue:xs
})

In addition, several parameters in a row and several unnamed parameter characters in the route, such as the wildcard or plus character, are possible, which greatly expands the possibilities of the router for the user.

// GET /@v1
// Params: "sign" -> "@", "param" -> "v1"
app.Get("/:sign:param", handler)

// GET /api-v1
// Params: "name" -> "v1"
app.Get("/api-:name", handler)

// GET /customer/v1/cart/proxy
// Params: "*1" -> "customer/", "*2" -> "/cart"
app.Get("/*v1*/proxy", handler)

// GET /v1/brand/4/shop/blue/xs
// Params: "*1" -> "brand/4", "*2" -> "blue/xs"
app.Get("/v1/*/shop/*", handler)

We have adapted the routing strongly to the express routing, but currently without the possibility of the regular expressions, because they are quite slow. The possibilities can be tested with version 0.1.7 (express 4) in the online Express route tester.

Constraints

Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values by parameters. The feature was intorduced in v2.37.0 and inspired by .NET Core.

caution

Constraints aren't validation for parameters. If constraint aren't valid for parameter value, Fiber returns 404 handler.

ConstraintExampleExample matches
int:id<int>123456789, -123456789
bool:active<bool>true,false
guid:id<guid>CD2C1638-1638-72D5-1638-DEADBEEF1638
float:weight<float>1.234, -1,001.01e8
minLen(value):username<minLen(4)>Test (must be at least 4 characters)
maxLen(value):filename<maxLen(8)>MyFile (must be no more than 8 characters
len(length):filename<len(12)>somefile.txt (exactly 12 characters)
min(value):age<min(18)>19 (Integer value must be at least 18)
max(value):age<max(120)>91 (Integer value must be no more than 120)
range(min,max):age<range(18,120)>91 (Integer value must be at least 18 but no more than 120)
alpha:name<alpha>Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive)
datetime:dob<datetime(2006\\-01\\-02)>2005-11-01
regex(expression):date<regex(\d{4}-\d{2}-\d{2})}>2022-08-27 (Must match regular expression)

Examples

app.Get("/:test<min(5)>", func(c *fiber.Ctx) error {
return c.SendString(c.Params("test"))
})

// curl -X GET http://localhost:3000/12
// 12

// curl -X GET http://localhost:3000/1
// Cannot GET /1
caution

You should use \\ before routing-specific characters when to use datetime constraint (*, +, ?, :, /, <, >, ;, (, )), to avoid wrong parsing.

Optional Parameter Example

You can impose constraints on optional parameters as well.

app.Get("/:test<int>?", func(c *fiber.Ctx) error {
return c.SendString(c.Params("test"))
})
// curl -X GET http://localhost:3000/42
// 42
// curl -X GET http://localhost:3000/
//
// curl -X GET http://localhost:3000/7.0
// Cannot GET /7.0

Middleware

Functions that are designed to make changes to the request or response are called middleware functions. The Next is a Fiber router function, when called, executes the next function that matches the current route.

Example of a middleware function

app.Use(func(c *fiber.Ctx) error {
// Set a custom header on all responses:
c.Set("X-Custom-Header", "Hello, World")

// Go to next middleware:
return c.Next()
})

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

Use method path is a mount, or prefix path, and limits middleware to only apply to any paths requested that begin with it.

Grouping

If you have many endpoints, you can organize your routes using Group.

func main() {
app := fiber.New()

api := app.Group("/api", middleware) // /api

v1 := api.Group("/v1", middleware) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", middleware) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

More information about this in our Grouping Guide

- - +When a request is received, the routes are checked in the order in which they are declared.

info

So please be careful to write routes with variable parameters after the routes that contain fixed parts, so that these variable parts do not match instead and unexpected behavior occurs.

Parameters

Route parameters are dynamic elements in the route, which are named or not named segments. This segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the Params function, with the name of the route parameter specified in the path as their respective keys or for unnamed parameters the character(*, +) and the counter of this.

The characters :, +, and * are characters that introduce a parameter.

Greedy parameters are indicated by wildcard(*) or plus(+) signs.

The routing also offers the possibility to use optional parameters, for the named parameters these are marked with a final "?", unlike the plus sign which is not optional, you can use the wildcard character for a parameter range which is optional and greedy.

Example of define routes with route parameters

// Parameters
app.Get("/user/:name/books/:title", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s\n", c.Params("name"))
fmt.Fprintf(c, "%s\n", c.Params("title"))
return nil
})
// Plus - greedy - not optional
app.Get("/user/+", func(c *fiber.Ctx) error {
return c.SendString(c.Params("+"))
})

// Optional parameter
app.Get("/user/:name?", func(c *fiber.Ctx) error {
return c.SendString(c.Params("name"))
})

// Wildcard - greedy - optional
app.Get("/user/*", func(c *fiber.Ctx) error {
return c.SendString(c.Params("*"))
})

// This route path will match requests to "/v1/some/resource/name:customVerb", since the parameter character is escaped
app.Get("/v1/some/resource/name\\:customVerb", func(c *fiber.Ctx) error {
return c.SendString("Hello, Community")
})
info

Since the hyphen (-) and the dot (.) are interpreted literally, they can be used along with route parameters for useful purposes.

info

All special parameter characters can also be escaped with "\\" and lose their value, so you can use them in the route if you want, like in the custom methods of the google api design guide.

// http://localhost:3000/plantae/prunus.persica
app.Get("/plantae/:genus.:species", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s.%s\n", c.Params("genus"), c.Params("species"))
return nil // prunus.persica
})
// http://localhost:3000/flights/LAX-SFO
app.Get("/flights/:from-:to", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s-%s\n", c.Params("from"), c.Params("to"))
return nil // LAX-SFO
})

Our intelligent router recognizes that the introductory parameter characters should be part of the request route in this case and can process them as such.

// http://localhost:3000/shop/product/color:blue/size:xs
app.Get("/shop/product/color::color/size::size", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s:%s\n", c.Params("color"), c.Params("size"))
return nil // blue:xs
})

In addition, several parameters in a row and several unnamed parameter characters in the route, such as the wildcard or plus character, are possible, which greatly expands the possibilities of the router for the user.

// GET /@v1
// Params: "sign" -> "@", "param" -> "v1"
app.Get("/:sign:param", handler)

// GET /api-v1
// Params: "name" -> "v1"
app.Get("/api-:name", handler)

// GET /customer/v1/cart/proxy
// Params: "*1" -> "customer/", "*2" -> "/cart"
app.Get("/*v1*/proxy", handler)

// GET /v1/brand/4/shop/blue/xs
// Params: "*1" -> "brand/4", "*2" -> "blue/xs"
app.Get("/v1/*/shop/*", handler)

We have adapted the routing strongly to the express routing, but currently without the possibility of the regular expressions, because they are quite slow. The possibilities can be tested with version 0.1.7 (express 4) in the online Express route tester.

Constraints

Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values by parameters. The feature was intorduced in v2.37.0 and inspired by .NET Core.

caution

Constraints aren't validation for parameters. If constraint aren't valid for parameter value, Fiber returns 404 handler.

ConstraintExampleExample matches
int:id<int>123456789, -123456789
bool:active<bool>true,false
guid:id<guid>CD2C1638-1638-72D5-1638-DEADBEEF1638
float:weight<float>1.234, -1,001.01e8
minLen(value):username<minLen(4)>Test (must be at least 4 characters)
maxLen(value):filename<maxLen(8)>MyFile (must be no more than 8 characters
len(length):filename<len(12)>somefile.txt (exactly 12 characters)
min(value):age<min(18)>19 (Integer value must be at least 18)
max(value):age<max(120)>91 (Integer value must be no more than 120)
range(min,max):age<range(18,120)>91 (Integer value must be at least 18 but no more than 120)
alpha:name<alpha>Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive)
datetime:dob<datetime(2006\\-01\\-02)>2005-11-01
regex(expression):date<regex(\d{4}-\d{2}-\d{2})}>2022-08-27 (Must match regular expression)

Examples

app.Get("/:test<min(5)>", func(c *fiber.Ctx) error {
return c.SendString(c.Params("test"))
})

// curl -X GET http://localhost:3000/12
// 12

// curl -X GET http://localhost:3000/1
// Cannot GET /1
caution

You should use \\ before routing-specific characters when to use datetime constraint (*, +, ?, :, /, <, >, ;, (, )), to avoid wrong parsing.

Optional Parameter Example

You can impose constraints on optional parameters as well.

app.Get("/:test<int>?", func(c *fiber.Ctx) error {
return c.SendString(c.Params("test"))
})
// curl -X GET http://localhost:3000/42
// 42
// curl -X GET http://localhost:3000/
//
// curl -X GET http://localhost:3000/7.0
// Cannot GET /7.0

Middleware

Functions that are designed to make changes to the request or response are called middleware functions. The Next is a Fiber router function, when called, executes the next function that matches the current route.

Example of a middleware function

app.Use(func(c *fiber.Ctx) error {
// Set a custom header on all responses:
c.Set("X-Custom-Header", "Hello, World")

// Go to next middleware:
return c.Next()
})

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

Use method path is a mount, or prefix path, and limits middleware to only apply to any paths requested that begin with it.

Grouping

If you have many endpoints, you can organize your routes using Group.

func main() {
app := fiber.New()

api := app.Group("/api", middleware) // /api

v1 := api.Group("/v1", middleware) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", middleware) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

More information about this in our Grouping Guide

+ + \ No newline at end of file diff --git a/guide/templates/index.html b/guide/templates/index.html index 94ce20a395d..0dc5cff992a 100644 --- a/guide/templates/index.html +++ b/guide/templates/index.html @@ -6,14 +6,14 @@ 📝 Templates | Fiber - - + +
Version: v2.x

📝 Templates

Template interfaces

Fiber provides a Views interface to provide your own template engine:

type Views interface {
Load() error
Render(io.Writer, string, interface{}, ...string) error
}

Views interface contains a Load and Render method, Load is executed by Fiber on app initialization to load/parse the templates.

// Pass engine to Fiber's Views Engine
app := fiber.New(fiber.Config{
Views: engine,
// Views Layout is the global layout for all template render until override on Render function.
ViewsLayout: "layouts/main"
})

The Render method is linked to the ctx.Render() function that accepts a template name and binding data. It will use global layout if layout is not being defined in Render function. -If the Fiber config option PassLocalsToViews is enabled, then all locals set using ctx.Locals(key, value) will be passed to the template.

app.Get("/", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"hello": "world",
});
})

Engines

Fiber team maintains templates package that provides wrappers for multiple template engines:

package main

import (
"log"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
)

func main() {
// Initialize standard Go html template engine
engine := html.New("./views", ".html")
// If you want other engine, just replace with following
// Create a new engine with django
// engine := django.New("./views", ".django")

app := fiber.New(fiber.Config{
Views: engine,
})
app.Get("/", func(c *fiber.Ctx) error {
// Render index template
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

log.Fatal(app.Listen(":3000"))
}
- - +If the Fiber config option PassLocalsToViews is enabled, then all locals set using ctx.Locals(key, value) will be passed to the template.

app.Get("/", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"hello": "world",
});
})

Engines

Fiber team maintains templates package that provides wrappers for multiple template engines:

package main

import (
"log"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
)

func main() {
// Initialize standard Go html template engine
engine := html.New("./views", ".html")
// If you want other engine, just replace with following
// Create a new engine with django
// engine := django.New("./views", ".django")

app := fiber.New(fiber.Config{
Views: engine,
})
app.Get("/", func(c *fiber.Ctx) error {
// Render index template
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

log.Fatal(app.Listen(":3000"))
}
+ + \ No newline at end of file diff --git a/guide/validation/index.html b/guide/validation/index.html index abaa617395c..60be4c530d5 100644 --- a/guide/validation/index.html +++ b/guide/validation/index.html @@ -6,13 +6,13 @@ 🔎 Validation | Fiber - - + +
-
Version: v2.x

🔎 Validation

Validator package

Fiber can make great use of the validator package to ensure correct validation of data to store.

You can find the detailed descriptions of the validations used in the fields contained on the structs below:

Validation Example
type Job struct{
Type string `validate:"required,min=3,max=32"`
Salary int `validate:"required,number"`
}

type User struct{
Name string `validate:"required,min=3,max=32"`
// use `*bool` here otherwise the validation will fail for `false` values
// Ref: https://github.com/go-playground/validator/issues/319#issuecomment-339222389
IsActive *bool `validate:"required"`
Email string `validate:"required,email,min=6,max=32"`
Job Job `validate:"dive"`
}

type ErrorResponse struct {
FailedField string
Tag string
Value string
}

var validate = validator.New()
func ValidateStruct(user User) []*ErrorResponse {
var errors []*ErrorResponse
err := validate.Struct(user)
if err != nil {
for _, err := range err.(validator.ValidationErrors) {
var element ErrorResponse
element.FailedField = err.StructNamespace()
element.Tag = err.Tag()
element.Value = err.Param()
errors = append(errors, &element)
}
}
return errors
}

func AddUser(c *fiber.Ctx) error {
//Connect to database

user := new(User)

if err := c.BodyParser(user); err != nil {
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{
"message": err.Error(),
})

}

errors := ValidateStruct(*user)
if errors != nil {
return c.Status(fiber.StatusBadRequest).JSON(errors)

}

//Do something else here

//Return user
return c.JSON(user)
}

// Running a test with the following curl commands
// curl -X POST -H "Content-Type: application/json" --data "{\"name\":\"john\",\"isactive\":\"True\"}" http://localhost:8080/register/user

// Results in
// [{"FailedField":"User.Email","Tag":"required","Value":""},{"FailedField":"User.Job.Salary","Tag":"required","Value":""},{"FailedField":"User.Job.Type","Tag":"required","Value":""}]⏎
- - +
Version: v2.x

🔎 Validation

Validator package

Fiber can make great use of the validator package to ensure correct validation of data to store.

You can find the detailed descriptions of the validations used in the fields contained on the structs below:

Validation Example
type Job struct{
Type string `validate:"required,min=3,max=32"`
Salary int `validate:"required,number"`
}

type User struct{
Name string `validate:"required,min=3,max=32"`
// use `*bool` here otherwise the validation will fail for `false` values
// Ref: https://github.com/go-playground/validator/issues/319#issuecomment-339222389
IsActive *bool `validate:"required"`
Email string `validate:"required,email,min=6,max=32"`
Job Job `validate:"dive"`
}

type ErrorResponse struct {
FailedField string
Tag string
Value string
}

var validate = validator.New()
func ValidateStruct(user User) []*ErrorResponse {
var errors []*ErrorResponse
err := validate.Struct(user)
if err != nil {
for _, err := range err.(validator.ValidationErrors) {
var element ErrorResponse
element.FailedField = err.StructNamespace()
element.Tag = err.Tag()
element.Value = err.Param()
errors = append(errors, &element)
}
}
return errors
}

func AddUser(c *fiber.Ctx) error {
//Connect to database

user := new(User)

if err := c.BodyParser(user); err != nil {
return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{
"message": err.Error(),
})

}

errors := ValidateStruct(*user)
if errors != nil {
return c.Status(fiber.StatusBadRequest).JSON(errors)

}

//Do something else here

//Return user
return c.JSON(user)
}

// Running a test with the following curl commands
// curl -X POST -H "Content-Type: application/json" --data "{\"name\":\"john\",\"isactive\":\"True\"}" http://localhost:8080/register/user

// Results in
// [{"FailedField":"User.Email","Tag":"required","Value":""},{"FailedField":"User.Job.Salary","Tag":"required","Value":""},{"FailedField":"User.Job.Type","Tag":"required","Value":""}]⏎
+ + \ No newline at end of file diff --git a/index.html b/index.html index 97b602b0808..e361ee5aa98 100644 --- a/index.html +++ b/index.html @@ -6,14 +6,14 @@ 👋 Welcome | Fiber - - + +
Version: v2.x

👋 Welcome

An online API documentation with examples so you can start building web apps with Fiber right away!

Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind.

These docs are for Fiber v2, which was released on September 15th, 2020.

Installation

First of all, download and install Go. 1.17 or higher is required.

Installation is done using the go get command:

go get github.com/gofiber/fiber/v2

Zero Allocation

Some values returned from *fiber.Ctx are not immutable by default.

Because fiber is optimized for high-performance, values returned from fiber.Ctx are not immutable by default and will be re-used across requests. As a rule of thumb, you must only use context values within the handler, and you must not keep any references. As soon as you return from the handler, any values you have obtained from the context will be re-used in future requests and will change below your feet. Here is an example:

func handler(c *fiber.Ctx) error {
// Variable is only valid within this handler
result := c.Params("foo")

// ...
}

If you need to persist such values outside the handler, make copies of their underlying buffer using the copy builtin. Here is an example for persisting a string:

func handler(c *fiber.Ctx) error {
// Variable is only valid within this handler
result := c.Params("foo")

// Make a copy
buffer := make([]byte, len(result))
copy(buffer, result)
resultCopy := string(buffer)
// Variable is now valid forever

// ...
}

We created a custom CopyString function that does the above and is available under gofiber/utils.

app.Get("/:foo", func(c *fiber.Ctx) error {
// Variable is now immutable
result := utils.CopyString(c.Params("foo"))

// ...
})

Alternatively, you can also use the Immutable setting. It will make all values returned from the context immutable, allowing you to persist them anywhere. Of course, this comes at the cost of performance.

app := fiber.New(fiber.Config{
Immutable: true,
})

For more information, please check #426 and #185.

Hello, World!

Embedded below is essentially the most straightforward Fiber app you can create:

package main

import "github.com/gofiber/fiber/v2"

func main() {
app := fiber.New()

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

app.Listen(":3000")
}
go run server.go

Browse to http://localhost:3000 and you should see Hello, World! on the page.

Basic routing

Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, PUT, POST, etc.).

Each route can have multiple handler functions that are executed when the route is matched.

Route definition takes the following structures:

// Function signature
app.Method(path string, ...func(*fiber.Ctx) error)
  • app is an instance of Fiber
  • Method is an HTTP request method: GET, PUT, POST, etc.
  • path is a virtual path on the server
  • func(*fiber.Ctx) error is a callback function containing the Context executed when the route is matched

Simple route

// Respond with "Hello, World!" on root path, "/"
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

Parameters

// GET http://localhost:8080/hello%20world

app.Get("/:value", func(c *fiber.Ctx) error {
return c.SendString("value: " + c.Params("value"))
// => Get request with value: hello world
})

Optional parameter

// GET http://localhost:3000/john

app.Get("/:name?", func(c *fiber.Ctx) error {
if c.Params("name") != "" {
return c.SendString("Hello " + c.Params("name"))
// => Hello john
}
return c.SendString("Where is john?")
})

Wildcards

// GET http://localhost:3000/api/user/john

app.Get("/api/*", func(c *fiber.Ctx) error {
return c.SendString("API path: " + c.Params("*"))
// => API path: user/john
})

Static files

To serve static files such as images, CSS, and JavaScript files, replace your function handler with a file or directory string.

Function signature:

app.Static(prefix, root string, config ...Static)

Use the following code to serve files in a directory named ./public:

app := fiber.New()

app.Static("/", "./public")

app.Listen(":3000")

Now, you can load the files that are in the ./public directory:

http://localhost:8080/hello.html
http://localhost:8080/js/jquery.js
http://localhost:8080/css/style.css

Note

For more information on how to build APIs in Go with Fiber, please check out this excellent article -on building an express-style API in Go with Fiber.

- - +on building an express-style API in Go with Fiber.

+ + \ No newline at end of file diff --git a/next/api/app/index.html b/next/api/app/index.html index 805b4de8815..79bae59c87c 100644 --- a/next/api/app/index.html +++ b/next/api/app/index.html @@ -6,13 +6,13 @@ 🚀 App | Fiber - - + +
-
Version: Next

🚀 App

Static

Use the Static method to serve static files such as images, CSS, and JavaScript.

info

By default, Static will serve index.html files in response to a request on a directory.

Signature
func (app *App) Static(prefix, root string, config ...Static) Router

Use the following code to serve files in a directory named ./public

app.Static("/", "./public")

// => http://localhost:3000/hello.html
// => http://localhost:3000/js/jquery.js
// => http://localhost:3000/css/style.css
Examples
// Serve files from multiple directories
app.Static("/", "./public")

// Serve files from "./files" directory:
app.Static("/", "./files")

You can use any virtual path prefix (where the path does not actually exist in the file system) for files that are served by the Static method, specify a prefix path for the static directory, as shown below:

Examples
app.Static("/static", "./public")

// => http://localhost:3000/static/hello.html
// => http://localhost:3000/static/js/jquery.js
// => http://localhost:3000/static/css/style.css

If you want to have a little bit more control regarding the settings for serving static files. You could use the fiber.Static struct to enable specific settings.

fiber.Static{}
// Static defines configuration options when defining static assets.
type Static struct {
// When set to true, the server tries minimizing CPU usage by caching compressed files.
// This works differently than the github.com/gofiber/compression middleware.
// Optional. Default value false
Compress bool `json:"compress"`

// When set to true, enables byte range requests.
// Optional. Default value false
ByteRange bool `json:"byte_range"`

// When set to true, enables directory browsing.
// Optional. Default value false.
Browse bool `json:"browse"`

// When set to true, enables direct download.
// Optional. Default value false.
Download bool `json:"download"`

// The name of the index file for serving a directory.
// Optional. Default value "index.html".
Index string `json:"index"`

// Expiration duration for inactive file handlers.
// Use a negative time.Duration to disable it.
//
// Optional. Default value 10 * time.Second.
CacheDuration time.Duration `json:"cache_duration"`

// The value for the Cache-Control HTTP-header
// that is set on the file response. MaxAge is defined in seconds.
//
// Optional. Default value 0.
MaxAge int `json:"max_age"`

// ModifyResponse defines a function that allows you to alter the response.
//
// Optional. Default: nil
ModifyResponse Handler

// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *Ctx) bool
}
Example
// Custom config
app.Static("/", "./public", fiber.Static{
Compress: true,
ByteRange: true,
Browse: true,
Index: "john.html",
CacheDuration: 10 * time.Second,
MaxAge: 3600,
})

Route Handlers

Registers a route bound to a specific HTTP method.

Signatures
// HTTP methods
func (app *App) Get(path string, handlers ...Handler) Router
func (app *App) Head(path string, handlers ...Handler) Router
func (app *App) Post(path string, handlers ...Handler) Router
func (app *App) Put(path string, handlers ...Handler) Router
func (app *App) Delete(path string, handlers ...Handler) Router
func (app *App) Connect(path string, handlers ...Handler) Router
func (app *App) Options(path string, handlers ...Handler) Router
func (app *App) Trace(path string, handlers ...Handler) Router
func (app *App) Patch(path string, handlers ...Handler) Router

// Add allows you to specifiy a method as value
func (app *App) Add(method, path string, handlers ...Handler) Router

// All will register the route on all HTTP methods
// Almost the same as app.Use but not bound to prefixes
func (app *App) All(path string, handlers ...Handler) Router
Examples
// Simple GET handler
app.Get("/api/list", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")
})

// Simple POST handler
app.Post("/api/register", func(c *fiber.Ctx) error {
return c.SendString("I'm a POST request!")
})

Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc

Signature
func (app *App) Use(args ...interface{}) Router
Examples
// Match any request
app.Use(func(c *fiber.Ctx) error {
return c.Next()
})

// Match request starting with /api
app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})

// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})

// Attach multiple handlers
app.Use("/api", func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
return c.Next()
}, func(c *fiber.Ctx) error {
return c.Next()
})

Mount

You can Mount Fiber instance by creating a *Mount

Signature
func (a *App) Mount(prefix string, app *App) Router
Examples
func main() {
app := fiber.New()
micro := fiber.New()
app.Mount("/john", micro) // GET /john/doe -> 200 OK

micro.Get("/doe", func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

MountPath

The MountPath property contains one or more path patterns on which a sub-app was mounted.

Signature
func (app *App) MountPath() string
Examples
func main() {
app := fiber.New()
one := fiber.New()
two := fiber.New()
three := fiber.New()

two.Mount("/three", three)
one.Mount("/two", two)
app.Mount("/one", one)

one.MountPath() // "/one"
two.MountPath() // "/one/two"
three.MountPath() // "/one/two/three"
app.MountPath() // ""
}
caution

Mounting order is important for MountPath. If you want to get mount paths properly, you should start mounting from the deepest app.

Group

You can group routes by creating a *Group struct.

Signature
func (app *App) Group(prefix string, handlers ...Handler) Router
Examples
func main() {
app := fiber.New()

api := app.Group("/api", handler) // /api

v1 := api.Group("/v1", handler) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", handler) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

Route

You can define routes with a common prefix inside the common function.

Signature
func (app *App) Route(prefix string, fn func(router Router), name ...string) Router
Examples
func main() {
app := fiber.New()

app.Route("/test", func(api fiber.Router) {
api.Get("/foo", handler).Name("foo") // /test/foo (name: test.foo)
api.Get("/bar", handler).Name("bar") // /test/bar (name: test.bar)
}, "test.")

log.Fatal(app.Listen(":3000"))
}

Server

Server returns the underlying fasthttp server

Signature
func (app *App) Server() *fasthttp.Server
Examples
func main() {
app := fiber.New()

app.Server().MaxConnsPerIP = 1

// ...
}

Server Shutdown

Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waits indefinitely for all connections to return to idle before shutting down.

ShutdownWithTimeout will forcefully close any active connections after the timeout expires.

ShutdownWithContext shuts down the server including by force if the context's deadline is exceeded.

func (app *App) Shutdown() error
func (app *App) ShutdownWithTimeout(timeout time.Duration) error
func (app *App) ShutdownWithContext(ctx context.Context) error

HandlersCount

This method returns the amount of registered handlers.

Signature
func (app *App) HandlersCount() uint32

Stack

This method returns the original router stack

Signature
func (app *App) Stack() [][]*Route
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/john/:age", handler)
app.Post("/register", handler)

data, _ := json.MarshalIndent(app.Stack(), "", " ")
fmt.Println(string(data))

app.Listen(":3000")
}
Result
[
[
{
"method": "GET",
"path": "/john/:age",
"params": [
"age"
]
}
],
[
{
"method": "HEAD",
"path": "/john/:age",
"params": [
"age"
]
}
],
[
{
"method": "POST",
"path": "/register",
"params": null
}
]
]

Name

This method assigns the name of latest created route.

Signature
func (app *App) Name(name string) Router
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/", handler)
app.Name("index")

app.Get("/doe", handler).Name("home")

app.Trace("/tracer", handler).Name("tracert")

app.Delete("/delete", handler).Name("delete")

a := app.Group("/a")
a.Name("fd.")

a.Get("/test", handler).Name("test")

data, _ := json.MarshalIndent(app.Stack(), "", " ")
fmt.Print(string(data))

app.Listen(":3000")

}
Result
[
[
{
"method": "GET",
"name": "index",
"path": "/",
"params": null
},
{
"method": "GET",
"name": "home",
"path": "/doe",
"params": null
},
{
"method": "GET",
"name": "fd.test",
"path": "/a/test",
"params": null
}
],
[
{
"method": "HEAD",
"name": "",
"path": "/",
"params": null
},
{
"method": "HEAD",
"name": "",
"path": "/doe",
"params": null
},
{
"method": "HEAD",
"name": "",
"path": "/a/test",
"params": null
}
],
null,
null,
[
{
"method": "DELETE",
"name": "delete",
"path": "/delete",
"params": null
}
],
null,
null,
[
{
"method": "TRACE",
"name": "tracert",
"path": "/tracer",
"params": null
}
],
null
]

GetRoute

This method gets the route by name.

Signature
func (app *App) GetRoute(name string) Route
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/", handler).Name("index")

data, _ := json.MarshalIndent(app.GetRoute("index"), "", " ")
fmt.Print(string(data))


app.Listen(":3000")

}
Result
{
"method": "GET",
"name": "index",
"path": "/",
"params": null
}

GetRoutes

This method gets all routes.

Signature
func (app *App) GetRoutes(filterUseOption ...bool) []Route

When filterUseOption equal to true, it will filter the routes registered by the middleware.

Examples
func main() {
app := fiber.New()
app.Post("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
}).Name("index")
data, _ := json.MarshalIndent(app.GetRoutes(true), "", " ")
fmt.Print(string(data))
}
Result
[
{
"method": "POST",
"name": "index",
"path": "/",
"params": null
}
]

Config

Config returns the app config as value ( read-only ).

Signature
func (app *App) Config() Config

Handler

Handler returns the server handler that can be used to serve custom *fasthttp.RequestCtx requests.

Signature
func (app *App) Handler() fasthttp.RequestHandler

Listen

Listen serves HTTP requests from the given address.

Signature
func (app *App) Listen(addr string) error
Examples
// Listen on port :8080 
app.Listen(":8080")

// Custom host
app.Listen("127.0.0.1:8080")

ListenTLS

ListenTLS serves HTTPs requests from the given address using certFile and keyFile paths to as TLS certificate and key file.

Signature
func (app *App) ListenTLS(addr, certFile, keyFile string) error
Examples
app.ListenTLS(":443", "./cert.pem", "./cert.key");

Using ListenTLS defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
Certificates: []tls.Certificate{
cert,
},
}

ListenTLSWithCertificate

Signature
func (app *App) ListenTLS(addr string, cert tls.Certificate) error
Examples
app.ListenTLSWithCertificate(":443", cert);

Using ListenTLSWithCertificate defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
Certificates: []tls.Certificate{
cert,
},
}

ListenMutualTLS

ListenMutualTLS serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file

Signature
func (app *App) ListenMutualTLS(addr, certFile, keyFile, clientCertFile string) error
Examples
app.ListenMutualTLS(":443", "./cert.pem", "./cert.key", "./ca-chain-cert.pem");

Using ListenMutualTLS defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: clientCertPool,
Certificates: []tls.Certificate{
cert,
},
}

ListenMutualTLSWithCertificate

ListenMutualTLSWithCertificate serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file

Signature
func (app *App) ListenMutualTLSWithCertificate(addr string, cert tls.Certificate, clientCertPool *x509.CertPool) error
Examples
app.ListenMutualTLSWithCertificate(":443", cert, clientCertPool);

Using ListenMutualTLSWithCertificate defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: clientCertPool,
Certificates: []tls.Certificate{
cert,
},
}

Listener

You can pass your own net.Listener using the Listener method. This method can be used to enable TLS/HTTPS with a custom tls.Config.

Signature
func (app *App) Listener(ln net.Listener) error
Examples
ln, _ := net.Listen("tcp", ":3000")

cer, _:= tls.LoadX509KeyPair("server.crt", "server.key")

ln = tls.NewListener(ln, &tls.Config{Certificates: []tls.Certificate{cer}})

app.Listener(ln)

Test

Testing your application is done with the Test method. Use this method for creating _test.go files or when you need to debug your routing logic. The default timeout is 1s if you want to disable a timeout altogether, pass -1 as a second argument.

Signature
func (app *App) Test(req *http.Request, msTimeout ...int) (*http.Response, error)
Examples
// Create route with GET method for test:
app.Get("/", func(c *fiber.Ctx) error {
fmt.Println(c.BaseURL()) // => http://google.com
fmt.Println(c.Get("X-Custom-Header")) // => hi

return c.SendString("hello, World!")
})

// http.Request
req := httptest.NewRequest("GET", "http://google.com", nil)
req.Header.Set("X-Custom-Header", "hi")

// http.Response
resp, _ := app.Test(req)

// Do something with results:
if resp.StatusCode == fiber.StatusOK {
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body)) // => Hello, World!
}

Hooks

Hooks is a method to return hooks property.

Signature
func (app *App) Hooks() *Hooks
- - +
Version: Next

🚀 App

Static

Use the Static method to serve static files such as images, CSS, and JavaScript.

info

By default, Static will serve index.html files in response to a request on a directory.

Signature
func (app *App) Static(prefix, root string, config ...Static) Router

Use the following code to serve files in a directory named ./public

app.Static("/", "./public")

// => http://localhost:3000/hello.html
// => http://localhost:3000/js/jquery.js
// => http://localhost:3000/css/style.css
Examples
// Serve files from multiple directories
app.Static("/", "./public")

// Serve files from "./files" directory:
app.Static("/", "./files")

You can use any virtual path prefix (where the path does not actually exist in the file system) for files that are served by the Static method, specify a prefix path for the static directory, as shown below:

Examples
app.Static("/static", "./public")

// => http://localhost:3000/static/hello.html
// => http://localhost:3000/static/js/jquery.js
// => http://localhost:3000/static/css/style.css

If you want to have a little bit more control regarding the settings for serving static files. You could use the fiber.Static struct to enable specific settings.

fiber.Static{}
// Static defines configuration options when defining static assets.
type Static struct {
// When set to true, the server tries minimizing CPU usage by caching compressed files.
// This works differently than the github.com/gofiber/compression middleware.
// Optional. Default value false
Compress bool `json:"compress"`

// When set to true, enables byte range requests.
// Optional. Default value false
ByteRange bool `json:"byte_range"`

// When set to true, enables directory browsing.
// Optional. Default value false.
Browse bool `json:"browse"`

// When set to true, enables direct download.
// Optional. Default value false.
Download bool `json:"download"`

// The name of the index file for serving a directory.
// Optional. Default value "index.html".
Index string `json:"index"`

// Expiration duration for inactive file handlers.
// Use a negative time.Duration to disable it.
//
// Optional. Default value 10 * time.Second.
CacheDuration time.Duration `json:"cache_duration"`

// The value for the Cache-Control HTTP-header
// that is set on the file response. MaxAge is defined in seconds.
//
// Optional. Default value 0.
MaxAge int `json:"max_age"`

// ModifyResponse defines a function that allows you to alter the response.
//
// Optional. Default: nil
ModifyResponse Handler

// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *Ctx) bool
}
Example
// Custom config
app.Static("/", "./public", fiber.Static{
Compress: true,
ByteRange: true,
Browse: true,
Index: "john.html",
CacheDuration: 10 * time.Second,
MaxAge: 3600,
})

Route Handlers

Registers a route bound to a specific HTTP method.

Signatures
// HTTP methods
func (app *App) Get(path string, handlers ...Handler) Router
func (app *App) Head(path string, handlers ...Handler) Router
func (app *App) Post(path string, handlers ...Handler) Router
func (app *App) Put(path string, handlers ...Handler) Router
func (app *App) Delete(path string, handlers ...Handler) Router
func (app *App) Connect(path string, handlers ...Handler) Router
func (app *App) Options(path string, handlers ...Handler) Router
func (app *App) Trace(path string, handlers ...Handler) Router
func (app *App) Patch(path string, handlers ...Handler) Router

// Add allows you to specifiy a method as value
func (app *App) Add(method, path string, handlers ...Handler) Router

// All will register the route on all HTTP methods
// Almost the same as app.Use but not bound to prefixes
func (app *App) All(path string, handlers ...Handler) Router
Examples
// Simple GET handler
app.Get("/api/list", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")
})

// Simple POST handler
app.Post("/api/register", func(c *fiber.Ctx) error {
return c.SendString("I'm a POST request!")
})

Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc

Signature
func (app *App) Use(args ...interface{}) Router
Examples
// Match any request
app.Use(func(c *fiber.Ctx) error {
return c.Next()
})

// Match request starting with /api
app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})

// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})

// Attach multiple handlers
app.Use("/api", func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
return c.Next()
}, func(c *fiber.Ctx) error {
return c.Next()
})

Mount

You can Mount Fiber instance by creating a *Mount

Signature
func (a *App) Mount(prefix string, app *App) Router
Examples
func main() {
app := fiber.New()
micro := fiber.New()
app.Mount("/john", micro) // GET /john/doe -> 200 OK

micro.Get("/doe", func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusOK)
})

log.Fatal(app.Listen(":3000"))
}

MountPath

The MountPath property contains one or more path patterns on which a sub-app was mounted.

Signature
func (app *App) MountPath() string
Examples
func main() {
app := fiber.New()
one := fiber.New()
two := fiber.New()
three := fiber.New()

two.Mount("/three", three)
one.Mount("/two", two)
app.Mount("/one", one)

one.MountPath() // "/one"
two.MountPath() // "/one/two"
three.MountPath() // "/one/two/three"
app.MountPath() // ""
}
caution

Mounting order is important for MountPath. If you want to get mount paths properly, you should start mounting from the deepest app.

Group

You can group routes by creating a *Group struct.

Signature
func (app *App) Group(prefix string, handlers ...Handler) Router
Examples
func main() {
app := fiber.New()

api := app.Group("/api", handler) // /api

v1 := api.Group("/v1", handler) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", handler) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

Route

You can define routes with a common prefix inside the common function.

Signature
func (app *App) Route(prefix string, fn func(router Router), name ...string) Router
Examples
func main() {
app := fiber.New()

app.Route("/test", func(api fiber.Router) {
api.Get("/foo", handler).Name("foo") // /test/foo (name: test.foo)
api.Get("/bar", handler).Name("bar") // /test/bar (name: test.bar)
}, "test.")

log.Fatal(app.Listen(":3000"))
}

Server

Server returns the underlying fasthttp server

Signature
func (app *App) Server() *fasthttp.Server
Examples
func main() {
app := fiber.New()

app.Server().MaxConnsPerIP = 1

// ...
}

Server Shutdown

Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waits indefinitely for all connections to return to idle before shutting down.

ShutdownWithTimeout will forcefully close any active connections after the timeout expires.

ShutdownWithContext shuts down the server including by force if the context's deadline is exceeded.

func (app *App) Shutdown() error
func (app *App) ShutdownWithTimeout(timeout time.Duration) error
func (app *App) ShutdownWithContext(ctx context.Context) error

HandlersCount

This method returns the amount of registered handlers.

Signature
func (app *App) HandlersCount() uint32

Stack

This method returns the original router stack

Signature
func (app *App) Stack() [][]*Route
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/john/:age", handler)
app.Post("/register", handler)

data, _ := json.MarshalIndent(app.Stack(), "", " ")
fmt.Println(string(data))

app.Listen(":3000")
}
Result
[
[
{
"method": "GET",
"path": "/john/:age",
"params": [
"age"
]
}
],
[
{
"method": "HEAD",
"path": "/john/:age",
"params": [
"age"
]
}
],
[
{
"method": "POST",
"path": "/register",
"params": null
}
]
]

Name

This method assigns the name of latest created route.

Signature
func (app *App) Name(name string) Router
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/", handler)
app.Name("index")

app.Get("/doe", handler).Name("home")

app.Trace("/tracer", handler).Name("tracert")

app.Delete("/delete", handler).Name("delete")

a := app.Group("/a")
a.Name("fd.")

a.Get("/test", handler).Name("test")

data, _ := json.MarshalIndent(app.Stack(), "", " ")
fmt.Print(string(data))

app.Listen(":3000")

}
Result
[
[
{
"method": "GET",
"name": "index",
"path": "/",
"params": null
},
{
"method": "GET",
"name": "home",
"path": "/doe",
"params": null
},
{
"method": "GET",
"name": "fd.test",
"path": "/a/test",
"params": null
}
],
[
{
"method": "HEAD",
"name": "",
"path": "/",
"params": null
},
{
"method": "HEAD",
"name": "",
"path": "/doe",
"params": null
},
{
"method": "HEAD",
"name": "",
"path": "/a/test",
"params": null
}
],
null,
null,
[
{
"method": "DELETE",
"name": "delete",
"path": "/delete",
"params": null
}
],
null,
null,
[
{
"method": "TRACE",
"name": "tracert",
"path": "/tracer",
"params": null
}
],
null
]

GetRoute

This method gets the route by name.

Signature
func (app *App) GetRoute(name string) Route
Examples
var handler = func(c *fiber.Ctx) error { return nil }

func main() {
app := fiber.New()

app.Get("/", handler).Name("index")

data, _ := json.MarshalIndent(app.GetRoute("index"), "", " ")
fmt.Print(string(data))


app.Listen(":3000")

}
Result
{
"method": "GET",
"name": "index",
"path": "/",
"params": null
}

GetRoutes

This method gets all routes.

Signature
func (app *App) GetRoutes(filterUseOption ...bool) []Route

When filterUseOption equal to true, it will filter the routes registered by the middleware.

Examples
func main() {
app := fiber.New()
app.Post("/", func (c *fiber.Ctx) error {
return c.SendString("Hello, World!")
}).Name("index")
data, _ := json.MarshalIndent(app.GetRoutes(true), "", " ")
fmt.Print(string(data))
}
Result
[
{
"method": "POST",
"name": "index",
"path": "/",
"params": null
}
]

Config

Config returns the app config as value ( read-only ).

Signature
func (app *App) Config() Config

Handler

Handler returns the server handler that can be used to serve custom *fasthttp.RequestCtx requests.

Signature
func (app *App) Handler() fasthttp.RequestHandler

Listen

Listen serves HTTP requests from the given address.

Signature
func (app *App) Listen(addr string) error
Examples
// Listen on port :8080 
app.Listen(":8080")

// Custom host
app.Listen("127.0.0.1:8080")

ListenTLS

ListenTLS serves HTTPs requests from the given address using certFile and keyFile paths to as TLS certificate and key file.

Signature
func (app *App) ListenTLS(addr, certFile, keyFile string) error
Examples
app.ListenTLS(":443", "./cert.pem", "./cert.key");

Using ListenTLS defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
Certificates: []tls.Certificate{
cert,
},
}

ListenTLSWithCertificate

Signature
func (app *App) ListenTLS(addr string, cert tls.Certificate) error
Examples
app.ListenTLSWithCertificate(":443", cert);

Using ListenTLSWithCertificate defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
Certificates: []tls.Certificate{
cert,
},
}

ListenMutualTLS

ListenMutualTLS serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file

Signature
func (app *App) ListenMutualTLS(addr, certFile, keyFile, clientCertFile string) error
Examples
app.ListenMutualTLS(":443", "./cert.pem", "./cert.key", "./ca-chain-cert.pem");

Using ListenMutualTLS defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: clientCertPool,
Certificates: []tls.Certificate{
cert,
},
}

ListenMutualTLSWithCertificate

ListenMutualTLSWithCertificate serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file

Signature
func (app *App) ListenMutualTLSWithCertificate(addr string, cert tls.Certificate, clientCertPool *x509.CertPool) error
Examples
app.ListenMutualTLSWithCertificate(":443", cert, clientCertPool);

Using ListenMutualTLSWithCertificate defaults to the following config ( use Listener to provide your own config )

Default *tls.Config
&tls.Config{
MinVersion: tls.VersionTLS12,
ClientAuth: tls.RequireAndVerifyClientCert,
ClientCAs: clientCertPool,
Certificates: []tls.Certificate{
cert,
},
}

Listener

You can pass your own net.Listener using the Listener method. This method can be used to enable TLS/HTTPS with a custom tls.Config.

Signature
func (app *App) Listener(ln net.Listener) error
Examples
ln, _ := net.Listen("tcp", ":3000")

cer, _:= tls.LoadX509KeyPair("server.crt", "server.key")

ln = tls.NewListener(ln, &tls.Config{Certificates: []tls.Certificate{cer}})

app.Listener(ln)

Test

Testing your application is done with the Test method. Use this method for creating _test.go files or when you need to debug your routing logic. The default timeout is 1s if you want to disable a timeout altogether, pass -1 as a second argument.

Signature
func (app *App) Test(req *http.Request, msTimeout ...int) (*http.Response, error)
Examples
// Create route with GET method for test:
app.Get("/", func(c *fiber.Ctx) error {
fmt.Println(c.BaseURL()) // => http://google.com
fmt.Println(c.Get("X-Custom-Header")) // => hi

return c.SendString("hello, World!")
})

// http.Request
req := httptest.NewRequest("GET", "http://google.com", nil)
req.Header.Set("X-Custom-Header", "hi")

// http.Response
resp, _ := app.Test(req)

// Do something with results:
if resp.StatusCode == fiber.StatusOK {
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body)) // => Hello, World!
}

Hooks

Hooks is a method to return hooks property.

Signature
func (app *App) Hooks() *Hooks
+ + \ No newline at end of file diff --git a/next/api/client/index.html b/next/api/client/index.html index 9004cf3447b..4f78162f5ff 100644 --- a/next/api/client/index.html +++ b/next/api/client/index.html @@ -6,14 +6,14 @@ 🌎 Client | Fiber - - + +
Version: Next

🌎 Client

Start request

Start a http request with http method and url.

Signatures
// Client http methods
func (c *Client) Get(url string) *Agent
func (c *Client) Head(url string) *Agent
func (c *Client) Post(url string) *Agent
func (c *Client) Put(url string) *Agent
func (c *Client) Patch(url string) *Agent
func (c *Client) Delete(url string) *Agent

✨ Agent

Agent is built on top of FastHTTP's HostClient which has lots of convenient helper methods such as dedicated methods for request methods.

Parse

Parse initializes a HostClient.

Parse
a := AcquireAgent()
req := a.Request()
req.Header.SetMethod(MethodGet)
req.SetRequestURI("http://example.com")

if err := a.Parse(); err != nil {
panic(err)
}

code, body, errs := a.Bytes() // ...

Set

Set sets the given key: value header.

Signature
func (a *Agent) Set(k, v string) *Agent
func (a *Agent) SetBytesK(k []byte, v string) *Agent
func (a *Agent) SetBytesV(k string, v []byte) *Agent
func (a *Agent) SetBytesKV(k []byte, v []byte) *Agent
Example
agent.Set("k1", "v1").
SetBytesK([]byte("k1"), "v1").
SetBytesV("k1", []byte("v1")).
SetBytesKV([]byte("k2"), []byte("v2"))
// ...

Add

Add adds the given key: value header. Multiple headers with the same key may be added with this function.

Signature
func (a *Agent) Add(k, v string) *Agent
func (a *Agent) AddBytesK(k []byte, v string) *Agent
func (a *Agent) AddBytesV(k string, v []byte) *Agent
func (a *Agent) AddBytesKV(k []byte, v []byte) *Agent
Example
agent.Add("k1", "v1").
AddBytesK([]byte("k1"), "v1").
AddBytesV("k1", []byte("v1")).
AddBytesKV([]byte("k2"), []byte("v2"))
// Headers:
// K1: v1
// K1: v1
// K1: v1
// K2: v2

ConnectionClose

ConnectionClose adds the Connection: close header.

Signature
func (a *Agent) ConnectionClose() *Agent
Example
agent.ConnectionClose()
// ...

UserAgent

UserAgent sets User-Agent header value.

Signature
func (a *Agent) UserAgent(userAgent string) *Agent
func (a *Agent) UserAgentBytes(userAgent []byte) *Agent
Example
agent.UserAgent("fiber")
// ...

Cookie sets a cookie in key: value form. Cookies can be used to set multiple cookies.

Signature
func (a *Agent) Cookie(key, value string) *Agent
func (a *Agent) CookieBytesK(key []byte, value string) *Agent
func (a *Agent) CookieBytesKV(key, value []byte) *Agent
func (a *Agent) Cookies(kv ...string) *Agent
func (a *Agent) CookiesBytesKV(kv ...[]byte) *Agent
Example
agent.Cookie("k", "v")
agent.Cookies("k1", "v1", "k2", "v2")
// ...

Referer

Referer sets the Referer header value.

Signature
func (a *Agent) Referer(referer string) *Agent
func (a *Agent) RefererBytes(referer []byte) *Agent
Example
agent.Referer("https://docs.gofiber.io")
// ...

ContentType

ContentType sets Content-Type header value.

Signature
func (a *Agent) ContentType(contentType string) *Agent
func (a *Agent) ContentTypeBytes(contentType []byte) *Agent
Example
agent.ContentType("custom-type")
// ...

Host

Host sets the Host header.

Signature
func (a *Agent) Host(host string) *Agent
func (a *Agent) HostBytes(host []byte) *Agent
Example
agent.Host("example.com")
// ...

QueryString

QueryString sets the URI query string.

Signature
func (a *Agent) QueryString(queryString string) *Agent
func (a *Agent) QueryStringBytes(queryString []byte) *Agent
Example
agent.QueryString("foo=bar")
// ...

BasicAuth

BasicAuth sets the URI username and password using HTTP Basic Auth.

Signature
func (a *Agent) BasicAuth(username, password string) *Agent
func (a *Agent) BasicAuthBytes(username, password []byte) *Agent
Example
agent.BasicAuth("foo", "bar")
// ...

Body

There are several ways to set request body.

Signature
func (a *Agent) BodyString(bodyString string) *Agent
func (a *Agent) Body(body []byte) *Agent

// BodyStream sets request body stream and, optionally body size.
//
// If bodySize is >= 0, then the bodyStream must provide exactly bodySize bytes
// before returning io.EOF.
//
// If bodySize < 0, then bodyStream is read until io.EOF.
//
// bodyStream.Close() is called after finishing reading all body data
// if it implements io.Closer.
//
// Note that GET and HEAD requests cannot have body.
func (a *Agent) BodyStream(bodyStream io.Reader, bodySize int) *Agent
Example
agent.BodyString("foo=bar")
agent.Body([]byte("bar=baz"))
agent.BodyStream(strings.NewReader("body=stream"), -1)
// ...

JSON

JSON sends a JSON request by setting the Content-Type header to application/json.

Signature
func (a *Agent) JSON(v interface{}) *Agent
Example
agent.JSON(fiber.Map{"success": true})
// ...

XML

XML sends an XML request by setting the Content-Type header to application/xml.

Signature
func (a *Agent) XML(v interface{}) *Agent
Example
agent.XML(fiber.Map{"success": true})
// ...

Form

Form sends a form request by setting the Content-Type header to application/x-www-form-urlencoded.

Signature
// Form sends form request with body if args is non-nil.
//
// It is recommended obtaining args via AcquireArgs and release it
// manually in performance-critical code.
func (a *Agent) Form(args *Args) *Agent
Example
args := AcquireArgs()
args.Set("foo", "bar")

agent.Form(args)
// ...
ReleaseArgs(args)

MultipartForm

MultipartForm sends multipart form request by setting the Content-Type header to multipart/form-data. These requests can include key-value's and files.

Signature
// MultipartForm sends multipart form request with k-v and files.
//
// It is recommended to obtain args via AcquireArgs and release it
// manually in performance-critical code.
func (a *Agent) MultipartForm(args *Args) *Agent
Example
args := AcquireArgs()
args.Set("foo", "bar")

agent.MultipartForm(args)
// ...
ReleaseArgs(args)

Fiber provides several methods for sending files. Note that they must be called before MultipartForm.

Boundary

Boundary sets boundary for multipart form request.

Signature
func (a *Agent) Boundary(boundary string) *Agent
Example
agent.Boundary("myBoundary")
.MultipartForm(nil)
// ...

SendFile(s)

SendFile read a file and appends it to a multipart form request. Sendfiles can be used to append multiple files.

Signature
func (a *Agent) SendFile(filename string, fieldname ...string) *Agent
func (a *Agent) SendFiles(filenamesAndFieldnames ...string) *Agent
Example
agent.SendFile("f", "field name")
.SendFiles("f1", "field name1", "f2").
.MultipartForm(nil)
// ...

FileData

FileData appends file data for multipart form request.

// FormFile represents multipart form file
type FormFile struct {
// Fieldname is form file's field name
Fieldname string
// Name is form file's name
Name string
// Content is form file's content
Content []byte
}
Signature
// FileData appends files for multipart form request.
//
// It is recommended obtaining formFile via AcquireFormFile and release it
// manually in performance-critical code.
func (a *Agent) FileData(formFiles ...*FormFile) *Agent
Example
ff1 := &FormFile{"filename1", "field name1", []byte("content")}
ff2 := &FormFile{"filename2", "field name2", []byte("content")}
agent.FileData(ff1, ff2).
MultipartForm(nil)
// ...

Debug

Debug mode enables logging request and response detail to io.writer(default is os.Stdout).

Signature
func (a *Agent) Debug(w ...io.Writer) *Agent
Example
agent.Debug()
// ...

Timeout

Timeout sets request timeout duration.

Signature
func (a *Agent) Timeout(timeout time.Duration) *Agent
Example
agent.Timeout(time.Second)
// ...

Reuse

Reuse enables the Agent instance to be used again after one request. If agent is reusable, then it should be released manually when it is no longer used.

Signature
func (a *Agent) Reuse() *Agent
Example
agent.Reuse()
// ...

InsecureSkipVerify

InsecureSkipVerify controls whether the Agent verifies the server certificate chain and host name.

Signature
func (a *Agent) InsecureSkipVerify() *Agent
Example
agent.InsecureSkipVerify()
// ...

TLSConfig

TLSConfig sets tls config.

Signature
func (a *Agent) TLSConfig(config *tls.Config) *Agent
Example
// Create tls certificate
cer, _ := tls.LoadX509KeyPair("pem", "key")

config := &tls.Config{
Certificates: []tls.Certificate{cer},
}

agent.TLSConfig(config)
// ...

MaxRedirectsCount

MaxRedirectsCount sets max redirect count for GET and HEAD.

Signature
func (a *Agent) MaxRedirectsCount(count int) *Agent
Example
agent.MaxRedirectsCount(7)
// ...

JSONEncoder

JSONEncoder sets custom json encoder.

Signature
func (a *Agent) JSONEncoder(jsonEncoder utils.JSONMarshal) *Agent
Example
agent.JSONEncoder(json.Marshal)
// ...

JSONDecoder

JSONDecoder sets custom json decoder.

Signature
func (a *Agent) JSONDecoder(jsonDecoder utils.JSONUnmarshal) *Agent
Example
agent.JSONDecoder(json.Unmarshal)
// ...

Request

Request returns Agent request instance.

Signature
func (a *Agent) Request() *Request
Example
req := agent.Request()
// ...

SetResponse

SetResponse sets custom response for the Agent instance. It is recommended obtaining custom response via AcquireResponse and release it manually in performance-critical code.

Signature
func (a *Agent) SetResponse(customResp *Response) *Agent
Example
resp := AcquireResponse()
agent.SetResponse(resp)
// ...
ReleaseResponse(resp)

Dest

Dest sets custom dest. The contents of dest will be replaced by the response body, if the dest is too small a new slice will be allocated.

Signature
func (a *Agent) Dest(dest []byte) *Agent {
Example
agent.Dest(nil)
// ...

Bytes

Bytes returns the status code, bytes body and errors of url.

Signature
func (a *Agent) Bytes() (code int, body []byte, errs []error)
Example
code, body, errs := agent.Bytes()
// ...

String

String returns the status code, string body and errors of url.

Signature
func (a *Agent) String() (int, string, []error)
Example
code, body, errs := agent.String()
// ...

Struct

Struct returns the status code, bytes body and errors of url. And bytes body will be unmarshalled to given v.

Signature
func (a *Agent) Struct(v interface{}) (code int, body []byte, errs []error)
Example
var d data
code, body, errs := agent.Struct(&d)
// ...

RetryIf

RetryIf controls whether a retry should be attempted after an error. -By default, will use isIdempotent function from fasthttp

Signature
func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent
Example
agent.Get("https://example.com").RetryIf(func (req *fiber.Request) bool {
return req.URI() == "https://example.com"
})
// ...
- - +By default, will use isIdempotent function from fasthttp

Signature
func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent
Example
agent.Get("https://example.com").RetryIf(func (req *fiber.Request) bool {
return req.URI() == "https://example.com"
})
// ...
+ + \ No newline at end of file diff --git a/next/api/constants/index.html b/next/api/constants/index.html index 712b208e2f5..6a51fba7a94 100644 --- a/next/api/constants/index.html +++ b/next/api/constants/index.html @@ -6,13 +6,13 @@ 📋 Constants | Fiber - - + +
-
Version: Next

📋 Constants

HTTP methods were copied from net/http.

const (
MethodGet = "GET" // RFC 7231, 4.3.1
MethodHead = "HEAD" // RFC 7231, 4.3.2
MethodPost = "POST" // RFC 7231, 4.3.3
MethodPut = "PUT" // RFC 7231, 4.3.4
MethodPatch = "PATCH" // RFC 5789
MethodDelete = "DELETE" // RFC 7231, 4.3.5
MethodConnect = "CONNECT" // RFC 7231, 4.3.6
MethodOptions = "OPTIONS" // RFC 7231, 4.3.7
MethodTrace = "TRACE" // RFC 7231, 4.3.8
methodUse = "USE"
)

MIME types that are commonly used

const (
MIMETextXML = "text/xml"
MIMETextHTML = "text/html"
MIMETextPlain = "text/plain"
MIMEApplicationXML = "application/xml"
MIMEApplicationJSON = "application/json"
MIMEApplicationJavaScript = "application/javascript"
MIMEApplicationForm = "application/x-www-form-urlencoded"
MIMEOctetStream = "application/octet-stream"
MIMEMultipartForm = "multipart/form-data"

MIMETextXMLCharsetUTF8 = "text/xml; charset=utf-8"
MIMETextHTMLCharsetUTF8 = "text/html; charset=utf-8"
MIMETextPlainCharsetUTF8 = "text/plain; charset=utf-8"
MIMEApplicationXMLCharsetUTF8 = "application/xml; charset=utf-8"
MIMEApplicationJSONCharsetUTF8 = "application/json; charset=utf-8"
MIMEApplicationJavaScriptCharsetUTF8 = "application/javascript; charset=utf-8"
)

HTTP status codes were copied from net/http.

const (
StatusContinue = 100 // RFC 7231, 6.2.1
StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2
StatusProcessing = 102 // RFC 2518, 10.1
StatusEarlyHints = 103 // RFC 8297
StatusOK = 200 // RFC 7231, 6.3.1
StatusCreated = 201 // RFC 7231, 6.3.2
StatusAccepted = 202 // RFC 7231, 6.3.3
StatusNonAuthoritativeInformation = 203 // RFC 7231, 6.3.4
StatusNoContent = 204 // RFC 7231, 6.3.5
StatusResetContent = 205 // RFC 7231, 6.3.6
StatusPartialContent = 206 // RFC 7233, 4.1
StatusMultiStatus = 207 // RFC 4918, 11.1
StatusAlreadyReported = 208 // RFC 5842, 7.1
StatusIMUsed = 226 // RFC 3229, 10.4.1
StatusMultipleChoices = 300 // RFC 7231, 6.4.1
StatusMovedPermanently = 301 // RFC 7231, 6.4.2
StatusFound = 302 // RFC 7231, 6.4.3
StatusSeeOther = 303 // RFC 7231, 6.4.4
StatusNotModified = 304 // RFC 7232, 4.1
StatusUseProxy = 305 // RFC 7231, 6.4.5
StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7
StatusPermanentRedirect = 308 // RFC 7538, 3
StatusBadRequest = 400 // RFC 7231, 6.5.1
StatusUnauthorized = 401 // RFC 7235, 3.1
StatusPaymentRequired = 402 // RFC 7231, 6.5.2
StatusForbidden = 403 // RFC 7231, 6.5.3
StatusNotFound = 404 // RFC 7231, 6.5.4
StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5
StatusNotAcceptable = 406 // RFC 7231, 6.5.6
StatusProxyAuthRequired = 407 // RFC 7235, 3.2
StatusRequestTimeout = 408 // RFC 7231, 6.5.7
StatusConflict = 409 // RFC 7231, 6.5.8
StatusGone = 410 // RFC 7231, 6.5.9
StatusLengthRequired = 411 // RFC 7231, 6.5.10
StatusPreconditionFailed = 412 // RFC 7232, 4.2
StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11
StatusRequestURITooLong = 414 // RFC 7231, 6.5.12
StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13
StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4
StatusExpectationFailed = 417 // RFC 7231, 6.5.14
StatusTeapot = 418 // RFC 7168, 2.3.3
StatusMisdirectedRequest = 421 // RFC 7540, 9.1.2
StatusUnprocessableEntity = 422 // RFC 4918, 11.2
StatusLocked = 423 // RFC 4918, 11.3
StatusFailedDependency = 424 // RFC 4918, 11.4
StatusTooEarly = 425 // RFC 8470, 5.2.
StatusUpgradeRequired = 426 // RFC 7231, 6.5.15
StatusPreconditionRequired = 428 // RFC 6585, 3
StatusTooManyRequests = 429 // RFC 6585, 4
StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5
StatusUnavailableForLegalReasons = 451 // RFC 7725, 3
StatusInternalServerError = 500 // RFC 7231, 6.6.1
StatusNotImplemented = 501 // RFC 7231, 6.6.2
StatusBadGateway = 502 // RFC 7231, 6.6.3
StatusServiceUnavailable = 503 // RFC 7231, 6.6.4
StatusGatewayTimeout = 504 // RFC 7231, 6.6.5
StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6
StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1
StatusInsufficientStorage = 507 // RFC 4918, 11.5
StatusLoopDetected = 508 // RFC 5842, 7.2
StatusNotExtended = 510 // RFC 2774, 7
StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6
)

Errors

var (
ErrBadRequest = NewError(StatusBadRequest) // RFC 7231, 6.5.1
ErrUnauthorized = NewError(StatusUnauthorized) // RFC 7235, 3.1
ErrPaymentRequired = NewError(StatusPaymentRequired) // RFC 7231, 6.5.2
ErrForbidden = NewError(StatusForbidden) // RFC 7231, 6.5.3
ErrNotFound = NewError(StatusNotFound) // RFC 7231, 6.5.4
ErrMethodNotAllowed = NewError(StatusMethodNotAllowed) // RFC 7231, 6.5.5
ErrNotAcceptable = NewError(StatusNotAcceptable) // RFC 7231, 6.5.6
ErrProxyAuthRequired = NewError(StatusProxyAuthRequired) // RFC 7235, 3.2
ErrRequestTimeout = NewError(StatusRequestTimeout) // RFC 7231, 6.5.7
ErrConflict = NewError(StatusConflict) // RFC 7231, 6.5.8
ErrGone = NewError(StatusGone) // RFC 7231, 6.5.9
ErrLengthRequired = NewError(StatusLengthRequired) // RFC 7231, 6.5.10
ErrPreconditionFailed = NewError(StatusPreconditionFailed) // RFC 7232, 4.2
ErrRequestEntityTooLarge = NewError(StatusRequestEntityTooLarge) // RFC 7231, 6.5.11
ErrRequestURITooLong = NewError(StatusRequestURITooLong) // RFC 7231, 6.5.12
ErrUnsupportedMediaType = NewError(StatusUnsupportedMediaType) // RFC 7231, 6.5.13
ErrRequestedRangeNotSatisfiable = NewError(StatusRequestedRangeNotSatisfiable) // RFC 7233, 4.4
ErrExpectationFailed = NewError(StatusExpectationFailed) // RFC 7231, 6.5.14
ErrTeapot = NewError(StatusTeapot) // RFC 7168, 2.3.3
ErrMisdirectedRequest = NewError(StatusMisdirectedRequest) // RFC 7540, 9.1.2
ErrUnprocessableEntity = NewError(StatusUnprocessableEntity) // RFC 4918, 11.2
ErrLocked = NewError(StatusLocked) // RFC 4918, 11.3
ErrFailedDependency = NewError(StatusFailedDependency) // RFC 4918, 11.4
ErrTooEarly = NewError(StatusTooEarly) // RFC 8470, 5.2.
ErrUpgradeRequired = NewError(StatusUpgradeRequired) // RFC 7231, 6.5.15
ErrPreconditionRequired = NewError(StatusPreconditionRequired) // RFC 6585, 3
ErrTooManyRequests = NewError(StatusTooManyRequests) // RFC 6585, 4
ErrRequestHeaderFieldsTooLarge = NewError(StatusRequestHeaderFieldsTooLarge) // RFC 6585, 5
ErrUnavailableForLegalReasons = NewError(StatusUnavailableForLegalReasons) // RFC 7725, 3
ErrInternalServerError = NewError(StatusInternalServerError) // RFC 7231, 6.6.1
ErrNotImplemented = NewError(StatusNotImplemented) // RFC 7231, 6.6.2
ErrBadGateway = NewError(StatusBadGateway) // RFC 7231, 6.6.3
ErrServiceUnavailable = NewError(StatusServiceUnavailable) // RFC 7231, 6.6.4
ErrGatewayTimeout = NewError(StatusGatewayTimeout) // RFC 7231, 6.6.5
ErrHTTPVersionNotSupported = NewError(StatusHTTPVersionNotSupported) // RFC 7231, 6.6.6
ErrVariantAlsoNegotiates = NewError(StatusVariantAlsoNegotiates) // RFC 2295, 8.1
ErrInsufficientStorage = NewError(StatusInsufficientStorage) // RFC 4918, 11.5
ErrLoopDetected = NewError(StatusLoopDetected) // RFC 5842, 7.2
ErrNotExtended = NewError(StatusNotExtended) // RFC 2774, 7
ErrNetworkAuthenticationRequired = NewError(StatusNetworkAuthenticationRequired) // RFC 6585, 6
)

HTTP Headers were copied from net/http.

const (
HeaderAuthorization = "Authorization"
HeaderProxyAuthenticate = "Proxy-Authenticate"
HeaderProxyAuthorization = "Proxy-Authorization"
HeaderWWWAuthenticate = "WWW-Authenticate"
HeaderAge = "Age"
HeaderCacheControl = "Cache-Control"
HeaderClearSiteData = "Clear-Site-Data"
HeaderExpires = "Expires"
HeaderPragma = "Pragma"
HeaderWarning = "Warning"
HeaderAcceptCH = "Accept-CH"
HeaderAcceptCHLifetime = "Accept-CH-Lifetime"
HeaderContentDPR = "Content-DPR"
HeaderDPR = "DPR"
HeaderEarlyData = "Early-Data"
HeaderSaveData = "Save-Data"
HeaderViewportWidth = "Viewport-Width"
HeaderWidth = "Width"
HeaderETag = "ETag"
HeaderIfMatch = "If-Match"
HeaderIfModifiedSince = "If-Modified-Since"
HeaderIfNoneMatch = "If-None-Match"
HeaderIfUnmodifiedSince = "If-Unmodified-Since"
HeaderLastModified = "Last-Modified"
HeaderVary = "Vary"
HeaderConnection = "Connection"
HeaderKeepAlive = "Keep-Alive"
HeaderAccept = "Accept"
HeaderAcceptCharset = "Accept-Charset"
HeaderAcceptEncoding = "Accept-Encoding"
HeaderAcceptLanguage = "Accept-Language"
HeaderCookie = "Cookie"
HeaderExpect = "Expect"
HeaderMaxForwards = "Max-Forwards"
HeaderSetCookie = "Set-Cookie"
HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"
HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers"
HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods"
HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin"
HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers"
HeaderAccessControlMaxAge = "Access-Control-Max-Age"
HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers"
HeaderAccessControlRequestMethod = "Access-Control-Request-Method"
HeaderOrigin = "Origin"
HeaderTimingAllowOrigin = "Timing-Allow-Origin"
HeaderXPermittedCrossDomainPolicies = "X-Permitted-Cross-Domain-Policies"
HeaderDNT = "DNT"
HeaderTk = "Tk"
HeaderContentDisposition = "Content-Disposition"
HeaderContentEncoding = "Content-Encoding"
HeaderContentLanguage = "Content-Language"
HeaderContentLength = "Content-Length"
HeaderContentLocation = "Content-Location"
HeaderContentType = "Content-Type"
HeaderForwarded = "Forwarded"
HeaderVia = "Via"
HeaderXForwardedFor = "X-Forwarded-For"
HeaderXForwardedHost = "X-Forwarded-Host"
HeaderXForwardedProto = "X-Forwarded-Proto"
HeaderXForwardedProtocol = "X-Forwarded-Protocol"
HeaderXForwardedSsl = "X-Forwarded-Ssl"
HeaderXUrlScheme = "X-Url-Scheme"
HeaderLocation = "Location"
HeaderFrom = "From"
HeaderHost = "Host"
HeaderReferer = "Referer"
HeaderReferrerPolicy = "Referrer-Policy"
HeaderUserAgent = "User-Agent"
HeaderAllow = "Allow"
HeaderServer = "Server"
HeaderAcceptRanges = "Accept-Ranges"
HeaderContentRange = "Content-Range"
HeaderIfRange = "If-Range"
HeaderRange = "Range"
HeaderContentSecurityPolicy = "Content-Security-Policy"
HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"
HeaderCrossOriginResourcePolicy = "Cross-Origin-Resource-Policy"
HeaderExpectCT = "Expect-CT"
HeaderFeaturePolicy = "Feature-Policy"
HeaderPublicKeyPins = "Public-Key-Pins"
HeaderPublicKeyPinsReportOnly = "Public-Key-Pins-Report-Only"
HeaderStrictTransportSecurity = "Strict-Transport-Security"
HeaderUpgradeInsecureRequests = "Upgrade-Insecure-Requests"
HeaderXContentTypeOptions = "X-Content-Type-Options"
HeaderXDownloadOptions = "X-Download-Options"
HeaderXFrameOptions = "X-Frame-Options"
HeaderXPoweredBy = "X-Powered-By"
HeaderXXSSProtection = "X-XSS-Protection"
HeaderLastEventID = "Last-Event-ID"
HeaderNEL = "NEL"
HeaderPingFrom = "Ping-From"
HeaderPingTo = "Ping-To"
HeaderReportTo = "Report-To"
HeaderTE = "TE"
HeaderTrailer = "Trailer"
HeaderTransferEncoding = "Transfer-Encoding"
HeaderSecWebSocketAccept = "Sec-WebSocket-Accept"
HeaderSecWebSocketExtensions = "Sec-WebSocket-Extensions"
HeaderSecWebSocketKey = "Sec-WebSocket-Key"
HeaderSecWebSocketProtocol = "Sec-WebSocket-Protocol"
HeaderSecWebSocketVersion = "Sec-WebSocket-Version"
HeaderAcceptPatch = "Accept-Patch"
HeaderAcceptPushPolicy = "Accept-Push-Policy"
HeaderAcceptSignature = "Accept-Signature"
HeaderAltSvc = "Alt-Svc"
HeaderDate = "Date"
HeaderIndex = "Index"
HeaderLargeAllocation = "Large-Allocation"
HeaderLink = "Link"
HeaderPushPolicy = "Push-Policy"
HeaderRetryAfter = "Retry-After"
HeaderServerTiming = "Server-Timing"
HeaderSignature = "Signature"
HeaderSignedHeaders = "Signed-Headers"
HeaderSourceMap = "SourceMap"
HeaderUpgrade = "Upgrade"
HeaderXDNSPrefetchControl = "X-DNS-Prefetch-Control"
HeaderXPingback = "X-Pingback"
HeaderXRequestID = "X-Request-ID"
HeaderXRequestedWith = "X-Requested-With"
HeaderXRobotsTag = "X-Robots-Tag"
HeaderXUACompatible = "X-UA-Compatible"
)
- - +
Version: Next

📋 Constants

HTTP methods were copied from net/http.

const (
MethodGet = "GET" // RFC 7231, 4.3.1
MethodHead = "HEAD" // RFC 7231, 4.3.2
MethodPost = "POST" // RFC 7231, 4.3.3
MethodPut = "PUT" // RFC 7231, 4.3.4
MethodPatch = "PATCH" // RFC 5789
MethodDelete = "DELETE" // RFC 7231, 4.3.5
MethodConnect = "CONNECT" // RFC 7231, 4.3.6
MethodOptions = "OPTIONS" // RFC 7231, 4.3.7
MethodTrace = "TRACE" // RFC 7231, 4.3.8
methodUse = "USE"
)

MIME types that are commonly used

const (
MIMETextXML = "text/xml"
MIMETextHTML = "text/html"
MIMETextPlain = "text/plain"
MIMEApplicationXML = "application/xml"
MIMEApplicationJSON = "application/json"
MIMEApplicationJavaScript = "application/javascript"
MIMEApplicationForm = "application/x-www-form-urlencoded"
MIMEOctetStream = "application/octet-stream"
MIMEMultipartForm = "multipart/form-data"

MIMETextXMLCharsetUTF8 = "text/xml; charset=utf-8"
MIMETextHTMLCharsetUTF8 = "text/html; charset=utf-8"
MIMETextPlainCharsetUTF8 = "text/plain; charset=utf-8"
MIMEApplicationXMLCharsetUTF8 = "application/xml; charset=utf-8"
MIMEApplicationJSONCharsetUTF8 = "application/json; charset=utf-8"
MIMEApplicationJavaScriptCharsetUTF8 = "application/javascript; charset=utf-8"
)

HTTP status codes were copied from net/http.

const (
StatusContinue = 100 // RFC 7231, 6.2.1
StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2
StatusProcessing = 102 // RFC 2518, 10.1
StatusEarlyHints = 103 // RFC 8297
StatusOK = 200 // RFC 7231, 6.3.1
StatusCreated = 201 // RFC 7231, 6.3.2
StatusAccepted = 202 // RFC 7231, 6.3.3
StatusNonAuthoritativeInformation = 203 // RFC 7231, 6.3.4
StatusNoContent = 204 // RFC 7231, 6.3.5
StatusResetContent = 205 // RFC 7231, 6.3.6
StatusPartialContent = 206 // RFC 7233, 4.1
StatusMultiStatus = 207 // RFC 4918, 11.1
StatusAlreadyReported = 208 // RFC 5842, 7.1
StatusIMUsed = 226 // RFC 3229, 10.4.1
StatusMultipleChoices = 300 // RFC 7231, 6.4.1
StatusMovedPermanently = 301 // RFC 7231, 6.4.2
StatusFound = 302 // RFC 7231, 6.4.3
StatusSeeOther = 303 // RFC 7231, 6.4.4
StatusNotModified = 304 // RFC 7232, 4.1
StatusUseProxy = 305 // RFC 7231, 6.4.5
StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7
StatusPermanentRedirect = 308 // RFC 7538, 3
StatusBadRequest = 400 // RFC 7231, 6.5.1
StatusUnauthorized = 401 // RFC 7235, 3.1
StatusPaymentRequired = 402 // RFC 7231, 6.5.2
StatusForbidden = 403 // RFC 7231, 6.5.3
StatusNotFound = 404 // RFC 7231, 6.5.4
StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5
StatusNotAcceptable = 406 // RFC 7231, 6.5.6
StatusProxyAuthRequired = 407 // RFC 7235, 3.2
StatusRequestTimeout = 408 // RFC 7231, 6.5.7
StatusConflict = 409 // RFC 7231, 6.5.8
StatusGone = 410 // RFC 7231, 6.5.9
StatusLengthRequired = 411 // RFC 7231, 6.5.10
StatusPreconditionFailed = 412 // RFC 7232, 4.2
StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11
StatusRequestURITooLong = 414 // RFC 7231, 6.5.12
StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13
StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4
StatusExpectationFailed = 417 // RFC 7231, 6.5.14
StatusTeapot = 418 // RFC 7168, 2.3.3
StatusMisdirectedRequest = 421 // RFC 7540, 9.1.2
StatusUnprocessableEntity = 422 // RFC 4918, 11.2
StatusLocked = 423 // RFC 4918, 11.3
StatusFailedDependency = 424 // RFC 4918, 11.4
StatusTooEarly = 425 // RFC 8470, 5.2.
StatusUpgradeRequired = 426 // RFC 7231, 6.5.15
StatusPreconditionRequired = 428 // RFC 6585, 3
StatusTooManyRequests = 429 // RFC 6585, 4
StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5
StatusUnavailableForLegalReasons = 451 // RFC 7725, 3
StatusInternalServerError = 500 // RFC 7231, 6.6.1
StatusNotImplemented = 501 // RFC 7231, 6.6.2
StatusBadGateway = 502 // RFC 7231, 6.6.3
StatusServiceUnavailable = 503 // RFC 7231, 6.6.4
StatusGatewayTimeout = 504 // RFC 7231, 6.6.5
StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6
StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1
StatusInsufficientStorage = 507 // RFC 4918, 11.5
StatusLoopDetected = 508 // RFC 5842, 7.2
StatusNotExtended = 510 // RFC 2774, 7
StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6
)

Errors

var (
ErrBadRequest = NewError(StatusBadRequest) // RFC 7231, 6.5.1
ErrUnauthorized = NewError(StatusUnauthorized) // RFC 7235, 3.1
ErrPaymentRequired = NewError(StatusPaymentRequired) // RFC 7231, 6.5.2
ErrForbidden = NewError(StatusForbidden) // RFC 7231, 6.5.3
ErrNotFound = NewError(StatusNotFound) // RFC 7231, 6.5.4
ErrMethodNotAllowed = NewError(StatusMethodNotAllowed) // RFC 7231, 6.5.5
ErrNotAcceptable = NewError(StatusNotAcceptable) // RFC 7231, 6.5.6
ErrProxyAuthRequired = NewError(StatusProxyAuthRequired) // RFC 7235, 3.2
ErrRequestTimeout = NewError(StatusRequestTimeout) // RFC 7231, 6.5.7
ErrConflict = NewError(StatusConflict) // RFC 7231, 6.5.8
ErrGone = NewError(StatusGone) // RFC 7231, 6.5.9
ErrLengthRequired = NewError(StatusLengthRequired) // RFC 7231, 6.5.10
ErrPreconditionFailed = NewError(StatusPreconditionFailed) // RFC 7232, 4.2
ErrRequestEntityTooLarge = NewError(StatusRequestEntityTooLarge) // RFC 7231, 6.5.11
ErrRequestURITooLong = NewError(StatusRequestURITooLong) // RFC 7231, 6.5.12
ErrUnsupportedMediaType = NewError(StatusUnsupportedMediaType) // RFC 7231, 6.5.13
ErrRequestedRangeNotSatisfiable = NewError(StatusRequestedRangeNotSatisfiable) // RFC 7233, 4.4
ErrExpectationFailed = NewError(StatusExpectationFailed) // RFC 7231, 6.5.14
ErrTeapot = NewError(StatusTeapot) // RFC 7168, 2.3.3
ErrMisdirectedRequest = NewError(StatusMisdirectedRequest) // RFC 7540, 9.1.2
ErrUnprocessableEntity = NewError(StatusUnprocessableEntity) // RFC 4918, 11.2
ErrLocked = NewError(StatusLocked) // RFC 4918, 11.3
ErrFailedDependency = NewError(StatusFailedDependency) // RFC 4918, 11.4
ErrTooEarly = NewError(StatusTooEarly) // RFC 8470, 5.2.
ErrUpgradeRequired = NewError(StatusUpgradeRequired) // RFC 7231, 6.5.15
ErrPreconditionRequired = NewError(StatusPreconditionRequired) // RFC 6585, 3
ErrTooManyRequests = NewError(StatusTooManyRequests) // RFC 6585, 4
ErrRequestHeaderFieldsTooLarge = NewError(StatusRequestHeaderFieldsTooLarge) // RFC 6585, 5
ErrUnavailableForLegalReasons = NewError(StatusUnavailableForLegalReasons) // RFC 7725, 3
ErrInternalServerError = NewError(StatusInternalServerError) // RFC 7231, 6.6.1
ErrNotImplemented = NewError(StatusNotImplemented) // RFC 7231, 6.6.2
ErrBadGateway = NewError(StatusBadGateway) // RFC 7231, 6.6.3
ErrServiceUnavailable = NewError(StatusServiceUnavailable) // RFC 7231, 6.6.4
ErrGatewayTimeout = NewError(StatusGatewayTimeout) // RFC 7231, 6.6.5
ErrHTTPVersionNotSupported = NewError(StatusHTTPVersionNotSupported) // RFC 7231, 6.6.6
ErrVariantAlsoNegotiates = NewError(StatusVariantAlsoNegotiates) // RFC 2295, 8.1
ErrInsufficientStorage = NewError(StatusInsufficientStorage) // RFC 4918, 11.5
ErrLoopDetected = NewError(StatusLoopDetected) // RFC 5842, 7.2
ErrNotExtended = NewError(StatusNotExtended) // RFC 2774, 7
ErrNetworkAuthenticationRequired = NewError(StatusNetworkAuthenticationRequired) // RFC 6585, 6
)

HTTP Headers were copied from net/http.

const (
HeaderAuthorization = "Authorization"
HeaderProxyAuthenticate = "Proxy-Authenticate"
HeaderProxyAuthorization = "Proxy-Authorization"
HeaderWWWAuthenticate = "WWW-Authenticate"
HeaderAge = "Age"
HeaderCacheControl = "Cache-Control"
HeaderClearSiteData = "Clear-Site-Data"
HeaderExpires = "Expires"
HeaderPragma = "Pragma"
HeaderWarning = "Warning"
HeaderAcceptCH = "Accept-CH"
HeaderAcceptCHLifetime = "Accept-CH-Lifetime"
HeaderContentDPR = "Content-DPR"
HeaderDPR = "DPR"
HeaderEarlyData = "Early-Data"
HeaderSaveData = "Save-Data"
HeaderViewportWidth = "Viewport-Width"
HeaderWidth = "Width"
HeaderETag = "ETag"
HeaderIfMatch = "If-Match"
HeaderIfModifiedSince = "If-Modified-Since"
HeaderIfNoneMatch = "If-None-Match"
HeaderIfUnmodifiedSince = "If-Unmodified-Since"
HeaderLastModified = "Last-Modified"
HeaderVary = "Vary"
HeaderConnection = "Connection"
HeaderKeepAlive = "Keep-Alive"
HeaderAccept = "Accept"
HeaderAcceptCharset = "Accept-Charset"
HeaderAcceptEncoding = "Accept-Encoding"
HeaderAcceptLanguage = "Accept-Language"
HeaderCookie = "Cookie"
HeaderExpect = "Expect"
HeaderMaxForwards = "Max-Forwards"
HeaderSetCookie = "Set-Cookie"
HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"
HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers"
HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods"
HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin"
HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers"
HeaderAccessControlMaxAge = "Access-Control-Max-Age"
HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers"
HeaderAccessControlRequestMethod = "Access-Control-Request-Method"
HeaderOrigin = "Origin"
HeaderTimingAllowOrigin = "Timing-Allow-Origin"
HeaderXPermittedCrossDomainPolicies = "X-Permitted-Cross-Domain-Policies"
HeaderDNT = "DNT"
HeaderTk = "Tk"
HeaderContentDisposition = "Content-Disposition"
HeaderContentEncoding = "Content-Encoding"
HeaderContentLanguage = "Content-Language"
HeaderContentLength = "Content-Length"
HeaderContentLocation = "Content-Location"
HeaderContentType = "Content-Type"
HeaderForwarded = "Forwarded"
HeaderVia = "Via"
HeaderXForwardedFor = "X-Forwarded-For"
HeaderXForwardedHost = "X-Forwarded-Host"
HeaderXForwardedProto = "X-Forwarded-Proto"
HeaderXForwardedProtocol = "X-Forwarded-Protocol"
HeaderXForwardedSsl = "X-Forwarded-Ssl"
HeaderXUrlScheme = "X-Url-Scheme"
HeaderLocation = "Location"
HeaderFrom = "From"
HeaderHost = "Host"
HeaderReferer = "Referer"
HeaderReferrerPolicy = "Referrer-Policy"
HeaderUserAgent = "User-Agent"
HeaderAllow = "Allow"
HeaderServer = "Server"
HeaderAcceptRanges = "Accept-Ranges"
HeaderContentRange = "Content-Range"
HeaderIfRange = "If-Range"
HeaderRange = "Range"
HeaderContentSecurityPolicy = "Content-Security-Policy"
HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"
HeaderCrossOriginResourcePolicy = "Cross-Origin-Resource-Policy"
HeaderExpectCT = "Expect-CT"
HeaderFeaturePolicy = "Feature-Policy"
HeaderPublicKeyPins = "Public-Key-Pins"
HeaderPublicKeyPinsReportOnly = "Public-Key-Pins-Report-Only"
HeaderStrictTransportSecurity = "Strict-Transport-Security"
HeaderUpgradeInsecureRequests = "Upgrade-Insecure-Requests"
HeaderXContentTypeOptions = "X-Content-Type-Options"
HeaderXDownloadOptions = "X-Download-Options"
HeaderXFrameOptions = "X-Frame-Options"
HeaderXPoweredBy = "X-Powered-By"
HeaderXXSSProtection = "X-XSS-Protection"
HeaderLastEventID = "Last-Event-ID"
HeaderNEL = "NEL"
HeaderPingFrom = "Ping-From"
HeaderPingTo = "Ping-To"
HeaderReportTo = "Report-To"
HeaderTE = "TE"
HeaderTrailer = "Trailer"
HeaderTransferEncoding = "Transfer-Encoding"
HeaderSecWebSocketAccept = "Sec-WebSocket-Accept"
HeaderSecWebSocketExtensions = "Sec-WebSocket-Extensions"
HeaderSecWebSocketKey = "Sec-WebSocket-Key"
HeaderSecWebSocketProtocol = "Sec-WebSocket-Protocol"
HeaderSecWebSocketVersion = "Sec-WebSocket-Version"
HeaderAcceptPatch = "Accept-Patch"
HeaderAcceptPushPolicy = "Accept-Push-Policy"
HeaderAcceptSignature = "Accept-Signature"
HeaderAltSvc = "Alt-Svc"
HeaderDate = "Date"
HeaderIndex = "Index"
HeaderLargeAllocation = "Large-Allocation"
HeaderLink = "Link"
HeaderPushPolicy = "Push-Policy"
HeaderRetryAfter = "Retry-After"
HeaderServerTiming = "Server-Timing"
HeaderSignature = "Signature"
HeaderSignedHeaders = "Signed-Headers"
HeaderSourceMap = "SourceMap"
HeaderUpgrade = "Upgrade"
HeaderXDNSPrefetchControl = "X-DNS-Prefetch-Control"
HeaderXPingback = "X-Pingback"
HeaderXRequestID = "X-Request-ID"
HeaderXRequestedWith = "X-Requested-With"
HeaderXRobotsTag = "X-Robots-Tag"
HeaderXUACompatible = "X-UA-Compatible"
)
+ + \ No newline at end of file diff --git a/next/api/ctx/index.html b/next/api/ctx/index.html index c61fe661a7b..29d46f1a26c 100644 --- a/next/api/ctx/index.html +++ b/next/api/ctx/index.html @@ -6,8 +6,8 @@ 🧠 Ctx | Fiber - - + +
@@ -24,8 +24,8 @@ If the parameter is not a number, it is still tried to be converted and usually returned as 1.

info

Defaults to the integer zero (0), if the param doesn't exist.

Signature
func (c *Ctx) QueryInt(key string, defaultValue ...int) int
Example
// GET http://example.com/?name=alex&wanna_cake=2&id=

app.Get("/", func(c *fiber.Ctx) error {
c.QueryInt("wanna_cake", 1) // 2
c.QueryInt("name", 1) // 1
c.QueryInt("id", 1) // 1
c.QueryInt("id") // 0

// ...
})

QueryParser

This method is similar to BodyParser, but for query parameters. It is important to use the struct tag "query". For example, if you want to parse a query parameter with a field called Pass, you would use a struct field of query:"pass".

Signature
func (c *Ctx) QueryParser(out interface{}) error
Example
// Field names should start with an uppercase letter
type Person struct {
Name string `query:"name"`
Pass string `query:"pass"`
Products []string `query:"products"`
}

app.Get("/", func(c *fiber.Ctx) error {
p := new(Person)

if err := c.QueryParser(p); err != nil {
return err
}

log.Println(p.Name) // john
log.Println(p.Pass) // doe
log.Println(p.Products) // [shoe, hat]

// ...
})
// Run tests with the following curl command

// curl "http://localhost:3000/?name=john&pass=doe&products=shoe,hat"

Range

A struct containing the type and a slice of ranges will be returned.

Signature
func (c *Ctx) Range(size int) (Range, error)
Example
// Range: bytes=500-700, 700-900
app.Get("/", func(c *fiber.Ctx) error {
b := c.Range(1000)
if b.Type == "bytes" {
for r := range r.Ranges {
fmt.Println(r)
// [500, 700]
}
}
})

Redirect

Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code.

info

If not specified, status defaults to 302 Found.

Signature
func (c *Ctx) Redirect(location string, status ...int) error
Example
app.Get("/coffee", func(c *fiber.Ctx) error {
return c.Redirect("/teapot")
})

app.Get("/teapot", func(c *fiber.Ctx) error {
return c.Status(fiber.StatusTeapot).Send("🍵 short and stout 🍵")
})
More examples
app.Get("/", func(c *fiber.Ctx) error {
return c.Redirect("/foo/bar")
return c.Redirect("../login")
return c.Redirect("http://example.com")
return c.Redirect("http://example.com", 301)
})

RedirectToRoute

Redirects to the specific route along with the parameters and with specified status, a positive integer that corresponds to an HTTP status code.

info

If not specified, status defaults to 302 Found.

info

If you want to send queries to route, you must add "queries" key typed as map[string]string to params.

Signature
func (c *Ctx) RedirectToRoute(routeName string, params fiber.Map, status ...int) error
Example
app.Get("/", func(c *fiber.Ctx) error {
// /user/fiber
return c.RedirectToRoute("user", fiber.Map{
"name": "fiber"
})
})

app.Get("/with-queries", func(c *fiber.Ctx) error {
// /user/fiber?data[0][name]=john&data[0][age]=10&test=doe
return c.RedirectToRoute("user", fiber.Map{
"name": "fiber",
"queries": map[string]string{"data[0][name]": "john", "data[0][age]": "10", "test": "doe"},
})
})

app.Get("/user/:name", func(c *fiber.Ctx) error {
return c.SendString(c.Params("name"))
}).Name("user")

RedirectBack

Redirects back to refer URL. It redirects to fallback URL if refer header doesn't exists, with specified status, a positive integer that corresponds to an HTTP status code.

info

If not specified, status defaults to 302 Found.

Signature
func (c *Ctx) RedirectBack(fallback string, status ...int) error
Example
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Home page")
})
app.Get("/test", func(c *fiber.Ctx) error {
c.Set("Content-Type", "text/html")
return c.SendString(`<a href="/back">Back</a>`)
})

app.Get("/back", func(c *fiber.Ctx) error {
return c.RedirectBack("/")
})

Render

Renders a view with data and sends a text/html response. By default Render uses the default Go Template engine. If you want to use another View engine, please take a look at our Template middleware.

Signature
func (c *Ctx) Render(name string, bind interface{}, layouts ...string) error

Request

Request return the *fasthttp.Request pointer

Signature
func (c *Ctx) Request() *fasthttp.Request
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Request().Header.Method()
// => []byte("GET")
})

ReqHeaderParser

This method is similar to BodyParser, but for request headers. It is important to use the struct tag "reqHeader". For example, if you want to parse a request header with a field called Pass, you would use a struct field of reqHeader:"pass".

Signature
func (c *Ctx) ReqHeaderParser(out interface{}) error
Example
// Field names should start with an uppercase letter
type Person struct {
Name string `reqHeader:"name"`
Pass string `reqHeader:"pass"`
Products []string `reqHeader:"products"`
}

app.Get("/", func(c *fiber.Ctx) error {
p := new(Person)

if err := c.ReqHeaderParser(p); err != nil {
return err
}

log.Println(p.Name) // john
log.Println(p.Pass) // doe
log.Println(p.Products) // [shoe, hat]

// ...
})
// Run tests with the following curl command

// curl "http://localhost:3000/" -H "name: john" -H "pass: doe" -H "products: shoe,hat"

Response

Response return the *fasthttp.Response pointer

Signature
func (c *Ctx) Response() *fasthttp.Response
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Response().BodyWriter().Write([]byte("Hello, World!"))
// => "Hello, World!"
return nil
})

RestartRouting

Instead of executing the next method when calling Next, RestartRouting restarts execution from the first method that matches the current route. This may be helpful after overriding the path, i. e. an internal redirect. Note that handlers might be executed again which could result in an infinite loop.

Signature
func (c *Ctx) RestartRouting() error
Example
app.Get("/new", func(c *fiber.Ctx) error {
return c.SendString("From /new")
})

app.Get("/old", func(c *fiber.Ctx) error {
c.Path("/new")
return c.RestartRouting()
})

Route

Returns the matched Route struct.

Signature
func (c *Ctx) Route() *Route
Example
// http://localhost:8080/hello


app.Get("/hello/:name", func(c *fiber.Ctx) error {
r := c.Route()
fmt.Println(r.Method, r.Path, r.Params, r.Handlers)
// GET /hello/:name handler [name]

// ...
})
caution

Do not rely on c.Route() in middlewares before calling c.Next() - c.Route() returns the last executed route.

Example
func MyMiddleware() fiber.Handler {
return func(c *fiber.Ctx) error {
beforeNext := c.Route().Path // Will be '/'
err := c.Next()
afterNext := c.Route().Path // Will be '/hello/:name'
return err
}
}

SaveFile

Method is used to save any multipart file to disk.

Signature
func (c *Ctx) SaveFile(fh *multipart.FileHeader, path string) error
Example
app.Post("/", func(c *fiber.Ctx) error {
// Parse the multipart form:
if form, err := c.MultipartForm(); err == nil {
// => *multipart.Form

// Get all files from "documents" key:
files := form.File["documents"]
// => []*multipart.FileHeader

// Loop through files:
for _, file := range files {
fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])
// => "tutorial.pdf" 360641 "application/pdf"

// Save the files to disk:
if err := c.SaveFile(file, fmt.Sprintf("./%s", file.Filename)); err != nil {
return err
}
}
return err
}
})

SaveFileToStorage

Method is used to save any multipart file to an external storage system.

Signature
func (c *Ctx) SaveFileToStorage(fileheader *multipart.FileHeader, path string, storage Storage) error
Example
storage := memory.New()

app.Post("/", func(c *fiber.Ctx) error {
// Parse the multipart form:
if form, err := c.MultipartForm(); err == nil {
// => *multipart.Form

// Get all files from "documents" key:
files := form.File["documents"]
// => []*multipart.FileHeader

// Loop through files:
for _, file := range files {
fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])
// => "tutorial.pdf" 360641 "application/pdf"

// Save the files to storage:
if err := c.SaveFileToStorage(file, fmt.Sprintf("./%s", file.Filename), storage); err != nil {
return err
}
}
return err
}
})

Secure

A boolean property that is true , if a TLS connection is established.

Signature
func (c *Ctx) Secure() bool
Example
// Secure() method is equivalent to:
c.Protocol() == "https"

Send

Sets the HTTP response body.

Signature
func (c *Ctx) Send(body []byte) error
Example
app.Get("/", func(c *fiber.Ctx) error {
return c.Send([]byte("Hello, World!")) // => "Hello, World!"
})

Fiber also provides SendString and SendStream methods for raw inputs.

tip

Use this if you don't need type assertion, recommended for faster performance.

Signature
func (c *Ctx) SendString(body string) error
func (c *Ctx) SendStream(stream io.Reader, size ...int) error
Example
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
// => "Hello, World!"

return c.SendStream(bytes.NewReader([]byte("Hello, World!")))
// => "Hello, World!"
})

SendFile

Transfers the file from the given path. Sets the Content-Type response HTTP header field based on the filenames extension.

caution

Method doesn´t use gzipping by default, set it to true to enable.

Signature
func (c *Ctx) SendFile(file string, compress ...bool) error
Example
app.Get("/not-found", func(c *fiber.Ctx) error {
return c.SendFile("./public/404.html");

// Disable compression
return c.SendFile("./static/index.html", false);
})
info

If the file contains an url specific character you have to escape it before passing the file path into the sendFile function.

Example
app.Get("/file-with-url-chars", func(c *fiber.Ctx) error {
return c.SendFile(url.PathEscape("hash_sign_#.txt"))
})

SendStatus

Sets the status code and the correct status message in the body, if the response body is empty.

tip

You can find all used status codes and messages here.

Signature
func (c *Ctx) SendStatus(status int) error
Example
app.Get("/not-found", func(c *fiber.Ctx) error {
return c.SendStatus(415)
// => 415 "Unsupported Media Type"

c.SendString("Hello, World!")
return c.SendStatus(415)
// => 415 "Hello, World!"
})

Set

Sets the response’s HTTP header field to the specified key, value.

Signature
func (c *Ctx) Set(key string, val string)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Set("Content-Type", "text/plain")
// => "Content-type: text/plain"

// ...
})

SetParserDecoder

Allow you to config BodyParser/QueryParser decoder, base on schema's options, providing possibility to add custom type for parsing.

Signature
func SetParserDecoder(parserConfig fiber.ParserConfig{
IgnoreUnknownKeys bool,
ParserType []fiber.ParserType{
Customtype interface{},
Converter func(string) reflect.Value,
},
ZeroEmpty bool,
SetAliasTag string,
})
Example

type CustomTime time.Time

// String() returns the time in string
func (ct *CustomTime) String() string {
t := time.Time(*ct).String()
return t
}

// Register the converter for CustomTime type format as 2006-01-02
var timeConverter = func(value string) reflect.Value {
fmt.Println("timeConverter", value)
if v, err := time.Parse("2006-01-02", value); err == nil {
return reflect.ValueOf(v)
}
return reflect.Value{}
}

customTime := fiber.ParserType{
Customtype: CustomTime{},
Converter: timeConverter,
}

// Add setting to the Decoder
fiber.SetParserDecoder(fiber.ParserConfig{
IgnoreUnknownKeys: true,
ParserType: []fiber.ParserType{customTime},
ZeroEmpty: true,
})

// Example to use CustomType, you pause custom time format not in RFC3339
type Demo struct {
Date CustomTime `form:"date" query:"date"`
Title string `form:"title" query:"title"`
Body string `form:"body" query:"body"`
}

app.Post("/body", func(c *fiber.Ctx) error {
var d Demo
c.BodyParser(&d)
fmt.Println("d.Date", d.Date.String())
return c.JSON(d)
})

app.Get("/query", func(c *fiber.Ctx) error {
var d Demo
c.QueryParser(&d)
fmt.Println("d.Date", d.Date.String())
return c.JSON(d)
})

// curl -X POST -F title=title -F body=body -F date=2021-10-20 http://localhost:3000/body

// curl -X GET "http://localhost:3000/query?title=title&body=body&date=2021-10-20"

SetUserContext

Sets the user specified implementation for context interface.

Signature
func (c *Ctx) SetUserContext(ctx context.Context)
Example
app.Get("/", func(c *fiber.Ctx) error {
ctx := context.Background()
c.SetUserContext(ctx)
// Here ctx could be any context implementation

// ...
})

Stale

https://expressjs.com/en/4x/api.html#req.stale

Signature
func (c *Ctx) Stale() bool

Status

Sets the HTTP status for the response.

info

Method is a chainable.

Signature
func (c *Ctx) Status(status int) *Ctx
Example
app.Get("/fiber", func(c *fiber.Ctx) error {
c.Status(fiber.StatusOK)
return nil
}

app.Get("/hello", func(c *fiber.Ctx) error {
return c.Status(fiber.StatusBadRequest).SendString("Bad Request")
}

app.Get("/world", func(c *fiber.Ctx) error {
return c.Status(fiber.StatusNotFound).SendFile("./public/gopher.png")
})

Subdomains

Returns a string slice of subdomains in the domain name of the request.

The application property subdomain offset, which defaults to 2, is used for determining the beginning of the subdomain segments.

Signature
func (c *Ctx) Subdomains(offset ...int) []string
Example
// Host: "tobi.ferrets.example.com"

app.Get("/", func(c *fiber.Ctx) error {
c.Subdomains() // ["ferrets", "tobi"]
c.Subdomains(1) // ["tobi"]

// ...
})

Type

Sets the Content-Type HTTP header to the MIME type listed here specified by the file extension.

Signature
func (c *Ctx) Type(ext string, charset ...string) *Ctx
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Type(".html") // => "text/html"
c.Type("html") // => "text/html"
c.Type("png") // => "image/png"

c.Type("json", "utf-8") // => "application/json; charset=utf-8"

// ...
})

UserContext

UserContext returns a context implementation that was set by user earlier -or returns a non-nil, empty context, if it was not set earlier.

Signature
func (c *Ctx) UserContext() context.Context
Example
app.Get("/", func(c *fiber.Ctx) error {
ctx := c.UserContext()
// ctx is context implementation set by user

// ...
})

Vary

Adds the given header field to the Vary response header. This will append the header, if not already listed, otherwise leaves it listed in the current location.

info

Multiple fields are allowed.

Signature
func (c *Ctx) Vary(fields ...string)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Vary("Origin") // => Vary: Origin
c.Vary("User-Agent") // => Vary: Origin, User-Agent

// No duplicates
c.Vary("Origin") // => Vary: Origin, User-Agent

c.Vary("Accept-Encoding", "Accept")
// => Vary: Origin, User-Agent, Accept-Encoding, Accept

// ...
})

Write

Write adopts the Writer interface

Signature
func (c *Ctx) Write(p []byte) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Write([]byte("Hello, World!")) // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

Writef

Writef adopts the string with variables

Signature
func (c *Ctx) Writef(f string, a ...interface{}) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
world := "World!"
c.Writef("Hello, %s", world) // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

WriteString

WriteString adopts the string

Signature
func (c *Ctx) WriteString(s string) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.WriteString("Hello, World!") // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

XHR

A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery).

Signature
func (c *Ctx) XHR() bool
Example
// X-Requested-With: XMLHttpRequest

app.Get("/", func(c *fiber.Ctx) error {
c.XHR() // true

// ...
})

XML

Converts any interface or string to XML using the standard encoding/xml package.

info

XML also sets the content header to application/xml.

Signature
func (c *Ctx) XML(data interface{}) error 
Example
type SomeStruct struct {
XMLName xml.Name `xml:"Fiber"`
Name string `xml:"Name"`
Age uint8 `xml:"Age"`
}

app.Get("/", func(c *fiber.Ctx) error {
// Create data struct:
data := SomeStruct{
Name: "Grame",
Age: 20,
}

return c.XML(data)
// <Fiber>
// <Name>Grame</Name>
// <Age>20</Age>
// </Fiber>
})
- - +or returns a non-nil, empty context, if it was not set earlier.

Signature
func (c *Ctx) UserContext() context.Context
Example
app.Get("/", func(c *fiber.Ctx) error {
ctx := c.UserContext()
// ctx is context implementation set by user

// ...
})

Vary

Adds the given header field to the Vary response header. This will append the header, if not already listed, otherwise leaves it listed in the current location.

info

Multiple fields are allowed.

Signature
func (c *Ctx) Vary(fields ...string)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Vary("Origin") // => Vary: Origin
c.Vary("User-Agent") // => Vary: Origin, User-Agent

// No duplicates
c.Vary("Origin") // => Vary: Origin, User-Agent

c.Vary("Accept-Encoding", "Accept")
// => Vary: Origin, User-Agent, Accept-Encoding, Accept

// ...
})

Write

Write adopts the Writer interface

Signature
func (c *Ctx) Write(p []byte) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.Write([]byte("Hello, World!")) // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

Writef

Writef adopts the string with variables

Signature
func (c *Ctx) Writef(f string, a ...interface{}) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
world := "World!"
c.Writef("Hello, %s", world) // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

WriteString

WriteString adopts the string

Signature
func (c *Ctx) WriteString(s string) (n int, err error)
Example
app.Get("/", func(c *fiber.Ctx) error {
c.WriteString("Hello, World!") // => "Hello, World!"

fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})

XHR

A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery).

Signature
func (c *Ctx) XHR() bool
Example
// X-Requested-With: XMLHttpRequest

app.Get("/", func(c *fiber.Ctx) error {
c.XHR() // true

// ...
})

XML

Converts any interface or string to XML using the standard encoding/xml package.

info

XML also sets the content header to application/xml.

Signature
func (c *Ctx) XML(data interface{}) error 
Example
type SomeStruct struct {
XMLName xml.Name `xml:"Fiber"`
Name string `xml:"Name"`
Age uint8 `xml:"Age"`
}

app.Get("/", func(c *fiber.Ctx) error {
// Create data struct:
data := SomeStruct{
Name: "Grame",
Age: 20,
}

return c.XML(data)
// <Fiber>
// <Name>Grame</Name>
// <Age>20</Age>
// </Fiber>
})
+ + \ No newline at end of file diff --git a/next/api/fiber/index.html b/next/api/fiber/index.html index c5d6a81ddfa..70cd42ae2e3 100644 --- a/next/api/fiber/index.html +++ b/next/api/fiber/index.html @@ -6,13 +6,13 @@ 📦 Fiber | Fiber - - + +
-
Version: Next

📦 Fiber

New

This method creates a new App named instance. You can pass optional config when creating a new instance.

Signature
func New(config ...Config) *App
Example
// Default config
app := fiber.New()

// ...

Config

You can pass an optional Config when creating a new Fiber instance.

Example
// Custom config
app := fiber.New(fiber.Config{
Prefork: true,
CaseSensitive: true,
StrictRouting: true,
ServerHeader: "Fiber",
AppName: "Test App v1.0.1",
})

// ...

Config fields

PropertyTypeDescriptionDefault
AppNamestringThis allows to setup app name for the app""
BodyLimitintSets 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
CaseSensitiveboolWhen enabled, /Foo and /foo are different routes. When disabled, /Fooand /foo are treated the same.false
ColorSchemeColorsYou can define custom color scheme. They'll be used for startup message, route list and some middlewares.DefaultColors
CompressedFileSuffixstringAdds a suffix to the original file name and tries saving the resulting compressed file under the new file name.".fiber.gz"
ConcurrencyintMaximum number of concurrent connections.256 * 1024
DisableDefaultContentTypeboolWhen set to true, causes the default Content-Type header to be excluded from the Response.false
DisableDefaultDateboolWhen set to true causes the default date header to be excluded from the response.false
DisableHeaderNormalizingboolBy default all header names are normalized: conteNT-tYPE -> Content-Typefalse
DisableKeepaliveboolDisable keep-alive connections, the server will close incoming connections after sending the first response to the clientfalse
DisablePreParseMultipartFormboolWill not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data.false
DisableStartupMessageboolWhen set to true, it will not print out debug informationfalse
ETagboolEnable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method (CRC-32). Weak ETags are the default when enabled.false
EnableIPValidationboolIf set to true, c.IP() and c.IPs() will validate IP addresses before returning them. Also, c.IP() will return only the first valid IP rather than just the raw header value that may be a comma seperated string.

WARNING: There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header.
false
EnablePrintRoutesboolEnablePrintRoutes enables print all routes with their method, path, name and handler..false
EnableTrustedProxyCheckboolWhen set to true, fiber will check whether proxy is trusted, using TrustedProxies list.

By default c.Protocol() will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, c.IP() will get value from ProxyHeader header, c.Hostname() will get value from X-Forwarded-Host header.
If EnableTrustedProxyCheck is true, and RemoteIP is in the list of TrustedProxies c.Protocol(), c.IP(), and c.Hostname() will have the same behaviour when EnableTrustedProxyCheck disabled, if RemoteIP isn't in the list, c.Protocol() will return https in case when tls connection is handled by the app, or http otherwise, c.IP() will return RemoteIP() from fasthttp context, c.Hostname() will return fasthttp.Request.URI().Host()
false
ErrorHandlerErrorHandlerErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests.DefaultErrorHandler
GETOnlyboolRejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set.false
IdleTimeouttime.DurationThe 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
ImmutableboolWhen enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue #185.false
JSONDecoderutils.JSONUnmarshalAllowing for flexibility in using another json library for decoding.json.Unmarshal
JSONEncoderutils.JSONMarshalAllowing for flexibility in using another json library for encoding.json.Marshal
NetworkstringKnown networks are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only)

WARNING: When prefork is set to true, only "tcp4" and "tcp6" can be chosen.
NetworkTCP4
PassLocalsToViewsboolPassLocalsToViews Enables passing of the locals set on a fiber.Ctx to the template engine. See our Template Middleware for supported engines.false
PreforkboolEnables use of theSO_REUSEPORTsocket option. This will spawn multiple Go processes listening on the same port. learn more about socket sharding. NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with CMD ./app or CMD ["sh", "-c", "/app"]. For more info, see this issue comment.false
ProxyHeaderstringThis will enable c.IP() to return the value of the given header key. By default c.IP()will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. X-Forwarded-*.""
ReadBufferSizeintper-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies).4096
ReadTimeouttime.DurationThe amount of time allowed to read the full request, including the body. The default timeout is unlimited.nil
RequestMethods[]stringRequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish.DefaultMethods
ServerHeaderstringEnables the Server HTTP header with the given value.""
StreamRequestBodyboolStreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit.false
StrictRoutingboolWhen enabled, the router treats /foo and /foo/ as different. Otherwise, the router treats /foo and /foo/ as the same.false
TrustedProxies[]stringContains the list of trusted proxy IP's. Look at EnableTrustedProxyCheck doc.

It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses.
[]string*__*
UnescapePathboolConverts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special charactersfalse
ViewsViewsViews is the interface that wraps the Render function. See our Template Middleware for supported engines.nil
ViewsLayoutstringViews Layout is the global layout for all template render until override on Render function. See our Template Middleware for supported engines.""
WriteBufferSizeintPer-connection buffer size for responses' writing.4096
WriteTimeouttime.DurationThe maximum duration before timing out writes of the response. The default timeout is unlimited.nil
XMLEncoderutils.XMLMarshalAllowing for flexibility in using another XML library for encoding.xml.Marshal

NewError

NewError creates a new HTTPError instance with an optional message.

Signature
func NewError(code int, message ...string) *Error
Example
app.Get("/", func(c *fiber.Ctx) error {
return fiber.NewError(782, "Custom error message")
})

IsChild

IsChild determines if the current process is a result of Prefork.

Signature
func IsChild() bool
Example
// Prefork will spawn child processes
app := fiber.New(fiber.Config{
Prefork: true,
})

if !fiber.IsChild() {
fmt.Println("I'm the parent process")
} else {
fmt.Println("I'm a child process")
}

// ...
- - +
Version: Next

📦 Fiber

New

This method creates a new App named instance. You can pass optional config when creating a new instance.

Signature
func New(config ...Config) *App
Example
// Default config
app := fiber.New()

// ...

Config

You can pass an optional Config when creating a new Fiber instance.

Example
// Custom config
app := fiber.New(fiber.Config{
Prefork: true,
CaseSensitive: true,
StrictRouting: true,
ServerHeader: "Fiber",
AppName: "Test App v1.0.1",
})

// ...

Config fields

PropertyTypeDescriptionDefault
AppNamestringThis allows to setup app name for the app""
BodyLimitintSets 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
CaseSensitiveboolWhen enabled, /Foo and /foo are different routes. When disabled, /Fooand /foo are treated the same.false
ColorSchemeColorsYou can define custom color scheme. They'll be used for startup message, route list and some middlewares.DefaultColors
CompressedFileSuffixstringAdds a suffix to the original file name and tries saving the resulting compressed file under the new file name.".fiber.gz"
ConcurrencyintMaximum number of concurrent connections.256 * 1024
DisableDefaultContentTypeboolWhen set to true, causes the default Content-Type header to be excluded from the Response.false
DisableDefaultDateboolWhen set to true causes the default date header to be excluded from the response.false
DisableHeaderNormalizingboolBy default all header names are normalized: conteNT-tYPE -> Content-Typefalse
DisableKeepaliveboolDisable keep-alive connections, the server will close incoming connections after sending the first response to the clientfalse
DisablePreParseMultipartFormboolWill not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data.false
DisableStartupMessageboolWhen set to true, it will not print out debug informationfalse
ETagboolEnable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method (CRC-32). Weak ETags are the default when enabled.false
EnableIPValidationboolIf set to true, c.IP() and c.IPs() will validate IP addresses before returning them. Also, c.IP() will return only the first valid IP rather than just the raw header value that may be a comma seperated string.

WARNING: There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header.
false
EnablePrintRoutesboolEnablePrintRoutes enables print all routes with their method, path, name and handler..false
EnableTrustedProxyCheckboolWhen set to true, fiber will check whether proxy is trusted, using TrustedProxies list.

By default c.Protocol() will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, c.IP() will get value from ProxyHeader header, c.Hostname() will get value from X-Forwarded-Host header.
If EnableTrustedProxyCheck is true, and RemoteIP is in the list of TrustedProxies c.Protocol(), c.IP(), and c.Hostname() will have the same behaviour when EnableTrustedProxyCheck disabled, if RemoteIP isn't in the list, c.Protocol() will return https in case when tls connection is handled by the app, or http otherwise, c.IP() will return RemoteIP() from fasthttp context, c.Hostname() will return fasthttp.Request.URI().Host()
false
ErrorHandlerErrorHandlerErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests.DefaultErrorHandler
GETOnlyboolRejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set.false
IdleTimeouttime.DurationThe 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
ImmutableboolWhen enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue #185.false
JSONDecoderutils.JSONUnmarshalAllowing for flexibility in using another json library for decoding.json.Unmarshal
JSONEncoderutils.JSONMarshalAllowing for flexibility in using another json library for encoding.json.Marshal
NetworkstringKnown networks are "tcp", "tcp4" (IPv4-only), "tcp6" (IPv6-only)

WARNING: When prefork is set to true, only "tcp4" and "tcp6" can be chosen.
NetworkTCP4
PassLocalsToViewsboolPassLocalsToViews Enables passing of the locals set on a fiber.Ctx to the template engine. See our Template Middleware for supported engines.false
PreforkboolEnables use of theSO_REUSEPORTsocket option. This will spawn multiple Go processes listening on the same port. learn more about socket sharding. NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with CMD ./app or CMD ["sh", "-c", "/app"]. For more info, see this issue comment.false
ProxyHeaderstringThis will enable c.IP() to return the value of the given header key. By default c.IP()will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. X-Forwarded-*.""
ReadBufferSizeintper-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies).4096
ReadTimeouttime.DurationThe amount of time allowed to read the full request, including the body. The default timeout is unlimited.nil
RequestMethods[]stringRequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish.DefaultMethods
ServerHeaderstringEnables the Server HTTP header with the given value.""
StreamRequestBodyboolStreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit.false
StrictRoutingboolWhen enabled, the router treats /foo and /foo/ as different. Otherwise, the router treats /foo and /foo/ as the same.false
TrustedProxies[]stringContains the list of trusted proxy IP's. Look at EnableTrustedProxyCheck doc.

It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses.
[]string*__*
UnescapePathboolConverts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special charactersfalse
ViewsViewsViews is the interface that wraps the Render function. See our Template Middleware for supported engines.nil
ViewsLayoutstringViews Layout is the global layout for all template render until override on Render function. See our Template Middleware for supported engines.""
WriteBufferSizeintPer-connection buffer size for responses' writing.4096
WriteTimeouttime.DurationThe maximum duration before timing out writes of the response. The default timeout is unlimited.nil
XMLEncoderutils.XMLMarshalAllowing for flexibility in using another XML library for encoding.xml.Marshal

NewError

NewError creates a new HTTPError instance with an optional message.

Signature
func NewError(code int, message ...string) *Error
Example
app.Get("/", func(c *fiber.Ctx) error {
return fiber.NewError(782, "Custom error message")
})

IsChild

IsChild determines if the current process is a result of Prefork.

Signature
func IsChild() bool
Example
// Prefork will spawn child processes
app := fiber.New(fiber.Config{
Prefork: true,
})

if !fiber.IsChild() {
fmt.Println("I'm the parent process")
} else {
fmt.Println("I'm a child process")
}

// ...
+ + \ No newline at end of file diff --git a/next/api/log/index.html b/next/api/log/index.html index 8bedf641f86..257083e21f0 100644 --- a/next/api/log/index.html +++ b/next/api/log/index.html @@ -6,8 +6,8 @@ Log | Fiber - - + +
@@ -16,8 +16,8 @@ It also provides several global functions, such as log.Info, log.Errorf, log.Warnw, etc.

Log levels

const (
LevelTrace Level = iota
LevelDebug
LevelInfo
LevelWarn
LevelError
LevelFatal
LevelPanic
)

Custom log

Fiber provides the AllLogger interface for adapting the various log libraries.

type CommonLogger interface {
Logger
FormatLogger
WithLogger
}

type AllLogger interface {
CommonLogger
ControlLogger
WithLogger
}

Note: The method of calling the Fatal level will interrupt the program running after printing the log, please use it with caution. Directly print logs of different levels, which will be entered into messageKey, the default is msg.

log.Info("Hello, World!")
log.Debug("Are you OK?")
log.Info("42 is the answer to life, the universe, and everything")
log.Warn("We are under attack!")
log.Error("Houston, we have a problem.")
log.Fatal("So Long, and Thanks for All the Fislog.")
log.Panic("The system is down.")

Format and print logs of different levels, all methods end with f

log.Debugf("Hello %s", "boy")
log.Infof("%d is the answer to life, the universe, and everything", 233)
log.Warnf("We are under attack %s!", "boss")
log.Errorf("%s, we have a problem.", "Master Shifu")
log.Fatalf("So Long, and Thanks for All the %s.", "banana")

Print a message with the key and value, or KEYVALS UNPAIRED if the key and value are not a pair.

log.Debugw("", "Hello", "boy")
log.Infow("", "number", 233)
log.Warnw("", "job", "boss")
log.Errorw("", "name", "Master Shifu")
log.Fatalw("", "fruit", "banana")

Global log

If you are in a project and just want to use a simple log function that can be printed at any time in the global, we provide a global log.

import "github.com/gofiber/fiber/v2/log"

log.Info("info")
log.Warn("warn")

The above is using the default log.DefaultLogger standard output. You can also find an already implemented adaptation under contrib, or use your own implemented Logger and use log.SetLogger to set the global log logger.

import (
"log"
fiberlog "github.com/gofiber/fiber/v2/log"
)

var _ log.AllLogger = (*customLogger)(nil)

type customLogger struct {
stdlog *log.Logger
}

// ...
// inject your custom logger
fiberlog.SetLogger(customLogger)

Set Level

log.SetLevel sets the level of logs below which logs will not be output. -The default logger is LevelTrace.

Note that this method is not concurrent-safe.

import "github.com/gofiber/fiber/v2/log"

log.SetLevel(log.LevelInfo)

Set output

log.SetOutput sets the output destination of the logger. The default logger types the log in the console.

var logger AllLogger = &defaultLogger{
stdlog: log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile|log.Lmicroseconds),
depth: 4,
}

Set the output destination to the file.

// Output to ./test.log file
f, err := os.OpenFile("test.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
if err != nil {
return
}
log.SetOutput(f)

Set the output destination to the console and file.

// Output to ./test.log file
file, _ := os.OpenFile("test.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
iw := io.MultiWriter(os.Stdout, file)
log.SetOutput(iw)

Bind context

Set the context, using the following method will return a CommonLogger instance bound to the specified context

commonLogger := log.WithContext(ctx)
commonLogger.Info("info")
- - +The default logger is LevelTrace.

Note that this method is not concurrent-safe.

import "github.com/gofiber/fiber/v2/log"

log.SetLevel(log.LevelInfo)

Set output

log.SetOutput sets the output destination of the logger. The default logger types the log in the console.

var logger AllLogger = &defaultLogger{
stdlog: log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile|log.Lmicroseconds),
depth: 4,
}

Set the output destination to the file.

// Output to ./test.log file
f, err := os.OpenFile("test.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
if err != nil {
return
}
log.SetOutput(f)

Set the output destination to the console and file.

// Output to ./test.log file
file, _ := os.OpenFile("test.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
iw := io.MultiWriter(os.Stdout, file)
log.SetOutput(iw)

Bind context

Set the context, using the following method will return a CommonLogger instance bound to the specified context

commonLogger := log.WithContext(ctx)
commonLogger.Info("info")
+ + \ No newline at end of file diff --git a/next/api/middleware/adaptor/index.html b/next/api/middleware/adaptor/index.html index c59362cc4b6..fe1b3a5fdac 100644 --- a/next/api/middleware/adaptor/index.html +++ b/next/api/middleware/adaptor/index.html @@ -6,13 +6,13 @@ Adaptor | Fiber - - + +
-
Version: Next

Adaptor

Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!

Signatures

NameSignatureDescription
HTTPHandlerHTTPHandler(h http.Handler) fiber.Handlerhttp.Handler -> fiber.Handler
HTTPHandlerFuncHTTPHandlerFunc(h http.HandlerFunc) fiber.Handlerhttp.HandlerFunc -> fiber.Handler
HTTPMiddlewareHTTPHandlerFunc(mw func(http.Handler) http.Handler) fiber.Handlerfunc(http.Handler) http.Handler -> fiber.Handler
FiberHandlerFiberHandler(h fiber.Handler) http.Handlerfiber.Handler -> http.Handler
FiberHandlerFuncFiberHandlerFunc(h fiber.Handler) http.HandlerFuncfiber.Handler -> http.HandlerFunc
FiberAppFiberApp(app *fiber.App) http.HandlerFuncFiber app -> http.HandlerFunc
ConvertRequestConvertRequest(c *fiber.Ctx, forServer bool) (*http.Request, error)fiber.Ctx -> http.Request
CopyContextToFiberContextCopyContextToFiberContext(context interface{}, requestContext *fasthttp.RequestCtx)context.Context -> fasthttp.RequestCtx

Examples

net/http to Fiber

package main

import (
"fmt"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// New fiber app
app := fiber.New()

// http.Handler -> fiber.Handler
app.Get("/", adaptor.HTTPHandler(handler(greet)))

// http.HandlerFunc -> fiber.Handler
app.Get("/func", adaptor.HTTPHandlerFunc(greet))

// Listen on port 3000
app.Listen(":3000")
}

func handler(f http.HandlerFunc) http.Handler {
return http.HandlerFunc(f)
}

func greet(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello World!")
}

net/http middleware to Fiber

package main

import (
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// New fiber app
app := fiber.New()

// http middleware -> fiber.Handler
app.Use(adaptor.HTTPMiddleware(logMiddleware))

// Listen on port 3000
app.Listen(":3000")
}

func logMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
log.Println("log middleware")
next.ServeHTTP(w, r)
})
}

Fiber Handler to net/http

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// fiber.Handler -> http.Handler
http.Handle("/", adaptor.FiberHandler(greet))

// fiber.Handler -> http.HandlerFunc
http.HandleFunc("/func", adaptor.FiberHandlerFunc(greet))

// Listen on port 3000
http.ListenAndServe(":3000", nil)
}

func greet(c *fiber.Ctx) error {
return c.SendString("Hello World!")
}

Fiber App to net/http

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
app := fiber.New()

app.Get("/greet", greet)

// Listen on port 3000
http.ListenAndServe(":3000", adaptor.FiberApp(app))
}

func greet(c *fiber.Ctx) error {
return c.SendString("Hello World!")
}

Fiber Context to (net/http).Request

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
app := fiber.New()

app.Get("/greet", greetWithHTTPReq)

// Listen on port 3000
http.ListenAndServe(":3000", adaptor.FiberApp(app))
}

func greetWithHTTPReq(c *fiber.Ctx) error {
httpReq, err := adaptor.ConvertRequest(c, false)
if err != nil {
return err
}

return c.SendString("Request URL: " + httpReq.URL.String())
}
- - +
Version: Next

Adaptor

Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!

Signatures

NameSignatureDescription
HTTPHandlerHTTPHandler(h http.Handler) fiber.Handlerhttp.Handler -> fiber.Handler
HTTPHandlerFuncHTTPHandlerFunc(h http.HandlerFunc) fiber.Handlerhttp.HandlerFunc -> fiber.Handler
HTTPMiddlewareHTTPHandlerFunc(mw func(http.Handler) http.Handler) fiber.Handlerfunc(http.Handler) http.Handler -> fiber.Handler
FiberHandlerFiberHandler(h fiber.Handler) http.Handlerfiber.Handler -> http.Handler
FiberHandlerFuncFiberHandlerFunc(h fiber.Handler) http.HandlerFuncfiber.Handler -> http.HandlerFunc
FiberAppFiberApp(app *fiber.App) http.HandlerFuncFiber app -> http.HandlerFunc
ConvertRequestConvertRequest(c *fiber.Ctx, forServer bool) (*http.Request, error)fiber.Ctx -> http.Request
CopyContextToFiberContextCopyContextToFiberContext(context interface{}, requestContext *fasthttp.RequestCtx)context.Context -> fasthttp.RequestCtx

Examples

net/http to Fiber

package main

import (
"fmt"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// New fiber app
app := fiber.New()

// http.Handler -> fiber.Handler
app.Get("/", adaptor.HTTPHandler(handler(greet)))

// http.HandlerFunc -> fiber.Handler
app.Get("/func", adaptor.HTTPHandlerFunc(greet))

// Listen on port 3000
app.Listen(":3000")
}

func handler(f http.HandlerFunc) http.Handler {
return http.HandlerFunc(f)
}

func greet(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello World!")
}

net/http middleware to Fiber

package main

import (
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// New fiber app
app := fiber.New()

// http middleware -> fiber.Handler
app.Use(adaptor.HTTPMiddleware(logMiddleware))

// Listen on port 3000
app.Listen(":3000")
}

func logMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
log.Println("log middleware")
next.ServeHTTP(w, r)
})
}

Fiber Handler to net/http

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
// fiber.Handler -> http.Handler
http.Handle("/", adaptor.FiberHandler(greet))

// fiber.Handler -> http.HandlerFunc
http.HandleFunc("/func", adaptor.FiberHandlerFunc(greet))

// Listen on port 3000
http.ListenAndServe(":3000", nil)
}

func greet(c *fiber.Ctx) error {
return c.SendString("Hello World!")
}

Fiber App to net/http

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
app := fiber.New()

app.Get("/greet", greet)

// Listen on port 3000
http.ListenAndServe(":3000", adaptor.FiberApp(app))
}

func greet(c *fiber.Ctx) error {
return c.SendString("Hello World!")
}

Fiber Context to (net/http).Request

package main

import (
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
)

func main() {
app := fiber.New()

app.Get("/greet", greetWithHTTPReq)

// Listen on port 3000
http.ListenAndServe(":3000", adaptor.FiberApp(app))
}

func greetWithHTTPReq(c *fiber.Ctx) error {
httpReq, err := adaptor.ConvertRequest(c, false)
if err != nil {
return err
}

return c.SendString("Request URL: " + httpReq.URL.String())
}
+ + \ No newline at end of file diff --git a/next/api/middleware/basicauth/index.html b/next/api/middleware/basicauth/index.html index 404970aeba2..bf59ebbd7d4 100644 --- a/next/api/middleware/basicauth/index.html +++ b/next/api/middleware/basicauth/index.html @@ -6,13 +6,13 @@ BasicAuth | Fiber - - + +
-
Version: Next

BasicAuth

Basic Authentication middleware for Fiber that provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized or a custom response for missing or invalid credentials.

Signatures

func New(config Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/basicauth"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
app.Use(basicauth.New(basicauth.Config{
Users: map[string]string{
"john": "doe",
"admin": "123456",
},
}))

// Or extend your config for customization
app.Use(basicauth.New(basicauth.Config{
Users: map[string]string{
"john": "doe",
"admin": "123456",
},
Realm: "Forbidden",
Authorizer: func(user, pass string) bool {
if user == "john" && pass == "doe" {
return true
}
if user == "admin" && pass == "123456" {
return true
}
return false
},
Unauthorized: func(c *fiber.Ctx) error {
return c.SendFile("./unauthorized.html")
},
ContextUsername: "_user",
ContextPassword: "_pass",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Users defines the allowed credentials
//
// Required. Default: map[string]string{}
Users map[string]string

// Realm is a string to define realm attribute of BasicAuth.
// the realm identifies the system to authenticate against
// and can be used by clients to save credentials
//
// Optional. Default: "Restricted".
Realm string

// Authorizer defines a function you can pass
// to check the credentials however you want.
// It will be called with a username and password
// and is expected to return true or false to indicate
// that the credentials were approved or not.
//
// Optional. Default: nil.
Authorizer func(string, string) bool

// Unauthorized defines the response body for unauthorized responses.
// By default it will return with a 401 Unauthorized and the correct WWW-Auth header
//
// Optional. Default: nil
Unauthorized fiber.Handler

// ContextUser is the key to store the username in Locals
//
// Optional. Default: "username"
ContextUsername string

// ContextPass is the key to store the password in Locals
//
// Optional. Default: "password"
ContextPassword string
}

Default Config

var ConfigDefault = Config{
Next: nil,
Users: map[string]string{},
Realm: "Restricted",
Authorizer: nil,
Unauthorized: nil,
ContextUsername: "username",
ContextPassword: "password",
}
- - +
Version: Next

BasicAuth

Basic Authentication middleware for Fiber that provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized or a custom response for missing or invalid credentials.

Signatures

func New(config Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/basicauth"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
app.Use(basicauth.New(basicauth.Config{
Users: map[string]string{
"john": "doe",
"admin": "123456",
},
}))

// Or extend your config for customization
app.Use(basicauth.New(basicauth.Config{
Users: map[string]string{
"john": "doe",
"admin": "123456",
},
Realm: "Forbidden",
Authorizer: func(user, pass string) bool {
if user == "john" && pass == "doe" {
return true
}
if user == "admin" && pass == "123456" {
return true
}
return false
},
Unauthorized: func(c *fiber.Ctx) error {
return c.SendFile("./unauthorized.html")
},
ContextUsername: "_user",
ContextPassword: "_pass",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Users defines the allowed credentials
//
// Required. Default: map[string]string{}
Users map[string]string

// Realm is a string to define realm attribute of BasicAuth.
// the realm identifies the system to authenticate against
// and can be used by clients to save credentials
//
// Optional. Default: "Restricted".
Realm string

// Authorizer defines a function you can pass
// to check the credentials however you want.
// It will be called with a username and password
// and is expected to return true or false to indicate
// that the credentials were approved or not.
//
// Optional. Default: nil.
Authorizer func(string, string) bool

// Unauthorized defines the response body for unauthorized responses.
// By default it will return with a 401 Unauthorized and the correct WWW-Auth header
//
// Optional. Default: nil
Unauthorized fiber.Handler

// ContextUser is the key to store the username in Locals
//
// Optional. Default: "username"
ContextUsername string

// ContextPass is the key to store the password in Locals
//
// Optional. Default: "password"
ContextPassword string
}

Default Config

var ConfigDefault = Config{
Next: nil,
Users: map[string]string{},
Realm: "Restricted",
Authorizer: nil,
Unauthorized: nil,
ContextUsername: "username",
ContextPassword: "password",
}
+ + \ No newline at end of file diff --git a/next/api/middleware/cache/index.html b/next/api/middleware/cache/index.html index c98595a1e6f..23a13c0fbed 100644 --- a/next/api/middleware/cache/index.html +++ b/next/api/middleware/cache/index.html @@ -6,15 +6,15 @@ Cache | Fiber - - + +
Version: Next

Cache

Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core!

Request Directives
Cache-Control: no-cache will return the up-to-date response but still caches it. You will always get a miss cache status.
-Cache-Control: no-store will refrain from caching. You will always get the up-to-date response.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cache"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(cache.New())

// Or extend your config for customization
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return c.Query("refresh") == "true"
},
Expiration: 30 * time.Minute,
CacheControl: true,
}))

Or you can custom key and expire time like this:

app.Use(cache.New(cache.Config{
ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration {
newCacheTime, _ := strconv.Atoi(c.GetRespHeader("Cache-Time", "600"))
return time.Second * time.Duration(newCacheTime)
},
KeyGenerator: func(c *fiber.Ctx) string {
return utils.CopyString(c.Path())
},
}))

app.Get("/", func(c *fiber.Ctx) error {
c.Response().Header.Add("Cache-Time", "6000")
return c.SendString("hi")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Expiration is the time that an cached response will live
//
// Optional. Default: 1 * time.Minute
Expiration time.Duration

// CacheHeader header on response header, indicate cache status, with the following possible return value
//
// hit, miss, unreachable
//
// Optional. Default: X-Cache
CacheHeader string

// CacheControl enables client side caching if set to true
//
// Optional. Default: false
CacheControl bool

// Key allows you to generate custom keys, by default c.Path() is used
//
// Default: func(c *fiber.Ctx) string {
// return utils.CopyString(c.Path())
// }
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

// Store is used to store the state of the middleware
//
// Default: an in memory store for this process only
Storage fiber.Storage

// allows you to store additional headers generated by next middlewares & handler
//
// Default: false
StoreResponseHeaders bool

// Max number of bytes of response bodies simultaneously stored in cache. When limit is reached,
// entries with the nearest expiration are deleted to make room for new.
// 0 means no limit
//
// Default: 0
MaxBytes uint

// You can specify HTTP methods to cache.
// The middleware just caches the routes of its methods in this slice.
//
// Default: []string{fiber.MethodGet, fiber.MethodHead}
Methods []string
}

Default Config

var ConfigDefault = Config{
Next: nil,
Expiration: 1 * time.Minute,
CacheHeader: "X-Cache",
CacheControl: false,
KeyGenerator: func(c *fiber.Ctx) string {
return utils.CopyString(c.Path())
},
ExpirationGenerator: nil,
StoreResponseHeaders: false,
Storage: nil,
MaxBytes: 0,
Methods: []string{fiber.MethodGet, fiber.MethodHead},
}
- - +Cache-Control: no-store will refrain from caching. You will always get the up-to-date response.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cache"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(cache.New())

// Or extend your config for customization
app.Use(cache.New(cache.Config{
Next: func(c *fiber.Ctx) bool {
return c.Query("refresh") == "true"
},
Expiration: 30 * time.Minute,
CacheControl: true,
}))

Or you can custom key and expire time like this:

app.Use(cache.New(cache.Config{
ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration {
newCacheTime, _ := strconv.Atoi(c.GetRespHeader("Cache-Time", "600"))
return time.Second * time.Duration(newCacheTime)
},
KeyGenerator: func(c *fiber.Ctx) string {
return utils.CopyString(c.Path())
},
}))

app.Get("/", func(c *fiber.Ctx) error {
c.Response().Header.Add("Cache-Time", "6000")
return c.SendString("hi")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Expiration is the time that an cached response will live
//
// Optional. Default: 1 * time.Minute
Expiration time.Duration

// CacheHeader header on response header, indicate cache status, with the following possible return value
//
// hit, miss, unreachable
//
// Optional. Default: X-Cache
CacheHeader string

// CacheControl enables client side caching if set to true
//
// Optional. Default: false
CacheControl bool

// Key allows you to generate custom keys, by default c.Path() is used
//
// Default: func(c *fiber.Ctx) string {
// return utils.CopyString(c.Path())
// }
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

// Store is used to store the state of the middleware
//
// Default: an in memory store for this process only
Storage fiber.Storage

// allows you to store additional headers generated by next middlewares & handler
//
// Default: false
StoreResponseHeaders bool

// Max number of bytes of response bodies simultaneously stored in cache. When limit is reached,
// entries with the nearest expiration are deleted to make room for new.
// 0 means no limit
//
// Default: 0
MaxBytes uint

// You can specify HTTP methods to cache.
// The middleware just caches the routes of its methods in this slice.
//
// Default: []string{fiber.MethodGet, fiber.MethodHead}
Methods []string
}

Default Config

var ConfigDefault = Config{
Next: nil,
Expiration: 1 * time.Minute,
CacheHeader: "X-Cache",
CacheControl: false,
KeyGenerator: func(c *fiber.Ctx) string {
return utils.CopyString(c.Path())
},
ExpirationGenerator: nil,
StoreResponseHeaders: false,
Storage: nil,
MaxBytes: 0,
Methods: []string{fiber.MethodGet, fiber.MethodHead},
}
+ + \ No newline at end of file diff --git a/next/api/middleware/compress/index.html b/next/api/middleware/compress/index.html index ae210bb2462..7209ad5c007 100644 --- a/next/api/middleware/compress/index.html +++ b/next/api/middleware/compress/index.html @@ -6,13 +6,13 @@ Compress | Fiber - - + +
-
Version: Next

Compress

Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/compress"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(compress.New())

// Or extend your config for customization
app.Use(compress.New(compress.Config{
Level: compress.LevelBestSpeed, // 1
}))

// Skip middleware for specific routes
app.Use(compress.New(compress.Config{
Next: func(c *fiber.Ctx) bool {
return c.Path() == "/dont_compress"
},
Level: compress.LevelBestSpeed, // 1
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Level determines the compression algoritm
//
// Optional. Default: LevelDefault
// LevelDisabled: -1
// LevelDefault: 0
// LevelBestSpeed: 1
// LevelBestCompression: 2
Level int
}

Default Config

var ConfigDefault = Config{
Next: nil,
Level: LevelDefault,
}

Constants

// Compression levels
const (
LevelDisabled = -1
LevelDefault = 0
LevelBestSpeed = 1
LevelBestCompression = 2
)
- - +
Version: Next

Compress

Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/compress"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(compress.New())

// Or extend your config for customization
app.Use(compress.New(compress.Config{
Level: compress.LevelBestSpeed, // 1
}))

// Skip middleware for specific routes
app.Use(compress.New(compress.Config{
Next: func(c *fiber.Ctx) bool {
return c.Path() == "/dont_compress"
},
Level: compress.LevelBestSpeed, // 1
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Level determines the compression algoritm
//
// Optional. Default: LevelDefault
// LevelDisabled: -1
// LevelDefault: 0
// LevelBestSpeed: 1
// LevelBestCompression: 2
Level int
}

Default Config

var ConfigDefault = Config{
Next: nil,
Level: LevelDefault,
}

Constants

// Compression levels
const (
LevelDisabled = -1
LevelDefault = 0
LevelBestSpeed = 1
LevelBestCompression = 2
)
+ + \ No newline at end of file diff --git a/next/api/middleware/cors/index.html b/next/api/middleware/cors/index.html index cc206481138..3496673b8b6 100644 --- a/next/api/middleware/cors/index.html +++ b/next/api/middleware/cors/index.html @@ -6,13 +6,13 @@ CORS | Fiber - - + +
-
Version: Next

CORS

CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(cors.New())

// Or extend your config for customization
app.Use(cors.New(cors.Config{
AllowOrigins: "https://gofiber.io, https://gofiber.net",
AllowHeaders: "Origin, Content-Type, Accept",
}))

Using the AllowOriginsFunc function. In this example any origin will be allowed via CORS.

For example, if a browser running on http://localhost:3000 sends a request, this will be accepted and the access-control-allow-origin response header will be set to http://localhost:3000.

Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via AllowOrigins.

app.Use(cors.New())

app.Use(cors.New(cors.Config{
AllowOriginsFunc: func(origin string) bool {
return os.Getenv("ENVIRONMENT") == "development"
},
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// AllowOriginsFunc defines a function that will set the 'access-control-allow-origin'
// response header to the 'origin' request header when returned true.
//
// Note: Using this feature is discouraged in production and it's best practice to explicitly
// set CORS origins via 'AllowOrigins'
//
// Optional. Default: nil
AllowOriginsFunc func(origin string) bool

// AllowOrigin defines a list of origins that may access the resource.
//
// Optional. Default value "*"
AllowOrigins string

// AllowMethods defines a list methods allowed when accessing the resource.
// This is used in response to a preflight request.
//
// Optional. Default value "GET,POST,HEAD,PUT,DELETE,PATCH"
AllowMethods string

// AllowHeaders defines a list of request headers that can be used when
// making the actual request. This is in response to a preflight request.
//
// Optional. Default value "".
AllowHeaders string

// AllowCredentials indicates whether or not the response to the request
// can be exposed when the credentials flag is true. When used as part of
// a response to a preflight request, this indicates whether or not the
// actual request can be made using credentials.
//
// Optional. Default value false.
AllowCredentials bool

// ExposeHeaders defines a whitelist headers that clients are allowed to
// access.
//
// Optional. Default value "".
ExposeHeaders string

// MaxAge indicates how long (in seconds) the results of a preflight request
// can be cached.
//
// Optional. Default value 0.
MaxAge int
}

Default Config

var ConfigDefault = Config{
Next: nil,
AllowOriginsFunc: nil,
AllowOrigins: "*",
AllowMethods: strings.Join([]string{
fiber.MethodGet,
fiber.MethodPost,
fiber.MethodHead,
fiber.MethodPut,
fiber.MethodDelete,
fiber.MethodPatch,
}, ","),
AllowHeaders: "",
AllowCredentials: false,
ExposeHeaders: "",
MaxAge: 0,
}
- - +
Version: Next

CORS

CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(cors.New())

// Or extend your config for customization
app.Use(cors.New(cors.Config{
AllowOrigins: "https://gofiber.io, https://gofiber.net",
AllowHeaders: "Origin, Content-Type, Accept",
}))

Using the AllowOriginsFunc function. In this example any origin will be allowed via CORS.

For example, if a browser running on http://localhost:3000 sends a request, this will be accepted and the access-control-allow-origin response header will be set to http://localhost:3000.

Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via AllowOrigins.

app.Use(cors.New())

app.Use(cors.New(cors.Config{
AllowOriginsFunc: func(origin string) bool {
return os.Getenv("ENVIRONMENT") == "development"
},
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// AllowOriginsFunc defines a function that will set the 'access-control-allow-origin'
// response header to the 'origin' request header when returned true.
//
// Note: Using this feature is discouraged in production and it's best practice to explicitly
// set CORS origins via 'AllowOrigins'
//
// Optional. Default: nil
AllowOriginsFunc func(origin string) bool

// AllowOrigin defines a list of origins that may access the resource.
//
// Optional. Default value "*"
AllowOrigins string

// AllowMethods defines a list methods allowed when accessing the resource.
// This is used in response to a preflight request.
//
// Optional. Default value "GET,POST,HEAD,PUT,DELETE,PATCH"
AllowMethods string

// AllowHeaders defines a list of request headers that can be used when
// making the actual request. This is in response to a preflight request.
//
// Optional. Default value "".
AllowHeaders string

// AllowCredentials indicates whether or not the response to the request
// can be exposed when the credentials flag is true. When used as part of
// a response to a preflight request, this indicates whether or not the
// actual request can be made using credentials.
//
// Optional. Default value false.
AllowCredentials bool

// ExposeHeaders defines a whitelist headers that clients are allowed to
// access.
//
// Optional. Default value "".
ExposeHeaders string

// MaxAge indicates how long (in seconds) the results of a preflight request
// can be cached.
//
// Optional. Default value 0.
MaxAge int
}

Default Config

var ConfigDefault = Config{
Next: nil,
AllowOriginsFunc: nil,
AllowOrigins: "*",
AllowMethods: strings.Join([]string{
fiber.MethodGet,
fiber.MethodPost,
fiber.MethodHead,
fiber.MethodPut,
fiber.MethodDelete,
fiber.MethodPatch,
}, ","),
AllowHeaders: "",
AllowCredentials: false,
ExposeHeaders: "",
MaxAge: 0,
}
+ + \ No newline at end of file diff --git a/next/api/middleware/csrf/index.html b/next/api/middleware/csrf/index.html index d56bba2704f..b4e2704710b 100644 --- a/next/api/middleware/csrf/index.html +++ b/next/api/middleware/csrf/index.html @@ -6,13 +6,13 @@ CSRF | Fiber - - + +
-
Version: Next

CSRF

CSRF middleware for Fiber that provides Cross-site request forgery protection by passing a csrf token via cookies. This cookie value will be used to compare against the client csrf token on requests, other than those defined as "safe" by RFC7231 (GET, HEAD, OPTIONS, or TRACE). When the csrf token is invalid, this middleware will return the fiber.ErrForbidden error.

CSRF Tokens are generated on GET requests. You can retrieve the CSRF token with c.Locals(contextKey), where contextKey is the string you set in the config (see Custom Config below).

When no csrf_ cookie is set, or the token has expired, a new token will be generated and csrf_ cookie set.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/csrf"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(csrf.New())

// Or extend your config for customization
app.Use(csrf.New(csrf.Config{
KeyLookup: "header:X-Csrf-Token",
CookieName: "csrf_",
CookieSameSite: "Lax",
Expiration: 1 * time.Hour,
KeyGenerator: utils.UUID,
Extractor: func(c *fiber.Ctx) (string, error) { ... },
}))
note

KeyLookup will be ignored if Extractor is explicitly set.

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// KeyLookup is a string in the form of "<source>:<key>" that is used
// to create an Extractor that extracts the token from the request.
// Possible values:
// - "header:<name>"
// - "query:<name>"
// - "param:<name>"
// - "form:<name>"
// - "cookie:<name>"
//
// Ignored if an Extractor is explicitly set.
//
// Optional. Default: "header:X-CSRF-Token"
KeyLookup string

// Name of the session cookie. This cookie will store session key.
// Optional. Default value "csrf_".
CookieName string

// Domain of the CSRF cookie.
// Optional. Default value "".
CookieDomain string

// Path of the CSRF cookie.
// Optional. Default value "".
CookiePath string

// Indicates if CSRF cookie is secure.
// Optional. Default value false.
CookieSecure bool

// Indicates if CSRF cookie is HTTP only.
// Optional. Default value false.
CookieHTTPOnly bool

// Indicates if CSRF cookie is requested by SameSite.
// Optional. Default value "Lax".
CookieSameSite string

// Decides whether cookie should last for only the browser sesison.
// Ignores Expiration if set to true
CookieSessionOnly bool

// Expiration is the duration before csrf token will expire
//
// Optional. Default: 1 * time.Hour
Expiration time.Duration

// Store is used to store the state of the middleware
//
// Optional. Default: memory.New()
Storage fiber.Storage

// Context key to store generated CSRF token into context.
// If left empty, token will not be stored in context.
//
// Optional. Default: ""
ContextKey string

// KeyGenerator creates a new CSRF token
//
// Optional. Default: utils.UUID
KeyGenerator func() string

// Extractor returns the csrf token
//
// If set this will be used in place of an Extractor based on KeyLookup.
//
// Optional. Default will create an Extractor based on KeyLookup.
Extractor func(c *fiber.Ctx) (string, error)
}

Default Config

var ConfigDefault = Config{
KeyLookup: "header:" + HeaderName,
CookieName: "csrf_",
CookieSameSite: "Lax",
Expiration: 1 * time.Hour,
KeyGenerator: utils.UUID,
ErrorHandler: defaultErrorHandler,
Extractor: CsrfFromHeader(HeaderName),
}

Constants

const (
HeaderName = "X-Csrf-Token"
)

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
app.Use(csrf.New(csrf.Config{
Storage: storage,
}))
- - +
Version: Next

CSRF

CSRF middleware for Fiber that provides Cross-site request forgery protection by passing a csrf token via cookies. This cookie value will be used to compare against the client csrf token on requests, other than those defined as "safe" by RFC7231 (GET, HEAD, OPTIONS, or TRACE). When the csrf token is invalid, this middleware will return the fiber.ErrForbidden error.

CSRF Tokens are generated on GET requests. You can retrieve the CSRF token with c.Locals(contextKey), where contextKey is the string you set in the config (see Custom Config below).

When no csrf_ cookie is set, or the token has expired, a new token will be generated and csrf_ cookie set.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/csrf"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(csrf.New())

// Or extend your config for customization
app.Use(csrf.New(csrf.Config{
KeyLookup: "header:X-Csrf-Token",
CookieName: "csrf_",
CookieSameSite: "Lax",
Expiration: 1 * time.Hour,
KeyGenerator: utils.UUID,
Extractor: func(c *fiber.Ctx) (string, error) { ... },
}))
note

KeyLookup will be ignored if Extractor is explicitly set.

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// KeyLookup is a string in the form of "<source>:<key>" that is used
// to create an Extractor that extracts the token from the request.
// Possible values:
// - "header:<name>"
// - "query:<name>"
// - "param:<name>"
// - "form:<name>"
// - "cookie:<name>"
//
// Ignored if an Extractor is explicitly set.
//
// Optional. Default: "header:X-CSRF-Token"
KeyLookup string

// Name of the session cookie. This cookie will store session key.
// Optional. Default value "csrf_".
CookieName string

// Domain of the CSRF cookie.
// Optional. Default value "".
CookieDomain string

// Path of the CSRF cookie.
// Optional. Default value "".
CookiePath string

// Indicates if CSRF cookie is secure.
// Optional. Default value false.
CookieSecure bool

// Indicates if CSRF cookie is HTTP only.
// Optional. Default value false.
CookieHTTPOnly bool

// Indicates if CSRF cookie is requested by SameSite.
// Optional. Default value "Lax".
CookieSameSite string

// Decides whether cookie should last for only the browser sesison.
// Ignores Expiration if set to true
CookieSessionOnly bool

// Expiration is the duration before csrf token will expire
//
// Optional. Default: 1 * time.Hour
Expiration time.Duration

// Store is used to store the state of the middleware
//
// Optional. Default: memory.New()
Storage fiber.Storage

// Context key to store generated CSRF token into context.
// If left empty, token will not be stored in context.
//
// Optional. Default: ""
ContextKey string

// KeyGenerator creates a new CSRF token
//
// Optional. Default: utils.UUID
KeyGenerator func() string

// Extractor returns the csrf token
//
// If set this will be used in place of an Extractor based on KeyLookup.
//
// Optional. Default will create an Extractor based on KeyLookup.
Extractor func(c *fiber.Ctx) (string, error)
}

Default Config

var ConfigDefault = Config{
KeyLookup: "header:" + HeaderName,
CookieName: "csrf_",
CookieSameSite: "Lax",
Expiration: 1 * time.Hour,
KeyGenerator: utils.UUID,
ErrorHandler: defaultErrorHandler,
Extractor: CsrfFromHeader(HeaderName),
}

Constants

const (
HeaderName = "X-Csrf-Token"
)

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
app.Use(csrf.New(csrf.Config{
Storage: storage,
}))
+ + \ No newline at end of file diff --git a/next/api/middleware/earlydata/index.html b/next/api/middleware/earlydata/index.html index 2949315a6e0..c6a43a46f2b 100644 --- a/next/api/middleware/earlydata/index.html +++ b/next/api/middleware/earlydata/index.html @@ -6,15 +6,15 @@ EarlyData | Fiber - - + +
Version: Next

EarlyData

The Early Data middleware for Fiber adds support for TLS 1.3's early data ("0-RTT") feature. Citing RFC 8446, when a client and server share a PSK, TLS 1.3 allows clients to send data on the first flight ("early data") to speed up the request, effectively reducing the regular 1-RTT request to a 0-RTT request.

Make sure to enable fiber's EnableTrustedProxyCheck config option before using this middleware in order to not trust bogus HTTP request headers of the client.

Also be aware that enabling support for early data in your reverse proxy (e.g. nginx, as done with a simple ssl_early_data on;) makes requests replayable. Refer to the following documents before continuing:

By default, this middleware allows early data requests on safe HTTP request methods only and rejects the request otherwise, i.e. aborts the request before executing your handler. This behavior can be controlled by the AllowEarlyData config option. -Safe HTTP methods — GET, HEAD, OPTIONS and TRACE — should not modify a state on the server.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/earlydata"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(earlydata.New())

// Or extend your config for customization
app.Use(earlydata.New(earlydata.Config{
Error: fiber.ErrTooEarly,
// ...
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// IsEarlyData returns whether the request is an early-data request.
//
// Optional. Default: a function which checks if the "Early-Data" request header equals "1".
IsEarlyData func(c *fiber.Ctx) bool

// AllowEarlyData returns whether the early-data request should be allowed or rejected.
//
// Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods.
AllowEarlyData func(c *fiber.Ctx) bool

// Error is returned in case an early-data request is rejected.
//
// Optional. Default: fiber.ErrTooEarly.
Error error
}

Default Config

var ConfigDefault = Config{
IsEarlyData: func(c *fiber.Ctx) bool {
return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue
},

AllowEarlyData: func(c *fiber.Ctx) bool {
return fiber.IsMethodSafe(c.Method())
},

Error: fiber.ErrTooEarly,
}

Constants

const (
DefaultHeaderName = "Early-Data"
DefaultHeaderTrueValue = "1"
)
- - +Safe HTTP methods — GET, HEAD, OPTIONS and TRACE — should not modify a state on the server.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/earlydata"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(earlydata.New())

// Or extend your config for customization
app.Use(earlydata.New(earlydata.Config{
Error: fiber.ErrTooEarly,
// ...
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// IsEarlyData returns whether the request is an early-data request.
//
// Optional. Default: a function which checks if the "Early-Data" request header equals "1".
IsEarlyData func(c *fiber.Ctx) bool

// AllowEarlyData returns whether the early-data request should be allowed or rejected.
//
// Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods.
AllowEarlyData func(c *fiber.Ctx) bool

// Error is returned in case an early-data request is rejected.
//
// Optional. Default: fiber.ErrTooEarly.
Error error
}

Default Config

var ConfigDefault = Config{
IsEarlyData: func(c *fiber.Ctx) bool {
return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue
},

AllowEarlyData: func(c *fiber.Ctx) bool {
return fiber.IsMethodSafe(c.Method())
},

Error: fiber.ErrTooEarly,
}

Constants

const (
DefaultHeaderName = "Early-Data"
DefaultHeaderTrueValue = "1"
)
+ + \ No newline at end of file diff --git a/next/api/middleware/encryptcookie/index.html b/next/api/middleware/encryptcookie/index.html index 44550d83769..6e9442820a4 100644 --- a/next/api/middleware/encryptcookie/index.html +++ b/next/api/middleware/encryptcookie/index.html @@ -6,13 +6,13 @@ Encrypt Cookie | Fiber - - + +
-
Version: Next

Encrypt Cookie

Encrypt middleware for Fiber which encrypts cookie values. Note: this middleware does not encrypt cookie names.

Signatures

// Intitializes the middleware
func New(config ...Config) fiber.Handler

// Returns a random 32 character long string
func GenerateKey() string

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/encryptcookie"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
// `Key` must be a 32 character string. It's used to encrypt the values, so make sure it is random and keep it secret.
// You can run `openssl rand -base64 32` or call `encryptcookie.GenerateKey()` to create a random key for you.
// Make sure not to set `Key` to `encryptcookie.GenerateKey()` because that will create a new key every run.
app.Use(encryptcookie.New(encryptcookie.Config{
Key: "secret-thirty-2-character-string",
}))

// Get / reading out the encrypted cookie
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("value=" + c.Cookies("test"))
})

// Post / create the encrypted cookie
app.Post("/", func(c *fiber.Ctx) error {
c.Cookie(&fiber.Cookie{
Name: "test",
Value: "SomeThing",
})
return nil
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Array of cookie keys that should not be encrypted.
//
// Optional. Default: ["csrf_"]
Except []string

// Base64 encoded unique key to encode & decode cookies.
//
// Required. The key should be 32 bytes of random data in base64-encoded form.
// You may run `openssl rand -base64 32` or use `encryptcookie.GenerateKey()` to generate a new key.
Key string

// Custom function to encrypt cookies.
//
// Optional. Default: EncryptCookie
Encryptor func(decryptedString, key string) (string, error)

// Custom function to decrypt cookies.
//
// Optional. Default: DecryptCookie
Decryptor func(encryptedString, key string) (string, error)
}

Default Config

var ConfigDefault = Config{
Next: nil,
Except: []string{"csrf_"},
Key: "",
Encryptor: EncryptCookie,
Decryptor: DecryptCookie,
}

Normally, encryptcookie middleware skips csrf_ cookies. However, it won't work when you use custom cookie names for CSRF. You should update Except config to avoid this problem. For example:

app.Use(encryptcookie.New(encryptcookie.Config{
Key: "secret-thirty-2-character-string",
Except: []string{"csrf_1"}, // exclude CSRF cookie
}))
app.Use(csrf.New(csrf.Config{
KeyLookup: "form:test",
CookieName: "csrf_1",
CookieHTTPOnly: true,
}))
- - +
Version: Next

Encrypt Cookie

Encrypt middleware for Fiber which encrypts cookie values. Note: this middleware does not encrypt cookie names.

Signatures

// Intitializes the middleware
func New(config ...Config) fiber.Handler

// Returns a random 32 character long string
func GenerateKey() string

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/encryptcookie"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
// `Key` must be a 32 character string. It's used to encrypt the values, so make sure it is random and keep it secret.
// You can run `openssl rand -base64 32` or call `encryptcookie.GenerateKey()` to create a random key for you.
// Make sure not to set `Key` to `encryptcookie.GenerateKey()` because that will create a new key every run.
app.Use(encryptcookie.New(encryptcookie.Config{
Key: "secret-thirty-2-character-string",
}))

// Get / reading out the encrypted cookie
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("value=" + c.Cookies("test"))
})

// Post / create the encrypted cookie
app.Post("/", func(c *fiber.Ctx) error {
c.Cookie(&fiber.Cookie{
Name: "test",
Value: "SomeThing",
})
return nil
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Array of cookie keys that should not be encrypted.
//
// Optional. Default: ["csrf_"]
Except []string

// Base64 encoded unique key to encode & decode cookies.
//
// Required. The key should be 32 bytes of random data in base64-encoded form.
// You may run `openssl rand -base64 32` or use `encryptcookie.GenerateKey()` to generate a new key.
Key string

// Custom function to encrypt cookies.
//
// Optional. Default: EncryptCookie
Encryptor func(decryptedString, key string) (string, error)

// Custom function to decrypt cookies.
//
// Optional. Default: DecryptCookie
Decryptor func(encryptedString, key string) (string, error)
}

Default Config

var ConfigDefault = Config{
Next: nil,
Except: []string{"csrf_"},
Key: "",
Encryptor: EncryptCookie,
Decryptor: DecryptCookie,
}

Normally, encryptcookie middleware skips csrf_ cookies. However, it won't work when you use custom cookie names for CSRF. You should update Except config to avoid this problem. For example:

app.Use(encryptcookie.New(encryptcookie.Config{
Key: "secret-thirty-2-character-string",
Except: []string{"csrf_1"}, // exclude CSRF cookie
}))
app.Use(csrf.New(csrf.Config{
KeyLookup: "form:test",
CookieName: "csrf_1",
CookieHTTPOnly: true,
}))
+ + \ No newline at end of file diff --git a/next/api/middleware/envvar/index.html b/next/api/middleware/envvar/index.html index ad043b95ba1..e837af1f6f6 100644 --- a/next/api/middleware/envvar/index.html +++ b/next/api/middleware/envvar/index.html @@ -6,13 +6,13 @@ EnvVar | Fiber - - + +
-
Version: Next

EnvVar

EnvVar middleware for Fiber that can be used to expose environment variables with various options.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/envvar"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use("/expose/envvars", envvar.New())

// Or extend your config for customization
app.Use("/expose/envvars", envvar.New(
envvar.Config{
ExportVars: map[string]string{"testKey": "", "testDefaultKey": "testDefaultVal"},
ExcludeVars: map[string]string{"excludeKey": ""},
}),
)
note

You will need to provide a path to use the envvar middleware.

Response

Http response contract:

{
"vars": {
"someEnvVariable": "someValue",
"anotherEnvVariable": "anotherValue",
}
}

Config

// Config defines the config for middleware.
type Config struct {
// ExportVars specifies the environment variables that should export
ExportVars map[string]string
// ExcludeVars specifies the environment variables that should not export
ExcludeVars map[string]string
}

Default Config

Config{}
- - +
Version: Next

EnvVar

EnvVar middleware for Fiber that can be used to expose environment variables with various options.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/envvar"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use("/expose/envvars", envvar.New())

// Or extend your config for customization
app.Use("/expose/envvars", envvar.New(
envvar.Config{
ExportVars: map[string]string{"testKey": "", "testDefaultKey": "testDefaultVal"},
ExcludeVars: map[string]string{"excludeKey": ""},
}),
)
note

You will need to provide a path to use the envvar middleware.

Response

Http response contract:

{
"vars": {
"someEnvVariable": "someValue",
"anotherEnvVariable": "anotherValue",
}
}

Config

// Config defines the config for middleware.
type Config struct {
// ExportVars specifies the environment variables that should export
ExportVars map[string]string
// ExcludeVars specifies the environment variables that should not export
ExcludeVars map[string]string
}

Default Config

Config{}
+ + \ No newline at end of file diff --git a/next/api/middleware/etag/index.html b/next/api/middleware/etag/index.html index f45bfac280a..cef13183a2c 100644 --- a/next/api/middleware/etag/index.html +++ b/next/api/middleware/etag/index.html @@ -6,13 +6,13 @@ ETag | Fiber - - + +
-
Version: Next

ETag

ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/etag"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(etag.New())

// Get / receives Etag: "13-1831710635" in response header
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

// Or extend your config for customization
app.Use(etag.New(etag.Config{
Weak: true,
}))

// Get / receives Etag: "W/"13-1831710635" in response header
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Weak indicates that a weak validator is used. Weak etags are easy
// to generate, but are far less useful for comparisons. Strong
// validators are ideal for comparisons but can be very difficult
// to generate efficiently. Weak ETag values of two representations
// of the same resources might be semantically equivalent, but not
// byte-for-byte identical. This means weak etags prevent caching
// when byte range requests are used, but strong etags mean range
// requests can still be cached.
Weak bool
}

Default Config

var ConfigDefault = Config{
Next: nil,
Weak: false,
}
- - +
Version: Next

ETag

ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/etag"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(etag.New())

// Get / receives Etag: "13-1831710635" in response header
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

// Or extend your config for customization
app.Use(etag.New(etag.Config{
Weak: true,
}))

// Get / receives Etag: "W/"13-1831710635" in response header
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Weak indicates that a weak validator is used. Weak etags are easy
// to generate, but are far less useful for comparisons. Strong
// validators are ideal for comparisons but can be very difficult
// to generate efficiently. Weak ETag values of two representations
// of the same resources might be semantically equivalent, but not
// byte-for-byte identical. This means weak etags prevent caching
// when byte range requests are used, but strong etags mean range
// requests can still be cached.
Weak bool
}

Default Config

var ConfigDefault = Config{
Next: nil,
Weak: false,
}
+ + \ No newline at end of file diff --git a/next/api/middleware/expvar/index.html b/next/api/middleware/expvar/index.html index 5d1bd21e124..fbf6421f53e 100644 --- a/next/api/middleware/expvar/index.html +++ b/next/api/middleware/expvar/index.html @@ -6,13 +6,13 @@ ExpVar | Fiber - - + +
-
Version: Next

ExpVar

Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.

Signatures

func New() fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
expvarmw "github.com/gofiber/fiber/v2/middleware/expvar"
)

After you initiate your Fiber app, you can use the following possibilities:

var count = expvar.NewInt("count")

app.Use(expvarmw.New())
app.Get("/", func(c *fiber.Ctx) error {
count.Add(1)

return c.SendString(fmt.Sprintf("hello expvar count %d", count.Value()))
})

Visit path /debug/vars to see all vars and use query r=key to filter exposed variables.

curl 127.0.0.1:3000
hello expvar count 1

curl 127.0.0.1:3000/debug/vars
{
"cmdline": ["xxx"],
"count": 1,
"expvarHandlerCalls": 33,
"expvarRegexpErrors": 0,
"memstats": {...}
}

curl 127.0.0.1:3000/debug/vars?r=c
{
"cmdline": ["xxx"],
"count": 1
}

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool
}

Default Config

var ConfigDefault = Config{
Next: nil,
}
- - +
Version: Next

ExpVar

Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.

Signatures

func New() fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
expvarmw "github.com/gofiber/fiber/v2/middleware/expvar"
)

After you initiate your Fiber app, you can use the following possibilities:

var count = expvar.NewInt("count")

app.Use(expvarmw.New())
app.Get("/", func(c *fiber.Ctx) error {
count.Add(1)

return c.SendString(fmt.Sprintf("hello expvar count %d", count.Value()))
})

Visit path /debug/vars to see all vars and use query r=key to filter exposed variables.

curl 127.0.0.1:3000
hello expvar count 1

curl 127.0.0.1:3000/debug/vars
{
"cmdline": ["xxx"],
"count": 1,
"expvarHandlerCalls": 33,
"expvarRegexpErrors": 0,
"memstats": {...}
}

curl 127.0.0.1:3000/debug/vars?r=c
{
"cmdline": ["xxx"],
"count": 1
}

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool
}

Default Config

var ConfigDefault = Config{
Next: nil,
}
+ + \ No newline at end of file diff --git a/next/api/middleware/favicon/index.html b/next/api/middleware/favicon/index.html index 93327d21b66..8d8cd818872 100644 --- a/next/api/middleware/favicon/index.html +++ b/next/api/middleware/favicon/index.html @@ -6,13 +6,13 @@ Favicon | Fiber - - + +
-
Version: Next

Favicon

Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware.

note

This middleware is exclusively for serving the default, implicit favicon, which is GET /favicon.ico or custom favicon URL.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/favicon"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(favicon.New())

// Or extend your config for customization
app.Use(favicon.New(favicon.Config{
File: "./favicon.ico",
URL: "/favicon.ico",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// File holds the path to an actual favicon that will be cached
//
// Optional. Default: ""
File string

// URL for favicon handler
//
// Optional. Default: "/favicon.ico"
URL string

// FileSystem is an optional alternate filesystem to search for the favicon in.
// An example of this could be an embedded or network filesystem
//
// Optional. Default: nil
FileSystem http.FileSystem

// CacheControl defines how the Cache-Control header in the response should be set
//
// Optional. Default: "public, max-age=31536000"
CacheControl string
}

Default Config

var ConfigDefault = Config{
Next: nil,
File: "",
URL: fPath,
CacheControl: "public, max-age=31536000",
}
- - +
Version: Next

Favicon

Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware.

note

This middleware is exclusively for serving the default, implicit favicon, which is GET /favicon.ico or custom favicon URL.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/favicon"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(favicon.New())

// Or extend your config for customization
app.Use(favicon.New(favicon.Config{
File: "./favicon.ico",
URL: "/favicon.ico",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// File holds the path to an actual favicon that will be cached
//
// Optional. Default: ""
File string

// URL for favicon handler
//
// Optional. Default: "/favicon.ico"
URL string

// FileSystem is an optional alternate filesystem to search for the favicon in.
// An example of this could be an embedded or network filesystem
//
// Optional. Default: nil
FileSystem http.FileSystem

// CacheControl defines how the Cache-Control header in the response should be set
//
// Optional. Default: "public, max-age=31536000"
CacheControl string
}

Default Config

var ConfigDefault = Config{
Next: nil,
File: "",
URL: fPath,
CacheControl: "public, max-age=31536000",
}
+ + \ No newline at end of file diff --git a/next/api/middleware/filesystem/index.html b/next/api/middleware/filesystem/index.html index af7bedc0562..c28bc3b1e71 100644 --- a/next/api/middleware/filesystem/index.html +++ b/next/api/middleware/filesystem/index.html @@ -6,13 +6,13 @@ FileSystem | Fiber - - + +
-
Version: Next

FileSystem

Filesystem middleware for Fiber that enables you to serve files from a directory.

caution

:params & :optionals? within the prefix path are not supported!

To handle paths with spaces (or other url encoded values) make sure to set fiber.Config{ UnescapePath: true }

Signatures

func New(config Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
app.Use(filesystem.New(filesystem.Config{
Root: http.Dir("./assets"),
}))

// Or extend your config for customization
app.Use(filesystem.New(filesystem.Config{
Root: http.Dir("./assets"),
Browse: true,
Index: "index.html",
NotFoundFile: "404.html",
MaxAge: 3600,
}))

If your environment (Go 1.16+) supports it, we recommend using Go Embed instead of the other solutions listed as this one is native to Go and the easiest to use.

embed

Embed is the native method to embed files in a Golang excecutable. Introduced in Go 1.16.

package main

import (
"embed"
"io/fs"
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)

// Embed a single file
//go:embed index.html
var f embed.FS

// Embed a directory
//go:embed static/*
var embedDirStatic embed.FS

func main() {
app := fiber.New()

app.Use("/", filesystem.New(filesystem.Config{
Root: http.FS(f),
}))

// Access file "image.png" under `static/` directory via URL: `http://<server>/static/image.png`.
// Without `PathPrefix`, you have to access it via URL:
// `http://<server>/static/static/image.png`.
app.Use("/static", filesystem.New(filesystem.Config{
Root: http.FS(embedDirStatic),
PathPrefix: "static",
Browse: true,
}))

log.Fatal(app.Listen(":3000"))
}

pkger

https://github.com/markbates/pkger

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/markbates/pkger"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: pkger.Dir("/assets"),
}))

log.Fatal(app.Listen(":3000"))
}

packr

https://github.com/gobuffalo/packr

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/gobuffalo/packr/v2"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: packr.New("Assets Box", "/assets"),
}))

log.Fatal(app.Listen(":3000"))
}

go.rice

https://github.com/GeertJohan/go.rice

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/GeertJohan/go.rice"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: rice.MustFindBox("assets").HTTPBox(),
}))

log.Fatal(app.Listen(":3000"))
}

fileb0x

https://github.com/UnnoTed/fileb0x

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"<Your go module>/myEmbeddedFiles"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: myEmbeddedFiles.HTTP,
}))

log.Fatal(app.Listen(":3000"))
}

statik

https://github.com/rakyll/statik

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

// Use blank to invoke init function and register data to statik
_ "<Your go module>/statik"
"github.com/rakyll/statik/fs"
)

func main() {
statikFS, err := fs.New()
if err != nil {
panic(err)
}

app := fiber.New()

app.Use("/", filesystem.New(filesystem.Config{
Root: statikFS,
}))

log.Fatal(app.Listen(":3000"))
}

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Root is a FileSystem that provides access
// to a collection of files and directories.
//
// Required. Default: nil
Root http.FileSystem `json:"-"`

// PathPrefix defines a prefix to be added to a filepath when
// reading a file from the FileSystem.
//
// Use when using Go 1.16 embed.FS
//
// Optional. Default ""
PathPrefix string `json:"path_prefix"`

// Enable directory browsing.
//
// Optional. Default: false
Browse bool `json:"browse"`

// Index file for serving a directory.
//
// Optional. Default: "index.html"
Index string `json:"index"`

// The value for the Cache-Control HTTP-header
// that is set on the file response. MaxAge is defined in seconds.
//
// Optional. Default value 0.
MaxAge int `json:"max_age"`

// File to return if path is not found. Useful for SPA's.
//
// Optional. Default: ""
NotFoundFile string `json:"not_found_file"`

// The value for the Content-Type HTTP-header
// that is set on the file response
//
// Optional. Default: ""
ContentTypeCharset string `json:"content_type_charset"`
}

Default Config

var ConfigDefault = Config{
Next: nil,
Root: nil,
PathPrefix: "",
Browse: false,
Index: "/index.html",
MaxAge: 0,
ContentTypeCharset: "",
}
- - +
Version: Next

FileSystem

Filesystem middleware for Fiber that enables you to serve files from a directory.

caution

:params & :optionals? within the prefix path are not supported!

To handle paths with spaces (or other url encoded values) make sure to set fiber.Config{ UnescapePath: true }

Signatures

func New(config Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)

After you initiate your Fiber app, you can use the following possibilities:

// Provide a minimal config
app.Use(filesystem.New(filesystem.Config{
Root: http.Dir("./assets"),
}))

// Or extend your config for customization
app.Use(filesystem.New(filesystem.Config{
Root: http.Dir("./assets"),
Browse: true,
Index: "index.html",
NotFoundFile: "404.html",
MaxAge: 3600,
}))

If your environment (Go 1.16+) supports it, we recommend using Go Embed instead of the other solutions listed as this one is native to Go and the easiest to use.

embed

Embed is the native method to embed files in a Golang excecutable. Introduced in Go 1.16.

package main

import (
"embed"
"io/fs"
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"
)

// Embed a single file
//go:embed index.html
var f embed.FS

// Embed a directory
//go:embed static/*
var embedDirStatic embed.FS

func main() {
app := fiber.New()

app.Use("/", filesystem.New(filesystem.Config{
Root: http.FS(f),
}))

// Access file "image.png" under `static/` directory via URL: `http://<server>/static/image.png`.
// Without `PathPrefix`, you have to access it via URL:
// `http://<server>/static/static/image.png`.
app.Use("/static", filesystem.New(filesystem.Config{
Root: http.FS(embedDirStatic),
PathPrefix: "static",
Browse: true,
}))

log.Fatal(app.Listen(":3000"))
}

pkger

https://github.com/markbates/pkger

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/markbates/pkger"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: pkger.Dir("/assets"),
}))

log.Fatal(app.Listen(":3000"))
}

packr

https://github.com/gobuffalo/packr

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/gobuffalo/packr/v2"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: packr.New("Assets Box", "/assets"),
}))

log.Fatal(app.Listen(":3000"))
}

go.rice

https://github.com/GeertJohan/go.rice

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"github.com/GeertJohan/go.rice"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: rice.MustFindBox("assets").HTTPBox(),
}))

log.Fatal(app.Listen(":3000"))
}

fileb0x

https://github.com/UnnoTed/fileb0x

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

"<Your go module>/myEmbeddedFiles"
)

func main() {
app := fiber.New()

app.Use("/assets", filesystem.New(filesystem.Config{
Root: myEmbeddedFiles.HTTP,
}))

log.Fatal(app.Listen(":3000"))
}

statik

https://github.com/rakyll/statik

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem"

// Use blank to invoke init function and register data to statik
_ "<Your go module>/statik"
"github.com/rakyll/statik/fs"
)

func main() {
statikFS, err := fs.New()
if err != nil {
panic(err)
}

app := fiber.New()

app.Use("/", filesystem.New(filesystem.Config{
Root: statikFS,
}))

log.Fatal(app.Listen(":3000"))
}

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Root is a FileSystem that provides access
// to a collection of files and directories.
//
// Required. Default: nil
Root http.FileSystem `json:"-"`

// PathPrefix defines a prefix to be added to a filepath when
// reading a file from the FileSystem.
//
// Use when using Go 1.16 embed.FS
//
// Optional. Default ""
PathPrefix string `json:"path_prefix"`

// Enable directory browsing.
//
// Optional. Default: false
Browse bool `json:"browse"`

// Index file for serving a directory.
//
// Optional. Default: "index.html"
Index string `json:"index"`

// The value for the Cache-Control HTTP-header
// that is set on the file response. MaxAge is defined in seconds.
//
// Optional. Default value 0.
MaxAge int `json:"max_age"`

// File to return if path is not found. Useful for SPA's.
//
// Optional. Default: ""
NotFoundFile string `json:"not_found_file"`

// The value for the Content-Type HTTP-header
// that is set on the file response
//
// Optional. Default: ""
ContentTypeCharset string `json:"content_type_charset"`
}

Default Config

var ConfigDefault = Config{
Next: nil,
Root: nil,
PathPrefix: "",
Browse: false,
Index: "/index.html",
MaxAge: 0,
ContentTypeCharset: "",
}
+ + \ No newline at end of file diff --git a/next/api/middleware/helmet/index.html b/next/api/middleware/helmet/index.html index 442f7907330..88eaa5160f5 100644 --- a/next/api/middleware/helmet/index.html +++ b/next/api/middleware/helmet/index.html @@ -6,13 +6,13 @@ Helmet | Fiber - - + +
-
Version: Next

Helmet

Helmet middleware helps secure your apps by setting various HTTP headers.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/helmet"
)

func main() {
app := fiber.New()

app.Use(helmet.New())

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome!")
})

app.Listen(":3000")
}

Test:

curl -I http://localhost:3000

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// XSSProtection
// Optional. Default value "0".
XSSProtection string

// ContentTypeNosniff
// Optional. Default value "nosniff".
ContentTypeNosniff string

// XFrameOptions
// Optional. Default value "SAMEORIGIN".
// Possible values: "SAMEORIGIN", "DENY", "ALLOW-FROM uri"
XFrameOptions string

// HSTSMaxAge
// Optional. Default value 0.
HSTSMaxAge int

// HSTSExcludeSubdomains
// Optional. Default value false.
HSTSExcludeSubdomains bool

// ContentSecurityPolicy
// Optional. Default value "".
ContentSecurityPolicy string

// CSPReportOnly
// Optional. Default value false.
CSPReportOnly bool

// HSTSPreloadEnabled
// Optional. Default value false.
HSTSPreloadEnabled bool

// ReferrerPolicy
// Optional. Default value "ReferrerPolicy".
ReferrerPolicy string

// Permissions-Policy
// Optional. Default value "".
PermissionPolicy string

// Cross-Origin-Embedder-Policy
// Optional. Default value "require-corp".
CrossOriginEmbedderPolicy string

// Cross-Origin-Opener-Policy
// Optional. Default value "same-origin".
CrossOriginOpenerPolicy string

// Cross-Origin-Resource-Policy
// Optional. Default value "same-origin".
CrossOriginResourcePolicy string

// Origin-Agent-Cluster
// Optional. Default value "?1".
OriginAgentCluster string

// X-DNS-Prefetch-Control
// Optional. Default value "off".
XDNSPrefetchControl string

// X-Download-Options
// Optional. Default value "noopen".
XDownloadOptions string

// X-Permitted-Cross-Domain-Policies
// Optional. Default value "none".
XPermittedCrossDomain string
}

Default Config

var ConfigDefault = Config{
XSSProtection: "0",
ContentTypeNosniff: "nosniff",
XFrameOptions: "SAMEORIGIN",
ReferrerPolicy: "no-referrer",
CrossOriginEmbedderPolicy: "require-corp",
CrossOriginOpenerPolicy: "same-origin",
CrossOriginResourcePolicy: "same-origin",
OriginAgentCluster: "?1",
XDNSPrefetchControl: "off",
XDownloadOptions: "noopen",
XPermittedCrossDomain: "none",
}
- - +
Version: Next

Helmet

Helmet middleware helps secure your apps by setting various HTTP headers.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/helmet"
)

func main() {
app := fiber.New()

app.Use(helmet.New())

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome!")
})

app.Listen(":3000")
}

Test:

curl -I http://localhost:3000

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// XSSProtection
// Optional. Default value "0".
XSSProtection string

// ContentTypeNosniff
// Optional. Default value "nosniff".
ContentTypeNosniff string

// XFrameOptions
// Optional. Default value "SAMEORIGIN".
// Possible values: "SAMEORIGIN", "DENY", "ALLOW-FROM uri"
XFrameOptions string

// HSTSMaxAge
// Optional. Default value 0.
HSTSMaxAge int

// HSTSExcludeSubdomains
// Optional. Default value false.
HSTSExcludeSubdomains bool

// ContentSecurityPolicy
// Optional. Default value "".
ContentSecurityPolicy string

// CSPReportOnly
// Optional. Default value false.
CSPReportOnly bool

// HSTSPreloadEnabled
// Optional. Default value false.
HSTSPreloadEnabled bool

// ReferrerPolicy
// Optional. Default value "ReferrerPolicy".
ReferrerPolicy string

// Permissions-Policy
// Optional. Default value "".
PermissionPolicy string

// Cross-Origin-Embedder-Policy
// Optional. Default value "require-corp".
CrossOriginEmbedderPolicy string

// Cross-Origin-Opener-Policy
// Optional. Default value "same-origin".
CrossOriginOpenerPolicy string

// Cross-Origin-Resource-Policy
// Optional. Default value "same-origin".
CrossOriginResourcePolicy string

// Origin-Agent-Cluster
// Optional. Default value "?1".
OriginAgentCluster string

// X-DNS-Prefetch-Control
// Optional. Default value "off".
XDNSPrefetchControl string

// X-Download-Options
// Optional. Default value "noopen".
XDownloadOptions string

// X-Permitted-Cross-Domain-Policies
// Optional. Default value "none".
XPermittedCrossDomain string
}

Default Config

var ConfigDefault = Config{
XSSProtection: "0",
ContentTypeNosniff: "nosniff",
XFrameOptions: "SAMEORIGIN",
ReferrerPolicy: "no-referrer",
CrossOriginEmbedderPolicy: "require-corp",
CrossOriginOpenerPolicy: "same-origin",
CrossOriginResourcePolicy: "same-origin",
OriginAgentCluster: "?1",
XDNSPrefetchControl: "off",
XDownloadOptions: "noopen",
XPermittedCrossDomain: "none",
}
+ + \ No newline at end of file diff --git a/next/api/middleware/idempotency/index.html b/next/api/middleware/idempotency/index.html index 76054996ef6..c71fc11dff3 100644 --- a/next/api/middleware/idempotency/index.html +++ b/next/api/middleware/idempotency/index.html @@ -6,13 +6,13 @@ Idempotency | Fiber - - + +
-
Version: Next

Idempotency

Idempotency middleware for Fiber allows for fault-tolerant APIs where duplicate requests — for example due to networking issues on the client-side — do not erroneously cause the same action performed multiple times on the server-side.

Refer to https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-02 for a better understanding.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/idempotency"
)

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(idempotency.New())

Custom Config

app.Use(idempotency.New(idempotency.Config{
Lifetime: 42 * time.Minute,
// ...
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: a function which skips the middleware on safe HTTP request method.
Next func(c *fiber.Ctx) bool

// Lifetime is the maximum lifetime of an idempotency key.
//
// Optional. Default: 30 * time.Minute
Lifetime time.Duration

// KeyHeader is the name of the header that contains the idempotency key.
//
// Optional. Default: X-Idempotency-Key
KeyHeader string
// KeyHeaderValidate defines a function to validate the syntax of the idempotency header.
//
// Optional. Default: a function which ensures the header is 36 characters long (the size of an UUID).
KeyHeaderValidate func(string) error

// KeepResponseHeaders is a list of headers that should be kept from the original response.
//
// Optional. Default: nil (to keep all headers)
KeepResponseHeaders []string

// Lock locks an idempotency key.
//
// Optional. Default: an in-memory locker for this process only.
Lock Locker

// Storage stores response data by idempotency key.
//
// Optional. Default: an in-memory storage for this process only.
Storage fiber.Storage
}

Default Config

var ConfigDefault = Config{
Next: func(c *fiber.Ctx) bool {
// Skip middleware if the request was done using a safe HTTP method
return fiber.IsMethodSafe(c.Method())
},

Lifetime: 30 * time.Minute,

KeyHeader: "X-Idempotency-Key",
KeyHeaderValidate: func(k string) error {
if l, wl := len(k), 36; l != wl { // UUID length is 36 chars
return fmt.Errorf("%w: invalid length: %d != %d", ErrInvalidIdempotencyKey, l, wl)
}

return nil
},

KeepResponseHeaders: nil,

Lock: nil, // Set in configDefault so we don't allocate data here.

Storage: nil, // Set in configDefault so we don't allocate data here.
}
- - +
Version: Next

Idempotency

Idempotency middleware for Fiber allows for fault-tolerant APIs where duplicate requests — for example due to networking issues on the client-side — do not erroneously cause the same action performed multiple times on the server-side.

Refer to https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-02 for a better understanding.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/idempotency"
)

After you initiate your Fiber app, you can use the following possibilities:

Default Config

app.Use(idempotency.New())

Custom Config

app.Use(idempotency.New(idempotency.Config{
Lifetime: 42 * time.Minute,
// ...
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: a function which skips the middleware on safe HTTP request method.
Next func(c *fiber.Ctx) bool

// Lifetime is the maximum lifetime of an idempotency key.
//
// Optional. Default: 30 * time.Minute
Lifetime time.Duration

// KeyHeader is the name of the header that contains the idempotency key.
//
// Optional. Default: X-Idempotency-Key
KeyHeader string
// KeyHeaderValidate defines a function to validate the syntax of the idempotency header.
//
// Optional. Default: a function which ensures the header is 36 characters long (the size of an UUID).
KeyHeaderValidate func(string) error

// KeepResponseHeaders is a list of headers that should be kept from the original response.
//
// Optional. Default: nil (to keep all headers)
KeepResponseHeaders []string

// Lock locks an idempotency key.
//
// Optional. Default: an in-memory locker for this process only.
Lock Locker

// Storage stores response data by idempotency key.
//
// Optional. Default: an in-memory storage for this process only.
Storage fiber.Storage
}

Default Config

var ConfigDefault = Config{
Next: func(c *fiber.Ctx) bool {
// Skip middleware if the request was done using a safe HTTP method
return fiber.IsMethodSafe(c.Method())
},

Lifetime: 30 * time.Minute,

KeyHeader: "X-Idempotency-Key",
KeyHeaderValidate: func(k string) error {
if l, wl := len(k), 36; l != wl { // UUID length is 36 chars
return fmt.Errorf("%w: invalid length: %d != %d", ErrInvalidIdempotencyKey, l, wl)
}

return nil
},

KeepResponseHeaders: nil,

Lock: nil, // Set in configDefault so we don't allocate data here.

Storage: nil, // Set in configDefault so we don't allocate data here.
}
+ + \ No newline at end of file diff --git a/next/api/middleware/keyauth/index.html b/next/api/middleware/keyauth/index.html index c60ec9fae18..6bc1efa87b2 100644 --- a/next/api/middleware/keyauth/index.html +++ b/next/api/middleware/keyauth/index.html @@ -6,13 +6,13 @@ Keyauth | Fiber - - + +
-
Version: Next

Keyauth

Key auth middleware provides a key based authentication.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
)

var (
apiKey = "correct horse battery staple"
)

func validateAPIKey(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
}

func main() {
app := fiber.New()

// note that the keyauth middleware needs to be defined before the routes are defined!
app.Use(keyauth.New(keyauth.Config{
KeyLookup: "cookie:access_token",
Validator: validateAPIKey,
}))

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})

app.Listen(":3000")
}

Test:

# No api-key specified -> 400 missing 
curl http://localhost:3000
#> missing or malformed API Key

curl --cookie "access_token=correct horse battery staple" http://localhost:3000
#> Successfully authenticated!

curl --cookie "access_token=Clearly A Wrong Key" http://localhost:3000
#> missing or malformed API Key

For a more detailed example, see also the github.com/gofiber/recipes repository and specifically the fiber-envoy-extauthz repository and the keyauth example code.

Authenticate only certain endpoints

If you want to authenticate only certain endpoints, you can use the Config of keyauth and apply a filter function (eg. authFilter) like so

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
"regexp"
"strings"
)

var (
apiKey = "correct horse battery staple"
protectedURLs = []*regexp.Regexp{
regexp.MustCompile("^/authenticated$"),
regexp.MustCompile("^/auth2$"),
}
)

func validateAPIKey(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
}

func authFilter(c *fiber.Ctx) bool {
originalURL := strings.ToLower(c.OriginalURL())

for _, pattern := range protectedURLs {
if pattern.MatchString(originalURL) {
return false
}
}
return true
}

func main() {
app := fiber.New()

app.Use(keyauth.New(keyauth.Config{
Next: authFilter,
KeyLookup: "cookie:access_token",
Validator: validateAPIKey,
}))

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome")
})
app.Get("/authenticated", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})
app.Get("/auth2", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated 2!")
})

app.Listen(":3000")
}

Which results in this

# / does not need to be authenticated
curl http://localhost:3000
#> Welcome

# /authenticated needs to be authenticated
curl --cookie "access_token=correct horse battery staple" http://localhost:3000/authenticated
#> Successfully authenticated!

# /auth2 needs to be authenticated too
curl --cookie "access_token=correct horse battery staple" http://localhost:3000/auth2
#> Successfully authenticated 2!

Specifying middleware in the handler

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
)

const (
apiKey = "my-super-secret-key"
)

func main() {
app := fiber.New()

authMiddleware := keyauth.New(keyauth.Config{
Validator: func(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
},
})

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome")
})

app.Get("/allowed", authMiddleware, func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})

app.Listen(":3000")
}

Which results in this

# / does not need to be authenticated
curl http://localhost:3000
#> Welcome

# /allowed needs to be authenticated too
curl --header "Authorization: Bearer my-super-secret-key" http://localhost:3000/allowed
#> Successfully authenticated!

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// SuccessHandler defines a function which is executed for a valid key.
// Optional. Default: nil
SuccessHandler fiber.Handler

// ErrorHandler defines a function which is executed for an invalid key.
// It may be used to define a custom error.
// Optional. Default: 401 Invalid or expired key
ErrorHandler fiber.ErrorHandler

// KeyLookup is a string in the form of "<source>:<name>" that is used
// to extract key from the request.
// Optional. Default value "header:Authorization".
// Possible values:
// - "header:<name>"
// - "query:<name>"
// - "form:<name>"
// - "param:<name>"
// - "cookie:<name>"
KeyLookup string

// AuthScheme to be used in the Authorization header.
// Optional. Default value "Bearer".
AuthScheme string

// Validator is a function to validate key.
Validator func(*fiber.Ctx, string) (bool, error)

// Context key to store the bearertoken from the token into context.
// Optional. Default: "token".
ContextKey string
}

Default Config

var ConfigDefault = Config{
SuccessHandler: func(c *fiber.Ctx) error {
return c.Next()
},
ErrorHandler: func(c *fiber.Ctx, err error) error {
if err == ErrMissingOrMalformedAPIKey {
return c.Status(fiber.StatusUnauthorized).SendString(err.Error())
}
return c.Status(fiber.StatusUnauthorized).SendString("Invalid or expired API Key")
},
KeyLookup: "header:" + fiber.HeaderAuthorization,
AuthScheme: "Bearer",
ContextKey: "token",
}
- - +
Version: Next

Keyauth

Key auth middleware provides a key based authentication.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
)

var (
apiKey = "correct horse battery staple"
)

func validateAPIKey(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
}

func main() {
app := fiber.New()

// note that the keyauth middleware needs to be defined before the routes are defined!
app.Use(keyauth.New(keyauth.Config{
KeyLookup: "cookie:access_token",
Validator: validateAPIKey,
}))

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})

app.Listen(":3000")
}

Test:

# No api-key specified -> 400 missing 
curl http://localhost:3000
#> missing or malformed API Key

curl --cookie "access_token=correct horse battery staple" http://localhost:3000
#> Successfully authenticated!

curl --cookie "access_token=Clearly A Wrong Key" http://localhost:3000
#> missing or malformed API Key

For a more detailed example, see also the github.com/gofiber/recipes repository and specifically the fiber-envoy-extauthz repository and the keyauth example code.

Authenticate only certain endpoints

If you want to authenticate only certain endpoints, you can use the Config of keyauth and apply a filter function (eg. authFilter) like so

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
"regexp"
"strings"
)

var (
apiKey = "correct horse battery staple"
protectedURLs = []*regexp.Regexp{
regexp.MustCompile("^/authenticated$"),
regexp.MustCompile("^/auth2$"),
}
)

func validateAPIKey(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
}

func authFilter(c *fiber.Ctx) bool {
originalURL := strings.ToLower(c.OriginalURL())

for _, pattern := range protectedURLs {
if pattern.MatchString(originalURL) {
return false
}
}
return true
}

func main() {
app := fiber.New()

app.Use(keyauth.New(keyauth.Config{
Next: authFilter,
KeyLookup: "cookie:access_token",
Validator: validateAPIKey,
}))

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome")
})
app.Get("/authenticated", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})
app.Get("/auth2", func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated 2!")
})

app.Listen(":3000")
}

Which results in this

# / does not need to be authenticated
curl http://localhost:3000
#> Welcome

# /authenticated needs to be authenticated
curl --cookie "access_token=correct horse battery staple" http://localhost:3000/authenticated
#> Successfully authenticated!

# /auth2 needs to be authenticated too
curl --cookie "access_token=correct horse battery staple" http://localhost:3000/auth2
#> Successfully authenticated 2!

Specifying middleware in the handler

package main

import (
"crypto/sha256"
"crypto/subtle"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/keyauth"
)

const (
apiKey = "my-super-secret-key"
)

func main() {
app := fiber.New()

authMiddleware := keyauth.New(keyauth.Config{
Validator: func(c *fiber.Ctx, key string) (bool, error) {
hashedAPIKey := sha256.Sum256([]byte(apiKey))
hashedKey := sha256.Sum256([]byte(key))

if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 {
return true, nil
}
return false, keyauth.ErrMissingOrMalformedAPIKey
},
})

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome")
})

app.Get("/allowed", authMiddleware, func(c *fiber.Ctx) error {
return c.SendString("Successfully authenticated!")
})

app.Listen(":3000")
}

Which results in this

# / does not need to be authenticated
curl http://localhost:3000
#> Welcome

# /allowed needs to be authenticated too
curl --header "Authorization: Bearer my-super-secret-key" http://localhost:3000/allowed
#> Successfully authenticated!

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// SuccessHandler defines a function which is executed for a valid key.
// Optional. Default: nil
SuccessHandler fiber.Handler

// ErrorHandler defines a function which is executed for an invalid key.
// It may be used to define a custom error.
// Optional. Default: 401 Invalid or expired key
ErrorHandler fiber.ErrorHandler

// KeyLookup is a string in the form of "<source>:<name>" that is used
// to extract key from the request.
// Optional. Default value "header:Authorization".
// Possible values:
// - "header:<name>"
// - "query:<name>"
// - "form:<name>"
// - "param:<name>"
// - "cookie:<name>"
KeyLookup string

// AuthScheme to be used in the Authorization header.
// Optional. Default value "Bearer".
AuthScheme string

// Validator is a function to validate key.
Validator func(*fiber.Ctx, string) (bool, error)

// Context key to store the bearertoken from the token into context.
// Optional. Default: "token".
ContextKey string
}

Default Config

var ConfigDefault = Config{
SuccessHandler: func(c *fiber.Ctx) error {
return c.Next()
},
ErrorHandler: func(c *fiber.Ctx, err error) error {
if err == ErrMissingOrMalformedAPIKey {
return c.Status(fiber.StatusUnauthorized).SendString(err.Error())
}
return c.Status(fiber.StatusUnauthorized).SendString("Invalid or expired API Key")
},
KeyLookup: "header:" + fiber.HeaderAuthorization,
AuthScheme: "Bearer",
ContextKey: "token",
}
+ + \ No newline at end of file diff --git a/next/api/middleware/limiter/index.html b/next/api/middleware/limiter/index.html index e4970aed73b..c08d425e059 100644 --- a/next/api/middleware/limiter/index.html +++ b/next/api/middleware/limiter/index.html @@ -6,13 +6,13 @@ Limiter | Fiber - - + +
-
Version: Next

Limiter

Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

note

This module does not share state with other processes/servers by default.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/limiter"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(limiter.New())

// Or extend your config for customization
app.Use(limiter.New(limiter.Config{
Next: func(c *fiber.Ctx) bool {
return c.IP() == "127.0.0.1"
},
Max: 20,
Expiration: 30 * time.Second,
KeyGenerator: func(c *fiber.Ctx) string {
return c.Get("x-forwarded-for")
},
LimitReached: func(c *fiber.Ctx) error {
return c.SendFile("./toofast.html")
},
Storage: myCustomStorage{},
}))

Sliding window

Instead of using the standard fixed window algorithm, you can enable the sliding window algorithm.

A example of such configuration is:

app.Use(limiter.New(limiter.Config{
Max: 20,
Expiration: 30 * time.Second,
LimiterMiddleware: limiter.SlidingWindow{},
}))

This means that every window will take into account the previous window(if there was any). The given formula for the rate is:

weightOfPreviousWindpw = previous window's amount request * (whenNewWindow / Expiration)
rate = weightOfPreviousWindpw + current window's amount request.

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Max number of recent connections during `Duration` seconds before sending a 429 response
//
// Default: 5
Max int

// KeyGenerator allows you to generate custom keys, by default c.IP() is used
//
// Default: func(c *fiber.Ctx) string {
// return c.IP()
// }
KeyGenerator func(*fiber.Ctx) string

// Expiration is the time on how long to keep records of requests in memory
//
// Default: 1 * time.Minute
Expiration time.Duration

// LimitReached is called when a request hits the limit
//
// Default: func(c *fiber.Ctx) error {
// return c.SendStatus(fiber.StatusTooManyRequests)
// }
LimitReached fiber.Handler

// When set to true, requests with StatusCode >= 400 won't be counted.
//
// Default: false
SkipFailedRequests bool

// When set to true, requests with StatusCode < 400 won't be counted.
//
// Default: false
SkipSuccessfulRequests bool

// Store is used to store the state of the middleware
//
// Default: an in memory store for this process only
Storage fiber.Storage

// LimiterMiddleware is the struct that implements limiter middleware.
//
// Default: a new Fixed Window Rate Limiter
LimiterMiddleware LimiterHandler
}
note

A custom store can be used if it implements the Storage interface - more details and an example can be found in store.go.

Default Config

var ConfigDefault = Config{
Max: 5,
Expiration: 1 * time.Minute,
KeyGenerator: func(c *fiber.Ctx) string {
return c.IP()
},
LimitReached: func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusTooManyRequests)
},
SkipFailedRequests: false,
SkipSuccessfulRequests: false,
LimiterMiddleware: FixedWindow{},
}

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
app.Use(limiter.New(limiter.Config{
Storage: storage,
}))
- - +
Version: Next

Limiter

Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

note

This module does not share state with other processes/servers by default.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/limiter"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(limiter.New())

// Or extend your config for customization
app.Use(limiter.New(limiter.Config{
Next: func(c *fiber.Ctx) bool {
return c.IP() == "127.0.0.1"
},
Max: 20,
Expiration: 30 * time.Second,
KeyGenerator: func(c *fiber.Ctx) string {
return c.Get("x-forwarded-for")
},
LimitReached: func(c *fiber.Ctx) error {
return c.SendFile("./toofast.html")
},
Storage: myCustomStorage{},
}))

Sliding window

Instead of using the standard fixed window algorithm, you can enable the sliding window algorithm.

A example of such configuration is:

app.Use(limiter.New(limiter.Config{
Max: 20,
Expiration: 30 * time.Second,
LimiterMiddleware: limiter.SlidingWindow{},
}))

This means that every window will take into account the previous window(if there was any). The given formula for the rate is:

weightOfPreviousWindpw = previous window's amount request * (whenNewWindow / Expiration)
rate = weightOfPreviousWindpw + current window's amount request.

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Max number of recent connections during `Duration` seconds before sending a 429 response
//
// Default: 5
Max int

// KeyGenerator allows you to generate custom keys, by default c.IP() is used
//
// Default: func(c *fiber.Ctx) string {
// return c.IP()
// }
KeyGenerator func(*fiber.Ctx) string

// Expiration is the time on how long to keep records of requests in memory
//
// Default: 1 * time.Minute
Expiration time.Duration

// LimitReached is called when a request hits the limit
//
// Default: func(c *fiber.Ctx) error {
// return c.SendStatus(fiber.StatusTooManyRequests)
// }
LimitReached fiber.Handler

// When set to true, requests with StatusCode >= 400 won't be counted.
//
// Default: false
SkipFailedRequests bool

// When set to true, requests with StatusCode < 400 won't be counted.
//
// Default: false
SkipSuccessfulRequests bool

// Store is used to store the state of the middleware
//
// Default: an in memory store for this process only
Storage fiber.Storage

// LimiterMiddleware is the struct that implements limiter middleware.
//
// Default: a new Fixed Window Rate Limiter
LimiterMiddleware LimiterHandler
}
note

A custom store can be used if it implements the Storage interface - more details and an example can be found in store.go.

Default Config

var ConfigDefault = Config{
Max: 5,
Expiration: 1 * time.Minute,
KeyGenerator: func(c *fiber.Ctx) string {
return c.IP()
},
LimitReached: func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusTooManyRequests)
},
SkipFailedRequests: false,
SkipSuccessfulRequests: false,
LimiterMiddleware: FixedWindow{},
}

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
app.Use(limiter.New(limiter.Config{
Storage: storage,
}))
+ + \ No newline at end of file diff --git a/next/api/middleware/logger/index.html b/next/api/middleware/logger/index.html index 475a654983f..5208c191ce2 100644 --- a/next/api/middleware/logger/index.html +++ b/next/api/middleware/logger/index.html @@ -6,14 +6,14 @@ Logger | Fiber - - + +
Version: Next

Logger

Logger middleware for Fiber that logs HTTP request/response details.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/logger"
)
tip

The order of registration plays a role. Only all routes that are registered after this one will be logged. -The middleware should therefore be one of the first to be registered.

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(logger.New())

// Or extend your config for customization
// Logging remote IP and Port
app.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))

// Logging Request ID
app.Use(requestid.New())
app.Use(logger.New(logger.Config{
// For more options, see the Config section
Format: "${pid} ${locals:requestid} ${status} - ${method} ${path}​\n",
}))

// Changing TimeZone & TimeFormat
app.Use(logger.New(logger.Config{
Format: "${pid} ${status} - ${method} ${path}\n",
TimeFormat: "02-Jan-2006",
TimeZone: "America/New_York",
}))

// Custom File Writer
file, err := os.OpenFile("./123.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
log.Fatalf("error opening file: %v", err)
}
defer file.Close()
app.Use(logger.New(logger.Config{
Output: file,
}))

// Add Custom Tags
app.Use(logger.New(logger.Config{
CustomTags: map[string]logger.LogFunc{
"custom_tag": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) {
return output.WriteString("it is a custom tag")
},
},
}))

// Callback after log is written
app.Use(logger.New(logger.Config{
TimeFormat: time.RFC3339Nano,
TimeZone: "Asia/Shanghai",
Done: func(c *fiber.Ctx, logString []byte) {
if c.Response().StatusCode() != fiber.StatusOK {
reporter.SendToSlack(logString)
}
},
}))

// Disable colors when outputting to default format
app.Use(logger.New(logger.Config{
DisableColors: true,
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Done is a function that is called after the log string for a request is written to Output,
// and pass the log string as parameter.
//
// Optional. Default: nil
Done func(c *fiber.Ctx, logString []byte)

// tagFunctions defines the custom tag action
//
// Optional. Default: map[string]LogFunc
CustomTags map[string]LogFunc

// Format defines the logging tags
//
// Optional. Default: [${time}] ${status} - ${latency} ${method} ${path}\n
Format string

// TimeFormat https://programming.guide/go/format-parse-string-time-date-example.html
//
// Optional. Default: 15:04:05
TimeFormat string

// TimeZone can be specified, such as "UTC" and "America/New_York" and "Asia/Chongqing", etc
//
// Optional. Default: "Local"
TimeZone string

// TimeInterval is the delay before the timestamp is updated
//
// Optional. Default: 500 * time.Millisecond
TimeInterval time.Duration

// Output is a writer where logs are written
//
// Default: os.Stdout
Output io.Writer

// DisableColors defines if the logs output should be colorized
//
// Default: false
DisableColors bool

enableColors bool
enableLatency bool
timeZoneLocation *time.Location
}
type LogFunc func(buf logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error)

Default Config

var ConfigDefault = Config{
Next: nil,
Done: nil,
Format: "[${time}] ${status} - ${latency} ${method} ${path}\n",
TimeFormat: "15:04:05",
TimeZone: "Local",
TimeInterval: 500 * time.Millisecond,
Output: os.Stdout,
DisableColors: false,
}

Constants

// Logger variables
const (
TagPid = "pid"
TagTime = "time"
TagReferer = "referer"
TagProtocol = "protocol"
TagPort = "port"
TagIP = "ip"
TagIPs = "ips"
TagHost = "host"
TagMethod = "method"
TagPath = "path"
TagURL = "url"
TagUA = "ua"
TagLatency = "latency"
TagStatus = "status" // response status
TagResBody = "resBody" // response body
TagReqHeaders = "reqHeaders"
TagQueryStringParams = "queryParams" // request query parameters
TagBody = "body" // request body
TagBytesSent = "bytesSent"
TagBytesReceived = "bytesReceived"
TagRoute = "route"
TagError = "error"
// DEPRECATED: Use TagReqHeader instead
TagHeader = "header:" // request header
TagReqHeader = "reqHeader:" // request header
TagRespHeader = "respHeader:" // response header
TagQuery = "query:" // request query
TagForm = "form:" // request form
TagCookie = "cookie:" // request cookie
TagLocals = "locals:"
// colors
TagBlack = "black"
TagRed = "red"
TagGreen = "green"
TagYellow = "yellow"
TagBlue = "blue"
TagMagenta = "magenta"
TagCyan = "cyan"
TagWhite = "white"
TagReset = "reset"
)
- - +The middleware should therefore be one of the first to be registered.

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(logger.New())

// Or extend your config for customization
// Logging remote IP and Port
app.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))

// Logging Request ID
app.Use(requestid.New())
app.Use(logger.New(logger.Config{
// For more options, see the Config section
Format: "${pid} ${locals:requestid} ${status} - ${method} ${path}​\n",
}))

// Changing TimeZone & TimeFormat
app.Use(logger.New(logger.Config{
Format: "${pid} ${status} - ${method} ${path}\n",
TimeFormat: "02-Jan-2006",
TimeZone: "America/New_York",
}))

// Custom File Writer
file, err := os.OpenFile("./123.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
log.Fatalf("error opening file: %v", err)
}
defer file.Close()
app.Use(logger.New(logger.Config{
Output: file,
}))

// Add Custom Tags
app.Use(logger.New(logger.Config{
CustomTags: map[string]logger.LogFunc{
"custom_tag": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) {
return output.WriteString("it is a custom tag")
},
},
}))

// Callback after log is written
app.Use(logger.New(logger.Config{
TimeFormat: time.RFC3339Nano,
TimeZone: "Asia/Shanghai",
Done: func(c *fiber.Ctx, logString []byte) {
if c.Response().StatusCode() != fiber.StatusOK {
reporter.SendToSlack(logString)
}
},
}))

// Disable colors when outputting to default format
app.Use(logger.New(logger.Config{
DisableColors: true,
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Done is a function that is called after the log string for a request is written to Output,
// and pass the log string as parameter.
//
// Optional. Default: nil
Done func(c *fiber.Ctx, logString []byte)

// tagFunctions defines the custom tag action
//
// Optional. Default: map[string]LogFunc
CustomTags map[string]LogFunc

// Format defines the logging tags
//
// Optional. Default: [${time}] ${status} - ${latency} ${method} ${path}\n
Format string

// TimeFormat https://programming.guide/go/format-parse-string-time-date-example.html
//
// Optional. Default: 15:04:05
TimeFormat string

// TimeZone can be specified, such as "UTC" and "America/New_York" and "Asia/Chongqing", etc
//
// Optional. Default: "Local"
TimeZone string

// TimeInterval is the delay before the timestamp is updated
//
// Optional. Default: 500 * time.Millisecond
TimeInterval time.Duration

// Output is a writer where logs are written
//
// Default: os.Stdout
Output io.Writer

// DisableColors defines if the logs output should be colorized
//
// Default: false
DisableColors bool

enableColors bool
enableLatency bool
timeZoneLocation *time.Location
}
type LogFunc func(buf logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error)

Default Config

var ConfigDefault = Config{
Next: nil,
Done: nil,
Format: "[${time}] ${status} - ${latency} ${method} ${path}\n",
TimeFormat: "15:04:05",
TimeZone: "Local",
TimeInterval: 500 * time.Millisecond,
Output: os.Stdout,
DisableColors: false,
}

Constants

// Logger variables
const (
TagPid = "pid"
TagTime = "time"
TagReferer = "referer"
TagProtocol = "protocol"
TagPort = "port"
TagIP = "ip"
TagIPs = "ips"
TagHost = "host"
TagMethod = "method"
TagPath = "path"
TagURL = "url"
TagUA = "ua"
TagLatency = "latency"
TagStatus = "status" // response status
TagResBody = "resBody" // response body
TagReqHeaders = "reqHeaders"
TagQueryStringParams = "queryParams" // request query parameters
TagBody = "body" // request body
TagBytesSent = "bytesSent"
TagBytesReceived = "bytesReceived"
TagRoute = "route"
TagError = "error"
// DEPRECATED: Use TagReqHeader instead
TagHeader = "header:" // request header
TagReqHeader = "reqHeader:" // request header
TagRespHeader = "respHeader:" // response header
TagQuery = "query:" // request query
TagForm = "form:" // request form
TagCookie = "cookie:" // request cookie
TagLocals = "locals:"
// colors
TagBlack = "black"
TagRed = "red"
TagGreen = "green"
TagYellow = "yellow"
TagBlue = "blue"
TagMagenta = "magenta"
TagCyan = "cyan"
TagWhite = "white"
TagReset = "reset"
)
+ + \ No newline at end of file diff --git a/next/api/middleware/monitor/index.html b/next/api/middleware/monitor/index.html index 7905ab6343a..8c61024fb87 100644 --- a/next/api/middleware/monitor/index.html +++ b/next/api/middleware/monitor/index.html @@ -6,14 +6,14 @@ Monitor | Fiber - - + +
Version: Next

Monitor

Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor

caution

Monitor is still in beta, API might change in the future!

Signatures

func New() fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/monitor"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config (Assign the middleware to /metrics)
app.Get("/metrics", monitor.New())

// Or extend your config for customization
// Assign the middleware to /metrics
// and change the Title to `MyService Metrics Page`
app.Get("/metrics", monitor.New(monitor.Config{Title: "MyService Metrics Page"}))

You can also access the API endpoint with -curl -X GET -H "Accept: application/json" http://localhost:3000/metrics which returns:

{"pid":{ "cpu":0.4568381746582226, "ram":20516864,   "conns":3 },
"os": { "cpu":8.759124087593099, "ram":3997155328, "conns":44,
"total_ram":8245489664, "load_avg":0.51 }}

Config

// Config defines the config for middleware.
type Config struct {
// Metrics page title
//
// Optional. Default: "Fiber Monitor"
Title string

// Refresh period
//
// Optional. Default: 3 seconds
Refresh time.Duration

// Whether the service should expose only the monitoring API.
//
// Optional. Default: false
APIOnly bool

// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Custom HTML Code to Head Section(Before End)
//
// Optional. Default: empty
CustomHead string

// FontURL for specify font resource path or URL . also you can use relative path
//
// Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap
FontURL string

// ChartJsURL for specify ChartJS library path or URL . also you can use relative path
//
// Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js
ChartJsURL string

index string
}

Default Config

var ConfigDefault = Config{
Title: defaultTitle,
Refresh: defaultRefresh,
FontURL: defaultFontURL,
ChartJsURL: defaultChartJSURL,
CustomHead: defaultCustomHead,
APIOnly: false,
Next: nil,
index: newIndex(viewBag{
defaultTitle,
defaultRefresh,
defaultFontURL,
defaultChartJSURL,
defaultCustomHead,
}),
}
- - +curl -X GET -H "Accept: application/json" http://localhost:3000/metrics which returns:

{"pid":{ "cpu":0.4568381746582226, "ram":20516864,   "conns":3 },
"os": { "cpu":8.759124087593099, "ram":3997155328, "conns":44,
"total_ram":8245489664, "load_avg":0.51 }}

Config

// Config defines the config for middleware.
type Config struct {
// Metrics page title
//
// Optional. Default: "Fiber Monitor"
Title string

// Refresh period
//
// Optional. Default: 3 seconds
Refresh time.Duration

// Whether the service should expose only the monitoring API.
//
// Optional. Default: false
APIOnly bool

// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Custom HTML Code to Head Section(Before End)
//
// Optional. Default: empty
CustomHead string

// FontURL for specify font resource path or URL . also you can use relative path
//
// Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap
FontURL string

// ChartJsURL for specify ChartJS library path or URL . also you can use relative path
//
// Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js
ChartJsURL string

index string
}

Default Config

var ConfigDefault = Config{
Title: defaultTitle,
Refresh: defaultRefresh,
FontURL: defaultFontURL,
ChartJsURL: defaultChartJSURL,
CustomHead: defaultCustomHead,
APIOnly: false,
Next: nil,
index: newIndex(viewBag{
defaultTitle,
defaultRefresh,
defaultFontURL,
defaultChartJSURL,
defaultCustomHead,
}),
}
+ + \ No newline at end of file diff --git a/next/api/middleware/pprof/index.html b/next/api/middleware/pprof/index.html index 9b6d2b29c39..82a13b3b58b 100644 --- a/next/api/middleware/pprof/index.html +++ b/next/api/middleware/pprof/index.html @@ -6,13 +6,13 @@ Pprof | Fiber - - + +
-
Version: Next

Pprof

Pprof middleware for Fiber that serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.

Signatures

func New() fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/pprof"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(pprof.New())

// Or extend your config for customization

// For example, in systems where you have multiple ingress endpoints, it is common to add a URL prefix, like so:
app.Use(pprof.New(pprof.Config{Prefix: "/endpoint-prefix"}))

// This prefix will be added to the default path of "/debug/pprof/", for a resulting URL of: "/endpoint-prefix/debug/pprof/".

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Prefix defines a URL prefix added before "/debug/pprof".
// Note that it should start with (but not end with) a slash.
// Example: "/federated-fiber"
//
// Optional. Default: ""
Prefix string
}

Default Config

var ConfigDefault = Config{
Next: nil,
}
- - +
Version: Next

Pprof

Pprof middleware for Fiber that serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.

Signatures

func New() fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/pprof"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(pprof.New())

// Or extend your config for customization

// For example, in systems where you have multiple ingress endpoints, it is common to add a URL prefix, like so:
app.Use(pprof.New(pprof.Config{Prefix: "/endpoint-prefix"}))

// This prefix will be added to the default path of "/debug/pprof/", for a resulting URL of: "/endpoint-prefix/debug/pprof/".

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Prefix defines a URL prefix added before "/debug/pprof".
// Note that it should start with (but not end with) a slash.
// Example: "/federated-fiber"
//
// Optional. Default: ""
Prefix string
}

Default Config

var ConfigDefault = Config{
Next: nil,
}
+ + \ No newline at end of file diff --git a/next/api/middleware/proxy/index.html b/next/api/middleware/proxy/index.html index 4ef04000845..812257bd547 100644 --- a/next/api/middleware/proxy/index.html +++ b/next/api/middleware/proxy/index.html @@ -6,13 +6,13 @@ Proxy | Fiber - - + +
-
Version: Next

Proxy

Proxy middleware for Fiber that allows you to proxy requests to multiple servers.

Signatures

// Balancer create a load balancer among multiple upstrem servers.
func Balancer(config Config) fiber.Handler
// Forward performs the given http request and fills the given http response.
func Forward(addr string, clients ...*fasthttp.Client) fiber.Handler
// Do performs the given http request and fills the given http response.
func Do(c *fiber.Ctx, addr string, clients ...*fasthttp.Client) error
// DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects.
func DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error
// DoDeadline performs the given request and waits for response until the given deadline.
func DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error
// DoTimeout performs the given request and waits for response during the given timeout duration.
func DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error
// DomainForward the given http request based on the given domain and fills the given http response
func DomainForward(hostname string, addr string, clients ...*fasthttp.Client) fiber.Handler
// BalancerForward performs the given http request based round robin balancer and fills the given http response
func BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/proxy"
)

After you initiate your Fiber app, you can use the following possibilities:

// if target https site uses a self-signed certificate, you should
// call WithTlsConfig before Do and Forward
proxy.WithTlsConfig(&tls.Config{
InsecureSkipVerify: true,
})
// if you need to use global self-custom client, you should use proxy.WithClient.
proxy.WithClient(&fasthttp.Client{
NoDefaultUserAgentHeader: true,
DisablePathNormalizing: true,
})

// Forward to url
app.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif"))

// If you want to forward with a specific domain. You have to use proxy.DomainForward.
app.Get("/payments", proxy.DomainForward("docs.gofiber.io", "http://localhost:8000"))

// Forward to url with local custom client
app.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif", &fasthttp.Client{
NoDefaultUserAgentHeader: true,
DisablePathNormalizing: true,
}))

// Make request within handler
app.Get("/:id", func(c *fiber.Ctx) error {
url := "https://i.imgur.com/"+c.Params("id")+".gif"
if err := proxy.Do(c, url); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests while following redirects
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoRedirects(c, "http://google.com", 3); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests and wait up to 5 seconds before timing out
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoTimeout(c, "http://localhost:3000", time.Second * 5); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests, timeout a minute from now
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoDeadline(c, "http://localhost", time.Now().Add(time.Minute)); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Minimal round robin balancer
app.Use(proxy.Balancer(proxy.Config{
Servers: []string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
},
}))

// Or extend your balancer for customization
app.Use(proxy.Balancer(proxy.Config{
Servers: []string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
},
ModifyRequest: func(c *fiber.Ctx) error {
c.Request().Header.Add("X-Real-IP", c.IP())
return nil
},
ModifyResponse: func(c *fiber.Ctx) error {
c.Response().Header.Del(fiber.HeaderServer)
return nil
},
}))

// Or this way if the balancer is using https and the destination server is only using http.
app.Use(proxy.BalancerForward([]string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Servers defines a list of <scheme>://<host> HTTP servers,
//
// which are used in a round-robin manner.
// i.e.: "https://foobar.com, http://www.foobar.com"
//
// Required
Servers []string

// ModifyRequest allows you to alter the request
//
// Optional. Default: nil
ModifyRequest fiber.Handler

// ModifyResponse allows you to alter the response
//
// Optional. Default: nil
ModifyResponse fiber.Handler

// Timeout is the request timeout used when calling the proxy client
//
// Optional. Default: 1 second
Timeout time.Duration

// Per-connection buffer size for requests' reading.
// This also limits the maximum header size.
// Increase this buffer if your clients send multi-KB RequestURIs
// and/or multi-KB headers (for example, BIG cookies).
ReadBufferSize int

// Per-connection buffer size for responses' writing.
WriteBufferSize int

// tls config for the http client.
TlsConfig *tls.Config

// Client is custom client when client config is complex.
// Note that Servers, Timeout, WriteBufferSize, ReadBufferSize and TlsConfig
// will not be used if the client are set.
Client *fasthttp.LBClient
}

Default Config

var ConfigDefault = Config{
Next: nil,
ModifyRequest: nil,
ModifyResponse: nil,
Timeout: fasthttp.DefaultLBClientTimeout,
}
- - +
Version: Next

Proxy

Proxy middleware for Fiber that allows you to proxy requests to multiple servers.

Signatures

// Balancer create a load balancer among multiple upstrem servers.
func Balancer(config Config) fiber.Handler
// Forward performs the given http request and fills the given http response.
func Forward(addr string, clients ...*fasthttp.Client) fiber.Handler
// Do performs the given http request and fills the given http response.
func Do(c *fiber.Ctx, addr string, clients ...*fasthttp.Client) error
// DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects.
func DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error
// DoDeadline performs the given request and waits for response until the given deadline.
func DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error
// DoTimeout performs the given request and waits for response during the given timeout duration.
func DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error
// DomainForward the given http request based on the given domain and fills the given http response
func DomainForward(hostname string, addr string, clients ...*fasthttp.Client) fiber.Handler
// BalancerForward performs the given http request based round robin balancer and fills the given http response
func BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/proxy"
)

After you initiate your Fiber app, you can use the following possibilities:

// if target https site uses a self-signed certificate, you should
// call WithTlsConfig before Do and Forward
proxy.WithTlsConfig(&tls.Config{
InsecureSkipVerify: true,
})
// if you need to use global self-custom client, you should use proxy.WithClient.
proxy.WithClient(&fasthttp.Client{
NoDefaultUserAgentHeader: true,
DisablePathNormalizing: true,
})

// Forward to url
app.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif"))

// If you want to forward with a specific domain. You have to use proxy.DomainForward.
app.Get("/payments", proxy.DomainForward("docs.gofiber.io", "http://localhost:8000"))

// Forward to url with local custom client
app.Get("/gif", proxy.Forward("https://i.imgur.com/IWaBepg.gif", &fasthttp.Client{
NoDefaultUserAgentHeader: true,
DisablePathNormalizing: true,
}))

// Make request within handler
app.Get("/:id", func(c *fiber.Ctx) error {
url := "https://i.imgur.com/"+c.Params("id")+".gif"
if err := proxy.Do(c, url); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests while following redirects
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoRedirects(c, "http://google.com", 3); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests and wait up to 5 seconds before timing out
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoTimeout(c, "http://localhost:3000", time.Second * 5); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Make proxy requests, timeout a minute from now
app.Get("/proxy", func(c *fiber.Ctx) error {
if err := proxy.DoDeadline(c, "http://localhost", time.Now().Add(time.Minute)); err != nil {
return err
}
// Remove Server header from response
c.Response().Header.Del(fiber.HeaderServer)
return nil
})

// Minimal round robin balancer
app.Use(proxy.Balancer(proxy.Config{
Servers: []string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
},
}))

// Or extend your balancer for customization
app.Use(proxy.Balancer(proxy.Config{
Servers: []string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
},
ModifyRequest: func(c *fiber.Ctx) error {
c.Request().Header.Add("X-Real-IP", c.IP())
return nil
},
ModifyResponse: func(c *fiber.Ctx) error {
c.Response().Header.Del(fiber.HeaderServer)
return nil
},
}))

// Or this way if the balancer is using https and the destination server is only using http.
app.Use(proxy.BalancerForward([]string{
"http://localhost:3001",
"http://localhost:3002",
"http://localhost:3003",
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Servers defines a list of <scheme>://<host> HTTP servers,
//
// which are used in a round-robin manner.
// i.e.: "https://foobar.com, http://www.foobar.com"
//
// Required
Servers []string

// ModifyRequest allows you to alter the request
//
// Optional. Default: nil
ModifyRequest fiber.Handler

// ModifyResponse allows you to alter the response
//
// Optional. Default: nil
ModifyResponse fiber.Handler

// Timeout is the request timeout used when calling the proxy client
//
// Optional. Default: 1 second
Timeout time.Duration

// Per-connection buffer size for requests' reading.
// This also limits the maximum header size.
// Increase this buffer if your clients send multi-KB RequestURIs
// and/or multi-KB headers (for example, BIG cookies).
ReadBufferSize int

// Per-connection buffer size for responses' writing.
WriteBufferSize int

// tls config for the http client.
TlsConfig *tls.Config

// Client is custom client when client config is complex.
// Note that Servers, Timeout, WriteBufferSize, ReadBufferSize and TlsConfig
// will not be used if the client are set.
Client *fasthttp.LBClient
}

Default Config

var ConfigDefault = Config{
Next: nil,
ModifyRequest: nil,
ModifyResponse: nil,
Timeout: fasthttp.DefaultLBClientTimeout,
}
+ + \ No newline at end of file diff --git a/next/api/middleware/recover/index.html b/next/api/middleware/recover/index.html index 0ab2e94a984..e3efe189ac9 100644 --- a/next/api/middleware/recover/index.html +++ b/next/api/middleware/recover/index.html @@ -6,13 +6,13 @@ Recover | Fiber - - + +
-
Version: Next

Recover

Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/recover"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(recover.New())

// This panic will be caught by the middleware
app.Get("/", func(c *fiber.Ctx) error {
panic("I'm an error")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// EnableStackTrace enables handling stack trace
//
// Optional. Default: false
EnableStackTrace bool

// StackTraceHandler defines a function to handle stack trace
//
// Optional. Default: defaultStackTraceHandler
StackTraceHandler func(c *fiber.Ctx, e interface{})
}

Default Config

var ConfigDefault = Config{
Next: nil,
EnableStackTrace: false,
StackTraceHandler: defaultStackTraceHandler,
}
- - +
Version: Next

Recover

Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/recover"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(recover.New())

// This panic will be caught by the middleware
app.Get("/", func(c *fiber.Ctx) error {
panic("I'm an error")
})

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// EnableStackTrace enables handling stack trace
//
// Optional. Default: false
EnableStackTrace bool

// StackTraceHandler defines a function to handle stack trace
//
// Optional. Default: defaultStackTraceHandler
StackTraceHandler func(c *fiber.Ctx, e interface{})
}

Default Config

var ConfigDefault = Config{
Next: nil,
EnableStackTrace: false,
StackTraceHandler: defaultStackTraceHandler,
}
+ + \ No newline at end of file diff --git a/next/api/middleware/redirect/index.html b/next/api/middleware/redirect/index.html index cc91836b27e..9ffbd2b3a2c 100644 --- a/next/api/middleware/redirect/index.html +++ b/next/api/middleware/redirect/index.html @@ -6,13 +6,13 @@ Redirect | Fiber - - + +
-
Version: Next

Redirect

Redirection middleware for Fiber.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/redirect"
)

func main() {
app := fiber.New()

app.Use(redirect.New(redirect.Config{
Rules: map[string]string{
"/old": "/new",
"/old/*": "/new/$1",
},
StatusCode: 301,
}))

app.Get("/new", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
app.Get("/new/*", func(c *fiber.Ctx) error {
return c.SendString("Wildcard: " + c.Params("*"))
})

app.Listen(":3000")
}

Test:

curl http://localhost:3000/old
curl http://localhost:3000/old/hello

Config

// Config defines the config for middleware.
type Config struct {
// Filter defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// Rules defines the URL path rewrite rules. The values captured in asterisk can be
// retrieved by index e.g. $1, $2 and so on.
// Required. Example:
// "/old": "/new",
// "/api/*": "/$1",
// "/js/*": "/public/javascripts/$1",
// "/users/*/orders/*": "/user/$1/order/$2",
Rules map[string]string

// The status code when redirecting
// This is ignored if Redirect is disabled
// Optional. Default: 302 (fiber.StatusFound)
StatusCode int

rulesRegex map[*regexp.Regexp]string
}

Default Config

var ConfigDefault = Config{
StatusCode: fiber.StatusFound,
}
- - +
Version: Next

Redirect

Redirection middleware for Fiber.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/redirect"
)

func main() {
app := fiber.New()

app.Use(redirect.New(redirect.Config{
Rules: map[string]string{
"/old": "/new",
"/old/*": "/new/$1",
},
StatusCode: 301,
}))

app.Get("/new", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
app.Get("/new/*", func(c *fiber.Ctx) error {
return c.SendString("Wildcard: " + c.Params("*"))
})

app.Listen(":3000")
}

Test:

curl http://localhost:3000/old
curl http://localhost:3000/old/hello

Config

// Config defines the config for middleware.
type Config struct {
// Filter defines a function to skip middleware.
// Optional. Default: nil
Next func(*fiber.Ctx) bool

// Rules defines the URL path rewrite rules. The values captured in asterisk can be
// retrieved by index e.g. $1, $2 and so on.
// Required. Example:
// "/old": "/new",
// "/api/*": "/$1",
// "/js/*": "/public/javascripts/$1",
// "/users/*/orders/*": "/user/$1/order/$2",
Rules map[string]string

// The status code when redirecting
// This is ignored if Redirect is disabled
// Optional. Default: 302 (fiber.StatusFound)
StatusCode int

rulesRegex map[*regexp.Regexp]string
}

Default Config

var ConfigDefault = Config{
StatusCode: fiber.StatusFound,
}
+ + \ No newline at end of file diff --git a/next/api/middleware/requestid/index.html b/next/api/middleware/requestid/index.html index b521b88dd12..a8aa90fec3b 100644 --- a/next/api/middleware/requestid/index.html +++ b/next/api/middleware/requestid/index.html @@ -6,15 +6,15 @@ RequestID | Fiber - - + +
Version: Next

RequestID

RequestID middleware for Fiber that adds an indentifier to the response.

Signatures

func New(config ...Config) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/requestid"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
app.Use(requestid.New())

// Or extend your config for customization
app.Use(requestid.New(requestid.Config{
Header: "X-Custom-Header",
Generator: func() string {
return "static-id"
},
}))

Config

// Config defines the config for middleware.
type Config struct {
// Next defines a function to skip this middleware when returned true.
//
// Optional. Default: nil
Next func(c *fiber.Ctx) bool

// Header is the header key where to get/set the unique request ID
//
// Optional. Default: "X-Request-ID"
Header string

// Generator defines a function to generate the unique identifier.
//
// Optional. Default: utils.UUID
Generator func() string

// ContextKey defines the key used when storing the request ID in
// the locals for a specific request.
//
// Optional. Default: requestid
ContextKey interface{}
}

Default Config

The default config uses a fast UUID generator which will expose the number of requests made to the server. To conceal this value for better privacy, use the -utils.UUIDv4 generator.

var ConfigDefault = Config{
Next: nil,
Header: fiber.HeaderXRequestID,
Generator: utils.UUID,
ContextKey: "requestid",
}
- - +utils.UUIDv4 generator.

var ConfigDefault = Config{
Next: nil,
Header: fiber.HeaderXRequestID,
Generator: utils.UUID,
ContextKey: "requestid",
}
+ + \ No newline at end of file diff --git a/next/api/middleware/rewrite/index.html b/next/api/middleware/rewrite/index.html index 66a2f24c177..4e5181bf7a2 100644 --- a/next/api/middleware/rewrite/index.html +++ b/next/api/middleware/rewrite/index.html @@ -6,13 +6,13 @@ Rewrite | Fiber - - + +
-
Version: Next

Rewrite

Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/rewrite"
)

func main() {
app := fiber.New()

app.Use(rewrite.New(rewrite.Config{
Rules: map[string]string{
"/old": "/new",
"/old/*": "/new/$1",
},
}))

app.Get("/new", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
app.Get("/new/*", func(c *fiber.Ctx) error {
return c.SendString("Wildcard: " + c.Params("*"))
})

app.Listen(":3000")
}

Test:

curl http://localhost:3000/old
curl http://localhost:3000/old/hello
- - +
Version: Next

Rewrite

Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.

Signatures

func New(config ...Config) fiber.Handler

Examples

package main

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/rewrite"
)

func main() {
app := fiber.New()

app.Use(rewrite.New(rewrite.Config{
Rules: map[string]string{
"/old": "/new",
"/old/*": "/new/$1",
},
}))

app.Get("/new", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
app.Get("/new/*", func(c *fiber.Ctx) error {
return c.SendString("Wildcard: " + c.Params("*"))
})

app.Listen(":3000")
}

Test:

curl http://localhost:3000/old
curl http://localhost:3000/old/hello
+ + \ No newline at end of file diff --git a/next/api/middleware/session/index.html b/next/api/middleware/session/index.html index aeecfa58198..a9c47ac59c4 100644 --- a/next/api/middleware/session/index.html +++ b/next/api/middleware/session/index.html @@ -6,13 +6,13 @@ Session | Fiber - - + +
-
Version: Next

Session

Session middleware for Fiber.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

Signatures

func New(config ...Config) *Store
func (s *Store) RegisterType(i interface{})
func (s *Store) Get(c *fiber.Ctx) (*Session, error)
func (s *Store) Reset() error

func (s *Session) Get(key string) interface{}
func (s *Session) Set(key string, val interface{})
func (s *Session) Delete(key string)
func (s *Session) Destroy() error
func (s *Session) Regenerate() error
func (s *Session) Save() error
func (s *Session) Fresh() bool
func (s *Session) ID() string
func (s *Session) Keys() []string
caution

Storing interface{} values are limited to built-ins Go types.

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/session"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
// This stores all of your app's sessions
store := session.New()

app.Get("/", func(c *fiber.Ctx) error {
// Get session from storage
sess, err := store.Get(c)
if err != nil {
panic(err)
}

// Get value
name := sess.Get("name")

// Set key/value
sess.Set("name", "john")

// Get all Keys
keys := sess.Keys()

// Delete key
sess.Delete("name")

// Destroy session
if err := sess.Destroy(); err != nil {
panic(err)
}

// Sets a specific expiration for this session
sess.SetExpiry(time.Second * 2)

// Save session
if err := sess.Save(); err != nil {
panic(err)
}

return c.SendString(fmt.Sprintf("Welcome %v", name))
})

Config

// Config defines the config for middleware.
type Config struct {
// Allowed session duration
// Optional. Default value 24 * time.Hour
Expiration time.Duration

// Storage interface to store the session data
// Optional. Default value memory.New()
Storage fiber.Storage

// KeyLookup is a string in the form of "<source>:<name>" that is used
// to extract session id from the request.
// Possible values: "header:<name>", "query:<name>" or "cookie:<name>"
// Optional. Default value "cookie:session_id".
KeyLookup string

// Domain of the CSRF cookie.
// Optional. Default value "".
CookieDomain string

// Path of the CSRF cookie.
// Optional. Default value "".
CookiePath string

// Indicates if CSRF cookie is secure.
// Optional. Default value false.
CookieSecure bool

// Indicates if CSRF cookie is HTTP only.
// Optional. Default value false.
CookieHTTPOnly bool

// Value of SameSite cookie.
// Optional. Default value "Lax".
CookieSameSite string

// Decides whether cookie should last for only the browser sesison.
// Ignores Expiration if set to true
// Optional. Default value false.
CookieSessionOnly bool

// KeyGenerator generates the session key.
// Optional. Default value utils.UUIDv4
KeyGenerator func() string

// Deprecated: Please use KeyLookup
CookieName string

// Source defines where to obtain the session id
source Source

// The session name
sessionName string
}

Default Config

var ConfigDefault = Config{
Expiration: 24 * time.Hour,
KeyLookup: "cookie:session_id",
KeyGenerator: utils.UUIDv4,
source: "cookie",
sessionName: "session_id",
}

Constants

const (
SourceCookie Source = "cookie"
SourceHeader Source = "header"
SourceURLQuery Source = "query"
)

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
store := session.New(session.Config{
Storage: storage,
})

To use the store, see the Examples.

- - +
Version: Next

Session

Session middleware for Fiber.

note

This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.

Signatures

func New(config ...Config) *Store
func (s *Store) RegisterType(i interface{})
func (s *Store) Get(c *fiber.Ctx) (*Session, error)
func (s *Store) Reset() error

func (s *Session) Get(key string) interface{}
func (s *Session) Set(key string, val interface{})
func (s *Session) Delete(key string)
func (s *Session) Destroy() error
func (s *Session) Regenerate() error
func (s *Session) Save() error
func (s *Session) Fresh() bool
func (s *Session) ID() string
func (s *Session) Keys() []string
caution

Storing interface{} values are limited to built-ins Go types.

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/session"
)

After you initiate your Fiber app, you can use the following possibilities:

// Initialize default config
// This stores all of your app's sessions
store := session.New()

app.Get("/", func(c *fiber.Ctx) error {
// Get session from storage
sess, err := store.Get(c)
if err != nil {
panic(err)
}

// Get value
name := sess.Get("name")

// Set key/value
sess.Set("name", "john")

// Get all Keys
keys := sess.Keys()

// Delete key
sess.Delete("name")

// Destroy session
if err := sess.Destroy(); err != nil {
panic(err)
}

// Sets a specific expiration for this session
sess.SetExpiry(time.Second * 2)

// Save session
if err := sess.Save(); err != nil {
panic(err)
}

return c.SendString(fmt.Sprintf("Welcome %v", name))
})

Config

// Config defines the config for middleware.
type Config struct {
// Allowed session duration
// Optional. Default value 24 * time.Hour
Expiration time.Duration

// Storage interface to store the session data
// Optional. Default value memory.New()
Storage fiber.Storage

// KeyLookup is a string in the form of "<source>:<name>" that is used
// to extract session id from the request.
// Possible values: "header:<name>", "query:<name>" or "cookie:<name>"
// Optional. Default value "cookie:session_id".
KeyLookup string

// Domain of the CSRF cookie.
// Optional. Default value "".
CookieDomain string

// Path of the CSRF cookie.
// Optional. Default value "".
CookiePath string

// Indicates if CSRF cookie is secure.
// Optional. Default value false.
CookieSecure bool

// Indicates if CSRF cookie is HTTP only.
// Optional. Default value false.
CookieHTTPOnly bool

// Value of SameSite cookie.
// Optional. Default value "Lax".
CookieSameSite string

// Decides whether cookie should last for only the browser sesison.
// Ignores Expiration if set to true
// Optional. Default value false.
CookieSessionOnly bool

// KeyGenerator generates the session key.
// Optional. Default value utils.UUIDv4
KeyGenerator func() string

// Deprecated: Please use KeyLookup
CookieName string

// Source defines where to obtain the session id
source Source

// The session name
sessionName string
}

Default Config

var ConfigDefault = Config{
Expiration: 24 * time.Hour,
KeyLookup: "cookie:session_id",
KeyGenerator: utils.UUIDv4,
source: "cookie",
sessionName: "session_id",
}

Constants

const (
SourceCookie Source = "cookie"
SourceHeader Source = "header"
SourceURLQuery Source = "query"
)

Custom Storage/Database

You can use any storage from our storage package.

storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3
store := session.New(session.Config{
Storage: storage,
})

To use the store, see the Examples.

+ + \ No newline at end of file diff --git a/next/api/middleware/skip/index.html b/next/api/middleware/skip/index.html index a79912a507d..990c9dae4d5 100644 --- a/next/api/middleware/skip/index.html +++ b/next/api/middleware/skip/index.html @@ -6,13 +6,13 @@ Skip | Fiber - - + +
-
Version: Next

Skip

Skip middleware for Fiber that skips a wrapped handler if a predicate is true.

Signatures

func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/skip"
)

After you initiate your Fiber app, you can use the following possibilities:

func main() {
app := fiber.New()

app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool {
return ctx.Method() == fiber.MethodGet
}))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendString("It was a GET request!")
})

log.Fatal(app.Listen(":3000"))
}

func BasicHandler(ctx *fiber.Ctx) error {
return ctx.SendString("It was not a GET request!")
}
tip

app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.

- - +
Version: Next

Skip

Skip middleware for Fiber that skips a wrapped handler if a predicate is true.

Signatures

func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/skip"
)

After you initiate your Fiber app, you can use the following possibilities:

func main() {
app := fiber.New()

app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool {
return ctx.Method() == fiber.MethodGet
}))

app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendString("It was a GET request!")
})

log.Fatal(app.Listen(":3000"))
}

func BasicHandler(ctx *fiber.Ctx) error {
return ctx.SendString("It was not a GET request!")
}
tip

app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.

+ + \ No newline at end of file diff --git a/next/api/middleware/timeout/index.html b/next/api/middleware/timeout/index.html index 20069607fd2..1d8e00c73f1 100644 --- a/next/api/middleware/timeout/index.html +++ b/next/api/middleware/timeout/index.html @@ -6,13 +6,13 @@ Timeout | Fiber - - + +
-
Version: Next

Timeout

There exist two distinct implementations of timeout middleware Fiber.

New

Wraps a fiber.Handler with a timeout. If the handler takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler.

caution

This has been deprecated since it raises race conditions.

NewWithContext

As a fiber.Handler wrapper, it creates a context with context.WithTimeout and pass it in UserContext.

If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler.

It does not cancel long running executions. Underlying executions must handle timeout by using context.Context parameter.

Signatures

func New(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler
func NewWithContext(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/timeout"
)

After you initiate your Fiber app, you can use the following possibilities:

func main() {
app := fiber.New()

h := func(c *fiber.Ctx) error {
sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")
if err := sleepWithContext(c.UserContext(), sleepTime); err != nil {
return fmt.Errorf("%w: execution error", err)
}
return nil
}

app.Get("/foo/:sleepTime", timeout.New(h, 2*time.Second))
log.Fatal(app.Listen(":3000"))
}

func sleepWithContext(ctx context.Context, d time.Duration) error {
timer := time.NewTimer(d)

select {
case <-ctx.Done():
if !timer.Stop() {
<-timer.C
}
return context.DeadlineExceeded
case <-timer.C:
}
return nil
}

Test http 200 with curl:

curl --location -I --request GET 'http://localhost:3000/foo/1000' 

Test http 408 with curl:

curl --location -I --request GET 'http://localhost:3000/foo/3000' 

Use with custom error:

var ErrFooTimeOut = errors.New("foo context canceled")

func main() {
app := fiber.New()
h := func(c *fiber.Ctx) error {
sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")
if err := sleepWithContextWithCustomError(c.UserContext(), sleepTime); err != nil {
return fmt.Errorf("%w: execution error", err)
}
return nil
}

app.Get("/foo/:sleepTime", timeout.NewWithContext(h, 2*time.Second, ErrFooTimeOut))
log.Fatal(app.Listen(":3000"))
}

func sleepWithContextWithCustomError(ctx context.Context, d time.Duration) error {
timer := time.NewTimer(d)
select {
case <-ctx.Done():
if !timer.Stop() {
<-timer.C
}
return ErrFooTimeOut
case <-timer.C:
}
return nil
}

Sample usage with a DB call:

func main() {
app := fiber.New()
db, _ := gorm.Open(postgres.Open("postgres://localhost/foodb"), &gorm.Config{})

handler := func(ctx *fiber.Ctx) error {
tran := db.WithContext(ctx.UserContext()).Begin()

if tran = tran.Exec("SELECT pg_sleep(50)"); tran.Error != nil {
return tran.Error
}

if tran = tran.Commit(); tran.Error != nil {
return tran.Error
}

return nil
}

app.Get("/foo", timeout.NewWithContext(handler, 10*time.Second))
log.Fatal(app.Listen(":3000"))
}
- - +
Version: Next

Timeout

There exist two distinct implementations of timeout middleware Fiber.

New

Wraps a fiber.Handler with a timeout. If the handler takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler.

caution

This has been deprecated since it raises race conditions.

NewWithContext

As a fiber.Handler wrapper, it creates a context with context.WithTimeout and pass it in UserContext.

If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler.

It does not cancel long running executions. Underlying executions must handle timeout by using context.Context parameter.

Signatures

func New(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler
func NewWithContext(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/timeout"
)

After you initiate your Fiber app, you can use the following possibilities:

func main() {
app := fiber.New()

h := func(c *fiber.Ctx) error {
sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")
if err := sleepWithContext(c.UserContext(), sleepTime); err != nil {
return fmt.Errorf("%w: execution error", err)
}
return nil
}

app.Get("/foo/:sleepTime", timeout.New(h, 2*time.Second))
log.Fatal(app.Listen(":3000"))
}

func sleepWithContext(ctx context.Context, d time.Duration) error {
timer := time.NewTimer(d)

select {
case <-ctx.Done():
if !timer.Stop() {
<-timer.C
}
return context.DeadlineExceeded
case <-timer.C:
}
return nil
}

Test http 200 with curl:

curl --location -I --request GET 'http://localhost:3000/foo/1000' 

Test http 408 with curl:

curl --location -I --request GET 'http://localhost:3000/foo/3000' 

Use with custom error:

var ErrFooTimeOut = errors.New("foo context canceled")

func main() {
app := fiber.New()
h := func(c *fiber.Ctx) error {
sleepTime, _ := time.ParseDuration(c.Params("sleepTime") + "ms")
if err := sleepWithContextWithCustomError(c.UserContext(), sleepTime); err != nil {
return fmt.Errorf("%w: execution error", err)
}
return nil
}

app.Get("/foo/:sleepTime", timeout.NewWithContext(h, 2*time.Second, ErrFooTimeOut))
log.Fatal(app.Listen(":3000"))
}

func sleepWithContextWithCustomError(ctx context.Context, d time.Duration) error {
timer := time.NewTimer(d)
select {
case <-ctx.Done():
if !timer.Stop() {
<-timer.C
}
return ErrFooTimeOut
case <-timer.C:
}
return nil
}

Sample usage with a DB call:

func main() {
app := fiber.New()
db, _ := gorm.Open(postgres.Open("postgres://localhost/foodb"), &gorm.Config{})

handler := func(ctx *fiber.Ctx) error {
tran := db.WithContext(ctx.UserContext()).Begin()

if tran = tran.Exec("SELECT pg_sleep(50)"); tran.Error != nil {
return tran.Error
}

if tran = tran.Commit(); tran.Error != nil {
return tran.Error
}

return nil
}

app.Get("/foo", timeout.NewWithContext(handler, 10*time.Second))
log.Fatal(app.Listen(":3000"))
}
+ + \ No newline at end of file diff --git a/next/category/-middleware/index.html b/next/category/-middleware/index.html index 1138117c414..fba234f72aa 100644 --- a/next/category/-middleware/index.html +++ b/next/category/-middleware/index.html @@ -6,13 +6,13 @@ 🧬 Middleware | Fiber - - + +
Version: Next

🧬 Middleware

Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.

- - + + \ No newline at end of file diff --git a/next/category/api/index.html b/next/category/api/index.html index 5ec2c737567..3dd22b83e40 100644 --- a/next/category/api/index.html +++ b/next/category/api/index.html @@ -6,13 +6,13 @@ API | Fiber - - + + - - + + \ No newline at end of file diff --git a/next/category/extra/index.html b/next/category/extra/index.html index 27ac0ea56be..5a20edf609f 100644 --- a/next/category/extra/index.html +++ b/next/category/extra/index.html @@ -6,13 +6,13 @@ Extra | Fiber - - + + - - + + \ No newline at end of file diff --git a/next/category/guide/index.html b/next/category/guide/index.html index daeec9f3365..1373a5c9c3b 100644 --- a/next/category/guide/index.html +++ b/next/category/guide/index.html @@ -6,13 +6,13 @@ Guide | Fiber - - + +
- - + + \ No newline at end of file diff --git a/next/extra/benchmarks/index.html b/next/extra/benchmarks/index.html index 0abf5eff88f..810d5fd9fc8 100644 --- a/next/extra/benchmarks/index.html +++ b/next/extra/benchmarks/index.html @@ -6,8 +6,8 @@ 📊 Benchmarks | Fiber - - + +
@@ -16,8 +16,8 @@ Express handled 2,066 responses per second with an average latency of 390.44 ms.

Fiber vs Express

Multiple Queries

Fiber handled 19,664 responses per second with an average latency of 25.7 ms.
Express handled 4,302 responses per second with an average latency of 117.2 ms.

Fiber vs Express

Single Query

Fiber handled 368,647 responses per second with an average latency of 0.7 ms.
Express handled 57,880 responses per second with an average latency of 4.4 ms.

Fiber vs Express

JSON Serialization

Fiber handled 1,146,667 responses per second with an average latency of 0.4 ms.
-Express handled 244,847 responses per second with an average latency of 1.1 ms.

Fiber vs Express

Go web framework benchmark

🔗 https://github.com/smallnest/go-web-framework-benchmark

  • CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
  • MEM 4GB
  • GO go1.13.6 linux/amd64
  • OS Linux

The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers.

The concurrency clients are 5000.

Latency is the time of real processing time by web servers. The smaller is the better.

Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better.

If we enable http pipelining, test result as below:

Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is:

If we enable http pipelining, test result as below:

Dependency graph for v1.9.0

- - +Express handled 244,847 responses per second with an average latency of 1.1 ms.

Fiber vs Express

Go web framework benchmark

🔗 https://github.com/smallnest/go-web-framework-benchmark

  • CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
  • MEM 4GB
  • GO go1.13.6 linux/amd64
  • OS Linux

The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers.

The concurrency clients are 5000.

Latency is the time of real processing time by web servers. The smaller is the better.

Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better.

If we enable http pipelining, test result as below:

Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is:

If we enable http pipelining, test result as below:

Dependency graph for v1.9.0

+ + \ No newline at end of file diff --git a/next/extra/faq/index.html b/next/extra/faq/index.html index a99a7954c4a..471ba978fba 100644 --- a/next/extra/faq/index.html +++ b/next/extra/faq/index.html @@ -6,15 +6,15 @@ 🤔 FAQ | Fiber - - + +
Version: Next

🤔 FAQ

How should I structure my application?

There is no definitive answer to this question. The answer depends on the scale of your application and the team that is involved. To be as flexible as possible, Fiber makes no assumptions in terms of structure.

Routes and other application-specific logic can live in as many files as you wish, in any directory structure you prefer. View the following examples for inspiration:

How do I handle custom 404 responses?

If you're using v2.32.0 or later, all you need to do is to implement a custom error handler. See below, or see a more detailed explanation at Error Handling.

If you're using v2.31.0 or earlier, the error handler will not capture 404 errors. Instead, you need to add a middleware function at the very bottom of the stack (below all other functions) to handle a 404 response:

Example
app.Use(func(c *fiber.Ctx) error {
return c.Status(fiber.StatusNotFound).SendString("Sorry can't find that!")
})

How can i use live reload ?

Air is a handy tool that automatically restarts your Go applications whenever the source code changes, making your development process faster and more efficient.

To use Air in a Fiber project, follow these steps:

  1. Install Air by downloading the appropriate binary for your operating system from the GitHub release page or by building the tool directly from source.
  2. Create a configuration file for Air in your project directory. This file can be named, for example, .air.toml or air.conf. Here's a sample configuration file that works with Fiber:
# .air.toml
root = "."
tmp_dir = "tmp"
[build]
cmd = "go build -o ./tmp/main ."
bin = "./tmp/main"
delay = 1000 # ms
exclude_dir = ["assets", "tmp", "vendor"]
include_ext = ["go", "tpl", "tmpl", "html"]
exclude_regex = ["_test\\.go"]
  1. Start your Fiber application using Air by running the following command in the terminal:
air

As you make changes to your source code, Air will detect them and automatically restart the application.

A complete example demonstrating the use of Air with Fiber can be found in the Fiber Recipes repository. This example shows how to configure and use Air in a Fiber project to create an efficient development environment.

How do I set up an error handler?

To override the default error handler, you can override the default when providing a Config when initiating a new Fiber instance.

Example
app := fiber.New(fiber.Config{
ErrorHandler: func(c *fiber.Ctx, err error) error {
return c.Status(fiber.StatusInternalServerError).SendString(err.Error())
},
})

We have a dedicated page explaining how error handling works in Fiber, see Error Handling.

Which template engines does Fiber support?

Fiber currently supports 9 template engines in our gofiber/template middleware:

To learn more about using Templates in Fiber, see Templates.

Does Fiber have a community chat?

Yes, we have our own Discord server, where we hang out. We have different rooms for every subject.
If you have questions or just want to have a chat, feel free to join us via this > invite link <.

Does fiber support sub domain routing ?

Yes we do, here are some examples: -This example works v2

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/logger"
)

type Host struct {
Fiber *fiber.App
}

func main() {
// Hosts
hosts := map[string]*Host{}
//-----
// API
//-----
api := fiber.New()
api.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))
hosts["api.localhost:3000"] = &Host{api}
api.Get("/", func(c *fiber.Ctx) error {
return c.SendString("API")
})
//------
// Blog
//------
blog := fiber.New()
blog.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))
hosts["blog.localhost:3000"] = &Host{blog}
blog.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Blog")
})
//---------
// Website
//---------
site := fiber.New()
site.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))

hosts["localhost:3000"] = &Host{site}
site.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Website")
})
// Server
app := fiber.New()
app.Use(func(c *fiber.Ctx) error {
host := hosts[c.Hostname()]
if host == nil {
return c.SendStatus(fiber.StatusNotFound)
} else {
host.Fiber.Handler()(c.Context())
return nil
}
})
log.Fatal(app.Listen(":3000"))
}

If more information is needed, please refer to this issue #750

- - +This example works v2

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/logger"
)

type Host struct {
Fiber *fiber.App
}

func main() {
// Hosts
hosts := map[string]*Host{}
//-----
// API
//-----
api := fiber.New()
api.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))
hosts["api.localhost:3000"] = &Host{api}
api.Get("/", func(c *fiber.Ctx) error {
return c.SendString("API")
})
//------
// Blog
//------
blog := fiber.New()
blog.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))
hosts["blog.localhost:3000"] = &Host{blog}
blog.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Blog")
})
//---------
// Website
//---------
site := fiber.New()
site.Use(logger.New(logger.Config{
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))

hosts["localhost:3000"] = &Host{site}
site.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Website")
})
// Server
app := fiber.New()
app.Use(func(c *fiber.Ctx) error {
host := hosts[c.Hostname()]
if host == nil {
return c.SendStatus(fiber.StatusNotFound)
} else {
host.Fiber.Handler()(c.Context())
return nil
}
})
log.Fatal(app.Listen(":3000"))
}

If more information is needed, please refer to this issue #750

+ + \ No newline at end of file diff --git a/next/guide/error-handling/index.html b/next/guide/error-handling/index.html index c501ce8a4e6..16dffad4c4e 100644 --- a/next/guide/error-handling/index.html +++ b/next/guide/error-handling/index.html @@ -6,13 +6,13 @@ 🐛 Error Handling | Fiber - - + +
-
Version: Next

🐛 Error Handling

Catching Errors

It’s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them.

app.Get("/", func(c *fiber.Ctx) error {
// Pass error to Fiber
return c.SendFile("file-does-not-exist")
})

Fiber does not handle panics by default. To recover from a panic thrown by any handler in the stack, you need to include the Recover middleware below:

Example
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/recover"
)

func main() {
app := fiber.New()

app.Use(recover.New())

app.Get("/", func(c *fiber.Ctx) error {
panic("This panic is caught by fiber")
})

log.Fatal(app.Listen(":3000"))
}

You could use Fiber's custom error struct to pass an additional status code using fiber.NewError(). It's optional to pass a message; if this is left empty, it will default to the status code message (404 equals Not Found).

Example
app.Get("/", func(c *fiber.Ctx) error {
// 503 Service Unavailable
return fiber.ErrServiceUnavailable

// 503 On vacation!
return fiber.NewError(fiber.StatusServiceUnavailable, "On vacation!")
})

Default Error Handler

Fiber provides an error handler by default. For a standard error, the response is sent as 500 Internal Server Error. If the error is of type fiber.Error, the response is sent with the provided status code and message.

Example
// Default error handler
var DefaultErrorHandler = func(c *fiber.Ctx, err error) error {
// Status code defaults to 500
code := fiber.StatusInternalServerError

// Retrieve the custom status code if it's a *fiber.Error
var e *fiber.Error
if errors.As(err, &e) {
code = e.Code
}

// Set Content-Type: text/plain; charset=utf-8
c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)

// Return status code with error message
return c.Status(code).SendString(err.Error())
}

Custom Error Handler

A custom error handler can be set using a Config when initializing a Fiber instance.

In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response.

The following example shows how to display error pages for different types of errors.

Example
// Create a new fiber instance with custom config
app := fiber.New(fiber.Config{
// Override default error handler
ErrorHandler: func(ctx *fiber.Ctx, err error) error {
// Status code defaults to 500
code := fiber.StatusInternalServerError

// Retrieve the custom status code if it's a *fiber.Error
var e *fiber.Error
if errors.As(err, &e) {
code = e.Code
}

// Send custom error page
err = ctx.Status(code).SendFile(fmt.Sprintf("./%d.html", code))
if err != nil {
// In case the SendFile fails
return ctx.Status(fiber.StatusInternalServerError).SendString("Internal Server Error")
}

// Return from handler
return nil
},
})

// ...

Special thanks to the Echo & Express framework for inspiration regarding error handling.

- - +
Version: Next

🐛 Error Handling

Catching Errors

It’s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them.

app.Get("/", func(c *fiber.Ctx) error {
// Pass error to Fiber
return c.SendFile("file-does-not-exist")
})

Fiber does not handle panics by default. To recover from a panic thrown by any handler in the stack, you need to include the Recover middleware below:

Example
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/recover"
)

func main() {
app := fiber.New()

app.Use(recover.New())

app.Get("/", func(c *fiber.Ctx) error {
panic("This panic is caught by fiber")
})

log.Fatal(app.Listen(":3000"))
}

You could use Fiber's custom error struct to pass an additional status code using fiber.NewError(). It's optional to pass a message; if this is left empty, it will default to the status code message (404 equals Not Found).

Example
app.Get("/", func(c *fiber.Ctx) error {
// 503 Service Unavailable
return fiber.ErrServiceUnavailable

// 503 On vacation!
return fiber.NewError(fiber.StatusServiceUnavailable, "On vacation!")
})

Default Error Handler

Fiber provides an error handler by default. For a standard error, the response is sent as 500 Internal Server Error. If the error is of type fiber.Error, the response is sent with the provided status code and message.

Example
// Default error handler
var DefaultErrorHandler = func(c *fiber.Ctx, err error) error {
// Status code defaults to 500
code := fiber.StatusInternalServerError

// Retrieve the custom status code if it's a *fiber.Error
var e *fiber.Error
if errors.As(err, &e) {
code = e.Code
}

// Set Content-Type: text/plain; charset=utf-8
c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)

// Return status code with error message
return c.Status(code).SendString(err.Error())
}

Custom Error Handler

A custom error handler can be set using a Config when initializing a Fiber instance.

In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response.

The following example shows how to display error pages for different types of errors.

Example
// Create a new fiber instance with custom config
app := fiber.New(fiber.Config{
// Override default error handler
ErrorHandler: func(ctx *fiber.Ctx, err error) error {
// Status code defaults to 500
code := fiber.StatusInternalServerError

// Retrieve the custom status code if it's a *fiber.Error
var e *fiber.Error
if errors.As(err, &e) {
code = e.Code
}

// Send custom error page
err = ctx.Status(code).SendFile(fmt.Sprintf("./%d.html", code))
if err != nil {
// In case the SendFile fails
return ctx.Status(fiber.StatusInternalServerError).SendString("Internal Server Error")
}

// Return from handler
return nil
},
})

// ...

Special thanks to the Echo & Express framework for inspiration regarding error handling.

+ + \ No newline at end of file diff --git a/next/guide/faster-fiber/index.html b/next/guide/faster-fiber/index.html index bd491bab73c..54d734ee0c5 100644 --- a/next/guide/faster-fiber/index.html +++ b/next/guide/faster-fiber/index.html @@ -6,13 +6,13 @@ ⚡ Make Fiber Faster | Fiber - - + +
-
Version: Next

⚡ Make Fiber Faster

Custom JSON Encoder/Decoder

Since Fiber v2.32.0, we use encoding/json as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of encoding/json, we recommend you to use these libraries:

Example
package main

import "github.com/gofiber/fiber/v2"
import "github.com/goccy/go-json"

func main() {
app := fiber.New(fiber.Config{
JSONEncoder: json.Marshal,
JSONDecoder: json.Unmarshal,
})

# ...
}

References

- - +
Version: Next

⚡ Make Fiber Faster

Custom JSON Encoder/Decoder

Since Fiber v2.32.0, we use encoding/json as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of encoding/json, we recommend you to use these libraries:

Example
package main

import "github.com/gofiber/fiber/v2"
import "github.com/goccy/go-json"

func main() {
app := fiber.New(fiber.Config{
JSONEncoder: json.Marshal,
JSONDecoder: json.Unmarshal,
})

# ...
}

References

+ + \ No newline at end of file diff --git a/next/guide/grouping/index.html b/next/guide/grouping/index.html index 196a45541ea..2a32fbaf625 100644 --- a/next/guide/grouping/index.html +++ b/next/guide/grouping/index.html @@ -6,13 +6,13 @@ 🎭 Grouping | Fiber - - + +
-
Version: Next

🎭 Grouping

info

In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.

Paths

Like Routing, groups can also have paths that belong to a cluster.

func main() {
app := fiber.New()

api := app.Group("/api", middleware) // /api

v1 := api.Group("/v1", middleware) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", middleware) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

A Group of paths can have an optional handler.

func main() {
app := fiber.New()

api := app.Group("/api") // /api

v1 := api.Group("/v1") // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2") // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}
caution

Running /api, /v1 or /v2 will result in 404 error, make sure you have the errors set.

Group Handlers

Group handlers can also be used as a routing path but they must have Next added to them so that the flow can continue.

func main() {
app := fiber.New()

handler := func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusOK)
}
api := app.Group("/api") // /api

v1 := api.Group("/v1", func(c *fiber.Ctx) error { // middleware for /api/v1
c.Set("Version", "v1")
return c.Next()
})
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

log.Fatal(app.Listen(":3000"))
}
- - +
Version: Next

🎭 Grouping

info

In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.

Paths

Like Routing, groups can also have paths that belong to a cluster.

func main() {
app := fiber.New()

api := app.Group("/api", middleware) // /api

v1 := api.Group("/v1", middleware) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", middleware) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

A Group of paths can have an optional handler.

func main() {
app := fiber.New()

api := app.Group("/api") // /api

v1 := api.Group("/v1") // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2") // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}
caution

Running /api, /v1 or /v2 will result in 404 error, make sure you have the errors set.

Group Handlers

Group handlers can also be used as a routing path but they must have Next added to them so that the flow can continue.

func main() {
app := fiber.New()

handler := func(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusOK)
}
api := app.Group("/api") // /api

v1 := api.Group("/v1", func(c *fiber.Ctx) error { // middleware for /api/v1
c.Set("Version", "v1")
return c.Next()
})
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

log.Fatal(app.Listen(":3000"))
}
+ + \ No newline at end of file diff --git a/next/guide/hooks/index.html b/next/guide/hooks/index.html index 68fc253be75..5d0b84425cd 100644 --- a/next/guide/hooks/index.html +++ b/next/guide/hooks/index.html @@ -6,13 +6,13 @@ 🪝 Hooks | Fiber - - + +
-
Version: Next

🪝 Hooks

With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:

Constants

// Handlers define a function to create hooks for Fiber.
type OnRouteHandler = func(Route) error
type OnNameHandler = OnRouteHandler
type OnGroupHandler = func(Group) error
type OnGroupNameHandler = OnGroupHandler
type OnListenHandler = func(ListenData) error
type OnForkHandler = func(int) error
type OnShutdownHandler = func() error
type OnMountHandler = func(*App) error

OnRoute

OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by route parameter.

Signature
func (app *App) OnRoute(handler ...OnRouteHandler)

OnName

OnName is a hook to execute user functions on each route naming. Also you can get route properties by route parameter.

caution

OnName only works with naming routes, not groups.

Signature
func (app *App) OnName(handler ...OnNameHandler)
package main

import (
"fmt"

"github.com/gofiber/fiber/v2"
)

func main() {
app := fiber.New()

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("index")

app.Hooks().OnName(func(r fiber.Route) error {
fmt.Print("Name: " + r.Name + ", ")

return nil
})

app.Hooks().OnName(func(r fiber.Route) error {
fmt.Print("Method: " + r.Method + "\n")

return nil
})

app.Get("/add/user", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("addUser")

app.Delete("/destroy/user", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("destroyUser")

app.Listen(":5000")
}

// Results:
// Name: addUser, Method: GET
// Name: destroyUser, Method: DELETE

OnGroup

OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by group parameter.

Signature
func (app *App) OnGroup(handler ...OnGroupHandler)

OnGroupName

OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by group parameter.

caution

OnGroupName only works with naming groups, not routes.

Signature
func (app *App) OnGroupName(handler ...OnGroupNameHandler)

OnListen

OnListen is a hook to execute user functions on Listen, ListenTLS, Listener.

Signature
func (app *App) OnListen(handler ...OnListenHandler)
app := fiber.New(fiber.Config{
DisableStartupMessage: true,
})

app.Hooks().OnListen(func(listenData fiber.ListenData) error {
if fiber.IsChild() {
return nil
}
scheme := "http"
if data.TLS {
scheme = "https"
}
log.Println(scheme + "://" + listenData.Host + ":" + listenData.Port)
return nil
})

app.Listen(":5000")

OnFork

OnFork is a hook to execute user functions on Fork.

Signature
func (app *App) OnFork(handler ...OnForkHandler)

OnShutdown

OnShutdown is a hook to execute user functions after Shutdown.

Signature
func (app *App) OnShutdown(handler ...OnShutdownHandler)

OnMount

OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting.

Signature
func (h *Hooks) OnMount(handler ...OnMountHandler) 
package main

import (
"fmt"

"github.com/gofiber/fiber/v2"
)

func main() {
app := New()
app.Get("/", testSimpleHandler).Name("x")

subApp := New()
subApp.Get("/test", testSimpleHandler)

subApp.Hooks().OnMount(func(parent *fiber.App) error {
fmt.Print("Mount path of parent app: "+parent.MountPath())
// ...

return nil
})

app.Mount("/sub", subApp)
}

// Result:
// Mount path of parent app:
caution

OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.

- - +
Version: Next

🪝 Hooks

With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks:

Constants

// Handlers define a function to create hooks for Fiber.
type OnRouteHandler = func(Route) error
type OnNameHandler = OnRouteHandler
type OnGroupHandler = func(Group) error
type OnGroupNameHandler = OnGroupHandler
type OnListenHandler = func(ListenData) error
type OnForkHandler = func(int) error
type OnShutdownHandler = func() error
type OnMountHandler = func(*App) error

OnRoute

OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by route parameter.

Signature
func (app *App) OnRoute(handler ...OnRouteHandler)

OnName

OnName is a hook to execute user functions on each route naming. Also you can get route properties by route parameter.

caution

OnName only works with naming routes, not groups.

Signature
func (app *App) OnName(handler ...OnNameHandler)
package main

import (
"fmt"

"github.com/gofiber/fiber/v2"
)

func main() {
app := fiber.New()

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("index")

app.Hooks().OnName(func(r fiber.Route) error {
fmt.Print("Name: " + r.Name + ", ")

return nil
})

app.Hooks().OnName(func(r fiber.Route) error {
fmt.Print("Method: " + r.Method + "\n")

return nil
})

app.Get("/add/user", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("addUser")

app.Delete("/destroy/user", func(c *fiber.Ctx) error {
return c.SendString(c.Route().Name)
}).Name("destroyUser")

app.Listen(":5000")
}

// Results:
// Name: addUser, Method: GET
// Name: destroyUser, Method: DELETE

OnGroup

OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by group parameter.

Signature
func (app *App) OnGroup(handler ...OnGroupHandler)

OnGroupName

OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by group parameter.

caution

OnGroupName only works with naming groups, not routes.

Signature
func (app *App) OnGroupName(handler ...OnGroupNameHandler)

OnListen

OnListen is a hook to execute user functions on Listen, ListenTLS, Listener.

Signature
func (app *App) OnListen(handler ...OnListenHandler)
app := fiber.New(fiber.Config{
DisableStartupMessage: true,
})

app.Hooks().OnListen(func(listenData fiber.ListenData) error {
if fiber.IsChild() {
return nil
}
scheme := "http"
if data.TLS {
scheme = "https"
}
log.Println(scheme + "://" + listenData.Host + ":" + listenData.Port)
return nil
})

app.Listen(":5000")

OnFork

OnFork is a hook to execute user functions on Fork.

Signature
func (app *App) OnFork(handler ...OnForkHandler)

OnShutdown

OnShutdown is a hook to execute user functions after Shutdown.

Signature
func (app *App) OnShutdown(handler ...OnShutdownHandler)

OnMount

OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting.

Signature
func (h *Hooks) OnMount(handler ...OnMountHandler) 
package main

import (
"fmt"

"github.com/gofiber/fiber/v2"
)

func main() {
app := New()
app.Get("/", testSimpleHandler).Name("x")

subApp := New()
subApp.Get("/test", testSimpleHandler)

subApp.Hooks().OnMount(func(parent *fiber.App) error {
fmt.Print("Mount path of parent app: "+parent.MountPath())
// ...

return nil
})

app.Mount("/sub", subApp)
}

// Result:
// Mount path of parent app:
caution

OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.

+ + \ No newline at end of file diff --git a/next/guide/routing/index.html b/next/guide/routing/index.html index a75845207dc..0951caa070c 100644 --- a/next/guide/routing/index.html +++ b/next/guide/routing/index.html @@ -6,14 +6,14 @@ 🔌 Routing | Fiber - - + +
Version: Next

🔌 Routing

Handlers

Registers a route bound to a specific HTTP method.

Signatures
// HTTP methods
func (app *App) Get(path string, handlers ...Handler) Router
func (app *App) Head(path string, handlers ...Handler) Router
func (app *App) Post(path string, handlers ...Handler) Router
func (app *App) Put(path string, handlers ...Handler) Router
func (app *App) Delete(path string, handlers ...Handler) Router
func (app *App) Connect(path string, handlers ...Handler) Router
func (app *App) Options(path string, handlers ...Handler) Router
func (app *App) Trace(path string, handlers ...Handler) Router
func (app *App) Patch(path string, handlers ...Handler) Router

// Add allows you to specifiy a method as value
func (app *App) Add(method, path string, handlers ...Handler) Router

// All will register the route on all HTTP methods
// Almost the same as app.Use but not bound to prefixes
func (app *App) All(path string, handlers ...Handler) Router
Examples
// Simple GET handler
app.Get("/api/list", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")
})

// Simple POST handler
app.Post("/api/register", func(c *fiber.Ctx) error {
return c.SendString("I'm a POST request!")
})

Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc

Signature
func (app *App) Use(args ...interface{}) Router
Examples
// Match any request
app.Use(func(c *fiber.Ctx) error {
return c.Next()
})

// Match request starting with /api
app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})

// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})

// Attach multiple handlers
app.Use("/api", func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
return c.Next()
}, func(c *fiber.Ctx) error {
return c.Next()
})

Paths

Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be strings or string patterns.

Examples of route paths based on strings

// This route path will match requests to the root route, "/":
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("root")
})

// This route path will match requests to "/about":
app.Get("/about", func(c *fiber.Ctx) error {
return c.SendString("about")
})

// This route path will match requests to "/random.txt":
app.Get("/random.txt", func(c *fiber.Ctx) error {
return c.SendString("random.txt")
})

As with the expressJs framework, the order of the route declaration plays a role. -When a request is received, the routes are checked in the order in which they are declared.

info

So please be careful to write routes with variable parameters after the routes that contain fixed parts, so that these variable parts do not match instead and unexpected behavior occurs.

Parameters

Route parameters are dynamic elements in the route, which are named or not named segments. This segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the Params function, with the name of the route parameter specified in the path as their respective keys or for unnamed parameters the character(*, +) and the counter of this.

The characters :, +, and * are characters that introduce a parameter.

Greedy parameters are indicated by wildcard(*) or plus(+) signs.

The routing also offers the possibility to use optional parameters, for the named parameters these are marked with a final "?", unlike the plus sign which is not optional, you can use the wildcard character for a parameter range which is optional and greedy.

Example of define routes with route parameters

// Parameters
app.Get("/user/:name/books/:title", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s\n", c.Params("name"))
fmt.Fprintf(c, "%s\n", c.Params("title"))
return nil
})
// Plus - greedy - not optional
app.Get("/user/+", func(c *fiber.Ctx) error {
return c.SendString(c.Params("+"))
})

// Optional parameter
app.Get("/user/:name?", func(c *fiber.Ctx) error {
return c.SendString(c.Params("name"))
})

// Wildcard - greedy - optional
app.Get("/user/*", func(c *fiber.Ctx) error {
return c.SendString(c.Params("*"))
})

// This route path will match requests to "/v1/some/resource/name:customVerb", since the parameter character is escaped
app.Get("/v1/some/resource/name\\:customVerb", func(c *fiber.Ctx) error {
return c.SendString("Hello, Community")
})
info

Since the hyphen (-) and the dot (.) are interpreted literally, they can be used along with route parameters for useful purposes.

info

All special parameter characters can also be escaped with "\\" and lose their value, so you can use them in the route if you want, like in the custom methods of the google api design guide.

// http://localhost:3000/plantae/prunus.persica
app.Get("/plantae/:genus.:species", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s.%s\n", c.Params("genus"), c.Params("species"))
return nil // prunus.persica
})
// http://localhost:3000/flights/LAX-SFO
app.Get("/flights/:from-:to", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s-%s\n", c.Params("from"), c.Params("to"))
return nil // LAX-SFO
})

Our intelligent router recognizes that the introductory parameter characters should be part of the request route in this case and can process them as such.

// http://localhost:3000/shop/product/color:blue/size:xs
app.Get("/shop/product/color::color/size::size", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s:%s\n", c.Params("color"), c.Params("size"))
return nil // blue:xs
})

In addition, several parameters in a row and several unnamed parameter characters in the route, such as the wildcard or plus character, are possible, which greatly expands the possibilities of the router for the user.

// GET /@v1
// Params: "sign" -> "@", "param" -> "v1"
app.Get("/:sign:param", handler)

// GET /api-v1
// Params: "name" -> "v1"
app.Get("/api-:name", handler)

// GET /customer/v1/cart/proxy
// Params: "*1" -> "customer/", "*2" -> "/cart"
app.Get("/*v1*/proxy", handler)

// GET /v1/brand/4/shop/blue/xs
// Params: "*1" -> "brand/4", "*2" -> "blue/xs"
app.Get("/v1/*/shop/*", handler)

We have adapted the routing strongly to the express routing, but currently without the possibility of the regular expressions, because they are quite slow. The possibilities can be tested with version 0.1.7 (express 4) in the online Express route tester.

Constraints

Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values by parameters. The feature was intorduced in v2.37.0 and inspired by .NET Core.

caution

Constraints aren't validation for parameters. If constraint aren't valid for parameter value, Fiber returns 404 handler.

ConstraintExampleExample matches
int:id<int>123456789, -123456789
bool:active<bool>true,false
guid:id<guid>CD2C1638-1638-72D5-1638-DEADBEEF1638
float:weight<float>1.234, -1,001.01e8
minLen(value):username<minLen(4)>Test (must be at least 4 characters)
maxLen(value):filename<maxLen(8)>MyFile (must be no more than 8 characters
len(length):filename<len(12)>somefile.txt (exactly 12 characters)
min(value):age<min(18)>19 (Integer value must be at least 18)
max(value):age<max(120)>91 (Integer value must be no more than 120)
range(min,max):age<range(18,120)>91 (Integer value must be at least 18 but no more than 120)
alpha:name<alpha>Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive)
datetime:dob<datetime(2006\\-01\\-02)>2005-11-01
regex(expression):date<regex(\d{4}-\d{2}-\d{2})}>2022-08-27 (Must match regular expression)

Examples

app.Get("/:test<min(5)>", func(c *fiber.Ctx) error {
return c.SendString(c.Params("test"))
})

// curl -X GET http://localhost:3000/12
// 12

// curl -X GET http://localhost:3000/1
// Cannot GET /1
caution

You should use \\ before routing-specific characters when to use datetime constraint (*, +, ?, :, /, <, >, ;, (, )), to avoid wrong parsing.

Optional Parameter Example

You can impose constraints on optional parameters as well.

app.Get("/:test<int>?", func(c *fiber.Ctx) error {
return c.SendString(c.Params("test"))
})
// curl -X GET http://localhost:3000/42
// 42
// curl -X GET http://localhost:3000/
//
// curl -X GET http://localhost:3000/7.0
// Cannot GET /7.0

Middleware

Functions that are designed to make changes to the request or response are called middleware functions. The Next is a Fiber router function, when called, executes the next function that matches the current route.

Example of a middleware function

app.Use(func(c *fiber.Ctx) error {
// Set a custom header on all responses:
c.Set("X-Custom-Header", "Hello, World")

// Go to next middleware:
return c.Next()
})

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

Use method path is a mount, or prefix path, and limits middleware to only apply to any paths requested that begin with it.

Grouping

If you have many endpoints, you can organize your routes using Group.

func main() {
app := fiber.New()

api := app.Group("/api", middleware) // /api

v1 := api.Group("/v1", middleware) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", middleware) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

More information about this in our Grouping Guide

- - +When a request is received, the routes are checked in the order in which they are declared.

info

So please be careful to write routes with variable parameters after the routes that contain fixed parts, so that these variable parts do not match instead and unexpected behavior occurs.

Parameters

Route parameters are dynamic elements in the route, which are named or not named segments. This segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the Params function, with the name of the route parameter specified in the path as their respective keys or for unnamed parameters the character(*, +) and the counter of this.

The characters :, +, and * are characters that introduce a parameter.

Greedy parameters are indicated by wildcard(*) or plus(+) signs.

The routing also offers the possibility to use optional parameters, for the named parameters these are marked with a final "?", unlike the plus sign which is not optional, you can use the wildcard character for a parameter range which is optional and greedy.

Example of define routes with route parameters

// Parameters
app.Get("/user/:name/books/:title", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s\n", c.Params("name"))
fmt.Fprintf(c, "%s\n", c.Params("title"))
return nil
})
// Plus - greedy - not optional
app.Get("/user/+", func(c *fiber.Ctx) error {
return c.SendString(c.Params("+"))
})

// Optional parameter
app.Get("/user/:name?", func(c *fiber.Ctx) error {
return c.SendString(c.Params("name"))
})

// Wildcard - greedy - optional
app.Get("/user/*", func(c *fiber.Ctx) error {
return c.SendString(c.Params("*"))
})

// This route path will match requests to "/v1/some/resource/name:customVerb", since the parameter character is escaped
app.Get("/v1/some/resource/name\\:customVerb", func(c *fiber.Ctx) error {
return c.SendString("Hello, Community")
})
info

Since the hyphen (-) and the dot (.) are interpreted literally, they can be used along with route parameters for useful purposes.

info

All special parameter characters can also be escaped with "\\" and lose their value, so you can use them in the route if you want, like in the custom methods of the google api design guide.

// http://localhost:3000/plantae/prunus.persica
app.Get("/plantae/:genus.:species", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s.%s\n", c.Params("genus"), c.Params("species"))
return nil // prunus.persica
})
// http://localhost:3000/flights/LAX-SFO
app.Get("/flights/:from-:to", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s-%s\n", c.Params("from"), c.Params("to"))
return nil // LAX-SFO
})

Our intelligent router recognizes that the introductory parameter characters should be part of the request route in this case and can process them as such.

// http://localhost:3000/shop/product/color:blue/size:xs
app.Get("/shop/product/color::color/size::size", func(c *fiber.Ctx) error {
fmt.Fprintf(c, "%s:%s\n", c.Params("color"), c.Params("size"))
return nil // blue:xs
})

In addition, several parameters in a row and several unnamed parameter characters in the route, such as the wildcard or plus character, are possible, which greatly expands the possibilities of the router for the user.

// GET /@v1
// Params: "sign" -> "@", "param" -> "v1"
app.Get("/:sign:param", handler)

// GET /api-v1
// Params: "name" -> "v1"
app.Get("/api-:name", handler)

// GET /customer/v1/cart/proxy
// Params: "*1" -> "customer/", "*2" -> "/cart"
app.Get("/*v1*/proxy", handler)

// GET /v1/brand/4/shop/blue/xs
// Params: "*1" -> "brand/4", "*2" -> "blue/xs"
app.Get("/v1/*/shop/*", handler)

We have adapted the routing strongly to the express routing, but currently without the possibility of the regular expressions, because they are quite slow. The possibilities can be tested with version 0.1.7 (express 4) in the online Express route tester.

Constraints

Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values by parameters. The feature was intorduced in v2.37.0 and inspired by .NET Core.

caution

Constraints aren't validation for parameters. If constraint aren't valid for parameter value, Fiber returns 404 handler.

ConstraintExampleExample matches
int:id<int>123456789, -123456789
bool:active<bool>true,false
guid:id<guid>CD2C1638-1638-72D5-1638-DEADBEEF1638
float:weight<float>1.234, -1,001.01e8
minLen(value):username<minLen(4)>Test (must be at least 4 characters)
maxLen(value):filename<maxLen(8)>MyFile (must be no more than 8 characters
len(length):filename<len(12)>somefile.txt (exactly 12 characters)
min(value):age<min(18)>19 (Integer value must be at least 18)
max(value):age<max(120)>91 (Integer value must be no more than 120)
range(min,max):age<range(18,120)>91 (Integer value must be at least 18 but no more than 120)
alpha:name<alpha>Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive)
datetime:dob<datetime(2006\\-01\\-02)>2005-11-01
regex(expression):date<regex(\d{4}-\d{2}-\d{2})}>2022-08-27 (Must match regular expression)

Examples

app.Get("/:test<min(5)>", func(c *fiber.Ctx) error {
return c.SendString(c.Params("test"))
})

// curl -X GET http://localhost:3000/12
// 12

// curl -X GET http://localhost:3000/1
// Cannot GET /1
caution

You should use \\ before routing-specific characters when to use datetime constraint (*, +, ?, :, /, <, >, ;, (, )), to avoid wrong parsing.

Optional Parameter Example

You can impose constraints on optional parameters as well.

app.Get("/:test<int>?", func(c *fiber.Ctx) error {
return c.SendString(c.Params("test"))
})
// curl -X GET http://localhost:3000/42
// 42
// curl -X GET http://localhost:3000/
//
// curl -X GET http://localhost:3000/7.0
// Cannot GET /7.0

Middleware

Functions that are designed to make changes to the request or response are called middleware functions. The Next is a Fiber router function, when called, executes the next function that matches the current route.

Example of a middleware function

app.Use(func(c *fiber.Ctx) error {
// Set a custom header on all responses:
c.Set("X-Custom-Header", "Hello, World")

// Go to next middleware:
return c.Next()
})

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

Use method path is a mount, or prefix path, and limits middleware to only apply to any paths requested that begin with it.

Grouping

If you have many endpoints, you can organize your routes using Group.

func main() {
app := fiber.New()

api := app.Group("/api", middleware) // /api

v1 := api.Group("/v1", middleware) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", middleware) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

log.Fatal(app.Listen(":3000"))
}

More information about this in our Grouping Guide

+ + \ No newline at end of file diff --git a/next/guide/templates/index.html b/next/guide/templates/index.html index 5bab6e21095..799699ffb35 100644 --- a/next/guide/templates/index.html +++ b/next/guide/templates/index.html @@ -6,14 +6,14 @@ 📝 Templates | Fiber - - + +
Version: Next

📝 Templates

Template interfaces

Fiber provides a Views interface to provide your own template engine:

type Views interface {
Load() error
Render(io.Writer, string, interface{}, ...string) error
}

Views interface contains a Load and Render method, Load is executed by Fiber on app initialization to load/parse the templates.

// Pass engine to Fiber's Views Engine
app := fiber.New(fiber.Config{
Views: engine,
// Views Layout is the global layout for all template render until override on Render function.
ViewsLayout: "layouts/main"
})

The Render method is linked to the ctx.Render() function that accepts a template name and binding data. It will use global layout if layout is not being defined in Render function. -If the Fiber config option PassLocalsToViews is enabled, then all locals set using ctx.Locals(key, value) will be passed to the template.

app.Get("/", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"hello": "world",
});
})

Engines

Fiber team maintains templates package that provides wrappers for multiple template engines:

package main

import (
"log"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
)

func main() {
// Initialize standard Go html template engine
engine := html.New("./views", ".html")
// If you want other engine, just replace with following
// Create a new engine with django
// engine := django.New("./views", ".django")

app := fiber.New(fiber.Config{
Views: engine,
})
app.Get("/", func(c *fiber.Ctx) error {
// Render index template
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

log.Fatal(app.Listen(":3000"))
}
- - +If the Fiber config option PassLocalsToViews is enabled, then all locals set using ctx.Locals(key, value) will be passed to the template.

app.Get("/", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"hello": "world",
});
})

Engines

Fiber team maintains templates package that provides wrappers for multiple template engines:

package main

import (
"log"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
)

func main() {
// Initialize standard Go html template engine
engine := html.New("./views", ".html")
// If you want other engine, just replace with following
// Create a new engine with django
// engine := django.New("./views", ".django")

app := fiber.New(fiber.Config{
Views: engine,
})
app.Get("/", func(c *fiber.Ctx) error {
// Render index template
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

log.Fatal(app.Listen(":3000"))
}
+ + \ No newline at end of file diff --git a/next/guide/validation/index.html b/next/guide/validation/index.html index 3a9bd0f43a1..34fd81842be 100644 --- a/next/guide/validation/index.html +++ b/next/guide/validation/index.html @@ -6,13 +6,13 @@ 🔎 Validation | Fiber - - + +
-
Version: Next

🔎 Validation

Validator package

Fiber can make great use of the validator package to ensure correct validation of data to store.

You can find the detailed descriptions of the validations used in the fields contained on the structs below:

Validation Example
package main

import (
"fmt"
"log"
"strings"

"github.com/go-playground/validator/v10"
"github.com/gofiber/fiber/v2"
)

type (
User struct {
Name string `validate:"required,min=5,max=20"` // Required field, min 5 char long max 20
Age int `validate:"required,teener"` // Required field, and client needs to implement our 'teener' tag format which we'll see later
}

ErrorResponse struct {
Error bool
FailedField string
Tag string
Value interface{}
}

XValidator struct {
validator *validator.Validate
}

GlobalErrorHandlerResp struct {
Success bool `json:"success"`
Message string `json:"message"`
}
)

// This is the validator instance
// for more information see: https://github.com/go-playground/validator
var validate = validator.New()

func (v XValidator) Validate(data interface{}) []ErrorResponse {
validationErrors := []ErrorResponse{}

errs := validate.Struct(data)
if errs != nil {
for _, err := range errs.(validator.ValidationErrors) {
// In this case data object is actually holding the User struct
var elem ErrorResponse

elem.FailedField = err.Field() // Export struct field name
elem.Tag = err.Tag() // Export struct tag
elem.Value = err.Value() // Export field value
elem.Error = true

validationErrors = append(validationErrors, elem)
}
}

return validationErrors
}

func main() {
myValidator := &XValidator{
validator: validate,
}

app := fiber.New(fiber.Config{
// Global custom error handler
ErrorHandler: func(c *fiber.Ctx, err error) error {
return c.Status(fiber.StatusBadRequest).JSON(GlobalErrorHandlerResp{
Success: false,
Message: err.Error(),
})
},
})

// Custom struct validation tag format
myValidator.validator.RegisterValidation("teener", func(fl validator.FieldLevel) bool {
// User.Age needs to fit our needs, 12-18 years old.
return fl.Field().Int() >= 12 && fl.Field().Int() <= 18
})

app.Get("/", func(c *fiber.Ctx) error {
user := &User{
Name: c.Query("name"),
Age: c.QueryInt("age"),
}

// Validation
if errs := myValidator.Validate(user); len(errs) > 0 && errs[0].Error {
errMsgs := make([]string, 0)

for _, err := range errs {
errMsgs = append(errMsgs, fmt.Sprintf(
"[%s]: '%v' | Needs to implement '%s'",
err.FailedField,
err.Value,
err.Tag,
))
}

return &fiber.Error{
Code: fiber.ErrBadRequest.Code,
Message: strings.Join(errMsgs, " and "),
}
}

// Logic, validated with success
return c.SendString("Hello, World!")
})

log.Fatal(app.Listen(":3000"))
}

/**
OUTPUT

[1]
Request:

GET http://127.0.0.1:3000/

Response:

{"success":false,"message":"[Name]: '' | Needs to implement 'required' and [Age]: '0' | Needs to implement 'required'"}

[2]
Request:

GET http://127.0.0.1:3000/?name=efdal&age=9

Response:
{"success":false,"message":"[Age]: '9' | Needs to implement 'teener'"}

[3]
Request:

GET http://127.0.0.1:3000/?name=efdal&age=

Response:
{"success":false,"message":"[Age]: '0' | Needs to implement 'required'"}

[4]
Request:

GET http://127.0.0.1:3000/?name=efdal&age=18

Response:
Hello, World!

**/

- - +
Version: Next

🔎 Validation

Validator package

Fiber can make great use of the validator package to ensure correct validation of data to store.

You can find the detailed descriptions of the validations used in the fields contained on the structs below:

Validation Example
package main

import (
"fmt"
"log"
"strings"

"github.com/go-playground/validator/v10"
"github.com/gofiber/fiber/v2"
)

type (
User struct {
Name string `validate:"required,min=5,max=20"` // Required field, min 5 char long max 20
Age int `validate:"required,teener"` // Required field, and client needs to implement our 'teener' tag format which we'll see later
}

ErrorResponse struct {
Error bool
FailedField string
Tag string
Value interface{}
}

XValidator struct {
validator *validator.Validate
}

GlobalErrorHandlerResp struct {
Success bool `json:"success"`
Message string `json:"message"`
}
)

// This is the validator instance
// for more information see: https://github.com/go-playground/validator
var validate = validator.New()

func (v XValidator) Validate(data interface{}) []ErrorResponse {
validationErrors := []ErrorResponse{}

errs := validate.Struct(data)
if errs != nil {
for _, err := range errs.(validator.ValidationErrors) {
// In this case data object is actually holding the User struct
var elem ErrorResponse

elem.FailedField = err.Field() // Export struct field name
elem.Tag = err.Tag() // Export struct tag
elem.Value = err.Value() // Export field value
elem.Error = true

validationErrors = append(validationErrors, elem)
}
}

return validationErrors
}

func main() {
myValidator := &XValidator{
validator: validate,
}

app := fiber.New(fiber.Config{
// Global custom error handler
ErrorHandler: func(c *fiber.Ctx, err error) error {
return c.Status(fiber.StatusBadRequest).JSON(GlobalErrorHandlerResp{
Success: false,
Message: err.Error(),
})
},
})

// Custom struct validation tag format
myValidator.validator.RegisterValidation("teener", func(fl validator.FieldLevel) bool {
// User.Age needs to fit our needs, 12-18 years old.
return fl.Field().Int() >= 12 && fl.Field().Int() <= 18
})

app.Get("/", func(c *fiber.Ctx) error {
user := &User{
Name: c.Query("name"),
Age: c.QueryInt("age"),
}

// Validation
if errs := myValidator.Validate(user); len(errs) > 0 && errs[0].Error {
errMsgs := make([]string, 0)

for _, err := range errs {
errMsgs = append(errMsgs, fmt.Sprintf(
"[%s]: '%v' | Needs to implement '%s'",
err.FailedField,
err.Value,
err.Tag,
))
}

return &fiber.Error{
Code: fiber.ErrBadRequest.Code,
Message: strings.Join(errMsgs, " and "),
}
}

// Logic, validated with success
return c.SendString("Hello, World!")
})

log.Fatal(app.Listen(":3000"))
}

/**
OUTPUT

[1]
Request:

GET http://127.0.0.1:3000/

Response:

{"success":false,"message":"[Name]: '' | Needs to implement 'required' and [Age]: '0' | Needs to implement 'required'"}

[2]
Request:

GET http://127.0.0.1:3000/?name=efdal&age=9

Response:
{"success":false,"message":"[Age]: '9' | Needs to implement 'teener'"}

[3]
Request:

GET http://127.0.0.1:3000/?name=efdal&age=

Response:
{"success":false,"message":"[Age]: '0' | Needs to implement 'required'"}

[4]
Request:

GET http://127.0.0.1:3000/?name=efdal&age=18

Response:
Hello, World!

**/

+ + \ No newline at end of file diff --git a/next/index.html b/next/index.html index 24d34529470..e628072918a 100644 --- a/next/index.html +++ b/next/index.html @@ -6,14 +6,14 @@ 👋 Welcome | Fiber - - + +
Version: Next

👋 Welcome

An online API documentation with examples so you can start building web apps with Fiber right away!

Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind.

These docs are for Fiber v2, which was released on September 15th, 2020.

Installation

First of all, download and install Go. 1.17 or higher is required.

Installation is done using the go get command:

go get github.com/gofiber/fiber/v2

Zero Allocation

Some values returned from *fiber.Ctx are not immutable by default.

Because fiber is optimized for high-performance, values returned from fiber.Ctx are not immutable by default and will be re-used across requests. As a rule of thumb, you must only use context values within the handler, and you must not keep any references. As soon as you return from the handler, any values you have obtained from the context will be re-used in future requests and will change below your feet. Here is an example:

func handler(c *fiber.Ctx) error {
// Variable is only valid within this handler
result := c.Params("foo")

// ...
}

If you need to persist such values outside the handler, make copies of their underlying buffer using the copy builtin. Here is an example for persisting a string:

func handler(c *fiber.Ctx) error {
// Variable is only valid within this handler
result := c.Params("foo")

// Make a copy
buffer := make([]byte, len(result))
copy(buffer, result)
resultCopy := string(buffer)
// Variable is now valid forever

// ...
}

We created a custom CopyString function that does the above and is available under gofiber/utils.

app.Get("/:foo", func(c *fiber.Ctx) error {
// Variable is now immutable
result := utils.CopyString(c.Params("foo"))

// ...
})

Alternatively, you can also use the Immutable setting. It will make all values returned from the context immutable, allowing you to persist them anywhere. Of course, this comes at the cost of performance.

app := fiber.New(fiber.Config{
Immutable: true,
})

For more information, please check #426 and #185.

Hello, World!

Embedded below is essentially the most straightforward Fiber app you can create:

package main

import "github.com/gofiber/fiber/v2"

func main() {
app := fiber.New()

app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

app.Listen(":3000")
}
go run server.go

Browse to http://localhost:3000 and you should see Hello, World! on the page.

Basic routing

Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, PUT, POST, etc.).

Each route can have multiple handler functions that are executed when the route is matched.

Route definition takes the following structures:

// Function signature
app.Method(path string, ...func(*fiber.Ctx) error)
  • app is an instance of Fiber
  • Method is an HTTP request method: GET, PUT, POST, etc.
  • path is a virtual path on the server
  • func(*fiber.Ctx) error is a callback function containing the Context executed when the route is matched

Simple route

// Respond with "Hello, World!" on root path, "/"
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})

Parameters

// GET http://localhost:8080/hello%20world

app.Get("/:value", func(c *fiber.Ctx) error {
return c.SendString("value: " + c.Params("value"))
// => Get request with value: hello world
})

Optional parameter

// GET http://localhost:3000/john

app.Get("/:name?", func(c *fiber.Ctx) error {
if c.Params("name") != "" {
return c.SendString("Hello " + c.Params("name"))
// => Hello john
}
return c.SendString("Where is john?")
})

Wildcards

// GET http://localhost:3000/api/user/john

app.Get("/api/*", func(c *fiber.Ctx) error {
return c.SendString("API path: " + c.Params("*"))
// => API path: user/john
})

Static files

To serve static files such as images, CSS, and JavaScript files, replace your function handler with a file or directory string.

Function signature:

app.Static(prefix, root string, config ...Static)

Use the following code to serve files in a directory named ./public:

app := fiber.New()

app.Static("/", "./public")

app.Listen(":3000")

Now, you can load the files that are in the ./public directory:

http://localhost:8080/hello.html
http://localhost:8080/js/jquery.js
http://localhost:8080/css/style.css

Note

For more information on how to build APIs in Go with Fiber, please check out this excellent article -on building an express-style API in Go with Fiber.

- - +on building an express-style API in Go with Fiber.

+ + \ No newline at end of file diff --git a/next/partials/routing/route-handlers/index.html b/next/partials/routing/route-handlers/index.html index 73e8eaeb263..702e1e91bf7 100644 --- a/next/partials/routing/route-handlers/index.html +++ b/next/partials/routing/route-handlers/index.html @@ -6,13 +6,13 @@ Route Handlers | Fiber - - + +
-
Version: Next

Route Handlers

Registers a route bound to a specific HTTP method.

Signatures
// HTTP methods
func (app *App) Get(path string, handlers ...Handler) Router
func (app *App) Head(path string, handlers ...Handler) Router
func (app *App) Post(path string, handlers ...Handler) Router
func (app *App) Put(path string, handlers ...Handler) Router
func (app *App) Delete(path string, handlers ...Handler) Router
func (app *App) Connect(path string, handlers ...Handler) Router
func (app *App) Options(path string, handlers ...Handler) Router
func (app *App) Trace(path string, handlers ...Handler) Router
func (app *App) Patch(path string, handlers ...Handler) Router

// Add allows you to specifiy a method as value
func (app *App) Add(method, path string, handlers ...Handler) Router

// All will register the route on all HTTP methods
// Almost the same as app.Use but not bound to prefixes
func (app *App) All(path string, handlers ...Handler) Router
Examples
// Simple GET handler
app.Get("/api/list", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")
})

// Simple POST handler
app.Post("/api/register", func(c *fiber.Ctx) error {
return c.SendString("I'm a POST request!")
})

Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc

Signature
func (app *App) Use(args ...interface{}) Router
Examples
// Match any request
app.Use(func(c *fiber.Ctx) error {
return c.Next()
})

// Match request starting with /api
app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})

// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})

// Attach multiple handlers
app.Use("/api", func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
return c.Next()
}, func(c *fiber.Ctx) error {
return c.Next()
})
- - +
Version: Next

Route Handlers

Registers a route bound to a specific HTTP method.

Signatures
// HTTP methods
func (app *App) Get(path string, handlers ...Handler) Router
func (app *App) Head(path string, handlers ...Handler) Router
func (app *App) Post(path string, handlers ...Handler) Router
func (app *App) Put(path string, handlers ...Handler) Router
func (app *App) Delete(path string, handlers ...Handler) Router
func (app *App) Connect(path string, handlers ...Handler) Router
func (app *App) Options(path string, handlers ...Handler) Router
func (app *App) Trace(path string, handlers ...Handler) Router
func (app *App) Patch(path string, handlers ...Handler) Router

// Add allows you to specifiy a method as value
func (app *App) Add(method, path string, handlers ...Handler) Router

// All will register the route on all HTTP methods
// Almost the same as app.Use but not bound to prefixes
func (app *App) All(path string, handlers ...Handler) Router
Examples
// Simple GET handler
app.Get("/api/list", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")
})

// Simple POST handler
app.Post("/api/register", func(c *fiber.Ctx) error {
return c.SendString("I'm a POST request!")
})

Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc

Signature
func (app *App) Use(args ...interface{}) Router
Examples
// Match any request
app.Use(func(c *fiber.Ctx) error {
return c.Next()
})

// Match request starting with /api
app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})

// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})

// Attach multiple handlers
app.Use("/api", func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
return c.Next()
}, func(c *fiber.Ctx) error {
return c.Next()
})
+ + \ No newline at end of file diff --git a/next/search-index.json b/next/search-index.json index 4a0ca66ee97..695c4a681a6 100644 --- a/next/search-index.json +++ b/next/search-index.json @@ -1 +1 @@ -[{"documents":[{"i":1,"t":"👋 Welcome","u":"/next/","b":["🏠 Home"]},{"i":15,"t":"🚀 App","u":"/next/api/app","b":["🏠 Home","API"]},{"i":62,"t":"🌎 Client","u":"/next/api/client","b":["🏠 Home","API"]},{"i":129,"t":"📋 Constants","u":"/next/api/constants","b":["🏠 Home","API"]},{"i":131,"t":"📦 Fiber","u":"/next/api/fiber","b":["🏠 Home","API"]},{"i":140,"t":"Log","u":"/next/api/log","b":["🏠 Home","API"]},{"i":156,"t":"Adaptor","u":"/next/api/middleware/adaptor","b":["🏠 Home","API","🧬 Middleware"]},{"i":171,"t":"BasicAuth","u":"/next/api/middleware/basicauth","b":["🏠 Home","API","🧬 Middleware"]},{"i":181,"t":"Cache","u":"/next/api/middleware/cache","b":["🏠 Home","API","🧬 Middleware"]},{"i":191,"t":"Compress","u":"/next/api/middleware/compress","b":["🏠 Home","API","🧬 Middleware"]},{"i":203,"t":"CORS","u":"/next/api/middleware/cors","b":["🏠 Home","API","🧬 Middleware"]},{"i":213,"t":"CSRF","u":"/next/api/middleware/csrf","b":["🏠 Home","API","🧬 Middleware"]},{"i":227,"t":"EarlyData","u":"/next/api/middleware/earlydata","b":["🏠 Home","API","🧬 Middleware"]},{"i":239,"t":"Encrypt Cookie","u":"/next/api/middleware/encryptcookie","b":["🏠 Home","API","🧬 Middleware"]},{"i":251,"t":"EnvVar","u":"/next/api/middleware/envvar","b":["🏠 Home","API","🧬 Middleware"]},{"i":263,"t":"ETag","u":"/next/api/middleware/etag","b":["🏠 Home","API","🧬 Middleware"]},{"i":273,"t":"ExpVar","u":"/next/api/middleware/expvar","b":["🏠 Home","API","🧬 Middleware"]},{"i":283,"t":"Favicon","u":"/next/api/middleware/favicon","b":["🏠 Home","API","🧬 Middleware"]},{"i":293,"t":"FileSystem","u":"/next/api/middleware/filesystem","b":["🏠 Home","API","🧬 Middleware"]},{"i":315,"t":"Helmet","u":"/next/api/middleware/helmet","b":["🏠 Home","API","🧬 Middleware"]},{"i":325,"t":"Idempotency","u":"/next/api/middleware/idempotency","b":["🏠 Home","API","🧬 Middleware"]},{"i":339,"t":"Keyauth","u":"/next/api/middleware/keyauth","b":["🏠 Home","API","🧬 Middleware"]},{"i":353,"t":"Limiter","u":"/next/api/middleware/limiter","b":["🏠 Home","API","🧬 Middleware"]},{"i":367,"t":"Logger","u":"/next/api/middleware/logger","b":["🏠 Home","API","🧬 Middleware"]},{"i":379,"t":"Monitor","u":"/next/api/middleware/monitor","b":["🏠 Home","API","🧬 Middleware"]},{"i":389,"t":"Pprof","u":"/next/api/middleware/pprof","b":["🏠 Home","API","🧬 Middleware"]},{"i":399,"t":"Proxy","u":"/next/api/middleware/proxy","b":["🏠 Home","API","🧬 Middleware"]},{"i":409,"t":"Recover","u":"/next/api/middleware/recover","b":["🏠 Home","API","🧬 Middleware"]},{"i":419,"t":"Redirect","u":"/next/api/middleware/redirect","b":["🏠 Home","API","🧬 Middleware"]},{"i":429,"t":"RequestID","u":"/next/api/middleware/requestid","b":["🏠 Home","API","🧬 Middleware"]},{"i":439,"t":"Rewrite","u":"/next/api/middleware/rewrite","b":["🏠 Home","API","🧬 Middleware"]},{"i":445,"t":"Session","u":"/next/api/middleware/session","b":["🏠 Home","API","🧬 Middleware"]},{"i":459,"t":"Skip","u":"/next/api/middleware/skip","b":["🏠 Home","API","🧬 Middleware"]},{"i":465,"t":"Timeout","u":"/next/api/middleware/timeout","b":["🏠 Home","API","🧬 Middleware"]},{"i":471,"t":"📊 Benchmarks","u":"/next/extra/benchmarks","b":["🏠 Home","Extra"]},{"i":486,"t":"🤔 FAQ","u":"/next/extra/faq","b":["🏠 Home","Extra"]},{"i":501,"t":"🐛 Error Handling","u":"/next/guide/error-handling","b":["🏠 Home","Guide"]},{"i":508,"t":"⚡ Make Fiber Faster","u":"/next/guide/faster-fiber","b":["🏠 Home","Guide"]},{"i":513,"t":"🎭 Grouping","u":"/next/guide/grouping","b":["🏠 Home","Guide"]},{"i":519,"t":"🪝 Hooks","u":"/next/guide/hooks","b":["🏠 Home","Guide"]},{"i":539,"t":"🔌 Routing","u":"/next/guide/routing","b":["🏠 Home","Guide"]},{"i":552,"t":"📝 Templates","u":"/next/guide/templates","b":["🏠 Home","Guide"]},{"i":557,"t":"🔎 Validation","u":"/next/guide/validation","b":["🏠 Home","Guide"]},{"i":560,"t":"Route Handlers","u":"/next/partials/routing/route-handlers","b":[]},{"i":562,"t":"🧠 Ctx","u":"/next/api/ctx","b":["🏠 Home","API"]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/1",[0,0.94,1,2.958]],["t/15",[0,0.94,2,2.958]],["t/62",[0,0.94,3,2.958]],["t/129",[0,0.94,4,2.958]],["t/131",[0,0.94,5,2.516]],["t/140",[6,3.916]],["t/156",[7,3.916]],["t/171",[8,3.916]],["t/181",[9,3.916]],["t/191",[10,3.916]],["t/203",[11,3.916]],["t/213",[12,3.916]],["t/227",[13,3.916]],["t/239",[14,2.958,15,2.958]],["t/251",[16,3.916]],["t/263",[17,3.916]],["t/273",[18,3.916]],["t/283",[19,3.916]],["t/293",[20,3.916]],["t/315",[21,3.916]],["t/325",[22,3.916]],["t/339",[23,3.916]],["t/353",[24,3.916]],["t/367",[25,3.916]],["t/379",[26,3.916]],["t/389",[27,3.916]],["t/399",[28,3.916]],["t/409",[29,3.916]],["t/419",[30,3.916]],["t/429",[31,3.916]],["t/439",[32,3.916]],["t/445",[33,3.916]],["t/459",[34,3.916]],["t/465",[35,3.916]],["t/471",[0,0.94,36,2.958]],["t/486",[0,0.94,37,2.958]],["t/501",[0,0.755,38,2.376,39,2.376]],["t/508",[0,0.631,5,1.69,40,1.986,41,1.986]],["t/513",[0,0.94,42,2.958]],["t/519",[0,0.94,43,2.958]],["t/539",[0,0.94,44,2.516]],["t/552",[0,0.94,45,2.958]],["t/557",[0,0.94,46,2.958]],["t/560",[44,2.516,47,2.958]],["t/562",[0,0.94,48,2.958]]],"invertedIndex":[["",{"_index":0,"t":{"1":{"position":[[0,2]]},"15":{"position":[[0,2]]},"62":{"position":[[0,2]]},"129":{"position":[[0,2]]},"131":{"position":[[0,2]]},"471":{"position":[[0,2]]},"486":{"position":[[0,2]]},"501":{"position":[[0,2]]},"508":{"position":[[0,1]]},"513":{"position":[[0,2]]},"519":{"position":[[0,2]]},"539":{"position":[[0,2]]},"552":{"position":[[0,2]]},"557":{"position":[[0,2]]},"562":{"position":[[0,2]]}}}],["adaptor",{"_index":7,"t":{"156":{"position":[[0,7]]}}}],["app",{"_index":2,"t":{"15":{"position":[[3,3]]}}}],["basicauth",{"_index":8,"t":{"171":{"position":[[0,9]]}}}],["benchmark",{"_index":36,"t":{"471":{"position":[[3,10]]}}}],["cach",{"_index":9,"t":{"181":{"position":[[0,5]]}}}],["client",{"_index":3,"t":{"62":{"position":[[3,6]]}}}],["compress",{"_index":10,"t":{"191":{"position":[[0,8]]}}}],["constant",{"_index":4,"t":{"129":{"position":[[3,9]]}}}],["cooki",{"_index":15,"t":{"239":{"position":[[8,6]]}}}],["cor",{"_index":11,"t":{"203":{"position":[[0,4]]}}}],["csrf",{"_index":12,"t":{"213":{"position":[[0,4]]}}}],["ctx",{"_index":48,"t":{"562":{"position":[[3,3]]}}}],["earlydata",{"_index":13,"t":{"227":{"position":[[0,9]]}}}],["encrypt",{"_index":14,"t":{"239":{"position":[[0,7]]}}}],["envvar",{"_index":16,"t":{"251":{"position":[[0,6]]}}}],["error",{"_index":38,"t":{"501":{"position":[[3,5]]}}}],["etag",{"_index":17,"t":{"263":{"position":[[0,4]]}}}],["expvar",{"_index":18,"t":{"273":{"position":[[0,6]]}}}],["faq",{"_index":37,"t":{"486":{"position":[[3,3]]}}}],["faster",{"_index":41,"t":{"508":{"position":[[13,6]]}}}],["favicon",{"_index":19,"t":{"283":{"position":[[0,7]]}}}],["fiber",{"_index":5,"t":{"131":{"position":[[3,5]]},"508":{"position":[[7,5]]}}}],["filesystem",{"_index":20,"t":{"293":{"position":[[0,10]]}}}],["group",{"_index":42,"t":{"513":{"position":[[3,8]]}}}],["handl",{"_index":39,"t":{"501":{"position":[[9,8]]}}}],["handler",{"_index":47,"t":{"560":{"position":[[6,8]]}}}],["helmet",{"_index":21,"t":{"315":{"position":[[0,6]]}}}],["hook",{"_index":43,"t":{"519":{"position":[[3,5]]}}}],["idempot",{"_index":22,"t":{"325":{"position":[[0,11]]}}}],["keyauth",{"_index":23,"t":{"339":{"position":[[0,7]]}}}],["limit",{"_index":24,"t":{"353":{"position":[[0,7]]}}}],["log",{"_index":6,"t":{"140":{"position":[[0,3]]}}}],["logger",{"_index":25,"t":{"367":{"position":[[0,6]]}}}],["make",{"_index":40,"t":{"508":{"position":[[2,4]]}}}],["monitor",{"_index":26,"t":{"379":{"position":[[0,7]]}}}],["pprof",{"_index":27,"t":{"389":{"position":[[0,5]]}}}],["proxi",{"_index":28,"t":{"399":{"position":[[0,5]]}}}],["recov",{"_index":29,"t":{"409":{"position":[[0,7]]}}}],["redirect",{"_index":30,"t":{"419":{"position":[[0,8]]}}}],["requestid",{"_index":31,"t":{"429":{"position":[[0,9]]}}}],["rewrit",{"_index":32,"t":{"439":{"position":[[0,7]]}}}],["rout",{"_index":44,"t":{"539":{"position":[[3,7]]},"560":{"position":[[0,5]]}}}],["session",{"_index":33,"t":{"445":{"position":[[0,7]]}}}],["skip",{"_index":34,"t":{"459":{"position":[[0,4]]}}}],["templat",{"_index":45,"t":{"552":{"position":[[3,9]]}}}],["timeout",{"_index":35,"t":{"465":{"position":[[0,7]]}}}],["valid",{"_index":46,"t":{"557":{"position":[[3,10]]}}}],["welcom",{"_index":1,"t":{"1":{"position":[[3,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3,"t":"Installation","u":"/next/","h":"#installation","p":1},{"i":5,"t":"Zero Allocation","u":"/next/","h":"#zero-allocation","p":1},{"i":7,"t":"Hello, World!","u":"/next/","h":"#hello-world","p":1},{"i":9,"t":"Basic routing","u":"/next/","h":"#basic-routing","p":1},{"i":11,"t":"Static files","u":"/next/","h":"#static-files","p":1},{"i":13,"t":"Note","u":"/next/","h":"#note","p":1},{"i":16,"t":"Static","u":"/next/api/app","h":"#static","p":15},{"i":18,"t":"Route Handlers","u":"/next/api/app","h":"#route-handlers","p":15},{"i":20,"t":"Mount","u":"/next/api/app","h":"#mount","p":15},{"i":22,"t":"MountPath","u":"/next/api/app","h":"#mountpath","p":15},{"i":24,"t":"Group","u":"/next/api/app","h":"#group","p":15},{"i":26,"t":"Route","u":"/next/api/app","h":"#route","p":15},{"i":28,"t":"Server","u":"/next/api/app","h":"#server","p":15},{"i":30,"t":"Server Shutdown","u":"/next/api/app","h":"#server-shutdown","p":15},{"i":32,"t":"HandlersCount","u":"/next/api/app","h":"#handlerscount","p":15},{"i":34,"t":"Stack","u":"/next/api/app","h":"#stack","p":15},{"i":36,"t":"Name","u":"/next/api/app","h":"#name","p":15},{"i":38,"t":"GetRoute","u":"/next/api/app","h":"#getroute","p":15},{"i":40,"t":"GetRoutes","u":"/next/api/app","h":"#getroutes","p":15},{"i":42,"t":"Config","u":"/next/api/app","h":"#config","p":15},{"i":44,"t":"Handler","u":"/next/api/app","h":"#handler","p":15},{"i":46,"t":"Listen","u":"/next/api/app","h":"#listen","p":15},{"i":48,"t":"ListenTLS","u":"/next/api/app","h":"#listentls","p":15},{"i":50,"t":"ListenTLSWithCertificate","u":"/next/api/app","h":"#listentlswithcertificate","p":15},{"i":52,"t":"ListenMutualTLS","u":"/next/api/app","h":"#listenmutualtls","p":15},{"i":54,"t":"ListenMutualTLSWithCertificate","u":"/next/api/app","h":"#listenmutualtlswithcertificate","p":15},{"i":56,"t":"Listener","u":"/next/api/app","h":"#listener","p":15},{"i":58,"t":"Test","u":"/next/api/app","h":"#test","p":15},{"i":60,"t":"Hooks","u":"/next/api/app","h":"#hooks","p":15},{"i":63,"t":"Start request","u":"/next/api/client","h":"#start-request","p":62},{"i":65,"t":"✨ Agent","u":"/next/api/client","h":"#-agent","p":62},{"i":67,"t":"Parse","u":"/next/api/client","h":"#parse","p":62},{"i":69,"t":"Set","u":"/next/api/client","h":"#set","p":62},{"i":71,"t":"Add","u":"/next/api/client","h":"#add","p":62},{"i":73,"t":"ConnectionClose","u":"/next/api/client","h":"#connectionclose","p":62},{"i":75,"t":"UserAgent","u":"/next/api/client","h":"#useragent","p":62},{"i":77,"t":"Cookie","u":"/next/api/client","h":"#cookie","p":62},{"i":79,"t":"Referer","u":"/next/api/client","h":"#referer","p":62},{"i":81,"t":"ContentType","u":"/next/api/client","h":"#contenttype","p":62},{"i":83,"t":"Host","u":"/next/api/client","h":"#host","p":62},{"i":85,"t":"QueryString","u":"/next/api/client","h":"#querystring","p":62},{"i":87,"t":"BasicAuth","u":"/next/api/client","h":"#basicauth","p":62},{"i":89,"t":"Body","u":"/next/api/client","h":"#body","p":62},{"i":91,"t":"JSON","u":"/next/api/client","h":"#json","p":62},{"i":93,"t":"XML","u":"/next/api/client","h":"#xml","p":62},{"i":95,"t":"Form","u":"/next/api/client","h":"#form","p":62},{"i":97,"t":"MultipartForm","u":"/next/api/client","h":"#multipartform","p":62},{"i":99,"t":"Debug","u":"/next/api/client","h":"#debug","p":62},{"i":101,"t":"Timeout","u":"/next/api/client","h":"#timeout","p":62},{"i":103,"t":"Reuse","u":"/next/api/client","h":"#reuse","p":62},{"i":105,"t":"InsecureSkipVerify","u":"/next/api/client","h":"#insecureskipverify","p":62},{"i":107,"t":"TLSConfig","u":"/next/api/client","h":"#tlsconfig","p":62},{"i":109,"t":"MaxRedirectsCount","u":"/next/api/client","h":"#maxredirectscount","p":62},{"i":111,"t":"JSONEncoder","u":"/next/api/client","h":"#jsonencoder","p":62},{"i":113,"t":"JSONDecoder","u":"/next/api/client","h":"#jsondecoder","p":62},{"i":115,"t":"Request","u":"/next/api/client","h":"#request","p":62},{"i":117,"t":"SetResponse","u":"/next/api/client","h":"#setresponse","p":62},{"i":119,"t":"Dest","u":"/next/api/client","h":"#dest","p":62},{"i":121,"t":"Bytes","u":"/next/api/client","h":"#bytes","p":62},{"i":123,"t":"String","u":"/next/api/client","h":"#string","p":62},{"i":125,"t":"Struct","u":"/next/api/client","h":"#struct","p":62},{"i":127,"t":"RetryIf","u":"/next/api/client","h":"#retryif","p":62},{"i":132,"t":"New","u":"/next/api/fiber","h":"#new","p":131},{"i":134,"t":"Config","u":"/next/api/fiber","h":"#config","p":131},{"i":136,"t":"NewError","u":"/next/api/fiber","h":"#newerror","p":131},{"i":138,"t":"IsChild","u":"/next/api/fiber","h":"#ischild","p":131},{"i":142,"t":"Log levels","u":"/next/api/log","h":"#log-levels","p":140},{"i":144,"t":"Custom log","u":"/next/api/log","h":"#custom-log","p":140},{"i":146,"t":"Print log","u":"/next/api/log","h":"#print-log","p":140},{"i":148,"t":"Global log","u":"/next/api/log","h":"#global-log","p":140},{"i":150,"t":"Set Level","u":"/next/api/log","h":"#set-level","p":140},{"i":152,"t":"Set output","u":"/next/api/log","h":"#set-output","p":140},{"i":154,"t":"Bind context","u":"/next/api/log","h":"#bind-context","p":140},{"i":158,"t":"Signatures","u":"/next/api/middleware/adaptor","h":"#signatures","p":156},{"i":160,"t":"Examples","u":"/next/api/middleware/adaptor","h":"#examples","p":156},{"i":161,"t":"net/http to Fiber","u":"/next/api/middleware/adaptor","h":"#nethttp-to-fiber","p":156},{"i":163,"t":"net/http middleware to Fiber","u":"/next/api/middleware/adaptor","h":"#nethttp-middleware-to-fiber","p":156},{"i":165,"t":"Fiber Handler to net/http","u":"/next/api/middleware/adaptor","h":"#fiber-handler-to-nethttp","p":156},{"i":167,"t":"Fiber App to net/http","u":"/next/api/middleware/adaptor","h":"#fiber-app-to-nethttp","p":156},{"i":169,"t":"Fiber Context to (net/http).Request","u":"/next/api/middleware/adaptor","h":"#fiber-context-to-nethttprequest","p":156},{"i":173,"t":"Signatures","u":"/next/api/middleware/basicauth","h":"#signatures","p":171},{"i":175,"t":"Examples","u":"/next/api/middleware/basicauth","h":"#examples","p":171},{"i":177,"t":"Config","u":"/next/api/middleware/basicauth","h":"#config","p":171},{"i":179,"t":"Default Config","u":"/next/api/middleware/basicauth","h":"#default-config","p":171},{"i":183,"t":"Signatures","u":"/next/api/middleware/cache","h":"#signatures","p":181},{"i":185,"t":"Examples","u":"/next/api/middleware/cache","h":"#examples","p":181},{"i":187,"t":"Config","u":"/next/api/middleware/cache","h":"#config","p":181},{"i":189,"t":"Default Config","u":"/next/api/middleware/cache","h":"#default-config","p":181},{"i":193,"t":"Signatures","u":"/next/api/middleware/compress","h":"#signatures","p":191},{"i":195,"t":"Examples","u":"/next/api/middleware/compress","h":"#examples","p":191},{"i":197,"t":"Config","u":"/next/api/middleware/compress","h":"#config","p":191},{"i":199,"t":"Default Config","u":"/next/api/middleware/compress","h":"#default-config","p":191},{"i":201,"t":"Constants","u":"/next/api/middleware/compress","h":"#constants","p":191},{"i":205,"t":"Signatures","u":"/next/api/middleware/cors","h":"#signatures","p":203},{"i":207,"t":"Examples","u":"/next/api/middleware/cors","h":"#examples","p":203},{"i":209,"t":"Config","u":"/next/api/middleware/cors","h":"#config","p":203},{"i":211,"t":"Default Config","u":"/next/api/middleware/cors","h":"#default-config","p":203},{"i":215,"t":"Signatures","u":"/next/api/middleware/csrf","h":"#signatures","p":213},{"i":217,"t":"Examples","u":"/next/api/middleware/csrf","h":"#examples","p":213},{"i":219,"t":"Config","u":"/next/api/middleware/csrf","h":"#config","p":213},{"i":221,"t":"Default Config","u":"/next/api/middleware/csrf","h":"#default-config","p":213},{"i":223,"t":"Constants","u":"/next/api/middleware/csrf","h":"#constants","p":213},{"i":225,"t":"Custom Storage/Database","u":"/next/api/middleware/csrf","h":"#custom-storagedatabase","p":213},{"i":229,"t":"Signatures","u":"/next/api/middleware/earlydata","h":"#signatures","p":227},{"i":231,"t":"Examples","u":"/next/api/middleware/earlydata","h":"#examples","p":227},{"i":233,"t":"Config","u":"/next/api/middleware/earlydata","h":"#config","p":227},{"i":235,"t":"Default Config","u":"/next/api/middleware/earlydata","h":"#default-config","p":227},{"i":237,"t":"Constants","u":"/next/api/middleware/earlydata","h":"#constants","p":227},{"i":241,"t":"Signatures","u":"/next/api/middleware/encryptcookie","h":"#signatures","p":239},{"i":243,"t":"Examples","u":"/next/api/middleware/encryptcookie","h":"#examples","p":239},{"i":245,"t":"Config","u":"/next/api/middleware/encryptcookie","h":"#config","p":239},{"i":247,"t":"Default Config","u":"/next/api/middleware/encryptcookie","h":"#default-config","p":239},{"i":249,"t":"Usage of CSRF and Encryptcookie Middlewares with Custom Cookie Names","u":"/next/api/middleware/encryptcookie","h":"#usage-of-csrf-and-encryptcookie-middlewares-with-custom-cookie-names","p":239},{"i":253,"t":"Signatures","u":"/next/api/middleware/envvar","h":"#signatures","p":251},{"i":255,"t":"Examples","u":"/next/api/middleware/envvar","h":"#examples","p":251},{"i":257,"t":"Response","u":"/next/api/middleware/envvar","h":"#response","p":251},{"i":259,"t":"Config","u":"/next/api/middleware/envvar","h":"#config","p":251},{"i":261,"t":"Default Config","u":"/next/api/middleware/envvar","h":"#default-config","p":251},{"i":265,"t":"Signatures","u":"/next/api/middleware/etag","h":"#signatures","p":263},{"i":267,"t":"Examples","u":"/next/api/middleware/etag","h":"#examples","p":263},{"i":269,"t":"Config","u":"/next/api/middleware/etag","h":"#config","p":263},{"i":271,"t":"Default Config","u":"/next/api/middleware/etag","h":"#default-config","p":263},{"i":275,"t":"Signatures","u":"/next/api/middleware/expvar","h":"#signatures","p":273},{"i":277,"t":"Examples","u":"/next/api/middleware/expvar","h":"#examples","p":273},{"i":279,"t":"Config","u":"/next/api/middleware/expvar","h":"#config","p":273},{"i":281,"t":"Default Config","u":"/next/api/middleware/expvar","h":"#default-config","p":273},{"i":285,"t":"Signatures","u":"/next/api/middleware/favicon","h":"#signatures","p":283},{"i":287,"t":"Examples","u":"/next/api/middleware/favicon","h":"#examples","p":283},{"i":289,"t":"Config","u":"/next/api/middleware/favicon","h":"#config","p":283},{"i":291,"t":"Default Config","u":"/next/api/middleware/favicon","h":"#default-config","p":283},{"i":295,"t":"Signatures","u":"/next/api/middleware/filesystem","h":"#signatures","p":293},{"i":297,"t":"Examples","u":"/next/api/middleware/filesystem","h":"#examples","p":293},{"i":299,"t":"embed","u":"/next/api/middleware/filesystem","h":"#embed","p":293},{"i":301,"t":"pkger","u":"/next/api/middleware/filesystem","h":"#pkger","p":293},{"i":303,"t":"packr","u":"/next/api/middleware/filesystem","h":"#packr","p":293},{"i":305,"t":"go.rice","u":"/next/api/middleware/filesystem","h":"#gorice","p":293},{"i":307,"t":"fileb0x","u":"/next/api/middleware/filesystem","h":"#fileb0x","p":293},{"i":309,"t":"statik","u":"/next/api/middleware/filesystem","h":"#statik","p":293},{"i":311,"t":"Config","u":"/next/api/middleware/filesystem","h":"#config","p":293},{"i":313,"t":"Default Config","u":"/next/api/middleware/filesystem","h":"#default-config","p":293},{"i":317,"t":"Signatures","u":"/next/api/middleware/helmet","h":"#signatures","p":315},{"i":319,"t":"Examples","u":"/next/api/middleware/helmet","h":"#examples","p":315},{"i":321,"t":"Config","u":"/next/api/middleware/helmet","h":"#config","p":315},{"i":323,"t":"Default Config","u":"/next/api/middleware/helmet","h":"#default-config","p":315},{"i":327,"t":"Signatures","u":"/next/api/middleware/idempotency","h":"#signatures","p":325},{"i":329,"t":"Examples","u":"/next/api/middleware/idempotency","h":"#examples","p":325},{"i":331,"t":"Default Config","u":"/next/api/middleware/idempotency","h":"#default-config","p":325},{"i":333,"t":"Custom Config","u":"/next/api/middleware/idempotency","h":"#custom-config","p":325},{"i":335,"t":"Config","u":"/next/api/middleware/idempotency","h":"#config","p":325},{"i":337,"t":"Default Config","u":"/next/api/middleware/idempotency","h":"#default-config-1","p":325},{"i":341,"t":"Signatures","u":"/next/api/middleware/keyauth","h":"#signatures","p":339},{"i":343,"t":"Examples","u":"/next/api/middleware/keyauth","h":"#examples","p":339},{"i":345,"t":"Authenticate only certain endpoints","u":"/next/api/middleware/keyauth","h":"#authenticate-only-certain-endpoints","p":339},{"i":347,"t":"Specifying middleware in the handler","u":"/next/api/middleware/keyauth","h":"#specifying-middleware-in-the-handler","p":339},{"i":349,"t":"Config","u":"/next/api/middleware/keyauth","h":"#config","p":339},{"i":351,"t":"Default Config","u":"/next/api/middleware/keyauth","h":"#default-config","p":339},{"i":355,"t":"Signatures","u":"/next/api/middleware/limiter","h":"#signatures","p":353},{"i":357,"t":"Examples","u":"/next/api/middleware/limiter","h":"#examples","p":353},{"i":359,"t":"Sliding window","u":"/next/api/middleware/limiter","h":"#sliding-window","p":353},{"i":361,"t":"Config","u":"/next/api/middleware/limiter","h":"#config","p":353},{"i":363,"t":"Default Config","u":"/next/api/middleware/limiter","h":"#default-config","p":353},{"i":365,"t":"Custom Storage/Database","u":"/next/api/middleware/limiter","h":"#custom-storagedatabase","p":353},{"i":369,"t":"Signatures","u":"/next/api/middleware/logger","h":"#signatures","p":367},{"i":371,"t":"Examples","u":"/next/api/middleware/logger","h":"#examples","p":367},{"i":373,"t":"Config","u":"/next/api/middleware/logger","h":"#config","p":367},{"i":375,"t":"Default Config","u":"/next/api/middleware/logger","h":"#default-config","p":367},{"i":377,"t":"Constants","u":"/next/api/middleware/logger","h":"#constants","p":367},{"i":381,"t":"Signatures","u":"/next/api/middleware/monitor","h":"#signatures","p":379},{"i":383,"t":"Examples","u":"/next/api/middleware/monitor","h":"#examples","p":379},{"i":385,"t":"Config","u":"/next/api/middleware/monitor","h":"#config","p":379},{"i":387,"t":"Default Config","u":"/next/api/middleware/monitor","h":"#default-config","p":379},{"i":391,"t":"Signatures","u":"/next/api/middleware/pprof","h":"#signatures","p":389},{"i":393,"t":"Examples","u":"/next/api/middleware/pprof","h":"#examples","p":389},{"i":395,"t":"Config","u":"/next/api/middleware/pprof","h":"#config","p":389},{"i":397,"t":"Default Config","u":"/next/api/middleware/pprof","h":"#default-config","p":389},{"i":401,"t":"Signatures","u":"/next/api/middleware/proxy","h":"#signatures","p":399},{"i":403,"t":"Examples","u":"/next/api/middleware/proxy","h":"#examples","p":399},{"i":405,"t":"Config","u":"/next/api/middleware/proxy","h":"#config","p":399},{"i":407,"t":"Default Config","u":"/next/api/middleware/proxy","h":"#default-config","p":399},{"i":411,"t":"Signatures","u":"/next/api/middleware/recover","h":"#signatures","p":409},{"i":413,"t":"Examples","u":"/next/api/middleware/recover","h":"#examples","p":409},{"i":415,"t":"Config","u":"/next/api/middleware/recover","h":"#config","p":409},{"i":417,"t":"Default Config","u":"/next/api/middleware/recover","h":"#default-config","p":409},{"i":421,"t":"Signatures","u":"/next/api/middleware/redirect","h":"#signatures","p":419},{"i":423,"t":"Examples","u":"/next/api/middleware/redirect","h":"#examples","p":419},{"i":425,"t":"Config","u":"/next/api/middleware/redirect","h":"#config","p":419},{"i":427,"t":"Default Config","u":"/next/api/middleware/redirect","h":"#default-config","p":419},{"i":431,"t":"Signatures","u":"/next/api/middleware/requestid","h":"#signatures","p":429},{"i":433,"t":"Examples","u":"/next/api/middleware/requestid","h":"#examples","p":429},{"i":435,"t":"Config","u":"/next/api/middleware/requestid","h":"#config","p":429},{"i":437,"t":"Default Config","u":"/next/api/middleware/requestid","h":"#default-config","p":429},{"i":441,"t":"Signatures","u":"/next/api/middleware/rewrite","h":"#signatures","p":439},{"i":443,"t":"Examples","u":"/next/api/middleware/rewrite","h":"#examples","p":439},{"i":447,"t":"Signatures","u":"/next/api/middleware/session","h":"#signatures","p":445},{"i":449,"t":"Examples","u":"/next/api/middleware/session","h":"#examples","p":445},{"i":451,"t":"Config","u":"/next/api/middleware/session","h":"#config","p":445},{"i":453,"t":"Default Config","u":"/next/api/middleware/session","h":"#default-config","p":445},{"i":455,"t":"Constants","u":"/next/api/middleware/session","h":"#constants","p":445},{"i":457,"t":"Custom Storage/Database","u":"/next/api/middleware/session","h":"#custom-storagedatabase","p":445},{"i":461,"t":"Signatures","u":"/next/api/middleware/skip","h":"#signatures","p":459},{"i":463,"t":"Examples","u":"/next/api/middleware/skip","h":"#examples","p":459},{"i":467,"t":"Signatures","u":"/next/api/middleware/timeout","h":"#signatures","p":465},{"i":469,"t":"Examples","u":"/next/api/middleware/timeout","h":"#examples","p":465},{"i":472,"t":"TechEmpower","u":"/next/extra/benchmarks","h":"#techempower","p":471},{"i":474,"t":"Plaintext","u":"/next/extra/benchmarks","h":"#plaintext","p":471},{"i":476,"t":"Data Updates","u":"/next/extra/benchmarks","h":"#data-updates","p":471},{"i":478,"t":"Multiple Queries","u":"/next/extra/benchmarks","h":"#multiple-queries","p":471},{"i":480,"t":"Single Query","u":"/next/extra/benchmarks","h":"#single-query","p":471},{"i":482,"t":"JSON Serialization","u":"/next/extra/benchmarks","h":"#json-serialization","p":471},{"i":484,"t":"Go web framework benchmark","u":"/next/extra/benchmarks","h":"#go-web-framework-benchmark","p":471},{"i":487,"t":"How should I structure my application?","u":"/next/extra/faq","h":"#how-should-i-structure-my-application","p":486},{"i":489,"t":"How do I handle custom 404 responses?","u":"/next/extra/faq","h":"#how-do-i-handle-custom-404-responses","p":486},{"i":491,"t":"How can i use live reload ?","u":"/next/extra/faq","h":"#how-can-i-use-live-reload-","p":486},{"i":493,"t":"How do I set up an error handler?","u":"/next/extra/faq","h":"#how-do-i-set-up-an-error-handler","p":486},{"i":495,"t":"Which template engines does Fiber support?","u":"/next/extra/faq","h":"#which-template-engines-does-fiber-support","p":486},{"i":497,"t":"Does Fiber have a community chat?","u":"/next/extra/faq","h":"#does-fiber-have-a-community-chat","p":486},{"i":499,"t":"Does fiber support sub domain routing ?","u":"/next/extra/faq","h":"#does-fiber-support-sub-domain-routing-","p":486},{"i":502,"t":"Catching Errors","u":"/next/guide/error-handling","h":"#catching-errors","p":501},{"i":504,"t":"Default Error Handler","u":"/next/guide/error-handling","h":"#default-error-handler","p":501},{"i":506,"t":"Custom Error Handler","u":"/next/guide/error-handling","h":"#custom-error-handler","p":501},{"i":509,"t":"Custom JSON Encoder/Decoder","u":"/next/guide/faster-fiber","h":"#custom-json-encoderdecoder","p":508},{"i":511,"t":"References","u":"/next/guide/faster-fiber","h":"#references","p":508},{"i":515,"t":"Paths","u":"/next/guide/grouping","h":"#paths","p":513},{"i":517,"t":"Group Handlers","u":"/next/guide/grouping","h":"#group-handlers","p":513},{"i":521,"t":"Constants","u":"/next/guide/hooks","h":"#constants","p":519},{"i":523,"t":"OnRoute","u":"/next/guide/hooks","h":"#onroute","p":519},{"i":525,"t":"OnName","u":"/next/guide/hooks","h":"#onname","p":519},{"i":527,"t":"OnGroup","u":"/next/guide/hooks","h":"#ongroup","p":519},{"i":529,"t":"OnGroupName","u":"/next/guide/hooks","h":"#ongroupname","p":519},{"i":531,"t":"OnListen","u":"/next/guide/hooks","h":"#onlisten","p":519},{"i":533,"t":"OnFork","u":"/next/guide/hooks","h":"#onfork","p":519},{"i":535,"t":"OnShutdown","u":"/next/guide/hooks","h":"#onshutdown","p":519},{"i":537,"t":"OnMount","u":"/next/guide/hooks","h":"#onmount","p":519},{"i":540,"t":"Handlers","u":"/next/guide/routing","h":"#handlers","p":539},{"i":542,"t":"Paths","u":"/next/guide/routing","h":"#paths","p":539},{"i":544,"t":"Parameters","u":"/next/guide/routing","h":"#parameters","p":539},{"i":546,"t":"Constraints","u":"/next/guide/routing","h":"#constraints","p":539},{"i":548,"t":"Middleware","u":"/next/guide/routing","h":"#middleware","p":539},{"i":550,"t":"Grouping","u":"/next/guide/routing","h":"#grouping","p":539},{"i":553,"t":"Template interfaces","u":"/next/guide/templates","h":"#template-interfaces","p":552},{"i":555,"t":"Engines","u":"/next/guide/templates","h":"#engines","p":552},{"i":558,"t":"Validator package","u":"/next/guide/validation","h":"#validator-package","p":557},{"i":563,"t":"Accepts","u":"/next/api/ctx","h":"#accepts","p":562},{"i":565,"t":"AllParams","u":"/next/api/ctx","h":"#allparams","p":562},{"i":567,"t":"App","u":"/next/api/ctx","h":"#app","p":562},{"i":569,"t":"Append","u":"/next/api/ctx","h":"#append","p":562},{"i":571,"t":"Attachment","u":"/next/api/ctx","h":"#attachment","p":562},{"i":573,"t":"BaseURL","u":"/next/api/ctx","h":"#baseurl","p":562},{"i":575,"t":"Bind","u":"/next/api/ctx","h":"#bind","p":562},{"i":577,"t":"Body","u":"/next/api/ctx","h":"#body","p":562},{"i":579,"t":"BodyParser","u":"/next/api/ctx","h":"#bodyparser","p":562},{"i":581,"t":"ClearCookie","u":"/next/api/ctx","h":"#clearcookie","p":562},{"i":583,"t":"ClientHelloInfo","u":"/next/api/ctx","h":"#clienthelloinfo","p":562},{"i":585,"t":"Context","u":"/next/api/ctx","h":"#context","p":562},{"i":587,"t":"Cookie","u":"/next/api/ctx","h":"#cookie","p":562},{"i":589,"t":"Cookies","u":"/next/api/ctx","h":"#cookies","p":562},{"i":591,"t":"Download","u":"/next/api/ctx","h":"#download","p":562},{"i":593,"t":"Format","u":"/next/api/ctx","h":"#format","p":562},{"i":595,"t":"FormFile","u":"/next/api/ctx","h":"#formfile","p":562},{"i":597,"t":"FormValue","u":"/next/api/ctx","h":"#formvalue","p":562},{"i":599,"t":"Fresh","u":"/next/api/ctx","h":"#fresh","p":562},{"i":601,"t":"Get","u":"/next/api/ctx","h":"#get","p":562},{"i":603,"t":"GetReqHeaders","u":"/next/api/ctx","h":"#getreqheaders","p":562},{"i":605,"t":"GetRespHeader","u":"/next/api/ctx","h":"#getrespheader","p":562},{"i":607,"t":"GetRespHeaders","u":"/next/api/ctx","h":"#getrespheaders","p":562},{"i":609,"t":"GetRouteURL","u":"/next/api/ctx","h":"#getrouteurl","p":562},{"i":611,"t":"Hostname","u":"/next/api/ctx","h":"#hostname","p":562},{"i":613,"t":"IP","u":"/next/api/ctx","h":"#ip","p":562},{"i":615,"t":"IPs","u":"/next/api/ctx","h":"#ips","p":562},{"i":617,"t":"Is","u":"/next/api/ctx","h":"#is","p":562},{"i":619,"t":"IsFromLocal","u":"/next/api/ctx","h":"#isfromlocal","p":562},{"i":621,"t":"JSON","u":"/next/api/ctx","h":"#json","p":562},{"i":623,"t":"JSONP","u":"/next/api/ctx","h":"#jsonp","p":562},{"i":625,"t":"Links","u":"/next/api/ctx","h":"#links","p":562},{"i":627,"t":"Locals","u":"/next/api/ctx","h":"#locals","p":562},{"i":629,"t":"Location","u":"/next/api/ctx","h":"#location","p":562},{"i":631,"t":"Method","u":"/next/api/ctx","h":"#method","p":562},{"i":633,"t":"MultipartForm","u":"/next/api/ctx","h":"#multipartform","p":562},{"i":635,"t":"Next","u":"/next/api/ctx","h":"#next","p":562},{"i":637,"t":"OriginalURL","u":"/next/api/ctx","h":"#originalurl","p":562},{"i":639,"t":"Params","u":"/next/api/ctx","h":"#params","p":562},{"i":641,"t":"ParamsInt","u":"/next/api/ctx","h":"#paramsint","p":562},{"i":643,"t":"ParamsParser","u":"/next/api/ctx","h":"#paramsparser","p":562},{"i":645,"t":"Path","u":"/next/api/ctx","h":"#path","p":562},{"i":647,"t":"Protocol","u":"/next/api/ctx","h":"#protocol","p":562},{"i":649,"t":"Queries","u":"/next/api/ctx","h":"#queries","p":562},{"i":651,"t":"Query","u":"/next/api/ctx","h":"#query","p":562},{"i":653,"t":"QueryBool","u":"/next/api/ctx","h":"#querybool","p":562},{"i":655,"t":"QueryFloat","u":"/next/api/ctx","h":"#queryfloat","p":562},{"i":657,"t":"QueryInt","u":"/next/api/ctx","h":"#queryint","p":562},{"i":659,"t":"QueryParser","u":"/next/api/ctx","h":"#queryparser","p":562},{"i":661,"t":"Range","u":"/next/api/ctx","h":"#range","p":562},{"i":663,"t":"Redirect","u":"/next/api/ctx","h":"#redirect","p":562},{"i":665,"t":"RedirectToRoute","u":"/next/api/ctx","h":"#redirecttoroute","p":562},{"i":667,"t":"RedirectBack","u":"/next/api/ctx","h":"#redirectback","p":562},{"i":669,"t":"Render","u":"/next/api/ctx","h":"#render","p":562},{"i":671,"t":"Request","u":"/next/api/ctx","h":"#request","p":562},{"i":673,"t":"ReqHeaderParser","u":"/next/api/ctx","h":"#reqheaderparser","p":562},{"i":675,"t":"Response","u":"/next/api/ctx","h":"#response","p":562},{"i":677,"t":"RestartRouting","u":"/next/api/ctx","h":"#restartrouting","p":562},{"i":679,"t":"Route","u":"/next/api/ctx","h":"#route","p":562},{"i":681,"t":"SaveFile","u":"/next/api/ctx","h":"#savefile","p":562},{"i":683,"t":"SaveFileToStorage","u":"/next/api/ctx","h":"#savefiletostorage","p":562},{"i":685,"t":"Secure","u":"/next/api/ctx","h":"#secure","p":562},{"i":687,"t":"Send","u":"/next/api/ctx","h":"#send","p":562},{"i":689,"t":"SendFile","u":"/next/api/ctx","h":"#sendfile","p":562},{"i":691,"t":"SendStatus","u":"/next/api/ctx","h":"#sendstatus","p":562},{"i":693,"t":"Set","u":"/next/api/ctx","h":"#set","p":562},{"i":695,"t":"SetParserDecoder","u":"/next/api/ctx","h":"#setparserdecoder","p":562},{"i":697,"t":"SetUserContext","u":"/next/api/ctx","h":"#setusercontext","p":562},{"i":699,"t":"Stale","u":"/next/api/ctx","h":"#stale","p":562},{"i":701,"t":"Status","u":"/next/api/ctx","h":"#status","p":562},{"i":703,"t":"Subdomains","u":"/next/api/ctx","h":"#subdomains","p":562},{"i":705,"t":"Type","u":"/next/api/ctx","h":"#type","p":562},{"i":707,"t":"UserContext","u":"/next/api/ctx","h":"#usercontext","p":562},{"i":709,"t":"Vary","u":"/next/api/ctx","h":"#vary","p":562},{"i":711,"t":"Write","u":"/next/api/ctx","h":"#write","p":562},{"i":713,"t":"Writef","u":"/next/api/ctx","h":"#writef","p":562},{"i":715,"t":"WriteString","u":"/next/api/ctx","h":"#writestring","p":562},{"i":717,"t":"XHR","u":"/next/api/ctx","h":"#xhr","p":562},{"i":719,"t":"XML","u":"/next/api/ctx","h":"#xml","p":562}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3",[0,5.942]],["t/5",[1,4.415,2,4.415]],["t/7",[3,4.415,4,4.415]],["t/9",[5,4.415,6,3.346]],["t/11",[7,3.995,8,4.415]],["t/13",[9,5.942]],["t/16",[7,5.377]],["t/18",[6,3.346,10,2.897]],["t/20",[11,5.942]],["t/22",[12,5.942]],["t/24",[13,5.004]],["t/26",[6,4.504]],["t/28",[14,5.377]],["t/30",[14,3.995,15,4.415]],["t/32",[16,5.942]],["t/34",[17,5.942]],["t/36",[18,5.377]],["t/38",[19,5.377]],["t/40",[19,5.377]],["t/42",[20,2.007]],["t/44",[10,3.899]],["t/46",[21,5.377]],["t/48",[22,5.942]],["t/50",[23,5.942]],["t/52",[24,5.942]],["t/54",[25,5.942]],["t/56",[21,5.377]],["t/58",[26,5.942]],["t/60",[27,5.942]],["t/63",[28,4.415,29,3.718]],["t/65",[30,3.718,31,4.415]],["t/67",[32,5.942]],["t/69",[33,4.504]],["t/71",[34,5.942]],["t/73",[35,5.942]],["t/75",[36,5.942]],["t/77",[37,4.726]],["t/79",[38,5.377]],["t/81",[39,5.942]],["t/83",[40,5.942]],["t/85",[41,5.942]],["t/87",[42,5.942]],["t/89",[43,5.377]],["t/91",[44,4.726]],["t/93",[45,5.377]],["t/95",[46,5.942]],["t/97",[47,5.377]],["t/99",[48,5.942]],["t/101",[49,5.942]],["t/103",[50,5.942]],["t/105",[51,5.942]],["t/107",[52,5.942]],["t/109",[53,5.942]],["t/111",[54,5.942]],["t/113",[55,5.942]],["t/115",[29,5.004]],["t/117",[56,5.942]],["t/119",[57,5.942]],["t/121",[58,5.942]],["t/123",[59,5.942]],["t/125",[60,5.942]],["t/127",[61,5.942]],["t/132",[62,5.942]],["t/134",[20,2.007]],["t/136",[63,5.942]],["t/138",[64,5.942]],["t/142",[65,3.511,66,3.995]],["t/144",[65,3.511,67,2.897]],["t/146",[65,3.511,68,4.415]],["t/148",[65,3.511,69,4.415]],["t/150",[33,3.346,66,3.995]],["t/152",[33,3.346,70,4.415]],["t/154",[71,3.995,72,3.718]],["t/158",[73,2.683]],["t/160",[74,2.683]],["t/161",[75,3.511,76,2.988]],["t/163",[75,2.793,76,2.377,77,2.793]],["t/165",[10,2.304,75,2.793,76,2.377]],["t/167",[75,2.793,76,2.377,78,3.178]],["t/169",[72,2.958,76,2.377,79,3.512]],["t/173",[73,2.683]],["t/175",[74,2.683]],["t/177",[20,2.007]],["t/179",[20,1.491,80,2.053]],["t/183",[73,2.683]],["t/185",[74,2.683]],["t/187",[20,2.007]],["t/189",[20,1.491,80,2.053]],["t/193",[73,2.683]],["t/195",[74,2.683]],["t/197",[20,2.007]],["t/199",[20,1.491,80,2.053]],["t/201",[81,4.319]],["t/205",[73,2.683]],["t/207",[74,2.683]],["t/209",[20,2.007]],["t/211",[20,1.491,80,2.053]],["t/215",[73,2.683]],["t/217",[74,2.683]],["t/219",[20,2.007]],["t/221",[20,1.491,80,2.053]],["t/223",[81,4.319]],["t/225",[67,2.897,82,3.718]],["t/229",[73,2.683]],["t/231",[74,2.683]],["t/233",[20,2.007]],["t/235",[20,1.491,80,2.053]],["t/237",[81,4.319]],["t/241",[73,2.683]],["t/243",[74,2.683]],["t/245",[20,2.007]],["t/247",[20,1.491,80,2.053]],["t/249",[18,1.748,37,1.536,67,1.268,77,1.536,83,1.932,84,1.932,85,1.932]],["t/253",[73,2.683]],["t/255",[74,2.683]],["t/257",[86,5.004]],["t/259",[20,2.007]],["t/261",[20,1.491,80,2.053]],["t/265",[73,2.683]],["t/267",[74,2.683]],["t/269",[20,2.007]],["t/271",[20,1.491,80,2.053]],["t/275",[73,2.683]],["t/277",[74,2.683]],["t/279",[20,2.007]],["t/281",[20,1.491,80,2.053]],["t/285",[73,2.683]],["t/287",[74,2.683]],["t/289",[20,2.007]],["t/291",[20,1.491,80,2.053]],["t/295",[73,2.683]],["t/297",[74,2.683]],["t/299",[87,5.942]],["t/301",[88,5.942]],["t/303",[89,5.942]],["t/305",[90,5.942]],["t/307",[91,5.942]],["t/309",[92,5.942]],["t/311",[20,2.007]],["t/313",[20,1.491,80,2.053]],["t/317",[73,2.683]],["t/319",[74,2.683]],["t/321",[20,2.007]],["t/323",[20,1.491,80,2.053]],["t/327",[73,2.683]],["t/329",[74,2.683]],["t/331",[20,1.491,80,2.053]],["t/333",[20,1.491,67,2.897]],["t/335",[20,2.007]],["t/337",[20,1.491,80,2.053]],["t/341",[73,2.683]],["t/343",[74,2.683]],["t/345",[93,3.512,94,3.512,95,3.512]],["t/347",[10,2.304,77,2.793,96,3.512]],["t/349",[20,2.007]],["t/351",[20,1.491,80,2.053]],["t/355",[73,2.683]],["t/357",[74,2.683]],["t/359",[97,4.415,98,4.415]],["t/361",[20,2.007]],["t/363",[20,1.491,80,2.053]],["t/365",[67,2.897,82,3.718]],["t/369",[73,2.683]],["t/371",[74,2.683]],["t/373",[20,2.007]],["t/375",[20,1.491,80,2.053]],["t/377",[81,4.319]],["t/381",[73,2.683]],["t/383",[74,2.683]],["t/385",[20,2.007]],["t/387",[20,1.491,80,2.053]],["t/391",[73,2.683]],["t/393",[74,2.683]],["t/395",[20,2.007]],["t/397",[20,1.491,80,2.053]],["t/401",[73,2.683]],["t/403",[74,2.683]],["t/405",[20,2.007]],["t/407",[20,1.491,80,2.053]],["t/411",[73,2.683]],["t/413",[74,2.683]],["t/415",[20,2.007]],["t/417",[20,1.491,80,2.053]],["t/421",[73,2.683]],["t/423",[74,2.683]],["t/425",[20,2.007]],["t/427",[20,1.491,80,2.053]],["t/431",[73,2.683]],["t/433",[74,2.683]],["t/435",[20,2.007]],["t/437",[20,1.491,80,2.053]],["t/441",[73,2.683]],["t/443",[74,2.683]],["t/447",[73,2.683]],["t/449",[74,2.683]],["t/451",[20,2.007]],["t/453",[20,1.491,80,2.053]],["t/455",[81,4.319]],["t/457",[67,2.897,82,3.718]],["t/461",[73,2.683]],["t/463",[74,2.683]],["t/467",[73,2.683]],["t/469",[74,2.683]],["t/472",[99,5.942]],["t/474",[100,5.942]],["t/476",[101,4.415,102,4.415]],["t/478",[103,4.415,104,3.511]],["t/480",[104,3.511,105,4.415]],["t/482",[44,3.511,106,4.415]],["t/484",[107,2.916,108,2.916,109,2.916,110,2.916]],["t/487",[111,4.415,112,4.415]],["t/489",[67,1.913,86,2.455,113,2.916,114,2.916]],["t/491",[30,2.455,115,2.916,116,2.916,117,2.916]],["t/493",[10,1.913,33,2.21,118,2.916,119,2.319]],["t/495",[76,1.974,120,2.638,121,2.638,122,2.638]],["t/497",[76,2.377,123,3.512,124,3.512]],["t/499",[6,1.65,30,1.833,76,1.473,122,1.969,125,2.176,126,2.176]],["t/502",[119,3.511,127,4.415]],["t/504",[10,2.304,80,1.633,119,2.793]],["t/506",[10,2.304,67,2.304,119,2.793]],["t/509",[44,2.793,67,2.304,128,3.512]],["t/511",[38,5.377]],["t/515",[129,5.004]],["t/517",[10,2.897,13,3.718]],["t/521",[81,4.319]],["t/523",[130,5.942]],["t/525",[131,5.942]],["t/527",[132,5.942]],["t/529",[133,5.942]],["t/531",[134,5.942]],["t/533",[135,5.942]],["t/535",[136,5.942]],["t/537",[137,5.942]],["t/540",[10,3.899]],["t/542",[129,5.004]],["t/544",[138,5.942]],["t/546",[139,5.942]],["t/548",[77,4.726]],["t/550",[13,5.004]],["t/553",[120,3.995,140,4.415]],["t/555",[121,5.377]],["t/558",[141,4.415,142,4.415]],["t/563",[143,5.942]],["t/565",[144,5.942]],["t/567",[78,5.377]],["t/569",[145,5.942]],["t/571",[146,5.942]],["t/573",[147,5.942]],["t/575",[71,5.377]],["t/577",[43,5.377]],["t/579",[148,5.942]],["t/581",[149,5.942]],["t/583",[150,5.942]],["t/585",[72,5.004]],["t/587",[37,4.726]],["t/589",[37,4.726]],["t/591",[151,5.942]],["t/593",[152,5.942]],["t/595",[153,5.942]],["t/597",[154,5.942]],["t/599",[155,5.942]],["t/601",[]],["t/603",[156,5.942]],["t/605",[157,5.377]],["t/607",[157,5.377]],["t/609",[158,5.942]],["t/611",[159,5.942]],["t/613",[160,5.377]],["t/615",[160,5.377]],["t/617",[]],["t/619",[161,5.942]],["t/621",[44,4.726]],["t/623",[162,5.942]],["t/625",[163,5.942]],["t/627",[164,5.942]],["t/629",[165,5.942]],["t/631",[166,5.942]],["t/633",[47,5.377]],["t/635",[167,5.942]],["t/637",[168,5.942]],["t/639",[169,5.942]],["t/641",[170,5.942]],["t/643",[171,5.942]],["t/645",[129,5.004]],["t/647",[172,5.942]],["t/649",[104,4.726]],["t/651",[104,4.726]],["t/653",[173,5.942]],["t/655",[174,5.942]],["t/657",[175,5.942]],["t/659",[176,5.942]],["t/661",[177,5.942]],["t/663",[178,5.942]],["t/665",[179,5.942]],["t/667",[180,5.942]],["t/669",[181,5.942]],["t/671",[29,5.004]],["t/673",[182,5.942]],["t/675",[86,5.004]],["t/677",[183,5.942]],["t/679",[6,4.504]],["t/681",[184,5.942]],["t/683",[185,5.942]],["t/685",[186,5.942]],["t/687",[187,5.942]],["t/689",[188,5.942]],["t/691",[189,5.942]],["t/693",[33,4.504]],["t/695",[190,5.942]],["t/697",[191,5.942]],["t/699",[192,5.942]],["t/701",[193,5.942]],["t/703",[194,5.942]],["t/705",[195,5.942]],["t/707",[196,5.942]],["t/709",[197,5.942]],["t/711",[198,5.942]],["t/713",[199,5.942]],["t/715",[200,5.942]],["t/717",[201,5.942]],["t/719",[45,5.377]]],"invertedIndex":[["",{"_index":30,"t":{"65":{"position":[[0,1]]},"491":{"position":[[26,1]]},"499":{"position":[[38,1]]}}}],["404",{"_index":114,"t":{"489":{"position":[[23,3]]}}}],["accept",{"_index":143,"t":{"563":{"position":[[0,7]]}}}],["add",{"_index":34,"t":{"71":{"position":[[0,3]]}}}],["agent",{"_index":31,"t":{"65":{"position":[[2,5]]}}}],["alloc",{"_index":2,"t":{"5":{"position":[[5,10]]}}}],["allparam",{"_index":144,"t":{"565":{"position":[[0,9]]}}}],["app",{"_index":78,"t":{"167":{"position":[[6,3]]},"567":{"position":[[0,3]]}}}],["append",{"_index":145,"t":{"569":{"position":[[0,6]]}}}],["applic",{"_index":112,"t":{"487":{"position":[[26,12]]}}}],["attach",{"_index":146,"t":{"571":{"position":[[0,10]]}}}],["authent",{"_index":93,"t":{"345":{"position":[[0,12]]}}}],["baseurl",{"_index":147,"t":{"573":{"position":[[0,7]]}}}],["basic",{"_index":5,"t":{"9":{"position":[[0,5]]}}}],["basicauth",{"_index":42,"t":{"87":{"position":[[0,9]]}}}],["benchmark",{"_index":110,"t":{"484":{"position":[[17,9]]}}}],["bind",{"_index":71,"t":{"154":{"position":[[0,4]]},"575":{"position":[[0,4]]}}}],["bodi",{"_index":43,"t":{"89":{"position":[[0,4]]},"577":{"position":[[0,4]]}}}],["bodypars",{"_index":148,"t":{"579":{"position":[[0,10]]}}}],["byte",{"_index":58,"t":{"121":{"position":[[0,5]]}}}],["catch",{"_index":127,"t":{"502":{"position":[[0,8]]}}}],["certain",{"_index":94,"t":{"345":{"position":[[18,7]]}}}],["chat",{"_index":124,"t":{"497":{"position":[[28,5]]}}}],["clearcooki",{"_index":149,"t":{"581":{"position":[[0,11]]}}}],["clienthelloinfo",{"_index":150,"t":{"583":{"position":[[0,15]]}}}],["commun",{"_index":123,"t":{"497":{"position":[[18,9]]}}}],["config",{"_index":20,"t":{"42":{"position":[[0,6]]},"134":{"position":[[0,6]]},"177":{"position":[[0,6]]},"179":{"position":[[8,6]]},"187":{"position":[[0,6]]},"189":{"position":[[8,6]]},"197":{"position":[[0,6]]},"199":{"position":[[8,6]]},"209":{"position":[[0,6]]},"211":{"position":[[8,6]]},"219":{"position":[[0,6]]},"221":{"position":[[8,6]]},"233":{"position":[[0,6]]},"235":{"position":[[8,6]]},"245":{"position":[[0,6]]},"247":{"position":[[8,6]]},"259":{"position":[[0,6]]},"261":{"position":[[8,6]]},"269":{"position":[[0,6]]},"271":{"position":[[8,6]]},"279":{"position":[[0,6]]},"281":{"position":[[8,6]]},"289":{"position":[[0,6]]},"291":{"position":[[8,6]]},"311":{"position":[[0,6]]},"313":{"position":[[8,6]]},"321":{"position":[[0,6]]},"323":{"position":[[8,6]]},"331":{"position":[[8,6]]},"333":{"position":[[7,6]]},"335":{"position":[[0,6]]},"337":{"position":[[8,6]]},"349":{"position":[[0,6]]},"351":{"position":[[8,6]]},"361":{"position":[[0,6]]},"363":{"position":[[8,6]]},"373":{"position":[[0,6]]},"375":{"position":[[8,6]]},"385":{"position":[[0,6]]},"387":{"position":[[8,6]]},"395":{"position":[[0,6]]},"397":{"position":[[8,6]]},"405":{"position":[[0,6]]},"407":{"position":[[8,6]]},"415":{"position":[[0,6]]},"417":{"position":[[8,6]]},"425":{"position":[[0,6]]},"427":{"position":[[8,6]]},"435":{"position":[[0,6]]},"437":{"position":[[8,6]]},"451":{"position":[[0,6]]},"453":{"position":[[8,6]]}}}],["connectionclos",{"_index":35,"t":{"73":{"position":[[0,15]]}}}],["constant",{"_index":81,"t":{"201":{"position":[[0,9]]},"223":{"position":[[0,9]]},"237":{"position":[[0,9]]},"377":{"position":[[0,9]]},"455":{"position":[[0,9]]},"521":{"position":[[0,9]]}}}],["constraint",{"_index":139,"t":{"546":{"position":[[0,11]]}}}],["contenttyp",{"_index":39,"t":{"81":{"position":[[0,11]]}}}],["context",{"_index":72,"t":{"154":{"position":[[5,7]]},"169":{"position":[[6,7]]},"585":{"position":[[0,7]]}}}],["cooki",{"_index":37,"t":{"77":{"position":[[0,6]]},"249":{"position":[[56,6]]},"587":{"position":[[0,6]]},"589":{"position":[[0,7]]}}}],["csrf",{"_index":84,"t":{"249":{"position":[[9,4]]}}}],["custom",{"_index":67,"t":{"144":{"position":[[0,6]]},"225":{"position":[[0,6]]},"249":{"position":[[49,6]]},"333":{"position":[[0,6]]},"365":{"position":[[0,6]]},"457":{"position":[[0,6]]},"489":{"position":[[16,6]]},"506":{"position":[[0,6]]},"509":{"position":[[0,6]]}}}],["data",{"_index":101,"t":{"476":{"position":[[0,4]]}}}],["debug",{"_index":48,"t":{"99":{"position":[[0,5]]}}}],["default",{"_index":80,"t":{"179":{"position":[[0,7]]},"189":{"position":[[0,7]]},"199":{"position":[[0,7]]},"211":{"position":[[0,7]]},"221":{"position":[[0,7]]},"235":{"position":[[0,7]]},"247":{"position":[[0,7]]},"261":{"position":[[0,7]]},"271":{"position":[[0,7]]},"281":{"position":[[0,7]]},"291":{"position":[[0,7]]},"313":{"position":[[0,7]]},"323":{"position":[[0,7]]},"331":{"position":[[0,7]]},"337":{"position":[[0,7]]},"351":{"position":[[0,7]]},"363":{"position":[[0,7]]},"375":{"position":[[0,7]]},"387":{"position":[[0,7]]},"397":{"position":[[0,7]]},"407":{"position":[[0,7]]},"417":{"position":[[0,7]]},"427":{"position":[[0,7]]},"437":{"position":[[0,7]]},"453":{"position":[[0,7]]},"504":{"position":[[0,7]]}}}],["dest",{"_index":57,"t":{"119":{"position":[[0,4]]}}}],["domain",{"_index":126,"t":{"499":{"position":[[23,6]]}}}],["download",{"_index":151,"t":{"591":{"position":[[0,8]]}}}],["emb",{"_index":87,"t":{"299":{"position":[[0,5]]}}}],["encoder/decod",{"_index":128,"t":{"509":{"position":[[12,15]]}}}],["encryptcooki",{"_index":85,"t":{"249":{"position":[[18,13]]}}}],["endpoint",{"_index":95,"t":{"345":{"position":[[26,9]]}}}],["engin",{"_index":121,"t":{"495":{"position":[[15,7]]},"555":{"position":[[0,7]]}}}],["error",{"_index":119,"t":{"493":{"position":[[19,5]]},"502":{"position":[[9,6]]},"504":{"position":[[8,5]]},"506":{"position":[[7,5]]}}}],["exampl",{"_index":74,"t":{"160":{"position":[[0,8]]},"175":{"position":[[0,8]]},"185":{"position":[[0,8]]},"195":{"position":[[0,8]]},"207":{"position":[[0,8]]},"217":{"position":[[0,8]]},"231":{"position":[[0,8]]},"243":{"position":[[0,8]]},"255":{"position":[[0,8]]},"267":{"position":[[0,8]]},"277":{"position":[[0,8]]},"287":{"position":[[0,8]]},"297":{"position":[[0,8]]},"319":{"position":[[0,8]]},"329":{"position":[[0,8]]},"343":{"position":[[0,8]]},"357":{"position":[[0,8]]},"371":{"position":[[0,8]]},"383":{"position":[[0,8]]},"393":{"position":[[0,8]]},"403":{"position":[[0,8]]},"413":{"position":[[0,8]]},"423":{"position":[[0,8]]},"433":{"position":[[0,8]]},"443":{"position":[[0,8]]},"449":{"position":[[0,8]]},"463":{"position":[[0,8]]},"469":{"position":[[0,8]]}}}],["fiber",{"_index":76,"t":{"161":{"position":[[12,5]]},"163":{"position":[[23,5]]},"165":{"position":[[0,5]]},"167":{"position":[[0,5]]},"169":{"position":[[0,5]]},"495":{"position":[[28,5]]},"497":{"position":[[5,5]]},"499":{"position":[[5,5]]}}}],["file",{"_index":8,"t":{"11":{"position":[[7,5]]}}}],["fileb0x",{"_index":91,"t":{"307":{"position":[[0,7]]}}}],["form",{"_index":46,"t":{"95":{"position":[[0,4]]}}}],["format",{"_index":152,"t":{"593":{"position":[[0,6]]}}}],["formfil",{"_index":153,"t":{"595":{"position":[[0,8]]}}}],["formvalu",{"_index":154,"t":{"597":{"position":[[0,9]]}}}],["framework",{"_index":109,"t":{"484":{"position":[[7,9]]}}}],["fresh",{"_index":155,"t":{"599":{"position":[[0,5]]}}}],["getreqhead",{"_index":156,"t":{"603":{"position":[[0,13]]}}}],["getresphead",{"_index":157,"t":{"605":{"position":[[0,13]]},"607":{"position":[[0,14]]}}}],["getrout",{"_index":19,"t":{"38":{"position":[[0,8]]},"40":{"position":[[0,9]]}}}],["getrouteurl",{"_index":158,"t":{"609":{"position":[[0,11]]}}}],["global",{"_index":69,"t":{"148":{"position":[[0,6]]}}}],["go",{"_index":107,"t":{"484":{"position":[[0,2]]}}}],["go.ric",{"_index":90,"t":{"305":{"position":[[0,7]]}}}],["group",{"_index":13,"t":{"24":{"position":[[0,5]]},"517":{"position":[[0,5]]},"550":{"position":[[0,8]]}}}],["handl",{"_index":113,"t":{"489":{"position":[[9,6]]}}}],["handler",{"_index":10,"t":{"18":{"position":[[6,8]]},"44":{"position":[[0,7]]},"165":{"position":[[6,7]]},"347":{"position":[[29,7]]},"493":{"position":[[25,8]]},"504":{"position":[[14,7]]},"506":{"position":[[13,7]]},"517":{"position":[[6,8]]},"540":{"position":[[0,8]]}}}],["handlerscount",{"_index":16,"t":{"32":{"position":[[0,13]]}}}],["hello",{"_index":3,"t":{"7":{"position":[[0,6]]}}}],["hook",{"_index":27,"t":{"60":{"position":[[0,5]]}}}],["host",{"_index":40,"t":{"83":{"position":[[0,4]]}}}],["hostnam",{"_index":159,"t":{"611":{"position":[[0,8]]}}}],["insecureskipverifi",{"_index":51,"t":{"105":{"position":[[0,18]]}}}],["instal",{"_index":0,"t":{"3":{"position":[[0,12]]}}}],["interfac",{"_index":140,"t":{"553":{"position":[[9,10]]}}}],["ip",{"_index":160,"t":{"613":{"position":[[0,2]]},"615":{"position":[[0,3]]}}}],["ischild",{"_index":64,"t":{"138":{"position":[[0,7]]}}}],["isfromloc",{"_index":161,"t":{"619":{"position":[[0,11]]}}}],["json",{"_index":44,"t":{"91":{"position":[[0,4]]},"482":{"position":[[0,4]]},"509":{"position":[[7,4]]},"621":{"position":[[0,4]]}}}],["jsondecod",{"_index":55,"t":{"113":{"position":[[0,11]]}}}],["jsonencod",{"_index":54,"t":{"111":{"position":[[0,11]]}}}],["jsonp",{"_index":162,"t":{"623":{"position":[[0,5]]}}}],["level",{"_index":66,"t":{"142":{"position":[[4,6]]},"150":{"position":[[4,5]]}}}],["link",{"_index":163,"t":{"625":{"position":[[0,5]]}}}],["listen",{"_index":21,"t":{"46":{"position":[[0,6]]},"56":{"position":[[0,8]]}}}],["listenmutualtl",{"_index":24,"t":{"52":{"position":[[0,15]]}}}],["listenmutualtlswithcertif",{"_index":25,"t":{"54":{"position":[[0,30]]}}}],["listentl",{"_index":22,"t":{"48":{"position":[[0,9]]}}}],["listentlswithcertif",{"_index":23,"t":{"50":{"position":[[0,24]]}}}],["live",{"_index":116,"t":{"491":{"position":[[14,4]]}}}],["local",{"_index":164,"t":{"627":{"position":[[0,6]]}}}],["locat",{"_index":165,"t":{"629":{"position":[[0,8]]}}}],["log",{"_index":65,"t":{"142":{"position":[[0,3]]},"144":{"position":[[7,3]]},"146":{"position":[[6,3]]},"148":{"position":[[7,3]]}}}],["maxredirectscount",{"_index":53,"t":{"109":{"position":[[0,17]]}}}],["method",{"_index":166,"t":{"631":{"position":[[0,6]]}}}],["middlewar",{"_index":77,"t":{"163":{"position":[[9,10]]},"249":{"position":[[32,11]]},"347":{"position":[[11,10]]},"548":{"position":[[0,10]]}}}],["mount",{"_index":11,"t":{"20":{"position":[[0,5]]}}}],["mountpath",{"_index":12,"t":{"22":{"position":[[0,9]]}}}],["multipartform",{"_index":47,"t":{"97":{"position":[[0,13]]},"633":{"position":[[0,13]]}}}],["multipl",{"_index":103,"t":{"478":{"position":[[0,8]]}}}],["name",{"_index":18,"t":{"36":{"position":[[0,4]]},"249":{"position":[[63,5]]}}}],["net/http",{"_index":75,"t":{"161":{"position":[[0,8]]},"163":{"position":[[0,8]]},"165":{"position":[[17,8]]},"167":{"position":[[13,8]]}}}],["net/http).request",{"_index":79,"t":{"169":{"position":[[17,18]]}}}],["new",{"_index":62,"t":{"132":{"position":[[0,3]]}}}],["newerror",{"_index":63,"t":{"136":{"position":[[0,8]]}}}],["next",{"_index":167,"t":{"635":{"position":[[0,4]]}}}],["note",{"_index":9,"t":{"13":{"position":[[0,4]]}}}],["onfork",{"_index":135,"t":{"533":{"position":[[0,6]]}}}],["ongroup",{"_index":132,"t":{"527":{"position":[[0,7]]}}}],["ongroupnam",{"_index":133,"t":{"529":{"position":[[0,11]]}}}],["onlisten",{"_index":134,"t":{"531":{"position":[[0,8]]}}}],["onmount",{"_index":137,"t":{"537":{"position":[[0,7]]}}}],["onnam",{"_index":131,"t":{"525":{"position":[[0,6]]}}}],["onrout",{"_index":130,"t":{"523":{"position":[[0,7]]}}}],["onshutdown",{"_index":136,"t":{"535":{"position":[[0,10]]}}}],["originalurl",{"_index":168,"t":{"637":{"position":[[0,11]]}}}],["output",{"_index":70,"t":{"152":{"position":[[4,6]]}}}],["packag",{"_index":142,"t":{"558":{"position":[[10,7]]}}}],["packr",{"_index":89,"t":{"303":{"position":[[0,5]]}}}],["param",{"_index":169,"t":{"639":{"position":[[0,6]]}}}],["paramet",{"_index":138,"t":{"544":{"position":[[0,10]]}}}],["paramsint",{"_index":170,"t":{"641":{"position":[[0,9]]}}}],["paramspars",{"_index":171,"t":{"643":{"position":[[0,12]]}}}],["pars",{"_index":32,"t":{"67":{"position":[[0,5]]}}}],["path",{"_index":129,"t":{"515":{"position":[[0,5]]},"542":{"position":[[0,5]]},"645":{"position":[[0,4]]}}}],["pkger",{"_index":88,"t":{"301":{"position":[[0,5]]}}}],["plaintext",{"_index":100,"t":{"474":{"position":[[0,9]]}}}],["print",{"_index":68,"t":{"146":{"position":[[0,5]]}}}],["protocol",{"_index":172,"t":{"647":{"position":[[0,8]]}}}],["queri",{"_index":104,"t":{"478":{"position":[[9,7]]},"480":{"position":[[7,5]]},"649":{"position":[[0,7]]},"651":{"position":[[0,5]]}}}],["querybool",{"_index":173,"t":{"653":{"position":[[0,9]]}}}],["queryfloat",{"_index":174,"t":{"655":{"position":[[0,10]]}}}],["queryint",{"_index":175,"t":{"657":{"position":[[0,8]]}}}],["querypars",{"_index":176,"t":{"659":{"position":[[0,11]]}}}],["querystr",{"_index":41,"t":{"85":{"position":[[0,11]]}}}],["rang",{"_index":177,"t":{"661":{"position":[[0,5]]}}}],["redirect",{"_index":178,"t":{"663":{"position":[[0,8]]}}}],["redirectback",{"_index":180,"t":{"667":{"position":[[0,12]]}}}],["redirecttorout",{"_index":179,"t":{"665":{"position":[[0,15]]}}}],["refer",{"_index":38,"t":{"79":{"position":[[0,7]]},"511":{"position":[[0,10]]}}}],["reload",{"_index":117,"t":{"491":{"position":[[19,6]]}}}],["render",{"_index":181,"t":{"669":{"position":[[0,6]]}}}],["reqheaderpars",{"_index":182,"t":{"673":{"position":[[0,15]]}}}],["request",{"_index":29,"t":{"63":{"position":[[6,7]]},"115":{"position":[[0,7]]},"671":{"position":[[0,7]]}}}],["respons",{"_index":86,"t":{"257":{"position":[[0,8]]},"489":{"position":[[27,10]]},"675":{"position":[[0,8]]}}}],["restartrout",{"_index":183,"t":{"677":{"position":[[0,14]]}}}],["retryif",{"_index":61,"t":{"127":{"position":[[0,7]]}}}],["reus",{"_index":50,"t":{"103":{"position":[[0,5]]}}}],["rout",{"_index":6,"t":{"9":{"position":[[6,7]]},"18":{"position":[[0,5]]},"26":{"position":[[0,5]]},"499":{"position":[[30,7]]},"679":{"position":[[0,5]]}}}],["savefil",{"_index":184,"t":{"681":{"position":[[0,8]]}}}],["savefiletostorag",{"_index":185,"t":{"683":{"position":[[0,17]]}}}],["secur",{"_index":186,"t":{"685":{"position":[[0,6]]}}}],["send",{"_index":187,"t":{"687":{"position":[[0,4]]}}}],["sendfil",{"_index":188,"t":{"689":{"position":[[0,8]]}}}],["sendstatu",{"_index":189,"t":{"691":{"position":[[0,10]]}}}],["serial",{"_index":106,"t":{"482":{"position":[[5,13]]}}}],["server",{"_index":14,"t":{"28":{"position":[[0,6]]},"30":{"position":[[0,6]]}}}],["set",{"_index":33,"t":{"69":{"position":[[0,3]]},"150":{"position":[[0,3]]},"152":{"position":[[0,3]]},"493":{"position":[[9,3]]},"693":{"position":[[0,3]]}}}],["setparserdecod",{"_index":190,"t":{"695":{"position":[[0,16]]}}}],["setrespons",{"_index":56,"t":{"117":{"position":[[0,11]]}}}],["setusercontext",{"_index":191,"t":{"697":{"position":[[0,14]]}}}],["shutdown",{"_index":15,"t":{"30":{"position":[[7,8]]}}}],["signatur",{"_index":73,"t":{"158":{"position":[[0,10]]},"173":{"position":[[0,10]]},"183":{"position":[[0,10]]},"193":{"position":[[0,10]]},"205":{"position":[[0,10]]},"215":{"position":[[0,10]]},"229":{"position":[[0,10]]},"241":{"position":[[0,10]]},"253":{"position":[[0,10]]},"265":{"position":[[0,10]]},"275":{"position":[[0,10]]},"285":{"position":[[0,10]]},"295":{"position":[[0,10]]},"317":{"position":[[0,10]]},"327":{"position":[[0,10]]},"341":{"position":[[0,10]]},"355":{"position":[[0,10]]},"369":{"position":[[0,10]]},"381":{"position":[[0,10]]},"391":{"position":[[0,10]]},"401":{"position":[[0,10]]},"411":{"position":[[0,10]]},"421":{"position":[[0,10]]},"431":{"position":[[0,10]]},"441":{"position":[[0,10]]},"447":{"position":[[0,10]]},"461":{"position":[[0,10]]},"467":{"position":[[0,10]]}}}],["singl",{"_index":105,"t":{"480":{"position":[[0,6]]}}}],["slide",{"_index":97,"t":{"359":{"position":[[0,7]]}}}],["specifi",{"_index":96,"t":{"347":{"position":[[0,10]]}}}],["stack",{"_index":17,"t":{"34":{"position":[[0,5]]}}}],["stale",{"_index":192,"t":{"699":{"position":[[0,5]]}}}],["start",{"_index":28,"t":{"63":{"position":[[0,5]]}}}],["static",{"_index":7,"t":{"11":{"position":[[0,6]]},"16":{"position":[[0,6]]}}}],["statik",{"_index":92,"t":{"309":{"position":[[0,6]]}}}],["statu",{"_index":193,"t":{"701":{"position":[[0,6]]}}}],["storage/databas",{"_index":82,"t":{"225":{"position":[[7,16]]},"365":{"position":[[7,16]]},"457":{"position":[[7,16]]}}}],["string",{"_index":59,"t":{"123":{"position":[[0,6]]}}}],["struct",{"_index":60,"t":{"125":{"position":[[0,6]]}}}],["structur",{"_index":111,"t":{"487":{"position":[[13,9]]}}}],["sub",{"_index":125,"t":{"499":{"position":[[19,3]]}}}],["subdomain",{"_index":194,"t":{"703":{"position":[[0,10]]}}}],["support",{"_index":122,"t":{"495":{"position":[[34,8]]},"499":{"position":[[11,7]]}}}],["techempow",{"_index":99,"t":{"472":{"position":[[0,11]]}}}],["templat",{"_index":120,"t":{"495":{"position":[[6,8]]},"553":{"position":[[0,8]]}}}],["test",{"_index":26,"t":{"58":{"position":[[0,4]]}}}],["timeout",{"_index":49,"t":{"101":{"position":[[0,7]]}}}],["tlsconfig",{"_index":52,"t":{"107":{"position":[[0,9]]}}}],["type",{"_index":195,"t":{"705":{"position":[[0,4]]}}}],["up",{"_index":118,"t":{"493":{"position":[[13,2]]}}}],["updat",{"_index":102,"t":{"476":{"position":[[5,7]]}}}],["us",{"_index":115,"t":{"491":{"position":[[10,3]]}}}],["usag",{"_index":83,"t":{"249":{"position":[[0,5]]}}}],["userag",{"_index":36,"t":{"75":{"position":[[0,9]]}}}],["usercontext",{"_index":196,"t":{"707":{"position":[[0,11]]}}}],["valid",{"_index":141,"t":{"558":{"position":[[0,9]]}}}],["vari",{"_index":197,"t":{"709":{"position":[[0,4]]}}}],["web",{"_index":108,"t":{"484":{"position":[[3,3]]}}}],["window",{"_index":98,"t":{"359":{"position":[[8,6]]}}}],["world",{"_index":4,"t":{"7":{"position":[[7,6]]}}}],["write",{"_index":198,"t":{"711":{"position":[[0,5]]}}}],["writef",{"_index":199,"t":{"713":{"position":[[0,6]]}}}],["writestr",{"_index":200,"t":{"715":{"position":[[0,11]]}}}],["xhr",{"_index":201,"t":{"717":{"position":[[0,3]]}}}],["xml",{"_index":45,"t":{"93":{"position":[[0,3]]},"719":{"position":[[0,3]]}}}],["zero",{"_index":1,"t":{"5":{"position":[[0,4]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":2,"t":"An online API documentation with examples so you can start building web apps with Fiber right away! Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind. These docs are for Fiber v2, which was released on September 15th, 2020.","s":"👋 Welcome","u":"/next/","h":"","p":1},{"i":4,"t":"First of all, download and install Go. 1.17 or higher is required. Installation is done using the go get command: go get github.com/gofiber/fiber/v2","s":"Installation","u":"/next/","h":"#installation","p":1},{"i":6,"t":"Some values returned from *fiber.Ctx are not immutable by default. Because fiber is optimized for high-performance, values returned from fiber.Ctx are not immutable by default and will be re-used across requests. As a rule of thumb, you must only use context values within the handler, and you must not keep any references. As soon as you return from the handler, any values you have obtained from the context will be re-used in future requests and will change below your feet. Here is an example: func handler(c *fiber.Ctx) error { // Variable is only valid within this handler result := c.Params(\"foo\") // ... } If you need to persist such values outside the handler, make copies of their underlying buffer using the copy builtin. Here is an example for persisting a string: func handler(c *fiber.Ctx) error { // Variable is only valid within this handler result := c.Params(\"foo\") // Make a copy buffer := make([]byte, len(result)) copy(buffer, result) resultCopy := string(buffer) // Variable is now valid forever // ... } We created a custom CopyString function that does the above and is available under gofiber/utils. app.Get(\"/:foo\", func(c *fiber.Ctx) error { // Variable is now immutable result := utils.CopyString(c.Params(\"foo\")) // ... }) Alternatively, you can also use the Immutable setting. It will make all values returned from the context immutable, allowing you to persist them anywhere. Of course, this comes at the cost of performance. app := fiber.New(fiber.Config{ Immutable: true, }) For more information, please check #426 and #185.","s":"Zero Allocation","u":"/next/","h":"#zero-allocation","p":1},{"i":8,"t":"Embedded below is essentially the most straightforward Fiber app you can create: package main import \"github.com/gofiber/fiber/v2\" func main() { app := fiber.New() app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Listen(\":3000\") } go run server.go Browse to http://localhost:3000 and you should see Hello, World! on the page.","s":"Hello, World!","u":"/next/","h":"#hello-world","p":1},{"i":10,"t":"Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, PUT, POST, etc.). Each route can have multiple handler functions that are executed when the route is matched. Route definition takes the following structures: // Function signature app.Method(path string, ...func(*fiber.Ctx) error) app is an instance of Fiber Method is an HTTP request method: GET, PUT, POST, etc. path is a virtual path on the server func(*fiber.Ctx) error is a callback function containing the Context executed when the route is matched Simple route // Respond with \"Hello, World!\" on root path, \"/\" app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) Parameters // GET http://localhost:8080/hello%20world app.Get(\"/:value\", func(c *fiber.Ctx) error { return c.SendString(\"value: \" + c.Params(\"value\")) // => Get request with value: hello world }) Optional parameter // GET http://localhost:3000/john app.Get(\"/:name?\", func(c *fiber.Ctx) error { if c.Params(\"name\") != \"\" { return c.SendString(\"Hello \" + c.Params(\"name\")) // => Hello john } return c.SendString(\"Where is john?\") }) Wildcards // GET http://localhost:3000/api/user/john app.Get(\"/api/*\", func(c *fiber.Ctx) error { return c.SendString(\"API path: \" + c.Params(\"*\")) // => API path: user/john })","s":"Basic routing","u":"/next/","h":"#basic-routing","p":1},{"i":12,"t":"To serve static files such as images, CSS, and JavaScript files, replace your function handler with a file or directory string. Function signature: app.Static(prefix, root string, config ...Static) Use the following code to serve files in a directory named ./public: app := fiber.New() app.Static(\"/\", \"./public\") app.Listen(\":3000\") Now, you can load the files that are in the ./public directory: http://localhost:8080/hello.html http://localhost:8080/js/jquery.js http://localhost:8080/css/style.css","s":"Static files","u":"/next/","h":"#static-files","p":1},{"i":14,"t":"For more information on how to build APIs in Go with Fiber, please check out this excellent article on building an express-style API in Go with Fiber.","s":"Note","u":"/next/","h":"#note","p":1},{"i":17,"t":"Use the Static method to serve static files such as images, CSS, and JavaScript. info By default, Static will serve index.html files in response to a request on a directory. Signature func (app *App) Static(prefix, root string, config ...Static) Router Use the following code to serve files in a directory named ./public app.Static(\"/\", \"./public\") // => http://localhost:3000/hello.html // => http://localhost:3000/js/jquery.js // => http://localhost:3000/css/style.css Examples // Serve files from multiple directories app.Static(\"/\", \"./public\") // Serve files from \"./files\" directory: app.Static(\"/\", \"./files\") You can use any virtual path prefix (where the path does not actually exist in the file system) for files that are served by the Static method, specify a prefix path for the static directory, as shown below: Examples app.Static(\"/static\", \"./public\") // => http://localhost:3000/static/hello.html // => http://localhost:3000/static/js/jquery.js // => http://localhost:3000/static/css/style.css If you want to have a little bit more control regarding the settings for serving static files. You could use the fiber.Static struct to enable specific settings. fiber.Static{} // Static defines configuration options when defining static assets. type Static struct { // When set to true, the server tries minimizing CPU usage by caching compressed files. // This works differently than the github.com/gofiber/compression middleware. // Optional. Default value false Compress bool `json:\"compress\"` // When set to true, enables byte range requests. // Optional. Default value false ByteRange bool `json:\"byte_range\"` // When set to true, enables directory browsing. // Optional. Default value false. Browse bool `json:\"browse\"` // When set to true, enables direct download. // Optional. Default value false. Download bool `json:\"download\"` // The name of the index file for serving a directory. // Optional. Default value \"index.html\". Index string `json:\"index\"` // Expiration duration for inactive file handlers. // Use a negative time.Duration to disable it. // // Optional. Default value 10 * time.Second. CacheDuration time.Duration `json:\"cache_duration\"` // The value for the Cache-Control HTTP-header // that is set on the file response. MaxAge is defined in seconds. // // Optional. Default value 0. MaxAge int `json:\"max_age\"` // ModifyResponse defines a function that allows you to alter the response. // // Optional. Default: nil ModifyResponse Handler // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *Ctx) bool } Example // Custom config app.Static(\"/\", \"./public\", fiber.Static{ Compress: true, ByteRange: true, Browse: true, Index: \"john.html\", CacheDuration: 10 * time.Second, MaxAge: 3600, })","s":"Static","u":"/next/api/app","h":"#static","p":15},{"i":19,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Route Handlers","u":"/next/api/app","h":"#route-handlers","p":15},{"i":21,"t":"You can Mount Fiber instance by creating a *Mount Signature func (a *App) Mount(prefix string, app *App) Router Examples func main() { app := fiber.New() micro := fiber.New() app.Mount(\"/john\", micro) // GET /john/doe -> 200 OK micro.Get(\"/doe\", func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusOK) }) log.Fatal(app.Listen(\":3000\")) }","s":"Mount","u":"/next/api/app","h":"#mount","p":15},{"i":23,"t":"The MountPath property contains one or more path patterns on which a sub-app was mounted. Signature func (app *App) MountPath() string Examples func main() { app := fiber.New() one := fiber.New() two := fiber.New() three := fiber.New() two.Mount(\"/three\", three) one.Mount(\"/two\", two) app.Mount(\"/one\", one) one.MountPath() // \"/one\" two.MountPath() // \"/one/two\" three.MountPath() // \"/one/two/three\" app.MountPath() // \"\" } caution Mounting order is important for MountPath. If you want to get mount paths properly, you should start mounting from the deepest app.","s":"MountPath","u":"/next/api/app","h":"#mountpath","p":15},{"i":25,"t":"You can group routes by creating a *Group struct. Signature func (app *App) Group(prefix string, handlers ...Handler) Router Examples func main() { app := fiber.New() api := app.Group(\"/api\", handler) // /api v1 := api.Group(\"/v1\", handler) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", handler) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) }","s":"Group","u":"/next/api/app","h":"#group","p":15},{"i":27,"t":"You can define routes with a common prefix inside the common function. Signature func (app *App) Route(prefix string, fn func(router Router), name ...string) Router Examples func main() { app := fiber.New() app.Route(\"/test\", func(api fiber.Router) { api.Get(\"/foo\", handler).Name(\"foo\") // /test/foo (name: test.foo) api.Get(\"/bar\", handler).Name(\"bar\") // /test/bar (name: test.bar) }, \"test.\") log.Fatal(app.Listen(\":3000\")) }","s":"Route","u":"/next/api/app","h":"#route","p":15},{"i":29,"t":"Server returns the underlying fasthttp server Signature func (app *App) Server() *fasthttp.Server Examples func main() { app := fiber.New() app.Server().MaxConnsPerIP = 1 // ... }","s":"Server","u":"/next/api/app","h":"#server","p":15},{"i":31,"t":"Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waits indefinitely for all connections to return to idle before shutting down. ShutdownWithTimeout will forcefully close any active connections after the timeout expires. ShutdownWithContext shuts down the server including by force if the context's deadline is exceeded. func (app *App) Shutdown() error func (app *App) ShutdownWithTimeout(timeout time.Duration) error func (app *App) ShutdownWithContext(ctx context.Context) error","s":"Server Shutdown","u":"/next/api/app","h":"#server-shutdown","p":15},{"i":33,"t":"This method returns the amount of registered handlers. Signature func (app *App) HandlersCount() uint32","s":"HandlersCount","u":"/next/api/app","h":"#handlerscount","p":15},{"i":35,"t":"This method returns the original router stack Signature func (app *App) Stack() [][]*Route Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/john/:age\", handler) app.Post(\"/register\", handler) data, _ := json.MarshalIndent(app.Stack(), \"\", \" \") fmt.Println(string(data)) app.Listen(\":3000\") } Result [ [ { \"method\": \"GET\", \"path\": \"/john/:age\", \"params\": [ \"age\" ] } ], [ { \"method\": \"HEAD\", \"path\": \"/john/:age\", \"params\": [ \"age\" ] } ], [ { \"method\": \"POST\", \"path\": \"/register\", \"params\": null } ] ]","s":"Stack","u":"/next/api/app","h":"#stack","p":15},{"i":37,"t":"This method assigns the name of latest created route. Signature func (app *App) Name(name string) Router Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/\", handler) app.Name(\"index\") app.Get(\"/doe\", handler).Name(\"home\") app.Trace(\"/tracer\", handler).Name(\"tracert\") app.Delete(\"/delete\", handler).Name(\"delete\") a := app.Group(\"/a\") a.Name(\"fd.\") a.Get(\"/test\", handler).Name(\"test\") data, _ := json.MarshalIndent(app.Stack(), \"\", \" \") fmt.Print(string(data)) app.Listen(\":3000\") } Result [ [ { \"method\": \"GET\", \"name\": \"index\", \"path\": \"/\", \"params\": null }, { \"method\": \"GET\", \"name\": \"home\", \"path\": \"/doe\", \"params\": null }, { \"method\": \"GET\", \"name\": \"fd.test\", \"path\": \"/a/test\", \"params\": null } ], [ { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/\", \"params\": null }, { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/doe\", \"params\": null }, { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/a/test\", \"params\": null } ], null, null, [ { \"method\": \"DELETE\", \"name\": \"delete\", \"path\": \"/delete\", \"params\": null } ], null, null, [ { \"method\": \"TRACE\", \"name\": \"tracert\", \"path\": \"/tracer\", \"params\": null } ], null ]","s":"Name","u":"/next/api/app","h":"#name","p":15},{"i":39,"t":"This method gets the route by name. Signature func (app *App) GetRoute(name string) Route Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/\", handler).Name(\"index\") data, _ := json.MarshalIndent(app.GetRoute(\"index\"), \"\", \" \") fmt.Print(string(data)) app.Listen(\":3000\") } Result { \"method\": \"GET\", \"name\": \"index\", \"path\": \"/\", \"params\": null }","s":"GetRoute","u":"/next/api/app","h":"#getroute","p":15},{"i":41,"t":"This method gets all routes. Signature func (app *App) GetRoutes(filterUseOption ...bool) []Route When filterUseOption equal to true, it will filter the routes registered by the middleware. Examples func main() { app := fiber.New() app.Post(\"/\", func (c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }).Name(\"index\") data, _ := json.MarshalIndent(app.GetRoutes(true), \"\", \" \") fmt.Print(string(data)) } Result [ { \"method\": \"POST\", \"name\": \"index\", \"path\": \"/\", \"params\": null } ]","s":"GetRoutes","u":"/next/api/app","h":"#getroutes","p":15},{"i":43,"t":"Config returns the app config as value ( read-only ). Signature func (app *App) Config() Config","s":"Config","u":"/next/api/app","h":"#config","p":15},{"i":45,"t":"Handler returns the server handler that can be used to serve custom *fasthttp.RequestCtx requests. Signature func (app *App) Handler() fasthttp.RequestHandler","s":"Handler","u":"/next/api/app","h":"#handler","p":15},{"i":47,"t":"Listen serves HTTP requests from the given address. Signature func (app *App) Listen(addr string) error Examples // Listen on port :8080 app.Listen(\":8080\") // Custom host app.Listen(\"127.0.0.1:8080\")","s":"Listen","u":"/next/api/app","h":"#listen","p":15},{"i":49,"t":"ListenTLS serves HTTPs requests from the given address using certFile and keyFile paths to as TLS certificate and key file. Signature func (app *App) ListenTLS(addr, certFile, keyFile string) error Examples app.ListenTLS(\":443\", \"./cert.pem\", \"./cert.key\"); Using ListenTLS defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{ cert, }, }","s":"ListenTLS","u":"/next/api/app","h":"#listentls","p":15},{"i":51,"t":"Signature func (app *App) ListenTLS(addr string, cert tls.Certificate) error Examples app.ListenTLSWithCertificate(\":443\", cert); Using ListenTLSWithCertificate defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{ cert, }, }","s":"ListenTLSWithCertificate","u":"/next/api/app","h":"#listentlswithcertificate","p":15},{"i":53,"t":"ListenMutualTLS serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file Signature func (app *App) ListenMutualTLS(addr, certFile, keyFile, clientCertFile string) error Examples app.ListenMutualTLS(\":443\", \"./cert.pem\", \"./cert.key\", \"./ca-chain-cert.pem\"); Using ListenMutualTLS defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, ClientAuth: tls.RequireAndVerifyClientCert, ClientCAs: clientCertPool, Certificates: []tls.Certificate{ cert, }, }","s":"ListenMutualTLS","u":"/next/api/app","h":"#listenmutualtls","p":15},{"i":55,"t":"ListenMutualTLSWithCertificate serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file Signature func (app *App) ListenMutualTLSWithCertificate(addr string, cert tls.Certificate, clientCertPool *x509.CertPool) error Examples app.ListenMutualTLSWithCertificate(\":443\", cert, clientCertPool); Using ListenMutualTLSWithCertificate defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, ClientAuth: tls.RequireAndVerifyClientCert, ClientCAs: clientCertPool, Certificates: []tls.Certificate{ cert, }, }","s":"ListenMutualTLSWithCertificate","u":"/next/api/app","h":"#listenmutualtlswithcertificate","p":15},{"i":57,"t":"You can pass your own net.Listener using the Listener method. This method can be used to enable TLS/HTTPS with a custom tls.Config. Signature func (app *App) Listener(ln net.Listener) error Examples ln, _ := net.Listen(\"tcp\", \":3000\") cer, _:= tls.LoadX509KeyPair(\"server.crt\", \"server.key\") ln = tls.NewListener(ln, &tls.Config{Certificates: []tls.Certificate{cer}}) app.Listener(ln)","s":"Listener","u":"/next/api/app","h":"#listener","p":15},{"i":59,"t":"Testing your application is done with the Test method. Use this method for creating _test.go files or when you need to debug your routing logic. The default timeout is 1s if you want to disable a timeout altogether, pass -1 as a second argument. Signature func (app *App) Test(req *http.Request, msTimeout ...int) (*http.Response, error) Examples // Create route with GET method for test: app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(c.BaseURL()) // => http://google.com fmt.Println(c.Get(\"X-Custom-Header\")) // => hi return c.SendString(\"hello, World!\") }) // http.Request req := httptest.NewRequest(\"GET\", \"http://google.com\", nil) req.Header.Set(\"X-Custom-Header\", \"hi\") // http.Response resp, _ := app.Test(req) // Do something with results: if resp.StatusCode == fiber.StatusOK { body, _ := ioutil.ReadAll(resp.Body) fmt.Println(string(body)) // => Hello, World! }","s":"Test","u":"/next/api/app","h":"#test","p":15},{"i":61,"t":"Hooks is a method to return hooks property. Signature func (app *App) Hooks() *Hooks","s":"Hooks","u":"/next/api/app","h":"#hooks","p":15},{"i":64,"t":"Start a http request with http method and url. Signatures // Client http methods func (c *Client) Get(url string) *Agent func (c *Client) Head(url string) *Agent func (c *Client) Post(url string) *Agent func (c *Client) Put(url string) *Agent func (c *Client) Patch(url string) *Agent func (c *Client) Delete(url string) *Agent","s":"Start request","u":"/next/api/client","h":"#start-request","p":62},{"i":66,"t":"Agent is built on top of FastHTTP's HostClient which has lots of convenient helper methods such as dedicated methods for request methods.","s":"✨ Agent","u":"/next/api/client","h":"#-agent","p":62},{"i":68,"t":"Parse initializes a HostClient. Parse a := AcquireAgent() req := a.Request() req.Header.SetMethod(MethodGet) req.SetRequestURI(\"http://example.com\") if err := a.Parse(); err != nil { panic(err) } code, body, errs := a.Bytes() // ...","s":"Parse","u":"/next/api/client","h":"#parse","p":62},{"i":70,"t":"Set sets the given key: value header. Signature func (a *Agent) Set(k, v string) *Agent func (a *Agent) SetBytesK(k []byte, v string) *Agent func (a *Agent) SetBytesV(k string, v []byte) *Agent func (a *Agent) SetBytesKV(k []byte, v []byte) *Agent Example agent.Set(\"k1\", \"v1\"). SetBytesK([]byte(\"k1\"), \"v1\"). SetBytesV(\"k1\", []byte(\"v1\")). SetBytesKV([]byte(\"k2\"), []byte(\"v2\")) // ...","s":"Set","u":"/next/api/client","h":"#set","p":62},{"i":72,"t":"Add adds the given key: value header. Multiple headers with the same key may be added with this function. Signature func (a *Agent) Add(k, v string) *Agent func (a *Agent) AddBytesK(k []byte, v string) *Agent func (a *Agent) AddBytesV(k string, v []byte) *Agent func (a *Agent) AddBytesKV(k []byte, v []byte) *Agent Example agent.Add(\"k1\", \"v1\"). AddBytesK([]byte(\"k1\"), \"v1\"). AddBytesV(\"k1\", []byte(\"v1\")). AddBytesKV([]byte(\"k2\"), []byte(\"v2\")) // Headers: // K1: v1 // K1: v1 // K1: v1 // K2: v2","s":"Add","u":"/next/api/client","h":"#add","p":62},{"i":74,"t":"ConnectionClose adds the Connection: close header. Signature func (a *Agent) ConnectionClose() *Agent Example agent.ConnectionClose() // ...","s":"ConnectionClose","u":"/next/api/client","h":"#connectionclose","p":62},{"i":76,"t":"UserAgent sets User-Agent header value. Signature func (a *Agent) UserAgent(userAgent string) *Agent func (a *Agent) UserAgentBytes(userAgent []byte) *Agent Example agent.UserAgent(\"fiber\") // ...","s":"UserAgent","u":"/next/api/client","h":"#useragent","p":62},{"i":78,"t":"Cookie sets a cookie in key: value form. Cookies can be used to set multiple cookies. Signature func (a *Agent) Cookie(key, value string) *Agent func (a *Agent) CookieBytesK(key []byte, value string) *Agent func (a *Agent) CookieBytesKV(key, value []byte) *Agent func (a *Agent) Cookies(kv ...string) *Agent func (a *Agent) CookiesBytesKV(kv ...[]byte) *Agent Example agent.Cookie(\"k\", \"v\") agent.Cookies(\"k1\", \"v1\", \"k2\", \"v2\") // ...","s":"Cookie","u":"/next/api/client","h":"#cookie","p":62},{"i":80,"t":"Referer sets the Referer header value. Signature func (a *Agent) Referer(referer string) *Agent func (a *Agent) RefererBytes(referer []byte) *Agent Example agent.Referer(\"https://docs.gofiber.io\") // ...","s":"Referer","u":"/next/api/client","h":"#referer","p":62},{"i":82,"t":"ContentType sets Content-Type header value. Signature func (a *Agent) ContentType(contentType string) *Agent func (a *Agent) ContentTypeBytes(contentType []byte) *Agent Example agent.ContentType(\"custom-type\") // ...","s":"ContentType","u":"/next/api/client","h":"#contenttype","p":62},{"i":84,"t":"Host sets the Host header. Signature func (a *Agent) Host(host string) *Agent func (a *Agent) HostBytes(host []byte) *Agent Example agent.Host(\"example.com\") // ...","s":"Host","u":"/next/api/client","h":"#host","p":62},{"i":86,"t":"QueryString sets the URI query string. Signature func (a *Agent) QueryString(queryString string) *Agent func (a *Agent) QueryStringBytes(queryString []byte) *Agent Example agent.QueryString(\"foo=bar\") // ...","s":"QueryString","u":"/next/api/client","h":"#querystring","p":62},{"i":88,"t":"BasicAuth sets the URI username and password using HTTP Basic Auth. Signature func (a *Agent) BasicAuth(username, password string) *Agent func (a *Agent) BasicAuthBytes(username, password []byte) *Agent Example agent.BasicAuth(\"foo\", \"bar\") // ...","s":"BasicAuth","u":"/next/api/client","h":"#basicauth","p":62},{"i":90,"t":"There are several ways to set request body. Signature func (a *Agent) BodyString(bodyString string) *Agent func (a *Agent) Body(body []byte) *Agent // BodyStream sets request body stream and, optionally body size. // // If bodySize is >= 0, then the bodyStream must provide exactly bodySize bytes // before returning io.EOF. // // If bodySize < 0, then bodyStream is read until io.EOF. // // bodyStream.Close() is called after finishing reading all body data // if it implements io.Closer. // // Note that GET and HEAD requests cannot have body. func (a *Agent) BodyStream(bodyStream io.Reader, bodySize int) *Agent Example agent.BodyString(\"foo=bar\") agent.Body([]byte(\"bar=baz\")) agent.BodyStream(strings.NewReader(\"body=stream\"), -1) // ...","s":"Body","u":"/next/api/client","h":"#body","p":62},{"i":92,"t":"JSON sends a JSON request by setting the Content-Type header to application/json. Signature func (a *Agent) JSON(v interface{}) *Agent Example agent.JSON(fiber.Map{\"success\": true}) // ...","s":"JSON","u":"/next/api/client","h":"#json","p":62},{"i":94,"t":"XML sends an XML request by setting the Content-Type header to application/xml. Signature func (a *Agent) XML(v interface{}) *Agent Example agent.XML(fiber.Map{\"success\": true}) // ...","s":"XML","u":"/next/api/client","h":"#xml","p":62},{"i":96,"t":"Form sends a form request by setting the Content-Type header to application/x-www-form-urlencoded. Signature // Form sends form request with body if args is non-nil. // // It is recommended obtaining args via AcquireArgs and release it // manually in performance-critical code. func (a *Agent) Form(args *Args) *Agent Example args := AcquireArgs() args.Set(\"foo\", \"bar\") agent.Form(args) // ... ReleaseArgs(args)","s":"Form","u":"/next/api/client","h":"#form","p":62},{"i":98,"t":"MultipartForm sends multipart form request by setting the Content-Type header to multipart/form-data. These requests can include key-value's and files. Signature // MultipartForm sends multipart form request with k-v and files. // // It is recommended to obtain args via AcquireArgs and release it // manually in performance-critical code. func (a *Agent) MultipartForm(args *Args) *Agent Example args := AcquireArgs() args.Set(\"foo\", \"bar\") agent.MultipartForm(args) // ... ReleaseArgs(args) Fiber provides several methods for sending files. Note that they must be called before MultipartForm. Boundary​ Boundary sets boundary for multipart form request. Signature func (a *Agent) Boundary(boundary string) *Agent Example agent.Boundary(\"myBoundary\") .MultipartForm(nil) // ... SendFile(s)​ SendFile read a file and appends it to a multipart form request. Sendfiles can be used to append multiple files. Signature func (a *Agent) SendFile(filename string, fieldname ...string) *Agent func (a *Agent) SendFiles(filenamesAndFieldnames ...string) *Agent Example agent.SendFile(\"f\", \"field name\") .SendFiles(\"f1\", \"field name1\", \"f2\"). .MultipartForm(nil) // ... FileData​ FileData appends file data for multipart form request. // FormFile represents multipart form file type FormFile struct { // Fieldname is form file's field name Fieldname string // Name is form file's name Name string // Content is form file's content Content []byte } Signature // FileData appends files for multipart form request. // // It is recommended obtaining formFile via AcquireFormFile and release it // manually in performance-critical code. func (a *Agent) FileData(formFiles ...*FormFile) *Agent Example ff1 := &FormFile{\"filename1\", \"field name1\", []byte(\"content\")} ff2 := &FormFile{\"filename2\", \"field name2\", []byte(\"content\")} agent.FileData(ff1, ff2). MultipartForm(nil) // ...","s":"MultipartForm","u":"/next/api/client","h":"#multipartform","p":62},{"i":100,"t":"Debug mode enables logging request and response detail to io.writer(default is os.Stdout). Signature func (a *Agent) Debug(w ...io.Writer) *Agent Example agent.Debug() // ...","s":"Debug","u":"/next/api/client","h":"#debug","p":62},{"i":102,"t":"Timeout sets request timeout duration. Signature func (a *Agent) Timeout(timeout time.Duration) *Agent Example agent.Timeout(time.Second) // ...","s":"Timeout","u":"/next/api/client","h":"#timeout","p":62},{"i":104,"t":"Reuse enables the Agent instance to be used again after one request. If agent is reusable, then it should be released manually when it is no longer used. Signature func (a *Agent) Reuse() *Agent Example agent.Reuse() // ...","s":"Reuse","u":"/next/api/client","h":"#reuse","p":62},{"i":106,"t":"InsecureSkipVerify controls whether the Agent verifies the server certificate chain and host name. Signature func (a *Agent) InsecureSkipVerify() *Agent Example agent.InsecureSkipVerify() // ...","s":"InsecureSkipVerify","u":"/next/api/client","h":"#insecureskipverify","p":62},{"i":108,"t":"TLSConfig sets tls config. Signature func (a *Agent) TLSConfig(config *tls.Config) *Agent Example // Create tls certificate cer, _ := tls.LoadX509KeyPair(\"pem\", \"key\") config := &tls.Config{ Certificates: []tls.Certificate{cer}, } agent.TLSConfig(config) // ...","s":"TLSConfig","u":"/next/api/client","h":"#tlsconfig","p":62},{"i":110,"t":"MaxRedirectsCount sets max redirect count for GET and HEAD. Signature func (a *Agent) MaxRedirectsCount(count int) *Agent Example agent.MaxRedirectsCount(7) // ...","s":"MaxRedirectsCount","u":"/next/api/client","h":"#maxredirectscount","p":62},{"i":112,"t":"JSONEncoder sets custom json encoder. Signature func (a *Agent) JSONEncoder(jsonEncoder utils.JSONMarshal) *Agent Example agent.JSONEncoder(json.Marshal) // ...","s":"JSONEncoder","u":"/next/api/client","h":"#jsonencoder","p":62},{"i":114,"t":"JSONDecoder sets custom json decoder. Signature func (a *Agent) JSONDecoder(jsonDecoder utils.JSONUnmarshal) *Agent Example agent.JSONDecoder(json.Unmarshal) // ...","s":"JSONDecoder","u":"/next/api/client","h":"#jsondecoder","p":62},{"i":116,"t":"Request returns Agent request instance. Signature func (a *Agent) Request() *Request Example req := agent.Request() // ...","s":"Request","u":"/next/api/client","h":"#request","p":62},{"i":118,"t":"SetResponse sets custom response for the Agent instance. It is recommended obtaining custom response via AcquireResponse and release it manually in performance-critical code. Signature func (a *Agent) SetResponse(customResp *Response) *Agent Example resp := AcquireResponse() agent.SetResponse(resp) // ... ReleaseResponse(resp)","s":"SetResponse","u":"/next/api/client","h":"#setresponse","p":62},{"i":120,"t":"Dest sets custom dest. The contents of dest will be replaced by the response body, if the dest is too small a new slice will be allocated. Signature func (a *Agent) Dest(dest []byte) *Agent { Example agent.Dest(nil) // ...","s":"Dest","u":"/next/api/client","h":"#dest","p":62},{"i":122,"t":"Bytes returns the status code, bytes body and errors of url. Signature func (a *Agent) Bytes() (code int, body []byte, errs []error) Example code, body, errs := agent.Bytes() // ...","s":"Bytes","u":"/next/api/client","h":"#bytes","p":62},{"i":124,"t":"String returns the status code, string body and errors of url. Signature func (a *Agent) String() (int, string, []error) Example code, body, errs := agent.String() // ...","s":"String","u":"/next/api/client","h":"#string","p":62},{"i":126,"t":"Struct returns the status code, bytes body and errors of url. And bytes body will be unmarshalled to given v. Signature func (a *Agent) Struct(v interface{}) (code int, body []byte, errs []error) Example var d data code, body, errs := agent.Struct(&d) // ...","s":"Struct","u":"/next/api/client","h":"#struct","p":62},{"i":128,"t":"RetryIf controls whether a retry should be attempted after an error. By default, will use isIdempotent function from fasthttp Signature func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent Example agent.Get(\"https://example.com\").RetryIf(func (req *fiber.Request) bool { return req.URI() == \"https://example.com\" }) // ...","s":"RetryIf","u":"/next/api/client","h":"#retryif","p":62},{"i":130,"t":"HTTP methods were copied from net/http. const ( MethodGet = \"GET\" // RFC 7231, 4.3.1 MethodHead = \"HEAD\" // RFC 7231, 4.3.2 MethodPost = \"POST\" // RFC 7231, 4.3.3 MethodPut = \"PUT\" // RFC 7231, 4.3.4 MethodPatch = \"PATCH\" // RFC 5789 MethodDelete = \"DELETE\" // RFC 7231, 4.3.5 MethodConnect = \"CONNECT\" // RFC 7231, 4.3.6 MethodOptions = \"OPTIONS\" // RFC 7231, 4.3.7 MethodTrace = \"TRACE\" // RFC 7231, 4.3.8 methodUse = \"USE\" ) MIME types that are commonly used const ( MIMETextXML = \"text/xml\" MIMETextHTML = \"text/html\" MIMETextPlain = \"text/plain\" MIMEApplicationXML = \"application/xml\" MIMEApplicationJSON = \"application/json\" MIMEApplicationJavaScript = \"application/javascript\" MIMEApplicationForm = \"application/x-www-form-urlencoded\" MIMEOctetStream = \"application/octet-stream\" MIMEMultipartForm = \"multipart/form-data\" MIMETextXMLCharsetUTF8 = \"text/xml; charset=utf-8\" MIMETextHTMLCharsetUTF8 = \"text/html; charset=utf-8\" MIMETextPlainCharsetUTF8 = \"text/plain; charset=utf-8\" MIMEApplicationXMLCharsetUTF8 = \"application/xml; charset=utf-8\" MIMEApplicationJSONCharsetUTF8 = \"application/json; charset=utf-8\" MIMEApplicationJavaScriptCharsetUTF8 = \"application/javascript; charset=utf-8\" ) HTTP status codes were copied from net/http. const ( StatusContinue = 100 // RFC 7231, 6.2.1 StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2 StatusProcessing = 102 // RFC 2518, 10.1 StatusEarlyHints = 103 // RFC 8297 StatusOK = 200 // RFC 7231, 6.3.1 StatusCreated = 201 // RFC 7231, 6.3.2 StatusAccepted = 202 // RFC 7231, 6.3.3 StatusNonAuthoritativeInformation = 203 // RFC 7231, 6.3.4 StatusNoContent = 204 // RFC 7231, 6.3.5 StatusResetContent = 205 // RFC 7231, 6.3.6 StatusPartialContent = 206 // RFC 7233, 4.1 StatusMultiStatus = 207 // RFC 4918, 11.1 StatusAlreadyReported = 208 // RFC 5842, 7.1 StatusIMUsed = 226 // RFC 3229, 10.4.1 StatusMultipleChoices = 300 // RFC 7231, 6.4.1 StatusMovedPermanently = 301 // RFC 7231, 6.4.2 StatusFound = 302 // RFC 7231, 6.4.3 StatusSeeOther = 303 // RFC 7231, 6.4.4 StatusNotModified = 304 // RFC 7232, 4.1 StatusUseProxy = 305 // RFC 7231, 6.4.5 StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7 StatusPermanentRedirect = 308 // RFC 7538, 3 StatusBadRequest = 400 // RFC 7231, 6.5.1 StatusUnauthorized = 401 // RFC 7235, 3.1 StatusPaymentRequired = 402 // RFC 7231, 6.5.2 StatusForbidden = 403 // RFC 7231, 6.5.3 StatusNotFound = 404 // RFC 7231, 6.5.4 StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5 StatusNotAcceptable = 406 // RFC 7231, 6.5.6 StatusProxyAuthRequired = 407 // RFC 7235, 3.2 StatusRequestTimeout = 408 // RFC 7231, 6.5.7 StatusConflict = 409 // RFC 7231, 6.5.8 StatusGone = 410 // RFC 7231, 6.5.9 StatusLengthRequired = 411 // RFC 7231, 6.5.10 StatusPreconditionFailed = 412 // RFC 7232, 4.2 StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11 StatusRequestURITooLong = 414 // RFC 7231, 6.5.12 StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13 StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4 StatusExpectationFailed = 417 // RFC 7231, 6.5.14 StatusTeapot = 418 // RFC 7168, 2.3.3 StatusMisdirectedRequest = 421 // RFC 7540, 9.1.2 StatusUnprocessableEntity = 422 // RFC 4918, 11.2 StatusLocked = 423 // RFC 4918, 11.3 StatusFailedDependency = 424 // RFC 4918, 11.4 StatusTooEarly = 425 // RFC 8470, 5.2. StatusUpgradeRequired = 426 // RFC 7231, 6.5.15 StatusPreconditionRequired = 428 // RFC 6585, 3 StatusTooManyRequests = 429 // RFC 6585, 4 StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5 StatusUnavailableForLegalReasons = 451 // RFC 7725, 3 StatusInternalServerError = 500 // RFC 7231, 6.6.1 StatusNotImplemented = 501 // RFC 7231, 6.6.2 StatusBadGateway = 502 // RFC 7231, 6.6.3 StatusServiceUnavailable = 503 // RFC 7231, 6.6.4 StatusGatewayTimeout = 504 // RFC 7231, 6.6.5 StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6 StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1 StatusInsufficientStorage = 507 // RFC 4918, 11.5 StatusLoopDetected = 508 // RFC 5842, 7.2 StatusNotExtended = 510 // RFC 2774, 7 StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6 ) Errors var ( ErrBadRequest = NewError(StatusBadRequest) // RFC 7231, 6.5.1 ErrUnauthorized = NewError(StatusUnauthorized) // RFC 7235, 3.1 ErrPaymentRequired = NewError(StatusPaymentRequired) // RFC 7231, 6.5.2 ErrForbidden = NewError(StatusForbidden) // RFC 7231, 6.5.3 ErrNotFound = NewError(StatusNotFound) // RFC 7231, 6.5.4 ErrMethodNotAllowed = NewError(StatusMethodNotAllowed) // RFC 7231, 6.5.5 ErrNotAcceptable = NewError(StatusNotAcceptable) // RFC 7231, 6.5.6 ErrProxyAuthRequired = NewError(StatusProxyAuthRequired) // RFC 7235, 3.2 ErrRequestTimeout = NewError(StatusRequestTimeout) // RFC 7231, 6.5.7 ErrConflict = NewError(StatusConflict) // RFC 7231, 6.5.8 ErrGone = NewError(StatusGone) // RFC 7231, 6.5.9 ErrLengthRequired = NewError(StatusLengthRequired) // RFC 7231, 6.5.10 ErrPreconditionFailed = NewError(StatusPreconditionFailed) // RFC 7232, 4.2 ErrRequestEntityTooLarge = NewError(StatusRequestEntityTooLarge) // RFC 7231, 6.5.11 ErrRequestURITooLong = NewError(StatusRequestURITooLong) // RFC 7231, 6.5.12 ErrUnsupportedMediaType = NewError(StatusUnsupportedMediaType) // RFC 7231, 6.5.13 ErrRequestedRangeNotSatisfiable = NewError(StatusRequestedRangeNotSatisfiable) // RFC 7233, 4.4 ErrExpectationFailed = NewError(StatusExpectationFailed) // RFC 7231, 6.5.14 ErrTeapot = NewError(StatusTeapot) // RFC 7168, 2.3.3 ErrMisdirectedRequest = NewError(StatusMisdirectedRequest) // RFC 7540, 9.1.2 ErrUnprocessableEntity = NewError(StatusUnprocessableEntity) // RFC 4918, 11.2 ErrLocked = NewError(StatusLocked) // RFC 4918, 11.3 ErrFailedDependency = NewError(StatusFailedDependency) // RFC 4918, 11.4 ErrTooEarly = NewError(StatusTooEarly) // RFC 8470, 5.2. ErrUpgradeRequired = NewError(StatusUpgradeRequired) // RFC 7231, 6.5.15 ErrPreconditionRequired = NewError(StatusPreconditionRequired) // RFC 6585, 3 ErrTooManyRequests = NewError(StatusTooManyRequests) // RFC 6585, 4 ErrRequestHeaderFieldsTooLarge = NewError(StatusRequestHeaderFieldsTooLarge) // RFC 6585, 5 ErrUnavailableForLegalReasons = NewError(StatusUnavailableForLegalReasons) // RFC 7725, 3 ErrInternalServerError = NewError(StatusInternalServerError) // RFC 7231, 6.6.1 ErrNotImplemented = NewError(StatusNotImplemented) // RFC 7231, 6.6.2 ErrBadGateway = NewError(StatusBadGateway) // RFC 7231, 6.6.3 ErrServiceUnavailable = NewError(StatusServiceUnavailable) // RFC 7231, 6.6.4 ErrGatewayTimeout = NewError(StatusGatewayTimeout) // RFC 7231, 6.6.5 ErrHTTPVersionNotSupported = NewError(StatusHTTPVersionNotSupported) // RFC 7231, 6.6.6 ErrVariantAlsoNegotiates = NewError(StatusVariantAlsoNegotiates) // RFC 2295, 8.1 ErrInsufficientStorage = NewError(StatusInsufficientStorage) // RFC 4918, 11.5 ErrLoopDetected = NewError(StatusLoopDetected) // RFC 5842, 7.2 ErrNotExtended = NewError(StatusNotExtended) // RFC 2774, 7 ErrNetworkAuthenticationRequired = NewError(StatusNetworkAuthenticationRequired) // RFC 6585, 6 ) HTTP Headers were copied from net/http. const ( HeaderAuthorization = \"Authorization\" HeaderProxyAuthenticate = \"Proxy-Authenticate\" HeaderProxyAuthorization = \"Proxy-Authorization\" HeaderWWWAuthenticate = \"WWW-Authenticate\" HeaderAge = \"Age\" HeaderCacheControl = \"Cache-Control\" HeaderClearSiteData = \"Clear-Site-Data\" HeaderExpires = \"Expires\" HeaderPragma = \"Pragma\" HeaderWarning = \"Warning\" HeaderAcceptCH = \"Accept-CH\" HeaderAcceptCHLifetime = \"Accept-CH-Lifetime\" HeaderContentDPR = \"Content-DPR\" HeaderDPR = \"DPR\" HeaderEarlyData = \"Early-Data\" HeaderSaveData = \"Save-Data\" HeaderViewportWidth = \"Viewport-Width\" HeaderWidth = \"Width\" HeaderETag = \"ETag\" HeaderIfMatch = \"If-Match\" HeaderIfModifiedSince = \"If-Modified-Since\" HeaderIfNoneMatch = \"If-None-Match\" HeaderIfUnmodifiedSince = \"If-Unmodified-Since\" HeaderLastModified = \"Last-Modified\" HeaderVary = \"Vary\" HeaderConnection = \"Connection\" HeaderKeepAlive = \"Keep-Alive\" HeaderAccept = \"Accept\" HeaderAcceptCharset = \"Accept-Charset\" HeaderAcceptEncoding = \"Accept-Encoding\" HeaderAcceptLanguage = \"Accept-Language\" HeaderCookie = \"Cookie\" HeaderExpect = \"Expect\" HeaderMaxForwards = \"Max-Forwards\" HeaderSetCookie = \"Set-Cookie\" HeaderAccessControlAllowCredentials = \"Access-Control-Allow-Credentials\" HeaderAccessControlAllowHeaders = \"Access-Control-Allow-Headers\" HeaderAccessControlAllowMethods = \"Access-Control-Allow-Methods\" HeaderAccessControlAllowOrigin = \"Access-Control-Allow-Origin\" HeaderAccessControlExposeHeaders = \"Access-Control-Expose-Headers\" HeaderAccessControlMaxAge = \"Access-Control-Max-Age\" HeaderAccessControlRequestHeaders = \"Access-Control-Request-Headers\" HeaderAccessControlRequestMethod = \"Access-Control-Request-Method\" HeaderOrigin = \"Origin\" HeaderTimingAllowOrigin = \"Timing-Allow-Origin\" HeaderXPermittedCrossDomainPolicies = \"X-Permitted-Cross-Domain-Policies\" HeaderDNT = \"DNT\" HeaderTk = \"Tk\" HeaderContentDisposition = \"Content-Disposition\" HeaderContentEncoding = \"Content-Encoding\" HeaderContentLanguage = \"Content-Language\" HeaderContentLength = \"Content-Length\" HeaderContentLocation = \"Content-Location\" HeaderContentType = \"Content-Type\" HeaderForwarded = \"Forwarded\" HeaderVia = \"Via\" HeaderXForwardedFor = \"X-Forwarded-For\" HeaderXForwardedHost = \"X-Forwarded-Host\" HeaderXForwardedProto = \"X-Forwarded-Proto\" HeaderXForwardedProtocol = \"X-Forwarded-Protocol\" HeaderXForwardedSsl = \"X-Forwarded-Ssl\" HeaderXUrlScheme = \"X-Url-Scheme\" HeaderLocation = \"Location\" HeaderFrom = \"From\" HeaderHost = \"Host\" HeaderReferer = \"Referer\" HeaderReferrerPolicy = \"Referrer-Policy\" HeaderUserAgent = \"User-Agent\" HeaderAllow = \"Allow\" HeaderServer = \"Server\" HeaderAcceptRanges = \"Accept-Ranges\" HeaderContentRange = \"Content-Range\" HeaderIfRange = \"If-Range\" HeaderRange = \"Range\" HeaderContentSecurityPolicy = \"Content-Security-Policy\" HeaderContentSecurityPolicyReportOnly = \"Content-Security-Policy-Report-Only\" HeaderCrossOriginResourcePolicy = \"Cross-Origin-Resource-Policy\" HeaderExpectCT = \"Expect-CT\" HeaderFeaturePolicy = \"Feature-Policy\" HeaderPublicKeyPins = \"Public-Key-Pins\" HeaderPublicKeyPinsReportOnly = \"Public-Key-Pins-Report-Only\" HeaderStrictTransportSecurity = \"Strict-Transport-Security\" HeaderUpgradeInsecureRequests = \"Upgrade-Insecure-Requests\" HeaderXContentTypeOptions = \"X-Content-Type-Options\" HeaderXDownloadOptions = \"X-Download-Options\" HeaderXFrameOptions = \"X-Frame-Options\" HeaderXPoweredBy = \"X-Powered-By\" HeaderXXSSProtection = \"X-XSS-Protection\" HeaderLastEventID = \"Last-Event-ID\" HeaderNEL = \"NEL\" HeaderPingFrom = \"Ping-From\" HeaderPingTo = \"Ping-To\" HeaderReportTo = \"Report-To\" HeaderTE = \"TE\" HeaderTrailer = \"Trailer\" HeaderTransferEncoding = \"Transfer-Encoding\" HeaderSecWebSocketAccept = \"Sec-WebSocket-Accept\" HeaderSecWebSocketExtensions = \"Sec-WebSocket-Extensions\" HeaderSecWebSocketKey = \"Sec-WebSocket-Key\" HeaderSecWebSocketProtocol = \"Sec-WebSocket-Protocol\" HeaderSecWebSocketVersion = \"Sec-WebSocket-Version\" HeaderAcceptPatch = \"Accept-Patch\" HeaderAcceptPushPolicy = \"Accept-Push-Policy\" HeaderAcceptSignature = \"Accept-Signature\" HeaderAltSvc = \"Alt-Svc\" HeaderDate = \"Date\" HeaderIndex = \"Index\" HeaderLargeAllocation = \"Large-Allocation\" HeaderLink = \"Link\" HeaderPushPolicy = \"Push-Policy\" HeaderRetryAfter = \"Retry-After\" HeaderServerTiming = \"Server-Timing\" HeaderSignature = \"Signature\" HeaderSignedHeaders = \"Signed-Headers\" HeaderSourceMap = \"SourceMap\" HeaderUpgrade = \"Upgrade\" HeaderXDNSPrefetchControl = \"X-DNS-Prefetch-Control\" HeaderXPingback = \"X-Pingback\" HeaderXRequestID = \"X-Request-ID\" HeaderXRequestedWith = \"X-Requested-With\" HeaderXRobotsTag = \"X-Robots-Tag\" HeaderXUACompatible = \"X-UA-Compatible\" )","s":"📋 Constants","u":"/next/api/constants","h":"","p":129},{"i":133,"t":"This method creates a new App named instance. You can pass optional config when creating a new instance. Signature func New(config ...Config) *App Example // Default config app := fiber.New() // ...","s":"New","u":"/next/api/fiber","h":"#new","p":131},{"i":135,"t":"You can pass an optional Config when creating a new Fiber instance. Example // Custom config app := fiber.New(fiber.Config{ Prefork: true, CaseSensitive: true, StrictRouting: true, ServerHeader: \"Fiber\", AppName: \"Test App v1.0.1\", }) // ... Config fields Property Type Description Default AppName string This allows to setup app name for the app \"\" 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 CaseSensitive bool When enabled, /Foo and /foo are different routes. When disabled, /Fooand /foo are treated the same. false ColorScheme Colors You can define custom color scheme. They'll be used for startup message, route list and some middlewares. DefaultColors CompressedFileSuffix string Adds a suffix to the original file name and tries saving the resulting compressed file under the new file name. \".fiber.gz\" Concurrency int Maximum number of concurrent connections. 256 * 1024 DisableDefaultContentType bool When set to true, causes the default Content-Type header to be excluded from the Response. false DisableDefaultDate bool When set to true causes the default date header to be excluded from the response. false DisableHeaderNormalizing bool By default all header names are normalized: conteNT-tYPE -> Content-Type false DisableKeepalive bool Disable keep-alive connections, the server will close incoming connections after sending the first response to the client false DisablePreParseMultipartForm bool Will not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data. false DisableStartupMessage bool When set to true, it will not print out debug information false ETag bool Enable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method (CRC-32). Weak ETags are the default when enabled. false EnableIPValidation bool If set to true, c.IP() and c.IPs() will validate IP addresses before returning them. Also, c.IP() will return only the first valid IP rather than just the raw header value that may be a comma seperated string. WARNING: There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header. false EnablePrintRoutes bool EnablePrintRoutes enables print all routes with their method, path, name and handler.. false EnableTrustedProxyCheck bool When set to true, fiber will check whether proxy is trusted, using TrustedProxies list. By default c.Protocol() will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, c.IP() will get value from ProxyHeader header, c.Hostname() will get value from X-Forwarded-Host header. If EnableTrustedProxyCheck is true, and RemoteIP is in the list of TrustedProxies c.Protocol(), c.IP(), and c.Hostname() will have the same behaviour when EnableTrustedProxyCheck disabled, if RemoteIP isn't in the list, c.Protocol() will return https in case when tls connection is handled by the app, or http otherwise, c.IP() will return RemoteIP() from fasthttp context, c.Hostname() will return fasthttp.Request.URI().Host() false ErrorHandler ErrorHandler ErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests. DefaultErrorHandler GETOnly bool Rejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set. false 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 Immutable bool When enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue #185. false JSONDecoder utils.JSONUnmarshal Allowing for flexibility in using another json library for decoding. json.Unmarshal JSONEncoder utils.JSONMarshal Allowing for flexibility in using another json library for encoding. json.Marshal Network string Known networks are \"tcp\", \"tcp4\" (IPv4-only), \"tcp6\" (IPv6-only) WARNING: When prefork is set to true, only \"tcp4\" and \"tcp6\" can be chosen. NetworkTCP4 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 Prefork bool Enables use of theSO_REUSEPORTsocket option. This will spawn multiple Go processes listening on the same port. learn more about socket sharding. NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with CMD ./app or CMD [\"sh\", \"-c\", \"/app\"]. For more info, see this issue comment. false ProxyHeader string This will enable c.IP() to return the value of the given header key. By default c.IP()will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. X-Forwarded-*. \"\" ReadBufferSize int per-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies). 4096 ReadTimeout time.Duration The amount of time allowed to read the full request, including the body. The default timeout is unlimited. nil RequestMethods []string RequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish. DefaultMethods ServerHeader string Enables the Server HTTP header with the given value. \"\" StreamRequestBody bool StreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit. false StrictRouting bool When enabled, the router treats /foo and /foo/ as different. Otherwise, the router treats /foo and /foo/ as the same. false TrustedProxies []string Contains the list of trusted proxy IP's. Look at EnableTrustedProxyCheck doc. It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses. []string*__* UnescapePath bool Converts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special characters false 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. \"\" WriteBufferSize int Per-connection buffer size for responses' writing. 4096 WriteTimeout time.Duration The maximum duration before timing out writes of the response. The default timeout is unlimited. nil XMLEncoder utils.XMLMarshal Allowing for flexibility in using another XML library for encoding. xml.Marshal","s":"Config","u":"/next/api/fiber","h":"#config","p":131},{"i":137,"t":"NewError creates a new HTTPError instance with an optional message. Signature func NewError(code int, message ...string) *Error Example app.Get(\"/\", func(c *fiber.Ctx) error { return fiber.NewError(782, \"Custom error message\") })","s":"NewError","u":"/next/api/fiber","h":"#newerror","p":131},{"i":139,"t":"IsChild determines if the current process is a result of Prefork. Signature func IsChild() bool Example // Prefork will spawn child processes app := fiber.New(fiber.Config{ Prefork: true, }) if !fiber.IsChild() { fmt.Println(\"I'm the parent process\") } else { fmt.Println(\"I'm a child process\") } // ...","s":"IsChild","u":"/next/api/fiber","h":"#ischild","p":131},{"i":141,"t":"We can use logs to observe program behavior, diagnose problems, or configure corresponding alarms. And defining a well structured log can improve search efficiency and facilitate handling of problems. Fiber provides a default way to print logs in the standard output. It also provides several global functions, such as log.Info, log.Errorf, log.Warnw, etc.","s":"Log","u":"/next/api/log","h":"#log","p":140},{"i":143,"t":"const ( LevelTrace Level = iota LevelDebug LevelInfo LevelWarn LevelError LevelFatal LevelPanic )","s":"Log levels","u":"/next/api/log","h":"#log-levels","p":140},{"i":145,"t":"Fiber provides the AllLogger interface for adapting the various log libraries. type CommonLogger interface { Logger FormatLogger WithLogger } type AllLogger interface { CommonLogger ControlLogger WithLogger }","s":"Custom log","u":"/next/api/log","h":"#custom-log","p":140},{"i":147,"t":"Note: The method of calling the Fatal level will interrupt the program running after printing the log, please use it with caution. Directly print logs of different levels, which will be entered into messageKey, the default is msg. log.Info(\"Hello, World!\") log.Debug(\"Are you OK?\") log.Info(\"42 is the answer to life, the universe, and everything\") log.Warn(\"We are under attack!\") log.Error(\"Houston, we have a problem.\") log.Fatal(\"So Long, and Thanks for All the Fislog.\") log.Panic(\"The system is down.\") Format and print logs of different levels, all methods end with f log.Debugf(\"Hello %s\", \"boy\") log.Infof(\"%d is the answer to life, the universe, and everything\", 233) log.Warnf(\"We are under attack %s!\", \"boss\") log.Errorf(\"%s, we have a problem.\", \"Master Shifu\") log.Fatalf(\"So Long, and Thanks for All the %s.\", \"banana\") Print a message with the key and value, or KEYVALS UNPAIRED if the key and value are not a pair. log.Debugw(\"\", \"Hello\", \"boy\") log.Infow(\"\", \"number\", 233) log.Warnw(\"\", \"job\", \"boss\") log.Errorw(\"\", \"name\", \"Master Shifu\") log.Fatalw(\"\", \"fruit\", \"banana\")","s":"Print log","u":"/next/api/log","h":"#print-log","p":140},{"i":149,"t":"If you are in a project and just want to use a simple log function that can be printed at any time in the global, we provide a global log. import \"github.com/gofiber/fiber/v2/log\" log.Info(\"info\") log.Warn(\"warn\") The above is using the default log.DefaultLogger standard output. You can also find an already implemented adaptation under contrib, or use your own implemented Logger and use log.SetLogger to set the global log logger. import ( \"log\" fiberlog \"github.com/gofiber/fiber/v2/log\" ) var _ log.AllLogger = (*customLogger)(nil) type customLogger struct { stdlog *log.Logger } // ... // inject your custom logger fiberlog.SetLogger(customLogger)","s":"Global log","u":"/next/api/log","h":"#global-log","p":140},{"i":151,"t":"log.SetLevel sets the level of logs below which logs will not be output. The default logger is LevelTrace. Note that this method is not concurrent-safe. import \"github.com/gofiber/fiber/v2/log\" log.SetLevel(log.LevelInfo)","s":"Set Level","u":"/next/api/log","h":"#set-level","p":140},{"i":153,"t":"log.SetOutput sets the output destination of the logger. The default logger types the log in the console. var logger AllLogger = &defaultLogger{ stdlog: log.New(os.Stderr, \"\", log.LstdFlags|log.Lshortfile|log.Lmicroseconds), depth: 4, } Set the output destination to the file. // Output to ./test.log file f, err := os.OpenFile(\"test.log\", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) if err != nil { return } log.SetOutput(f) Set the output destination to the console and file. // Output to ./test.log file file, _ := os.OpenFile(\"test.log\", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) iw := io.MultiWriter(os.Stdout, file) log.SetOutput(iw)","s":"Set output","u":"/next/api/log","h":"#set-output","p":140},{"i":155,"t":"Set the context, using the following method will return a CommonLogger instance bound to the specified context commonLogger := log.WithContext(ctx) commonLogger.Info(\"info\")","s":"Bind context","u":"/next/api/log","h":"#bind-context","p":140},{"i":157,"t":"Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!","s":"Adaptor","u":"/next/api/middleware/adaptor","h":"","p":156},{"i":159,"t":"Name Signature Description HTTPHandler HTTPHandler(h http.Handler) fiber.Handler http.Handler -> fiber.Handler HTTPHandlerFunc HTTPHandlerFunc(h http.HandlerFunc) fiber.Handler http.HandlerFunc -> fiber.Handler HTTPMiddleware HTTPHandlerFunc(mw func(http.Handler) http.Handler) fiber.Handler func(http.Handler) http.Handler -> fiber.Handler FiberHandler FiberHandler(h fiber.Handler) http.Handler fiber.Handler -> http.Handler FiberHandlerFunc FiberHandlerFunc(h fiber.Handler) http.HandlerFunc fiber.Handler -> http.HandlerFunc FiberApp FiberApp(app *fiber.App) http.HandlerFunc Fiber app -> http.HandlerFunc ConvertRequest ConvertRequest(c *fiber.Ctx, forServer bool) (*http.Request, error) fiber.Ctx -> http.Request CopyContextToFiberContext CopyContextToFiberContext(context interface{}, requestContext *fasthttp.RequestCtx) context.Context -> fasthttp.RequestCtx","s":"Signatures","u":"/next/api/middleware/adaptor","h":"#signatures","p":156},{"i":162,"t":"package main import ( \"fmt\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // New fiber app app := fiber.New() // http.Handler -> fiber.Handler app.Get(\"/\", adaptor.HTTPHandler(handler(greet))) // http.HandlerFunc -> fiber.Handler app.Get(\"/func\", adaptor.HTTPHandlerFunc(greet)) // Listen on port 3000 app.Listen(\":3000\") } func handler(f http.HandlerFunc) http.Handler { return http.HandlerFunc(f) } func greet(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, \"Hello World!\") }","s":"net/http to Fiber","u":"/next/api/middleware/adaptor","h":"#nethttp-to-fiber","p":156},{"i":164,"t":"package main import ( \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // New fiber app app := fiber.New() // http middleware -> fiber.Handler app.Use(adaptor.HTTPMiddleware(logMiddleware)) // Listen on port 3000 app.Listen(\":3000\") } func logMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { log.Println(\"log middleware\") next.ServeHTTP(w, r) }) }","s":"net/http middleware to Fiber","u":"/next/api/middleware/adaptor","h":"#nethttp-middleware-to-fiber","p":156},{"i":166,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // fiber.Handler -> http.Handler http.Handle(\"/\", adaptor.FiberHandler(greet)) // fiber.Handler -> http.HandlerFunc http.HandleFunc(\"/func\", adaptor.FiberHandlerFunc(greet)) // Listen on port 3000 http.ListenAndServe(\":3000\", nil) } func greet(c *fiber.Ctx) error { return c.SendString(\"Hello World!\") }","s":"Fiber Handler to net/http","u":"/next/api/middleware/adaptor","h":"#fiber-handler-to-nethttp","p":156},{"i":168,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { app := fiber.New() app.Get(\"/greet\", greet) // Listen on port 3000 http.ListenAndServe(\":3000\", adaptor.FiberApp(app)) } func greet(c *fiber.Ctx) error { return c.SendString(\"Hello World!\") }","s":"Fiber App to net/http","u":"/next/api/middleware/adaptor","h":"#fiber-app-to-nethttp","p":156},{"i":170,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { app := fiber.New() app.Get(\"/greet\", greetWithHTTPReq) // Listen on port 3000 http.ListenAndServe(\":3000\", adaptor.FiberApp(app)) } func greetWithHTTPReq(c *fiber.Ctx) error { httpReq, err := adaptor.ConvertRequest(c, false) if err != nil { return err } return c.SendString(\"Request URL: \" + httpReq.URL.String()) }","s":"Fiber Context to (net/http).Request","u":"/next/api/middleware/adaptor","h":"#fiber-context-to-nethttprequest","p":156},{"i":172,"t":"Basic Authentication middleware for Fiber that provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized or a custom response for missing or invalid credentials.","s":"BasicAuth","u":"/next/api/middleware/basicauth","h":"","p":171},{"i":174,"t":"func New(config Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/basicauth","h":"#signatures","p":171},{"i":176,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/basicauth\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config app.Use(basicauth.New(basicauth.Config{ Users: map[string]string{ \"john\": \"doe\", \"admin\": \"123456\", }, })) // Or extend your config for customization app.Use(basicauth.New(basicauth.Config{ Users: map[string]string{ \"john\": \"doe\", \"admin\": \"123456\", }, Realm: \"Forbidden\", Authorizer: func(user, pass string) bool { if user == \"john\" && pass == \"doe\" { return true } if user == \"admin\" && pass == \"123456\" { return true } return false }, Unauthorized: func(c *fiber.Ctx) error { return c.SendFile(\"./unauthorized.html\") }, ContextUsername: \"_user\", ContextPassword: \"_pass\", }))","s":"Examples","u":"/next/api/middleware/basicauth","h":"#examples","p":171},{"i":178,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Users defines the allowed credentials // // Required. Default: map[string]string{} Users map[string]string // Realm is a string to define realm attribute of BasicAuth. // the realm identifies the system to authenticate against // and can be used by clients to save credentials // // Optional. Default: \"Restricted\". Realm string // Authorizer defines a function you can pass // to check the credentials however you want. // It will be called with a username and password // and is expected to return true or false to indicate // that the credentials were approved or not. // // Optional. Default: nil. Authorizer func(string, string) bool // Unauthorized defines the response body for unauthorized responses. // By default it will return with a 401 Unauthorized and the correct WWW-Auth header // // Optional. Default: nil Unauthorized fiber.Handler // ContextUser is the key to store the username in Locals // // Optional. Default: \"username\" ContextUsername string // ContextPass is the key to store the password in Locals // // Optional. Default: \"password\" ContextPassword string }","s":"Config","u":"/next/api/middleware/basicauth","h":"#config","p":171},{"i":180,"t":"var ConfigDefault = Config{ Next: nil, Users: map[string]string{}, Realm: \"Restricted\", Authorizer: nil, Unauthorized: nil, ContextUsername: \"username\", ContextPassword: \"password\", }","s":"Default Config","u":"/next/api/middleware/basicauth","h":"#default-config","p":171},{"i":182,"t":"Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core! Request Directives Cache-Control: no-cache will return the up-to-date response but still caches it. You will always get a miss cache status. Cache-Control: no-store will refrain from caching. You will always get the up-to-date response.","s":"Cache","u":"/next/api/middleware/cache","h":"","p":181},{"i":184,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/cache","h":"#signatures","p":181},{"i":186,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/cache\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(cache.New()) // Or extend your config for customization app.Use(cache.New(cache.Config{ Next: func(c *fiber.Ctx) bool { return c.Query(\"refresh\") == \"true\" }, Expiration: 30 * time.Minute, CacheControl: true, })) Or you can custom key and expire time like this: app.Use(cache.New(cache.Config{ ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration { newCacheTime, _ := strconv.Atoi(c.GetRespHeader(\"Cache-Time\", \"600\")) return time.Second * time.Duration(newCacheTime) }, KeyGenerator: func(c *fiber.Ctx) string { return utils.CopyString(c.Path()) }, })) app.Get(\"/\", func(c *fiber.Ctx) error { c.Response().Header.Add(\"Cache-Time\", \"6000\") return c.SendString(\"hi\") })","s":"Examples","u":"/next/api/middleware/cache","h":"#examples","p":181},{"i":188,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Expiration is the time that an cached response will live // // Optional. Default: 1 * time.Minute Expiration time.Duration // CacheHeader header on response header, indicate cache status, with the following possible return value // // hit, miss, unreachable // // Optional. Default: X-Cache CacheHeader string // CacheControl enables client side caching if set to true // // Optional. Default: false CacheControl bool // Key allows you to generate custom keys, by default c.Path() is used // // Default: func(c *fiber.Ctx) string { // return utils.CopyString(c.Path()) // } 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 // Store is used to store the state of the middleware // // Default: an in memory store for this process only Storage fiber.Storage // allows you to store additional headers generated by next middlewares & handler // // Default: false StoreResponseHeaders bool // Max number of bytes of response bodies simultaneously stored in cache. When limit is reached, // entries with the nearest expiration are deleted to make room for new. // 0 means no limit // // Default: 0 MaxBytes uint // You can specify HTTP methods to cache. // The middleware just caches the routes of its methods in this slice. // // Default: []string{fiber.MethodGet, fiber.MethodHead} Methods []string }","s":"Config","u":"/next/api/middleware/cache","h":"#config","p":181},{"i":190,"t":"var ConfigDefault = Config{ Next: nil, Expiration: 1 * time.Minute, CacheHeader: \"X-Cache\", CacheControl: false, KeyGenerator: func(c *fiber.Ctx) string { return utils.CopyString(c.Path()) }, ExpirationGenerator: nil, StoreResponseHeaders: false, Storage: nil, MaxBytes: 0, Methods: []string{fiber.MethodGet, fiber.MethodHead}, }","s":"Default Config","u":"/next/api/middleware/cache","h":"#default-config","p":181},{"i":192,"t":"Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.","s":"Compress","u":"/next/api/middleware/compress","h":"","p":191},{"i":194,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/compress","h":"#signatures","p":191},{"i":196,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/compress\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(compress.New()) // Or extend your config for customization app.Use(compress.New(compress.Config{ Level: compress.LevelBestSpeed, // 1 })) // Skip middleware for specific routes app.Use(compress.New(compress.Config{ Next: func(c *fiber.Ctx) bool { return c.Path() == \"/dont_compress\" }, Level: compress.LevelBestSpeed, // 1 }))","s":"Examples","u":"/next/api/middleware/compress","h":"#examples","p":191},{"i":198,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Level determines the compression algoritm // // Optional. Default: LevelDefault // LevelDisabled: -1 // LevelDefault: 0 // LevelBestSpeed: 1 // LevelBestCompression: 2 Level int }","s":"Config","u":"/next/api/middleware/compress","h":"#config","p":191},{"i":200,"t":"var ConfigDefault = Config{ Next: nil, Level: LevelDefault, }","s":"Default Config","u":"/next/api/middleware/compress","h":"#default-config","p":191},{"i":202,"t":"// Compression levels const ( LevelDisabled = -1 LevelDefault = 0 LevelBestSpeed = 1 LevelBestCompression = 2 )","s":"Constants","u":"/next/api/middleware/compress","h":"#constants","p":191},{"i":204,"t":"CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.","s":"CORS","u":"/next/api/middleware/cors","h":"","p":203},{"i":206,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/cors","h":"#signatures","p":203},{"i":208,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/cors\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(cors.New()) // Or extend your config for customization app.Use(cors.New(cors.Config{ AllowOrigins: \"https://gofiber.io, https://gofiber.net\", AllowHeaders: \"Origin, Content-Type, Accept\", })) Using the AllowOriginsFunc function. In this example any origin will be allowed via CORS. For example, if a browser running on http://localhost:3000 sends a request, this will be accepted and the access-control-allow-origin response header will be set to http://localhost:3000. Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via AllowOrigins. app.Use(cors.New()) app.Use(cors.New(cors.Config{ AllowOriginsFunc: func(origin string) bool { return os.Getenv(\"ENVIRONMENT\") == \"development\" }, }))","s":"Examples","u":"/next/api/middleware/cors","h":"#examples","p":203},{"i":210,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // AllowOriginsFunc defines a function that will set the 'access-control-allow-origin' // response header to the 'origin' request header when returned true. // // Note: Using this feature is discouraged in production and it's best practice to explicitly // set CORS origins via 'AllowOrigins' // // Optional. Default: nil AllowOriginsFunc func(origin string) bool // AllowOrigin defines a list of origins that may access the resource. // // Optional. Default value \"*\" AllowOrigins string // AllowMethods defines a list methods allowed when accessing the resource. // This is used in response to a preflight request. // // Optional. Default value \"GET,POST,HEAD,PUT,DELETE,PATCH\" AllowMethods string // AllowHeaders defines a list of request headers that can be used when // making the actual request. This is in response to a preflight request. // // Optional. Default value \"\". AllowHeaders string // AllowCredentials indicates whether or not the response to the request // can be exposed when the credentials flag is true. When used as part of // a response to a preflight request, this indicates whether or not the // actual request can be made using credentials. // // Optional. Default value false. AllowCredentials bool // ExposeHeaders defines a whitelist headers that clients are allowed to // access. // // Optional. Default value \"\". ExposeHeaders string // MaxAge indicates how long (in seconds) the results of a preflight request // can be cached. // // Optional. Default value 0. MaxAge int }","s":"Config","u":"/next/api/middleware/cors","h":"#config","p":203},{"i":212,"t":"var ConfigDefault = Config{ Next: nil, AllowOriginsFunc: nil, AllowOrigins: \"*\", AllowMethods: strings.Join([]string{ fiber.MethodGet, fiber.MethodPost, fiber.MethodHead, fiber.MethodPut, fiber.MethodDelete, fiber.MethodPatch, }, \",\"), AllowHeaders: \"\", AllowCredentials: false, ExposeHeaders: \"\", MaxAge: 0, }","s":"Default Config","u":"/next/api/middleware/cors","h":"#default-config","p":203},{"i":214,"t":"CSRF middleware for Fiber that provides Cross-site request forgery protection by passing a csrf token via cookies. This cookie value will be used to compare against the client csrf token on requests, other than those defined as \"safe\" by RFC7231 (GET, HEAD, OPTIONS, or TRACE). When the csrf token is invalid, this middleware will return the fiber.ErrForbidden error. CSRF Tokens are generated on GET requests. You can retrieve the CSRF token with c.Locals(contextKey), where contextKey is the string you set in the config (see Custom Config below). When no csrf_ cookie is set, or the token has expired, a new token will be generated and csrf_ cookie set. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.","s":"CSRF","u":"/next/api/middleware/csrf","h":"","p":213},{"i":216,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/csrf","h":"#signatures","p":213},{"i":218,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/csrf\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(csrf.New()) // Or extend your config for customization app.Use(csrf.New(csrf.Config{ KeyLookup: \"header:X-Csrf-Token\", CookieName: \"csrf_\", CookieSameSite: \"Lax\", Expiration: 1 * time.Hour, KeyGenerator: utils.UUID, Extractor: func(c *fiber.Ctx) (string, error) { ... }, })) note KeyLookup will be ignored if Extractor is explicitly set.","s":"Examples","u":"/next/api/middleware/csrf","h":"#examples","p":213},{"i":220,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // KeyLookup is a string in the form of \":\" that is used // to create an Extractor that extracts the token from the request. // Possible values: // - \"header:\" // - \"query:\" // - \"param:\" // - \"form:\" // - \"cookie:\" // // Ignored if an Extractor is explicitly set. // // Optional. Default: \"header:X-CSRF-Token\" KeyLookup string // Name of the session cookie. This cookie will store session key. // Optional. Default value \"csrf_\". CookieName string // Domain of the CSRF cookie. // Optional. Default value \"\". CookieDomain string // Path of the CSRF cookie. // Optional. Default value \"\". CookiePath string // Indicates if CSRF cookie is secure. // Optional. Default value false. CookieSecure bool // Indicates if CSRF cookie is HTTP only. // Optional. Default value false. CookieHTTPOnly bool // Indicates if CSRF cookie is requested by SameSite. // Optional. Default value \"Lax\". CookieSameSite string // Decides whether cookie should last for only the browser sesison. // Ignores Expiration if set to true CookieSessionOnly bool // Expiration is the duration before csrf token will expire // // Optional. Default: 1 * time.Hour Expiration time.Duration // Store is used to store the state of the middleware // // Optional. Default: memory.New() Storage fiber.Storage // Context key to store generated CSRF token into context. // If left empty, token will not be stored in context. // // Optional. Default: \"\" ContextKey string // KeyGenerator creates a new CSRF token // // Optional. Default: utils.UUID KeyGenerator func() string // Extractor returns the csrf token // // If set this will be used in place of an Extractor based on KeyLookup. // // Optional. Default will create an Extractor based on KeyLookup. Extractor func(c *fiber.Ctx) (string, error) }","s":"Config","u":"/next/api/middleware/csrf","h":"#config","p":213},{"i":222,"t":"var ConfigDefault = Config{ KeyLookup: \"header:\" + HeaderName, CookieName: \"csrf_\", CookieSameSite: \"Lax\", Expiration: 1 * time.Hour, KeyGenerator: utils.UUID, ErrorHandler: defaultErrorHandler, Extractor: CsrfFromHeader(HeaderName), }","s":"Default Config","u":"/next/api/middleware/csrf","h":"#default-config","p":213},{"i":224,"t":"const ( HeaderName = \"X-Csrf-Token\" )","s":"Constants","u":"/next/api/middleware/csrf","h":"#constants","p":213},{"i":226,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 app.Use(csrf.New(csrf.Config{ Storage: storage, }))","s":"Custom Storage/Database","u":"/next/api/middleware/csrf","h":"#custom-storagedatabase","p":213},{"i":228,"t":"The Early Data middleware for Fiber adds support for TLS 1.3's early data (\"0-RTT\") feature. Citing RFC 8446, when a client and server share a PSK, TLS 1.3 allows clients to send data on the first flight (\"early data\") to speed up the request, effectively reducing the regular 1-RTT request to a 0-RTT request. Make sure to enable fiber's EnableTrustedProxyCheck config option before using this middleware in order to not trust bogus HTTP request headers of the client. Also be aware that enabling support for early data in your reverse proxy (e.g. nginx, as done with a simple ssl_early_data on;) makes requests replayable. Refer to the following documents before continuing: https://datatracker.ietf.org/doc/html/rfc8446#section-8 https://blog.trailofbits.com/2019/03/25/what-application-developers-need-to-know-about-tls-early-data-0rtt/ By default, this middleware allows early data requests on safe HTTP request methods only and rejects the request otherwise, i.e. aborts the request before executing your handler. This behavior can be controlled by the AllowEarlyData config option. Safe HTTP methods — GET, HEAD, OPTIONS and TRACE — should not modify a state on the server.","s":"EarlyData","u":"/next/api/middleware/earlydata","h":"","p":227},{"i":230,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/earlydata","h":"#signatures","p":227},{"i":232,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/earlydata\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(earlydata.New()) // Or extend your config for customization app.Use(earlydata.New(earlydata.Config{ Error: fiber.ErrTooEarly, // ... }))","s":"Examples","u":"/next/api/middleware/earlydata","h":"#examples","p":227},{"i":234,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // IsEarlyData returns whether the request is an early-data request. // // Optional. Default: a function which checks if the \"Early-Data\" request header equals \"1\". IsEarlyData func(c *fiber.Ctx) bool // AllowEarlyData returns whether the early-data request should be allowed or rejected. // // Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods. AllowEarlyData func(c *fiber.Ctx) bool // Error is returned in case an early-data request is rejected. // // Optional. Default: fiber.ErrTooEarly. Error error }","s":"Config","u":"/next/api/middleware/earlydata","h":"#config","p":227},{"i":236,"t":"var ConfigDefault = Config{ IsEarlyData: func(c *fiber.Ctx) bool { return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue }, AllowEarlyData: func(c *fiber.Ctx) bool { return fiber.IsMethodSafe(c.Method()) }, Error: fiber.ErrTooEarly, }","s":"Default Config","u":"/next/api/middleware/earlydata","h":"#default-config","p":227},{"i":238,"t":"const ( DefaultHeaderName = \"Early-Data\" DefaultHeaderTrueValue = \"1\" )","s":"Constants","u":"/next/api/middleware/earlydata","h":"#constants","p":227},{"i":240,"t":"Encrypt middleware for Fiber which encrypts cookie values. Note: this middleware does not encrypt cookie names.","s":"Encrypt Cookie","u":"/next/api/middleware/encryptcookie","h":"","p":239},{"i":242,"t":"// Intitializes the middleware func New(config ...Config) fiber.Handler // Returns a random 32 character long string func GenerateKey() string","s":"Signatures","u":"/next/api/middleware/encryptcookie","h":"#signatures","p":239},{"i":244,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/encryptcookie\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config // `Key` must be a 32 character string. It's used to encrypt the values, so make sure it is random and keep it secret. // You can run `openssl rand -base64 32` or call `encryptcookie.GenerateKey()` to create a random key for you. // Make sure not to set `Key` to `encryptcookie.GenerateKey()` because that will create a new key every run. app.Use(encryptcookie.New(encryptcookie.Config{ Key: \"secret-thirty-2-character-string\", })) // Get / reading out the encrypted cookie app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"value=\" + c.Cookies(\"test\")) }) // Post / create the encrypted cookie app.Post(\"/\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"test\", Value: \"SomeThing\", }) return nil })","s":"Examples","u":"/next/api/middleware/encryptcookie","h":"#examples","p":239},{"i":246,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Array of cookie keys that should not be encrypted. // // Optional. Default: [\"csrf_\"] Except []string // Base64 encoded unique key to encode & decode cookies. // // Required. The key should be 32 bytes of random data in base64-encoded form. // You may run `openssl rand -base64 32` or use `encryptcookie.GenerateKey()` to generate a new key. Key string // Custom function to encrypt cookies. // // Optional. Default: EncryptCookie Encryptor func(decryptedString, key string) (string, error) // Custom function to decrypt cookies. // // Optional. Default: DecryptCookie Decryptor func(encryptedString, key string) (string, error) }","s":"Config","u":"/next/api/middleware/encryptcookie","h":"#config","p":239},{"i":248,"t":"var ConfigDefault = Config{ Next: nil, Except: []string{\"csrf_\"}, Key: \"\", Encryptor: EncryptCookie, Decryptor: DecryptCookie, }","s":"Default Config","u":"/next/api/middleware/encryptcookie","h":"#default-config","p":239},{"i":250,"t":"Normally, encryptcookie middleware skips csrf_ cookies. However, it won't work when you use custom cookie names for CSRF. You should update Except config to avoid this problem. For example: app.Use(encryptcookie.New(encryptcookie.Config{ Key: \"secret-thirty-2-character-string\", Except: []string{\"csrf_1\"}, // exclude CSRF cookie })) app.Use(csrf.New(csrf.Config{ KeyLookup: \"form:test\", CookieName: \"csrf_1\", CookieHTTPOnly: true, }))","s":"Usage of CSRF and Encryptcookie Middlewares with Custom Cookie Names","u":"/next/api/middleware/encryptcookie","h":"#usage-of-csrf-and-encryptcookie-middlewares-with-custom-cookie-names","p":239},{"i":252,"t":"EnvVar middleware for Fiber that can be used to expose environment variables with various options.","s":"EnvVar","u":"/next/api/middleware/envvar","h":"","p":251},{"i":254,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/envvar","h":"#signatures","p":251},{"i":256,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/envvar\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(\"/expose/envvars\", envvar.New()) // Or extend your config for customization app.Use(\"/expose/envvars\", envvar.New( envvar.Config{ ExportVars: map[string]string{\"testKey\": \"\", \"testDefaultKey\": \"testDefaultVal\"}, ExcludeVars: map[string]string{\"excludeKey\": \"\"}, }), ) note You will need to provide a path to use the envvar middleware.","s":"Examples","u":"/next/api/middleware/envvar","h":"#examples","p":251},{"i":258,"t":"Http response contract: { \"vars\": { \"someEnvVariable\": \"someValue\", \"anotherEnvVariable\": \"anotherValue\", } }","s":"Response","u":"/next/api/middleware/envvar","h":"#response","p":251},{"i":260,"t":"// Config defines the config for middleware. type Config struct { // ExportVars specifies the environment variables that should export ExportVars map[string]string // ExcludeVars specifies the environment variables that should not export ExcludeVars map[string]string }","s":"Config","u":"/next/api/middleware/envvar","h":"#config","p":251},{"i":262,"t":"Config{}","s":"Default Config","u":"/next/api/middleware/envvar","h":"#default-config","p":251},{"i":264,"t":"ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.","s":"ETag","u":"/next/api/middleware/etag","h":"","p":263},{"i":266,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/etag","h":"#signatures","p":263},{"i":268,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/etag\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(etag.New()) // Get / receives Etag: \"13-1831710635\" in response header app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) // Or extend your config for customization app.Use(etag.New(etag.Config{ Weak: true, })) // Get / receives Etag: \"W/\"13-1831710635\" in response header app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") })","s":"Examples","u":"/next/api/middleware/etag","h":"#examples","p":263},{"i":270,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Weak indicates that a weak validator is used. Weak etags are easy // to generate, but are far less useful for comparisons. Strong // validators are ideal for comparisons but can be very difficult // to generate efficiently. Weak ETag values of two representations // of the same resources might be semantically equivalent, but not // byte-for-byte identical. This means weak etags prevent caching // when byte range requests are used, but strong etags mean range // requests can still be cached. Weak bool }","s":"Config","u":"/next/api/middleware/etag","h":"#config","p":263},{"i":272,"t":"var ConfigDefault = Config{ Next: nil, Weak: false, }","s":"Default Config","u":"/next/api/middleware/etag","h":"#default-config","p":263},{"i":274,"t":"Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.","s":"ExpVar","u":"/next/api/middleware/expvar","h":"","p":273},{"i":276,"t":"func New() fiber.Handler","s":"Signatures","u":"/next/api/middleware/expvar","h":"#signatures","p":273},{"i":278,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" expvarmw \"github.com/gofiber/fiber/v2/middleware/expvar\" ) After you initiate your Fiber app, you can use the following possibilities: var count = expvar.NewInt(\"count\") app.Use(expvarmw.New()) app.Get(\"/\", func(c *fiber.Ctx) error { count.Add(1) return c.SendString(fmt.Sprintf(\"hello expvar count %d\", count.Value())) }) Visit path /debug/vars to see all vars and use query r=key to filter exposed variables. curl 127.0.0.1:3000 hello expvar count 1 curl 127.0.0.1:3000/debug/vars { \"cmdline\": [\"xxx\"], \"count\": 1, \"expvarHandlerCalls\": 33, \"expvarRegexpErrors\": 0, \"memstats\": {...} } curl 127.0.0.1:3000/debug/vars?r=c { \"cmdline\": [\"xxx\"], \"count\": 1 }","s":"Examples","u":"/next/api/middleware/expvar","h":"#examples","p":273},{"i":280,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool }","s":"Config","u":"/next/api/middleware/expvar","h":"#config","p":273},{"i":282,"t":"var ConfigDefault = Config{ Next: nil, }","s":"Default Config","u":"/next/api/middleware/expvar","h":"#default-config","p":273},{"i":284,"t":"Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware. note This middleware is exclusively for serving the default, implicit favicon, which is GET /favicon.ico or custom favicon URL.","s":"Favicon","u":"/next/api/middleware/favicon","h":"","p":283},{"i":286,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/favicon","h":"#signatures","p":283},{"i":288,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/favicon\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(favicon.New()) // Or extend your config for customization app.Use(favicon.New(favicon.Config{ File: \"./favicon.ico\", URL: \"/favicon.ico\", }))","s":"Examples","u":"/next/api/middleware/favicon","h":"#examples","p":283},{"i":290,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // File holds the path to an actual favicon that will be cached // // Optional. Default: \"\" File string // URL for favicon handler // // Optional. Default: \"/favicon.ico\" URL string // FileSystem is an optional alternate filesystem to search for the favicon in. // An example of this could be an embedded or network filesystem // // Optional. Default: nil FileSystem http.FileSystem // CacheControl defines how the Cache-Control header in the response should be set // // Optional. Default: \"public, max-age=31536000\" CacheControl string }","s":"Config","u":"/next/api/middleware/favicon","h":"#config","p":283},{"i":292,"t":"var ConfigDefault = Config{ Next: nil, File: \"\", URL: fPath, CacheControl: \"public, max-age=31536000\", }","s":"Default Config","u":"/next/api/middleware/favicon","h":"#default-config","p":283},{"i":294,"t":"Filesystem middleware for Fiber that enables you to serve files from a directory. caution :params & :optionals? within the prefix path are not supported! To handle paths with spaces (or other url encoded values) make sure to set fiber.Config{ UnescapePath: true }","s":"FileSystem","u":"/next/api/middleware/filesystem","h":"","p":293},{"i":296,"t":"func New(config Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/filesystem","h":"#signatures","p":293},{"i":298,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config app.Use(filesystem.New(filesystem.Config{ Root: http.Dir(\"./assets\"), })) // Or extend your config for customization app.Use(filesystem.New(filesystem.Config{ Root: http.Dir(\"./assets\"), Browse: true, Index: \"index.html\", NotFoundFile: \"404.html\", MaxAge: 3600, })) If your environment (Go 1.16+) supports it, we recommend using Go Embed instead of the other solutions listed as this one is native to Go and the easiest to use.","s":"Examples","u":"/next/api/middleware/filesystem","h":"#examples","p":293},{"i":300,"t":"Embed is the native method to embed files in a Golang excecutable. Introduced in Go 1.16. package main import ( \"embed\" \"io/fs\" \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" ) // Embed a single file //go:embed index.html var f embed.FS // Embed a directory //go:embed static/* var embedDirStatic embed.FS func main() { app := fiber.New() app.Use(\"/\", filesystem.New(filesystem.Config{ Root: http.FS(f), })) // Access file \"image.png\" under `static/` directory via URL: `http:///static/image.png`. // Without `PathPrefix`, you have to access it via URL: // `http:///static/static/image.png`. app.Use(\"/static\", filesystem.New(filesystem.Config{ Root: http.FS(embedDirStatic), PathPrefix: \"static\", Browse: true, })) log.Fatal(app.Listen(\":3000\")) }","s":"embed","u":"/next/api/middleware/filesystem","h":"#embed","p":293},{"i":302,"t":"https://github.com/markbates/pkger package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/markbates/pkger\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: pkger.Dir(\"/assets\"), })) log.Fatal(app.Listen(\":3000\")) }","s":"pkger","u":"/next/api/middleware/filesystem","h":"#pkger","p":293},{"i":304,"t":"https://github.com/gobuffalo/packr package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/gobuffalo/packr/v2\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: packr.New(\"Assets Box\", \"/assets\"), })) log.Fatal(app.Listen(\":3000\")) }","s":"packr","u":"/next/api/middleware/filesystem","h":"#packr","p":293},{"i":306,"t":"https://github.com/GeertJohan/go.rice package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/GeertJohan/go.rice\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: rice.MustFindBox(\"assets\").HTTPBox(), })) log.Fatal(app.Listen(\":3000\")) }","s":"go.rice","u":"/next/api/middleware/filesystem","h":"#gorice","p":293},{"i":308,"t":"https://github.com/UnnoTed/fileb0x package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"/myEmbeddedFiles\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: myEmbeddedFiles.HTTP, })) log.Fatal(app.Listen(\":3000\")) }","s":"fileb0x","u":"/next/api/middleware/filesystem","h":"#fileb0x","p":293},{"i":310,"t":"https://github.com/rakyll/statik package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" // Use blank to invoke init function and register data to statik _ \"/statik\" \"github.com/rakyll/statik/fs\" ) func main() { statikFS, err := fs.New() if err != nil { panic(err) } app := fiber.New() app.Use(\"/\", filesystem.New(filesystem.Config{ Root: statikFS, })) log.Fatal(app.Listen(\":3000\")) }","s":"statik","u":"/next/api/middleware/filesystem","h":"#statik","p":293},{"i":312,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Root is a FileSystem that provides access // to a collection of files and directories. // // Required. Default: nil Root http.FileSystem `json:\"-\"` // PathPrefix defines a prefix to be added to a filepath when // reading a file from the FileSystem. // // Use when using Go 1.16 embed.FS // // Optional. Default \"\" PathPrefix string `json:\"path_prefix\"` // Enable directory browsing. // // Optional. Default: false Browse bool `json:\"browse\"` // Index file for serving a directory. // // Optional. Default: \"index.html\" Index string `json:\"index\"` // The value for the Cache-Control HTTP-header // that is set on the file response. MaxAge is defined in seconds. // // Optional. Default value 0. MaxAge int `json:\"max_age\"` // File to return if path is not found. Useful for SPA's. // // Optional. Default: \"\" NotFoundFile string `json:\"not_found_file\"` // The value for the Content-Type HTTP-header // that is set on the file response // // Optional. Default: \"\" ContentTypeCharset string `json:\"content_type_charset\"` }","s":"Config","u":"/next/api/middleware/filesystem","h":"#config","p":293},{"i":314,"t":"var ConfigDefault = Config{ Next: nil, Root: nil, PathPrefix: \"\", Browse: false, Index: \"/index.html\", MaxAge: 0, ContentTypeCharset: \"\", }","s":"Default Config","u":"/next/api/middleware/filesystem","h":"#default-config","p":293},{"i":316,"t":"Helmet middleware helps secure your apps by setting various HTTP headers.","s":"Helmet","u":"/next/api/middleware/helmet","h":"","p":315},{"i":318,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/helmet","h":"#signatures","p":315},{"i":320,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/helmet\" ) func main() { app := fiber.New() app.Use(helmet.New()) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome!\") }) app.Listen(\":3000\") } Test: curl -I http://localhost:3000","s":"Examples","u":"/next/api/middleware/helmet","h":"#examples","p":315},{"i":322,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // XSSProtection // Optional. Default value \"0\". XSSProtection string // ContentTypeNosniff // Optional. Default value \"nosniff\". ContentTypeNosniff string // XFrameOptions // Optional. Default value \"SAMEORIGIN\". // Possible values: \"SAMEORIGIN\", \"DENY\", \"ALLOW-FROM uri\" XFrameOptions string // HSTSMaxAge // Optional. Default value 0. HSTSMaxAge int // HSTSExcludeSubdomains // Optional. Default value false. HSTSExcludeSubdomains bool // ContentSecurityPolicy // Optional. Default value \"\". ContentSecurityPolicy string // CSPReportOnly // Optional. Default value false. CSPReportOnly bool // HSTSPreloadEnabled // Optional. Default value false. HSTSPreloadEnabled bool // ReferrerPolicy // Optional. Default value \"ReferrerPolicy\". ReferrerPolicy string // Permissions-Policy // Optional. Default value \"\". PermissionPolicy string // Cross-Origin-Embedder-Policy // Optional. Default value \"require-corp\". CrossOriginEmbedderPolicy string // Cross-Origin-Opener-Policy // Optional. Default value \"same-origin\". CrossOriginOpenerPolicy string // Cross-Origin-Resource-Policy // Optional. Default value \"same-origin\". CrossOriginResourcePolicy string // Origin-Agent-Cluster // Optional. Default value \"?1\". OriginAgentCluster string // X-DNS-Prefetch-Control // Optional. Default value \"off\". XDNSPrefetchControl string // X-Download-Options // Optional. Default value \"noopen\". XDownloadOptions string // X-Permitted-Cross-Domain-Policies // Optional. Default value \"none\". XPermittedCrossDomain string }","s":"Config","u":"/next/api/middleware/helmet","h":"#config","p":315},{"i":324,"t":"var ConfigDefault = Config{ XSSProtection: \"0\", ContentTypeNosniff: \"nosniff\", XFrameOptions: \"SAMEORIGIN\", ReferrerPolicy: \"no-referrer\", CrossOriginEmbedderPolicy: \"require-corp\", CrossOriginOpenerPolicy: \"same-origin\", CrossOriginResourcePolicy: \"same-origin\", OriginAgentCluster: \"?1\", XDNSPrefetchControl: \"off\", XDownloadOptions: \"noopen\", XPermittedCrossDomain: \"none\", }","s":"Default Config","u":"/next/api/middleware/helmet","h":"#default-config","p":315},{"i":326,"t":"Idempotency middleware for Fiber allows for fault-tolerant APIs where duplicate requests — for example due to networking issues on the client-side — do not erroneously cause the same action performed multiple times on the server-side. Refer to https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-02 for a better understanding.","s":"Idempotency","u":"/next/api/middleware/idempotency","h":"","p":325},{"i":328,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/idempotency","h":"#signatures","p":325},{"i":330,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/idempotency\" ) After you initiate your Fiber app, you can use the following possibilities:","s":"Examples","u":"/next/api/middleware/idempotency","h":"#examples","p":325},{"i":332,"t":"app.Use(idempotency.New())","s":"Default Config","u":"/next/api/middleware/idempotency","h":"#default-config","p":325},{"i":334,"t":"app.Use(idempotency.New(idempotency.Config{ Lifetime: 42 * time.Minute, // ... }))","s":"Custom Config","u":"/next/api/middleware/idempotency","h":"#custom-config","p":325},{"i":336,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: a function which skips the middleware on safe HTTP request method. Next func(c *fiber.Ctx) bool // Lifetime is the maximum lifetime of an idempotency key. // // Optional. Default: 30 * time.Minute Lifetime time.Duration // KeyHeader is the name of the header that contains the idempotency key. // // Optional. Default: X-Idempotency-Key KeyHeader string // KeyHeaderValidate defines a function to validate the syntax of the idempotency header. // // Optional. Default: a function which ensures the header is 36 characters long (the size of an UUID). KeyHeaderValidate func(string) error // KeepResponseHeaders is a list of headers that should be kept from the original response. // // Optional. Default: nil (to keep all headers) KeepResponseHeaders []string // Lock locks an idempotency key. // // Optional. Default: an in-memory locker for this process only. Lock Locker // Storage stores response data by idempotency key. // // Optional. Default: an in-memory storage for this process only. Storage fiber.Storage }","s":"Config","u":"/next/api/middleware/idempotency","h":"#config","p":325},{"i":338,"t":"var ConfigDefault = Config{ Next: func(c *fiber.Ctx) bool { // Skip middleware if the request was done using a safe HTTP method return fiber.IsMethodSafe(c.Method()) }, Lifetime: 30 * time.Minute, KeyHeader: \"X-Idempotency-Key\", KeyHeaderValidate: func(k string) error { if l, wl := len(k), 36; l != wl { // UUID length is 36 chars return fmt.Errorf(\"%w: invalid length: %d != %d\", ErrInvalidIdempotencyKey, l, wl) } return nil }, KeepResponseHeaders: nil, Lock: nil, // Set in configDefault so we don't allocate data here. Storage: nil, // Set in configDefault so we don't allocate data here. }","s":"Default Config","u":"/next/api/middleware/idempotency","h":"#default-config-1","p":325},{"i":340,"t":"Key auth middleware provides a key based authentication.","s":"Keyauth","u":"/next/api/middleware/keyauth","h":"","p":339},{"i":342,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/keyauth","h":"#signatures","p":339},{"i":344,"t":"package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" ) var ( apiKey = \"correct horse battery staple\" ) func validateAPIKey(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey } func main() { app := fiber.New() // note that the keyauth middleware needs to be defined before the routes are defined! app.Use(keyauth.New(keyauth.Config{ KeyLookup: \"cookie:access_token\", Validator: validateAPIKey, })) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Listen(\":3000\") } Test: # No api-key specified -> 400 missing curl http://localhost:3000 #> missing or malformed API Key curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000 #> Successfully authenticated! curl --cookie \"access_token=Clearly A Wrong Key\" http://localhost:3000 #> missing or malformed API Key For a more detailed example, see also the github.com/gofiber/recipes repository and specifically the fiber-envoy-extauthz repository and the keyauth example code.","s":"Examples","u":"/next/api/middleware/keyauth","h":"#examples","p":339},{"i":346,"t":"If you want to authenticate only certain endpoints, you can use the Config of keyauth and apply a filter function (eg. authFilter) like so package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" \"regexp\" \"strings\" ) var ( apiKey = \"correct horse battery staple\" protectedURLs = []*regexp.Regexp{ regexp.MustCompile(\"^/authenticated$\"), regexp.MustCompile(\"^/auth2$\"), } ) func validateAPIKey(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey } func authFilter(c *fiber.Ctx) bool { originalURL := strings.ToLower(c.OriginalURL()) for _, pattern := range protectedURLs { if pattern.MatchString(originalURL) { return false } } return true } func main() { app := fiber.New() app.Use(keyauth.New(keyauth.Config{ Next: authFilter, KeyLookup: \"cookie:access_token\", Validator: validateAPIKey, })) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome\") }) app.Get(\"/authenticated\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Get(\"/auth2\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated 2!\") }) app.Listen(\":3000\") } Which results in this # / does not need to be authenticated curl http://localhost:3000 #> Welcome # /authenticated needs to be authenticated curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000/authenticated #> Successfully authenticated! # /auth2 needs to be authenticated too curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000/auth2 #> Successfully authenticated 2!","s":"Authenticate only certain endpoints","u":"/next/api/middleware/keyauth","h":"#authenticate-only-certain-endpoints","p":339},{"i":348,"t":"package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" ) const ( apiKey = \"my-super-secret-key\" ) func main() { app := fiber.New() authMiddleware := keyauth.New(keyauth.Config{ Validator: func(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey }, }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome\") }) app.Get(\"/allowed\", authMiddleware, func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Listen(\":3000\") } Which results in this # / does not need to be authenticated curl http://localhost:3000 #> Welcome # /allowed needs to be authenticated too curl --header \"Authorization: Bearer my-super-secret-key\" http://localhost:3000/allowed #> Successfully authenticated!","s":"Specifying middleware in the handler","u":"/next/api/middleware/keyauth","h":"#specifying-middleware-in-the-handler","p":339},{"i":350,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // SuccessHandler defines a function which is executed for a valid key. // Optional. Default: nil SuccessHandler fiber.Handler // ErrorHandler defines a function which is executed for an invalid key. // It may be used to define a custom error. // Optional. Default: 401 Invalid or expired key ErrorHandler fiber.ErrorHandler // KeyLookup is a string in the form of \":\" that is used // to extract key from the request. // Optional. Default value \"header:Authorization\". // Possible values: // - \"header:\" // - \"query:\" // - \"form:\" // - \"param:\" // - \"cookie:\" KeyLookup string // AuthScheme to be used in the Authorization header. // Optional. Default value \"Bearer\". AuthScheme string // Validator is a function to validate key. Validator func(*fiber.Ctx, string) (bool, error) // Context key to store the bearertoken from the token into context. // Optional. Default: \"token\". ContextKey string }","s":"Config","u":"/next/api/middleware/keyauth","h":"#config","p":339},{"i":352,"t":"var ConfigDefault = Config{ SuccessHandler: func(c *fiber.Ctx) error { return c.Next() }, ErrorHandler: func(c *fiber.Ctx, err error) error { if err == ErrMissingOrMalformedAPIKey { return c.Status(fiber.StatusUnauthorized).SendString(err.Error()) } return c.Status(fiber.StatusUnauthorized).SendString(\"Invalid or expired API Key\") }, KeyLookup: \"header:\" + fiber.HeaderAuthorization, AuthScheme: \"Bearer\", ContextKey: \"token\", }","s":"Default Config","u":"/next/api/middleware/keyauth","h":"#default-config","p":339},{"i":354,"t":"Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases. note This module does not share state with other processes/servers by default.","s":"Limiter","u":"/next/api/middleware/limiter","h":"","p":353},{"i":356,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/limiter","h":"#signatures","p":353},{"i":358,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/limiter\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(limiter.New()) // Or extend your config for customization app.Use(limiter.New(limiter.Config{ Next: func(c *fiber.Ctx) bool { return c.IP() == \"127.0.0.1\" }, Max: 20, Expiration: 30 * time.Second, KeyGenerator: func(c *fiber.Ctx) string { return c.Get(\"x-forwarded-for\") }, LimitReached: func(c *fiber.Ctx) error { return c.SendFile(\"./toofast.html\") }, Storage: myCustomStorage{}, }))","s":"Examples","u":"/next/api/middleware/limiter","h":"#examples","p":353},{"i":360,"t":"Instead of using the standard fixed window algorithm, you can enable the sliding window algorithm. A example of such configuration is: app.Use(limiter.New(limiter.Config{ Max: 20, Expiration: 30 * time.Second, LimiterMiddleware: limiter.SlidingWindow{}, })) This means that every window will take into account the previous window(if there was any). The given formula for the rate is: weightOfPreviousWindpw = previous window's amount request * (whenNewWindow / Expiration) rate = weightOfPreviousWindpw + current window's amount request.","s":"Sliding window","u":"/next/api/middleware/limiter","h":"#sliding-window","p":353},{"i":362,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Max number of recent connections during `Duration` seconds before sending a 429 response // // Default: 5 Max int // KeyGenerator allows you to generate custom keys, by default c.IP() is used // // Default: func(c *fiber.Ctx) string { // return c.IP() // } KeyGenerator func(*fiber.Ctx) string // Expiration is the time on how long to keep records of requests in memory // // Default: 1 * time.Minute Expiration time.Duration // LimitReached is called when a request hits the limit // // Default: func(c *fiber.Ctx) error { // return c.SendStatus(fiber.StatusTooManyRequests) // } LimitReached fiber.Handler // When set to true, requests with StatusCode >= 400 won't be counted. // // Default: false SkipFailedRequests bool // When set to true, requests with StatusCode < 400 won't be counted. // // Default: false SkipSuccessfulRequests bool // Store is used to store the state of the middleware // // Default: an in memory store for this process only Storage fiber.Storage // LimiterMiddleware is the struct that implements limiter middleware. // // Default: a new Fixed Window Rate Limiter LimiterMiddleware LimiterHandler } note A custom store can be used if it implements the Storage interface - more details and an example can be found in store.go.","s":"Config","u":"/next/api/middleware/limiter","h":"#config","p":353},{"i":364,"t":"var ConfigDefault = Config{ Max: 5, Expiration: 1 * time.Minute, KeyGenerator: func(c *fiber.Ctx) string { return c.IP() }, LimitReached: func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusTooManyRequests) }, SkipFailedRequests: false, SkipSuccessfulRequests: false, LimiterMiddleware: FixedWindow{}, }","s":"Default Config","u":"/next/api/middleware/limiter","h":"#default-config","p":353},{"i":366,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 app.Use(limiter.New(limiter.Config{ Storage: storage, }))","s":"Custom Storage/Database","u":"/next/api/middleware/limiter","h":"#custom-storagedatabase","p":353},{"i":368,"t":"Logger middleware for Fiber that logs HTTP request/response details.","s":"Logger","u":"/next/api/middleware/logger","h":"","p":367},{"i":370,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/logger","h":"#signatures","p":367},{"i":372,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/logger\" ) tip The order of registration plays a role. Only all routes that are registered after this one will be logged. The middleware should therefore be one of the first to be registered. After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(logger.New()) // Or extend your config for customization // Logging remote IP and Port app.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) // Logging Request ID app.Use(requestid.New()) app.Use(logger.New(logger.Config{ // For more options, see the Config section Format: \"${pid} ${locals:requestid} ${status} - ${method} ${path}​\\n\", })) // Changing TimeZone & TimeFormat app.Use(logger.New(logger.Config{ Format: \"${pid} ${status} - ${method} ${path}\\n\", TimeFormat: \"02-Jan-2006\", TimeZone: \"America/New_York\", })) // Custom File Writer file, err := os.OpenFile(\"./123.log\", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) if err != nil { log.Fatalf(\"error opening file: %v\", err) } defer file.Close() app.Use(logger.New(logger.Config{ Output: file, })) // Add Custom Tags app.Use(logger.New(logger.Config{ CustomTags: map[string]logger.LogFunc{ \"custom_tag\": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) { return output.WriteString(\"it is a custom tag\") }, }, })) // Callback after log is written app.Use(logger.New(logger.Config{ TimeFormat: time.RFC3339Nano, TimeZone: \"Asia/Shanghai\", Done: func(c *fiber.Ctx, logString []byte) { if c.Response().StatusCode() != fiber.StatusOK { reporter.SendToSlack(logString) } }, })) // Disable colors when outputting to default format app.Use(logger.New(logger.Config{ DisableColors: true, }))","s":"Examples","u":"/next/api/middleware/logger","h":"#examples","p":367},{"i":374,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Done is a function that is called after the log string for a request is written to Output, // and pass the log string as parameter. // // Optional. Default: nil Done func(c *fiber.Ctx, logString []byte) // tagFunctions defines the custom tag action // // Optional. Default: map[string]LogFunc CustomTags map[string]LogFunc // Format defines the logging tags // // Optional. Default: [${time}] ${status} - ${latency} ${method} ${path}\\n Format string // TimeFormat https://programming.guide/go/format-parse-string-time-date-example.html // // Optional. Default: 15:04:05 TimeFormat string // TimeZone can be specified, such as \"UTC\" and \"America/New_York\" and \"Asia/Chongqing\", etc // // Optional. Default: \"Local\" TimeZone string // TimeInterval is the delay before the timestamp is updated // // Optional. Default: 500 * time.Millisecond TimeInterval time.Duration // Output is a writer where logs are written // // Default: os.Stdout Output io.Writer // DisableColors defines if the logs output should be colorized // // Default: false DisableColors bool enableColors bool enableLatency bool timeZoneLocation *time.Location } type LogFunc func(buf logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error)","s":"Config","u":"/next/api/middleware/logger","h":"#config","p":367},{"i":376,"t":"var ConfigDefault = Config{ Next: nil, Done: nil, Format: \"[${time}] ${status} - ${latency} ${method} ${path}\\n\", TimeFormat: \"15:04:05\", TimeZone: \"Local\", TimeInterval: 500 * time.Millisecond, Output: os.Stdout, DisableColors: false, }","s":"Default Config","u":"/next/api/middleware/logger","h":"#default-config","p":367},{"i":378,"t":"// Logger variables const ( TagPid = \"pid\" TagTime = \"time\" TagReferer = \"referer\" TagProtocol = \"protocol\" TagPort = \"port\" TagIP = \"ip\" TagIPs = \"ips\" TagHost = \"host\" TagMethod = \"method\" TagPath = \"path\" TagURL = \"url\" TagUA = \"ua\" TagLatency = \"latency\" TagStatus = \"status\" // response status TagResBody = \"resBody\" // response body TagReqHeaders = \"reqHeaders\" TagQueryStringParams = \"queryParams\" // request query parameters TagBody = \"body\" // request body TagBytesSent = \"bytesSent\" TagBytesReceived = \"bytesReceived\" TagRoute = \"route\" TagError = \"error\" // DEPRECATED: Use TagReqHeader instead TagHeader = \"header:\" // request header TagReqHeader = \"reqHeader:\" // request header TagRespHeader = \"respHeader:\" // response header TagQuery = \"query:\" // request query TagForm = \"form:\" // request form TagCookie = \"cookie:\" // request cookie TagLocals = \"locals:\" // colors TagBlack = \"black\" TagRed = \"red\" TagGreen = \"green\" TagYellow = \"yellow\" TagBlue = \"blue\" TagMagenta = \"magenta\" TagCyan = \"cyan\" TagWhite = \"white\" TagReset = \"reset\" )","s":"Constants","u":"/next/api/middleware/logger","h":"#constants","p":367},{"i":380,"t":"Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor caution Monitor is still in beta, API might change in the future!","s":"Monitor","u":"/next/api/middleware/monitor","h":"","p":379},{"i":382,"t":"func New() fiber.Handler","s":"Signatures","u":"/next/api/middleware/monitor","h":"#signatures","p":379},{"i":384,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/monitor\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config (Assign the middleware to /metrics) app.Get(\"/metrics\", monitor.New()) // Or extend your config for customization // Assign the middleware to /metrics // and change the Title to `MyService Metrics Page` app.Get(\"/metrics\", monitor.New(monitor.Config{Title: \"MyService Metrics Page\"})) You can also access the API endpoint with curl -X GET -H \"Accept: application/json\" http://localhost:3000/metrics which returns: {\"pid\":{ \"cpu\":0.4568381746582226, \"ram\":20516864, \"conns\":3 }, \"os\": { \"cpu\":8.759124087593099, \"ram\":3997155328, \"conns\":44, \"total_ram\":8245489664, \"load_avg\":0.51 }}","s":"Examples","u":"/next/api/middleware/monitor","h":"#examples","p":379},{"i":386,"t":"// Config defines the config for middleware. type Config struct { // Metrics page title // // Optional. Default: \"Fiber Monitor\" Title string // Refresh period // // Optional. Default: 3 seconds Refresh time.Duration // Whether the service should expose only the monitoring API. // // Optional. Default: false APIOnly bool // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Custom HTML Code to Head Section(Before End) // // Optional. Default: empty CustomHead string // FontURL for specify font resource path or URL . also you can use relative path // // Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap FontURL string // ChartJsURL for specify ChartJS library path or URL . also you can use relative path // // Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js ChartJsURL string index string }","s":"Config","u":"/next/api/middleware/monitor","h":"#config","p":379},{"i":388,"t":"var ConfigDefault = Config{ Title: defaultTitle, Refresh: defaultRefresh, FontURL: defaultFontURL, ChartJsURL: defaultChartJSURL, CustomHead: defaultCustomHead, APIOnly: false, Next: nil, index: newIndex(viewBag{ defaultTitle, defaultRefresh, defaultFontURL, defaultChartJSURL, defaultCustomHead, }), }","s":"Default Config","u":"/next/api/middleware/monitor","h":"#default-config","p":379},{"i":390,"t":"Pprof middleware for Fiber that serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.","s":"Pprof","u":"/next/api/middleware/pprof","h":"","p":389},{"i":392,"t":"func New() fiber.Handler","s":"Signatures","u":"/next/api/middleware/pprof","h":"#signatures","p":389},{"i":394,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/pprof\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(pprof.New()) // Or extend your config for customization // For example, in systems where you have multiple ingress endpoints, it is common to add a URL prefix, like so: app.Use(pprof.New(pprof.Config{Prefix: \"/endpoint-prefix\"})) // This prefix will be added to the default path of \"/debug/pprof/\", for a resulting URL of: \"/endpoint-prefix/debug/pprof/\".","s":"Examples","u":"/next/api/middleware/pprof","h":"#examples","p":389},{"i":396,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Prefix defines a URL prefix added before \"/debug/pprof\". // Note that it should start with (but not end with) a slash. // Example: \"/federated-fiber\" // // Optional. Default: \"\" Prefix string }","s":"Config","u":"/next/api/middleware/pprof","h":"#config","p":389},{"i":398,"t":"var ConfigDefault = Config{ Next: nil, }","s":"Default Config","u":"/next/api/middleware/pprof","h":"#default-config","p":389},{"i":400,"t":"Proxy middleware for Fiber that allows you to proxy requests to multiple servers.","s":"Proxy","u":"/next/api/middleware/proxy","h":"","p":399},{"i":402,"t":"// Balancer create a load balancer among multiple upstrem servers. func Balancer(config Config) fiber.Handler // Forward performs the given http request and fills the given http response. func Forward(addr string, clients ...*fasthttp.Client) fiber.Handler // Do performs the given http request and fills the given http response. func Do(c *fiber.Ctx, addr string, clients ...*fasthttp.Client) error // DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects. func DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error // DoDeadline performs the given request and waits for response until the given deadline. func DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error // DoTimeout performs the given request and waits for response during the given timeout duration. func DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error // DomainForward the given http request based on the given domain and fills the given http response func DomainForward(hostname string, addr string, clients ...*fasthttp.Client) fiber.Handler // BalancerForward performs the given http request based round robin balancer and fills the given http response func BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler","s":"Signatures","u":"/next/api/middleware/proxy","h":"#signatures","p":399},{"i":404,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/proxy\" ) After you initiate your Fiber app, you can use the following possibilities: // if target https site uses a self-signed certificate, you should // call WithTlsConfig before Do and Forward proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true, }) // if you need to use global self-custom client, you should use proxy.WithClient. proxy.WithClient(&fasthttp.Client{ NoDefaultUserAgentHeader: true, DisablePathNormalizing: true, }) // Forward to url app.Get(\"/gif\", proxy.Forward(\"https://i.imgur.com/IWaBepg.gif\")) // If you want to forward with a specific domain. You have to use proxy.DomainForward. app.Get(\"/payments\", proxy.DomainForward(\"docs.gofiber.io\", \"http://localhost:8000\")) // Forward to url with local custom client app.Get(\"/gif\", proxy.Forward(\"https://i.imgur.com/IWaBepg.gif\", &fasthttp.Client{ NoDefaultUserAgentHeader: true, DisablePathNormalizing: true, })) // Make request within handler app.Get(\"/:id\", func(c *fiber.Ctx) error { url := \"https://i.imgur.com/\"+c.Params(\"id\")+\".gif\" if err := proxy.Do(c, url); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests while following redirects app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoRedirects(c, \"http://google.com\", 3); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests and wait up to 5 seconds before timing out app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoTimeout(c, \"http://localhost:3000\", time.Second * 5); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests, timeout a minute from now app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoDeadline(c, \"http://localhost\", time.Now().Add(time.Minute)); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Minimal round robin balancer app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }, })) // Or extend your balancer for customization app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }, ModifyRequest: func(c *fiber.Ctx) error { c.Request().Header.Add(\"X-Real-IP\", c.IP()) return nil }, ModifyResponse: func(c *fiber.Ctx) error { c.Response().Header.Del(fiber.HeaderServer) return nil }, })) // Or this way if the balancer is using https and the destination server is only using http. app.Use(proxy.BalancerForward([]string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }))","s":"Examples","u":"/next/api/middleware/proxy","h":"#examples","p":399},{"i":406,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Servers defines a list of :// HTTP servers, // // which are used in a round-robin manner. // i.e.: \"https://foobar.com, http://www.foobar.com\" // // Required Servers []string // ModifyRequest allows you to alter the request // // Optional. Default: nil ModifyRequest fiber.Handler // ModifyResponse allows you to alter the response // // Optional. Default: nil ModifyResponse fiber.Handler // Timeout is the request timeout used when calling the proxy client // // Optional. Default: 1 second Timeout time.Duration // Per-connection buffer size for requests' reading. // This also limits the maximum header size. // Increase this buffer if your clients send multi-KB RequestURIs // and/or multi-KB headers (for example, BIG cookies). ReadBufferSize int // Per-connection buffer size for responses' writing. WriteBufferSize int // tls config for the http client. TlsConfig *tls.Config // Client is custom client when client config is complex. // Note that Servers, Timeout, WriteBufferSize, ReadBufferSize and TlsConfig // will not be used if the client are set. Client *fasthttp.LBClient }","s":"Config","u":"/next/api/middleware/proxy","h":"#config","p":399},{"i":408,"t":"var ConfigDefault = Config{ Next: nil, ModifyRequest: nil, ModifyResponse: nil, Timeout: fasthttp.DefaultLBClientTimeout, }","s":"Default Config","u":"/next/api/middleware/proxy","h":"#default-config","p":399},{"i":410,"t":"Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.","s":"Recover","u":"/next/api/middleware/recover","h":"","p":409},{"i":412,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/recover","h":"#signatures","p":409},{"i":414,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/recover\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(recover.New()) // This panic will be caught by the middleware app.Get(\"/\", func(c *fiber.Ctx) error { panic(\"I'm an error\") })","s":"Examples","u":"/next/api/middleware/recover","h":"#examples","p":409},{"i":416,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // EnableStackTrace enables handling stack trace // // Optional. Default: false EnableStackTrace bool // StackTraceHandler defines a function to handle stack trace // // Optional. Default: defaultStackTraceHandler StackTraceHandler func(c *fiber.Ctx, e interface{}) }","s":"Config","u":"/next/api/middleware/recover","h":"#config","p":409},{"i":418,"t":"var ConfigDefault = Config{ Next: nil, EnableStackTrace: false, StackTraceHandler: defaultStackTraceHandler, }","s":"Default Config","u":"/next/api/middleware/recover","h":"#default-config","p":409},{"i":420,"t":"Redirection middleware for Fiber.","s":"Redirect","u":"/next/api/middleware/redirect","h":"","p":419},{"i":422,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/redirect","h":"#signatures","p":419},{"i":424,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/redirect\" ) func main() { app := fiber.New() app.Use(redirect.New(redirect.Config{ Rules: map[string]string{ \"/old\": \"/new\", \"/old/*\": \"/new/$1\", }, StatusCode: 301, })) app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Get(\"/new/*\", func(c *fiber.Ctx) error { return c.SendString(\"Wildcard: \" + c.Params(\"*\")) }) app.Listen(\":3000\") } Test: curl http://localhost:3000/old curl http://localhost:3000/old/hello","s":"Examples","u":"/next/api/middleware/redirect","h":"#examples","p":419},{"i":426,"t":"// Config defines the config for middleware. type Config struct { // Filter defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // Rules defines the URL path rewrite rules. The values captured in asterisk can be // retrieved by index e.g. $1, $2 and so on. // Required. Example: // \"/old\": \"/new\", // \"/api/*\": \"/$1\", // \"/js/*\": \"/public/javascripts/$1\", // \"/users/*/orders/*\": \"/user/$1/order/$2\", Rules map[string]string // The status code when redirecting // This is ignored if Redirect is disabled // Optional. Default: 302 (fiber.StatusFound) StatusCode int rulesRegex map[*regexp.Regexp]string }","s":"Config","u":"/next/api/middleware/redirect","h":"#config","p":419},{"i":428,"t":"var ConfigDefault = Config{ StatusCode: fiber.StatusFound, }","s":"Default Config","u":"/next/api/middleware/redirect","h":"#default-config","p":419},{"i":430,"t":"RequestID middleware for Fiber that adds an indentifier to the response.","s":"RequestID","u":"/next/api/middleware/requestid","h":"","p":429},{"i":432,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/requestid","h":"#signatures","p":429},{"i":434,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/requestid\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(requestid.New()) // Or extend your config for customization app.Use(requestid.New(requestid.Config{ Header: \"X-Custom-Header\", Generator: func() string { return \"static-id\" }, }))","s":"Examples","u":"/next/api/middleware/requestid","h":"#examples","p":429},{"i":436,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Header is the header key where to get/set the unique request ID // // Optional. Default: \"X-Request-ID\" Header string // Generator defines a function to generate the unique identifier. // // Optional. Default: utils.UUID Generator func() string // ContextKey defines the key used when storing the request ID in // the locals for a specific request. // // Optional. Default: requestid ContextKey interface{} }","s":"Config","u":"/next/api/middleware/requestid","h":"#config","p":429},{"i":438,"t":"The default config uses a fast UUID generator which will expose the number of requests made to the server. To conceal this value for better privacy, use the utils.UUIDv4 generator. var ConfigDefault = Config{ Next: nil, Header: fiber.HeaderXRequestID, Generator: utils.UUID, ContextKey: \"requestid\", }","s":"Default Config","u":"/next/api/middleware/requestid","h":"#default-config","p":429},{"i":440,"t":"Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.","s":"Rewrite","u":"/next/api/middleware/rewrite","h":"","p":439},{"i":442,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/rewrite","h":"#signatures","p":439},{"i":444,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/rewrite\" ) func main() { app := fiber.New() app.Use(rewrite.New(rewrite.Config{ Rules: map[string]string{ \"/old\": \"/new\", \"/old/*\": \"/new/$1\", }, })) app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Get(\"/new/*\", func(c *fiber.Ctx) error { return c.SendString(\"Wildcard: \" + c.Params(\"*\")) }) app.Listen(\":3000\") } Test: curl http://localhost:3000/old curl http://localhost:3000/old/hello","s":"Examples","u":"/next/api/middleware/rewrite","h":"#examples","p":439},{"i":446,"t":"Session middleware for Fiber. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.","s":"Session","u":"/next/api/middleware/session","h":"","p":445},{"i":448,"t":"func New(config ...Config) *Store func (s *Store) RegisterType(i interface{}) func (s *Store) Get(c *fiber.Ctx) (*Session, error) func (s *Store) Reset() error func (s *Session) Get(key string) interface{} func (s *Session) Set(key string, val interface{}) func (s *Session) Delete(key string) func (s *Session) Destroy() error func (s *Session) Regenerate() error func (s *Session) Save() error func (s *Session) Fresh() bool func (s *Session) ID() string func (s *Session) Keys() []string caution Storing interface{} values are limited to built-ins Go types.","s":"Signatures","u":"/next/api/middleware/session","h":"#signatures","p":445},{"i":450,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/session\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config // This stores all of your app's sessions store := session.New() app.Get(\"/\", func(c *fiber.Ctx) error { // Get session from storage sess, err := store.Get(c) if err != nil { panic(err) } // Get value name := sess.Get(\"name\") // Set key/value sess.Set(\"name\", \"john\") // Get all Keys keys := sess.Keys() // Delete key sess.Delete(\"name\") // Destroy session if err := sess.Destroy(); err != nil { panic(err) } // Sets a specific expiration for this session sess.SetExpiry(time.Second * 2) // Save session if err := sess.Save(); err != nil { panic(err) } return c.SendString(fmt.Sprintf(\"Welcome %v\", name)) })","s":"Examples","u":"/next/api/middleware/session","h":"#examples","p":445},{"i":452,"t":"// Config defines the config for middleware. type Config struct { // Allowed session duration // Optional. Default value 24 * time.Hour Expiration time.Duration // Storage interface to store the session data // Optional. Default value memory.New() Storage fiber.Storage // KeyLookup is a string in the form of \":\" that is used // to extract session id from the request. // Possible values: \"header:\", \"query:\" or \"cookie:\" // Optional. Default value \"cookie:session_id\". KeyLookup string // Domain of the CSRF cookie. // Optional. Default value \"\". CookieDomain string // Path of the CSRF cookie. // Optional. Default value \"\". CookiePath string // Indicates if CSRF cookie is secure. // Optional. Default value false. CookieSecure bool // Indicates if CSRF cookie is HTTP only. // Optional. Default value false. CookieHTTPOnly bool // Value of SameSite cookie. // Optional. Default value \"Lax\". CookieSameSite string // Decides whether cookie should last for only the browser sesison. // Ignores Expiration if set to true // Optional. Default value false. CookieSessionOnly bool // KeyGenerator generates the session key. // Optional. Default value utils.UUIDv4 KeyGenerator func() string // Deprecated: Please use KeyLookup CookieName string // Source defines where to obtain the session id source Source // The session name sessionName string }","s":"Config","u":"/next/api/middleware/session","h":"#config","p":445},{"i":454,"t":"var ConfigDefault = Config{ Expiration: 24 * time.Hour, KeyLookup: \"cookie:session_id\", KeyGenerator: utils.UUIDv4, source: \"cookie\", sessionName: \"session_id\", }","s":"Default Config","u":"/next/api/middleware/session","h":"#default-config","p":445},{"i":456,"t":"const ( SourceCookie Source = \"cookie\" SourceHeader Source = \"header\" SourceURLQuery Source = \"query\" )","s":"Constants","u":"/next/api/middleware/session","h":"#constants","p":445},{"i":458,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 store := session.New(session.Config{ Storage: storage, }) To use the store, see the Examples.","s":"Custom Storage/Database","u":"/next/api/middleware/session","h":"#custom-storagedatabase","p":445},{"i":460,"t":"Skip middleware for Fiber that skips a wrapped handler if a predicate is true.","s":"Skip","u":"/next/api/middleware/skip","h":"","p":459},{"i":462,"t":"func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler","s":"Signatures","u":"/next/api/middleware/skip","h":"#signatures","p":459},{"i":464,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/skip\" ) After you initiate your Fiber app, you can use the following possibilities: func main() { app := fiber.New() app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool { return ctx.Method() == fiber.MethodGet })) app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendString(\"It was a GET request!\") }) log.Fatal(app.Listen(\":3000\")) } func BasicHandler(ctx *fiber.Ctx) error { return ctx.SendString(\"It was not a GET request!\") } tip app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.","s":"Examples","u":"/next/api/middleware/skip","h":"#examples","p":459},{"i":466,"t":"There exist two distinct implementations of timeout middleware Fiber. New Wraps a fiber.Handler with a timeout. If the handler takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler. caution This has been deprecated since it raises race conditions. NewWithContext As a fiber.Handler wrapper, it creates a context with context.WithTimeout and pass it in UserContext. If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler. It does not cancel long running executions. Underlying executions must handle timeout by using context.Context parameter.","s":"Timeout","u":"/next/api/middleware/timeout","h":"","p":465},{"i":468,"t":"func New(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler func NewWithContext(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler","s":"Signatures","u":"/next/api/middleware/timeout","h":"#signatures","p":465},{"i":470,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/timeout\" ) After you initiate your Fiber app, you can use the following possibilities: func main() { app := fiber.New() h := func(c *fiber.Ctx) error { sleepTime, _ := time.ParseDuration(c.Params(\"sleepTime\") + \"ms\") if err := sleepWithContext(c.UserContext(), sleepTime); err != nil { return fmt.Errorf(\"%w: execution error\", err) } return nil } app.Get(\"/foo/:sleepTime\", timeout.New(h, 2*time.Second)) log.Fatal(app.Listen(\":3000\")) } func sleepWithContext(ctx context.Context, d time.Duration) error { timer := time.NewTimer(d) select { case <-ctx.Done(): if !timer.Stop() { <-timer.C } return context.DeadlineExceeded case <-timer.C: } return nil } Test http 200 with curl: curl --location -I --request GET 'http://localhost:3000/foo/1000' Test http 408 with curl: curl --location -I --request GET 'http://localhost:3000/foo/3000' Use with custom error: var ErrFooTimeOut = errors.New(\"foo context canceled\") func main() { app := fiber.New() h := func(c *fiber.Ctx) error { sleepTime, _ := time.ParseDuration(c.Params(\"sleepTime\") + \"ms\") if err := sleepWithContextWithCustomError(c.UserContext(), sleepTime); err != nil { return fmt.Errorf(\"%w: execution error\", err) } return nil } app.Get(\"/foo/:sleepTime\", timeout.NewWithContext(h, 2*time.Second, ErrFooTimeOut)) log.Fatal(app.Listen(\":3000\")) } func sleepWithContextWithCustomError(ctx context.Context, d time.Duration) error { timer := time.NewTimer(d) select { case <-ctx.Done(): if !timer.Stop() { <-timer.C } return ErrFooTimeOut case <-timer.C: } return nil } Sample usage with a DB call: func main() { app := fiber.New() db, _ := gorm.Open(postgres.Open(\"postgres://localhost/foodb\"), &gorm.Config{}) handler := func(ctx *fiber.Ctx) error { tran := db.WithContext(ctx.UserContext()).Begin() if tran = tran.Exec(\"SELECT pg_sleep(50)\"); tran.Error != nil { return tran.Error } if tran = tran.Commit(); tran.Error != nil { return tran.Error } return nil } app.Get(\"/foo\", timeout.NewWithContext(handler, 10*time.Second)) log.Fatal(app.Listen(\":3000\")) }","s":"Examples","u":"/next/api/middleware/timeout","h":"#examples","p":465},{"i":473,"t":"TechEmpower provides a performance comparison of many web application frameworks executing fundamental tasks such as JSON serialization, database access, and server-side template composition. Each framework is operating in a realistic production configuration. Results are captured on cloud instances and on physical hardware. The test implementations are largely community-contributed and all source is available at the GitHub repository. Fiber v1.10.0 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 2.20GHz 32GB RAM Ubuntu 18.04.3 4.15.0-88-generic Dedicated Cisco 10-Gbit Ethernet switch.","s":"TechEmpower","u":"/next/extra/benchmarks","h":"#techempower","p":471},{"i":475,"t":"The Plaintext test is an exercise of the request-routing fundamentals only, designed to demonstrate the capacity of high-performance platforms in particular. Requests will be sent using HTTP pipelining. The response payload is still small, meaning good performance is still necessary in order to saturate the gigabit Ethernet of the test environment. See Plaintext requirements Fiber - 6,162,556 responses per second with an average latency of 2.0 ms. Express - 367,069 responses per second with an average latency of 354.1 ms.","s":"Plaintext","u":"/next/extra/benchmarks","h":"#plaintext","p":471},{"i":477,"t":"Fiber handled 11,846 responses per second with an average latency of 42.8 ms. Express handled 2,066 responses per second with an average latency of 390.44 ms.","s":"Data Updates","u":"/next/extra/benchmarks","h":"#data-updates","p":471},{"i":479,"t":"Fiber handled 19,664 responses per second with an average latency of 25.7 ms. Express handled 4,302 responses per second with an average latency of 117.2 ms.","s":"Multiple Queries","u":"/next/extra/benchmarks","h":"#multiple-queries","p":471},{"i":481,"t":"Fiber handled 368,647 responses per second with an average latency of 0.7 ms. Express handled 57,880 responses per second with an average latency of 4.4 ms.","s":"Single Query","u":"/next/extra/benchmarks","h":"#single-query","p":471},{"i":483,"t":"Fiber handled 1,146,667 responses per second with an average latency of 0.4 ms. Express handled 244,847 responses per second with an average latency of 1.1 ms.","s":"JSON Serialization","u":"/next/extra/benchmarks","h":"#json-serialization","p":471},{"i":485,"t":"🔗 https://github.com/smallnest/go-web-framework-benchmark CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz MEM 4GB GO go1.13.6 linux/amd64 OS Linux The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers. The concurrency clients are 5000. Latency is the time of real processing time by web servers. The smaller is the better. Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better. If we enable http pipelining, test result as below: Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is: If we enable http pipelining, test result as below: Dependency graph for v1.9.0","s":"Go web framework benchmark","u":"/next/extra/benchmarks","h":"#go-web-framework-benchmark","p":471},{"i":488,"t":"There is no definitive answer to this question. The answer depends on the scale of your application and the team that is involved. To be as flexible as possible, Fiber makes no assumptions in terms of structure. Routes and other application-specific logic can live in as many files as you wish, in any directory structure you prefer. View the following examples for inspiration: gofiber/boilerplate thomasvvugt/fiber-boilerplate Youtube - Building a REST API using Gorm and Fiber embedmode/fiberseed","s":"How should I structure my application?","u":"/next/extra/faq","h":"#how-should-i-structure-my-application","p":486},{"i":490,"t":"If you're using v2.32.0 or later, all you need to do is to implement a custom error handler. See below, or see a more detailed explanation at Error Handling. If you're using v2.31.0 or earlier, the error handler will not capture 404 errors. Instead, you need to add a middleware function at the very bottom of the stack (below all other functions) to handle a 404 response: Example app.Use(func(c *fiber.Ctx) error { return c.Status(fiber.StatusNotFound).SendString(\"Sorry can't find that!\") })","s":"How do I handle custom 404 responses?","u":"/next/extra/faq","h":"#how-do-i-handle-custom-404-responses","p":486},{"i":492,"t":"Air is a handy tool that automatically restarts your Go applications whenever the source code changes, making your development process faster and more efficient. To use Air in a Fiber project, follow these steps: Install Air by downloading the appropriate binary for your operating system from the GitHub release page or by building the tool directly from source. Create a configuration file for Air in your project directory. This file can be named, for example, .air.toml or air.conf. Here's a sample configuration file that works with Fiber: # .air.toml root = \".\" tmp_dir = \"tmp\" [build] cmd = \"go build -o ./tmp/main .\" bin = \"./tmp/main\" delay = 1000 # ms exclude_dir = [\"assets\", \"tmp\", \"vendor\"] include_ext = [\"go\", \"tpl\", \"tmpl\", \"html\"] exclude_regex = [\"_test\\\\.go\"] Start your Fiber application using Air by running the following command in the terminal: air As you make changes to your source code, Air will detect them and automatically restart the application. A complete example demonstrating the use of Air with Fiber can be found in the Fiber Recipes repository. This example shows how to configure and use Air in a Fiber project to create an efficient development environment.","s":"How can i use live reload ?","u":"/next/extra/faq","h":"#how-can-i-use-live-reload-","p":486},{"i":494,"t":"To override the default error handler, you can override the default when providing a Config when initiating a new Fiber instance. Example app := fiber.New(fiber.Config{ ErrorHandler: func(c *fiber.Ctx, err error) error { return c.Status(fiber.StatusInternalServerError).SendString(err.Error()) }, }) We have a dedicated page explaining how error handling works in Fiber, see Error Handling.","s":"How do I set up an error handler?","u":"/next/extra/faq","h":"#how-do-i-set-up-an-error-handler","p":486},{"i":496,"t":"Fiber currently supports 9 template engines in our gofiber/template middleware: ace amber django handlebars html jet mustache pug slim To learn more about using Templates in Fiber, see Templates.","s":"Which template engines does Fiber support?","u":"/next/extra/faq","h":"#which-template-engines-does-fiber-support","p":486},{"i":498,"t":"Yes, we have our own Discord server, where we hang out. We have different rooms for every subject. If you have questions or just want to have a chat, feel free to join us via this > invite link <.","s":"Does Fiber have a community chat?","u":"/next/extra/faq","h":"#does-fiber-have-a-community-chat","p":486},{"i":500,"t":"Yes we do, here are some examples: This example works v2 package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/logger\" ) type Host struct { Fiber *fiber.App } func main() { // Hosts hosts := map[string]*Host{} //----- // API //----- api := fiber.New() api.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"api.localhost:3000\"] = &Host{api} api.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"API\") }) //------ // Blog //------ blog := fiber.New() blog.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"blog.localhost:3000\"] = &Host{blog} blog.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Blog\") }) //--------- // Website //--------- site := fiber.New() site.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"localhost:3000\"] = &Host{site} site.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Website\") }) // Server app := fiber.New() app.Use(func(c *fiber.Ctx) error { host := hosts[c.Hostname()] if host == nil { return c.SendStatus(fiber.StatusNotFound) } else { host.Fiber.Handler()(c.Context()) return nil } }) log.Fatal(app.Listen(\":3000\")) } If more information is needed, please refer to this issue #750","s":"Does fiber support sub domain routing ?","u":"/next/extra/faq","h":"#does-fiber-support-sub-domain-routing-","p":486},{"i":503,"t":"It’s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them. Example app.Get(\"/\", func(c *fiber.Ctx) error { // Pass error to Fiber return c.SendFile(\"file-does-not-exist\") }) Fiber does not handle panics by default. To recover from a panic thrown by any handler in the stack, you need to include the Recover middleware below: Example package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/recover\" ) func main() { app := fiber.New() app.Use(recover.New()) app.Get(\"/\", func(c *fiber.Ctx) error { panic(\"This panic is caught by fiber\") }) log.Fatal(app.Listen(\":3000\")) } You could use Fiber's custom error struct to pass an additional status code using fiber.NewError(). It's optional to pass a message; if this is left empty, it will default to the status code message (404 equals Not Found). Example app.Get(\"/\", func(c *fiber.Ctx) error { // 503 Service Unavailable return fiber.ErrServiceUnavailable // 503 On vacation! return fiber.NewError(fiber.StatusServiceUnavailable, \"On vacation!\") })","s":"Catching Errors","u":"/next/guide/error-handling","h":"#catching-errors","p":501},{"i":505,"t":"Fiber provides an error handler by default. For a standard error, the response is sent as 500 Internal Server Error. If the error is of type fiber.Error, the response is sent with the provided status code and message. Example // Default error handler var DefaultErrorHandler = func(c *fiber.Ctx, err error) error { // Status code defaults to 500 code := fiber.StatusInternalServerError // Retrieve the custom status code if it's a *fiber.Error var e *fiber.Error if errors.As(err, &e) { code = e.Code } // Set Content-Type: text/plain; charset=utf-8 c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8) // Return status code with error message return c.Status(code).SendString(err.Error()) }","s":"Default Error Handler","u":"/next/guide/error-handling","h":"#default-error-handler","p":501},{"i":507,"t":"A custom error handler can be set using a Config when initializing a Fiber instance. In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response. The following example shows how to display error pages for different types of errors. Example // Create a new fiber instance with custom config app := fiber.New(fiber.Config{ // Override default error handler ErrorHandler: func(ctx *fiber.Ctx, err error) error { // Status code defaults to 500 code := fiber.StatusInternalServerError // Retrieve the custom status code if it's a *fiber.Error var e *fiber.Error if errors.As(err, &e) { code = e.Code } // Send custom error page err = ctx.Status(code).SendFile(fmt.Sprintf(\"./%d.html\", code)) if err != nil { // In case the SendFile fails return ctx.Status(fiber.StatusInternalServerError).SendString(\"Internal Server Error\") } // Return from handler return nil }, }) // ... Special thanks to the Echo & Express framework for inspiration regarding error handling.","s":"Custom Error Handler","u":"/next/guide/error-handling","h":"#custom-error-handler","p":501},{"i":510,"t":"Since Fiber v2.32.0, we use encoding/json as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of encoding/json, we recommend you to use these libraries: goccy/go-json bytedance/sonic segmentio/encoding mailru/easyjson minio/simdjson-go wI2L/jettison Example package main import \"github.com/gofiber/fiber/v2\" import \"github.com/goccy/go-json\" func main() { app := fiber.New(fiber.Config{ JSONEncoder: json.Marshal, JSONDecoder: json.Unmarshal, }) # ... }","s":"Custom JSON Encoder/Decoder","u":"/next/guide/faster-fiber","h":"#custom-json-encoderdecoder","p":508},{"i":512,"t":"Set custom JSON encoder for client Set custom JSON decoder for client Set custom JSON encoder for application Set custom JSON decoder for application","s":"References","u":"/next/guide/faster-fiber","h":"#references","p":508},{"i":514,"t":"info In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.","s":"🎭 Grouping","u":"/next/guide/grouping","h":"","p":513},{"i":516,"t":"Like Routing, groups can also have paths that belong to a cluster. func main() { app := fiber.New() api := app.Group(\"/api\", middleware) // /api v1 := api.Group(\"/v1\", middleware) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", middleware) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } A Group of paths can have an optional handler. func main() { app := fiber.New() api := app.Group(\"/api\") // /api v1 := api.Group(\"/v1\") // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\") // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } caution Running /api, /v1 or /v2 will result in 404 error, make sure you have the errors set.","s":"Paths","u":"/next/guide/grouping","h":"#paths","p":513},{"i":518,"t":"Group handlers can also be used as a routing path but they must have Next added to them so that the flow can continue. func main() { app := fiber.New() handler := func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusOK) } api := app.Group(\"/api\") // /api v1 := api.Group(\"/v1\", func(c *fiber.Ctx) error { // middleware for /api/v1 c.Set(\"Version\", \"v1\") return c.Next() }) v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user log.Fatal(app.Listen(\":3000\")) }","s":"Group Handlers","u":"/next/guide/grouping","h":"#group-handlers","p":513},{"i":520,"t":"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks: OnRoute OnName OnGroup OnGroupName OnListen OnFork OnShutdown OnMount","s":"🪝 Hooks","u":"/next/guide/hooks","h":"","p":519},{"i":522,"t":"// Handlers define a function to create hooks for Fiber. type OnRouteHandler = func(Route) error type OnNameHandler = OnRouteHandler type OnGroupHandler = func(Group) error type OnGroupNameHandler = OnGroupHandler type OnListenHandler = func(ListenData) error type OnForkHandler = func(int) error type OnShutdownHandler = func() error type OnMountHandler = func(*App) error","s":"Constants","u":"/next/guide/hooks","h":"#constants","p":519},{"i":524,"t":"OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by route parameter. Signature func (app *App) OnRoute(handler ...OnRouteHandler)","s":"OnRoute","u":"/next/guide/hooks","h":"#onroute","p":519},{"i":526,"t":"OnName is a hook to execute user functions on each route naming. Also you can get route properties by route parameter. caution OnName only works with naming routes, not groups. Signature func (app *App) OnName(handler ...OnNameHandler) OnName Example package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" ) func main() { app := fiber.New() app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"index\") app.Hooks().OnName(func(r fiber.Route) error { fmt.Print(\"Name: \" + r.Name + \", \") return nil }) app.Hooks().OnName(func(r fiber.Route) error { fmt.Print(\"Method: \" + r.Method + \"\\n\") return nil }) app.Get(\"/add/user\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"addUser\") app.Delete(\"/destroy/user\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"destroyUser\") app.Listen(\":5000\") } // Results: // Name: addUser, Method: GET // Name: destroyUser, Method: DELETE","s":"OnName","u":"/next/guide/hooks","h":"#onname","p":519},{"i":528,"t":"OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by group parameter. Signature func (app *App) OnGroup(handler ...OnGroupHandler)","s":"OnGroup","u":"/next/guide/hooks","h":"#ongroup","p":519},{"i":530,"t":"OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by group parameter. caution OnGroupName only works with naming groups, not routes. Signature func (app *App) OnGroupName(handler ...OnGroupNameHandler)","s":"OnGroupName","u":"/next/guide/hooks","h":"#ongroupname","p":519},{"i":532,"t":"OnListen is a hook to execute user functions on Listen, ListenTLS, Listener. Signature func (app *App) OnListen(handler ...OnListenHandler) OnListen Example app := fiber.New(fiber.Config{ DisableStartupMessage: true, }) app.Hooks().OnListen(func(listenData fiber.ListenData) error { if fiber.IsChild() { return nil } scheme := \"http\" if data.TLS { scheme = \"https\" } log.Println(scheme + \"://\" + listenData.Host + \":\" + listenData.Port) return nil }) app.Listen(\":5000\")","s":"OnListen","u":"/next/guide/hooks","h":"#onlisten","p":519},{"i":534,"t":"OnFork is a hook to execute user functions on Fork. Signature func (app *App) OnFork(handler ...OnForkHandler)","s":"OnFork","u":"/next/guide/hooks","h":"#onfork","p":519},{"i":536,"t":"OnShutdown is a hook to execute user functions after Shutdown. Signature func (app *App) OnShutdown(handler ...OnShutdownHandler)","s":"OnShutdown","u":"/next/guide/hooks","h":"#onshutdown","p":519},{"i":538,"t":"OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting. Signature func (h *Hooks) OnMount(handler ...OnMountHandler) OnMount Example package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" ) func main() { app := New() app.Get(\"/\", testSimpleHandler).Name(\"x\") subApp := New() subApp.Get(\"/test\", testSimpleHandler) subApp.Hooks().OnMount(func(parent *fiber.App) error { fmt.Print(\"Mount path of parent app: \"+parent.MountPath()) // ... return nil }) app.Mount(\"/sub\", subApp) } // Result: // Mount path of parent app: caution OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.","s":"OnMount","u":"/next/guide/hooks","h":"#onmount","p":519},{"i":541,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Handlers","u":"/next/guide/routing","h":"#handlers","p":539},{"i":543,"t":"Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be strings or string patterns. Examples of route paths based on strings // This route path will match requests to the root route, \"/\": app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"root\") }) // This route path will match requests to \"/about\": app.Get(\"/about\", func(c *fiber.Ctx) error { return c.SendString(\"about\") }) // This route path will match requests to \"/random.txt\": app.Get(\"/random.txt\", func(c *fiber.Ctx) error { return c.SendString(\"random.txt\") }) As with the expressJs framework, the order of the route declaration plays a role. When a request is received, the routes are checked in the order in which they are declared. info So please be careful to write routes with variable parameters after the routes that contain fixed parts, so that these variable parts do not match instead and unexpected behavior occurs.","s":"Paths","u":"/next/guide/routing","h":"#paths","p":539},{"i":545,"t":"Route parameters are dynamic elements in the route, which are named or not named segments. This segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the Params function, with the name of the route parameter specified in the path as their respective keys or for unnamed parameters the character(*, +) and the counter of this. The characters :, +, and * are characters that introduce a parameter. Greedy parameters are indicated by wildcard(*) or plus(+) signs. The routing also offers the possibility to use optional parameters, for the named parameters these are marked with a final \"?\", unlike the plus sign which is not optional, you can use the wildcard character for a parameter range which is optional and greedy. Example of define routes with route parameters // Parameters app.Get(\"/user/:name/books/:title\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s\\n\", c.Params(\"name\")) fmt.Fprintf(c, \"%s\\n\", c.Params(\"title\")) return nil }) // Plus - greedy - not optional app.Get(\"/user/+\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"+\")) }) // Optional parameter app.Get(\"/user/:name?\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"name\")) }) // Wildcard - greedy - optional app.Get(\"/user/*\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"*\")) }) // This route path will match requests to \"/v1/some/resource/name:customVerb\", since the parameter character is escaped app.Get(\"/v1/some/resource/name\\\\:customVerb\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, Community\") }) info Since the hyphen (-) and the dot (.) are interpreted literally, they can be used along with route parameters for useful purposes. info All special parameter characters can also be escaped with \"\\\\\" and lose their value, so you can use them in the route if you want, like in the custom methods of the google api design guide. // http://localhost:3000/plantae/prunus.persica app.Get(\"/plantae/:genus.:species\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s.%s\\n\", c.Params(\"genus\"), c.Params(\"species\")) return nil // prunus.persica }) // http://localhost:3000/flights/LAX-SFO app.Get(\"/flights/:from-:to\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s-%s\\n\", c.Params(\"from\"), c.Params(\"to\")) return nil // LAX-SFO }) Our intelligent router recognizes that the introductory parameter characters should be part of the request route in this case and can process them as such. // http://localhost:3000/shop/product/color:blue/size:xs app.Get(\"/shop/product/color::color/size::size\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s:%s\\n\", c.Params(\"color\"), c.Params(\"size\")) return nil // blue:xs }) In addition, several parameters in a row and several unnamed parameter characters in the route, such as the wildcard or plus character, are possible, which greatly expands the possibilities of the router for the user. // GET /@v1 // Params: \"sign\" -> \"@\", \"param\" -> \"v1\" app.Get(\"/:sign:param\", handler) // GET /api-v1 // Params: \"name\" -> \"v1\" app.Get(\"/api-:name\", handler) // GET /customer/v1/cart/proxy // Params: \"*1\" -> \"customer/\", \"*2\" -> \"/cart\" app.Get(\"/*v1*/proxy\", handler) // GET /v1/brand/4/shop/blue/xs // Params: \"*1\" -> \"brand/4\", \"*2\" -> \"blue/xs\" app.Get(\"/v1/*/shop/*\", handler) We have adapted the routing strongly to the express routing, but currently without the possibility of the regular expressions, because they are quite slow. The possibilities can be tested with version 0.1.7 (express 4) in the online Express route tester.","s":"Parameters","u":"/next/guide/routing","h":"#parameters","p":539},{"i":547,"t":"Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values by parameters. The feature was intorduced in v2.37.0 and inspired by .NET Core. caution Constraints aren't validation for parameters. If constraint aren't valid for parameter value, Fiber returns 404 handler. Constraint Example Example matches int :id 123456789, -123456789 bool :active true,false guid :id CD2C1638-1638-72D5-1638-DEADBEEF1638 float :weight 1.234, -1,001.01e8 minLen(value) :username Test (must be at least 4 characters) maxLen(value) :filename MyFile (must be no more than 8 characters len(length) :filename somefile.txt (exactly 12 characters) min(value) :age 19 (Integer value must be at least 18) max(value) :age 91 (Integer value must be no more than 120) range(min,max) :age 91 (Integer value must be at least 18 but no more than 120) alpha :name Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive) datetime :dob 2005-11-01 regex(expression) :date 2022-08-27 (Must match regular expression) Examples Single Constraint Multiple Constraints Regex Constraint app.Get(\"/:test\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/12 // 12 // curl -X GET http://localhost:3000/1 // Cannot GET /1 You can use ; for multiple constraints. app.Get(\"/:test\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/120000 // Cannot GET /120000 // curl -X GET http://localhost:3000/1 // Cannot GET /1 // curl -X GET http://localhost:3000/250 // 250 Fiber precompiles regex query when to register routes. So there're no performance overhead for regex constraint. app.Get(\"/:date\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"date\")) }) // curl -X GET http://localhost:3000/125 // Cannot GET /125 // curl -X GET http://localhost:3000/test // Cannot GET /test // curl -X GET http://localhost:3000/2022-08-27 // 2022-08-27 caution You should use \\\\ before routing-specific characters when to use datetime constraint (*, +, ?, :, /, <, >, ;, (, )), to avoid wrong parsing. Optional Parameter Example You can impose constraints on optional parameters as well. app.Get(\"/:test?\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/42 // 42 // curl -X GET http://localhost:3000/ // // curl -X GET http://localhost:3000/7.0 // Cannot GET /7.0","s":"Constraints","u":"/next/guide/routing","h":"#constraints","p":539},{"i":549,"t":"Functions that are designed to make changes to the request or response are called middleware functions. The Next is a Fiber router function, when called, executes the next function that matches the current route. Example of a middleware function app.Use(func(c *fiber.Ctx) error { // Set a custom header on all responses: c.Set(\"X-Custom-Header\", \"Hello, World\") // Go to next middleware: return c.Next() }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) Use method path is a mount, or prefix path, and limits middleware to only apply to any paths requested that begin with it.","s":"Middleware","u":"/next/guide/routing","h":"#middleware","p":539},{"i":551,"t":"If you have many endpoints, you can organize your routes using Group. func main() { app := fiber.New() api := app.Group(\"/api\", middleware) // /api v1 := api.Group(\"/v1\", middleware) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", middleware) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } More information about this in our Grouping Guide","s":"Grouping","u":"/next/guide/routing","h":"#grouping","p":539},{"i":554,"t":"Fiber provides a Views interface to provide your own template engine: Views type Views interface { Load() error Render(io.Writer, string, interface{}, ...string) error } Views interface contains a Load and Render method, Load is executed by Fiber on app initialization to load/parse the templates. // Pass engine to Fiber's Views Engine app := fiber.New(fiber.Config{ Views: engine, // Views Layout is the global layout for all template render until override on Render function. ViewsLayout: \"layouts/main\" }) The Render method is linked to the ctx.Render() function that accepts a template name and binding data. It will use global layout if layout is not being defined in Render function. If the Fiber config option PassLocalsToViews is enabled, then all locals set using ctx.Locals(key, value) will be passed to the template. app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"hello\": \"world\", }); })","s":"Template interfaces","u":"/next/guide/templates","h":"#template-interfaces","p":552},{"i":556,"t":"Fiber team maintains templates package that provides wrappers for multiple template engines: ace amber django handlebars html jet mustache pug slim Example views/index.html package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html/v2\" ) func main() { // Initialize standard Go html template engine engine := html.New(\"./views\", \".html\") // If you want other engine, just replace with following // Create a new engine with django // engine := django.New(\"./views\", \".django\") app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index template return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) }

{{.Title}}

","s":"Engines","u":"/next/guide/templates","h":"#engines","p":552},{"i":559,"t":"Fiber can make great use of the validator package to ensure correct validation of data to store. Official validator Github page (Installation, use, examples..). You can find the detailed descriptions of the validations used in the fields contained on the structs below: Detailed docs Validation Example package main import ( \"fmt\" \"log\" \"strings\" \"github.com/go-playground/validator/v10\" \"github.com/gofiber/fiber/v2\" ) type ( User struct { Name string `validate:\"required,min=5,max=20\"` // Required field, min 5 char long max 20 Age int `validate:\"required,teener\"` // Required field, and client needs to implement our 'teener' tag format which we'll see later } ErrorResponse struct { Error bool FailedField string Tag string Value interface{} } XValidator struct { validator *validator.Validate } GlobalErrorHandlerResp struct { Success bool `json:\"success\"` Message string `json:\"message\"` } ) // This is the validator instance // for more information see: https://github.com/go-playground/validator var validate = validator.New() func (v XValidator) Validate(data interface{}) []ErrorResponse { validationErrors := []ErrorResponse{} errs := validate.Struct(data) if errs != nil { for _, err := range errs.(validator.ValidationErrors) { // In this case data object is actually holding the User struct var elem ErrorResponse elem.FailedField = err.Field() // Export struct field name elem.Tag = err.Tag() // Export struct tag elem.Value = err.Value() // Export field value elem.Error = true validationErrors = append(validationErrors, elem) } } return validationErrors } func main() { myValidator := &XValidator{ validator: validate, } app := fiber.New(fiber.Config{ // Global custom error handler ErrorHandler: func(c *fiber.Ctx, err error) error { return c.Status(fiber.StatusBadRequest).JSON(GlobalErrorHandlerResp{ Success: false, Message: err.Error(), }) }, }) // Custom struct validation tag format myValidator.validator.RegisterValidation(\"teener\", func(fl validator.FieldLevel) bool { // User.Age needs to fit our needs, 12-18 years old. return fl.Field().Int() >= 12 && fl.Field().Int() <= 18 }) app.Get(\"/\", func(c *fiber.Ctx) error { user := &User{ Name: c.Query(\"name\"), Age: c.QueryInt(\"age\"), } // Validation if errs := myValidator.Validate(user); len(errs) > 0 && errs[0].Error { errMsgs := make([]string, 0) for _, err := range errs { errMsgs = append(errMsgs, fmt.Sprintf( \"[%s]: '%v' | Needs to implement '%s'\", err.FailedField, err.Value, err.Tag, )) } return &fiber.Error{ Code: fiber.ErrBadRequest.Code, Message: strings.Join(errMsgs, \" and \"), } } // Logic, validated with success return c.SendString(\"Hello, World!\") }) log.Fatal(app.Listen(\":3000\")) } /** OUTPUT [1] Request: GET http://127.0.0.1:3000/ Response: {\"success\":false,\"message\":\"[Name]: '' | Needs to implement 'required' and [Age]: '0' | Needs to implement 'required'\"} [2] Request: GET http://127.0.0.1:3000/?name=efdal&age=9 Response: {\"success\":false,\"message\":\"[Age]: '9' | Needs to implement 'teener'\"} [3] Request: GET http://127.0.0.1:3000/?name=efdal&age= Response: {\"success\":false,\"message\":\"[Age]: '0' | Needs to implement 'required'\"} [4] Request: GET http://127.0.0.1:3000/?name=efdal&age=18 Response: Hello, World! **/","s":"Validator package","u":"/next/guide/validation","h":"#validator-package","p":557},{"i":561,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Route Handlers","u":"/next/partials/routing/route-handlers","h":"","p":560},{"i":564,"t":"Checks, if the specified extensions or content types are acceptable. info Based on the request’s Accept HTTP header. Signature func (c *Ctx) Accepts(offers ...string) string func (c *Ctx) AcceptsCharsets(offers ...string) string func (c *Ctx) AcceptsEncodings(offers ...string) string func (c *Ctx) AcceptsLanguages(offers ...string) string Example // Accept: text/html, application/json; q=0.8, text/plain; q=0.5; charset=\"utf-8\" app.Get(\"/\", func(c *fiber.Ctx) error { c.Accepts(\"html\") // \"html\" c.Accepts(\"text/html\") // \"text/html\" c.Accepts(\"json\", \"text\") // \"json\" c.Accepts(\"application/json\") // \"application/json\" c.Accepts(\"text/plain\", \"application/json\") // \"application/json\", due to quality c.Accepts(\"image/png\") // \"\" c.Accepts(\"png\") // \"\" // ... }) Example 2 // Accept: text/html, text/*, application/json, */*; q=0 app.Get(\"/\", func(c *fiber.Ctx) error { c.Accepts(\"text/plain\", \"application/json\") // \"application/json\", due to specificity c.Accepts(\"application/json\", \"text/html\") // \"text/html\", due to first match c.Accepts(\"image/png\") // \"\", due to */* without q factor 0 is Not Acceptable // ... }) Fiber provides similar functions for the other accept headers. // Accept-Charset: utf-8, iso-8859-1;q=0.2 // Accept-Encoding: gzip, compress;q=0.2 // Accept-Language: en;q=0.8, nl, ru app.Get(\"/\", func(c *fiber.Ctx) error { c.AcceptsCharsets(\"utf-16\", \"iso-8859-1\") // \"iso-8859-1\" c.AcceptsEncodings(\"compress\", \"br\") // \"compress\" c.AcceptsLanguages(\"pt\", \"nl\", \"ru\") // \"nl\" // ... })","s":"Accepts","u":"/next/api/ctx","h":"#accepts","p":562},{"i":566,"t":"Params is used to get all route parameters. Using Params method to get params. Signature func (c *Ctx) AllParams() map[string]string Example // GET http://example.com/user/fenny app.Get(\"/user/:name\", func(c *fiber.Ctx) error { c.AllParams() // \"{\"name\": \"fenny\"}\" // ... }) // GET http://example.com/user/fenny/123 app.Get(\"/user/*\", func(c *fiber.Ctx) error { c.AllParams() // \"{\"*1\": \"fenny/123\"}\" // ... })","s":"AllParams","u":"/next/api/ctx","h":"#allparams","p":562},{"i":568,"t":"Returns the *App reference so you could easily access all application settings. Signature func (c *Ctx) App() *App Example app.Get(\"/stack\", func(c *fiber.Ctx) error { return c.JSON(c.App().Stack()) })","s":"App","u":"/next/api/ctx","h":"#app","p":562},{"i":570,"t":"Appends the specified value to the HTTP response header field. caution If the header is not already set, it creates the header with the specified value. Signature func (c *Ctx) Append(field string, values ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Append(\"Link\", \"http://google.com\", \"http://localhost\") // => Link: http://localhost, http://google.com c.Append(\"Link\", \"Test\") // => Link: http://localhost, http://google.com, Test // ... })","s":"Append","u":"/next/api/ctx","h":"#append","p":562},{"i":572,"t":"Sets the HTTP response Content-Disposition header field to attachment. Signature func (c *Ctx) Attachment(filename ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Attachment() // => Content-Disposition: attachment c.Attachment(\"./upload/images/logo.png\") // => Content-Disposition: attachment; filename=\"logo.png\" // => Content-Type: image/png // ... })","s":"Attachment","u":"/next/api/ctx","h":"#attachment","p":562},{"i":574,"t":"Returns the base URL (protocol + host) as a string. Signature func (c *Ctx) BaseURL() string Example // GET https://example.com/page#chapter-1 app.Get(\"/\", func(c *fiber.Ctx) error { c.BaseURL() // https://example.com // ... })","s":"BaseURL","u":"/next/api/ctx","h":"#baseurl","p":562},{"i":576,"t":"Add vars to default view var map binding to template engine. Variables are read by the Render method and may be overwritten. Signature func (c *Ctx) Bind(vars Map) error Example app.Use(func(c *fiber.Ctx) error { c.Bind(fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"xxx.tmpl\", fiber.Map{}) // Render will use Title variable })","s":"Bind","u":"/next/api/ctx","h":"#bind","p":562},{"i":578,"t":"Returns the raw request body. Signature func (c *Ctx) Body() []byte Example // curl -X POST http://localhost:8080 -d user=john app.Post(\"/\", func(c *fiber.Ctx) error { // Get raw body from POST request: return c.Send(c.Body()) // []byte(\"user=john\") }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Body","u":"/next/api/ctx","h":"#body","p":562},{"i":580,"t":"Binds the request body to a struct. It is important to specify the correct struct tag based on the content type to be parsed. For example, if you want to parse a JSON body with a field called Pass, you would use a struct field of json:\"pass\". content-type struct tag application/x-www-form-urlencoded form multipart/form-data form application/json json application/xml xml text/xml xml Signature func (c *Ctx) BodyParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `json:\"name\" xml:\"name\" form:\"name\"` Pass string `json:\"pass\" xml:\"pass\" form:\"pass\"` } app.Post(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.BodyParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe // ... }) // Run tests with the following curl commands // curl -X POST -H \"Content-Type: application/json\" --data \"{\\\"name\\\":\\\"john\\\",\\\"pass\\\":\\\"doe\\\"}\" localhost:3000 // curl -X POST -H \"Content-Type: application/xml\" --data \"johndoe\" localhost:3000 // curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" --data \"name=john&pass=doe\" localhost:3000 // curl -X POST -F name=john -F pass=doe http://localhost:3000 // curl -X POST \"http://localhost:3000/?name=john&pass=doe\" Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"BodyParser","u":"/next/api/ctx","h":"#bodyparser","p":562},{"i":582,"t":"Expire a client cookie (or all cookies if left empty) Signature func (c *Ctx) ClearCookie(key ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { // Clears all cookies: c.ClearCookie() // Expire specific cookie by name: c.ClearCookie(\"user\") // Expire multiple cookies by names: c.ClearCookie(\"token\", \"session\", \"track_id\", \"version\") // ... }) caution Web browsers and other compliant clients will only clear the cookie if the given options are identical to those when creating the cookie, excluding expires and maxAge. ClearCookie will not set these values for you - a technique similar to the one shown below should be used to ensure your cookie is deleted. Example app.Get(\"/set\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"token\", Value: \"randomvalue\", Expires: time.Now().Add(24 * time.Hour), HTTPOnly: true, SameSite: \"lax\", }) // ... }) app.Get(\"/delete\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"token\", // Set expiry date to the past Expires: time.Now().Add(-(time.Hour * 2)), HTTPOnly: true, SameSite: \"lax\", }) // ... })","s":"ClearCookie","u":"/next/api/ctx","h":"#clearcookie","p":562},{"i":584,"t":"ClientHelloInfo contains information from a ClientHello message in order to guide application logic in the GetCertificate and GetConfigForClient callbacks. You can refer to the ClientHelloInfo struct documentation for more information on the returned struct. Signature func (c *Ctx) ClientHelloInfo() *tls.ClientHelloInfo Example // GET http://example.com/hello app.Get(\"/hello\", func(c *fiber.Ctx) error { chi := c.ClientHelloInfo() // ... })","s":"ClientHelloInfo","u":"/next/api/ctx","h":"#clienthelloinfo","p":562},{"i":586,"t":"Returns *fasthttp.RequestCtx that is compatible with the context.Context interface that requires a deadline, a cancellation signal, and other values across API boundaries. Signature func (c *Ctx) Context() *fasthttp.RequestCtx info Please read the Fasthttp Documentation for more information.","s":"Context","u":"/next/api/ctx","h":"#context","p":562},{"i":588,"t":"Set cookie Signature func (c *Ctx) Cookie(cookie *Cookie) type Cookie struct { Name string `json:\"name\"` Value string `json:\"value\"` Path string `json:\"path\"` Domain string `json:\"domain\"` MaxAge int `json:\"max_age\"` Expires time.Time `json:\"expires\"` Secure bool `json:\"secure\"` HTTPOnly bool `json:\"http_only\"` SameSite string `json:\"same_site\"` SessionOnly bool `json:\"session_only\"` } Example app.Get(\"/\", func(c *fiber.Ctx) error { // Create cookie cookie := new(fiber.Cookie) cookie.Name = \"john\" cookie.Value = \"doe\" cookie.Expires = time.Now().Add(24 * time.Hour) // Set cookie c.Cookie(cookie) // ... })","s":"Cookie","u":"/next/api/ctx","h":"#cookie","p":562},{"i":590,"t":"Get cookie value by key, you could pass an optional default value that will be returned if the cookie key does not exist. Signature func (c *Ctx) Cookies(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { // Get cookie by key: c.Cookies(\"name\") // \"john\" c.Cookies(\"empty\", \"doe\") // \"doe\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Cookies","u":"/next/api/ctx","h":"#cookies","p":562},{"i":592,"t":"Transfers the file from path as an attachment. Typically, browsers will prompt the user to download. By default, the Content-Disposition header filename= parameter is the file path (this typically appears in the browser dialog). Override this default with the filename parameter. Signature func (c *Ctx) Download(file string, filename ...string) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.Download(\"./files/report-12345.pdf\"); // => Download report-12345.pdf return c.Download(\"./files/report-12345.pdf\", \"report.pdf\"); // => Download report.pdf })","s":"Download","u":"/next/api/ctx","h":"#download","p":562},{"i":594,"t":"Performs content-negotiation on the Accept HTTP header. It uses Accepts to select a proper format. info If the header is not specified or there is no proper format, text/plain is used. Signature func (c *Ctx) Format(body interface{}) error Example app.Get(\"/\", func(c *fiber.Ctx) error { // Accept: text/plain c.Format(\"Hello, World!\") // => Hello, World! // Accept: text/html c.Format(\"Hello, World!\") // =>

Hello, World!

// Accept: application/json c.Format(\"Hello, World!\") // => \"Hello, World!\" // .. })","s":"Format","u":"/next/api/ctx","h":"#format","p":562},{"i":596,"t":"MultipartForm files can be retrieved by name, the first file from the given key is returned. Signature func (c *Ctx) FormFile(key string) (*multipart.FileHeader, error) Example app.Post(\"/\", func(c *fiber.Ctx) error { // Get first file from form field \"document\": file, err := c.FormFile(\"document\") // Save file to root directory: return c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)) })","s":"FormFile","u":"/next/api/ctx","h":"#formfile","p":562},{"i":598,"t":"Any form values can be retrieved by name, the first value from the given key is returned. Signature func (c *Ctx) FormValue(key string, defaultValue ...string) string Example app.Post(\"/\", func(c *fiber.Ctx) error { // Get first value from form field \"name\": c.FormValue(\"name\") // => \"john\" or \"\" if not exist // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"FormValue","u":"/next/api/ctx","h":"#formvalue","p":562},{"i":600,"t":"https://expressjs.com/en/4x/api.html#req.fresh Signature func (c *Ctx) Fresh() bool","s":"Fresh","u":"/next/api/ctx","h":"#fresh","p":562},{"i":602,"t":"Returns the HTTP request header specified by the field. tip The match is case-insensitive. Signature func (c *Ctx) Get(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Get(\"Content-Type\") // \"text/plain\" c.Get(\"CoNtEnT-TypE\") // \"text/plain\" c.Get(\"something\", \"john\") // \"john\" // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Get","u":"/next/api/ctx","h":"#get","p":562},{"i":604,"t":"Returns the HTTP request headers. Signature func (c *Ctx) GetReqHeaders() map[string]string","s":"GetReqHeaders","u":"/next/api/ctx","h":"#getreqheaders","p":562},{"i":606,"t":"Returns the HTTP response header specified by the field. tip The match is case-insensitive. Signature func (c *Ctx) GetRespHeader(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.GetRespHeader(\"X-Request-Id\") // \"8d7ad5e3-aaf3-450b-a241-2beb887efd54\" c.GetRespHeader(\"Content-Type\") // \"text/plain\" c.GetRespHeader(\"something\", \"john\") // \"john\" // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"GetRespHeader","u":"/next/api/ctx","h":"#getrespheader","p":562},{"i":608,"t":"Returns the HTTP response headers. Signature func (c *Ctx) GetRespHeaders() map[string]string","s":"GetRespHeaders","u":"/next/api/ctx","h":"#getrespheaders","p":562},{"i":610,"t":"Generates URLs to named routes, with parameters. URLs are relative, for example: \"/user/1831\" Signature func (c *Ctx) GetRouteURL(routeName string, params Map) (string, error) Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Home page\") }).Name(\"home\") app.Get(\"/user/:id\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"id\")) }).Name(\"user.show\") app.Get(\"/test\", func(c *fiber.Ctx) error { location, _ := c.GetRouteURL(\"user.show\", fiber.Map{\"id\": 1}) return c.SendString(location) }) // /test returns \"/user/1\"","s":"GetRouteURL","u":"/next/api/ctx","h":"#getrouteurl","p":562},{"i":612,"t":"Returns the hostname derived from the Host HTTP header. Signature func (c *Ctx) Hostname() string Example // GET http://google.com/search app.Get(\"/\", func(c *fiber.Ctx) error { c.Hostname() // \"google.com\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Hostname","u":"/next/api/ctx","h":"#hostname","p":562},{"i":614,"t":"Returns the remote IP address of the request. Signature func (c *Ctx) IP() string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.IP() // \"127.0.0.1\" // ... }) When registering the proxy request header in the fiber app, the ip address of the header is returned (Fiber configuration) app := fiber.New(fiber.Config{ ProxyHeader: fiber.HeaderXForwardedFor, })","s":"IP","u":"/next/api/ctx","h":"#ip","p":562},{"i":616,"t":"Returns an array of IP addresses specified in the X-Forwarded-For request header. Signature func (c *Ctx) IPs() []string Example // X-Forwarded-For: proxy1, 127.0.0.1, proxy3 app.Get(\"/\", func(c *fiber.Ctx) error { c.IPs() // [\"proxy1\", \"127.0.0.1\", \"proxy3\"] // ... }) caution Improper use of the X-Forwarded-For header can be a security risk. For details, see the Security and privacy concerns section.","s":"IPs","u":"/next/api/ctx","h":"#ips","p":562},{"i":618,"t":"Returns the matching content type, if the incoming request’s Content-Type HTTP header field matches the MIME type specified by the type parameter. info If the request has no body, it returns false. Signature func (c *Ctx) Is(extension string) bool Example // Content-Type: text/html; charset=utf-8 app.Get(\"/\", func(c *fiber.Ctx) error { c.Is(\"html\") // true c.Is(\".html\") // true c.Is(\"json\") // false // ... })","s":"Is","u":"/next/api/ctx","h":"#is","p":562},{"i":620,"t":"Returns true if request came from localhost Signature func (c *Ctx) IsFromLocal() bool { Example app.Get(\"/\", func(c *fiber.Ctx) error { // If request came from localhost, return true else return false c.IsFromLocal() // ... })","s":"IsFromLocal","u":"/next/api/ctx","h":"#isfromlocal","p":562},{"i":622,"t":"Converts any interface or string to JSON using the goccy/go-json package. info JSON also sets the content header to application/json. Signature func (c *Ctx) JSON(data interface{}) error Example type SomeStruct struct { Name string Age uint8 } app.Get(\"/json\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ Name: \"Grame\", Age: 20, } return c.JSON(data) // => Content-Type: application/json // => \"{\"Name\": \"Grame\", \"Age\": 20}\" return c.JSON(fiber.Map{ \"name\": \"Grame\", \"age\": 20, }) // => Content-Type: application/json // => \"{\"name\": \"Grame\", \"age\": 20}\" })","s":"JSON","u":"/next/api/ctx","h":"#json","p":562},{"i":624,"t":"Sends a JSON response with JSONP support. This method is identical to JSON, except that it opts-in to JSONP callback support. By default, the callback name is simply callback. Override this by passing a named string in the method. Signature func (c *Ctx) JSONP(data interface{}, callback ...string) error Example type SomeStruct struct { name string age uint8 } app.Get(\"/\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ name: \"Grame\", age: 20, } return c.JSONP(data) // => callback({\"name\": \"Grame\", \"age\": 20}) return c.JSONP(data, \"customFunc\") // => customFunc({\"name\": \"Grame\", \"age\": 20}) })","s":"JSONP","u":"/next/api/ctx","h":"#jsonp","p":562},{"i":626,"t":"Joins the links followed by the property to populate the response’s Link HTTP header field. Signature func (c *Ctx) Links(link ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Links( \"http://api.example.com/users?page=2\", \"next\", \"http://api.example.com/users?page=5\", \"last\", ) // Link: ; rel=\"next\", // ; rel=\"last\" // ... })","s":"Links","u":"/next/api/ctx","h":"#links","p":562},{"i":628,"t":"A method that stores variables scoped to the request and, therefore, are available only to the routes that match the request. tip This is useful if you want to pass some specific data to the next middleware. Signature func (c *Ctx) Locals(key interface{}, value ...interface{}) interface{} Example app.Use(func(c *fiber.Ctx) error { c.Locals(\"user\", \"admin\") return c.Next() }) app.Get(\"/admin\", func(c *fiber.Ctx) error { if c.Locals(\"user\") == \"admin\" { return c.Status(fiber.StatusOK).SendString(\"Welcome, admin!\") } return c.SendStatus(fiber.StatusForbidden) })","s":"Locals","u":"/next/api/ctx","h":"#locals","p":562},{"i":630,"t":"Sets the response Location HTTP header to the specified path parameter. Signature func (c *Ctx) Location(path string) Example app.Post(\"/\", func(c *fiber.Ctx) error { c.Location(\"http://example.com\") c.Location(\"/foo/bar\") return nil })","s":"Location","u":"/next/api/ctx","h":"#location","p":562},{"i":632,"t":"Returns a string corresponding to the HTTP method of the request: GET, POST, PUT, and so on. Optionally, you could override the method by passing a string. Signature func (c *Ctx) Method(override ...string) string Example app.Post(\"/\", func(c *fiber.Ctx) error { c.Method() // \"POST\" c.Method(\"GET\") c.Method() // GET // ... })","s":"Method","u":"/next/api/ctx","h":"#method","p":562},{"i":634,"t":"To access multipart form entries, you can parse the binary with MultipartForm(). This returns a map[string][]string, so given a key, the value will be a string slice. Signature func (c *Ctx) MultipartForm() (*multipart.Form, error) Example app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form if token := form.Value[\"token\"]; len(token) > 0 { // Get key value: fmt.Println(token[0]) } // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to disk: if err := c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)); err != nil { return err } } } return err })","s":"MultipartForm","u":"/next/api/ctx","h":"#multipartform","p":562},{"i":636,"t":"When Next is called, it executes the next method in the stack that matches the current route. You can pass an error struct within the method that will end the chaining and call the error handler. Signature func (c *Ctx) Next() error Example app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(\"1st route!\") return c.Next() }) app.Get(\"*\", func(c *fiber.Ctx) error { fmt.Println(\"2nd route!\") return c.Next() }) app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(\"3rd route!\") return c.SendString(\"Hello, World!\") })","s":"Next","u":"/next/api/ctx","h":"#next","p":562},{"i":638,"t":"Returns the original request URL. Signature func (c *Ctx) OriginalURL() string Example // GET http://example.com/search?q=something app.Get(\"/\", func(c *fiber.Ctx) error { c.OriginalURL() // \"/search?q=something\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"OriginalURL","u":"/next/api/ctx","h":"#originalurl","p":562},{"i":640,"t":"Method can be used to get the route parameters, you could pass an optional default value that will be returned if the param key does not exist. info Defaults to empty string (\"\"), if the param doesn't exist. Signature func (c *Ctx) Params(key string, defaultValue ...string) string Example // GET http://example.com/user/fenny app.Get(\"/user/:name\", func(c *fiber.Ctx) error { c.Params(\"name\") // \"fenny\" // ... }) // GET http://example.com/user/fenny/123 app.Get(\"/user/*\", func(c *fiber.Ctx) error { c.Params(\"*\") // \"fenny/123\" c.Params(\"*1\") // \"fenny/123\" // ... }) Unnamed route parameters(*, +) can be fetched by the character and the counter in the route. Example // ROUTE: /v1/*/shop/* // GET: /v1/brand/4/shop/blue/xs c.Params(\"*1\") // \"brand/4\" c.Params(\"*2\") // \"blue/xs\" For reasons of downward compatibility, the first parameter segment for the parameter character can also be accessed without the counter. Example app.Get(\"/v1/*/shop/*\", func(c *fiber.Ctx) error { c.Params(\"*\") // outputs the values of the first wildcard segment }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Params","u":"/next/api/ctx","h":"#params","p":562},{"i":642,"t":"Method can be used to get an integer from the route parameters. Please note if that parameter is not in the request, zero will be returned. If the parameter is NOT a number, zero and an error will be returned info Defaults to the integer zero (0), if the param doesn't exist. Signature func (c *Ctx) ParamsInt(key string) (int, error) Example // GET http://example.com/user/123 app.Get(\"/user/:id\", func(c *fiber.Ctx) error { id, err := c.ParamsInt(\"id\") // int 123 and no error // ... }) This method is equivalent of using atoi with ctx.Params","s":"ParamsInt","u":"/next/api/ctx","h":"#paramsint","p":562},{"i":644,"t":"This method is similar to BodyParser, but for path parameters. It is important to use the struct tag \"params\". For example, if you want to parse a path parameter with a field called Pass, you would use a struct field of params:\"pass\" Signature func (c *Ctx) ParamsParser(out interface{}) error Example // GET http://example.com/user/111 app.Get(\"/user/:id\", func(c *fiber.Ctx) error { param := struct {ID uint `params:\"id\"`}{} c.ParamsParser(¶m) // \"{\"id\": 111}\" // ... })","s":"ParamsParser","u":"/next/api/ctx","h":"#paramsparser","p":562},{"i":646,"t":"Contains the path part of the request URL. Optionally, you could override the path by passing a string. For internal redirects, you might want to call RestartRouting instead of Next. Signature func (c *Ctx) Path(override ...string) string Example // GET http://example.com/users?sort=desc app.Get(\"/users\", func(c *fiber.Ctx) error { c.Path() // \"/users\" c.Path(\"/john\") c.Path() // \"/john\" // ... })","s":"Path","u":"/next/api/ctx","h":"#path","p":562},{"i":648,"t":"Contains the request protocol string: http or https for TLS requests. Signature func (c *Ctx) Protocol() string Example // GET http://example.com app.Get(\"/\", func(c *fiber.Ctx) error { c.Protocol() // \"http\" // ... })","s":"Protocol","u":"/next/api/ctx","h":"#protocol","p":562},{"i":650,"t":"Queries is a function that returns an object containing a property for each query string parameter in the route. Signature func (c *Ctx) Queries() map[string]string Example // GET http://example.com/?name=alex&want_pizza=false&id= app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"name\"] // \"alex\" m[\"want_pizza\"] // \"false\" m[\"id\"] // \"\" // ... }) Example // GET http://example.com/?field1=value1&field1=value2&field2=value3 app.Get(\"/\", func (c *fiber.Ctx) error { m := c.Queries() m[\"field1\"] // \"value2\" m[\"field2\"] // value3 }) Example // GET http://example.com/?list_a=1&list_a=2&list_a=3&list_b[]=1&list_b[]=2&list_b[]=3&list_c=1,2,3 app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"list_a\"] // \"3\" m[\"list_b[]\"] // \"3\" m[\"list_c\"] // \"1,2,3\" }) Example // GET /api/posts?filters.author.name=John&filters.category.name=Technology app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"filters.author.name\"] // John m[\"filters.category.name\"] // Technology }) Example // GET /api/posts?tags=apple,orange,banana&filters[tags]=apple,orange,banana&filters[category][name]=fruits&filters.tags=apple,orange,banana&filters.category.name=fruits app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"tags\"] // apple,orange,banana m[\"filters[tags]\"] // apple,orange,banana m[\"filters[category][name]\"] // fruits m[\"filters.tags\"] // apple,orange,banana m[\"filters.category.name\"] // fruits })","s":"Queries","u":"/next/api/ctx","h":"#queries","p":562},{"i":652,"t":"This property is an object containing a property for each query string parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. info If there is no query string, it returns an empty string. Signature func (c *Ctx) Query(key string, defaultValue ...string) string Example // GET http://example.com/?order=desc&brand=nike app.Get(\"/\", func(c *fiber.Ctx) error { c.Query(\"order\") // \"desc\" c.Query(\"brand\") // \"nike\" c.Query(\"empty\", \"nike\") // \"nike\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Query","u":"/next/api/ctx","h":"#query","p":562},{"i":654,"t":"This property is an object containing a property for each query boolean parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, false will be returned. If the parameter is not a boolean, it is still tried to be converted and usually returned as false. Signature func (c *Ctx) QueryBool(key string, defaultValue ...bool) bool Example // GET http://example.com/?name=alex&want_pizza=false&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryBool(\"want_pizza\") // false c.QueryBool(\"want_pizza\", true) // false c.QueryBool(\"name\") // false c.QueryBool(\"name\", true) // true c.QueryBool(\"id\") // false c.QueryBool(\"id\", true) // true // ... })","s":"QueryBool","u":"/next/api/ctx","h":"#querybool","p":562},{"i":656,"t":"This property is an object containing a property for each query float64 parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, zero will be returned. If the parameter is not a number, it is still tried to be converted and usually returned as 1. info Defaults to the float64 zero (0), if the param doesn't exist. Signature func (c *Ctx) QueryFloat(key string, defaultValue ...float64) float64 Example // GET http://example.com/?name=alex&amount=32.23&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryFloat(\"amount\") // 32.23 c.QueryFloat(\"amount\", 3) // 32.23 c.QueryFloat(\"name\", 1) // 1 c.QueryFloat(\"name\") // 0 c.QueryFloat(\"id\", 3) // 3 // ... })","s":"QueryFloat","u":"/next/api/ctx","h":"#queryfloat","p":562},{"i":658,"t":"This property is an object containing a property for each query integer parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, zero will be returned. If the parameter is not a number, it is still tried to be converted and usually returned as 1. info Defaults to the integer zero (0), if the param doesn't exist. Signature func (c *Ctx) QueryInt(key string, defaultValue ...int) int Example // GET http://example.com/?name=alex&wanna_cake=2&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryInt(\"wanna_cake\", 1) // 2 c.QueryInt(\"name\", 1) // 1 c.QueryInt(\"id\", 1) // 1 c.QueryInt(\"id\") // 0 // ... })","s":"QueryInt","u":"/next/api/ctx","h":"#queryint","p":562},{"i":660,"t":"This method is similar to BodyParser, but for query parameters. It is important to use the struct tag \"query\". For example, if you want to parse a query parameter with a field called Pass, you would use a struct field of query:\"pass\". Signature func (c *Ctx) QueryParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `query:\"name\"` Pass string `query:\"pass\"` Products []string `query:\"products\"` } app.Get(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.QueryParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe log.Println(p.Products) // [shoe, hat] // ... }) // Run tests with the following curl command // curl \"http://localhost:3000/?name=john&pass=doe&products=shoe,hat\"","s":"QueryParser","u":"/next/api/ctx","h":"#queryparser","p":562},{"i":662,"t":"A struct containing the type and a slice of ranges will be returned. Signature func (c *Ctx) Range(size int) (Range, error) Example // Range: bytes=500-700, 700-900 app.Get(\"/\", func(c *fiber.Ctx) error { b := c.Range(1000) if b.Type == \"bytes\" { for r := range r.Ranges { fmt.Println(r) // [500, 700] } } })","s":"Range","u":"/next/api/ctx","h":"#range","p":562},{"i":664,"t":"Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. Signature func (c *Ctx) Redirect(location string, status ...int) error Example app.Get(\"/coffee\", func(c *fiber.Ctx) error { return c.Redirect(\"/teapot\") }) app.Get(\"/teapot\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusTeapot).Send(\"🍵 short and stout 🍵\") }) More examples app.Get(\"/\", func(c *fiber.Ctx) error { return c.Redirect(\"/foo/bar\") return c.Redirect(\"../login\") return c.Redirect(\"http://example.com\") return c.Redirect(\"http://example.com\", 301) })","s":"Redirect","u":"/next/api/ctx","h":"#redirect","p":562},{"i":666,"t":"Redirects to the specific route along with the parameters and with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. info If you want to send queries to route, you must add \"queries\" key typed as map[string]string to params. Signature func (c *Ctx) RedirectToRoute(routeName string, params fiber.Map, status ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { // /user/fiber return c.RedirectToRoute(\"user\", fiber.Map{ \"name\": \"fiber\" }) }) app.Get(\"/with-queries\", func(c *fiber.Ctx) error { // /user/fiber?data[0][name]=john&data[0][age]=10&test=doe return c.RedirectToRoute(\"user\", fiber.Map{ \"name\": \"fiber\", \"queries\": map[string]string{\"data[0][name]\": \"john\", \"data[0][age]\": \"10\", \"test\": \"doe\"}, }) }) app.Get(\"/user/:name\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"name\")) }).Name(\"user\")","s":"RedirectToRoute","u":"/next/api/ctx","h":"#redirecttoroute","p":562},{"i":668,"t":"Redirects back to refer URL. It redirects to fallback URL if refer header doesn't exists, with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. Signature func (c *Ctx) RedirectBack(fallback string, status ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Home page\") }) app.Get(\"/test\", func(c *fiber.Ctx) error { c.Set(\"Content-Type\", \"text/html\") return c.SendString(`Back`) }) app.Get(\"/back\", func(c *fiber.Ctx) error { return c.RedirectBack(\"/\") })","s":"RedirectBack","u":"/next/api/ctx","h":"#redirectback","p":562},{"i":670,"t":"Renders a view with data and sends a text/html response. By default Render uses the default Go Template engine. If you want to use another View engine, please take a look at our Template middleware. Signature func (c *Ctx) Render(name string, bind interface{}, layouts ...string) error","s":"Render","u":"/next/api/ctx","h":"#render","p":562},{"i":672,"t":"Request return the *fasthttp.Request pointer Signature func (c *Ctx) Request() *fasthttp.Request Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Request().Header.Method() // => []byte(\"GET\") })","s":"Request","u":"/next/api/ctx","h":"#request","p":562},{"i":674,"t":"This method is similar to BodyParser, but for request headers. It is important to use the struct tag \"reqHeader\". For example, if you want to parse a request header with a field called Pass, you would use a struct field of reqHeader:\"pass\". Signature func (c *Ctx) ReqHeaderParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `reqHeader:\"name\"` Pass string `reqHeader:\"pass\"` Products []string `reqHeader:\"products\"` } app.Get(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.ReqHeaderParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe log.Println(p.Products) // [shoe, hat] // ... }) // Run tests with the following curl command // curl \"http://localhost:3000/\" -H \"name: john\" -H \"pass: doe\" -H \"products: shoe,hat\"","s":"ReqHeaderParser","u":"/next/api/ctx","h":"#reqheaderparser","p":562},{"i":676,"t":"Response return the *fasthttp.Response pointer Signature func (c *Ctx) Response() *fasthttp.Response Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Response().BodyWriter().Write([]byte(\"Hello, World!\")) // => \"Hello, World!\" return nil })","s":"Response","u":"/next/api/ctx","h":"#response","p":562},{"i":678,"t":"Instead of executing the next method when calling Next, RestartRouting restarts execution from the first method that matches the current route. This may be helpful after overriding the path, i. e. an internal redirect. Note that handlers might be executed again which could result in an infinite loop. Signature func (c *Ctx) RestartRouting() error Example app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"From /new\") }) app.Get(\"/old\", func(c *fiber.Ctx) error { c.Path(\"/new\") return c.RestartRouting() })","s":"RestartRouting","u":"/next/api/ctx","h":"#restartrouting","p":562},{"i":680,"t":"Returns the matched Route struct. Signature func (c *Ctx) Route() *Route Example // http://localhost:8080/hello app.Get(\"/hello/:name\", func(c *fiber.Ctx) error { r := c.Route() fmt.Println(r.Method, r.Path, r.Params, r.Handlers) // GET /hello/:name handler [name] // ... }) caution Do not rely on c.Route() in middlewares before calling c.Next() - c.Route() returns the last executed route. Example func MyMiddleware() fiber.Handler { return func(c *fiber.Ctx) error { beforeNext := c.Route().Path // Will be '/' err := c.Next() afterNext := c.Route().Path // Will be '/hello/:name' return err } }","s":"Route","u":"/next/api/ctx","h":"#route","p":562},{"i":682,"t":"Method is used to save any multipart file to disk. Signature func (c *Ctx) SaveFile(fh *multipart.FileHeader, path string) error Example app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to disk: if err := c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)); err != nil { return err } } return err } })","s":"SaveFile","u":"/next/api/ctx","h":"#savefile","p":562},{"i":684,"t":"Method is used to save any multipart file to an external storage system. Signature func (c *Ctx) SaveFileToStorage(fileheader *multipart.FileHeader, path string, storage Storage) error Example storage := memory.New() app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to storage: if err := c.SaveFileToStorage(file, fmt.Sprintf(\"./%s\", file.Filename), storage); err != nil { return err } } return err } })","s":"SaveFileToStorage","u":"/next/api/ctx","h":"#savefiletostorage","p":562},{"i":686,"t":"A boolean property that is true , if a TLS connection is established. Signature func (c *Ctx) Secure() bool Example // Secure() method is equivalent to: c.Protocol() == \"https\"","s":"Secure","u":"/next/api/ctx","h":"#secure","p":562},{"i":688,"t":"Sets the HTTP response body. Signature func (c *Ctx) Send(body []byte) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.Send([]byte(\"Hello, World!\")) // => \"Hello, World!\" }) Fiber also provides SendString and SendStream methods for raw inputs. tip Use this if you don't need type assertion, recommended for faster performance. Signature func (c *Ctx) SendString(body string) error func (c *Ctx) SendStream(stream io.Reader, size ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") // => \"Hello, World!\" return c.SendStream(bytes.NewReader([]byte(\"Hello, World!\"))) // => \"Hello, World!\" })","s":"Send","u":"/next/api/ctx","h":"#send","p":562},{"i":690,"t":"Transfers the file from the given path. Sets the Content-Type response HTTP header field based on the filenames extension. caution Method doesn´t use gzipping by default, set it to true to enable. Signature func (c *Ctx) SendFile(file string, compress ...bool) error Example app.Get(\"/not-found\", func(c *fiber.Ctx) error { return c.SendFile(\"./public/404.html\"); // Disable compression return c.SendFile(\"./static/index.html\", false); }) info If the file contains an url specific character you have to escape it before passing the file path into the sendFile function. Example app.Get(\"/file-with-url-chars\", func(c *fiber.Ctx) error { return c.SendFile(url.PathEscape(\"hash_sign_#.txt\")) })","s":"SendFile","u":"/next/api/ctx","h":"#sendfile","p":562},{"i":692,"t":"Sets the status code and the correct status message in the body, if the response body is empty. tip You can find all used status codes and messages here. Signature func (c *Ctx) SendStatus(status int) error Example app.Get(\"/not-found\", func(c *fiber.Ctx) error { return c.SendStatus(415) // => 415 \"Unsupported Media Type\" c.SendString(\"Hello, World!\") return c.SendStatus(415) // => 415 \"Hello, World!\" })","s":"SendStatus","u":"/next/api/ctx","h":"#sendstatus","p":562},{"i":694,"t":"Sets the response’s HTTP header field to the specified key, value. Signature func (c *Ctx) Set(key string, val string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Set(\"Content-Type\", \"text/plain\") // => \"Content-type: text/plain\" // ... })","s":"Set","u":"/next/api/ctx","h":"#set","p":562},{"i":696,"t":"Allow you to config BodyParser/QueryParser decoder, base on schema's options, providing possibility to add custom type for parsing. Signature func SetParserDecoder(parserConfig fiber.ParserConfig{ IgnoreUnknownKeys bool, ParserType []fiber.ParserType{ Customtype interface{}, Converter func(string) reflect.Value, }, ZeroEmpty bool, SetAliasTag string, }) Example type CustomTime time.Time // String() returns the time in string func (ct *CustomTime) String() string { t := time.Time(*ct).String() return t } // Register the converter for CustomTime type format as 2006-01-02 var timeConverter = func(value string) reflect.Value { fmt.Println(\"timeConverter\", value) if v, err := time.Parse(\"2006-01-02\", value); err == nil { return reflect.ValueOf(v) } return reflect.Value{} } customTime := fiber.ParserType{ Customtype: CustomTime{}, Converter: timeConverter, } // Add setting to the Decoder fiber.SetParserDecoder(fiber.ParserConfig{ IgnoreUnknownKeys: true, ParserType: []fiber.ParserType{customTime}, ZeroEmpty: true, }) // Example to use CustomType, you pause custom time format not in RFC3339 type Demo struct { Date CustomTime `form:\"date\" query:\"date\"` Title string `form:\"title\" query:\"title\"` Body string `form:\"body\" query:\"body\"` } app.Post(\"/body\", func(c *fiber.Ctx) error { var d Demo c.BodyParser(&d) fmt.Println(\"d.Date\", d.Date.String()) return c.JSON(d) }) app.Get(\"/query\", func(c *fiber.Ctx) error { var d Demo c.QueryParser(&d) fmt.Println(\"d.Date\", d.Date.String()) return c.JSON(d) }) // curl -X POST -F title=title -F body=body -F date=2021-10-20 http://localhost:3000/body // curl -X GET \"http://localhost:3000/query?title=title&body=body&date=2021-10-20\"","s":"SetParserDecoder","u":"/next/api/ctx","h":"#setparserdecoder","p":562},{"i":698,"t":"Sets the user specified implementation for context interface. Signature func (c *Ctx) SetUserContext(ctx context.Context) Example app.Get(\"/\", func(c *fiber.Ctx) error { ctx := context.Background() c.SetUserContext(ctx) // Here ctx could be any context implementation // ... })","s":"SetUserContext","u":"/next/api/ctx","h":"#setusercontext","p":562},{"i":700,"t":"https://expressjs.com/en/4x/api.html#req.stale Signature func (c *Ctx) Stale() bool","s":"Stale","u":"/next/api/ctx","h":"#stale","p":562},{"i":702,"t":"Sets the HTTP status for the response. info Method is a chainable. Signature func (c *Ctx) Status(status int) *Ctx Example app.Get(\"/fiber\", func(c *fiber.Ctx) error { c.Status(fiber.StatusOK) return nil } app.Get(\"/hello\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusBadRequest).SendString(\"Bad Request\") } app.Get(\"/world\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusNotFound).SendFile(\"./public/gopher.png\") })","s":"Status","u":"/next/api/ctx","h":"#status","p":562},{"i":704,"t":"Returns a string slice of subdomains in the domain name of the request. The application property subdomain offset, which defaults to 2, is used for determining the beginning of the subdomain segments. Signature func (c *Ctx) Subdomains(offset ...int) []string Example // Host: \"tobi.ferrets.example.com\" app.Get(\"/\", func(c *fiber.Ctx) error { c.Subdomains() // [\"ferrets\", \"tobi\"] c.Subdomains(1) // [\"tobi\"] // ... })","s":"Subdomains","u":"/next/api/ctx","h":"#subdomains","p":562},{"i":706,"t":"Sets the Content-Type HTTP header to the MIME type listed here specified by the file extension. Signature func (c *Ctx) Type(ext string, charset ...string) *Ctx Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Type(\".html\") // => \"text/html\" c.Type(\"html\") // => \"text/html\" c.Type(\"png\") // => \"image/png\" c.Type(\"json\", \"utf-8\") // => \"application/json; charset=utf-8\" // ... })","s":"Type","u":"/next/api/ctx","h":"#type","p":562},{"i":708,"t":"UserContext returns a context implementation that was set by user earlier or returns a non-nil, empty context, if it was not set earlier. Signature func (c *Ctx) UserContext() context.Context Example app.Get(\"/\", func(c *fiber.Ctx) error { ctx := c.UserContext() // ctx is context implementation set by user // ... })","s":"UserContext","u":"/next/api/ctx","h":"#usercontext","p":562},{"i":710,"t":"Adds the given header field to the Vary response header. This will append the header, if not already listed, otherwise leaves it listed in the current location. info Multiple fields are allowed. Signature func (c *Ctx) Vary(fields ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Vary(\"Origin\") // => Vary: Origin c.Vary(\"User-Agent\") // => Vary: Origin, User-Agent // No duplicates c.Vary(\"Origin\") // => Vary: Origin, User-Agent c.Vary(\"Accept-Encoding\", \"Accept\") // => Vary: Origin, User-Agent, Accept-Encoding, Accept // ... })","s":"Vary","u":"/next/api/ctx","h":"#vary","p":562},{"i":712,"t":"Write adopts the Writer interface Signature func (c *Ctx) Write(p []byte) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Write([]byte(\"Hello, World!\")) // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"Write","u":"/next/api/ctx","h":"#write","p":562},{"i":714,"t":"Writef adopts the string with variables Signature func (c *Ctx) Writef(f string, a ...interface{}) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { world := \"World!\" c.Writef(\"Hello, %s\", world) // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"Writef","u":"/next/api/ctx","h":"#writef","p":562},{"i":716,"t":"WriteString adopts the string Signature func (c *Ctx) WriteString(s string) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.WriteString(\"Hello, World!\") // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"WriteString","u":"/next/api/ctx","h":"#writestring","p":562},{"i":718,"t":"A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery). Signature func (c *Ctx) XHR() bool Example // X-Requested-With: XMLHttpRequest app.Get(\"/\", func(c *fiber.Ctx) error { c.XHR() // true // ... })","s":"XHR","u":"/next/api/ctx","h":"#xhr","p":562},{"i":720,"t":"Converts any interface or string to XML using the standard encoding/xml package. info XML also sets the content header to application/xml. Signature func (c *Ctx) XML(data interface{}) error Example type SomeStruct struct { XMLName xml.Name `xml:\"Fiber\"` Name string `xml:\"Name\"` Age uint8 `xml:\"Age\"` } app.Get(\"/\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ Name: \"Grame\", Age: 20, } return c.XML(data) // // Grame // 20 // })","s":"XML","u":"/next/api/ctx","h":"#xml","p":562}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2",[0,5.72,1,3.184,2,4.307,3,0.895,4,3.862,5,5.041,6,3.766,7,1.515,8,2.272,9,6.309,10,6.309,11,3.958,12,4.81,13,2.871,14,5.331,15,5.331,16,4.81,17,6.309,18,2.042,19,4.452,20,3.474,21,4.81,22,6.309,23,6.309,24,4.81,25,5.72,26,5.041,27,4.81,28,4.307,29,4.81,30,3.614,31,6.309,32,5.331,33,4.452,34,4.617,35,6.309,36,6.309,37,6.309]],["t/4",[20,5.665,38,5.007,39,5.84,40,8.107,41,7.981,42,7.981,43,5.007,44,5.631,45,1.495,46,6.084,47,2.876]],["t/6",[3,0.736,7,0.794,8,0.814,30,2.972,45,1.475,48,2.809,49,1.086,50,1.217,51,5.115,52,1.408,53,3.308,54,2.999,55,5.188,56,1.397,57,2.522,58,3.308,59,4.016,60,3.667,61,2.781,62,2.42,63,1.697,64,3.308,65,2.42,66,2.999,67,2.334,68,2.025,69,3.308,70,3.661,71,0.51,72,5.188,73,0.937,74,0.539,75,4.669,76,3.284,77,3.918,78,5.188,79,1.857,80,6.402,81,2.075,82,3.308,83,3.18,84,3.919,85,2.795,86,4.384,87,3.308,88,0.624,89,3.308,90,3.308,91,3.308,92,3.308,93,3.308,94,4.384,95,3.308,96,1.57,97,1.134,98,3.308,99,1.134,100,2.795,101,2.795,102,2.522,103,3.308,104,3.308,105,0.552,106,3.308,107,2.999,108,0.913,109,1.669,110,2.999,111,3.308,112,2.999,113,2.999,114,2.075,115,1.18,116,1.485,117,2.258,118,2.025,119,2.258,120,2.999,121,2.999]],["t/8",[7,2.029,8,1.602,20,3.585,47,2.347,49,0.976,50,1.006,68,3.986,71,0.64,73,0.953,74,0.511,96,3.091,105,1.087,122,5.903,123,5.903,124,6.511,125,2.088,126,3.394,127,2.168,128,2.71,129,1.86,130,3.73,131,4.132,132,3.894,133,3.809,134,6.511,135,4.765,136,4.194,137,3.73,138,3.519,139,4.313]],["t/10",[1,1.755,7,0.835,8,0.856,18,1.746,48,1.169,49,1.208,50,1.151,56,2.005,59,2.182,61,1.228,63,1.784,73,1.249,74,0.553,88,0.656,99,2.266,105,1.244,129,0.993,130,3.09,131,3.233,138,3.572,140,3.139,141,2.779,142,2.182,143,5.395,144,1.846,145,3.152,146,2.454,147,2.779,148,3.206,149,1.915,150,2.14,151,4.559,152,3.302,153,3.948,154,2.034,155,1.915,156,2.722,157,2.97,158,3.152,159,2.545,160,1.35,161,2.938,162,0.55,163,3.477,164,3.948,165,2.08,166,2.938,167,1.675,168,2.779,169,1.915,170,2.545,171,1.992,172,2.524,173,3.477,174,3.477,175,3.152,176,3.477,177,1.228,178,3.477,179,3.477,180,4.559,181,2.97,182,3.477,183,2.938,184,3.477,185,3.152,186,3.152,187,2.779,188,3.477]],["t/12",[7,1.492,45,1.164,61,2.194,74,0.309,81,3.898,88,1.547,94,5.25,99,2.809,128,2.585,132,3.716,160,2.412,162,0.983,171,3.559,189,5.016,190,6.547,191,4.88,192,5.632,193,5.632,194,5.632,195,5.25,196,6.258,197,6.213,198,1.368,199,3.135,200,2.467,201,6.708,202,5.632,203,4.964,204,6.213,205,6.213,206,6.213]],["t/14",[1,4.757,5,7.533,8,2.319,11,4.864,20,5.191,116,3.481,117,5.293,118,4.746,119,5.293,207,5.91,208,7.752,209,7.752,210,7.752]],["t/17",[3,0.658,7,0.852,18,0.674,39,2.596,45,1.152,48,2.531,49,0.312,52,2.209,56,0.955,61,1.253,68,1.274,71,0.204,74,0.542,81,1.306,88,0.67,97,0.713,99,1.216,105,0.347,108,1.973,109,1.05,115,2.686,116,0.934,135,3.394,148,1.743,149,1.146,150,1.148,155,1.146,160,0.808,162,0.329,166,1.758,167,1.002,171,1.192,177,2.874,189,4.609,190,6.502,191,4.319,192,1.886,193,1.886,194,1.886,196,4.879,198,0.781,199,1.05,200,1.409,201,4.5,202,4.967,211,1.05,212,2.705,213,1.706,214,2.081,215,1.274,216,2.081,217,2.081,218,2.081,219,2.122,220,1.663,221,1.274,222,1.468,223,1.034,224,1.886,225,2.081,226,2.081,227,2.081,228,2.081,229,1.105,230,2.081,231,1.886,232,2.172,233,1.886,234,4.638,235,1.333,236,3.139,237,2.622,238,1.34,239,1.758,240,0.643,241,1.586,242,1.586,243,1.758,244,1.886,245,2.226,246,3.272,247,1.34,248,1.586,249,2.081,250,0.852,251,2.396,252,2.108,253,2.081,254,1.018,255,1.306,256,3.548,257,2.081,258,1.886,259,1.886,260,2.081,261,2.839,262,1.886,263,1.067,264,1.421,265,2.081,266,2.081,267,1.992,268,1.523,269,2.705,270,2.705,271,3.548,272,2.081,273,0.632,274,3.166,275,1.245,276,1.067,277,0.876,278,1.758,279,2.835,280,1.886,281,0.996,282,1.24,283,0.947,284,0.57,285,2.081,286,1.886]],["t/19",[1,2.124,3,0.597,4,2.576,7,2.501,18,1.739,45,0.788,48,0.858,49,1.177,50,1.214,56,1.857,61,3.698,71,0.902,73,1.15,74,0.518,88,1.697,97,0.874,105,1.24,109,1.287,125,0.818,140,1.977,148,1.582,149,1.404,150,2.018,152,2.576,153,1.866,154,1.492,155,2.317,157,3.799,162,0.666,170,3.08,181,1.404,215,5.622,219,3.213,250,0.613,273,0.775,287,2.517,288,3.363,289,2.155,290,2.155,291,2.155,292,2.155,293,2.155,294,2.155,295,2.155,296,2.155,297,2.155,298,1.461,299,2.155,300,2.155,301,1.689,302,1.866,303,2.155,304,2.155,305,3.556,306,2.155,307,2.155,308,1.866,309,1.944,310,2.038,311,2.155,312,2.155,313,1.088,314,1.741,315,4.57,316,3.556,317,3.363,318,1.561,319,2.155,320,1.944,321,2.038,322,2.155]],["t/21",[3,0.902,7,2.362,8,1.564,49,0.953,50,0.983,71,0.817,73,0.931,74,0.538,88,1.2,96,3.018,105,1.062,126,2.554,128,3.462,162,1.006,165,3.803,215,3.892,310,5.081,323,6.342,324,6.359,325,8.319,326,6.359,327,5.373,328,5.765,329,6.359,330,5.765,331,3.436]],["t/23",[3,0.759,4,3.278,7,2.312,71,0.728,74,0.537,88,1.011,116,2.404,126,2.151,127,1.783,128,3.816,148,2.785,162,0.847,169,2.948,229,2.842,323,6.99,332,8.497,333,3.006,334,6.47,335,4.524,336,4.854,337,6.261,338,7.41,339,5.354,340,5.354,341,5.354,342,5.354,343,5.354,344,5.354,345,5.354,346,5.354,347,5.354,348,2.842,349,3.778,350,5.354,351,5.354]],["t/25",[1,3.862,3,0.796,7,2.092,33,3.96,61,3.769,71,0.752,74,0.55,88,1.059,96,2.664,126,2.255,128,2.336,140,2.065,162,0.888,215,3.436,235,2.109,331,3.033,352,5.069,353,5.613,354,4.485,355,3.832,356,4.485,357,4.485,358,4.485,359,4.485,360,4.485,361,4.485,362,4.743,363,4.743,364,4.743,365,4.743,366,4.743,367,4.743]],["t/27",[3,0.861,7,2.177,71,0.793,74,0.525,88,1.524,99,2.082,126,2.44,128,2.527,140,2.235,162,0.961,200,3.6,215,4.941,219,3.633,237,2.59,331,3.282,368,7.317,369,6.074,370,6.074,371,6.074,372,5.506,373,6.074,374,6.074,375,5.506,376,6.074,377,6.074,378,6.074,379,6.074,380,6.074,381,6.074,382,6.074,383,6.074,384,3.168]],["t/29",[3,1.031,7,2.371,16,5.54,49,1.089,71,0.89,74,0.539,85,6.141,126,2.919,128,3.024,162,1.15,167,4.756,385,7.268,386,7.268,387,3.138]],["t/31",[7,2.431,38,3.546,49,0.847,71,0.859,73,1.279,167,3.704,247,3.64,263,2.899,267,3.173,388,7.924,389,5.652,390,8.74,391,7.924,392,4.309,393,5.124,394,7.69,395,6.167,396,6.498,397,4.776,398,3.306,399,4.516,400,5.652,401,5.652,402,3.237,403,5.652,404,5.652,405,3.64,406,5.652,407,4.516,408,5.652,409,5.652,410,4.776,411,5.652,412,5.652,413,5.652,414,3.988]],["t/33",[7,2.346,49,1.232,61,2.904,71,0.808,150,2.662,162,1.301,287,4.918,415,6.948,416,8.223,417,8.223]],["t/35",[3,0.695,7,1.946,49,1.044,50,0.758,61,2.861,71,0.684,73,0.718,74,0.569,77,2.649,105,0.819,126,1.969,128,2.04,132,2.932,140,1.804,148,3.045,150,2.855,152,3.001,162,0.776,215,3.001,281,1.376,287,2.932,418,3.076,419,5.097,420,1.925,421,4.902,422,4.902,423,2.172,424,2.649,425,4.444,426,4.902,427,6.966,428,4.74,429,5.097,430,3.347,431,3.917]],["t/37",[3,0.491,7,1.583,49,0.519,50,0.535,61,1.899,71,0.528,73,0.507,74,0.565,77,1.871,88,0.654,96,1.644,105,0.578,126,1.391,128,1.441,129,0.989,132,2.071,140,1.274,148,3.452,150,3.054,162,0.548,200,3.746,215,2.12,261,2.12,281,0.972,317,2.767,420,1.36,423,1.534,424,1.871,425,3.139,428,5.374,430,4.5,431,8.074,432,3.139,433,3.463,434,3.463,435,3.463,436,3.463,437,3.463,438,3.463,439,3.463,440,3.463,441,3.463,442,3.463,443,3.463,444,3.463,445,3.463,446,2.926,447,3.671,448,3.463,449,5.377,450,4.824,451,2.64,452,3.463,453,3.463]],["t/39",[3,0.836,7,2.145,49,0.884,50,0.912,61,2.083,71,0.777,73,0.863,74,0.554,77,3.187,88,1.113,105,0.985,126,2.369,128,2.454,129,1.684,132,3.527,140,2.912,148,2.216,150,2.562,162,0.933,200,3.143,261,3.61,281,1.656,420,2.316,423,2.613,424,3.187,428,3.45,431,4.712,446,4.984,454,4.984,455,5.898,456,5.898,457,5.898]],["t/41",[3,0.802,7,2.099,49,0.847,50,0.874,71,0.859,73,0.827,74,0.55,77,3.054,115,2.016,126,2.27,128,2.352,130,3.237,131,2.764,140,3.216,148,2.124,150,2.489,152,3.46,162,0.894,200,2.244,250,1.357,252,1.937,261,3.46,287,3.38,423,2.504,424,3.054,428,3.306,431,4.516,446,4.776,454,4.776,458,5.652,459,5.652,460,4.776,461,4.516,462,3.546,463,1.496,464,5.124,465,5.652]],["t/43",[7,2.471,48,2.683,49,1.196,71,0.784,74,0.477,162,1.263,198,2.351,466,4.236]],["t/45",[7,2.291,45,1.48,49,1.184,56,2.127,61,3.618,71,0.776,97,2.709,162,1.25,167,3.807,189,4.838,467,6.678,468,7.903]],["t/47",[3,1.04,7,2.188,18,2.374,56,1.974,71,0.72,73,1.073,74,0.453,88,1.384,97,2.514,162,1.16,189,4.489,398,5.33,469,4.038,470,5.174,471,7.333,472,4.857,473,7.333,474,7.333,475,4.723,476,7.333]],["t/49",[3,0.849,7,1.92,18,1.937,45,1.686,52,2.169,56,1.611,71,0.588,73,0.876,74,0.478,88,1.13,148,2.249,160,2.324,162,0.947,189,3.663,191,2.883,198,1.76,398,3.501,469,3.295,470,4.223,477,7.245,478,6.753,479,6.753,480,3.964,481,5.639,482,2.202,483,5.425,484,5.984,485,5.425,486,5.425,487,2.761,488,5.639,489,4.782,490,4.782,491,4.782,492,4.782]],["t/51",[3,0.954,7,2.072,45,1.616,52,2.342,71,0.661,73,0.984,74,0.5,88,1.27,160,2.612,162,1.064,198,1.9,398,3.935,481,4.746,483,6.098,487,3.104,488,6.088,489,5.375,490,5.375,491,6.894,492,7.611,493,6.727,494,6.727]],["t/53",[3,0.796,7,1.838,18,1.817,45,1.631,52,2.078,56,1.511,71,0.551,73,0.821,74,0.465,88,1.059,148,2.109,160,2.179,162,0.888,189,3.436,191,2.704,198,1.686,398,3.283,469,3.09,470,3.96,478,6.467,479,6.467,480,3.718,481,5.4,482,2.065,485,6.939,486,5.088,487,2.59,488,5.4,489,4.485,490,4.485,491,4.485,492,4.485,495,7.654,496,6.939,497,5.613,498,5.613,499,5.613,500,4.485,501,5.088,502,5.088,503,5.088,504,5.088]],["t/55",[3,0.807,7,1.856,18,1.842,45,1.643,52,2.097,56,1.532,71,0.559,73,0.833,74,0.468,88,1.074,148,2.139,160,2.21,162,0.9,189,3.484,191,2.742,198,1.702,398,3.329,469,3.134,470,4.016,478,4.809,479,4.809,480,3.77,481,5.452,482,2.094,487,2.626,488,5.452,489,4.548,490,4.548,491,6.174,492,7.009,496,5.16,501,5.16,502,5.16,503,5.16,504,7.952,505,7.726,506,5.691,507,5.691,508,5.691]],["t/57",[3,0.946,7,2.061,45,1.608,71,0.655,73,0.976,74,0.427,97,2.287,150,2.778,162,1.055,236,3.821,398,3.903,424,4.638,488,4.707,509,3.078,510,8.582,511,6.672,512,6.672,513,8.582,514,6.672,515,4.882,516,6.048,517,6.672,518,6.672,519,6.672,520,6.672,521,6.048,522,6.672]],["t/59",[3,0.634,7,1.566,44,3.155,45,0.838,49,0.67,50,0.691,52,1.214,71,0.439,73,0.954,74,0.547,77,2.416,79,2.51,96,3.095,97,2.235,105,0.747,129,1.277,130,2.561,131,3.188,138,2.416,140,2.399,142,2.805,150,2.49,162,0.707,191,2.154,229,2.373,268,3.272,273,1.98,275,2.674,277,1.883,281,1.255,384,4.013,387,1.931,405,4.198,424,3.523,509,2.063,523,4.471,524,3.778,525,3.573,526,4.471,527,4.471,528,4.471,529,4.471,530,5.209,531,4.471,532,6.519,533,4.471,534,5.509,535,4.471,536,6.519,537,3.573,538,4.471,539,4.471,540,4.054,541,4.471,542,4.054,543,4.471,544,4.054,545,2.332,546,4.471,547,4.471]],["t/61",[7,2.346,49,1.232,71,0.808,150,2.662,162,1.301,333,4.616,548,6.763]],["t/64",[4,3.691,18,2.923,56,1.623,71,1.013,74,0.3,88,1.947,144,5.589,150,2.6,162,0.954,463,2.731,549,2.744,550,6.029,551,4.293,552,6.029,553,6.029,554,6.029,555,6.029,556,6.029]],["t/66",[14,6.744,15,6.744,56,2.148,81,5.007,150,3.33,551,3.321,557,7.981,558,7.235,559,7.981,560,7.981,561,7.981,562,6.744]],["t/68",[74,0.555,199,3.572,281,1.987,537,5.656,545,3.692,558,6.417,563,5.455,564,3.266,565,7.078,566,7.078,567,7.078,568,7.078,569,4.439,570,7.078,571,5.981,572,7.078]],["t/70",[3,0.868,48,2.057,71,0.952,74,0.403,88,1.717,108,2.239,162,0.968,254,4.738,273,1.858,355,5.538,469,3.369,482,2.252,551,4.466,573,6.12,574,6.417,575,6.12,576,6.12,577,6.12,578,6.12,579,6.12,580,6.12,581,5.548,582,6.12,583,5.548]],["t/72",[3,0.764,33,3.803,48,1.812,71,0.903,74,0.48,88,1.609,99,1.848,155,2.968,162,0.853,254,4.497,273,2.589,298,4.264,301,3.57,355,6.588,469,2.968,482,2.739,551,4.337,574,6.091,581,4.886,583,4.886,584,4.109,585,5.39,586,5.39,587,5.39,588,5.39,589,5.39,590,5.39,591,5.39,592,5.39,593,8.527,594,4.886]],["t/74",[3,1.132,71,0.784,74,0.477,162,1.263,273,2.423,298,4.571,395,5.631,396,6.744,551,3.993,595,9.595,596,7.981]],["t/76",[3,1.059,48,2.511,71,0.905,74,0.458,88,1.41,108,2.061,162,1.181,254,3.652,273,2.268,551,4.46,597,7.468,598,3.768,599,7.468,600,7.468,601,7.468]],["t/78",[3,0.836,33,4.161,45,1.105,48,3.209,71,0.978,74,0.394,88,1.686,108,2.185,155,3.247,162,0.933,254,4.368,355,4.026,482,2.17,551,4.533,574,3.906,594,5.347,602,5.067,603,3.311,604,5.898,605,5.898,606,5.898,607,5.898,608,5.898,609,5.898,610,5.898]],["t/80",[3,1.069,48,2.534,63,4.753,71,0.91,74,0.461,88,1.423,108,2.081,162,1.192,254,3.686,273,2.289,551,4.356,611,7.537,612,7.537,613,7.537]],["t/82",[3,1.049,48,2.488,71,0.9,74,0.456,88,1.397,108,2.043,162,1.171,240,2.833,254,3.619,273,2.247,551,4.328,614,7.4,615,3.619,616,7.4,617,7.4,618,7.4]],["t/84",[3,1.079,71,0.915,74,0.463,88,1.436,108,2.1,162,1.203,254,3.72,273,2.31,475,6.002,551,4.37,619,7.607,620,7.607,621,7.607]],["t/86",[3,1.069,71,0.91,74,0.461,88,1.749,108,2.081,147,6.022,162,1.192,254,3.686,551,4.356,622,7.537,623,4.614,624,7.537,625,7.537,626,7.537]],["t/88",[3,1.004,18,2.291,45,1.326,71,0.875,74,0.443,88,1.336,108,1.954,147,5.656,162,1.12,254,3.461,551,4.26,627,6.417,628,5.981,629,7.793,630,6.417,631,5.981,632,7.078,633,7.078,634,7.078,635,5.981]],["t/90",[3,0.691,49,0.73,56,2.174,71,0.793,74,0.545,88,0.92,108,1.915,162,0.771,177,1.721,254,3.392,276,3.558,277,2.053,387,2.104,402,2.791,423,2.159,430,3.327,466,3.682,487,2.248,545,4.85,551,4.021,636,3.894,637,4.118,638,4.873,639,4.873,640,8.075,641,4.118,642,3.715,643,8.798,644,4.418,645,6.936,646,3.894,647,4.873,648,2.459,649,4.873,650,3.228,651,4.873,652,2.42,653,4.873,654,4.418,655,4.873,656,4.873,657,4.873]],["t/92",[3,1.069,56,2.029,71,0.74,74,0.461,108,2.081,115,2.689,162,1.192,240,2.33,273,2.289,313,3.214,551,3.856,615,3.686,658,5.421,659,4.508,660,5.145,661,7.537,662,7.537]],["t/94",[3,1.069,56,2.029,71,0.74,74,0.461,108,2.081,115,2.689,162,1.192,240,2.33,273,2.289,313,3.214,551,3.856,615,3.686,659,4.508,663,7.404,664,6.022,665,7.537,666,7.537]],["t/96",[3,0.836,30,3.378,34,4.316,56,2.13,65,4.316,71,0.579,74,0.521,108,1.628,162,0.933,199,2.976,240,1.823,273,1.791,281,1.656,545,3.077,551,3.293,603,5.59,615,2.884,635,4.984,659,4.733,667,4.984,668,4.712,669,4.984,670,8.654,671,4.984,672,4.316,673,3.7,674,7.175,675,4.712,676,4.984,677,5.898,678,5.347,679,5.898,680,5.347]],["t/98",[3,0.933,8,0.686,30,2.592,34,3.311,45,0.522,56,2.197,65,3.311,71,0.71,74,0.528,88,1.462,108,1.249,150,0.902,155,1.534,162,1.04,191,4.096,199,2.283,200,2.871,235,1.047,240,1.399,254,1.363,273,0.846,402,1.596,407,2.227,423,2.005,466,1.479,482,1.025,487,1.286,551,3.758,574,1.846,603,5.07,615,3.216,635,2.355,636,2.227,648,1.406,652,1.384,659,3.416,670,5.179,672,3.311,673,2.839,674,4.102,675,3.615,676,3.823,678,2.526,680,2.526,681,4.827,682,6.221,683,2.355,684,2.787,685,2.787,686,2.787,687,2.787,688,5.179,689,2.787,690,2.787,691,5.712,692,2.787,693,3.823,694,5.556,695,2.787,696,5.712,697,2.787,698,2.787,699,3.838,700,2.787,701,4.525,702,2.787,703,5.712,704,6.576,705,2.787,706,5.712,707,2.787,708,2.787,709,2.787,710,2.787,711,4.525,712,4.525,713,2.787,714,2.787,715,2.787]],["t/100",[3,1.079,56,2.048,71,0.747,74,0.463,162,1.203,213,2.799,236,4.358,524,6.428,551,3.878,716,6.897,717,4.111,718,5.368,719,7.607,720,6.428,721,7.607,722,6.897,723,7.607]],["t/102",[3,1.121,56,2.127,71,0.776,74,0.474,108,2.182,162,1.25,264,5.395,267,4.436,405,6.143,551,3.969,724,7.903,725,7.903]],["t/104",[3,1.04,34,5.366,45,1.707,56,1.974,71,0.72,74,0.453,162,1.16,165,4.386,236,4.2,334,5.174,551,4.314,675,5.859,726,9.111,727,6.648,728,7.333,729,6.648,730,7.333]],["t/106",[3,1.079,71,0.747,74,0.463,162,1.203,167,3.665,200,3.021,232,4.657,475,4.9,481,5.368,500,6.079,551,4.193,731,8.449,732,5.194,733,7.607,734,7.607]],["t/108",[3,0.987,71,0.683,74,0.533,96,3.302,108,1.92,162,1.101,198,1.941,424,3.76,480,5.838,481,6.22,482,2.56,488,6.22,516,6.307,521,6.307,551,3.668,735,6.307,736,6.957,737,6.957,738,6.957]],["t/110",[3,1.11,71,0.769,74,0.472,108,2.161,162,1.238,277,3.297,430,5.343,551,3.946,739,7.096,740,5.041,741,5.041,742,6.614,743,7.827,744,7.827]],["t/112",[3,1.121,71,0.776,74,0.474,97,2.709,108,2.182,162,1.25,551,3.969,658,4.623,745,6.678,746,5.235,747,7.903,748,7.165,749,7.903]],["t/114",[3,1.121,71,0.776,74,0.474,97,2.709,108,2.182,162,1.25,551,3.969,658,4.623,750,6.678,751,6.025,752,7.903,753,7.165,754,7.903]],["t/116",[3,1.11,49,1.173,56,2.854,71,0.769,74,0.507,162,1.238,165,4.681,537,6.254,551,3.946,755,7.827]],["t/118",[3,0.97,30,3.918,34,5.005,65,5.005,71,0.672,74,0.477,97,2.989,108,1.888,162,1.082,165,4.091,199,3.452,213,3.532,540,6.201,551,3.995,672,5.005,673,4.291,675,5.465,676,5.78,756,6.84,757,8.72,758,6.84,759,6.84,760,6.84]],["t/120",[3,1.022,29,5.491,71,0.708,74,0.489,97,2.469,108,1.988,162,1.14,195,6.087,213,2.65,254,3.523,545,3.758,551,3.749,615,3.523,761,10.302,762,6.087,763,3.523,764,5.491,765,7.203,766,7.203]],["t/122",[3,1.013,49,1.07,71,0.701,73,1.311,74,0.487,162,1.13,199,4.942,254,5.022,277,3.007,545,5.108,549,3.249,551,2.971,569,4.078,767,3.662,768,7.14]],["t/124",[3,1.04,49,1.099,71,0.72,73,1.333,74,0.493,88,1.957,162,1.16,199,4.598,277,3.089,545,4.753,549,3.337,551,3.051,569,3.337,767,3.761,769,7.333]],["t/126",[3,0.938,49,0.991,71,0.65,73,1.249,74,0.47,162,1.047,199,4.769,235,2.487,254,4.622,277,2.787,313,2.822,420,2.598,423,2.932,469,3.643,545,5.209,549,3.011,551,2.754,569,3.885,574,4.383,767,3.394,770,6.617,771,6.617,772,4.842,773,6.617]],["t/128",[3,0.978,16,5.258,45,1.292,49,1.034,52,1.872,71,0.678,73,1.01,74,0.521,99,2.365,162,1.091,232,4.223,252,2.365,537,5.512,551,3.648,732,4.709,774,6.898,775,6.253,776,6.898,777,6.898,778,6.898,779,6.898,780,6.898,781,6.898,782,6.898,783,6.253]],["t/130",[18,0.496,29,0.425,39,0.408,45,0.2,56,0.633,62,0.408,63,0.286,73,0.082,74,0.567,84,0.937,108,0.154,109,1.371,120,0.505,150,0.496,151,0.471,152,0.341,157,0.587,162,0.169,167,0.513,177,0.691,199,0.281,201,0.78,232,2.408,240,0.473,245,0.35,255,1.228,261,0.341,263,0.286,273,0.714,327,0.471,395,0.752,418,1.228,420,0.219,423,0.868,429,0.78,430,0.381,450,0.408,451,0.425,475,0.686,482,0.563,549,0.254,551,0.232,598,0.281,602,0.566,603,0.313,615,2.049,641,0.471,660,0.728,664,0.852,667,0.471,668,0.852,669,0.471,673,0.35,683,0.471,740,0.686,746,1.014,767,0.286,775,0.505,784,1.045,785,1.337,786,0.558,787,9.198,788,9.101,789,0.558,790,0.558,791,0.558,792,0.558,793,0.558,794,0.558,795,0.558,796,0.558,797,1.066,798,0.558,799,0.558,800,0.558,801,0.558,802,0.558,803,0.558,804,0.558,805,0.558,806,0.558,807,0.558,808,0.471,809,0.558,810,0.558,811,0.966,812,0.558,813,0.752,814,0.558,815,0.752,816,0.558,817,0.558,818,0.558,819,1.066,820,0.558,821,0.558,822,0.558,823,0.558,824,0.558,825,2.17,826,1.916,827,0.558,828,0.558,829,0.558,830,0.558,831,0.558,832,0.558,833,0.505,834,0.558,835,0.558,836,0.558,837,0.558,838,0.558,839,0.558,840,0.558,841,0.558,842,0.558,843,0.558,844,0.558,845,0.558,846,0.558,847,0.558,848,0.558,849,0.558,850,0.558,851,0.558,852,0.558,853,0.558,854,0.558,855,0.558,856,0.558,857,0.558,858,0.558,859,0.558,860,0.558,861,0.558,862,0.558,863,0.558,864,1.531,865,1.066,866,0.558,867,0.558,868,3.661,869,0.558,870,0.558,871,0.558,872,1.531,873,0.558,874,0.558,875,0.558,876,0.558,877,0.558,878,0.558,879,0.558,880,0.558,881,0.558,882,0.471,883,0.558,884,0.558,885,0.425,886,0.558,887,0.558,888,0.558,889,0.558,890,0.558,891,0.558,892,1.531,893,0.558,894,0.558,895,0.558,896,0.558,897,0.558,898,0.558,899,0.558,900,0.558,901,0.558,902,1.721,903,0.558,904,0.471,905,1.066,906,0.558,907,0.446,908,1.958,909,1.066,910,0.558,911,0.558,912,1.066,913,0.558,914,0.558,915,1.066,916,0.558,917,0.425,918,1.066,919,0.558,920,0.558,921,1.066,922,0.558,923,0.558,924,1.066,925,0.558,926,0.558,927,1.066,928,0.558,929,0.505,930,1.066,931,0.558,932,0.558,933,1.066,934,0.558,935,0.558,936,1.066,937,0.558,938,0.558,939,1.066,940,0.558,941,0.558,942,1.066,943,0.558,944,0.505,945,1.066,946,0.558,947,0.558,948,1.066,949,0.558,950,0.505,951,1.066,952,0.558,953,0.558,954,0.966,955,0.558,956,0.558,957,1.066,958,0.558,959,0.558,960,1.066,961,1.066,962,0.558,963,0.558,964,1.066,965,1.066,966,0.558,967,0.558,968,1.066,969,0.558,970,0.558,971,1.066,972,0.558,973,0.558,974,1.066,975,0.558,976,0.558,977,1.066,978,1.066,979,0.558,980,1.066,981,0.558,982,0.558,983,3.368,984,0.558,985,0.505,986,0.78,987,0.558,988,0.558,989,0.812,990,0.558,991,0.558,992,1.066,993,0.558,994,0.393,995,1.066,996,0.558,997,0.558,998,1.066,999,0.558,1000,0.558,1001,1.066,1002,0.558,1003,0.505,1004,1.066,1005,0.558,1006,0.558,1007,1.066,1008,0.558,1009,0.558,1010,1.066,1011,0.558,1012,0.558,1013,1.066,1014,1.066,1015,0.558,1016,0.558,1017,1.066,1018,0.558,1019,0.558,1020,1.066,1021,0.558,1022,0.558,1023,1.066,1024,1.066,1025,0.558,1026,0.558,1027,1.066,1028,0.558,1029,0.558,1030,0.558,1031,0.558,1032,0.558,1033,0.558,1034,0.558,1035,0.558,1036,0.558,1037,0.558,1038,0.558,1039,0.558,1040,0.558,1041,0.558,1042,0.558,1043,0.558,1044,0.558,1045,0.558,1046,0.558,1047,0.558,1048,0.558,1049,0.558,1050,0.558,1051,0.558,1052,0.558,1053,0.558,1054,0.558,1055,0.558,1056,0.558,1057,0.558,1058,0.558,1059,0.558,1060,0.558,1061,0.558,1062,0.558,1063,0.558,1064,0.558,1065,0.558,1066,0.558,1067,0.558,1068,0.558,1069,0.558,1070,0.558,1071,0.558,1072,0.558,1073,0.558,1074,0.558,1075,0.558,1076,0.558,1077,0.558,1078,0.558,1079,0.558,1080,0.558,1081,0.558,1082,0.558,1083,0.558,1084,0.558,1085,0.558,1086,0.558,1087,0.558,1088,0.558,1089,0.558,1090,0.558,1091,0.558,1092,0.558,1093,0.558,1094,0.558,1095,0.558,1096,0.558,1097,0.558,1098,0.558,1099,0.558,1100,0.558,1101,0.558,1102,0.558,1103,0.558,1104,0.558,1105,0.558,1106,0.558,1107,0.558,1108,0.558,1109,0.78,1110,0.558,1111,0.752,1112,0.752,1113,0.558,1114,0.558,1115,0.558,1116,0.558,1117,0.558,1118,0.505,1119,0.446,1120,0.558,1121,0.558,1122,0.558,1123,0.558,1124,0.505,1125,0.558,1126,2.776,1127,1.066,1128,0.558,1129,0.446,1130,0.558,1131,1.066,1132,0.558,1133,0.558,1134,0.446,1135,0.558,1136,0.333,1137,0.558,1138,0.558,1139,1.066,1140,0.558,1141,0.558,1142,0.425,1143,0.558,1144,0.558,1145,0.966,1146,0.558,1147,0.471,1148,0.558,1149,0.558,1150,0.558,1151,0.812,1152,0.558,1153,0.505,1154,0.558,1155,0.558,1156,0.505,1157,0.558,1158,0.558,1159,0.471,1160,0.558,1161,0.558,1162,0.966,1163,0.558,1164,0.558,1165,0.901,1166,0.558,1167,2.155,1168,0.558,1169,0.558,1170,2.113,1171,0.446,1172,0.558,1173,0.558,1174,0.558,1175,0.558,1176,0.393,1177,0.558,1178,0.558,1179,0.558,1180,0.558,1181,0.558,1182,0.637,1183,0.558,1184,3.09,1185,0.505,1186,0.852,1187,0.381,1188,3.053,1189,0.558,1190,0.558,1191,0.558,1192,0.558,1193,0.558,1194,0.471,1195,0.558,1196,0.558,1197,0.558,1198,0.505,1199,0.558,1200,0.812,1201,0.558,1202,0.558,1203,0.558,1204,0.558,1205,0.558,1206,0.558,1207,0.505,1208,0.558,1209,0.812,1210,0.558,1211,0.505,1212,0.558,1213,0.471,1214,0.558,1215,0.558,1216,0.558,1217,0.558,1218,0.558,1219,0.505,1220,0.558,1221,0.558,1222,0.558,1223,0.558,1224,0.558,1225,0.558,1226,0.558,1227,0.558,1228,1.08,1229,0.558,1230,1.294,1231,0.558,1232,0.408,1233,0.558,1234,0.505,1235,0.558,1236,0.425,1237,0.558,1238,1.066,1239,0.558,1240,0.558,1241,0.558,1242,0.558,1243,0.558,1244,1.066,1245,0.558,1246,0.558,1247,0.558,1248,0.558,1249,0.558,1250,0.558,1251,0.558,1252,0.558,1253,0.558,1254,0.471,1255,0.558,1256,0.505,1257,0.706,1258,0.558,1259,0.558,1260,0.558,1261,1.066,1262,0.558,1263,0.558,1264,0.558,1265,0.558,1266,0.558,1267,0.558,1268,0.558,1269,0.471,1270,0.558,1271,2.352,1272,2.352,1273,0.558,1274,0.446,1275,0.558,1276,0.558,1277,0.558,1278,0.471,1279,0.558,1280,0.558,1281,1.066,1282,0.558,1283,0.558,1284,0.558,1285,0.558,1286,0.558,1287,0.408,1288,0.558,1289,0.558,1290,0.471,1291,0.558,1292,0.408,1293,0.558,1294,0.558,1295,0.558,1296,0.558,1297,0.558,1298,0.471,1299,0.558,1300,0.558,1301,0.558,1302,0.558,1303,0.505,1304,0.505,1305,0.558,1306,0.558,1307,0.558,1308,0.558,1309,0.558,1310,0.558,1311,0.381,1312,0.558,1313,0.505,1314,0.446]],["t/133",[3,1.013,7,2.352,52,1.938,71,0.701,74,0.511,96,4.253,128,2.971,150,2.311,162,1.13,165,5.359,177,2.521,198,2.157,200,2.835,509,3.294,763,4.382,1315,3.603]],["t/135",[3,0.256,7,1.279,8,0.772,15,0.824,16,0.744,18,1.016,19,2.214,20,0.537,27,0.744,30,0.559,32,0.824,38,1.132,45,1.159,48,1.673,49,0.845,50,0.151,51,1.105,52,1.531,56,1.518,59,1.58,61,1.108,62,1.843,73,0.264,74,0.341,75,0.628,76,1.889,77,0.527,79,0.548,83,0.484,86,2.128,88,1.005,96,0.463,97,0.619,99,0.619,102,0.744,108,1.774,109,2.101,113,0.884,114,0.612,115,2.207,116,0.81,117,0.666,119,0.666,121,0.884,137,2.109,140,1.355,142,1.132,144,0.958,148,0.678,150,1.192,155,0.537,156,0.492,159,0.714,165,0.583,167,1.512,169,0.537,177,1.108,191,1.213,198,0.555,200,1.462,203,0.779,207,1.376,211,0.492,213,1.532,215,1.105,219,0.583,236,3.681,237,0.416,238,0.628,240,0.97,241,0.744,246,0.688,247,0.628,248,1.376,250,0.754,251,3.228,252,2.53,255,1.132,264,0.666,267,1.413,268,2.695,273,1.951,277,1.322,281,0.881,282,0.341,298,0.559,301,2.439,313,0.416,318,1.541,323,0.744,333,1.013,384,0.509,395,3.241,396,0.824,398,0.571,399,0.779,402,1.442,405,1.162,407,0.779,415,1.525,418,0.612,423,1.116,454,0.824,463,0.258,466,0.958,469,1.386,470,1.777,472,0.646,475,0.628,480,0.646,482,0.359,487,0.45,509,0.833,524,0.824,545,1.637,549,0.821,563,1.105,602,0.518,603,1.013,615,1.231,641,0.824,642,3.174,646,1.442,648,0.492,652,0.484,658,1.056,659,1.506,663,0.779,671,0.824,682,1.376,699,0.518,716,0.884,732,0.666,745,0.824,746,2.079,748,0.884,750,0.824,751,0.744,753,0.884,762,0.824,763,0.883,944,0.884,986,0.714,1111,1.777,1124,1.636,1126,0.646,1136,0.583,1142,2.392,1156,1.636,1167,2.598,1182,1.506,1184,2.293,1207,0.884,1209,0.744,1211,0.884,1213,1.525,1254,0.824,1287,0.714,1290,0.824,1316,2.845,1317,1.805,1318,1.805,1319,1.805,1320,1.805,1321,0.975,1322,0.779,1323,0.975,1324,0.975,1325,3.112,1326,0.975,1327,2.214,1328,0.975,1329,2.518,1330,4.593,1331,0.975,1332,3.138,1333,0.975,1334,1.442,1335,0.975,1336,0.975,1337,0.666,1338,2.439,1339,0.975,1340,0.975,1341,0.975,1342,0.975,1343,1.525,1344,0.666,1345,0.975,1346,0.975,1347,1.636,1348,1.376,1349,0.975,1350,0.975,1351,0.884,1352,0.975,1353,0.824,1354,0.975,1355,0.975,1356,0.975,1357,0.824,1358,0.975,1359,0.975,1360,0.884,1361,1.442,1362,1.056,1363,0.975,1364,1.442,1365,0.884,1366,0.975,1367,0.975,1368,0.779,1369,0.975,1370,3.241,1371,3.047,1372,0.824,1373,0.975,1374,0.975,1375,1.805,1376,0.884,1377,0.884,1378,1.805,1379,2.283,1380,0.779,1381,1.805,1382,2.845,1383,2.518,1384,2.128,1385,1.636,1386,2.283,1387,2.518,1388,0.975,1389,0.975,1390,0.628,1391,0.537,1392,1.525,1393,0.975,1394,1.668,1395,0.401,1396,0.975,1397,0.666,1398,0.824,1399,0.975,1400,0.824,1401,1.805,1402,0.824,1403,0.975,1404,1.636,1405,1.805,1406,1.805,1407,1.442,1408,2.283,1409,2.283,1410,1.92,1411,0.884,1412,0.884,1413,1.525,1414,0.975,1415,1.805,1416,1.805,1417,0.975,1418,1.805,1419,0.975,1420,0.975,1421,0.975,1422,1.636,1423,0.666,1424,2.598,1425,0.975,1426,0.884,1427,0.628,1428,0.884,1429,0.975,1430,0.975,1431,1.805,1432,0.688,1433,0.975,1434,0.714,1435,0.824,1436,0.975,1437,0.744,1438,1.636,1439,0.975,1440,0.975,1441,0.975,1442,0.824,1443,0.824,1444,0.779,1445,1.273,1446,0.884,1447,1.636,1448,1.636,1449,0.884,1450,0.824,1451,0.884,1452,1.805,1453,0.884,1454,1.805,1455,1.805,1456,0.975,1457,0.975,1458,0.824,1459,0.975,1460,1.805,1461,0.975,1462,0.975,1463,0.646,1464,0.975,1465,0.884,1466,0.975,1467,0.427,1468,0.975,1469,0.884,1470,0.666,1471,1.195,1472,0.884,1473,0.744,1474,2.296,1475,0.824,1476,1.92,1477,0.884,1478,1.525,1479,0.714,1480,0.646,1481,0.884,1482,1.442,1483,0.975,1484,0.975,1485,0.975,1486,0.975]],["t/137",[3,1.013,49,1.07,50,1.104,71,0.701,73,1.433,74,0.446,88,1.348,96,3.389,97,2.448,105,1.192,129,2.039,162,1.13,165,4.27,177,2.521,277,3.007,763,3.492,1337,6.685,1487,7.14,1488,7.14,1489,7.14,1490,7.14]],["t/139",[3,0.938,7,1.589,71,0.65,74,0.548,77,3.576,114,4.152,115,2.361,141,5.287,162,1.047,252,2.268,1316,8.568,1426,5.999,1427,6.431,1463,4.383,1491,8.537,1492,8.537,1493,5.999,1494,8.537,1495,5.999]],["t/141",[8,1.602,45,1.22,52,1.767,81,4.085,99,2.232,153,4.765,161,5.502,237,2.777,238,4.194,487,3.898,636,5.203,637,5.502,717,5.069,1361,5.203,1391,3.585,1479,4.765,1496,6.511,1497,5.903,1498,5.203,1499,6.511,1500,7.139,1501,4.964,1502,6.511,1503,5.903,1504,5.903,1505,5.903,1506,5.203,1507,6.511,1508,4.594,1509,4.313,1510,6.511,1511,6.511,1512,5.903]],["t/143",[74,0.514,785,5.502,1397,5.502,1513,7.307,1514,8.06,1515,8.06,1516,8.06,1517,8.06,1518,8.06,1519,8.06,1520,8.06]],["t/145",[8,1.788,74,0.514,240,2.801,313,4.21,487,3.353,717,3.928,1410,5.54,1521,8.214,1522,6.141,1523,5.128,1524,8.214,1525,5.128,1526,7.268,1527,9.06,1528,7.268]],["t/147",[45,0.815,48,2.149,52,1.181,102,4.872,118,2.664,131,2.128,133,2.546,138,2.352,150,2.069,200,1.728,222,3.071,248,4.872,328,3.945,348,2.31,391,3.945,393,3.945,482,2.351,648,2.196,652,2.161,717,4.093,1337,2.971,1344,2.971,1361,6.669,1397,5.171,1497,3.945,1500,5.4,1512,3.945,1529,4.352,1530,3.945,1531,4.352,1532,4.352,1533,4.352,1534,4.352,1535,4.352,1536,4.352,1537,5.794,1538,6.391,1539,6.391,1540,6.391,1541,4.352,1542,6.391,1543,4.352,1544,4.352,1545,4.509,1546,5.107,1547,4.352,1548,4.352,1549,2.803,1550,3.477,1551,3.317,1552,4.352,1553,5.774,1554,6.391,1555,4.352,1556,6.391,1557,4.352,1558,6.391,1559,4.352,1560,6.391,1561,6.391,1562,4.352,1563,6.391,1564,4.352,1565,4.352,1566,4.352,1567,4.352,1568,4.352,1569,4.352,1570,4.352,1571,4.352,1572,3.945]],["t/149",[45,1.727,52,1.473,74,0.519,97,1.86,99,1.86,100,4.585,102,4.136,108,1.498,127,2.49,170,3.97,229,2.88,235,2.039,240,1.677,420,2.13,424,2.932,487,2.503,650,4.953,717,4.984,1182,3.245,1361,4.335,1380,4.335,1479,6.261,1508,3.828,1509,3.594,1522,4.585,1525,6.037,1573,4.919,1574,6.779,1575,5.426,1576,5.426,1577,5.426,1578,4.335,1579,5.426,1580,5.426,1581,5.426,1582,5.426,1583,5.426,1584,5.426,1585,4.919,1586,5.426,1587,5.426,1588,5.426]],["t/151",[52,2.104,68,4.746,108,2.14,127,2.581,150,2.509,652,3.85,717,5.095,1343,6.551,1397,5.293,1509,5.135,1513,7.028,1525,5.47,1574,7.028,1589,7.752,1590,5.673,1591,7.752]],["t/153",[49,0.808,52,1.463,74,0.538,108,2.354,191,4.807,240,1.666,281,1.513,420,2.116,424,2.913,569,3.387,717,2.913,986,3.944,1509,6.392,1521,4.886,1525,6.016,1551,4.109,1585,4.886,1592,5.39,1593,7.73,1594,7.444,1595,5.39,1596,5.39,1597,5.39,1598,5.39,1599,7.444,1600,7.444,1601,7.444,1602,6.748,1603,5.39,1604,5.39,1605,5.39,1606,5.39]],["t/155",[45,1.48,49,1.184,59,5.984,74,0.393,108,2.182,150,2.558,160,3.069,165,4.727,223,3.925,288,6.315,1524,8.647,1607,7.903,1608,7.903]],["t/157",[8,2.044,56,2.236,61,3.47,784,5.671,1470,5.671,1473,6.332,1546,6.637,1609,8.307,1610,8.307]],["t/159",[7,1.269,8,1.3,50,1.135,73,0.773,74,0.516,162,0.836,200,2.099,252,1.812,313,2.254,414,3.729,467,6.205,530,5.867,1322,4.223,1395,4.386,1611,5.285,1612,5.285,1613,7.925,1614,5.285,1615,5.285,1616,8.381,1617,5.285,1618,5.285,1619,7.343,1620,5.285,1621,5.285,1622,5.285,1623,5.285,1624,5.285,1625,5.285,1626,4.466,1627,5.285,1628,5.285,1629,5.285,1630,5.285,1631,5.285,1632,5.285]],["t/162",[7,1.856,8,1.4,47,2.051,49,0.853,71,0.862,74,0.557,125,1.825,126,3.103,127,1.895,128,2.368,129,1.626,131,2.783,132,3.404,138,3.076,398,3.329,472,3.77,515,4.165,530,4.548,763,2.783,784,3.885,1395,3.177,1613,6.174,1616,6.529,1633,4.548,1634,4.339,1635,5.691,1636,5.691,1637,5.691,1638,5.691,1639,5.691,1640,5.691,1641,5.16,1642,4.548,1643,5.691]],["t/164",[7,1.92,8,1.472,18,1.937,47,2.157,49,0.897,71,0.785,74,0.555,125,1.919,126,3.21,127,1.993,128,2.49,132,3.579,250,1.92,398,3.501,472,3.964,515,4.379,530,4.782,717,3.234,763,2.927,784,4.086,1395,2.461,1613,6.386,1634,4.562,1641,5.425,1642,6.386,1644,5.984,1645,5.984,1646,5.984,1647,5.984,1648,5.984]],["t/166",[47,2.31,49,0.96,50,0.991,71,0.821,73,0.938,74,0.554,125,2.055,126,3.359,127,2.134,130,3.671,131,3.134,281,1.799,398,3.749,472,4.245,515,4.69,784,4.375,1395,3.438,1613,5.121,1616,5.415,1634,4.886,1649,6.409,1650,6.409,1651,6.409,1652,6.409,1653,5.415,1654,5.81]],["t/168",[7,1.629,47,2.444,49,1.016,50,1.048,71,0.852,73,0.993,74,0.545,125,2.175,126,3.484,127,2.259,128,2.823,130,3.885,131,3.317,398,3.968,472,4.493,515,4.963,784,4.631,1634,5.171,1653,5.732,1654,6.149,1655,6.149,1656,6.783,1657,6.149]],["t/170",[7,1.448,47,2.173,49,1.203,50,0.932,71,0.789,73,0.882,74,0.558,125,1.933,126,3.226,127,2.008,128,2.509,251,2.637,281,1.693,398,3.527,472,3.993,515,4.412,549,2.744,569,4.11,784,4.116,1634,4.596,1653,5.094,1655,5.465,1657,5.465,1658,6.029,1659,6.029,1660,6.029,1661,6.029,1662,6.029,1663,6.029]],["t/172",[8,1.854,18,2.44,61,2.662,76,3.866,97,2.584,213,2.773,250,1.81,282,2.635,487,3.477,630,8.401,648,3.803,907,6.022,1112,6.538,1171,7.404,1664,6.022,1665,6.022,1666,6.022]],["t/174",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/176",[6,2.092,7,1.104,8,1.637,13,2.092,45,0.861,47,1.657,49,1.283,50,0.711,73,0.673,74,0.557,88,0.868,97,1.576,105,0.768,115,2.373,125,1.474,127,2.215,160,1.785,181,4.304,198,1.465,242,3.505,250,1.104,251,2.011,252,1.576,447,5.336,487,2.121,509,3.606,564,2.121,598,4.323,1109,3.364,1467,2.011,1664,3.674,1667,2.151,1668,4.598,1669,6.652,1670,4.072,1671,7.086,1672,7.817,1673,2.581,1674,3.885,1675,4.598,1676,4.598,1677,4.598,1678,3.885,1679,4.598,1680,3.885,1681,4.598]],["t/178",[43,2.201,45,0.657,49,0.996,50,0.542,52,2.504,74,0.555,88,1.528,99,1.862,105,0.586,109,1.77,115,1.937,119,2.394,144,1.862,177,3.023,198,1.464,213,1.998,222,2.475,229,1.862,235,1.318,237,3.651,240,1.084,250,1.304,251,1.534,252,1.862,273,1.065,281,1.866,282,1.899,283,1.596,482,1.998,509,1.618,545,1.83,598,2.741,627,3.18,628,5.616,629,5.31,631,2.964,648,1.77,668,2.803,907,2.803,1109,3.974,1112,2.475,1136,2.098,1165,2.964,1171,5.979,1395,1.442,1423,3.708,1664,5.979,1670,3.325,1674,6.323,1678,2.964,1680,2.964,1682,3.507,1683,2.964,1684,3.18,1685,3.18,1686,2.394,1687,3.507,1688,2.964,1689,2.567,1690,3.507,1691,2.656,1692,3.507]],["t/180",[74,0.463,198,1.675,281,2.829,282,2.66,420,2.987,598,3.839,628,6.428,629,6.079,1109,5.567,1664,6.079,1670,4.657,1674,6.428,1678,6.428,1680,6.428,1685,6.897,1693,3.778]],["t/182",[8,1.966,21,4.562,24,6.093,45,1.121,49,0.897,56,1.611,96,2.841,213,3.311,232,4.892,240,1.85,245,6.784,250,2.161,259,5.425,545,3.122,615,2.927,767,3.07,1287,5.848,1473,4.562,1546,4.782,1665,4.782,1683,5.057,1691,2.927,1694,5.984,1695,4.562,1696,4.782,1697,5.057,1698,5.984,1699,5.057,1700,4.223,1701,7.992,1702,5.984]],["t/184",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/186",[6,2.104,7,1.111,8,1.643,13,2.104,45,0.866,47,1.666,49,1.287,50,1.328,52,1.255,73,0.677,74,0.549,88,0.873,97,2.29,105,1.434,115,2.383,125,1.483,127,2.224,129,1.321,160,1.795,198,1.471,250,1.111,252,1.585,263,3.426,267,2.596,270,3.525,282,1.617,424,2.499,482,1.701,564,3.082,1182,4.69,1467,2.022,1667,2.164,1673,2.596,1703,4.624,1704,4.624,1705,6.68,1706,4.624,1707,3.384,1708,3.157,1709,3.525,1710,3.907,1711,4.624,1712,4.624,1713,4.624,1714,4.624,1715,4.624,1716,4.624,1717,2.901,1718,3.907,1719,4.624,1720,4.624,1721,4.624]],["t/188",[18,0.911,28,1.922,45,0.855,48,0.947,49,0.862,50,0.705,52,2.565,61,0.994,74,0.557,83,1.398,88,1.249,97,1.564,99,0.965,105,0.762,108,0.777,109,2.903,115,1.628,140,1.036,144,1.494,150,1.862,160,1.093,164,3.339,177,2.567,198,1.457,213,2.117,223,1.398,235,1.058,236,1.613,237,1.946,240,0.87,245,5.142,250,1.746,251,1.996,252,1.972,254,1.377,263,3.729,267,2.561,273,1.747,276,2.34,281,1.281,282,2.011,283,1.281,387,1.216,450,2.06,482,2.434,545,1.469,740,1.813,763,1.377,764,2.146,767,1.444,1182,1.684,1184,1.55,1327,3.219,1344,1.922,1362,3.365,1427,1.813,1467,1.231,1665,2.25,1686,1.922,1691,3.555,1696,2.25,1708,1.922,1709,3.478,1710,2.379,1717,1.766,1718,2.379,1722,2.552,1723,4.136,1724,2.552,1725,2.815,1726,2.146,1727,2.146,1728,1.58,1729,2.146,1730,2.379,1731,2.552,1732,2.815,1733,2.815,1734,2.552,1735,2.815,1736,2.552,1737,2.146,1738,2.552,1739,2.552,1740,2.552,1741,2.379]],["t/190",[49,0.991,50,1.023,74,0.514,88,1.249,105,1.105,150,2.142,198,1.457,245,4.152,251,3.734,263,3.394,276,3.394,281,2.654,282,2.314,387,2.857,420,2.598,1184,3.643,1693,3.287,1708,4.518,1709,5.045,1710,5.592,1717,4.152,1718,5.592,1723,5.999,1728,3.715,1731,5.999,1738,5.999,1740,5.999,1741,5.592]],["t/192",[8,1.963,45,1.495,213,2.936,246,7.259,250,1.917,273,2.423,746,5.286,1126,5.286,1742,6.744,1743,7.981,1744,7.981,1745,6.744]],["t/194",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/196",[6,2.608,7,1.377,8,1.91,13,2.608,45,1.074,47,2.066,49,0.859,50,0.886,52,1.556,74,0.548,97,1.965,105,0.957,125,1.838,127,2.585,140,2.109,149,3.156,160,2.225,198,1.71,250,1.865,252,1.965,282,2.004,283,2.608,387,3.352,564,3.582,1397,5.3,1467,2.507,1667,2.682,1673,3.217,1696,4.58,1746,5.731,1747,5.731,1748,7.763,1749,7.763,1750,5.731]],["t/198",[49,0.877,50,0.905,52,2.138,74,0.553,99,2.007,105,0.978,115,2.089,141,4.679,177,2.781,198,1.96,235,2.2,237,3.359,240,1.81,246,4.131,250,1.892,252,2.007,276,3.003,277,2.466,281,1.644,282,2.754,283,2.665,387,3.401,1397,5.377,1751,5.855,1752,6.655,1753,5.308,1754,5.308,1755,5.308,1756,3.502]],["t/200",[74,0.492,198,1.848,281,2.356,282,2.934,420,3.295,1397,5.729,1693,4.168,1752,7.092]],["t/202",[74,0.553,246,5.418,276,3.939,387,4.048,785,5.243,1397,5.243,1752,6.489,1753,6.962,1754,6.962,1755,6.962,1756,4.593]],["t/204",[8,2.023,45,1.54,177,2.904,236,4.71,250,1.975,418,5.159,1186,6.57,1232,6.017,1523,5.802,1757,6.948,1758,6.948]],["t/206",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/208",[3,0.951,6,2.116,7,1.117,8,1.65,13,2.116,26,3.716,45,1.474,47,1.676,49,0.697,52,1.262,56,1.252,74,0.508,88,0.878,97,1.594,99,1.594,108,1.851,109,3.385,125,1.491,127,2.233,133,2.72,136,4.32,160,1.806,198,1.477,213,1.711,232,2.847,240,1.438,250,1.117,252,1.594,273,1.412,418,5.403,564,3.095,615,2.274,652,2.31,659,2.781,673,4.208,1126,4.442,1170,2.918,1236,3.545,1467,2.034,1667,2.176,1673,2.61,1757,5.668,1759,4.65,1760,6.707,1761,6.707,1762,5.668,1763,4.65,1764,4.65,1765,3.93,1766,5.668,1767,3.545,1768,4.216,1769,3.545,1770,3.403,1771,4.216,1772,4.216,1773,3.716,1774,4.216,1775,4.65]],["t/210",[45,1.374,48,2.638,49,0.693,50,0.443,52,2.332,56,2.389,74,0.555,77,1.548,83,1.423,88,1.385,99,1.586,105,0.478,108,1.277,109,2.938,115,2.077,144,1.521,150,0.927,177,3.034,198,1.282,213,2.699,220,3.698,232,1.754,235,1.077,237,3.52,240,0.886,245,1.798,250,1.111,251,1.253,252,1.996,273,2.03,274,3.159,275,1.713,276,1.47,277,1.207,281,1.299,282,1.618,283,1.304,418,4.193,652,1.423,673,1.798,732,3.159,1170,4.193,1171,3.698,1176,2.022,1232,3.386,1236,2.184,1338,3.856,1545,2.022,1667,1.341,1686,3.974,1757,2.421,1762,4.919,1765,3.91,1766,3.91,1768,2.597,1769,2.184,1770,2.097,1771,2.597,1772,2.597,1773,2.289,1774,2.597,1776,4.195,1777,6.684,1778,2.865,1779,4.195,1780,2.865,1781,2.421,1782,4.195,1783,2.865]],["t/212",[74,0.542,198,1.532,251,3.043,274,4.749,276,3.568,281,2.475,282,2.432,420,2.732,1693,3.455,1741,5.879,1762,5.879,1765,5.879,1766,5.879,1776,6.307,1779,6.307,1782,6.307,1784,6.957,1785,6.307,1786,6.957,1787,6.957,1788,6.957,1789,6.957]],["t/214",[3,0.667,8,1.157,28,3.211,45,1.267,48,1.581,49,0.705,52,1.277,56,2.131,68,4.14,73,0.688,88,0.888,97,1.613,108,2.186,125,1.509,137,3.874,144,2.497,177,1.661,198,1.489,237,2.006,238,3.03,250,2.079,263,2.413,313,2.006,318,2.88,423,2.084,430,3.211,451,3.586,487,2.17,509,2.17,602,4.595,652,2.336,673,2.951,763,2.3,1119,3.759,1136,2.813,1186,3.759,1254,3.975,1362,3.956,1432,3.319,1523,3.319,1590,3.442,1666,3.759,1684,4.264,1728,2.641,1790,6.988,1791,4.704,1792,6.517,1793,4.264,1794,4.264,1795,4.704,1796,4.704,1797,3.319,1798,4.704,1799,3.442,1800,4.949,1801,5.404,1802,3.442]],["t/216",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/218",[6,2.554,7,1.348,8,1.883,13,2.554,45,1.051,47,2.023,50,0.868,52,1.524,73,0.821,74,0.531,88,1.059,97,1.924,105,0.937,108,1.549,125,1.8,127,2.549,160,2.179,198,1.686,250,1.348,263,2.879,387,2.424,564,3.531,652,2.788,1467,2.455,1667,2.626,1673,3.151,1717,3.521,1773,4.485,1790,4.107,1792,3.718,1800,4.107,1803,5.613,1804,5.613,1805,4.743,1806,4.929,1807,5.088,1808,4.279,1809,4.485,1810,4.107,1811,3.96,1812,4.279,1813,6.467,1814,4.279]],["t/220",[18,0.791,45,0.976,48,2.591,49,0.609,50,0.628,52,2.508,56,1.093,59,3.27,71,0.24,73,0.358,74,0.558,88,1.581,96,2.474,99,0.838,105,0.678,108,1.439,115,1.449,148,0.918,177,3.263,198,1.148,200,0.97,235,0.918,237,1.732,240,0.755,250,1.252,251,1.776,252,2.082,263,3.115,264,1.668,267,1.372,281,0.686,282,1.42,283,1.112,387,1.055,402,1.4,482,1.494,602,4.284,603,1.372,732,1.668,763,1.195,1151,1.863,1187,1.668,1228,1.724,1362,1.429,1467,1.069,1686,3.558,1691,3.296,1717,2.548,1727,1.863,1728,1.372,1729,1.863,1767,1.863,1773,1.952,1790,6.321,1792,5.105,1799,1.788,1800,1.788,1806,3.911,1807,2.215,1808,1.863,1809,1.952,1810,1.788,1811,1.724,1812,1.863,1813,6.145,1814,3.096,1815,2.443,1816,2.065,1817,2.065,1818,2.065,1819,2.215,1820,2.215,1821,2.065,1822,2.972,1823,2.215,1824,2.215,1825,2.215,1826,2.065,1827,1.952,1828,2.215,1829,2.215,1830,2.215,1831,2.065,1832,2.065,1833,1.668,1834,2.443,1835,2.616]],["t/222",[74,0.516,198,1.615,263,3.761,273,2.227,387,3.167,420,2.879,1394,4.857,1400,6.197,1693,3.642,1717,4.601,1800,5.366,1806,4.723,1808,5.59,1809,5.859,1810,5.366,1811,5.174,1812,5.59,1813,6.197,1836,6.648,1837,7.333]],["t/224",[74,0.525,785,5.789,1184,4.669,1790,6.205,1792,5.617,1836,7.687]],["t/226",[45,1.51,74,0.514,125,2.585,1728,6.146,1805,6.81,1838,6.81,1839,6.81]],["t/228",[2,2.608,8,0.94,18,2.269,24,2.912,26,3.053,38,2.397,44,2.696,45,0.716,52,1.037,56,2.614,61,1.349,63,1.96,74,0.288,79,2.145,83,2.88,109,2.926,142,2.397,144,3.72,150,1.877,156,1.928,160,1.483,167,2.793,170,2.796,177,2.475,198,1.277,232,2.339,236,3.321,250,1.683,273,1.16,276,2.974,298,2.188,309,2.912,318,3.55,349,2.696,387,1.65,402,4.014,423,4.077,430,2.608,451,2.912,480,4.642,659,2.285,787,3.463,826,2.696,1111,2.696,1134,7.076,1145,3.463,1236,2.912,1376,3.463,1379,3.463,1382,3.463,1392,3.228,1402,3.228,1437,2.912,1444,3.053,1498,3.053,1590,4.243,1727,2.912,1758,3.228,1840,3.82,1841,7.008,1842,3.82,1843,3.82,1844,3.82,1845,3.82,1846,3.82,1847,3.228,1848,3.82,1849,3.228,1850,3.228,1851,3.82,1852,3.82,1853,3.82,1854,3.82,1855,3.82,1856,3.82,1857,3.463,1858,3.82,1859,3.82,1860,3.82,1861,3.82,1862,3.82,1863,3.228]],["t/230",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/232",[6,3.061,7,1.616,8,2.123,13,3.061,45,1.26,47,2.424,52,1.826,73,0.984,74,0.538,97,2.306,125,2.157,127,2.873,160,2.612,198,1.9,250,1.616,564,3.981,1467,2.942,1667,3.148,1673,3.776,1864,6.727,1865,6.727,1866,6.727,1867,5.684]],["t/234",[18,1.455,49,1.27,50,1.193,52,2.301,56,2.677,73,1.13,74,0.538,99,2.646,105,1.289,109,3.303,115,1.604,119,3.069,150,1.455,177,2.994,198,1.7,235,1.69,237,2.791,240,1.39,250,1.572,252,2.646,273,1.365,281,1.262,282,2.288,283,2.046,387,1.941,423,3.756,460,3.799,732,4.468,1134,6.773,1390,2.896,1402,6.522,1590,3.29,1863,5.531,1867,3.799,1868,5.934,1869,4.496]],["t/236",[49,1.35,50,1.393,73,1.054,74,0.546,105,1.504,198,1.586,252,3.089,420,2.828,1693,3.578,1863,6.087,1867,6.087,1868,6.53,1870,7.203,1871,6.53,1872,6.53]],["t/238",[74,0.538,387,3.587,423,3.68,785,5.671,1134,6.637,1871,7.53,1873,8.307]],["t/240",[8,2.023,48,2.764,200,3.265,250,2.346,602,5.185,652,4.084,1874,8.805]],["t/242",[49,1.162,71,0.926,74,0.469,88,1.78,198,1.707,250,1.862,1315,3.912,1368,6.194,1395,3.188,1471,5.135,1545,5.47,1875,7.752,1876,6.551,1877,7.752]],["t/244",[6,1.959,7,1.034,8,1.56,13,1.959,45,1.188,47,1.552,48,2.132,49,0.95,50,0.98,62,3.151,73,0.928,74,0.541,83,3.149,88,1.197,96,3.573,105,1.059,108,1.189,125,1.381,127,2.112,129,1.23,133,3.71,152,2.636,160,1.672,175,3.903,198,0.948,200,1.71,207,3.282,242,3.282,250,1.034,281,1.209,384,2.246,462,2.701,466,2.285,482,3.257,487,1.987,542,3.903,564,1.987,602,3.366,648,2.173,763,2.106,1368,5.067,1437,4.834,1467,1.883,1471,4.2,1667,2.015,1756,2.575,1770,3.151,1874,6.361,1876,5.358,1878,4.306,1879,5.358,1880,3.903,1881,3.903,1882,3.903,1883,5.749,1884,3.903,1885,3.903,1886,4.306,1887,3.903]],["t/246",[43,2.659,45,0.794,49,0.635,50,0.655,52,2.237,73,0.917,74,0.548,88,1.738,97,2.149,99,2.557,105,0.708,115,1.512,133,2.479,177,2.91,198,1.643,235,1.593,237,2.673,240,1.31,250,1.505,252,1.453,254,2.073,281,1.19,282,2.191,283,1.929,423,1.878,482,3.505,602,4.374,603,2.379,746,4.94,751,3.231,763,2.073,1362,2.479,1368,5.008,1697,3.581,1800,3.102,1874,5.296,1876,3.581,1880,3.842,1881,3.842,1882,6.761,1883,3.842,1888,3.842,1889,3.387,1890,3.581,1891,3.842,1892,4.238,1893,4.238,1894,3.842,1895,3.842,1896,4.238]],["t/248",[74,0.509,198,1.741,281,2.219,282,2.763,420,3.103,482,2.908,1693,3.925,1889,6.315,1890,6.678,1891,7.165,1894,7.165,1895,7.165,1897,7.903]],["t/250",[3,0.895,45,1.182,74,0.459,88,1.191,97,2.163,115,2.251,198,1.39,200,2.505,247,4.063,250,1.515,283,2.871,482,2.321,602,4.903,1348,4.81,1351,5.72,1471,4.179,1500,5.331,1756,3.773,1790,6.057,1800,4.617,1805,5.331,1806,4.063,1808,4.81,1826,5.331,1879,5.331,1884,5.72,1885,5.72,1889,6.613,1890,5.331,1898,5.72,1899,5.72,1900,5.72,1901,6.309,1902,6.309,1903,6.309]],["t/252",[8,2.065,45,1.572,75,5.405,177,2.964,250,2.016,1176,5.922,1434,6.141,1523,5.922,1904,7.608]],["t/254",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/256",[6,2.723,7,1.437,8,1.966,13,2.723,45,1.497,47,2.157,52,1.624,74,0.531,79,3.359,97,2.051,125,1.919,127,2.661,148,2.249,160,2.324,198,1.76,250,1.92,487,2.761,564,3.687,652,2.972,1467,2.617,1667,2.8,1673,3.359,1904,5.425,1905,5.984,1906,7.992,1907,7.992,1908,5.984,1909,5.425,1910,5.984,1911,5.984,1912,5.984,1913,5.425,1914,5.984]],["t/258",[18,2.635,74,0.534,213,2.995,420,3.196,1915,8.14,1916,8.14,1917,8.14,1918,8.14,1919,8.14]],["t/260",[74,0.526,75,5.771,198,2.157,223,4.45,235,2.683,237,3.045,240,2.207,250,1.715,1434,6.557,1670,5.485,1909,8.123,1913,8.123,1920,8.123]],["t/262",[198,2.015]],["t/264",[6,3.528,8,1.907,67,5.47,79,4.352,116,3.481,167,3.735,213,2.852,245,4.864,250,1.862,615,3.791,1136,4.636,1142,5.91,1453,7.028,1506,6.194,1921,7.752,1922,7.752,1923,7.752]],["t/266",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/268",[6,2.421,7,1.278,8,1.815,13,2.421,45,0.996,47,1.917,49,1.105,50,1.14,52,1.444,73,1.08,74,0.545,97,1.823,105,1.232,115,1.898,125,1.706,127,2.456,129,2.107,130,4.225,131,3.607,160,2.065,198,1.625,213,2.714,250,1.278,273,2.24,564,3.403,1142,5.623,1364,4.25,1467,2.326,1667,2.489,1673,2.986,1924,5.319,1925,5.319,1926,6.687,1927,5.319,1928,7.376,1929,5.319,1930,5.319]],["t/270",[45,1.478,48,1.572,49,0.701,50,0.723,52,1.27,56,1.813,74,0.538,76,3.455,99,1.603,105,0.781,115,1.668,177,1.652,198,1.738,235,1.758,237,2.872,240,1.446,245,4.225,250,1.618,252,2.309,254,3.86,255,4.225,281,1.313,282,2.355,283,2.128,301,3.098,337,3.952,1142,6.582,1232,3.422,1362,3.94,1364,7.615,1365,6.106,1506,3.737,1686,3.193,1700,3.3,1737,5.134,1931,4.677,1932,4.677,1933,4.677,1934,6.106,1935,4.677,1936,4.24,1937,4.677,1938,4.677,1939,4.677,1940,3.952,1941,3.737,1942,4.677]],["t/272",[74,0.492,198,1.848,251,3.67,281,2.356,282,2.934,420,3.295,1364,6.706,1693,4.168]],["t/274",[8,1.804,18,2.949,61,2.59,125,2.352,127,2.442,148,2.756,167,3.533,189,4.489,250,1.761,287,4.386,658,4.29,673,4.601,1176,5.174,1391,4.038,1549,4.723,1726,5.59,1847,6.197,1943,6.648,1944,6.648,1945,7.333,1946,6.197,1947,6.648]],["t/276",[71,0.879,763,4.375,1395,3.678]],["t/278",[6,2.258,7,1.192,8,1.728,13,2.258,45,1.316,47,1.788,49,0.743,50,0.767,73,0.726,74,0.524,75,3.196,105,0.829,125,1.591,127,2.339,129,1.417,137,2.842,138,2.682,148,1.865,160,1.927,250,1.192,276,2.545,387,3.522,420,2.759,461,3.965,564,2.29,623,3.038,742,7.91,772,3.631,1176,3.501,1467,2.17,1667,2.322,1943,6.369,1947,4.499,1948,4.962,1949,4.962,1950,4.962,1951,4.962,1952,4.962,1953,4.962,1954,4.962,1955,4.962,1956,4.962,1957,4.672,1958,4.962,1959,4.962,1960,7.026,1961,7.026,1962,4.962,1963,4.962,1964,4.962,1965,4.962,1966,4.962]],["t/280",[49,1.06,50,1.094,52,1.921,74,0.536,99,2.426,105,1.182,115,2.525,177,2.5,198,2.148,235,2.66,237,3.8,240,2.188,250,2.14,252,2.426,281,1.987,282,3.116,283,3.221]],["t/282",[74,0.498,198,1.887,281,2.406,282,2.996,420,3.365,1693,4.256]],["t/284",[8,1.552,28,4.307,30,3.614,45,1.182,52,1.713,56,2.486,97,2.163,189,3.862,245,3.958,250,2.355,283,2.871,402,3.614,487,2.911,549,2.871,551,2.625,598,3.184,652,3.134,717,3.41,1170,3.958,1348,4.81,1458,5.331,1504,5.72,1525,4.452,1814,4.81,1967,8.889,1968,6.309,1969,5.331,1970,6.994,1971,6.309,1972,6.309,1973,6.309,1974,6.309]],["t/286",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/288",[6,3.061,7,1.616,8,2.123,13,3.061,45,1.26,47,2.424,52,1.826,74,0.517,97,2.306,125,2.157,127,2.873,160,2.612,191,3.24,198,1.9,250,1.616,549,3.061,564,3.981,1467,2.942,1667,3.148,1673,3.776,1970,7.291,1975,6.727,1976,6.727,1977,6.727]],["t/290",[3,0.656,49,0.693,50,0.715,52,2.473,61,1.633,74,0.554,88,1.48,99,1.585,105,0.772,107,4.192,108,1.276,115,1.649,122,4.192,148,1.738,177,3.353,191,3.218,198,1.727,201,3.384,213,1.701,220,3.695,232,2.83,235,1.738,237,3.344,240,1.43,245,4.191,250,1.604,252,1.585,273,1.404,281,1.875,282,2.335,283,2.104,549,3.04,740,2.978,1413,3.907,1505,4.192,1709,5.092,1967,7.109,1970,3.907,1978,4.192,1979,7.258,1980,4.192,1981,4.192]],["t/292",[74,0.509,191,3.807,198,1.741,201,5.783,281,2.219,282,2.763,420,3.103,549,3.596,740,5.09,1693,3.925,1709,6.025,1981,7.165,1982,7.903]],["t/294",[8,1.726,48,2.359,60,4.019,74,0.441,83,3.485,108,1.937,115,2.503,148,3.331,177,2.478,189,4.295,191,3.38,196,4.79,219,4.197,236,4.019,250,1.685,318,4.295,348,3.725,428,4.105,549,3.193,746,4.648,1391,3.863,1437,5.349,1469,6.361,1979,5.929,1983,7.017,1984,7.017]],["t/296",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/298",[6,2.537,7,1.339,8,1.874,13,2.537,20,4.778,45,1.626,47,2.009,74,0.501,97,1.911,115,1.989,125,1.788,127,2.537,135,4.079,160,2.164,171,4.363,198,1.678,212,4.249,242,4.249,250,1.339,261,3.412,274,3.806,286,5.053,318,3.412,334,3.933,487,2.572,564,2.572,672,4.079,1338,3.692,1434,4.079,1467,2.438,1667,2.608,1673,3.129,1985,3.933,1986,7.618,1987,7.618,1988,5.053,1989,5.574,1990,4.71,1991,5.053,1992,3.069,1993,5.574,1994,5.053,1995,5.574]],["t/300",[7,1.177,20,2.699,47,1.767,71,0.482,74,0.533,102,3.737,115,1.749,125,1.572,126,2.798,127,1.632,128,2.04,135,3.587,150,1.587,171,3.99,190,6.474,191,3.903,196,4.755,212,3.737,302,3.587,331,2.649,392,3.737,420,2.735,549,3.17,673,4.37,717,2.649,784,3.347,1170,4.37,1551,3.737,1802,3.587,1985,3.459,1990,4.143,1991,8.448,1994,4.444,1996,4.902,1997,4.902,1998,4.444,1999,4.902,2000,6.966,2001,6.315,2002,4.902,2003,5.097,2004,4.902,2005,4.902,2006,4.902,2007,5.886,2008,4.902,2009,4.902,2010,4.902]],["t/302",[7,1.777,47,2.667,71,0.727,74,0.542,125,2.373,126,3.68,127,2.464,128,3.079,171,4.239,331,3.999,1985,5.221,2003,5.415,2011,7.4,2012,7.4,2013,5.913,2014,7.4]],["t/304",[7,1.746,47,2.619,71,0.714,74,0.539,125,2.331,126,3.639,127,2.42,128,3.024,171,4.163,239,6.141,331,3.928,1985,5.128,2003,5.318,2013,5.807,2015,7.268,2016,7.268,2017,7.268,2018,7.268]],["t/306",[7,1.777,47,2.667,71,0.727,74,0.542,125,2.373,126,3.68,127,2.464,128,3.079,171,4.239,331,3.999,1985,5.221,2003,5.415,2013,5.913,2019,7.4,2020,7.4,2021,7.4]],["t/308",[7,1.761,20,4.038,47,2.643,71,0.72,74,0.54,125,2.352,126,3.66,127,2.442,128,3.051,171,4.2,331,3.963,1985,5.174,2003,5.366,2013,5.859,2022,7.333,2023,7.333,2024,7.333]],["t/310",[7,1.481,20,3.395,45,1.155,47,2.222,71,0.606,74,0.55,99,2.114,125,1.977,126,3.275,127,2.053,128,2.566,171,3.532,281,1.731,287,3.688,302,4.512,331,3.332,423,2.732,424,3.332,569,3.71,571,5.21,1985,4.351,2003,4.512,2025,6.166,2026,6.166,2027,6.166,2028,6.166,2029,6.166,2030,6.166,2031,6.166,2032,8.152,2033,6.166]],["t/312",[18,1.723,20,1.882,43,2.145,45,1.225,48,2.198,49,0.798,50,0.528,52,2.483,74,0.56,88,1.393,99,1.172,105,0.571,108,1.47,115,1.22,135,3.896,148,1.285,171,3.05,177,3.124,189,2.093,191,4.081,196,4.464,198,1.44,212,2.606,213,1.959,219,2.045,232,2.093,235,1.285,236,1.958,237,3.147,240,1.646,245,2.145,250,1.279,251,1.495,252,1.825,258,3.099,261,3.259,262,3.099,273,1.617,274,3.635,275,2.045,276,1.754,277,1.44,278,2.889,281,1.495,282,1.862,283,1.556,466,1.815,487,1.577,584,2.606,615,1.672,658,2,1170,2.145,1979,4.499,1980,3.099,1988,3.099,1990,2.889,2001,3.099,2007,4.499,2034,3.419,2035,3.419,2036,3.419,2037,2.265,2038,3.419,2039,3.419,2040,3.099,2041,3.419]],["t/314",[74,0.522,135,5.567,171,4.358,198,1.675,212,5.799,251,3.327,261,4.657,274,5.194,276,3.902,281,2.617,282,2.66,420,2.987,1693,3.778,2007,6.428,2040,6.897]],["t/316",[7,2.016,18,2.716,108,2.317,250,2.016,273,2.548,1228,5.922,1523,5.922,2042,8.392,2043,7.092]],["t/318",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/320",[7,1.7,47,2.551,49,1.06,50,1.094,71,0.695,73,1.036,74,0.544,105,1.182,125,2.27,126,3.579,127,2.357,128,2.945,129,2.022,132,4.233,136,4.558,384,3.692,1957,4.054,2044,7.078,2045,7.078,2046,5.981]],["t/322",[39,2.025,43,1.736,48,3.41,52,2.753,74,0.554,88,1.805,99,0.949,109,1.397,147,2.211,164,2.025,177,3.611,198,1.252,232,1.694,235,1.04,237,1.919,240,0.856,250,1.081,251,2.487,252,2.245,276,2.308,277,1.166,281,0.777,282,1.573,283,1.259,301,2.98,387,1.195,397,2.339,418,4.844,551,1.152,1147,2.339,1184,3.131,1185,2.509,1186,5.233,1187,1.889,1188,6.532,1232,2.025,1303,2.509,1304,2.509,1467,1.21,2047,4.079,2048,4.079,2049,2.509,2050,4.079,2051,4.079,2052,2.768,2053,4.5,2054,4.5,2055,4.5,2056,4.5,2057,4.5,2058,5.155,2059,2.768,2060,2.768,2061,2.768,2062,2.509,2063,2.509,2064,2.509,2065,2.509,2066,2.509,2067,2.509,2068,2.509,2069,2.509,2070,2.509,2071,2.509]],["t/324",[43,4.365,74,0.438,198,1.532,276,3.568,301,5.838,387,3.004,418,5.53,420,2.732,1147,5.879,1219,6.307,1693,3.455,2047,6.307,2048,6.307,2049,6.307,2050,6.307,2051,6.307,2058,6.307,2062,6.307,2063,6.307,2064,6.307,2065,6.307,2067,6.307,2068,6.307,2069,6.307,2070,6.307,2071,6.307]],["t/326",[1,3.312,3,0.931,8,1.615,30,3.76,56,1.767,63,3.367,74,0.422,109,3.312,144,3.484,155,3.614,167,3.162,250,1.577,273,1.993,301,4.348,482,2.415,1182,3.926,1347,5.951,1407,5.245,1413,5.547,1726,6.474,2072,7.176,2073,6.564,2074,6.564,2075,5.951,2076,5.547,2077,6.564,2078,5.547,2079,6.564,2080,6.564,2081,6.564,2082,5.245,2083,5.547,2084,6.564]],["t/328",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/330",[6,3.495,7,1.844,8,2.306,13,3.495,45,1.438,47,2.768,74,0.466,125,2.463,127,3.121,160,2.982,250,1.844,564,3.543,1467,3.359,1667,3.593,2085,7.679]],["t/332",[2086,9.147]],["t/334",[74,0.541,1129,6.776,1708,5.789,2087,8.48,2088,7.687]],["t/336",[18,1.192,28,3.849,49,0.552,50,0.569,52,2.466,56,0.991,62,2.694,73,0.539,74,0.548,76,1.889,88,1.064,99,2.632,105,0.615,115,1.314,150,1.192,169,2.027,177,3.208,198,1.509,200,1.462,213,2.074,235,1.384,237,2.922,240,1.138,250,1.646,252,1.262,267,2.067,273,2.513,281,1.034,282,1.971,283,2.566,418,2.31,423,1.631,482,3.045,642,2.807,1129,5.474,1184,2.027,1325,3.111,1338,2.439,1427,3.631,1471,2.439,1545,2.598,1590,2.694,1688,3.111,1691,1.801,1707,2.694,1708,2.514,1728,3.846,1729,2.807,2072,7.376,2089,5.111,2090,5.111,2091,3.682,2092,2.942,2093,3.338,2094,3.111,2095,5.111,2096,3.682,2097,6.211,2098,5.638]],["t/338",[18,1.54,29,5.199,44,3.358,45,0.891,49,1.194,50,0.736,56,1.281,70,4.812,73,0.697,74,0.546,88,0.898,105,0.795,108,1.882,150,1.54,198,1.048,250,1.143,252,1.631,281,2.444,282,1.664,283,2.166,420,1.869,423,3.022,482,1.751,772,4.99,1129,3.803,1184,2.62,1198,6.182,1590,3.483,1666,3.803,1693,3.958,1707,3.483,1708,3.249,1728,2.672,1872,4.314,2072,4.021,2089,4.314,2090,4.314,2093,6.182,2094,4.021,2095,4.314,2097,4.314,2099,4.759,2100,7.97,2101,7.97,2102,4.759,2103,4.021,2104,4.314,2105,4.759,2106,6.182]],["t/340",[250,2.058,482,3.682,487,3.954,631,7.241,1112,6.046,1835,5.519]],["t/342",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/344",[1,3.516,3,0.817,7,0.909,8,0.931,47,1.364,49,1.044,50,0.89,71,0.566,73,0.843,74,0.548,76,1.941,79,2.125,88,0.714,105,0.632,115,1.35,116,1.699,125,1.214,126,2.313,127,1.26,128,1.575,129,1.081,132,2.264,136,4.488,137,2.168,140,1.393,149,2.084,199,1.91,223,1.88,237,2.455,250,0.909,251,1.655,252,1.297,281,1.063,384,1.974,387,1.634,402,2.168,420,1.486,482,3.083,602,3.056,652,1.88,718,2.671,904,3.198,1112,4.063,1665,5.568,1689,2.77,1806,2.438,1957,3.992,2107,3.198,2108,3.198,2109,3.198,2110,3.198,2111,5.22,2112,5.22,2113,5.22,2114,3.431,2115,3.198,2116,3.198,2117,4.865,2118,3.198,2119,3.198,2120,3.198,2121,5.22,2122,3.431,2123,3.431,2124,3.431,2125,3.198,2126,5.758,2127,3.431,2128,3.198,2129,3.785,2130,3.431,2131,3.785,2132,4.865,2133,3.785,2134,3.785]],["t/346",[7,0.76,45,0.593,47,1.141,49,1.287,50,1.192,71,0.611,73,1.036,74,0.558,76,1.624,77,1.711,79,3.493,88,0.946,99,1.085,105,1.039,115,1.788,125,1.015,126,2.013,127,1.054,128,1.318,129,0.904,132,1.894,136,2.039,146,2.234,198,0.697,229,1.681,251,2.192,252,1.718,255,1.986,281,0.889,282,1.107,335,2.675,387,1.367,420,1.243,424,1.711,461,2.53,482,1.165,602,2.661,1112,6.473,1398,2.675,1689,2.317,1756,2.998,1806,2.039,1957,3.564,2046,2.675,2107,2.675,2108,2.675,2109,2.675,2110,2.675,2111,5.641,2112,5.641,2113,5.641,2114,2.87,2115,2.675,2116,2.675,2117,4.236,2118,2.675,2119,2.675,2120,2.675,2121,2.87,2122,2.87,2123,2.87,2124,2.87,2125,4.236,2127,4.544,2128,4.236,2135,3.166,2136,2.87,2137,5.013,2138,3.166,2139,5.013,2140,3.166,2141,3.166,2142,3.166,2143,3.166,2144,2.87,2145,3.166,2146,3.166,2147,3.166,2148,3.166,2149,2.87,2150,3.166,2151,3.166,2152,3.166]],["t/348",[7,1.051,47,1.577,49,1.254,50,1.174,71,0.43,73,1.112,74,0.56,76,2.244,77,2.364,79,3.602,88,0.826,105,1.269,109,2.208,115,1.561,125,1.403,126,2.577,127,1.457,128,1.821,129,1.25,132,2.617,136,2.818,251,1.913,252,1.5,273,1.329,281,1.228,387,1.889,482,2.795,785,2.987,1109,3.202,1112,5.904,1879,5.422,1957,3.675,2046,3.697,2107,3.697,2108,3.697,2109,3.697,2110,3.697,2115,3.697,2116,3.697,2117,5.422,2118,3.697,2119,3.697,2120,3.697,2125,3.697,2128,3.697,2149,3.966,2153,6.416,2154,6.416,2155,4.375,2156,4.375,2157,3.697,2158,4.375]],["t/350",[45,1.324,48,2.377,52,2.417,56,1.043,59,3.677,73,0.858,74,0.55,76,4.043,88,1.598,97,1.328,99,2.702,156,2.958,164,4.289,177,3.145,198,1.557,235,1.456,237,3.61,240,1.198,250,1.408,252,2.009,263,1.988,273,1.177,281,1.646,282,2.049,283,1.763,482,3.276,603,2.175,907,3.096,1109,2.836,1394,3.882,1395,1.593,1467,1.695,1666,4.683,1691,1.895,1792,3.882,1799,2.836,1806,3.775,1816,3.274,1817,3.274,1818,3.274,1819,3.513,1820,3.513,1821,3.274,2157,3.274,2159,5.314,2160,3.875,2161,3.513,2162,3.875,2163,5.314,2164,3.875]],["t/352",[1,3.184,49,1.384,50,1.279,73,1.352,74,0.548,105,1.382,198,1.39,263,3.236,273,1.916,315,4.179,420,2.477,482,2.321,569,3.766,1394,4.179,1693,3.134,1792,4.179,1799,4.617,1806,4.063,2157,5.331,2159,5.72,2163,5.72,2165,6.309,2166,6.309,2167,6.309,2168,6.309]],["t/354",[1,4.013,3,0.843,6,2.703,8,1.462,28,4.056,45,1.679,52,2.159,56,1.599,68,3.637,79,3.335,81,3.727,125,1.905,137,3.403,144,3.153,146,4.192,201,4.347,238,3.826,250,2.153,313,2.533,318,3.637,423,2.632,629,4.747,652,3.95,1136,3.553,1327,5.612,1432,4.192,1450,5.02,1523,4.192,1727,4.529,1728,3.335,1758,5.02,1801,6.355,1802,4.347,2169,5.941,2170,5.02,2171,5.941,2172,5.386,2173,5.941,2174,5.941,2175,5.941]],["t/356",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/358",[6,2.437,7,1.286,8,1.823,13,2.437,45,1.003,47,1.93,49,1.273,50,1.313,52,1.453,73,0.784,74,0.546,88,1.011,97,1.835,105,1.419,125,1.717,127,2.467,160,2.079,198,1.632,250,1.286,252,1.835,263,2.746,270,4.082,282,1.872,564,3.419,740,3.448,1167,3.778,1370,3.778,1467,2.342,1667,2.505,1673,3.006,1707,3.918,1717,3.359,1728,3.006,2176,5.354,2177,5.354,2178,4.524,2179,4.524,2180,3.778,2181,5.354,2182,4.524,2183,5.354,2184,5.354]],["t/360",[3,0.836,45,1.105,56,2.13,74,0.521,81,3.7,159,4.316,236,3.378,238,3.798,263,4.06,270,4.496,415,6.688,469,3.247,740,3.798,1463,3.906,1508,4.161,1707,4.316,1737,4.496,1992,3.247,2178,4.984,2180,4.161,2185,4.984,2186,8.098,2187,7.914,2188,5.898,2189,4.984,2190,5.898,2191,5.898,2192,7.914,2193,5.898,2194,5.898,2195,7.175,2196,7.914,2197,7.914,2198,5.898]],["t/362",[3,0.435,28,3.34,45,1.142,49,0.914,50,0.943,52,2.527,56,1.872,62,2.247,73,0.449,74,0.558,88,0.923,97,1.677,99,1.053,105,1.018,108,1.35,109,1.549,115,2.175,116,1.379,164,2.247,177,1.084,198,1.343,213,1.13,235,1.838,237,2.086,240,0.949,250,1.67,251,2.14,252,2.09,263,2.509,264,2.096,267,1.724,275,1.836,277,1.293,281,0.862,282,1.71,283,1.397,313,1.309,387,1.326,395,2.167,402,1.759,482,1.13,648,1.549,650,3.24,652,1.525,659,1.836,718,2.167,740,3.151,742,4.134,763,1.502,904,4.134,985,2.784,989,2.341,1182,1.836,1327,4.303,1344,2.096,1362,1.796,1370,3.452,1395,1.263,1427,1.978,1545,2.167,1691,3.401,1695,3.729,1708,2.096,1717,3.069,1724,2.784,1727,2.341,1728,2.746,1729,2.341,1898,4.435,2037,2.034,2182,4.134,2185,2.595,2186,2.784,2189,4.134,2195,2.784,2199,3.071,2200,2.784,2201,3.071,2202,2.784,2203,2.784,2204,2.784,2205,3.071,2206,3.071]],["t/364",[49,1.293,50,1.334,73,0.984,74,0.538,88,1.27,105,1.441,198,1.481,251,3.773,263,3.45,387,2.905,420,2.641,740,4.332,989,5.128,1370,4.746,1693,3.341,1708,4.592,1717,4.22,2182,5.684,2189,5.684,2202,6.098,2203,6.098,2204,6.098,2207,6.727]],["t/366",[45,1.51,74,0.514,125,2.585,1728,6.146,1838,6.81,1839,6.81,2178,6.81]],["t/368",[8,2.108,18,2.774,250,2.058,717,4.631,718,6.046,1525,6.046,2208,8.569]],["t/370",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/372",[6,1.408,7,0.743,8,1.211,13,1.408,38,1.941,44,2.183,45,0.58,47,1.115,49,0.464,50,0.761,52,1.336,56,0.833,67,2.183,73,0.453,74,0.549,88,0.584,97,2.394,105,0.517,115,1.104,116,1.389,125,0.992,127,1.639,137,1.772,140,1.138,150,1.984,160,1.201,168,2.472,177,1.093,191,3.365,198,1.35,250,1.182,254,1.513,268,2.264,277,1.303,281,0.869,287,2.943,298,1.772,334,3.473,349,2.183,397,2.614,423,1.371,463,0.819,472,2.049,544,2.805,564,2.271,569,2.789,574,2.049,717,3.775,767,3.144,1257,2.049,1311,3.36,1334,2.472,1371,2.264,1442,2.614,1467,1.353,1509,3.26,1549,4.499,1602,2.805,1667,1.448,1673,1.737,2082,2.472,2209,2.805,2210,2.183,2211,3.094,2212,2.805,2213,2.805,2214,2.805,2215,3.094,2216,8.515,2217,2.805,2218,3.933,2219,2.805,2220,2.805,2221,4.159,2222,3.094,2223,3.094,2224,5.179,2225,5.179,2226,3.094,2227,2.805,2228,2.805,2229,2.614,2230,3.094,2231,3.094,2232,3.094,2233,3.094,2234,3.094,2235,2.805,2236,3.094,2237,3.094,2238,3.094,2239,2.805,2240,2.805,2241,2.805,2242,3.094,2243,2.805,2244,3.094,2245,3.094,2246,2.805,2247,3.094,2248,3.094,2249,2.614]],["t/374",[44,3.57,49,0.48,50,0.969,52,2.5,56,0.862,73,0.469,74,0.551,81,2.01,88,1.629,97,1.098,99,1.734,105,0.845,115,1.143,150,1.037,153,2.344,172,1.499,177,3.048,198,1.381,223,1.591,235,1.204,237,3.307,240,1.564,250,1.215,251,1.401,252,2.442,254,1.567,267,1.798,277,1.349,281,1.42,282,1.769,283,1.458,402,1.835,423,1.419,463,0.848,509,1.478,563,1.961,648,1.617,717,4.191,720,2.707,722,2.904,767,1.643,994,2.26,1182,3.026,1287,2.344,1311,3.454,1334,2.56,1423,2.187,1509,4.718,1549,3.258,1899,2.904,2078,2.707,2218,2.56,2224,4.275,2225,4.275,2228,2.904,2229,2.707,2235,2.904,2239,2.904,2240,2.904,2241,2.904,2243,4.587,2246,2.904,2249,4.275,2250,3.204,2251,5.059,2252,2.122,2253,3.204,2254,3.204,2255,2.904,2256,3.204,2257,3.204,2258,4.587,2259,2.904,2260,3.204,2261,2.904,2262,3.204,2263,3.204,2264,3.204,2265,3.204,2266,3.204,2267,3.204]],["t/376",[44,4.994,74,0.485,150,2.291,198,1.559,251,3.096,281,2.502,282,2.475,420,2.779,720,5.981,767,3.631,994,4.994,1182,4.233,1423,4.832,1509,4.688,1549,4.558,1693,3.515,2218,5.656,2224,5.981,2225,5.981,2249,5.981,2252,4.688,2255,6.417,2258,6.417,2261,6.417]],["t/378",[45,0.62,56,2.352,63,1.697,73,0.484,74,0.57,75,2.13,140,1.217,148,1.243,150,1.071,172,1.548,213,2.355,273,2.201,472,2.191,475,2.13,545,3.34,549,1.505,602,2.754,603,2.913,623,3.919,767,2.661,785,2.258,1182,1.978,1209,2.522,1313,2.999,1334,2.643,1371,3.797,1423,2.258,1525,2.334,1992,1.821,2170,2.795,2221,2.795,2252,2.191,2268,3.308,2269,3.308,2270,3.308,2271,3.308,2272,3.308,2273,5.188,2274,3.308,2275,3.308,2276,3.308,2277,3.308,2278,3.308,2279,3.308,2280,3.308,2281,3.308,2282,3.308,2283,6.402,2284,4.704,2285,3.308,2286,3.308,2287,3.308,2288,3.308,2289,3.308,2290,3.308,2291,3.308,2292,3.308,2293,3.308,2294,2.795,2295,3.308,2296,3.308,2297,3.308,2298,3.308,2299,3.308,2300,3.308,2301,3.308,2302,3.308,2303,3.308,2304,3.308,2305,3.308,2306,3.308,2307,3.308,2308,3.308,2309,3.308,2310,3.308,2311,3.308,2312,3.308,2313,3.308,2314,3.308,2315,3.308,2316,3.308,2317,3.308,2318,3.308]],["t/380",[1,3.912,8,1.907,11,4.864,12,5.91,66,7.028,67,5.47,167,3.735,250,1.862,348,4.115,767,3.977,1230,6.551,1700,5.47,2319,9.21,2320,6.551,2321,7.752]],["t/382",[71,0.879,763,4.375,1395,3.678]],["t/384",[1,2.616,6,2.359,7,1.245,8,1.782,13,2.359,45,0.971,47,1.868,49,0.777,52,1.407,67,3.658,74,0.522,97,1.777,125,1.662,127,2.412,139,4.799,146,3.658,160,2.013,198,1.596,250,2.006,432,6.568,564,3.343,660,3.539,1126,3.433,1170,3.252,1184,2.854,1467,2.267,1667,2.426,1673,2.91,1957,2.969,2221,4.38,2320,7.641,2322,5.184,2323,7.245,2324,5.184,2325,3.793,2326,7.245,2327,5.184,2328,3.952,2329,5.184,2330,5.184,2331,5.184,2332,5.184,2333,4.699,2334,5.184,2335,5.184,2336,5.184,2337,5.184,2338,5.184]],["t/386",[1,2.023,8,0.986,45,1.126,49,0.601,50,0.62,52,2.539,74,0.555,88,1.621,97,1.374,99,1.374,105,0.669,115,1.43,139,2.655,148,3.013,177,3.303,198,1.589,199,2.023,223,2.986,235,1.506,237,2.564,240,1.239,250,1.444,251,1.753,252,2.061,261,2.454,267,2.25,275,2.397,281,1.125,282,2.102,283,1.824,430,2.737,549,2.736,732,2.737,902,2.933,1176,2.828,1232,2.933,1410,3.056,1550,3.203,1833,2.737,2319,5.451,2320,3.387,2325,4.4,2339,5.451,2340,4.009,2341,3.634,2342,3.634,2343,3.056,2344,4.009,2345,3.634,2346,5.451,2347,4.009,2348,5.451,2349,4.009,2350,5.451,2351,4.009,2352,4.009]],["t/388",[74,0.485,198,1.559,251,3.096,261,4.333,281,1.987,282,2.475,420,2.779,1693,3.515,2325,5.179,2339,6.417,2342,6.417,2345,6.417,2346,6.417,2350,6.417,2353,8.911,2354,8.911,2355,8.911,2356,8.911,2357,8.911,2358,7.078]],["t/390",[8,1.741,18,2.884,61,2.5,125,2.27,127,2.357,148,2.66,167,3.41,189,4.333,250,1.7,287,4.233,308,5.179,423,3.136,673,4.441,1165,5.981,1391,3.897,1549,4.558,1726,5.396,1847,5.981,1944,6.417,1946,5.981,2359,8.911,2360,7.078,2361,7.078,2362,6.417,2363,5.981]],["t/392",[71,0.879,763,4.375,1395,3.678]],["t/394",[3,0.836,6,2.684,7,1.417,8,1.947,13,2.684,45,1.105,47,2.125,52,2.148,74,0.51,77,3.187,97,2.022,125,1.891,127,2.635,146,6.303,148,2.216,155,3.247,160,2.29,198,1.743,219,5.342,222,4.161,250,1.417,298,3.378,368,5.347,549,3.602,564,3.652,584,4.496,1467,2.579,1667,2.76,1673,3.311,2363,4.984,2364,5.898,2365,5.898,2366,5.898,2367,5.898,2368,5.898]],["t/396",[3,0.83,4,3.584,8,1.441,49,0.877,50,0.905,52,2.138,74,0.55,88,1.105,99,2.007,105,0.978,115,2.089,177,2.781,198,1.96,219,5.323,235,2.2,237,3.795,240,1.81,250,1.892,252,2.007,281,1.644,282,2.754,283,2.665,402,3.354,549,2.665,584,4.464,652,2.908,1550,4.679,2363,4.948,2369,5.855,2370,5.855]],["t/398",[74,0.498,198,1.887,281,2.406,282,2.996,420,3.365,1693,4.256]],["t/400",[8,2.086,56,2.283,109,4.279,155,4.669,167,4.085,250,2.037,1111,7.018]],["t/402",[18,3.11,24,2.606,30,4.853,50,1.141,56,2.381,71,0.899,73,1.08,74,0.455,88,1.727,96,1.623,144,4.695,155,1.882,160,1.328,167,1.647,198,0.753,203,2.732,213,3.255,264,2.334,267,1.919,277,1.44,399,4.254,405,3.429,410,4.499,469,5.67,646,2.732,739,4.827,741,2.202,1167,2.412,1187,2.334,1395,3.035,1443,5.526,1835,3.429,2200,3.099,2371,3.419,2372,3.419,2373,7.999,2374,3.419,2375,8.019,2376,3.419,2377,7.999,2378,3.419,2379,3.419,2380,3.419,2381,3.419,2382,2.889,2383,3.419,2384,3.419,2385,3.419,2386,3.419,2387,3.419,2388,2.889,2389,2.889,2390,3.419]],["t/404",[6,1.017,7,0.537,8,0.927,13,1.017,18,1.582,24,1.704,45,1.386,47,0.806,49,1.253,50,1.074,56,1.545,60,1.28,61,0.789,73,1.017,74,0.555,79,1.255,83,2.851,88,0.712,94,1.889,97,1.676,105,1.161,115,2.287,125,0.717,127,1.255,136,1.44,144,2.001,149,1.231,160,1.464,167,3.564,207,1.704,213,2.112,229,1.186,242,1.704,250,0.537,270,1.704,273,1.743,275,1.337,279,1.786,281,2.348,399,1.786,402,2.159,405,1.44,481,1.577,534,1.889,549,2.612,564,1.031,569,4.009,637,1.889,648,1.128,731,2.026,741,1.44,902,1.636,989,2.874,1111,3.449,1119,1.786,1167,4.05,1182,1.337,1187,1.526,1298,1.889,1370,1.577,1371,1.636,1423,1.526,1443,4.131,1467,0.978,1479,1.636,1593,2.026,1667,1.046,1673,1.255,2375,2.026,2388,1.889,2389,1.889,2391,2.235,2392,2.235,2393,3.77,2394,2.235,2395,2.235,2396,2.235,2397,2.235,2398,3.77,2399,3.77,2400,3.77,2401,3.77,2402,2.235,2403,2.235,2404,2.235,2405,2.235,2406,2.235,2407,2.235,2408,2.235,2409,5.74,2410,6.41,2411,4.889,2412,2.235,2413,2.235,2414,2.235,2415,2.235,2416,2.026,2417,2.235,2418,3.77,2419,4.889,2420,4.889,2421,4.889,2422,1.889,2423,2.235,2424,2.026,2425,2.235]],["t/406",[3,0.475,18,1.696,43,2.101,45,1.209,49,0.502,50,0.518,52,1.981,56,1.737,74,0.551,86,5.452,88,0.632,97,1.148,99,1.148,105,0.559,108,0.924,109,2.644,115,1.195,144,4.822,167,3.516,177,2.577,198,1.745,213,1.927,235,1.258,237,2.752,240,1.035,250,1.258,252,1.148,267,1.88,273,1.591,275,2.003,277,2.207,279,4.186,280,4.749,281,1.812,282,1.832,283,1.524,309,2.553,387,1.446,395,3.696,405,4.7,466,1.777,480,2.218,488,2.363,602,1.777,642,4.919,648,1.69,652,1.663,659,2.003,735,4.749,1111,2.363,1325,2.83,1327,2.363,1338,2.218,1395,2.154,1404,4.749,1445,3.696,1446,3.036,1447,4.749,1448,4.749,1449,3.036,1450,2.83,1451,3.036,1481,4.749,1482,2.676,2388,2.83,2389,2.83,2422,4.427,2426,3.349,2427,3.349,2428,3.349,2429,3.349,2430,3.349,2431,3.349]],["t/408",[74,0.48,198,1.775,279,6.44,281,2.901,282,2.818,405,5.191,420,3.165,1693,4.003,2422,6.81,2432,8.06]],["t/410",[8,2.003,110,7.38,232,4.983,250,1.955,419,5.957,500,6.504,1391,4.482,1394,5.392,2433,8.802,2434,6.879,2435,6.879]],["t/412",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/414",[6,3.011,7,1.589,8,2.1,13,3.011,45,1.24,47,2.385,50,1.023,52,1.796,73,1.249,74,0.526,105,1.105,125,2.122,127,2.843,129,1.89,160,2.569,198,1.457,250,2.05,564,3.939,1467,2.894,1667,3.096,2434,5.592,2436,5.999,2437,5.999,2438,5.999,2439,6.617]],["t/416",[49,0.841,50,1.183,52,2.364,74,0.546,99,2.624,105,1.278,115,2.002,177,3.076,198,1.918,235,2.109,236,3.215,237,3.714,240,1.735,250,1.838,251,2.455,252,2.624,281,1.576,282,2.676,283,2.554,313,2.393,419,5.601,451,5.835,1391,4.214,2440,6.939,2441,6.939,2442,5.088,2443,4.485]],["t/418",[74,0.486,198,1.811,251,3.596,281,2.309,282,2.875,420,3.229,1693,4.084,2440,7.454,2441,7.454,2442,7.454]],["t/420",[8,2.201,250,2.149,741,5.762]],["t/422",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/424",[7,1.406,47,2.11,49,1.18,50,1.217,57,4.464,71,0.575,73,1.153,74,0.553,105,1.315,125,1.878,126,3.164,127,1.95,128,2.437,130,3.354,131,2.863,132,3.502,187,4.679,384,3.054,763,2.863,882,4.948,1670,3.584,1695,4.464,1957,4.511,2444,5.855,2445,5.855,2446,6.293,2447,5.308,2448,6.655,2449,5.308,2450,5.308,2451,5.308]],["t/426",[1,2.551,3,0.717,43,3.171,48,1.699,52,1.932,57,6.281,74,0.548,99,1.733,148,1.9,164,3.699,177,2.514,198,1.815,199,2.551,235,1.9,237,3.513,240,1.563,250,1.71,252,1.733,261,3.094,268,3.699,277,2.129,281,1.419,282,1.767,283,2.3,387,3.074,461,4.039,549,2.3,741,4.584,763,2.472,767,2.593,885,3.853,1444,4.039,1670,3.094,1695,3.853,1756,3.023,1797,3.567,1814,3.853,2446,4.039,2452,4.582,2453,3.853,2454,5.055,2455,5.055,2456,5.055,2457,5.055,2458,5.055,2459,4.582,2460,5.055,2461,5.055]],["t/428",[74,0.498,198,1.887,420,3.365,1693,4.256,1695,6.532,2459,7.768]],["t/430",[8,2.131,213,3.186,250,2.08,298,4.961,2462,7.318,2463,8.66]],["t/432",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/434",[6,2.871,7,1.515,8,2.036,13,2.871,45,1.182,47,2.274,49,0.945,52,1.713,71,0.62,74,0.53,88,1.191,97,2.837,125,2.023,127,2.756,160,2.45,190,5.041,198,1.823,250,1.515,273,2.513,564,3.819,1184,3.474,1257,4.179,1362,3.691,1467,2.759,1667,2.952,1673,3.542,2219,5.72,2464,6.309,2465,6.309]],["t/436",[45,0.918,49,0.735,50,0.758,52,2.395,56,2.375,71,0.482,74,0.548,88,1.315,99,2.388,105,0.819,115,1.749,149,2.699,177,3.115,198,1.784,235,1.842,237,3.762,240,1.516,250,1.673,252,1.681,273,2.46,281,1.376,282,2.435,283,2.231,313,2.091,482,2.563,1184,2.699,1257,5.366,1362,4.74,1423,3.347,1683,4.143,1691,2.398,1697,5.886,1799,5.097,1812,3.737,2462,4.143,2466,4.902]],["t/438",[25,6.201,45,1.633,48,2.3,52,1.857,56,1.841,74,0.434,167,3.295,198,1.921,273,2.077,281,1.92,282,2.391,420,2.686,1176,4.826,1344,4.67,1362,5.616,1693,3.397,1781,5.78,1799,5.005,1812,5.214,2083,5.78,2094,5.78,2462,5.78,2467,6.84,2468,6.201,2469,5.78,2470,6.84]],["t/440",[57,5.967,96,3.715,116,3.514,148,2.941,250,1.88,487,3.611,549,3.562,1292,5.728,1314,6.254,1322,6.254,1835,5.041,2043,6.614,2452,8.597,2471,7.827,2472,7.827]],["t/442",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/444",[7,1.427,47,2.141,49,1.192,50,1.229,57,4.529,71,0.584,73,1.164,74,0.554,105,1.328,125,1.905,126,3.195,127,1.978,128,2.472,130,3.403,131,2.905,132,3.553,187,4.747,384,3.099,763,2.905,1670,3.637,1957,4.555,2446,6.355,2447,5.386,2448,6.72,2449,5.386,2450,5.386,2451,5.386,2473,5.941,2474,5.941]],["t/446",[3,1.031,8,1.788,28,4.962,45,1.361,52,1.973,68,4.449,125,2.331,137,4.163,238,4.681,250,2.371,313,3.099,318,4.449,423,3.22,652,3.61,1136,4.347,1432,5.128,1523,5.128,1728,4.08,1801,7.239,1802,5.318,1822,5.318]],["t/448",[14,4.143,20,2.699,48,1.648,50,0.758,71,1.063,73,1.364,88,1.759,198,1.08,240,1.516,252,1.681,313,3.762,348,2.602,482,1.804,1136,2.932,1257,3.247,1315,2.474,1327,3.459,1553,8.178,1691,4.557,1822,7.684,2170,4.143,2475,4.902,2476,4.902,2477,4.444,2478,4.444,2479,4.444,2480,4.902,2481,4.444,2482,4.902,2483,4.444,2484,4.902]],["t/450",[6,1.939,7,1.023,8,1.548,13,1.939,45,0.798,47,1.535,48,1.432,49,0.638,50,0.659,52,1.156,73,0.624,74,0.564,105,0.711,108,1.737,125,1.366,127,2.095,129,1.217,149,2.346,160,1.654,181,2.346,198,0.938,200,2.499,250,1.023,263,2.185,281,2.1,450,3.118,482,2.753,564,2.903,569,4.198,571,6.322,574,2.822,1136,2.548,1467,1.863,1667,1.994,1691,3.077,1728,2.392,1756,2.548,1822,6.449,2481,3.862,2485,4.261,2486,4.261,2487,4.261,2488,4.261,2489,4.261,2490,4.261,2491,4.261,2492,4.261,2493,4.261,2494,4.261,2495,4.261,2496,4.261,2497,4.261,2498,4.261]],["t/452",[18,1.025,45,0.939,48,3.279,52,2.551,56,0.852,65,2.317,71,0.311,74,0.55,88,1.682,108,0.874,109,1.598,115,1.129,118,1.938,148,1.19,177,3.318,198,1.37,200,1.257,235,1.19,237,2.138,240,0.979,250,0.76,251,2.721,252,2.133,263,2.571,264,2.161,267,1.777,313,1.35,423,1.403,482,1.165,602,4.353,603,1.777,732,2.161,1151,2.414,1187,2.161,1228,2.234,1257,3.32,1362,1.852,1467,1.385,1686,3.422,1691,1.548,1717,3.145,1728,2.814,1729,2.414,1767,2.414,1790,5.178,1806,4.007,1808,2.414,1809,2.53,1810,2.317,1811,2.234,1814,2.414,1816,2.675,1817,2.675,1818,2.675,1821,2.675,1822,6.001,1823,2.87,1824,2.87,1825,2.87,1826,2.675,1827,2.53,1828,2.87,1829,2.87,1830,2.87,1831,2.675,2161,2.87,2294,2.675,2469,2.675,2499,2.87,2500,2.87,2501,4.743,2502,2.87]],["t/454",[74,0.505,198,1.707,263,3.977,420,3.044,602,4.115,1693,3.85,1717,4.864,1806,4.993,1811,5.47,2469,6.551,2499,7.028,2500,7.028,2501,5.91,2502,7.028,2503,7.752]],["t/456",[74,0.542,273,2.4,602,4.195,623,4.838,785,5.395,2501,7.81,2504,7.903,2505,7.903,2506,7.903]],["t/458",[3,1.079,45,1.746,74,0.522,125,2.44,137,4.358,1691,4.558,1728,6.049,1838,6.428,1839,6.428,2507,7.607]],["t/460",[8,2.086,61,2.995,115,3.025,250,2.037,283,4.526,1475,7.165,2508,8.48]],["t/462",[50,1.311,71,0.833,105,1.416,252,2.907,1348,6.464,1395,4.09,2509,7.687]],["t/464",[3,0.759,6,2.437,7,1.78,8,1.823,13,2.437,45,1.003,47,1.93,49,1.273,50,1.313,56,2.287,71,0.728,73,1.084,74,0.542,100,4.524,125,1.717,126,2.151,127,2.467,128,2.228,129,1.529,140,1.97,150,2.398,160,2.079,250,1.286,252,1.835,283,2.437,302,3.918,331,2.894,564,2.47,1391,2.948,1467,2.342,1667,2.505,1785,4.854,2210,3.778,2510,5.354,2511,5.354,2512,6.261,2513,5.354,2514,7.41,2515,5.354]],["t/466",[8,1.3,18,1.711,45,0.99,49,1.1,59,4.607,61,1.866,73,1.075,85,4.466,96,2.509,108,2.027,133,3.092,156,4.258,159,5.373,172,2.473,221,3.235,250,1.269,264,5.013,337,4.466,348,2.805,405,6.171,414,3.729,469,4.043,509,3.388,648,2.667,650,3.5,729,6.657,763,2.584,1167,5.181,1391,2.91,1394,4.863,1395,3.019,1475,4.466,1545,3.729,2136,4.791,2294,4.466,2435,6.205,2516,5.285,2517,5.285,2518,5.285,2519,5.285,2520,5.285,2521,4.791,2522,5.285,2523,4.791,2524,4.791,2525,5.285,2526,4.466]],["t/468",[71,0.931,73,1.388,267,5.323,405,6.107,1395,4.36,2509,7.096,2527,9.483,2528,7.827]],["t/470",[6,1.146,7,1.486,8,1.025,13,1.146,18,1.348,45,0.78,47,0.908,49,1.342,50,0.823,56,1.121,59,1.58,61,0.89,71,0.673,73,1.196,74,0.564,97,0.864,105,0.696,125,0.808,126,2.139,127,1.387,128,2.216,156,2.102,160,0.978,244,2.284,250,0.605,267,2.338,281,2.379,327,2.129,331,2.878,384,2.173,414,2.939,420,0.989,424,2.878,564,1.162,569,3.36,648,1.271,772,3.048,929,2.284,1200,3.176,1390,3.985,1467,1.102,1667,1.179,1957,3.544,2104,3.776,2328,3.176,2512,2.129,2524,3.776,2526,2.129,2529,2.519,2530,6.188,2531,4.166,2532,2.844,2533,2.519,2534,4.166,2535,2.519,2536,4.166,2537,2.519,2538,4.166,2539,4.166,2540,3.776,2541,4.166,2542,4.166,2543,6.188,2544,2.519,2545,2.519,2546,2.519,2547,5.326,2548,2.519,2549,2.519,2550,2.519,2551,2.519,2552,2.284,2553,2.519,2554,2.519,2555,5.326,2556,2.519,2557,2.519,2558,2.519,2559,6.188,2560,2.519,2561,2.519,2562,2.519,2563,2.519]],["t/473",[6,2.405,8,1.3,13,3.342,30,3.027,74,0.263,77,2.856,81,3.316,101,4.466,142,3.316,154,3.092,156,2.667,165,3.161,167,2.546,238,3.404,243,4.466,269,4.029,384,2.757,487,2.438,562,4.466,650,3.5,658,3.092,1170,3.316,1290,4.466,1362,3.092,1424,3.729,1699,4.466,1726,4.029,1769,4.029,1801,4.223,1934,4.791,2132,4.466,2172,4.791,2453,4.029,2501,4.029,2564,5.285,2565,4.466,2566,4.791,2567,5.285,2568,5.285,2569,4.791,2570,5.285,2571,5.285,2572,5.285,2573,5.285,2574,4.791,2575,5.285,2576,4.466,2577,5.285,2578,5.285,2579,5.285,2580,4.791,2581,4.791,2582,4.791,2583,5.285,2584,5.285,2585,5.285,2586,5.285,2587,5.285,2588,5.285,2589,5.285,2590,5.285,2591,5.285,2592,5.285,2593,4.791,2594,5.285]],["t/475",[8,1.41,11,3.596,18,1.855,21,4.369,30,4.447,43,3.596,45,1.074,54,5.196,56,2.09,137,3.283,140,2.109,145,5.196,213,3.239,275,4.643,349,4.044,384,4.05,762,4.843,1434,4.194,1445,5.478,1700,5.478,1737,4.369,2252,5.142,2532,5.3,2566,5.196,2593,5.196,2595,7.763,2596,5.731,2597,5.196,2598,5.731,2599,5.731,2600,5.196,2601,5.196,2602,5.731,2603,5.731,2604,5.731,2605,5.731,2606,5.731,2607,5.731,2608,5.918,2609,5.731,2610,5.731,2611,5.731]],["t/477",[8,1.854,11,4.729,213,3.41,275,5.542,1391,5.102,1445,6.538,2252,6.138,2532,6.326,2608,7.064,2612,7.537,2613,7.537,2614,7.537,2615,7.537]],["t/479",[8,1.854,11,4.729,213,3.41,275,5.542,1391,5.102,1445,6.538,2252,6.138,2532,6.326,2608,7.064,2616,7.537,2617,7.537,2618,7.537,2619,7.537]],["t/481",[8,1.854,11,4.729,213,3.41,275,5.542,954,6.833,1391,5.102,1445,6.538,2252,6.138,2532,6.326,2608,7.064,2620,7.537,2621,7.537,2622,7.537]],["t/483",[8,1.854,11,4.729,213,3.41,275,5.542,1391,5.102,1445,6.538,2252,6.138,2532,6.326,2608,7.064,2623,7.537,2624,7.537,2625,7.537,2626,7.537]],["t/485",[6,3.603,13,2.141,18,2.189,20,2.59,29,5.156,38,2.951,61,1.661,68,4.14,74,0.336,77,4.279,133,2.752,144,3.59,167,3.258,236,3.874,243,5.715,269,3.586,276,2.413,384,4.981,833,6.131,994,3.319,1182,5.178,1343,5.715,1390,3.03,1427,5.1,1707,3.442,1745,3.975,2083,5.715,2252,3.116,2333,4.264,2424,4.264,2532,6.261,2580,4.264,2581,4.264,2582,4.264,2601,6.131,2627,4.704,2628,4.704,2629,4.704,2630,4.704,2631,4.704,2632,4.704,2633,4.704,2634,4.704,2635,4.704,2636,4.704,2637,6.763,2638,6.763,2639,4.704,2640,4.704,2641,4.704,2642,4.264,2643,4.704,2644,4.704]],["t/488",[1,3.159,3,0.888,5,5.003,8,2.026,12,4.773,45,1.173,83,3.11,140,2.304,142,5.166,149,3.447,158,5.676,160,2.431,161,6.958,191,3.016,196,4.274,525,5.003,1408,5.676,1458,5.29,1467,2.738,1474,4.581,1537,7.465,1722,5.676,1745,5.29,2565,5.29,2645,5.676,2646,6.261,2647,5.676,2648,6.261,2649,6.261,2650,6.261,2651,6.261,2652,6.261,2653,6.261,2654,6.261,2655,6.261,2656,6.261,2657,6.261,2658,6.261]],["t/490",[3,0.843,45,1.49,49,0.89,50,0.918,61,2.809,68,4.868,73,1.461,74,0.395,79,4.464,97,2.036,99,2.726,116,2.667,137,4.555,213,2.186,250,1.427,298,3.403,314,4.056,419,4.347,650,3.935,718,4.192,917,6.063,1391,4.379,1435,6.72,1578,4.747,1936,5.386,1992,3.271,2453,4.529,2659,5.386,2660,5.386,2661,5.941,2662,5.941,2663,5.386,2664,5.941,2665,5.941,2666,5.941]],["t/492",[3,0.974,4,2.264,5,5.49,8,2.151,20,3.783,26,4.521,34,2.707,39,2.707,40,3.125,45,1.441,46,2.82,67,3.992,74,0.504,83,2.81,96,2.686,116,1.661,133,2.164,139,2.45,142,4.31,160,2.197,171,2.119,191,3.31,196,2.525,199,2.855,200,1.469,222,2.61,238,4.425,239,3.125,247,2.382,1357,3.125,1427,2.382,1434,2.707,1438,3.353,1506,4.521,1530,3.353,1573,6.228,2037,2.45,2132,3.125,2259,3.353,2343,2.82,2362,5.129,2501,5.237,2532,2.525,2552,3.353,2569,3.353,2576,3.125,2597,3.353,2642,3.353,2667,9.62,2668,3.353,2669,5.658,2670,5.129,2671,3.699,2672,3.353,2673,3.699,2674,3.699,2675,5.658,2676,3.699,2677,3.699,2678,3.699,2679,5.658,2680,3.699,2681,5.658,2682,3.699,2683,3.699,2684,3.699,2685,3.699,2686,3.699,2687,3.699,2688,3.699,2689,3.699,2690,3.699,2691,3.699,2692,3.699,2693,3.699,2694,3.353]],["t/494",[3,0.923,7,1.564,8,2.079,49,0.976,50,1.006,52,2.293,61,2.299,73,1.505,74,0.494,105,1.087,114,4.085,137,3.73,139,4.313,165,3.894,198,1.434,247,4.194,487,3.004,562,5.502,564,3.004,569,2.963,763,3.184,1391,4.652,1394,4.313,1480,5.596,2695,6.511,2696,6.511]],["t/496",[8,2.229,19,5.128,45,1.361,116,3.263,137,4.163,250,1.746,318,4.449,1424,6.965,1428,6.589,1463,4.814,2343,5.54,2697,6.589,2698,7.268,2699,6.589,2700,6.589,2701,6.589,2702,6.589,2703,6.589,2704,6.589,2705,6.589,2706,6.589]],["t/498",[74,0.463,167,3.665,207,5.799,229,4.038,248,5.799,673,4.773,1292,5.567,1736,6.897,2645,6.897,2707,6.897,2708,7.607,2709,7.607,2710,7.607,2711,7.607,2712,7.607,2713,7.607,2714,6.897,2715,7.607]],["t/500",[1,2.797,3,0.786,7,0.865,8,0.886,33,2.541,47,1.298,49,1.227,50,1.173,63,1.847,70,2.541,71,0.354,73,1.11,74,0.566,79,2.021,105,1.128,116,1.617,117,2.458,118,2.204,125,1.155,126,2.226,127,1.199,128,3.157,150,2.187,167,1.734,186,3.264,235,1.353,240,1.113,247,2.319,281,1.556,314,2.458,331,1.946,475,5.276,717,1.946,767,3.466,1119,2.877,1407,2.877,1549,4.351,1626,3.042,2209,3.264,2217,6.125,2218,5.398,2707,3.264,2716,3.601,2717,3.601,2718,3.601,2719,3.601,2720,3.601,2721,5.542,2722,3.601,2723,3.601,2724,3.601,2725,3.601,2726,3.601,2727,3.601,2728,3.601,2729,3.601,2730,3.601,2731,3.601,2732,3.601,2733,3.601,2734,3.601,2735,3.601,2736,3.601]],["t/503",[3,1.02,7,0.958,8,2.109,45,1.122,47,1.438,49,1.198,50,1.112,52,1.626,61,2.541,68,2.442,71,0.392,73,1.318,74,0.523,79,2.239,97,1.367,99,1.367,105,1.201,123,3.616,125,1.279,126,2.406,127,1.328,128,1.66,129,2.055,133,2.334,140,1.468,177,1.409,199,3.023,221,2.442,235,1.499,250,1.439,331,2.156,407,3.187,419,2.919,460,3.371,509,3.319,717,2.156,767,3.073,917,3.041,1003,5.431,1337,4.09,1391,2.196,1427,2.569,1730,3.371,1770,2.919,1832,3.371,1833,2.723,1850,3.371,2037,2.642,2092,3.187,2341,3.616,2433,5.431,2434,6.079,2436,3.616,2437,3.616,2438,3.616,2737,3.989,2738,5.991,2739,3.371,2740,3.989,2741,3.989,2742,3.989,2743,3.989,2744,3.989,2745,3.989,2746,5.991,2747,3.989]],["t/505",[3,0.691,8,1.199,49,1.039,50,0.753,52,2.192,61,2.449,73,1.487,74,0.533,97,1.67,105,0.814,108,1.345,167,2.348,199,4.876,213,2.552,240,2.144,420,2.723,487,3.2,569,2.218,615,2.383,767,4.513,815,3.438,825,3.894,826,3.438,994,4.894,1337,4.735,1400,4.118,1508,3.438,1770,3.566,1797,3.438,2443,5.542,2600,6.288,2748,4.118,2749,6.824,2750,4.418,2751,4.418,2752,4.418,2753,4.873,2754,4.873,2755,4.873]],["t/507",[3,0.775,7,0.85,8,1.345,11,2.22,12,2.697,13,1.61,45,0.663,49,1.001,50,0.547,52,1.814,61,2.87,73,1.503,74,0.539,96,1.679,97,2.945,108,0.977,112,3.207,114,2.22,139,4.426,144,1.878,159,2.589,160,1.374,165,3.27,167,1.704,198,1.204,199,4.101,213,2.012,222,2.496,229,1.878,233,3.207,240,1.69,248,4.168,281,1.535,420,1.389,564,1.632,569,3.041,658,2.07,659,3.996,693,2.99,717,1.912,763,1.73,767,2.804,994,2.496,1390,3.521,1391,1.948,1394,2.343,1444,4.369,1473,2.697,1480,2.343,1546,2.827,1770,2.589,1797,2.496,2078,2.99,2435,2.99,2443,4.369,2453,2.697,2512,2.99,2668,3.207,2694,3.207,2749,4.62,2750,3.207,2751,3.207,2752,3.207,2756,3.538,2757,3.538,2758,3.538,2759,3.538,2760,3.538,2761,3.538,2762,3.538,2763,3.538,2764,3.538]],["t/510",[3,0.807,7,1.367,8,1.4,20,3.134,30,3.26,45,1.447,47,2.051,52,1.545,71,0.559,74,0.504,114,3.571,125,1.825,126,3.103,127,2.573,231,5.16,658,5.132,672,4.165,745,4.809,750,4.809,1410,7.172,1411,5.16,1412,5.16,1435,4.809,1508,4.016,1793,5.16,2076,4.809,2659,5.16,2765,7.726,2766,5.691,2767,5.691,2768,5.16,2769,5.691,2770,5.691,2771,5.691,2772,5.16,2773,5.691,2774,5.691,2775,5.691,2776,5.691,2777,5.691,2778,5.691]],["t/512",[97,3.588,108,2.89,142,5.814,144,4.919,658,6.124,746,6.138,751,7.064]],["t/514",[8,2.169,13,3.166,60,3.985,99,2.385,119,4.749,140,2.56,166,5.879,211,3.511,219,4.161,349,4.909,352,6.738,1338,4.608,1362,4.07,1498,5.559,1737,5.303,1802,5.091,1941,5.559,2779,6.957,2780,6.957,2781,7.991,2782,8.772,2783,6.957]],["t/516",[1,4.457,7,1.517,33,5.295,61,3.537,71,0.62,73,0.924,74,0.559,77,2.315,83,2.127,108,1.182,126,2.537,128,2.628,133,2.506,140,1.576,148,2.374,177,1.513,250,1.802,331,3.414,348,2.273,352,4.184,354,5.047,355,5.123,356,5.047,357,5.047,358,5.047,359,5.047,360,5.047,361,5.047,362,5.338,363,5.338,364,5.338,365,5.338,366,5.338,367,5.338,917,3.265,1437,3.265,2066,3.883,2784,4.283]],["t/518",[1,3.918,7,1.377,45,1.074,49,1.163,50,1.2,61,3.332,71,0.563,73,1.136,74,0.555,105,1.296,126,2.302,128,2.385,140,2.109,148,2.154,250,1.377,282,2.004,315,3.796,330,5.196,331,3.097,352,3.796,354,4.58,355,5.3,356,4.58,357,4.58,358,4.58,359,4.58,360,4.58,361,4.58,584,4.369,1857,5.196,2785,5.731,2786,5.731]],["t/520",[8,1.872,70,5.368,97,2.608,99,2.608,133,4.45,150,2.462,156,3.839,548,4.773,598,3.839,1338,5.039,2787,7.607,2788,6.897,2789,6.897,2790,6.897,2791,6.897,2792,6.897,2793,6.897,2794,6.897,2795,6.897]],["t/522",[8,1.506,61,2.161,71,0.601,73,1.516,74,0.54,96,2.905,99,2.098,237,2.61,240,3.318,372,5.548,548,3.839,2796,7.354,2797,5.548,2798,7.354,2799,6.12,2800,5.548,2801,5.548,2802,6.12,2803,5.548,2804,6.12,2805,5.548,2806,5.548,2807,6.12]],["t/524",[7,2.251,71,0.754,99,2.632,140,3.723,154,4.492,156,3.875,162,1.215,172,3.593,333,4.311,548,4.818,598,3.875,2788,6.962,2796,6.962,2808,6.962,2809,7.679]],["t/526",[3,0.604,7,1.797,47,1.535,49,1.321,50,1.156,71,0.618,73,1.29,74,0.554,77,2.303,99,1.46,105,1.249,125,1.366,126,2.527,127,1.419,128,1.773,129,1.217,140,3.04,150,2.037,154,2.492,156,2.15,162,0.674,172,1.994,200,3.281,247,2.744,281,1.767,333,2.392,348,2.262,352,2.822,375,5.704,450,3.118,464,3.862,548,2.673,598,2.15,1633,3.404,2789,6.782,2797,3.862,2810,4.261,2811,7.481,2812,6.292,2813,4.261,2814,4.261,2815,4.261,2816,4.261,2817,3.404,2818,4.261,2819,4.261,2820,4.261,2821,4.261,2822,3.862,2823,4.261,2824,4.261]],["t/528",[7,2.251,71,0.754,99,2.632,154,4.492,156,3.875,162,1.215,172,3.593,333,4.311,352,6.701,548,4.818,598,3.875,2790,6.962,2798,6.962,2808,6.962,2825,7.679]],["t/530",[7,2.176,71,0.714,99,2.491,140,2.674,154,4.252,156,3.667,162,1.15,172,3.401,200,3.598,247,4.681,333,4.08,348,3.858,352,6.845,548,4.56,598,3.667,2791,8.214,2800,6.589,2826,7.268]],["t/532",[3,0.819,7,2.122,18,2.525,49,1.169,71,0.567,73,0.845,74,0.56,99,1.979,114,3.621,115,2.059,156,2.913,162,0.913,281,2.19,398,4.563,477,5.233,548,3.621,598,2.913,1213,6.591,1360,5.233,1493,5.233,2792,7.072,2801,5.233,2822,5.233,2827,5.772,2828,5.772,2829,5.772,2830,5.772,2831,5.772,2832,5.772,2833,5.772]],["t/534",[7,2.332,71,0.8,99,2.79,156,4.108,162,1.288,548,5.107,598,4.108,2793,7.38,2803,7.38,2834,8.14,2835,8.14]],["t/536",[7,2.332,71,0.8,99,2.79,156,4.108,162,1.288,388,7.38,548,5.107,598,4.108,2794,7.38,2805,7.38,2836,8.14]],["t/538",[3,0.641,4,2.768,7,2.392,45,0.847,47,1.629,49,0.677,71,0.646,73,0.662,74,0.525,77,2.443,99,1.55,125,1.45,126,2.64,127,1.505,129,1.291,140,2.418,148,2.91,156,2.281,162,0.715,172,2.115,219,2.704,247,2.912,281,1.269,323,7.593,334,3.19,336,5.958,348,2.4,352,4.353,509,2.086,548,4.857,598,2.281,763,3.214,1256,4.099,1427,2.912,1495,7.705,1626,3.82,1633,3.612,2328,3.447,2795,5.958,2806,4.099,2837,4.521,2838,4.521,2839,4.521,2840,6.572,2841,4.521,2842,4.521,2843,4.521,2844,4.521,2845,4.521,2846,4.521,2847,4.521,2848,4.521]],["t/541",[1,2.124,3,0.597,4,2.576,7,2.501,18,1.739,45,0.788,48,0.858,49,1.177,50,1.214,56,1.857,61,3.698,71,0.902,73,1.15,74,0.518,88,1.697,97,0.874,105,1.24,109,1.287,125,0.818,140,1.977,148,1.582,149,1.404,150,2.018,152,2.576,153,1.866,154,1.492,155,2.317,157,3.799,162,0.666,170,3.08,181,1.404,215,5.622,219,3.213,250,0.613,273,0.775,287,2.517,288,3.363,289,2.155,290,2.155,291,2.155,292,2.155,293,2.155,294,2.155,295,2.155,296,2.155,297,2.155,298,1.461,299,2.155,300,2.155,301,1.689,302,1.866,303,2.155,304,2.155,305,3.556,306,2.155,307,2.155,308,1.866,309,1.944,310,2.038,311,2.155,312,2.155,313,1.088,314,1.741,315,4.57,316,3.556,317,3.363,318,1.561,319,2.155,320,1.944,321,2.038,322,2.155]],["t/543",[3,0.638,13,2.046,49,1.156,50,1.193,56,2.531,73,1.13,74,0.512,75,4.215,88,1.457,105,1.289,118,2.752,119,3.069,129,1.284,140,3.84,146,3.172,148,3.533,150,1.455,157,4.667,169,2.476,171,2.575,172,2.104,211,2.269,237,1.917,335,3.799,349,4.618,1482,3.592,1498,3.592,1667,3.063,1781,3.799,1835,2.896,1926,4.076,1992,2.476,2185,3.799,2212,4.076,2213,4.076,2739,3.799,2781,4.076,2782,5.934,2849,4.496,2850,4.496,2851,4.496,2852,4.496,2853,4.496,2854,4.496,2855,4.496,2856,4.496,2857,4.496]],["t/545",[0,1.79,1,1.712,3,0.28,11,3.32,21,1.505,45,1.304,48,1.499,49,1.101,50,1.136,56,0.913,61,1.869,65,1.445,73,1.076,74,0.545,81,2.128,97,1.163,99,0.677,105,1.227,130,1.131,140,3.245,148,1.275,150,0.639,157,1.087,172,4.331,177,2.298,180,1.669,183,4.472,185,1.79,200,2.584,211,1.712,215,2.077,223,1.685,229,1.048,237,0.842,255,1.239,281,1.486,355,3.613,384,1.03,387,1.465,392,1.505,428,3.806,482,0.727,549,0.899,598,0.997,636,2.711,986,1.445,1278,1.669,1298,3.769,1390,1.272,1427,1.272,1463,1.308,1467,2.606,1471,5.088,1473,1.505,1522,1.669,1553,1.505,1667,0.924,1686,1.348,1730,1.669,1756,2.029,1797,1.393,1810,1.445,1849,1.669,1998,1.79,2453,1.505,2574,1.79,2768,1.79,2858,1.975,2859,1.975,2860,2.867,2861,1.578,2862,1.975,2863,3.076,2864,1.79,2865,5.292,2866,5.292,2867,1.975,2868,1.975,2869,1.975,2870,1.975,2871,1.975,2872,4.762,2873,3.564,2874,1.975,2875,2.711,2876,3.393,2877,1.578,2878,1.79,2879,1.975,2880,3.076,2881,1.975,2882,1.975,2883,1.975,2884,1.975,2885,1.975,2886,1.79,2887,1.975,2888,1.975,2889,1.975,2890,1.578,2891,1.975,2892,1.975,2893,1.975,2894,1.975,2895,1.975,2896,1.975,2897,1.975,2898,3.393,2899,1.975,2900,1.975,2901,1.975,2902,1.975,2903,1.975,2904,1.975,2905,1.975,2906,1.975,2907,1.975,2908,1.975,2909,1.975,2910,1.975,2911,1.975,2912,1.975,2913,1.975,2914,1.975,2915,1.975,2916,1.975,2917,1.975,2918,1.79,2919,1.79,2920,1.79,2921,1.79,2922,1.975,2923,1.975,2924,1.975,2925,1.975]],["t/547",[3,0.811,8,0.923,11,1.395,12,1.695,30,1.273,45,0.912,48,2.148,49,0.957,50,0.884,61,0.785,73,0.837,74,0.541,76,1.925,88,0.42,105,0.955,116,2.568,136,1.432,140,2.105,148,0.835,149,1.224,155,2.066,156,1.122,157,2.681,172,2.99,177,1.325,252,0.762,277,0.936,287,1.33,334,1.569,348,1.992,384,1.957,387,1.62,402,1.273,549,1.708,563,1.361,623,1.361,644,2.015,826,1.569,917,1.695,986,1.627,1184,4.727,1236,1.695,1353,1.878,1390,1.432,1471,4.233,1503,2.015,1699,1.878,1792,1.472,1802,1.627,1849,1.878,1900,2.015,1957,4.917,2082,1.776,2088,2.015,2130,2.015,2739,1.878,2890,1.776,2926,8.585,2927,2.223,2928,2.223,2929,2.223,2930,3.752,2931,2.223,2932,3.752,2933,2.223,2934,2.223,2935,2.223,2936,2.223,2937,3.752,2938,2.223,2939,2.223,2940,2.223,2941,2.223,2942,2.223,2943,2.223,2944,2.223,2945,2.223,2946,2.223,2947,2.223,2948,2.223,2949,2.223,2950,2.223,2951,2.223,2952,3.402,2953,2.223,2954,2.223,2955,2.223,2956,3.563,2957,3.402,2958,2.223,2959,2.223,2960,3.752,2961,3.752,2962,2.223,2963,2.223,2964,2.223,2965,2.223,2966,2.223,2967,2.223,2968,2.223,2969,2.223,2970,1.878,2971,3.752,2972,2.223,2973,3.402,2974,2.223,2975,2.223,2976,2.223,2977,2.223,2978,5.72,2979,3.752,2980,4.869,2981,4.869,2982,4.869,2983,2.223,2984,4.869,2985,2.223,2986,3.752,2987,2.223,2988,2.223,2989,2.223,2990,2.223,2991,2.223,2992,2.223,2993,2.223,2994,2.223,2995,2.223,2996,2.223,2997,2.223,2998,2.223,2999,2.223,3000,2.223,3001,2.223,3002,2.223,3003,2.223,3004,2.223,3005,2.223]],["t/549",[3,0.754,8,1.309,20,2.929,21,4.055,45,0.996,49,1.105,50,1.14,56,1.986,67,3.753,73,1.08,74,0.494,83,2.642,97,2.528,99,3.292,105,0.888,108,1.468,129,1.519,130,3.047,131,3.607,138,2.875,140,1.957,148,3.182,150,1.722,156,2.684,157,2.929,213,2.714,215,3.256,219,3.181,250,2.196,273,2.24,282,2.96,308,3.892,314,3.631,315,3.523,321,4.25,323,4.055,648,3.722,1327,3.753,1398,4.495,1463,3.523]],["t/551",[1,3.955,7,1.396,33,4.102,45,1.089,61,3.352,71,0.571,74,0.553,116,2.61,117,3.969,126,2.335,128,2.419,140,2.139,146,4.102,250,2.13,331,3.142,352,5.192,354,4.645,355,3.969,356,4.645,357,4.645,358,4.645,359,4.645,360,4.645,361,4.645,362,4.912,363,4.912,364,4.912,365,4.912,366,4.912,367,4.912,2565,4.912,2890,4.645,3006,5.813]],["t/554",[7,1.529,8,1.858,19,5.874,45,1.192,48,1.455,49,0.649,50,0.669,73,1.105,74,0.499,88,1.202,99,2.588,105,0.723,108,1.195,114,2.716,129,1.236,131,2.117,138,2.339,150,2.061,156,2.184,169,2.383,177,1.529,198,0.953,200,1.719,203,6.033,236,2.479,237,1.846,240,1.338,313,3.55,423,1.918,487,2.937,509,2.937,564,1.997,646,3.459,1126,2.867,1292,3.168,1422,3.924,1423,2.955,1424,6.259,1474,7.018,1476,6.763,1477,3.924,1478,7.035,1479,4.658,1480,2.867,1850,3.658,3007,4.329,3008,4.329,3009,4.329,3010,4.329,3011,3.459,3012,4.329,3013,4.329,3014,3.924,3015,3.459]],["t/556",[3,0.652,7,1.104,8,1.131,19,6.894,20,2.531,47,1.657,49,0.689,50,0.711,71,0.452,73,0.673,74,0.543,96,2.182,105,0.768,114,2.885,125,2.133,126,2.672,127,1.531,129,1.313,131,2.248,138,2.485,155,2.531,160,1.785,195,3.885,229,2.44,261,2.814,331,2.485,487,2.121,545,3.47,564,2.121,717,2.485,763,2.248,1424,6.044,1474,3.364,1476,3.505,1508,3.244,2325,3.364,2343,6.929,2521,4.168,2647,4.168,2699,4.168,2700,4.168,2701,7.086,2702,4.168,2703,4.168,2704,4.168,2705,4.168,2706,4.168,3014,4.168,3015,3.674,3016,4.598,3017,4.598,3018,4.598,3019,4.598,3020,4.598,3021,4.598,3022,4.598]],["t/559",[3,0.447,7,0.435,8,0.446,32,1.531,40,1.531,43,3.547,45,0.782,47,0.653,48,1.059,49,0.847,50,0.487,56,1.344,61,0.64,68,1.109,71,0.309,73,0.827,74,0.559,76,4.303,79,3.961,83,0.9,88,1.067,97,1.08,105,0.526,114,1.137,115,0.646,116,0.814,117,1.237,125,1.01,126,1.265,127,0.603,129,0.518,130,1.038,131,1.54,137,1.804,138,0.979,139,1.2,144,0.962,165,1.084,169,0.998,199,0.914,200,1.659,213,1.837,220,1.448,235,2.779,240,0.56,251,0.793,252,1.432,255,1.976,276,2.56,277,0.763,281,0.509,313,1.343,331,0.979,387,0.782,420,1.237,423,1.395,424,1.702,429,3.057,525,1.448,569,3.032,574,2.086,598,2.519,650,4.107,699,3.001,717,0.979,718,2.222,740,1.167,902,1.326,986,1.326,989,1.381,1311,3.408,1322,1.448,1337,2.852,1390,1.167,1394,1.2,1479,1.326,1509,1.2,1545,1.279,1549,2.028,1553,2.401,1578,1.448,1633,1.448,1689,1.326,1691,0.886,1756,1.084,1920,3.787,1978,1.643,2092,1.448,2103,1.531,2180,1.279,2446,1.448,2576,1.531,2660,1.643,2697,1.643,2749,1.531,2952,2.855,2957,2.855,3023,1.812,3024,1.812,3025,1.812,3026,1.812,3027,1.812,3028,1.812,3029,1.812,3030,3.15,3031,1.812,3032,4.992,3033,1.812,3034,4.177,3035,1.812,3036,1.812,3037,4.177,3038,1.812,3039,1.812,3040,1.812,3041,1.812,3042,1.812,3043,1.812,3044,4.177,3045,1.812,3046,1.812,3047,1.326,3048,3.15,3049,1.812,3050,1.812,3051,1.812,3052,3.15,3053,1.812,3054,3.15,3055,1.812,3056,1.812,3057,1.812,3058,1.812,3059,1.812,3060,1.812,3061,1.812,3062,1.812,3063,1.812,3064,1.812,3065,1.812,3066,3.15,3067,1.812,3068,1.812,3069,1.812,3070,1.812,3071,1.812,3072,3.15,3073,1.812,3074,1.812,3075,1.812,3076,1.812,3077,1.812,3078,1.812,3079,1.812,3080,1.812,3081,1.812,3082,3.15,3083,1.812,3084,1.812]],["t/561",[1,2.124,3,0.597,4,2.576,7,2.501,18,1.739,45,0.788,48,0.858,49,1.177,50,1.214,56,1.857,61,3.698,71,0.902,73,1.15,74,0.518,88,1.697,97,0.874,105,1.24,109,1.287,125,0.818,140,1.977,148,1.582,149,1.404,150,2.018,152,2.576,153,1.866,154,1.492,155,2.317,157,3.799,162,0.666,170,3.08,181,1.404,215,5.622,219,3.213,250,0.613,273,0.775,287,2.517,288,3.363,289,2.155,290,2.155,291,2.155,292,2.155,293,2.155,294,2.155,295,2.155,296,2.155,297,2.155,298,1.461,299,2.155,300,2.155,301,1.689,302,1.866,303,2.155,304,2.155,305,3.556,306,2.155,307,2.155,308,1.866,309,1.944,310,2.038,311,2.155,312,2.155,313,1.088,314,1.741,315,4.57,316,3.556,317,3.363,318,1.561,319,2.155,320,1.944,321,2.038,322,2.155]],["t/564",[3,0.707,8,0.773,18,1.017,38,1.971,50,0.957,71,0.692,73,0.906,74,0.553,88,1.677,99,1.077,105,1.034,119,2.145,129,1.768,149,1.73,157,1.73,162,0.497,211,1.585,223,1.56,240,0.971,246,2.217,273,1.513,276,1.611,284,1.928,387,2.151,392,2.395,463,1.865,487,1.45,615,1.536,658,1.838,660,5.848,746,2.081,813,5.42,815,2.217,826,3.515,1126,6.061,1159,2.655,1162,2.848,1274,2.51,1742,2.655,1756,1.879,1835,2.023,2076,5.953,2343,2.395,3085,2.655,3086,3.142,3087,3.142,3088,3.142,3089,3.142,3090,3.142,3091,3.142,3092,3.142,3093,3.142,3094,3.142,3095,3.142,3096,4.982,3097,4.982,3098,4.982,3099,3.142,3100,4.982,3101,3.142,3102,3.142,3103,3.142,3104,3.142,3105,2.395,3106,2.848,3107,6.191,3108,6.191,3109,3.142,3110,3.142,3111,3.142,3112,6.191,3113,4.982,3114,3.142,3115,3.142,3116,3.142,3117,3.142,3118,3.142]],["t/566",[3,0.881,45,1.535,50,1.266,71,0.61,73,1.199,74,0.555,105,1.368,140,2.286,150,2.011,162,0.983,172,2.907,200,2.467,284,1.701,387,2.683,428,5.363,463,1.645,1670,3.803,2875,4.964,2877,4.964,3119,6.213,3120,5.632,3121,8.193,3122,5.632,3123,5.632,3124,5.632]],["t/568",[3,1.049,7,2.39,49,1.373,50,1.144,63,3.796,71,0.727,73,1.083,74,0.456,105,1.236,108,2.043,142,4.643,162,1.171,284,2.026,463,1.959,1170,4.643,3125,7.4,3126,7.4,3127,7.4]],["t/570",[3,0.849,18,1.937,48,3.025,50,0.925,71,0.588,73,0.876,74,0.531,88,1.509,96,2.841,105,0.999,108,1.652,129,1.709,162,0.947,213,2.202,223,3.969,273,2.732,284,1.638,348,3.177,384,4.169,463,1.584,534,7.604,694,5.057,699,3.177,1292,5.848,1380,4.782,2416,8.157,3128,5.984,3129,7.992]],["t/572",[3,0.895,18,2.042,50,0.975,71,0.62,73,0.923,74,0.548,88,1.191,105,1.053,108,1.742,129,1.802,162,0.998,213,2.321,240,1.951,273,1.916,284,1.727,320,7.041,463,1.67,615,4.795,699,3.349,1194,7.805,3130,6.309,3131,6.309,3132,6.309,3133,6.309,3134,5.72]],["t/574",[3,0.995,49,1.051,50,1.085,71,0.689,73,1.027,74,0.543,88,1.673,105,1.172,129,2.004,162,1.11,284,1.921,387,3.03,463,1.858,475,4.519,549,3.193,783,6.361,1209,5.349,1835,4.519,3135,7.017,3136,7.017,3137,7.017]],["t/576",[3,0.861,19,4.286,45,1.138,49,0.91,50,1.248,52,1.649,71,0.597,73,1.327,74,0.514,75,5.198,105,1.014,129,1.735,131,2.97,138,3.282,150,1.966,162,0.961,284,1.663,298,3.479,314,4.147,420,3.169,463,1.608,466,3.224,1424,4.286,1474,4.445,1476,6.153,2325,5.906,3011,4.853,3015,4.853,3138,7.317,3139,6.074,3140,6.074,3141,6.074,3142,6.074]],["t/578",[3,0.849,45,1.121,48,2.012,49,1.348,50,0.925,51,3.663,56,2.151,60,3.428,61,2.113,63,3.07,71,0.588,73,0.876,74,0.498,76,3.07,83,2.972,84,3.663,105,0.999,108,1.652,116,2.687,152,4.892,162,0.947,254,2.927,284,1.638,462,3.755,463,1.584,466,3.177,545,4.694,772,4.379,1184,3.295,1372,6.753,1691,2.927,1957,3.428,1992,3.295,3143,5.984,3144,5.984,3145,5.984,3146,5.984]],["t/580",[3,0.709,4,1.931,45,0.936,46,2.404,48,1.06,49,0.749,50,0.487,51,1.931,56,0.849,60,1.807,61,1.114,63,1.618,71,0.31,73,0.731,74,0.524,76,1.618,83,1.566,84,1.931,88,0.943,105,0.527,108,0.871,116,1.416,127,1.05,133,1.845,136,2.031,152,4.711,160,1.225,162,0.499,181,1.736,200,1.984,223,1.566,229,1.674,235,2.892,240,2.531,281,0.885,284,0.863,313,1.345,384,1.645,423,3.128,447,2.153,462,1.979,463,0.835,466,1.674,509,2.306,545,2.607,563,3.059,569,2.824,603,3.964,615,3.764,648,1.592,658,2.923,660,3.412,663,3.993,664,3.993,667,4.223,668,3.993,669,4.223,683,2.665,699,3.294,811,2.859,1184,4.238,1311,3.412,1551,3.81,1689,2.308,1691,1.542,1835,2.031,1957,4.69,1992,1.736,2328,4.731,3011,2.52,3147,4.997,3148,3.154,3149,2.665,3150,2.665,3151,2.665,3152,2.859,3153,2.859,3154,3.154,3155,3.154,3156,3.154,3157,2.665,3158,2.665,3159,3.154,3160,2.665,3161,2.665,3162,3.154,3163,6.206,3164,3.154,3165,3.154,3166,3.154,3167,3.154,3168,3.154]],["t/582",[3,0.847,6,1.806,45,0.744,48,2.007,50,1.109,68,2.43,71,0.39,73,1.05,74,0.543,88,0.749,96,1.884,105,1.198,108,1.648,115,2.129,129,1.134,144,3.168,149,2.186,155,2.186,162,0.628,177,1.402,200,3.168,224,3.599,263,4.61,274,2.71,284,1.087,334,2.801,348,2.107,450,2.905,463,1.051,469,2.186,602,5.092,1118,5.411,1278,3.354,1287,2.905,1348,3.026,1756,2.374,1767,3.026,1792,3.954,1794,3.599,1810,4.368,1811,4.212,1822,2.905,1827,4.769,1832,3.354,1833,2.71,1887,5.411,1941,3.172,2092,3.172,3105,3.026,3169,3.97,3170,3.97,3171,3.97,3172,3.97,3173,3.97,3174,3.97,3175,3.97,3176,3.97,3177,3.97,3178,3.97,3179,3.599,3180,5.411,3181,3.97,3182,3.97,3183,3.97,3184,3.97]],["t/584",[2,4.341,3,0.902,49,0.953,50,0.983,63,3.262,71,0.625,73,0.931,74,0.521,105,1.062,116,2.855,117,5.679,142,3.989,162,1.006,168,5.081,169,3.501,235,3.126,284,1.741,349,4.487,463,1.683,525,5.081,1337,4.341,2890,5.081,3185,9.272,3186,6.359,3187,6.359,3188,6.359,3189,6.359,3190,6.359,3191,5.765,3192,6.359,3193,6.359]],["t/586",[1,3.635,2,4.918,16,5.491,43,4.519,48,2.422,49,1.079,59,4.519,71,0.708,116,3.234,117,4.918,118,4.409,162,1.14,211,3.635,284,1.972,313,3.072,410,6.087,414,5.083,463,1.907,466,3.824,467,7.614,688,6.53,1314,5.756,2526,6.087,3194,7.203]],["t/588",[3,0.717,48,1.699,50,0.781,71,0.497,73,0.74,74,0.541,88,1.779,96,2.399,105,0.844,108,1.965,129,1.444,148,1.9,162,0.8,181,2.783,200,2.007,235,1.9,240,1.563,252,2.824,263,2.593,274,3.451,277,2.129,278,4.271,284,1.384,447,3.451,463,1.338,602,5.191,1187,3.451,1228,3.567,1811,3.567,1827,4.039,2382,4.271,3152,4.582,3179,4.582,3180,4.582,3195,5.055,3196,5.055,3197,5.055,3198,5.055,3199,5.055,3200,5.055,3201,5.055,3202,5.055,3203,5.055,3204,5.055,3205,5.055,3206,5.055,3207,5.055,3208,5.055,3209,5.055]],["t/590",[3,0.813,45,1.074,48,2.96,49,1.163,50,0.886,51,3.509,52,1.556,60,3.283,61,2.024,63,2.94,71,0.563,73,0.839,74,0.517,76,2.94,83,2.847,84,3.509,88,1.662,105,0.957,108,1.582,116,2.573,129,1.637,162,0.907,177,2.024,181,3.156,221,3.509,284,1.569,447,5.3,463,1.517,466,3.042,482,3.239,509,2.644,602,4.673,1691,2.803,1992,3.156,3210,5.731,3211,3.796,3212,5.731,3213,5.731]],["t/592",[3,0.796,39,6.373,49,1.147,50,0.868,52,2.078,71,0.551,73,1.12,74,0.502,88,1.445,105,0.937,129,1.603,148,2.876,162,0.888,172,3.581,191,3.687,273,1.704,284,1.536,320,4.279,463,1.486,598,2.832,615,2.745,1194,4.743,1230,4.743,1269,4.743,1480,3.718,1767,5.835,1946,6.467,3214,5.613,3215,7.895,3216,5.613,3217,5.613,3218,5.613,3219,7.654,3220,8.709,3221,7.654]],["t/594",[3,0.775,18,1.768,30,3.129,45,1.407,50,0.844,71,0.537,73,1.099,74,0.547,105,0.912,129,1.56,131,4.742,138,4.06,162,0.864,211,2.756,223,2.713,273,2.281,284,1.495,313,2.329,463,1.446,615,2.671,660,3.729,813,3.854,815,5.301,1126,6.422,1549,4.838,2540,4.952,3222,5.462,3223,7.512,3224,5.462,3225,8.587,3226,5.462,3227,5.462]],["t/596",[2,4.242,3,0.881,38,5.14,49,1.228,50,0.96,71,0.61,73,1.199,74,0.504,88,1.173,105,1.037,162,0.983,171,3.559,191,4.88,196,4.242,200,2.467,284,1.701,462,3.898,463,1.645,469,3.421,482,2.286,569,2.827,603,3.488,681,5.25,699,3.298,1136,3.716,1797,4.384,3228,6.213,3229,4.964,3230,6.213,3231,5.25,3232,4.964,3233,4.964]],["t/598",[3,0.813,38,4.871,45,1.074,48,3.172,49,1.163,50,0.886,51,3.509,60,3.283,61,2.024,63,2.94,71,0.563,73,0.839,74,0.526,76,2.94,83,2.847,84,3.509,88,1.662,105,0.957,108,1.582,116,2.573,162,0.907,181,3.156,200,3.083,221,3.509,284,1.569,462,3.596,463,1.517,466,3.042,469,3.156,482,2.109,603,4.358,699,3.042,1691,2.803,1797,4.044,1992,3.156,3211,3.796,3234,5.731,3235,5.731]],["t/600",[71,0.842,162,1.356,252,2.937,284,2.346,463,2.269,2483,7.768,3236,8.569]],["t/602",[3,0.807,18,1.842,45,1.066,48,1.913,49,1.158,50,0.88,51,3.484,56,1.532,60,3.26,61,2.01,63,2.919,71,0.559,73,0.833,74,0.516,76,2.919,83,2.827,84,3.484,88,1.656,105,0.95,108,1.571,116,2.555,129,1.626,157,3.134,162,0.9,181,4.254,223,2.827,240,2.389,273,1.728,284,1.558,463,1.507,466,3.021,699,3.021,815,5.452,1390,3.665,1691,2.783,1992,3.134,2210,4.016,2477,5.16,2970,4.809,3211,3.77,3237,7.726,3238,5.691]],["t/604",[18,2.689,49,1.245,56,2.236,71,0.816,162,1.314,273,2.522,284,2.274,463,2.199,1670,5.085,3239,8.307]],["t/606",[3,0.78,18,1.78,45,1.03,48,1.849,49,1.131,50,0.85,51,3.366,56,1.48,60,3.15,61,1.942,63,2.821,71,0.54,73,0.805,74,0.511,76,2.821,83,2.731,84,3.366,88,1.627,105,0.918,108,1.518,116,2.469,129,1.571,157,3.028,162,0.87,181,4.155,213,2.023,223,2.731,240,1.7,273,1.67,284,1.505,463,1.456,466,2.919,699,2.919,815,3.88,1257,3.642,1390,3.542,1691,2.689,1992,3.028,2210,3.88,2970,4.647,3211,3.642,3240,5.499,3241,5.499,3242,5.499,3243,5.499,3244,5.499,3245,5.499,3246,5.499,3247,5.499,3248,5.499]],["t/608",[18,2.689,49,1.245,71,0.816,162,1.314,213,3.056,273,2.522,284,2.274,463,2.199,1670,5.085,3249,8.307]],["t/610",[3,1.096,49,1.41,50,1.356,71,0.559,73,1.377,74,0.504,88,1.458,105,1.465,129,1.626,139,3.77,140,2.094,162,0.9,172,2.663,200,2.26,284,1.558,384,2.969,387,2.458,424,3.076,428,3.329,463,1.507,549,3.516,1200,4.339,1362,3.329,2348,5.16,3138,5.16,3250,5.691,3251,5.691,3252,5.16,3253,5.691,3254,4.809,3255,5.691,3256,5.691,3257,5.16,3258,5.691,3259,5.691,3260,5.691,3261,5.691]],["t/612",[3,0.895,18,2.042,45,1.182,48,2.121,49,1.24,50,0.975,51,3.862,60,3.614,61,2.228,63,3.236,71,0.62,73,0.923,74,0.52,76,3.236,83,3.134,84,3.862,88,1.191,105,1.053,108,1.742,116,2.833,129,1.802,162,0.998,273,1.916,284,1.727,463,1.67,466,3.349,475,4.063,1386,5.72,1691,3.086,1992,3.474,3262,8.277,3263,5.72,3264,6.309,3265,6.309]],["t/614",[3,0.895,7,1.988,8,2.036,49,1.24,50,0.975,56,2.228,71,0.62,73,0.923,74,0.53,88,1.191,105,1.053,114,3.958,129,1.802,162,0.998,238,4.063,273,2.513,284,1.727,287,3.773,463,1.67,470,5.84,1111,4.452,1370,4.452,1371,6.759,1385,5.72,1442,5.331,2179,5.331,3266,6.309]],["t/616",[3,0.843,45,1.113,49,0.89,50,0.918,56,1.599,71,0.584,73,0.869,74,0.511,88,1.121,105,0.992,129,1.697,137,3.403,162,0.94,223,2.951,273,2.415,284,1.626,348,3.153,463,1.573,470,4.192,718,4.192,1167,6.326,1184,4.936,1228,5.612,1370,4.192,1371,5.82,1377,5.386,1888,5.386,2179,6.72,2220,5.386,2468,5.386,3267,7.953,3268,7.953,3269,5.941,3270,5.941]],["t/618",[3,0.819,18,1.868,49,1.169,50,0.892,56,1.554,71,0.567,73,0.845,74,0.527,88,1.09,105,0.964,115,2.783,129,1.649,157,4.295,162,0.913,172,2.701,211,2.913,223,2.867,240,3.056,251,3.412,252,1.979,273,1.753,284,1.58,463,1.528,545,3.011,615,4.321,699,3.064,808,4.877,813,4.073,825,4.612,826,4.073,1353,4.877,3085,4.877,3271,5.772,3272,5.772,3273,5.772,3274,5.772]],["t/620",[3,0.978,49,1.444,50,1.066,56,2.36,71,0.678,73,1.01,74,0.532,105,1.152,115,3.128,129,1.97,162,1.091,251,3.017,252,2.365,284,1.888,463,1.826,3275,8.767,3276,8.767,3277,6.898,3278,6.898]],["t/622",[3,0.687,45,0.907,49,1.035,50,0.749,71,0.476,73,1.011,74,0.547,88,1.304,96,2.299,105,0.809,108,1.337,125,1.553,162,0.766,200,3.683,211,2.444,235,2.595,240,2.488,273,1.471,284,1.326,313,2.945,423,3.06,429,6.788,463,1.282,615,3.936,658,4.708,660,5.495,1470,3.307,2180,6.191,2772,4.391,3279,4.844,3280,5.836,3281,4.093,3282,4.844,3283,7.414,3284,4.844,3285,4.844]],["t/624",[3,0.7,49,1.048,50,0.762,52,1.339,71,0.484,73,1.024,74,0.529,88,1.534,96,2.341,105,0.824,129,1.409,150,2.264,162,0.78,168,7.068,200,3.513,213,1.815,235,2.629,240,1.525,284,1.35,313,2.103,318,4.282,423,3.1,429,6.473,463,1.306,509,2.276,658,4.092,659,2.95,1480,3.267,1889,3.941,1941,3.941,2180,5.736,3280,5.911,3281,4.168,3283,6.869,3286,6.996,3287,4.932,3288,4.932,3289,4.932,3290,6.996,3291,4.932,3292,4.932,3293,4.932]],["t/626",[3,0.916,18,2.091,50,0.998,71,0.635,73,0.945,74,0.533,88,1.219,105,1.079,129,1.845,160,2.508,162,1.022,273,1.962,282,2.258,284,1.768,333,3.626,463,1.71,699,3.429,1151,4.924,1292,6.837,2714,5.856,3294,6.46,3295,5.856,3296,6.46,3297,6.46,3298,8.405,3299,8.405,3300,6.46,3301,6.46]],["t/628",[3,0.819,45,1.081,48,1.941,49,1.324,50,1.206,56,2.1,71,0.567,73,1.142,74,0.518,75,3.717,101,4.877,105,0.964,140,2.124,149,3.178,150,1.868,157,3.178,162,0.913,229,3.064,250,1.386,282,2.018,284,1.58,313,3.768,314,3.941,315,3.823,423,2.557,463,1.528,509,2.663,1671,8.01,1691,2.823,2210,4.073,2214,5.233,3302,5.772,3303,5.772,3304,7.8,3305,5.772,3306,5.772,3307,5.772]],["t/630",[3,1.022,18,2.332,49,1.079,50,1.113,71,0.708,73,1.054,74,0.448,88,1.36,105,1.203,108,1.988,148,2.707,162,1.14,172,3.371,213,2.65,223,3.578,273,2.187,281,2.022,284,1.972,462,4.519,463,1.907,1200,5.491,3308,7.203,3309,7.203,3310,7.203]],["t/632",[3,0.938,18,2.142,49,0.991,50,1.023,56,1.781,71,0.65,73,0.968,74,0.526,88,1.885,105,1.105,150,2.763,151,5.592,152,5.226,162,1.047,177,2.337,284,1.811,462,4.152,463,1.752,509,3.053,1480,4.383,1501,5.045,3311,6.617,3312,8.537,3313,6.617]],["t/634",[2,2.894,3,0.601,48,2.107,49,1.117,50,0.655,71,0.416,73,0.917,74,0.562,88,0.8,105,0.708,162,0.671,191,4.435,255,2.659,276,2.174,281,1.76,284,1.16,424,2.291,462,2.659,463,1.122,469,2.334,482,2.744,563,3.837,569,4.19,603,4.187,681,5.296,682,4.778,764,3.231,1136,2.535,1170,2.659,1357,3.581,1432,2.991,1734,3.842,1792,2.807,1969,3.581,3229,3.387,3231,3.581,3232,3.387,3233,3.387,3314,4.238,3315,5.296,3316,3.581,3317,4.238,3318,4.238,3319,4.238,3320,3.581,3321,3.387,3322,3.581,3323,3.581,3324,3.581,3325,3.581,3326,3.581,3327,3.581,3328,3.581]],["t/636",[3,0.796,49,1.305,50,1.346,60,3.215,61,1.982,71,0.551,73,1.479,74,0.502,105,1.454,129,2.487,130,3.215,131,2.745,140,3.442,150,2.477,156,2.832,157,3.09,162,0.888,235,2.109,282,3.045,284,1.536,315,5.069,419,4.107,463,1.486,500,4.485,509,2.59,648,3.862,1463,3.718,1550,4.485,3329,5.613,3330,5.613,3331,5.613]],["t/638",[3,0.909,45,1.2,48,2.155,49,1.253,50,0.991,51,3.923,56,1.725,60,3.671,61,2.263,63,3.287,71,0.63,73,0.938,74,0.522,76,3.287,83,3.183,84,3.923,88,1.21,105,1.07,108,1.769,116,2.877,129,1.83,162,1.014,284,1.754,418,4.021,463,1.697,466,3.402,549,2.916,1691,3.134,1992,3.529,2144,5.81,3332,6.409,3333,6.409,3334,6.409]],["t/640",[3,1.011,38,3.718,45,1.11,48,2.398,49,0.888,50,1.102,51,2.406,52,1.608,60,2.252,61,1.388,63,2.016,71,0.386,73,1.044,74,0.547,76,2.016,83,1.952,84,2.406,88,1.499,105,1.191,108,1.085,116,1.765,140,2.921,150,1.272,162,0.622,172,3.715,177,1.388,180,3.322,183,3.322,187,4.735,211,1.984,221,3.627,284,1.076,392,2.997,428,3.466,463,1.041,466,2.087,482,1.446,509,1.814,1170,2.466,1314,3.141,1471,3.925,1509,2.604,1691,1.923,1833,2.684,1992,2.164,2860,5.007,2863,3.564,2864,5.372,2875,3.141,2877,3.141,2918,3.564,2919,3.564,2920,3.564,2921,3.564,3120,3.564,3122,3.564,3123,3.564,3124,5.372,3211,2.604,3335,2.997,3336,3.931,3337,5.925,3338,3.931,3339,3.931,3340,3.931,3341,3.931,3342,3.931]],["t/642",[3,0.802,27,6.663,45,1.44,49,1.152,50,0.874,52,1.534,56,1.521,71,0.555,73,1.373,74,0.515,88,1.067,105,0.944,118,3.46,140,2.08,150,2.489,162,0.894,172,4.09,211,2.852,221,3.46,276,2.899,277,3.239,284,1.547,428,3.306,463,1.496,569,2.572,652,2.807,1257,3.743,1344,3.858,1940,4.776,2956,5.627,3254,4.776,3335,4.309,3343,5.652,3344,5.652,3345,5.652,3346,5.652,3347,5.652,3348,5.652]],["t/644",[3,1.122,45,1.482,50,0.912,71,0.579,73,1.158,74,0.521,105,0.985,127,1.964,148,2.974,150,1.909,162,0.933,172,3.703,229,3.13,235,3.357,284,1.614,313,2.515,428,4.63,463,1.561,509,2.721,563,3.61,648,2.976,699,4.201,1257,5.242,1311,4.026,1739,5.347,3105,4.496,3254,4.984,3349,4.984,3350,5.898,3351,5.898,3352,5.898,3353,5.898,3354,5.898,3355,5.898]],["t/646",[3,0.888,50,0.968,56,1.685,71,0.615,73,0.916,74,0.529,88,1.737,105,1.045,148,3.095,162,0.99,169,3.447,177,2.211,181,3.447,229,3.323,282,2.189,284,1.714,463,1.658,509,2.889,549,2.849,598,3.159,648,3.159,741,4.032,1480,4.147,1667,2.93,1696,6.58,1992,3.447,2748,5.29,2875,5.003,3356,5.676,3357,6.261,3358,6.261,3359,6.261]],["t/648",[3,0.995,18,3.144,50,1.085,56,2.386,71,0.689,73,1.027,74,0.534,88,1.673,105,1.172,129,2.004,162,1.11,169,3.863,284,1.921,463,1.858,480,4.648,1209,6.756,1384,5.929,3360,7.017]],["t/650",[3,1.193,49,0.572,50,1.3,71,0.57,73,1.231,74,0.566,88,0.721,99,1.31,105,1.307,129,2.403,140,1.406,154,2.235,162,0.604,169,2.103,172,1.788,181,2.103,251,1.671,284,1.046,333,2.145,463,1.535,623,4.29,902,4.243,1572,5.257,1670,2.339,3047,2.796,3361,3.463,3362,8.413,3363,8.413,3364,3.82,3365,3.82,3366,3.82,3367,3.82,3368,3.82,3369,3.82,3370,3.82,3371,3.82,3372,3.82,3373,3.82,3374,3.82,3375,3.82,3376,3.82,3377,3.82,3378,3.82,3379,3.82,3380,5.799,3381,3.82,3382,3.82,3383,3.82,3384,7.008,3385,3.82,3386,3.82,3387,3.82]],["t/652",[3,0.74,45,0.977,48,2.447,49,1.256,50,0.806,51,3.193,52,1.416,60,2.988,61,1.842,63,2.676,71,0.512,73,0.764,74,0.514,76,2.676,83,2.591,84,3.193,88,1.864,105,0.871,108,1.44,116,2.342,129,1.49,140,1.919,154,3.052,162,0.825,169,2.872,172,2.441,177,1.842,211,2.633,221,3.193,284,1.428,333,4.085,463,1.381,466,2.769,482,1.919,509,2.407,623,5.13,1691,2.551,1833,3.562,1992,2.872,3047,3.818,3211,3.455,3388,5.217,3389,5.217,3390,5.217,3391,5.217,3392,5.217,3393,8.38,3394,5.217]],["t/654",[3,0.717,48,1.699,49,1.234,50,0.781,52,1.372,56,1.361,71,0.497,73,0.74,74,0.531,88,0.954,105,0.844,115,3.363,118,3.094,129,1.444,140,1.86,154,2.957,162,0.8,169,2.783,172,3.855,177,1.785,221,3.094,241,3.853,251,4.277,252,2.44,284,1.384,333,3.996,348,2.683,463,1.338,482,1.86,509,2.332,623,4.357,652,2.511,1470,3.451,1700,3.567,3047,3.699,3211,3.348,3361,4.582,3395,6.015,3396,4.271,3397,5.055,3398,7.118,3399,7.118,3400,7.118]],["t/656",[3,0.695,27,5.31,48,1.648,49,1.214,50,0.758,52,1.891,56,1.32,71,0.482,73,0.718,74,0.522,88,0.925,105,0.819,118,3.001,129,1.4,140,1.804,154,2.868,162,0.776,169,2.699,172,3.791,177,1.731,211,2.474,221,4.264,241,3.737,276,3.573,284,1.342,333,3.91,348,2.602,387,3.499,428,2.868,463,1.298,482,1.804,509,2.262,623,4.264,652,2.435,902,5.929,1344,3.347,1470,3.347,1700,3.459,3047,3.587,3211,3.247,3335,3.737,3396,4.143,3401,8.822,3402,4.902,3403,4.902,3404,6.966,3405,6.966,3406,6.966,3407,4.902]],["t/658",[3,0.708,27,5.379,48,1.679,49,1.226,50,0.772,52,1.915,56,1.344,71,0.49,73,0.731,74,0.517,88,0.942,105,0.834,118,3.056,129,1.426,140,1.837,154,2.921,162,0.79,169,2.749,172,3.829,177,1.763,211,2.519,221,4.319,241,3.806,276,3.619,277,2.972,284,1.367,333,3.961,348,2.65,387,4.206,428,2.921,463,1.322,482,1.837,509,2.304,623,4.319,652,2.48,1344,3.409,1470,3.409,1700,3.523,1756,2.986,2956,5.163,3047,3.654,3211,3.307,3335,3.806,3396,4.219,3408,4.993,3409,4.993,3410,4.993,3411,4.993,3412,7.056]],["t/660",[3,0.94,4,2.799,45,1.241,46,3.485,49,0.685,50,0.707,71,0.449,73,0.97,74,0.546,88,1.471,105,0.763,127,1.522,129,1.306,133,2.675,150,1.48,160,1.775,162,0.723,172,3.1,181,2.517,200,2.631,229,2.427,235,2.928,240,1.413,281,1.284,284,1.251,313,1.95,384,2.385,447,3.121,463,1.21,509,3.057,563,2.799,569,3.546,623,4.77,648,2.307,699,4.136,1311,3.121,1769,3.485,1957,3.795,3105,3.485,3149,3.863,3150,3.863,3151,3.863,3157,3.863,3158,3.863,3160,3.863,3161,3.863,3349,3.863,3413,6.625,3414,4.572,3415,4.572,3416,4.572,3417,4.572,3418,4.145,3419,4.145,3420,4.145,3421,4.572]],["t/662",[3,0.868,49,0.917,50,0.946,71,0.601,73,1.187,74,0.55,105,1.022,129,1.748,162,0.968,169,3.369,235,2.3,240,1.892,254,2.993,255,6.079,277,2.578,284,1.675,463,1.62,764,4.665,994,4.318,1642,4.89,3422,6.12,3423,6.12,3424,9.099,3425,6.12,3426,6.12,3427,6.12,3428,6.12,3429,6.12,3430,6.12]],["t/664",[3,1.046,18,1.722,49,1.489,50,1.309,52,1.444,71,0.523,73,1.338,74,0.507,88,1.004,105,1.414,116,2.388,129,1.519,148,1.999,162,0.841,199,2.684,211,2.684,223,4.206,277,2.24,284,1.456,463,1.408,549,2.421,741,3.426,767,4.69,882,4.495,885,4.055,1501,4.055,2037,3.523,2861,4.25,2956,3.892,3263,4.822,3431,5.319,3432,5.319,3433,5.319,3434,5.319,3435,5.319,3436,5.319,3437,5.319,3438,5.319,3439,5.319,3440,7.376]],["t/666",[3,0.663,8,1.657,18,1.514,49,1.183,50,1.22,52,1.27,71,0.459,73,1.264,74,0.509,88,0.883,105,1.318,129,1.336,140,2.478,149,2.575,162,0.74,172,2.188,181,2.575,199,2.36,200,2.674,211,3.399,223,3.345,229,2.483,240,1.446,269,3.565,277,1.97,284,1.28,298,2.679,384,2.44,428,3.94,447,3.193,463,1.238,482,1.721,623,5.286,659,2.797,741,3.012,767,4.429,885,3.565,1501,3.565,1670,2.863,2037,3.098,2861,3.737,2877,3.737,2878,4.24,2886,4.24,2956,3.422,3015,6.306,3441,4.677,3442,4.677,3443,6.735,3444,4.677,3445,4.677,3446,4.677,3447,4.677,3448,4.677]],["t/668",[3,0.759,18,1.733,49,1.273,50,1.313,52,1.453,63,3.801,71,0.526,73,1.342,74,0.495,88,1.011,105,1.419,129,1.529,139,3.546,162,0.847,199,2.702,211,2.702,221,3.278,223,3.68,240,1.655,273,1.626,277,2.255,284,1.466,463,1.418,549,3.372,741,4.772,767,4.704,813,3.778,885,4.082,1472,4.854,1501,4.082,2037,3.546,2861,4.278,2956,3.918,3252,4.854,3257,4.854,3335,4.082,3449,5.354,3450,5.354,3451,4.854,3452,5.354,3453,5.354,3454,5.354,3455,5.354]],["t/670",[19,6.056,20,3.673,45,1.608,52,2.33,71,0.655,73,0.976,88,1.62,118,4.084,159,4.882,162,1.055,213,2.455,229,3.541,250,1.602,284,1.826,313,2.845,423,2.956,463,1.766,659,3.99,813,4.707,1409,6.048,1424,6.056,1465,6.048,1474,6.28,1476,6.543,1478,5.638,3011,5.331,3456,6.672]],["t/672",[3,1.059,49,1.119,50,1.154,56,2.48,71,0.734,73,1.093,74,0.519,105,1.247,129,2.133,162,1.181,284,2.044,463,1.977,3457,9.214,3458,6.77,3459,7.468,3460,7.468]],["t/674",[3,0.906,4,2.664,45,1.197,46,3.317,49,0.652,50,0.673,56,1.72,71,0.427,73,0.935,74,0.542,88,1.43,105,0.727,127,1.449,129,1.243,133,2.546,136,2.803,150,1.409,160,1.69,162,0.688,181,3.519,200,3.008,229,2.31,235,2.846,240,1.345,273,1.941,281,1.222,284,1.191,313,1.856,384,2.27,447,4.363,463,1.152,509,3.495,563,2.664,569,3.447,648,2.196,699,4.02,1311,2.971,1769,4.872,1957,3.661,2284,3.945,2328,5.774,3105,3.317,3149,3.677,3150,3.677,3151,3.677,3157,3.677,3158,3.677,3160,3.677,3161,3.677,3349,3.677,3418,3.945,3419,3.945,3420,3.945,3461,6.391,3462,4.352,3463,4.352,3464,4.352,3465,4.352,3466,4.352]],["t/676",[3,1.022,49,1.35,50,1.113,71,0.708,73,1.054,74,0.512,105,1.203,129,2.057,131,4.406,138,3.893,162,1.14,213,3.315,281,2.022,284,1.972,463,1.907,3458,6.53,3467,9.01,3468,7.203]],["t/678",[3,0.824,38,3.647,49,1.174,50,1.211,61,2.053,71,0.571,73,1.298,74,0.472,77,3.142,105,1.309,140,2.139,148,2.185,150,2.537,156,4.475,157,3.201,162,0.92,282,2.74,284,1.591,463,1.539,648,2.934,652,2.887,727,5.27,741,3.744,763,2.843,1463,3.85,1480,3.85,1992,3.201,2043,4.912,2443,4.645,2448,4.912,2670,5.27,2748,4.912,3321,4.645,3356,7.106,3469,5.813,3470,5.813,3471,5.813,3472,5.813,3473,5.813]],["t/680",[3,1.018,49,1.347,50,1.11,61,1.808,71,0.705,73,1.051,74,0.554,105,1.199,140,3.309,156,2.583,157,2.818,162,0.81,200,2.033,235,1.924,250,1.229,284,1.401,315,4.756,348,2.717,402,2.932,463,1.355,569,3.268,648,2.583,1151,3.902,1395,2.105,1642,4.09,3474,5.118,3475,5.118,3476,8.295,3477,5.118,3478,5.118,3479,5.118,3480,5.118,3481,7.181,3482,5.118,3483,5.118,3484,5.118,3485,7.181,3486,5.118]],["t/682",[2,3.193,3,0.663,45,0.876,49,1.009,50,0.723,71,0.459,73,0.986,74,0.561,88,0.883,105,0.781,148,1.758,150,1.514,162,0.74,191,4.731,255,2.934,281,1.891,284,1.28,424,2.528,462,2.934,463,1.238,482,1.721,563,2.863,569,4.337,603,3.781,682,5.134,1136,4.028,1432,3.3,1969,5.691,3229,5.381,3231,3.952,3232,3.737,3233,3.737,3315,3.952,3316,3.952,3320,3.952,3321,3.737,3322,3.952,3323,3.952,3324,3.952,3325,3.952,3326,3.952,3327,3.952,3328,3.952,3487,4.677]],["t/684",[2,3.053,3,0.634,45,0.838,49,0.977,50,0.691,71,0.439,73,0.954,74,0.56,88,0.844,105,0.747,148,1.68,150,1.447,162,0.707,191,4.667,222,3.155,255,2.805,281,1.83,284,1.224,424,2.416,462,2.805,463,1.184,482,1.645,563,2.737,569,4.27,603,3.66,682,4.97,1136,3.899,1432,3.155,1728,5.268,1831,3.778,3229,5.209,3232,3.573,3233,3.573,3315,3.778,3316,3.778,3320,3.778,3321,3.573,3322,3.778,3323,3.778,3324,3.778,3325,3.778,3326,3.778,3327,3.778,3328,3.778,3488,4.471,3489,4.471,3490,4.471]],["t/686",[3,1.059,18,2.417,71,0.734,74,0.497,115,2.664,150,2.417,162,1.181,252,2.56,284,2.044,333,4.192,395,5.269,463,1.977,480,4.946,1228,6.501,1384,6.31,1940,6.31,3395,6.31,3491,7.468]],["t/688",[3,0.992,8,1.213,18,1.596,30,2.825,45,0.924,49,1.218,50,1.081,71,0.799,73,1.367,74,0.523,79,2.769,88,0.931,105,1.168,108,1.361,129,1.998,130,2.825,131,4.744,138,4.393,150,1.596,162,1.107,213,1.815,240,1.525,254,2.412,277,2.077,284,2.225,463,2.152,487,2.276,545,2.573,642,3.76,654,4.471,672,3.609,1372,4.168,2106,4.471,2210,3.48,2672,4.471,3492,4.932,3493,4.932,3494,4.932,3495,4.932,3496,4.932,3497,4.932,3498,4.932,3499,4.932,3500,4.932]],["t/690",[3,1.014,18,1.646,45,0.953,49,1.239,50,1.105,52,1.381,71,0.5,73,1.21,74,0.47,88,0.96,99,1.744,105,1.194,108,1.973,115,1.814,148,2.687,149,2.801,150,1.646,162,0.805,169,2.801,191,3.982,211,2.567,213,1.871,236,2.913,240,1.573,246,5.044,251,2.225,252,1.744,268,3.722,273,1.545,284,1.392,348,2.7,402,2.913,463,1.347,469,2.801,509,2.347,549,3.253,615,2.487,693,4.298,699,2.7,1269,4.298,1274,4.064,1471,3.369,1742,4.298,1835,3.276,2037,3.369,2103,4.298,2880,4.611,3215,4.611,3501,5.086,3502,5.086,3503,4.611,3504,5.086,3505,5.086,3506,5.086,3507,5.086]],["t/692",[3,0.843,45,1.113,49,1.192,50,0.918,70,4.192,71,0.584,73,1.164,74,0.511,105,0.992,108,1.64,130,3.403,131,3.889,138,3.211,162,0.94,199,4.013,213,2.186,240,1.837,277,2.502,284,1.626,463,1.573,545,4.149,767,4.599,950,7.21,1337,5.429,1578,4.747,1689,4.347,1833,4.056,2037,3.935,2210,4.192,3503,5.386,3508,5.941,3509,7.953,3510,5.941,3511,5.941]],["t/694",[3,0.954,18,2.177,48,2.262,50,1.04,71,0.661,73,0.984,74,0.529,88,1.629,105,1.123,108,1.857,129,1.921,162,1.064,223,3.341,240,2.667,273,2.043,284,1.841,463,1.781,482,2.475,615,3.29,699,3.571,815,6.088,2478,6.098,2479,6.098,3295,6.098,3451,6.098]],["t/696",[3,0.686,45,0.567,48,1.625,49,1.205,50,0.747,71,0.475,73,0.707,74,0.539,88,1.655,97,1.657,105,0.807,108,0.835,109,1.526,115,1.724,152,1.852,162,0.479,177,1.068,198,0.666,235,1.137,240,2.132,252,1.657,269,3.685,281,0.849,287,1.809,298,2.769,313,1.29,420,2.371,487,1.396,545,1.578,563,1.852,569,2.2,574,2.004,751,3.685,772,3.537,1182,2.891,1184,2.662,1234,2.742,1287,2.213,1467,1.323,1470,4.122,1549,3.113,1551,4.603,1688,2.556,1835,1.948,1957,2.769,2082,3.862,2180,3.411,2227,2.742,2325,2.213,2382,2.556,2973,4.382,3512,3.025,3513,3.025,3514,3.025,3515,3.025,3516,4.834,3517,4.834,3518,4.834,3519,6.038,3520,6.038,3521,4.834,3522,3.025,3523,8.039,3524,4.834,3525,3.025,3526,4.834,3527,3.025,3528,3.025,3529,3.025,3530,3.025,3531,3.025,3532,3.025,3533,3.025,3534,3.025,3535,6.038,3536,3.025,3537,3.025,3538,3.025,3539,3.025,3540,3.025,3541,3.025,3542,3.025,3543,3.025,3544,4.834,3545,4.834,3546,4.834,3547,3.025,3548,3.025,3549,3.025,3550,3.025,3551,3.025,3552,3.025,3553,3.025]],["t/698",[3,0.978,50,1.066,59,5.501,70,4.867,71,0.678,73,1.01,74,0.532,105,1.152,108,1.904,129,1.97,162,1.091,223,3.426,284,2.638,313,2.941,414,4.867,463,1.826,598,3.481,650,5.807,3554,6.898,3555,6.898,3556,6.898]],["t/700",[71,0.842,162,1.356,252,2.937,284,2.346,463,2.269,3557,8.569,3558,8.569]],["t/702",[3,0.895,18,2.042,49,1.384,50,1.428,56,1.698,71,0.62,73,1.352,74,0.52,105,1.542,108,1.742,150,2.042,162,0.998,211,3.184,213,2.321,277,2.658,281,1.771,284,2.266,463,1.67,767,3.236,3191,5.72,3559,6.309,3560,6.309,3561,6.309,3562,6.309,3563,6.309,3564,6.309,3565,6.309]],["t/704",[3,0.874,45,1.155,49,0.924,50,0.953,52,1.674,56,1.66,71,0.606,73,0.902,74,0.527,88,1.539,105,1.03,129,1.761,141,4.927,142,3.868,162,0.975,200,2.448,277,2.597,284,1.688,308,4.512,333,3.461,463,1.632,475,3.971,764,4.7,1187,4.209,1756,3.688,2860,5.21,3566,9.133,3567,6.166,3568,6.166,3569,6.166,3570,6.166,3571,6.166,3572,8.152,3573,6.166]],["t/706",[3,0.836,18,1.909,50,0.912,70,4.161,71,0.579,73,0.863,74,0.55,88,1.494,105,0.985,108,1.628,129,1.684,162,0.933,191,2.841,223,2.929,240,2.447,273,1.791,284,2.166,463,1.561,615,2.884,660,4.026,808,4.984,813,5.584,825,4.712,826,5.584,1159,4.984,1274,4.712,1338,3.906,3106,5.347,3134,5.347,3574,5.898,3575,5.898,3576,5.898,3577,5.898,3578,5.898]],["t/708",[3,0.916,49,1.259,50,0.998,59,5.862,71,0.635,73,0.945,74,0.523,105,1.079,108,2.579,129,1.845,162,1.022,281,1.814,284,2.557,414,4.558,463,1.71,598,4.241,650,5.567,671,5.458,1833,4.41,2523,7.62,2663,7.62,3579,6.46]],["t/710",[3,0.735,50,0.801,71,0.509,73,0.759,74,0.543,88,0.978,105,0.866,109,2.616,129,1.48,155,2.854,162,0.82,211,2.616,213,1.907,273,2.536,284,1.419,298,2.969,418,5.673,463,1.372,469,2.854,551,3.763,598,4.214,694,4.38,699,3.846,746,4.799,1126,5.532,1153,8.625,1200,3.952,1338,4.799,1380,4.142,1392,4.38,1463,3.433,2075,4.699,3580,5.184,3581,5.184,3582,7.245,3583,5.184,3584,5.184]],["t/712",[3,0.938,50,1.023,71,0.65,73,1.249,74,0.514,105,1.105,129,1.89,131,4.884,138,5.108,162,1.047,254,3.236,277,2.787,284,1.811,313,2.822,463,1.752,569,3.011,1482,5.287,2229,5.592,2817,5.287,2872,5.287,2873,5.287,3585,5.592,3586,6.617,3587,6.617,3588,5.592]],["t/714",[3,0.902,50,0.983,71,0.625,73,1.218,74,0.521,75,4.095,88,1.57,105,1.062,129,1.816,131,5.121,138,5.011,162,1.006,277,2.678,284,1.741,313,2.712,463,1.683,569,2.894,1553,4.847,2817,5.081,2872,5.081,2873,5.081,3585,5.373,3588,5.373,3589,6.359,3590,6.359,3591,6.359]],["t/716",[3,0.946,50,1.031,71,0.655,73,1.256,74,0.515,88,1.62,105,1.114,129,1.905,131,4.899,138,5.128,162,1.055,277,2.81,284,1.826,463,1.766,569,3.036,2817,5.331,2872,5.331,2873,5.331,3585,5.638,3588,5.638,3592,6.672,3593,6.672,3594,6.672]],["t/718",[3,0.916,50,0.998,56,2.515,71,0.635,73,0.945,74,0.523,81,4.053,105,1.079,115,2.998,129,1.845,144,3.429,162,1.022,252,2.214,273,1.962,284,1.768,333,3.626,463,1.71,699,3.429,1184,4.628,1407,5.162,1410,4.924,1686,4.41,3085,5.458,3395,5.458,3595,8.405,3596,6.46,3597,6.46,3598,6.46]],["t/720",[3,0.759,8,1.823,45,1.003,49,0.802,50,0.828,71,0.526,73,1.084,74,0.537,88,1.399,96,2.542,105,0.894,108,1.478,125,1.717,129,1.529,162,0.847,200,2.942,211,2.702,235,2.785,240,1.655,273,1.626,284,1.466,313,3.16,423,3.283,429,5.422,463,1.418,615,2.618,663,5.921,664,4.278,1470,3.655,1508,3.778,2180,3.778,3153,4.854,3280,6.261,3281,4.524,3283,4.524,3599,5.354,3600,5.354,3601,5.354,3602,5.354,3603,5.354,3604,5.354,3605,5.354,3606,5.354,3607,5.354]]],"invertedIndex":[["",{"_index":74,"t":{"6":{"position":[[531,1],[533,2],[586,2],[605,2],[608,3],[612,1],[810,1],[812,2],[865,2],[884,2],[906,2],[967,2],[985,2],[1018,2],[1021,3],[1025,1],[1167,1],[1169,2],[1205,2],[1242,2],[1245,3],[1249,2],[1461,2],[1505,2]]},"8":{"position":[[143,1],[149,2],[202,1],[241,2],[264,1]]},"10":{"position":[[329,2],[639,2],[685,3],[727,1],[766,2],[780,2],[867,1],[897,1],[899,1],[920,2],[923,2],[962,2],[984,2],[1062,1],[1084,2],[1087,2],[1090,1],[1119,1],[1121,1],[1141,2],[1144,2],[1158,1],[1198,2],[1211,2],[1297,1],[1330,1],[1332,1],[1349,2],[1352,2],[1375,2]]},"12":{"position":[[271,2]]},"17":{"position":[[349,2],[352,2],[388,2],[391,2],[429,2],[432,2],[480,2],[549,2],[868,2],[871,2],[914,2],[917,2],[962,2],[965,2],[1188,2],[1276,1],[1278,2],[1366,2],[1444,2],[1509,2],[1559,2],[1627,2],[1676,2],[1738,2],[1784,2],[1850,2],[1905,2],[1974,2],[2025,2],[2072,2],[2075,2],[2105,1],[2172,2],[2219,2],[2286,2],[2289,2],[2347,2],[2423,2],[2426,2],[2475,2],[2546,2],[2549,2],[2598,1],[2608,2],[2752,1],[2781,2]]},"19":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"21":{"position":[[133,1],[139,2],[160,2],[201,2],[219,1],[271,1],[309,2],[343,1]]},"23":{"position":[[156,1],[162,2],[181,2],[200,2],[221,2],[325,2],[351,2],[383,2],[419,2],[422,2],[425,1]]},"25":{"position":[[146,1],[152,2],[171,2],[201,2],[212,2],[241,2],[277,2],[318,2],[337,2],[366,2],[402,2],[443,2],[490,1]]},"27":{"position":[[186,1],[192,2],[249,1],[288,2],[355,2],[385,2],[428,1]]},"29":{"position":[[119,1],[125,2],[167,1],[171,2],[174,3],[178,1]]},"35":{"position":[[112,1],[139,1],[152,1],[166,1],[172,2],[257,2],[292,3],[296,1],[298,2],[347,1],[356,1],[358,1],[360,1],[411,1],[419,1],[421,1],[423,2],[426,1],[428,1],[480,1],[488,1],[490,1],[492,2],[495,1],[497,1],[553,1],[555,1],[557,1]]},"37":{"position":[[126,1],[153,1],[166,1],[180,1],[186,2],[373,2],[451,2],[486,3],[490,1],[492,2],[539,1],[548,1],[550,1],[552,1],[596,4],[616,2],[619,1],[685,2],[688,1],[760,1],[762,2],[765,1],[767,1],[795,3],[807,4],[827,2],[830,1],[858,3],[893,2],[896,1],[924,3],[962,1],[964,2],[979,1],[981,1],[1055,1],[1057,2],[1072,1],[1074,1],[1148,1],[1150,2],[1158,1]]},"39":{"position":[[111,1],[138,1],[151,1],[165,1],[171,2],[230,2],[275,3],[279,1],[281,2],[328,1],[337,1],[381,4],[401,1]]},"41":{"position":[[211,1],[217,2],[272,1],[336,2],[379,3],[383,1],[385,2],[412,1],[421,1],[423,1],[468,4],[488,1],[490,1]]},"43":{"position":[[39,1],[51,2]]},"47":{"position":[[113,2],[157,2]]},"49":{"position":[[307,1],[349,1],[453,2],[456,1]]},"51":{"position":[[194,1],[236,1],[340,2],[343,1]]},"53":{"position":[[390,1],[432,1],[607,2],[610,1]]},"55":{"position":[[439,1],[481,1],[656,2],[659,1]]},"57":{"position":[[205,2],[295,1]]},"59":{"position":[[347,2],[427,1],[454,2],[457,2],[516,2],[519,2],[562,2],[565,2],[585,2],[681,2],[706,2],[723,2],[772,2],[790,1],[800,2],[855,2],[858,2],[875,1]]},"64":{"position":[[58,2]]},"68":{"position":[[40,2],[62,2],[156,2],[174,2],[181,1],[194,1],[213,2],[226,2],[229,3]]},"70":{"position":[[380,2],[383,3]]},"72":{"position":[[448,2],[460,2],[470,2],[480,2],[490,2]]},"74":{"position":[[134,2],[137,3]]},"76":{"position":[[190,2],[193,3]]},"78":{"position":[[429,2],[432,3]]},"80":{"position":[[197,2],[200,3]]},"82":{"position":[[210,2],[213,3]]},"84":{"position":[[158,2],[161,3]]},"86":{"position":[[201,2],[204,3]]},"88":{"position":[[241,2],[244,3]]},"90":{"position":[[148,2],[214,2],[217,2],[235,2],[297,2],[325,2],[328,2],[343,1],[386,2],[389,2],[459,2],[490,2],[493,2],[737,2],[740,3]]},"92":{"position":[[182,2],[185,3]]},"94":{"position":[[178,2],[181,3]]},"96":{"position":[[109,2],[166,2],[169,2],[236,2],[331,2],[388,2],[391,3]]},"98":{"position":[[162,2],[228,2],[231,2],[298,2],[402,2],[468,2],[471,3],[772,2],[775,3],[1153,2],[1156,3],[1225,2],[1289,1],[1291,2],[1347,2],[1387,2],[1436,1],[1448,2],[1502,2],[1505,2],[1580,2],[1690,2],[1754,2],[1859,2],[1862,3]]},"100":{"position":[[168,2],[171,3]]},"102":{"position":[[138,2],[141,3]]},"104":{"position":[[217,2],[220,3]]},"106":{"position":[[188,2],[191,3]]},"108":{"position":[[98,2],[131,2],[175,2],[229,1],[255,2],[258,3]]},"110":{"position":[[157,2],[160,3]]},"112":{"position":[[154,2],[157,3]]},"114":{"position":[[158,2],[161,3]]},"116":{"position":[[97,2],[116,2],[119,3]]},"118":{"position":[[255,2],[300,2],[303,3]]},"120":{"position":[[190,1],[216,2],[219,3]]},"122":{"position":[[158,2],[175,2],[178,3]]},"124":{"position":[[146,2],[164,2],[167,3]]},"126":{"position":[[232,2],[252,2],[255,3]]},"128":{"position":[[268,1],[287,2],[312,2],[315,2],[318,3]]},"130":{"position":[[46,1],[58,1],[66,2],[96,1],[105,2],[135,1],[144,2],[173,1],[181,2],[212,1],[222,2],[247,1],[258,2],[291,1],[303,2],[336,1],[348,2],[379,1],[389,2],[418,1],[426,1],[468,1],[482,1],[508,1],[536,1],[570,1],[610,1],[657,1],[704,1],[758,1],[805,1],[852,1],[904,1],[958,1],[1018,1],[1084,1],[1157,1],[1199,1],[1252,1],[1269,1],[1275,2],[1319,1],[1325,2],[1361,1],[1367,2],[1402,1],[1408,2],[1429,1],[1435,2],[1468,1],[1474,2],[1508,1],[1514,2],[1567,1],[1573,2],[1608,1],[1614,2],[1652,1],[1658,2],[1698,1],[1704,2],[1739,1],[1745,2],[1785,1],[1791,2],[1821,1],[1827,2],[1869,1],[1875,2],[1917,1],[1923,2],[1954,1],[1960,2],[1994,1],[2000,2],[2037,1],[2043,2],[2075,1],[2081,2],[2124,1],[2130,2],[2173,1],[2179,2],[2211,1],[2217,2],[2255,1],[2261,2],[2300,1],[2306,2],[2341,1],[2347,2],[2381,1],[2387,2],[2429,1],[2435,2],[2474,1],[2480,2],[2523,1],[2529,2],[2567,1],[2573,2],[2607,1],[2613,2],[2643,1],[2649,2],[2689,1],[2695,2],[2740,1],[2746,2],[2791,1],[2797,2],[2841,1],[2847,2],[2894,1],[2900,2],[2955,1],[2961,2],[3002,1],[3008,2],[3041,1],[3047,2],[3091,1],[3097,2],[3142,1],[3148,2],[3179,1],[3185,2],[3226,1],[3232,2],[3265,1],[3271,2],[3311,1],[3317,2],[3364,1],[3370,2],[3407,1],[3413,2],[3462,1],[3468,2],[3516,1],[3522,2],[3563,1],[3569,2],[3609,1],[3615,2],[3651,1],[3657,2],[3701,1],[3707,2],[3747,1],[3753,2],[3802,1],[3808,2],[3855,1],[3861,2],[3904,1],[3910,2],[3947,1],[3953,2],[3988,1],[3994,2],[4045,1],[4051,2],[4066,1],[4079,1],[4095,1],[4124,2],[4159,1],[4190,2],[4226,1],[4260,2],[4292,1],[4320,2],[4351,1],[4378,2],[4417,1],[4452,2],[4488,1],[4520,2],[4560,1],[4596,2],[4631,1],[4664,2],[4695,1],[4722,2],[4749,1],[4772,2],[4809,1],[4842,2],[4884,1],[4921,2],[4963,1],[5003,2],[5044,1],[5080,2],[5124,1],[5163,2],[5215,1],[5262,2],[5300,1],[5336,2],[5366,1],[5391,2],[5432,1],[5469,2],[5511,1],[5549,2],[5577,1],[5602,2],[5640,1],[5675,2],[5705,1],[5732,2],[5769,1],[5803,2],[5847,1],[5886,2],[5920,1],[5954,2],[6000,1],[6046,2],[6091,1],[6136,2],[6174,1],[6212,2],[6249,1],[6282,2],[6315,1],[6344,2],[6385,1],[6422,2],[6459,1],[6492,2],[6538,1],[6580,2],[6624,1],[6664,2],[6704,1],[6742,2],[6776,1],[6807,2],[6839,1],[6869,2],[6917,1],[6965,2],[6980,1],[7028,1],[7050,1],[7092,1],[7140,1],[7186,1],[7217,1],[7244,1],[7282,1],[7316,1],[7341,1],[7366,1],[7393,1],[7430,1],[7470,1],[7496,1],[7520,1],[7550,1],[7584,1],[7615,1],[7636,1],[7659,1],[7694,1],[7734,1],[7776,1],[7819,1],[7848,1],[7874,1],[7905,1],[7933,1],[7964,1],[8004,1],[8045,1],[8078,1],[8102,1],[8131,1],[8164,1],[8215,1],[8284,1],[8349,1],[8413,1],[8478,1],[8538,1],[8599,1],[8667,1],[8714,1],[8749,1],[8809,1],[8857,1],[8874,1],[8906,1],[8952,1],[8995,1],[9036,1],[9077,1],[9116,1],[9149,1],[9173,1],[9201,1],[9242,1],[9285,1],[9332,1],[9377,1],[9414,1],[9446,1],[9470,1],[9490,1],[9513,1],[9546,1],[9582,1],[9609,1],[9632,1],[9662,1],[9699,1],[9731,1],[9756,1],[9794,1],[9860,1],[9932,1],[9980,1],[10014,1],[10053,1],[10103,1],[10165,1],[10225,1],[10281,1],[10331,1],[10374,1],[10411,1],[10449,1],[10488,1],[10516,1],[10539,1],[10566,1],[10593,1],[10616,1],[10637,1],[10672,1],[10719,1],[10773,1],[10824,1],[10873,1],[10926,1],[10970,1],[11010,1],[11055,1],[11089,1],[11112,1],[11133,1],[11165,1],[11197,1],[11223,1],[11256,1],[11291,1],[11325,1],[11359,1],[11394,1],[11422,1],[11460,1],[11503,1],[11535,1],[11573,1],[11611,1],[11648,1],[11668,1]]},"133":{"position":[[155,2],[177,2],[192,2],[195,3]]},"135":{"position":[[76,2],[97,2],[232,2],[235,2],[238,3],[347,2],[508,1],[515,1],[1000,1],[1335,1],[5038,1],[5333,2],[5336,2],[5917,2],[6901,2]]},"137":{"position":[[174,1],[227,2]]},"139":{"position":[[104,2],[146,2],[188,2],[211,1],[251,1],[258,1],[295,1],[297,2],[300,3]]},"143":{"position":[[6,1],[25,1],[96,1]]},"145":{"position":[[107,1],[140,1],[167,1],[207,1]]},"149":{"position":[[441,1],[492,1],[514,1],[562,1],[583,1],[585,2],[588,3],[592,2]]},"153":{"position":[[127,1],[172,3],[235,1],[277,2],[313,2],[390,2],[397,1],[406,1],[477,2],[514,2],[587,2]]},"155":{"position":[[124,2]]},"159":{"position":[[95,1],[195,1],[325,1],[412,1],[510,1],[591,1],[704,1],[846,1]]},"162":{"position":[[20,1],[118,1],[132,1],[134,2],[155,2],[170,2],[187,1],[253,2],[274,1],[339,2],[382,1],[430,1],[459,1],[512,1],[544,1]]},"164":{"position":[[20,1],[118,1],[132,1],[134,2],[155,2],[170,2],[190,1],[253,2],[296,1],[349,1],[420,1],[473,2],[476,1]]},"166":{"position":[[20,1],[112,1],[126,1],[128,2],[146,1],[207,2],[225,1],[302,2],[359,1],[392,1],[430,1]]},"168":{"position":[[20,1],[112,1],[126,1],[132,2],[172,2],[247,1],[280,1],[318,1]]},"170":{"position":[[20,1],[112,1],[126,1],[132,2],[183,2],[258,1],[302,1],[317,2],[360,2],[367,1],[380,1],[416,1],[418,1],[442,1]]},"176":{"position":[[77,1],[160,1],[238,2],[366,2],[369,3],[373,2],[516,2],[580,1],[590,2],[600,2],[608,2],[617,1],[631,1],[641,2],[652,2],[660,2],[672,1],[686,1],[701,2],[743,1],[786,2],[841,3]]},"178":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[236,2],[239,2],[305,2],[366,2],[425,2],[475,2],[478,2],[527,2],[573,2],[619,2],[669,2],[724,2],[770,2],[773,2],[837,2],[907,2],[992,2],[995,2],[1048,2],[1106,2],[1109,2],[1165,2],[1223,2],[1226,2],[1282,1]]},"180":{"position":[[18,1],[182,1]]},"186":{"position":[[77,1],[156,1],[234,2],[284,2],[389,1],[417,2],[427,2],[445,1],[480,3],[638,1],[656,2],[729,1],[759,2],[802,1],[838,2],[841,3],[883,1],[957,2]]},"188":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[255,2],[258,2],[282,1],[321,2],[427,2],[430,2],[456,2],[459,2],[508,2],[567,2],[570,2],[616,2],[687,2],[690,2],[728,1],[730,2],[767,2],[770,1],[809,2],[898,2],[901,2],[977,2],[1031,2],[1034,2],[1109,2],[1181,1],[1191,2],[1194,2],[1238,2],[1335,2],[1408,2],[1428,2],[1431,2],[1459,2],[1501,2],[1572,2],[1575,2],[1648,1]]},"190":{"position":[[18,1],[53,1],[153,1],[189,2],[328,1]]},"196":{"position":[[77,1],[159,1],[237,2],[290,2],[403,2],[408,3],[412,2],[519,1],[537,2],[557,2],[592,2],[597,3]]},"198":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[240,2],[243,2],[278,2],[299,2],[318,2],[339,2],[376,1]]},"200":{"position":[[18,1],[60,1]]},"202":{"position":[[0,2],[28,1],[44,1],[62,1],[81,1],[106,1],[110,1]]},"208":{"position":[[77,1],[155,1],[233,2],[282,2],[458,3],[959,1],[993,2],[1010,2],[1013,3]]},"210":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[282,2],[352,2],[355,2],[449,2],[488,2],[491,2],[559,2],[630,2],[633,2],[660,3],[684,2],[760,2],[812,2],[815,2],[895,2],[967,2],[1041,2],[1044,2],[1071,3],[1095,2],[1168,2],[1242,2],[1314,2],[1363,2],[1366,2],[1422,2],[1495,2],[1506,2],[1509,2],[1536,3],[1561,2],[1638,2],[1656,2],[1659,2],[1700,1]]},"212":{"position":[[18,1],[76,4],[227,2],[230,5],[250,3],[294,3],[309,1]]},"218":{"position":[[77,1],[155,1],[233,2],[282,2],[447,1],[532,1],[534,3],[538,2],[541,3]]},"220":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[265,2],[333,2],[353,2],[374,2],[394,2],[414,2],[433,2],[454,2],[457,2],[503,2],[506,2],[567,2],[634,2],[688,2],[718,2],[745,3],[769,2],[797,2],[824,3],[846,2],[885,2],[937,2],[979,2],[1033,2],[1087,2],[1143,2],[1211,2],[1271,2],[1331,2],[1334,2],[1358,1],[1395,2],[1449,2],[1452,2],[1509,2],[1568,2],[1623,2],[1626,2],[1648,2],[1669,2],[1710,2],[1713,2],[1773,2],[1809,2],[1812,2],[1885,2],[1888,2],[1999,1]]},"222":{"position":[[18,1],[49,1],[121,1],[234,1]]},"224":{"position":[[6,1],[19,1],[36,1]]},"226":{"position":[[58,2],[75,2],[166,3]]},"228":{"position":[[1107,1],[1138,1]]},"232":{"position":[[77,1],[160,1],[238,2],[292,2],[401,2],[404,3],[408,3]]},"234":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[264,2],[267,2],[396,2],[484,2],[487,2],[648,2],[712,2],[715,2],[768,1]]},"236":{"position":[[18,1],[65,1],[99,2],[125,2],[168,1],[208,2],[237,1]]},"238":{"position":[[6,1],[26,1],[64,1],[70,1]]},"242":{"position":[[0,2],[72,2]]},"244":{"position":[[77,1],[164,1],[242,2],[270,2],[389,2],[500,2],[698,3],[702,2],[709,1],[782,1],[813,1],[834,2],[837,2],[845,1],[914,1],[974,2],[988,2]]},"246":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[249,2],[252,2],[300,2],[339,1],[357,2],[360,2],[439,2],[551,2],[590,2],[593,2],[689,2],[728,2],[731,2],[827,1]]},"248":{"position":[[18,1],[71,3],[127,1]]},"250":{"position":[[307,2],[330,3],[432,3]]},"256":{"position":[[77,1],[157,1],[235,2],[305,2],[443,3],[529,4],[534,3],[538,1]]},"258":{"position":[[24,1],[34,1],[106,1],[108,1]]},"260":{"position":[[0,2],[64,1],[66,2],[164,2],[268,1]]},"268":{"position":[[77,1],[155,1],[233,2],[282,2],[289,1],[379,1],[418,2],[421,2],[506,3],[510,2],[517,1],[610,1],[649,2]]},"270":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[264,2],[328,2],[394,2],[462,2],[529,2],[595,2],[661,2],[704,1]]},"272":{"position":[[18,1],[52,1]]},"278":{"position":[[77,1],[166,1],[254,1],[341,1],[429,2],[592,1],[689,5],[695,1],[732,1],[765,1]]},"280":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,1]]},"282":{"position":[[18,1],[39,1]]},"288":{"position":[[77,1],[158,1],[236,2],[288,2],[411,3]]},"290":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[259,2],[262,2],[284,2],[299,2],[326,2],[329,2],[377,2],[457,2],[522,2],[525,2],[578,2],[661,2],[664,2],[733,1]]},"292":{"position":[[18,1],[45,3],[103,1]]},"294":{"position":[[98,1],[262,1]]},"298":{"position":[[77,1],[161,1],[239,2],[337,3],[341,2],[529,3]]},"300":{"position":[[110,1],[227,1],[229,2],[289,2],[370,1],[376,2],[456,3],[460,2],[558,2],[614,2],[780,3],[815,1]]},"302":{"position":[[55,1],[168,1],[182,1],[188,2],[284,3],[319,1]]},"304":{"position":[[55,1],[171,1],[185,1],[191,2],[301,3],[336,1]]},"306":{"position":[[58,1],[174,1],[188,1],[194,2],[306,3],[341,1]]},"308":{"position":[[55,1],[174,1],[188,1],[194,2],[290,3],[325,1]]},"310":{"position":[[53,1],[137,2],[260,1],[274,1],[290,2],[309,2],[316,1],[329,1],[335,2],[413,3],[448,1]]},"312":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[240,2],[285,2],[288,2],[343,2],[346,2],[408,2],[447,2],[450,2],[485,2],[488,2],[509,2],[551,2],[581,2],[584,2],[640,2],[679,2],[682,2],[745,2],[792,2],[859,2],[862,2],[920,2],[978,2],[981,2],[1003,2],[1050,2],[1096,2],[1132,2],[1135,2],[1157,2],[1216,1]]},"314":{"position":[[18,1],[62,3],[134,3],[138,1]]},"320":{"position":[[20,1],[100,1],[114,1],[120,2],[195,1],[229,2],[252,1]]},"322":{"position":[[0,2],[64,1],[66,2],[113,2],[166,2],[183,2],[236,2],[258,2],[322,2],[339,2],[380,2],[460,2],[474,2],[519,2],[544,2],[605,2],[630,2],[657,3],[690,2],[707,2],[760,2],[782,2],[840,2],[858,2],[925,2],[947,2],[974,3],[1002,2],[1034,2],[1110,2],[1140,2],[1213,2],[1245,2],[1320,2],[1344,2],[1403,2],[1429,2],[1490,2],[1512,2],[1573,2],[1610,2],[1674,1]]},"324":{"position":[[18,1],[377,1]]},"326":{"position":[[89,1],[147,1]]},"330":{"position":[[77,1],[162,1]]},"334":{"position":[[57,1],[72,2],[75,3],[79,3]]},"336":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[258,2],[317,2],[320,2],[345,1],[382,2],[456,2],[459,2],[516,2],[606,2],[609,2],[749,2],[841,2],[844,2],[921,2],[955,2],[958,2],[1035,2],[1087,2],[1090,2],[1178,1]]},"338":{"position":[[18,1],[58,1],[60,2],[166,2],[182,1],[269,1],[280,2],[297,2],[303,1],[305,2],[374,2],[415,1],[428,2],[468,2],[538,2],[594,1]]},"344":{"position":[[20,1],[133,1],[139,1],[148,1],[181,1],[243,1],[258,2],[301,2],[392,2],[397,1],[416,1],[468,1],[482,1],[488,2],[503,2],[687,3],[729,1],[782,2],[805,1],[813,1],[837,1],[878,2],[990,2],[1092,2]]},"346":{"position":[[159,1],[291,1],[297,1],[306,1],[353,1],[445,1],[447,1],[509,1],[524,2],[567,2],[658,2],[663,1],[682,1],[734,1],[771,1],[785,2],[836,2],[859,1],[897,1],[912,1],[914,1],[928,1],[942,1],[948,2],[1078,3],[1120,1],[1153,2],[1207,1],[1260,2],[1306,1],[1361,2],[1384,1],[1408,1],[1410,1],[1473,2],[1484,1],[1621,2],[1652,1],[1777,2]]},"348":{"position":[[20,1],[133,1],[141,1],[150,1],[174,1],[188,1],[194,2],[224,2],[311,1],[326,2],[369,2],[460,2],[465,1],[484,1],[536,2],[539,2],[580,1],[613,2],[677,1],[730,2],[753,1],[777,1],[779,1],[842,2],[853,1],[982,2]]},"350":{"position":[[0,2],[64,1],[66,2],[113,2],[166,2],[238,2],[293,2],[366,2],[410,2],[491,2],[562,2],[598,2],[649,2],[669,2],[690,2],[710,2],[729,2],[749,2],[787,2],[841,2],[896,2],[989,2],[1058,2],[1107,1]]},"352":{"position":[[18,1],[69,1],[87,2],[140,1],[149,2],[180,1],[248,1],[333,2],[357,1],[429,1]]},"358":{"position":[[77,1],[158,1],[236,2],[288,2],[397,1],[413,2],[428,2],[455,1],[510,1],[544,2],[586,1],[624,2],[655,3]]},"360":{"position":[[195,1],[254,3],[407,1],[442,1],[459,1],[478,1],[503,1]]},"362":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[287,2],[290,2],[312,2],[390,2],[393,2],[431,1],[433,2],[450,2],[453,1],[492,2],[568,2],[571,2],[585,1],[624,2],[680,2],[683,2],[720,1],[722,2],[774,2],[777,1],[806,2],[852,2],[877,2],[880,2],[922,2],[968,1],[992,2],[995,2],[1041,2],[1095,2],[1098,2],[1173,2],[1244,2],[1247,2],[1324,1]]},"364":{"position":[[18,1],[50,1],[105,1],[121,2],[163,1],[214,2],[309,1]]},"366":{"position":[[58,2],[75,2],[172,3]]},"372":{"position":[[77,1],[157,1],[416,2],[467,2],[510,2],[633,3],[637,2],[718,2],[833,3],[837,2],[858,1],[1012,3],[1016,2],[1048,2],[1124,2],[1131,1],[1175,1],[1244,3],[1248,2],[1446,1],[1496,2],[1499,2],[1502,3],[1506,2],[1673,1],[1704,2],[1722,1],[1756,1],[1758,2],[1761,3],[1765,2],[1872,3]]},"374":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[289,2],[330,2],[333,2],[401,2],[447,2],[450,2],[521,2],[556,2],[559,2],[648,2],[734,2],[737,2],[786,2],[879,2],[882,2],[928,2],[989,2],[992,2],[1018,1],[1064,2],[1109,2],[1112,2],[1151,2],[1215,2],[1218,2],[1324,1]]},"376":{"position":[[18,1],[175,1],[236,1]]},"378":{"position":[[0,2],[26,1],[35,1],[51,1],[71,1],[95,1],[116,1],[131,1],[145,1],[161,1],[180,1],[199,1],[215,1],[229,1],[247,1],[269,1],[280,2],[310,1],[322,2],[353,1],[389,1],[405,2],[441,1],[450,2],[479,1],[510,1],[537,1],[556,1],[566,2],[616,1],[628,2],[659,1],[674,2],[706,1],[722,2],[750,1],[761,2],[786,1],[796,2],[822,1],[834,2],[862,1],[874,2],[893,1],[910,1],[927,1],[947,1],[966,1],[986,1],[1006,1],[1024,1],[1043,1],[1053,1]]},"384":{"position":[[77,1],[158,1],[236,2],[336,2],[379,2],[416,2],[740,2],[749,1],[846,2]]},"386":{"position":[[0,2],[64,1],[66,2],[88,2],[91,2],[142,2],[160,2],[163,2],[217,2],[279,2],[282,2],[323,2],[394,2],[397,2],[452,2],[500,2],[503,2],[549,2],[598,1],[631,2],[634,2],[745,2],[799,1],[832,2],[835,2],[955,1]]},"388":{"position":[[18,1],[297,3],[301,1]]},"394":{"position":[[77,1],[156,1],[234,2],[284,2],[327,2],[501,2]]},"396":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[255,2],[317,2],[348,2],[351,2],[373,2],[390,1]]},"398":{"position":[[18,1],[39,1]]},"402":{"position":[[0,2],[110,2],[257,2],[400,2],[634,2],[822,2],[1020,2],[1212,2]]},"404":{"position":[[77,1],[156,1],[234,2],[301,2],[404,2],[407,2],[586,2],[589,2],[673,2],[846,2],[1034,3],[1038,2],[1110,1],[1116,2],[1171,2],[1196,2],[1203,1],[1216,1],[1218,2],[1311,2],[1314,2],[1406,1],[1415,2],[1468,2],[1475,1],[1488,1],[1490,2],[1583,2],[1586,2],[1695,1],[1704,2],[1763,1],[1773,2],[1780,1],[1793,1],[1795,2],[1888,2],[1891,2],[1984,1],[1993,2],[2070,2],[2077,1],[2090,1],[2092,2],[2185,2],[2188,2],[2351,2],[2354,3],[2358,2],[2534,2],[2577,1],[2634,2],[2678,1],[2735,2],[2738,3],[2742,2],[2950,3]]},"406":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[256,2],[259,2],[302,2],[355,2],[358,2],[387,2],[436,2],[439,2],[493,2],[544,2],[547,2],[602,2],[671,2],[674,2],[727,2],[780,2],[825,2],[891,2],[965,2],[1039,2],[1096,2],[1154,2],[1231,2],[1300,1]]},"408":{"position":[[18,1],[122,1]]},"414":{"position":[[77,1],[158,1],[236,2],[288,2],[373,1],[397,2]]},"416":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[244,2],[247,2],[297,2],[359,2],[362,2],[461,1]]},"418":{"position":[[18,1],[109,1]]},"424":{"position":[[20,1],[102,1],[116,1],[122,2],[238,2],[258,3],[303,1],[342,2],[388,1],[421,1],[423,1],[440,2],[463,1]]},"426":{"position":[[0,2],[64,1],[66,2],[115,2],[168,2],[252,2],[297,2],[319,2],[338,2],[358,2],[396,2],[465,2],[501,2],[544,2],[642,1]]},"428":{"position":[[18,1],[59,1]]},"434":{"position":[[77,1],[160,1],[238,2],[292,2],[427,1],[448,2],[451,3]]},"436":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[262,2],[265,2],[316,2],[383,2],[386,2],[443,2],[509,2],[547,2],[550,2],[605,1]]},"438":{"position":[[199,1],[300,1]]},"444":{"position":[[20,1],[101,1],[115,1],[121,2],[235,2],[238,3],[283,1],[322,2],[368,1],[401,1],[403,1],[420,2],[443,1]]},"450":{"position":[[77,1],[158,1],[236,2],[265,2],[313,2],[368,1],[370,2],[408,2],[431,2],[438,1],[451,1],[453,2],[471,2],[491,2],[533,2],[554,2],[569,2],[603,2],[629,2],[652,2],[659,1],[672,1],[674,2],[748,1],[753,2],[776,2],[796,2],[803,1],[816,1],[871,2]]},"452":{"position":[[0,2],[64,1],[66,2],[94,2],[124,1],[161,2],[208,2],[270,2],[341,2],[384,2],[455,2],[520,2],[550,2],[577,3],[601,2],[629,2],[656,3],[678,2],[717,2],[769,2],[811,2],[865,2],[894,2],[950,2],[1018,2],[1055,2],[1112,2],[1155,2],[1222,2],[1276,2],[1339,2],[1378,1]]},"454":{"position":[[18,1],[43,1],[161,1]]},"456":{"position":[[6,1],[28,1],[59,1],[92,1],[102,1]]},"458":{"position":[[58,2],[75,2],[124,2],[173,2]]},"464":{"position":[[77,1],[155,1],[245,1],[251,2],[323,1],[345,2],[364,3],[408,1],[457,2],[491,1],[533,1],[586,1]]},"470":{"position":[[77,1],[158,1],[248,1],[254,2],[271,2],[299,1],[314,2],[358,1],[373,2],[426,2],[433,1],[481,1],[494,1],[585,1],[653,1],[661,2],[688,1],[695,1],[726,1],[728,1],[738,1],[777,1],[788,1],[801,1],[1026,1],[1075,1],[1081,2],[1098,2],[1126,1],[1141,2],[1185,1],[1200,2],[1268,2],[1275,1],[1323,1],[1336,1],[1453,1],[1536,1],[1544,2],[1571,1],[1578,1],[1609,1],[1611,1],[1621,1],[1649,1],[1660,1],[1673,1],[1716,1],[1722,2],[1743,2],[1825,2],[1855,1],[1862,2],[1915,1],[1962,2],[1969,1],[1989,1],[1999,1],[2027,2],[2034,1],[2054,1],[2067,1],[2165,1]]},"473":{"position":[[497,1]]},"485":{"position":[[0,2],[94,1]]},"490":{"position":[[415,1],[492,2]]},"492":{"position":[[545,1],[562,1],[564,3],[576,1],[596,1],[622,2],[629,1],[650,1],[657,1],[674,1],[716,1],[762,1]]},"494":{"position":[[142,2],[219,1],[294,2],[297,2]]},"498":{"position":[[180,1],[194,2]]},"500":{"position":[[77,1],[163,1],[182,1],[201,1],[215,1],[217,2],[232,2],[254,2],[262,2],[269,2],[281,2],[389,3],[421,1],[472,1],[501,2],[504,2],[513,2],[521,2],[535,2],[644,3],[677,1],[730,1],[760,2],[763,2],[775,2],[786,2],[803,2],[912,3],[940,1],[993,1],[1026,2],[1029,2],[1043,2],[1091,1],[1098,2],[1129,2],[1136,1],[1180,1],[1187,1],[1234,1],[1236,2],[1270,1]]},"503":{"position":[[244,1],[246,2],[310,2],[492,1],[579,1],[593,1],[599,2],[675,1],[716,2],[750,1],[1021,1],[1023,2],[1085,2],[1175,2]]},"505":{"position":[[226,2],[275,1],[313,1],[315,2],[351,2],[386,2],[485,1],[492,1],[501,1],[503,2],[613,2],[700,1]]},"507":{"position":[[539,2],[593,2],[620,2],[706,1],[708,2],[744,2],[779,2],[878,1],[885,1],[894,1],[896,2],[926,1],[993,2],[1000,1],[1002,2],[1119,1],[1121,2],[1155,2],[1158,2],[1161,2],[1164,3],[1195,1]]},"510":{"position":[[480,1],[486,2],[569,2],[572,1],[574,3],[578,1]]},"516":{"position":[[79,1],[85,2],[104,2],[137,2],[148,2],[180,2],[216,2],[257,2],[276,2],[308,2],[344,2],[385,2],[432,1],[493,1],[499,2],[518,2],[539,2],[550,2],[570,2],[606,2],[647,2],[666,2],[686,2],[722,2],[763,2],[810,1]]},"518":{"position":[[131,1],[137,2],[160,2],[188,1],[226,1],[232,2],[253,2],[264,2],[309,1],[311,2],[376,2],[404,2],[445,2],[492,1]]},"522":{"position":[[0,2],[77,1],[116,1],[153,1],[197,1],[235,1],[279,1],[320,1],[355,1]]},"526":{"position":[[271,1],[309,1],[323,1],[329,2],[382,1],[482,1],[501,1],[503,1],[512,1],[514,2],[517,2],[531,2],[579,1],[600,1],[602,1],[613,1],[632,2],[681,1],[791,1],[872,1],[874,2],[886,2],[916,2]]},"532":{"position":[[161,2],[217,2],[281,1],[302,1],[315,1],[324,2],[346,1],[355,1],[365,1],[386,1],[388,5],[394,1],[412,1],[414,3],[418,1],[448,2]]},"538":{"position":[[308,1],[346,1],[360,1],[366,2],[424,2],[525,1],[586,2],[589,3],[604,2],[633,1],[635,2],[646,2]]},"541":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"543":{"position":[[185,2],[243,4],[286,1],[316,2],[319,2],[414,1],[445,2],[448,2],[553,1],[589,2]]},"545":{"position":[[372,2],[415,2],[418,2],[425,1],[658,4],[841,2],[916,1],[1012,2],[1015,2],[1091,1],[1128,2],[1131,2],[1202,1],[1242,2],[1245,2],[1321,1],[1358,2],[1361,2],[1553,1],[1595,2],[1620,1],[1622,1],[1636,3],[1796,4],[1928,2],[2037,1],[2116,2],[2134,2],[2137,2],[2233,1],[2306,2],[2317,2],[2476,2],[2607,1],[2683,2],[2694,2],[2915,2],[2927,2],[2946,1],[2948,4],[2962,1],[3002,2],[3017,2],[3036,1],[3074,2],[3105,2],[3122,1],[3143,1],[3185,2],[3217,2],[3234,1],[3253,1]]},"547":{"position":[[1339,1],[1379,2],[1382,2],[1422,2],[1428,2],[1467,2],[1496,1],[1587,1],[1627,2],[1630,2],[1674,2],[1696,2],[1735,2],[1752,2],[1793,2],[1986,1],[2026,2],[2029,2],[2070,2],[2089,2],[2131,2],[2151,2],[2199,2],[2236,2],[2306,3],[2310,2],[2313,2],[2316,2],[2319,2],[2322,2],[2325,2],[2328,2],[2331,2],[2334,3],[2497,1],[2537,2],[2540,2],[2580,2],[2586,2],[2624,2],[2627,2],[2668,2]]},"549":{"position":[[279,1],[281,2],[363,2],[405,2],[446,1],[485,2]]},"551":{"position":[[82,1],[88,2],[107,2],[140,2],[151,2],[183,2],[219,2],[260,2],[279,2],[311,2],[347,2],[388,2],[435,1]]},"554":{"position":[[97,1],[168,1],[298,2],[341,2],[383,2],[507,2],[867,1],[923,3],[927,2]]},"556":{"position":[[193,1],[269,1],[283,1],[285,2],[339,2],[371,2],[428,2],[463,2],[473,2],[513,2],[555,2],[596,1],[598,2],[685,2],[688,2],[722,1]]},"559":{"position":[[323,1],[418,1],[425,1],[439,1],[488,2],[567,2],[662,1],[685,1],[746,1],[766,1],[798,1],[830,1],[894,1],[896,1],[898,2],[932,2],[1017,1],[1098,1],[1117,2],[1143,2],[1176,2],[1183,1],[1196,2],[1239,1],[1241,2],[1345,1],[1359,2],[1396,1],[1408,2],[1440,1],[1454,2],[1487,1],[1511,1],[1544,1],[1546,1],[1572,1],[1586,1],[1600,2],[1637,1],[1643,2],[1670,2],[1751,1],[1860,2],[1863,2],[1866,2],[1869,2],[1994,1],[1996,2],[2073,2],[2079,2],[2099,2],[2105,2],[2146,1],[2153,2],[2210,1],[2212,2],[2234,2],[2275,1],[2279,2],[2296,1],[2306,2],[2338,2],[2352,1],[2362,1],[2405,1],[2470,2],[2473,1],[2559,1],[2565,3],[2569,1],[2571,1],[2573,2],[2643,2],[2677,1],[2679,3],[2776,2],[2779,1],[2826,1],[2966,1],[3103,1],[3219,3]]},"561":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"564":{"position":[[349,2],[469,1],[489,2],[522,2],[563,2],[603,2],[669,2],[730,2],[733,2],[753,2],[756,2],[759,2],[762,3],[766,2],[779,2],[827,4],[874,1],[920,2],[1005,2],[1063,2],[1066,3],[1077,3],[1118,2],[1121,3],[1125,2],[1191,2],[1234,2],[1275,2],[1350,1],[1394,2],[1447,2],[1498,2],[1506,2],[1509,3],[1513,2]]},"566":{"position":[[141,2],[226,1],[242,2],[265,2],[268,3],[272,2],[275,2],[360,1],[376,2],[401,2],[404,3],[408,2]]},"568":{"position":[[166,1],[199,2]]},"570":{"position":[[262,1],[322,2],[325,2],[395,2],[398,2],[449,2],[452,3],[456,2]]},"572":{"position":[[172,1],[189,2],[192,2],[268,2],[271,2],[327,2],[330,2],[357,2],[360,3],[364,2]]},"574":{"position":[[31,1],[101,2],[181,1],[195,2],[218,2],[221,3],[225,2]]},"576":{"position":[[211,1],[257,2],[260,2],[301,1],[344,2],[378,2]]},"578":{"position":[[76,2],[166,1],[168,2],[227,2],[250,2]]},"580":{"position":[[452,2],[524,1],[624,1],[665,1],[669,2],[691,2],[715,2],[722,1],[735,1],[757,2],[785,2],[792,2],[795,3],[799,2],[802,2],[848,2],[961,2],[1085,2],[1197,2],[1260,2]]},"582":{"position":[[151,1],[153,2],[192,2],[249,2],[343,2],[346,3],[350,2],[718,1],[808,1],[855,2],[858,2],[861,3],[865,2],[912,1],[953,2],[1020,1],[1060,2],[1063,2],[1066,3],[1070,2]]},"584":{"position":[[330,2],[405,1],[411,2],[434,2],[437,3],[441,2]]},"588":{"position":[[77,1],[387,1],[435,1],[437,2],[461,2],[494,1],[516,1],[539,1],[559,1],[572,2],[603,2],[606,3],[610,2]]},"590":{"position":[[243,1],[245,2],[285,2],[321,2],[330,2],[333,3],[337,2]]},"592":{"position":[[398,1],[447,2],[450,2],[540,2],[543,2],[566,2]]},"594":{"position":[[286,1],[288,2],[336,2],[339,2],[356,2],[403,2],[406,2],[430,2],[484,2],[487,2],[506,2],[509,2],[512,2]]},"596":{"position":[[216,1],[218,2],[274,2],[300,2],[392,2]]},"598":{"position":[[214,1],[216,2],[279,2],[282,2],[295,2],[311,2],[314,2],[317,2]]},"602":{"position":[[208,1],[232,2],[270,2],[313,2],[323,2],[326,2],[329,2]]},"606":{"position":[[219,1],[253,2],[327,2],[380,2],[390,2],[393,2],[396,2]]},"610":{"position":[[222,1],[319,1],[420,1],[434,2],[514,2],[517,2]]},"612":{"position":[[106,2],[176,1],[191,2],[207,2],[210,3],[214,2]]},"614":{"position":[[128,1],[137,2],[152,2],[155,3],[159,2],[289,2],[356,2]]},"616":{"position":[[129,2],[213,1],[223,2],[260,2],[263,3],[267,2]]},"618":{"position":[[256,2],[336,1],[351,2],[373,2],[394,2],[403,2],[406,3],[410,2]]},"620":{"position":[[87,1],[135,1],[137,2],[218,2],[221,3],[225,2]]},"622":{"position":[[218,1],[242,1],[286,1],[288,2],[316,2],[355,1],[377,2],[380,2],[414,2],[417,2],[504,2],[507,2],[510,2],[544,2],[547,2],[581,2]]},"624":{"position":[[336,1],[360,1],[400,1],[402,2],[430,2],[469,1],[492,2],[495,2],[572,2],[575,2],[619,2]]},"626":{"position":[[184,1],[289,1],[291,2],[351,2],[404,2],[407,3],[411,2]]},"628":{"position":[[331,1],[375,2],[421,1],[443,2],[454,1],[518,1],[563,2]]},"630":{"position":[[165,1],[234,2]]},"632":{"position":[[261,1],[274,2],[311,2],[318,2],[321,3],[325,2]]},"634":{"position":[[279,1],[281,2],[323,2],[349,2],[356,1],[358,2],[361,2],[389,2],[424,1],[428,1],[430,2],[470,1],[472,2],[517,2],[543,2],[546,2],[573,2],[608,2],[623,1],[695,2],[698,2],[741,2],[775,2],[836,2],[843,1],[856,1],[858,1],[860,1],[873,2]]},"636":{"position":[[279,1],[323,2],[364,1],[408,2],[449,1],[514,2]]},"638":{"position":[[87,2],[170,1],[188,2],[213,2],[216,3],[220,2]]},"640":{"position":[[174,5],[290,2],[375,1],[394,2],[405,2],[408,3],[412,2],[415,2],[500,1],[516,2],[546,2],[561,2],[564,3],[568,2],[599,2],[672,2],[695,2],[743,2],[771,2],[978,1],[994,2],[1046,2]]},"642":{"position":[[343,2],[424,1],[434,2],[455,2],[479,2],[482,3],[486,2]]},"644":{"position":[[302,2],[383,1],[391,2],[450,2],[467,2],[470,3],[474,2]]},"646":{"position":[[247,2],[332,1],[343,2],[380,2],[391,2],[394,3],[398,2]]},"648":{"position":[[120,2],[184,1],[199,2],[209,2],[212,3],[216,2]]},"650":{"position":[[173,2],[269,1],[273,2],[298,2],[324,2],[343,2],[346,2],[349,2],[352,3],[356,2],[367,2],[475,1],[479,2],[506,2],[530,2],[540,2],[551,2],[689,1],[693,2],[720,2],[741,2],[760,2],[771,2],[782,2],[896,1],[900,2],[940,2],[975,2],[989,2],[1000,2],[1208,1],[1212,2],[1237,2],[1279,2],[1331,2],[1359,2],[1409,2],[1419,2]]},"652":{"position":[[334,2],[421,1],[440,2],[467,2],[502,2],[512,2],[515,3],[519,2]]},"654":{"position":[[458,2],[554,1],[582,2],[623,2],[652,2],[687,2],[713,2],[746,2],[754,2],[757,3],[761,2]]},"656":{"position":[[526,2],[618,1],[643,2],[678,2],[711,2],[737,2],[764,2],[769,2],[772,3],[776,2]]},"658":{"position":[[516,2],[608,1],[638,2],[665,2],[690,2],[712,2],[717,2],[720,3],[724,2]]},"660":{"position":[[302,2],[374,1],[467,1],[507,1],[511,2],[533,2],[558,2],[565,1],[578,1],[600,2],[628,2],[659,2],[674,2],[677,3],[681,2],[684,2],[729,2]]},"662":{"position":[[132,2],[203,1],[207,2],[234,2],[245,1],[253,2],[271,1],[288,2],[302,1],[304,1],[306,2]]},"664":{"position":[[313,1],[344,2],[391,1],[454,4],[459,2],[514,1],[661,2]]},"666":{"position":[[449,1],[451,2],[526,2],[529,2],[582,1],[584,2],[796,2],[799,2],[850,1]]},"668":{"position":[[347,1],[382,2],[427,1],[512,2],[557,1],[586,2]]},"672":{"position":[[143,1],[173,2],[176,2],[193,2]]},"674":{"position":[[312,2],[384,1],[489,1],[529,1],[533,2],[555,2],[584,2],[591,1],[604,1],[626,2],[654,2],[685,2],[700,2],[703,3],[707,2],[710,2],[755,2]]},"676":{"position":[[147,1],[206,2],[209,2],[239,2]]},"678":{"position":[[398,1],[433,2],[477,1],[520,2]]},"680":{"position":[[81,2],[161,1],[165,2],[230,2],[265,2],[268,3],[272,2],[434,1],[468,1],[481,2],[499,2],[510,3],[518,2],[540,2],[558,2],[595,1],[597,1]]},"682":{"position":[[176,1],[178,2],[220,2],[246,2],[253,1],[255,2],[258,2],[277,2],[322,2],[348,2],[351,2],[378,2],[413,2],[428,1],[500,2],[503,2],[546,2],[580,2],[641,2],[648,1],[661,1],[663,1],[676,1],[678,2]]},"684":{"position":[[201,2],[256,1],[258,2],[300,2],[326,2],[333,1],[335,2],[338,2],[357,2],[402,2],[428,2],[431,2],[458,2],[493,2],[508,1],[580,2],[583,2],[626,2],[663,2],[742,2],[749,1],[762,1],[764,1],[777,1],[779,2]]},"686":{"position":[[32,1],[116,2],[166,2]]},"688":{"position":[[123,1],[164,2],[167,2],[186,2],[504,1],[543,2],[546,2],[627,2],[630,2],[649,2]]},"690":{"position":[[322,1],[364,2],[436,2],[635,1],[690,2]]},"692":{"position":[[262,1],[289,2],[292,2],[379,2],[382,2],[405,2]]},"694":{"position":[[165,1],[203,2],[206,2],[236,2],[239,3],[243,2]]},"696":{"position":[[314,2],[353,2],[390,2],[467,1],[471,2],[507,1],[509,2],[594,1],[629,1],[677,2],[717,2],[724,1],[752,1],[777,1],[790,2],[863,1],[865,2],[1024,2],[1027,2],[1118,1],[1244,1],[1289,1],[1375,2],[1421,1],[1508,2],[1511,2],[1601,2]]},"698":{"position":[[168,1],[174,2],[220,2],[268,2],[271,3],[275,2]]},"702":{"position":[[166,1],[204,1],[249,1],[317,1],[362,1],[434,2]]},"704":{"position":[[268,2],[342,1],[359,2],[398,2],[410,2],[413,3],[417,2]]},"706":{"position":[[207,1],[225,2],[228,2],[258,2],[261,2],[290,2],[293,2],[332,2],[335,2],[372,2],[375,3],[379,2]]},"708":{"position":[[238,1],[244,2],[263,2],[308,2],[311,3],[315,2]]},"710":{"position":[[288,1],[307,2],[310,2],[347,2],[350,2],[378,2],[412,2],[415,2],[479,2],[482,2],[535,2],[538,3],[542,2]]},"712":{"position":[[139,1],[174,2],[177,2],[236,2],[268,2]]},"714":{"position":[[164,1],[172,2],[213,2],[216,2],[275,2],[307,2]]},"716":{"position":[[141,1],[174,2],[177,2],[236,2],[268,2]]},"718":{"position":[[220,2],[294,1],[304,2],[312,2],[315,3],[319,2]]},"720":{"position":[[222,1],[302,1],[342,1],[344,2],[372,2],[411,1],[432,2],[443,2],[465,2],[482,2],[494,2]]}}}],["0",{"_index":276,"t":{"17":{"position":[[2316,2]]},"90":{"position":[[238,2],[345,2]]},"188":{"position":[[1411,1],[1443,1]]},"190":{"position":[[271,2]]},"198":{"position":[[316,1]]},"202":{"position":[[64,1]]},"210":{"position":[[1686,2]]},"212":{"position":[[306,2]]},"228":{"position":[[74,3],[296,1]]},"278":{"position":[[674,2]]},"312":{"position":[[889,2]]},"314":{"position":[[111,2]]},"322":{"position":[[210,4],[501,2]]},"324":{"position":[[43,4]]},"485":{"position":[[176,1]]},"559":{"position":[[2277,1],[2324,2],[2822,3],[3099,3]]},"564":{"position":[[1098,1]]},"634":{"position":[[426,1]]},"642":{"position":[[243,4]]},"656":{"position":[[405,4],[740,1]]},"658":{"position":[[405,4],[715,1]]}}}],["0.1.7",{"_index":2924,"t":{"545":{"position":[[3499,5]]}}}],["0.4",{"_index":2624,"t":{"483":{"position":[[72,3]]}}}],["0.7",{"_index":2621,"t":{"481":{"position":[[70,3]]}}}],["01",{"_index":2973,"t":{"547":{"position":[[1108,4],[1126,2]]},"696":{"position":[[570,2],[697,2]]}}}],["02",{"_index":2082,"t":{"326":{"position":[[324,2]]},"372":{"position":[[967,3]]},"547":{"position":[[1113,4]]},"696":{"position":[[573,2],[700,4]]}}}],["0666",{"_index":1602,"t":{"153":{"position":[[377,5],[578,5]]},"372":{"position":[[1111,5]]}}}],["08",{"_index":2980,"t":{"547":{"position":[[1185,2],[2193,2],[2207,2]]}}}],["0rtt",{"_index":1861,"t":{"228":{"position":[[835,5]]}}}],["1",{"_index":387,"t":{"29":{"position":[[169,1]]},"59":{"position":[[222,1]]},"90":{"position":[[734,2]]},"188":{"position":[[280,1]]},"190":{"position":[[51,1]]},"196":{"position":[[406,1],[595,1]]},"198":{"position":[[297,1],[337,1]]},"202":{"position":[[47,1],[83,1]]},"218":{"position":[[445,1]]},"220":{"position":[[1356,1]]},"222":{"position":[[119,1]]},"228":{"position":[[277,1]]},"234":{"position":[[355,4]]},"238":{"position":[[66,3]]},"278":{"position":[[559,1],[623,2],[763,1]]},"322":{"position":[[1371,5]]},"324":{"position":[[284,5]]},"344":{"position":[[395,1]]},"346":{"position":[[661,1]]},"348":{"position":[[463,1]]},"362":{"position":[[583,1]]},"364":{"position":[[48,1]]},"406":{"position":[[696,1]]},"426":{"position":[[279,3],[351,6]]},"545":{"position":[[3116,4],[3228,4]]},"547":{"position":[[1481,2],[1749,2]]},"559":{"position":[[2690,3]]},"564":{"position":[[1390,3],[1407,2]]},"566":{"position":[[379,7]]},"574":{"position":[[141,1]]},"610":{"position":[[480,3]]},"656":{"position":[[368,2],[708,2],[714,1]]},"658":{"position":[[368,2],[635,2],[662,2],[668,1],[687,2],[693,1]]}}}],["1,001.01e8",{"_index":2943,"t":{"547":{"position":[[510,10]]}}}],["1,146,667",{"_index":2623,"t":{"483":{"position":[[14,9]]}}}],["1,2,3",{"_index":3377,"t":{"650":{"position":[[763,7]]}}}],["1.1",{"_index":2626,"t":{"483":{"position":[[152,3]]}}}],["1.16",{"_index":1990,"t":{"298":{"position":[[557,6]]},"300":{"position":[[84,5]]},"312":{"position":[[471,4]]}}}],["1.17",{"_index":41,"t":{"4":{"position":[[39,4]]}}}],["1.234",{"_index":2942,"t":{"547":{"position":[[502,6]]}}}],["1.3",{"_index":1845,"t":{"228":{"position":[[152,3]]}}}],["1.3'",{"_index":1840,"t":{"228":{"position":[[57,5]]}}}],["10",{"_index":269,"t":{"17":{"position":[[2102,2],[2749,2]]},"473":{"position":[[565,2]]},"485":{"position":[[182,2]]},"666":{"position":[[774,5]]},"696":{"position":[[1568,2],[1677,2]]}}}],["10*time.second",{"_index":2563,"t":{"470":{"position":[[2117,16]]}}}],["10.1",{"_index":841,"t":{"130":{"position":[[1380,4]]}}}],["10.4.1",{"_index":877,"t":{"130":{"position":[[1840,6]]}}}],["100",{"_index":833,"t":{"130":{"position":[[1271,3]]},"485":{"position":[[189,3],[580,4]]}}}],["1000",{"_index":2642,"t":{"485":{"position":[[585,5]]},"492":{"position":[[652,4]]}}}],["101",{"_index":836,"t":{"130":{"position":[[1321,3]]}}}],["102",{"_index":839,"t":{"130":{"position":[[1363,3]]}}}],["1024",{"_index":1329,"t":{"135":{"position":[[510,4],[517,4],[1002,4]]}}}],["103",{"_index":843,"t":{"130":{"position":[[1404,3]]}}}],["11",{"_index":2975,"t":{"547":{"position":[[1123,2]]}}}],["11,846",{"_index":2612,"t":{"477":{"position":[[14,6]]}}}],["11.1",{"_index":869,"t":{"130":{"position":[[1758,4]]}}}],["11.2",{"_index":968,"t":{"130":{"position":[[3161,4],[5562,4]]}}}],["11.3",{"_index":971,"t":{"130":{"position":[[3198,4],[5615,4]]}}}],["11.4",{"_index":974,"t":{"130":{"position":[[3245,4],[5688,4]]}}}],["11.5",{"_index":1017,"t":{"130":{"position":[[3923,4],[6755,4]]}}}],["111",{"_index":3355,"t":{"644":{"position":[[461,5]]}}}],["117.2",{"_index":2619,"t":{"479":{"position":[[148,5]]}}}],["12",{"_index":2952,"t":{"547":{"position":[[723,2],[1425,2]]},"559":{"position":[[2032,2],[2076,2]]}}}],["120",{"_index":2961,"t":{"547":{"position":[[867,4],[962,4]]}}}],["120000",{"_index":2989,"t":{"547":{"position":[[1688,7]]}}}],["123",{"_index":3346,"t":{"642":{"position":[[462,3]]}}}],["12345.pdf",{"_index":3220,"t":{"592":{"position":[[434,12],[469,9],[513,11]]}}}],["123456",{"_index":1672,"t":{"176":{"position":[[356,9],[506,9],[663,8]]}}}],["123456789",{"_index":2932,"t":{"547":{"position":[[377,10],[389,9]]}}}],["125",{"_index":2998,"t":{"547":{"position":[[2084,4]]}}}],["127.0.0.1",{"_index":2179,"t":{"358":{"position":[[416,11]]},"614":{"position":[[140,11]]},"616":{"position":[[157,10],[237,12]]}}}],["127.0.0.1:3000",{"_index":1958,"t":{"278":{"position":[[525,14]]}}}],["127.0.0.1:3000/debug/var",{"_index":1959,"t":{"278":{"position":[[566,25]]}}}],["127.0.0.1:3000/debug/vars?r=c",{"_index":1966,"t":{"278":{"position":[[702,29]]}}}],["13",{"_index":1927,"t":{"268":{"position":[[306,3]]}}}],["15:04:05",{"_index":2255,"t":{"374":{"position":[[759,8]]},"376":{"position":[[126,11]]}}}],["15th",{"_index":36,"t":{"2":{"position":[[363,5]]}}}],["16",{"_index":3115,"t":{"564":{"position":[[1375,4]]}}}],["1638",{"_index":2937,"t":{"547":{"position":[[453,4],[463,4]]}}}],["18",{"_index":2957,"t":{"547":{"position":[[798,3],[942,2]]},"559":{"position":[[2035,2],[2102,2]]}}}],["18.04.3",{"_index":2588,"t":{"473":{"position":[[523,7]]}}}],["1831710635",{"_index":1928,"t":{"268":{"position":[[310,11],[541,11]]}}}],["185",{"_index":121,"t":{"6":{"position":[[1552,5]]},"135":{"position":[[4104,5]]}}}],["19",{"_index":2955,"t":{"547":{"position":[[763,2]]}}}],["19,664",{"_index":2616,"t":{"479":{"position":[[14,6]]}}}],["1;q=0.2",{"_index":3109,"t":{"564":{"position":[[1226,7]]}}}],["1s",{"_index":526,"t":{"59":{"position":[[168,2]]}}}],["2",{"_index":1756,"t":{"198":{"position":[[364,1]]},"202":{"position":[[108,1]]},"244":{"position":[[677,1]]},"250":{"position":[[258,1]]},"346":{"position":[[1356,4],[1807,2]]},"426":{"position":[[283,2]]},"450":{"position":[[750,2]]},"545":{"position":[[3137,4],[3247,4]]},"559":{"position":[[2860,3]]},"564":{"position":[[777,1]]},"582":{"position":[[1022,4]]},"658":{"position":[[641,1]]},"704":{"position":[[133,2]]}}}],["2*time.second",{"_index":2536,"t":{"470":{"position":[[538,15],[1391,14]]}}}],["2,066",{"_index":2614,"t":{"477":{"position":[[94,5]]}}}],["2.0",{"_index":2609,"t":{"475":{"position":[[444,3]]}}}],["2.20ghz",{"_index":2584,"t":{"473":{"position":[[499,7]]}}}],["2.3.3",{"_index":961,"t":{"130":{"position":[[3060,5],[5404,5]]}}}],["2.30ghz",{"_index":2630,"t":{"485":{"position":[[96,7]]}}}],["20",{"_index":2180,"t":{"358":{"position":[[436,3]]},"360":{"position":[[176,3]]},"559":{"position":[[527,2]]},"622":{"position":[[351,3],[446,4],[500,3],[576,4]]},"624":{"position":[[465,3],[532,4],[614,4]]},"696":{"position":[[1571,2],[1680,3]]},"720":{"position":[[407,3]]}}}],["200",{"_index":327,"t":{"21":{"position":[[221,3]]},"130":{"position":[[1431,3]]},"470":{"position":[[813,3]]}}}],["2005",{"_index":2974,"t":{"547":{"position":[[1118,4]]}}}],["2006",{"_index":2227,"t":{"372":{"position":[[975,6]]},"696":{"position":[[565,4]]}}}],["201",{"_index":848,"t":{"130":{"position":[[1470,3]]}}}],["202",{"_index":851,"t":{"130":{"position":[[1510,3]]}}}],["2020",{"_index":37,"t":{"2":{"position":[[369,5]]}}}],["2022",{"_index":2979,"t":{"547":{"position":[[1180,4],[2202,4]]}}}],["203",{"_index":854,"t":{"130":{"position":[[1569,3]]}}}],["204",{"_index":857,"t":{"130":{"position":[[1610,3]]}}}],["205",{"_index":860,"t":{"130":{"position":[[1654,3]]}}}],["206",{"_index":863,"t":{"130":{"position":[[1700,3]]}}}],["207",{"_index":867,"t":{"130":{"position":[[1741,3]]}}}],["208",{"_index":871,"t":{"130":{"position":[[1787,3]]}}}],["226",{"_index":875,"t":{"130":{"position":[[1823,3]]}}}],["2295",{"_index":1013,"t":{"130":{"position":[[3868,5],[6671,5]]}}}],["233",{"_index":1556,"t":{"147":{"position":[[673,4],[988,4]]}}}],["24",{"_index":2499,"t":{"452":{"position":[[121,2]]},"454":{"position":[[40,2]]}}}],["244,847",{"_index":2625,"t":{"483":{"position":[[96,7]]}}}],["25.7",{"_index":2617,"t":{"479":{"position":[[69,4]]}}}],["250",{"_index":2991,"t":{"547":{"position":[[1796,3]]}}}],["2518",{"_index":840,"t":{"130":{"position":[[1374,5]]}}}],["256",{"_index":1345,"t":{"135":{"position":[[996,3]]}}}],["27",{"_index":2981,"t":{"547":{"position":[[1188,2],[2196,2],[2210,2]]}}}],["2774",{"_index":1023,"t":{"130":{"position":[[4001,5],[6876,5]]}}}],["28",{"_index":2578,"t":{"473":{"position":[[454,2]]}}}],["2beb887efd54",{"_index":3246,"t":{"606":{"position":[[281,13]]}}}],["3",{"_index":902,"t":{"130":{"position":[[2192,1],[3383,1],[3535,1],[5899,1],[6149,1]]},"386":{"position":[[185,1]]},"404":{"position":[[1460,3]]},"559":{"position":[[2998,3]]},"650":{"position":[[723,3],[744,3]]},"656":{"position":[[675,2],[761,2],[767,1]]}}}],["3.1",{"_index":909,"t":{"130":{"position":[[2274,3],[4203,3]]}}}],["3.2",{"_index":927,"t":{"130":{"position":[[2542,3],[4609,3]]}}}],["30",{"_index":1707,"t":{"186":{"position":[[442,2]]},"336":{"position":[[342,2]]},"338":{"position":[[179,2]]},"358":{"position":[[452,2]]},"360":{"position":[[192,2]]},"485":{"position":[[537,2]]}}}],["300",{"_index":879,"t":{"130":{"position":[[1871,3]]}}}],["3000",{"_index":515,"t":{"57":{"position":[[226,8]]},"162":{"position":[[357,4]]},"164":{"position":[[271,4]]},"166":{"position":[[320,4]]},"168":{"position":[[190,4]]},"170":{"position":[[201,4]]}}}],["301",{"_index":882,"t":{"130":{"position":[[1919,3]]},"424":{"position":[[253,4]]},"664":{"position":[[656,4]]}}}],["302",{"_index":885,"t":{"130":{"position":[[1956,3]]},"426":{"position":[[566,3]]},"664":{"position":[[179,3]]},"666":{"position":[[187,3]]},"668":{"position":[[215,3]]}}}],["303",{"_index":888,"t":{"130":{"position":[[1996,3]]}}}],["304",{"_index":891,"t":{"130":{"position":[[2039,3]]}}}],["305",{"_index":894,"t":{"130":{"position":[[2077,3]]}}}],["307",{"_index":897,"t":{"130":{"position":[[2126,3]]}}}],["308",{"_index":900,"t":{"130":{"position":[[2175,3]]}}}],["32",{"_index":1368,"t":{"135":{"position":[[1953,4]]},"242":{"position":[[92,2]]},"244":{"position":[[289,2],[426,3]]},"246":{"position":[[391,2],[476,3]]}}}],["32.23",{"_index":3405,"t":{"656":{"position":[[646,5],[681,5]]}}}],["3229",{"_index":876,"t":{"130":{"position":[[1834,5]]}}}],["32gb",{"_index":2585,"t":{"473":{"position":[[507,4]]}}}],["33",{"_index":1963,"t":{"278":{"position":[[648,3]]}}}],["354.1",{"_index":2611,"t":{"475":{"position":[[518,5]]}}}],["36",{"_index":2093,"t":{"336":{"position":[[670,2]]},"338":{"position":[[291,3],[323,2]]}}}],["3600",{"_index":286,"t":{"17":{"position":[[2775,5]]},"298":{"position":[[523,5]]}}}],["360641",{"_index":3327,"t":{"634":{"position":[[716,6]]},"682":{"position":[[521,6]]},"684":{"position":[[601,6]]}}}],["367,069",{"_index":2610,"t":{"475":{"position":[[462,7]]}}}],["368,647",{"_index":2620,"t":{"481":{"position":[[14,7]]}}}],["390.44",{"_index":2615,"t":{"477":{"position":[[148,6]]}}}],["3rd",{"_index":2769,"t":{"510":{"position":[[158,3]]}}}],["4",{"_index":986,"t":{"130":{"position":[[3426,1],[5967,1]]},"135":{"position":[[506,1]]},"153":{"position":[[232,2]]},"545":{"position":[[3514,2]]},"547":{"position":[[579,1]]},"559":{"position":[[3137,3]]}}}],["4,302",{"_index":2618,"t":{"479":{"position":[[94,5]]}}}],["4.1",{"_index":865,"t":{"130":{"position":[[1717,3],[2056,3]]}}}],["4.15.0",{"_index":2589,"t":{"473":{"position":[[531,6]]}}}],["4.2",{"_index":942,"t":{"130":{"position":[[2759,3],[4934,3]]}}}],["4.3.1",{"_index":789,"t":{"130":{"position":[[79,5]]}}}],["4.3.2",{"_index":791,"t":{"130":{"position":[[118,5]]}}}],["4.3.3",{"_index":793,"t":{"130":{"position":[[157,5]]}}}],["4.3.4",{"_index":795,"t":{"130":{"position":[[194,5]]}}}],["4.3.5",{"_index":800,"t":{"130":{"position":[[271,5]]}}}],["4.3.6",{"_index":802,"t":{"130":{"position":[[316,5]]}}}],["4.3.7",{"_index":804,"t":{"130":{"position":[[361,5]]}}}],["4.3.8",{"_index":806,"t":{"130":{"position":[[402,5]]}}}],["4.4",{"_index":954,"t":{"130":{"position":[[2974,3],[5275,3]]},"481":{"position":[[149,3]]}}}],["400",{"_index":904,"t":{"130":{"position":[[2213,3]]},"344":{"position":[[839,3]]},"362":{"position":[[855,3],[970,3]]}}}],["401",{"_index":907,"t":{"130":{"position":[[2257,3]]},"172":{"position":[[138,3]]},"178":{"position":[[943,3]]},"350":{"position":[[432,3]]}}}],["402",{"_index":911,"t":{"130":{"position":[[2302,3]]}}}],["403",{"_index":914,"t":{"130":{"position":[[2343,3]]}}}],["404",{"_index":917,"t":{"130":{"position":[[2383,3]]},"490":{"position":[[229,3],[360,3]]},"503":{"position":[[951,4]]},"516":{"position":[[860,3]]},"547":{"position":[[316,3]]}}}],["404.html",{"_index":1989,"t":{"298":{"position":[[503,11]]}}}],["405",{"_index":920,"t":{"130":{"position":[[2431,3]]}}}],["406",{"_index":923,"t":{"130":{"position":[[2476,3]]}}}],["407",{"_index":926,"t":{"130":{"position":[[2525,3]]}}}],["408",{"_index":929,"t":{"130":{"position":[[2569,3]]},"470":{"position":[[904,3]]}}}],["409",{"_index":932,"t":{"130":{"position":[[2609,3]]}}}],["4096",{"_index":1452,"t":{"135":{"position":[[5565,4],[6975,4]]}}}],["410",{"_index":935,"t":{"130":{"position":[[2645,3]]}}}],["411",{"_index":938,"t":{"130":{"position":[[2691,3]]}}}],["412",{"_index":941,"t":{"130":{"position":[[2742,3]]}}}],["413",{"_index":944,"t":{"130":{"position":[[2793,3]]},"135":{"position":[[465,3]]}}}],["414",{"_index":947,"t":{"130":{"position":[[2843,3]]}}}],["415",{"_index":950,"t":{"130":{"position":[[2896,3]]},"692":{"position":[[295,3],[385,3]]}}}],["416",{"_index":953,"t":{"130":{"position":[[2957,3]]}}}],["417",{"_index":956,"t":{"130":{"position":[[3004,3]]}}}],["418",{"_index":959,"t":{"130":{"position":[[3043,3]]}}}],["42",{"_index":2088,"t":{"334":{"position":[[54,2]]},"547":{"position":[[2583,2]]}}}],["42.8",{"_index":2613,"t":{"477":{"position":[[69,4]]}}}],["421",{"_index":963,"t":{"130":{"position":[[3093,3]]}}}],["422",{"_index":967,"t":{"130":{"position":[[3144,3]]}}}],["423",{"_index":970,"t":{"130":{"position":[[3181,3]]}}}],["424",{"_index":973,"t":{"130":{"position":[[3228,3]]}}}],["425",{"_index":976,"t":{"130":{"position":[[3267,3]]}}}],["426",{"_index":120,"t":{"6":{"position":[[1543,4]]},"130":{"position":[[3313,3]]}}}],["428",{"_index":982,"t":{"130":{"position":[[3366,3]]}}}],["429",{"_index":985,"t":{"130":{"position":[[3409,3]]},"362":{"position":[[274,3]]}}}],["431",{"_index":988,"t":{"130":{"position":[[3464,3]]}}}],["450b",{"_index":3244,"t":{"606":{"position":[[271,4]]}}}],["451",{"_index":991,"t":{"130":{"position":[[3518,3]]}}}],["4918",{"_index":868,"t":{"130":{"position":[[1752,5],[3155,5],[3192,5],[3239,5],[3917,5],[5556,5],[5609,5],[5682,5],[6749,5]]}}}],["4gb",{"_index":2632,"t":{"485":{"position":[[108,3]]}}}],["5",{"_index":989,"t":{"130":{"position":[[3481,1],[6059,1]]},"362":{"position":[[302,1]]},"364":{"position":[[33,2]]},"404":{"position":[[1624,1],[1765,3]]},"559":{"position":[[511,1]]}}}],["5.2",{"_index":978,"t":{"130":{"position":[[3284,4],[5745,4]]}}}],["500",{"_index":994,"t":{"130":{"position":[[3565,3]]},"374":{"position":[[1014,3]]},"376":{"position":[[171,3]]},"485":{"position":[[197,3]]},"505":{"position":[[90,3],[342,3]]},"507":{"position":[[735,3]]},"662":{"position":[[291,5]]}}}],["5000",{"_index":2637,"t":{"485":{"position":[[261,5],[591,4]]}}}],["501",{"_index":997,"t":{"130":{"position":[[3611,3]]}}}],["502",{"_index":1000,"t":{"130":{"position":[[3653,3]]}}}],["503",{"_index":1003,"t":{"130":{"position":[[3703,3]]},"503":{"position":[[1026,3],[1088,3]]}}}],["504",{"_index":1006,"t":{"130":{"position":[[3749,3]]}}}],["505",{"_index":1009,"t":{"130":{"position":[[3804,3]]}}}],["506",{"_index":1012,"t":{"130":{"position":[[3857,3]]}}}],["507",{"_index":1016,"t":{"130":{"position":[[3906,3]]}}}],["508",{"_index":1019,"t":{"130":{"position":[[3949,3]]}}}],["510",{"_index":1022,"t":{"130":{"position":[[3990,3]]}}}],["511",{"_index":1026,"t":{"130":{"position":[[4047,3]]}}}],["5120",{"_index":2583,"t":{"473":{"position":[[488,4]]}}}],["57,880",{"_index":2622,"t":{"481":{"position":[[94,6]]}}}],["5789",{"_index":798,"t":{"130":{"position":[[229,4]]}}}],["5842",{"_index":872,"t":{"130":{"position":[[1798,5],[3960,5],[6814,5]]}}}],["6",{"_index":1027,"t":{"130":{"position":[[4064,1],[6978,1]]}}}],["6,162,556",{"_index":2607,"t":{"475":{"position":[[386,9]]}}}],["6.2.1",{"_index":834,"t":{"130":{"position":[[1288,5]]}}}],["6.2.2",{"_index":837,"t":{"130":{"position":[[1338,5]]}}}],["6.3.1",{"_index":846,"t":{"130":{"position":[[1448,5]]}}}],["6.3.2",{"_index":849,"t":{"130":{"position":[[1487,5]]}}}],["6.3.3",{"_index":852,"t":{"130":{"position":[[1527,5]]}}}],["6.3.4",{"_index":855,"t":{"130":{"position":[[1586,5]]}}}],["6.3.5",{"_index":858,"t":{"130":{"position":[[1627,5]]}}}],["6.3.6",{"_index":861,"t":{"130":{"position":[[1671,5]]}}}],["6.4.1",{"_index":880,"t":{"130":{"position":[[1888,5]]}}}],["6.4.2",{"_index":883,"t":{"130":{"position":[[1936,5]]}}}],["6.4.3",{"_index":886,"t":{"130":{"position":[[1973,5]]}}}],["6.4.4",{"_index":889,"t":{"130":{"position":[[2013,5]]}}}],["6.4.5",{"_index":895,"t":{"130":{"position":[[2094,5]]}}}],["6.4.7",{"_index":898,"t":{"130":{"position":[[2143,5]]}}}],["6.5.1",{"_index":905,"t":{"130":{"position":[[2230,5],[4137,5]]}}}],["6.5.10",{"_index":939,"t":{"130":{"position":[[2708,6],[4855,6]]}}}],["6.5.11",{"_index":945,"t":{"130":{"position":[[2810,6],[5016,6]]}}}],["6.5.12",{"_index":948,"t":{"130":{"position":[[2860,6],[5093,6]]}}}],["6.5.13",{"_index":951,"t":{"130":{"position":[[2913,6],[5176,6]]}}}],["6.5.14",{"_index":957,"t":{"130":{"position":[[3021,6],[5349,6]]}}}],["6.5.15",{"_index":980,"t":{"130":{"position":[[3330,6],[5816,6]]}}}],["6.5.2",{"_index":912,"t":{"130":{"position":[[2319,5],[4273,5]]}}}],["6.5.3",{"_index":915,"t":{"130":{"position":[[2360,5],[4333,5]]}}}],["6.5.4",{"_index":918,"t":{"130":{"position":[[2400,5],[4391,5]]}}}],["6.5.5",{"_index":921,"t":{"130":{"position":[[2448,5],[4465,5]]}}}],["6.5.6",{"_index":924,"t":{"130":{"position":[[2493,5],[4533,5]]}}}],["6.5.7",{"_index":930,"t":{"130":{"position":[[2586,5],[4677,5]]}}}],["6.5.8",{"_index":933,"t":{"130":{"position":[[2626,5],[4735,5]]}}}],["6.5.9",{"_index":936,"t":{"130":{"position":[[2662,5],[4785,5]]}}}],["6.6.1",{"_index":995,"t":{"130":{"position":[[3582,5],[6225,5]]}}}],["6.6.2",{"_index":998,"t":{"130":{"position":[[3628,5],[6295,5]]}}}],["6.6.3",{"_index":1001,"t":{"130":{"position":[[3670,5],[6357,5]]}}}],["6.6.4",{"_index":1004,"t":{"130":{"position":[[3720,5],[6435,5]]}}}],["6.6.5",{"_index":1007,"t":{"130":{"position":[[3766,5],[6505,5]]}}}],["6.6.6",{"_index":1010,"t":{"130":{"position":[[3821,5],[6593,5]]}}}],["600",{"_index":1715,"t":{"186":{"position":[[702,7]]}}}],["6000",{"_index":1720,"t":{"186":{"position":[[923,7]]}}}],["6140",{"_index":2629,"t":{"485":{"position":[[85,4]]}}}],["6585",{"_index":983,"t":{"130":{"position":[[3377,5],[3420,5],[3475,5],[4058,5],[5893,5],[5961,5],[6053,5],[6972,5]]}}}],["7",{"_index":1024,"t":{"130":{"position":[[4007,1],[6882,1]]}}}],["7.0",{"_index":3005,"t":{"547":{"position":[[2682,4]]}}}],["7.1",{"_index":873,"t":{"130":{"position":[[1804,3]]}}}],["7.2",{"_index":1020,"t":{"130":{"position":[[3966,3],[6820,3]]}}}],["700",{"_index":3424,"t":{"662":{"position":[[152,4],[157,3],[297,4]]}}}],["7168",{"_index":960,"t":{"130":{"position":[[3054,5],[5398,5]]}}}],["7231",{"_index":788,"t":{"130":{"position":[[73,5],[112,5],[151,5],[188,5],[265,5],[310,5],[355,5],[396,5],[1282,5],[1332,5],[1442,5],[1481,5],[1521,5],[1580,5],[1621,5],[1665,5],[1882,5],[1930,5],[1967,5],[2007,5],[2088,5],[2137,5],[2224,5],[2313,5],[2354,5],[2394,5],[2442,5],[2487,5],[2580,5],[2620,5],[2656,5],[2702,5],[2804,5],[2854,5],[2907,5],[3015,5],[3324,5],[3576,5],[3622,5],[3664,5],[3714,5],[3760,5],[3815,5],[4131,5],[4267,5],[4327,5],[4385,5],[4459,5],[4527,5],[4671,5],[4729,5],[4779,5],[4849,5],[5010,5],[5087,5],[5170,5],[5343,5],[5810,5],[6219,5],[6289,5],[6351,5],[6429,5],[6499,5],[6587,5]]}}}],["7232",{"_index":892,"t":{"130":{"position":[[2050,5],[2753,5],[4928,5]]}}}],["7233",{"_index":864,"t":{"130":{"position":[[1711,5],[2968,5],[5269,5]]}}}],["7235",{"_index":908,"t":{"130":{"position":[[2268,5],[2536,5],[4197,5],[4603,5]]}}}],["72d5",{"_index":2938,"t":{"547":{"position":[[458,4]]}}}],["750",{"_index":2736,"t":{"500":{"position":[[1330,4]]}}}],["7538",{"_index":901,"t":{"130":{"position":[[2186,5]]}}}],["7540",{"_index":964,"t":{"130":{"position":[[3104,5],[5476,5]]}}}],["7725",{"_index":992,"t":{"130":{"position":[[3529,5],[6143,5]]}}}],["8",{"_index":826,"t":{"130":{"position":[[877,2],[930,2],[985,2],[1050,2],[1117,2],[1196,2]]},"228":{"position":[[731,1]]},"505":{"position":[[548,1]]},"547":{"position":[[657,1]]},"564":{"position":[[428,2],[1214,2]]},"618":{"position":[[296,1]]},"706":{"position":[[328,3],[369,2]]}}}],["8.1",{"_index":1014,"t":{"130":{"position":[[3874,3],[6677,3]]}}}],["8080",{"_index":473,"t":{"47":{"position":[[131,5]]}}}],["8297",{"_index":844,"t":{"130":{"position":[[1415,4]]}}}],["8446",{"_index":1843,"t":{"228":{"position":[[104,5]]}}}],["8470",{"_index":977,"t":{"130":{"position":[[3278,5],[5739,5]]}}}],["88",{"_index":2590,"t":{"473":{"position":[[538,2]]}}}],["8859",{"_index":3108,"t":{"564":{"position":[[1221,4],[1385,4],[1402,4]]}}}],["8d7ad5e3",{"_index":3242,"t":{"606":{"position":[[256,9]]}}}],["9",{"_index":2697,"t":{"496":{"position":[[25,1]]},"559":{"position":[[2962,3]]}}}],["9.1.2",{"_index":965,"t":{"130":{"position":[[3110,5],[5482,5]]}}}],["900",{"_index":3425,"t":{"662":{"position":[[161,3]]}}}],["91",{"_index":2960,"t":{"547":{"position":[[828,2],[907,2]]}}}],["_",{"_index":424,"t":{"35":{"position":[[255,1]]},"37":{"position":[[449,1]]},"39":{"position":[[228,1]]},"41":{"position":[[334,1]]},"57":{"position":[[203,1],[240,3]]},"59":{"position":[[704,1],[798,1]]},"108":{"position":[[129,1]]},"149":{"position":[[498,1]]},"153":{"position":[[512,1]]},"186":{"position":[[654,1]]},"310":{"position":[[202,1]]},"346":{"position":[[825,2]]},"470":{"position":[[312,1],[1139,1],[1741,1]]},"559":{"position":[[1189,2],[2331,2]]},"610":{"position":[[432,1]]},"634":{"position":[[600,2]]},"682":{"position":[[405,2]]},"684":{"position":[[485,2]]}}}],["_pass",{"_index":1681,"t":{"176":{"position":[[832,8]]}}}],["_test.go",{"_index":523,"t":{"59":{"position":[[84,8]]}}}],["_test\\\\.go",{"_index":2689,"t":{"492":{"position":[[764,14]]}}}],["_user",{"_index":1679,"t":{"176":{"position":[[806,8]]}}}],["a.byt",{"_index":572,"t":{"68":{"position":[[216,9]]}}}],["a.get(\"/test",{"_index":444,"t":{"37":{"position":[[406,14]]}}}],["a.name(\"fd",{"_index":443,"t":{"37":{"position":[[392,13]]}}}],["a.pars",{"_index":570,"t":{"68":{"position":[[159,10]]}}}],["a.request",{"_index":566,"t":{"68":{"position":[[65,11]]}}}],["a/test",{"_index":449,"t":{"37":{"position":[[734,10],[936,10]]}}}],["a241",{"_index":3245,"t":{"606":{"position":[[276,4]]}}}],["aaf3",{"_index":3243,"t":{"606":{"position":[[266,4]]}}}],["abort",{"_index":1862,"t":{"228":{"position":[[970,6]]}}}],["abov",{"_index":100,"t":{"6":{"position":[[1081,5]]},"149":{"position":[[218,5]]},"464":{"position":[[668,6]]}}}],["ac",{"_index":2699,"t":{"496":{"position":[[80,3]]},"556":{"position":[[93,3]]}}}],["accept",{"_index":1126,"t":{"130":{"position":[[7395,7],[7432,7],[7935,8],[7966,7],[8006,7],[8047,7],[9664,7],[10736,7],[10972,7],[11012,7],[11057,7]]},"135":{"position":[[3677,9]]},"192":{"position":[[125,6]]},"208":{"position":[[449,8],[641,8]]},"384":{"position":[[607,8]]},"554":{"position":[[572,7]]},"564":{"position":[[57,11],[97,6],[352,7],[782,7],[1107,10],[1175,6],[1194,6],[1237,6],[1278,6]]},"594":{"position":[[36,6],[64,7],[291,7],[359,7],[433,7]]},"710":{"position":[[469,9],[511,6],[528,6]]}}}],["accepts(off",{"_index":3086,"t":{"564":{"position":[[141,14]]}}}],["acceptscharsets(off",{"_index":3087,"t":{"564":{"position":[[188,22]]}}}],["acceptsencodings(off",{"_index":3088,"t":{"564":{"position":[[243,23]]}}}],["acceptslanguages(off",{"_index":3089,"t":{"564":{"position":[[299,23]]}}}],["access",{"_index":1170,"t":{"130":{"position":[[8217,7],[8286,7],[8351,7],[8415,7],[8480,7],[8540,7],[8601,7],[8669,7]]},"208":{"position":[[658,6]]},"210":{"position":[[252,7],[609,6],[736,9],[1498,7]]},"284":{"position":[[135,7]]},"300":{"position":[[463,6],[595,6]]},"312":{"position":[[233,6]]},"384":{"position":[[563,6]]},"473":{"position":[[146,7]]},"568":{"position":[[47,6]]},"634":{"position":[[3,6]]},"640":{"position":[[891,8]]}}}],["access_token=clearli",{"_index":2129,"t":{"344":{"position":[[1035,21]]}}}],["access_token=correct",{"_index":2127,"t":{"344":{"position":[[924,21]]},"346":{"position":[[1541,21],[1705,21]]}}}],["accordingli",{"_index":2757,"t":{"507":{"position":[[263,11]]}}}],["account",{"_index":2191,"t":{"360":{"position":[[302,7]]}}}],["acquireag",{"_index":565,"t":{"68":{"position":[[43,14]]}}}],["acquirearg",{"_index":674,"t":{"96":{"position":[[209,11],[334,13]]},"98":{"position":[[271,11],[405,13]]}}}],["acquireformfil",{"_index":707,"t":{"98":{"position":[[1549,15]]}}}],["acquirerespons",{"_index":757,"t":{"118":{"position":[[105,15],[258,17]]}}}],["action",{"_index":2078,"t":{"326":{"position":[[183,6]]},"374":{"position":[[440,6]]},"507":{"position":[[256,6]]}}}],["activ",{"_index":394,"t":{"31":{"position":[[67,6],[272,6]]}}}],["active20{{.title}}back/static/image.png",{"_index":2006,"t":{"300":{"position":[[522,35]]}}}],["http:///static/static/image.png",{"_index":2008,"t":{"300":{"position":[[617,42]]}}}],["http://api.example.com/users?page=2",{"_index":3298,"t":{"626":{"position":[[195,38],[300,38]]}}}],["http://api.example.com/users?page=5",{"_index":3299,"t":{"626":{"position":[[242,38],[354,38]]}}}],["http://example.com",{"_index":3360,"t":{"648":{"position":[[127,18]]}}}],["http://example.com/?field1=value1&field1=value2&field2=value3",{"_index":3368,"t":{"650":{"position":[[374,61]]}}}],["http://example.com/?list_a=1&list_a=2&list_a=3&list_b[]=1&list_b[]=2&list_b[]=3&list_c=1,2,3",{"_index":3373,"t":{"650":{"position":[[558,92]]}}}],["http://example.com/?name=alex&amount=32.23&id",{"_index":3403,"t":{"656":{"position":[[533,46]]}}}],["http://example.com/?name=alex&wanna_cake=2&id",{"_index":3409,"t":{"658":{"position":[[523,46]]}}}],["http://example.com/?name=alex&want_pizza=false&id",{"_index":3361,"t":{"650":{"position":[[180,50]]},"654":{"position":[[465,50]]}}}],["http://example.com/?order=desc&brand=nik",{"_index":3389,"t":{"652":{"position":[[341,41]]}}}],["http://example.com/hello",{"_index":3190,"t":{"584":{"position":[[337,24]]}}}],["http://example.com/search?q=someth",{"_index":3332,"t":{"638":{"position":[[94,37]]}}}],["http://example.com/user/111",{"_index":3352,"t":{"644":{"position":[[309,27]]}}}],["http://example.com/user/123",{"_index":3344,"t":{"642":{"position":[[350,27]]}}}],["http://example.com/user/fenni",{"_index":3120,"t":{"566":{"position":[[148,29]]},"640":{"position":[[297,29]]}}}],["http://example.com/user/fenny/123",{"_index":3123,"t":{"566":{"position":[[282,33]]},"640":{"position":[[422,33]]}}}],["http://example.com/users?sort=desc",{"_index":3358,"t":{"646":{"position":[[254,34]]}}}],["http://google.com",{"_index":534,"t":{"59":{"position":[[460,17],[615,20]]},"404":{"position":[[1439,20]]},"570":{"position":[[281,20],[352,17],[425,18]]}}}],["http://google.com/search",{"_index":3264,"t":{"612":{"position":[[113,24]]}}}],["http://localhost",{"_index":2416,"t":{"404":{"position":[[2016,19]]},"570":{"position":[[302,19],[334,17],[407,17]]}}}],["http://localhost:3000",{"_index":136,"t":{"8":{"position":[[293,21]]},"208":{"position":[[589,21],[717,22]]},"320":{"position":[[268,21]]},"344":{"position":[[856,21],[968,21],[1070,21]]},"346":{"position":[[1451,21]]},"348":{"position":[[820,21]]},"404":{"position":[[1726,24]]},"547":{"position":[[2601,22]]},"580":{"position":[[1238,21]]},"674":{"position":[[763,24]]}}}],["http://localhost:3000/1",{"_index":2986,"t":{"547":{"position":[[1443,23],[1711,23]]}}}],["http://localhost:3000/12",{"_index":2985,"t":{"547":{"position":[[1397,24]]}}}],["http://localhost:3000/120000",{"_index":2988,"t":{"547":{"position":[[1645,28]]}}}],["http://localhost:3000/125",{"_index":2997,"t":{"547":{"position":[[2044,25]]}}}],["http://localhost:3000/2022",{"_index":3000,"t":{"547":{"position":[[2166,26]]}}}],["http://localhost:3000/250",{"_index":2990,"t":{"547":{"position":[[1767,25]]}}}],["http://localhost:3000/42",{"_index":3003,"t":{"547":{"position":[[2555,24]]}}}],["http://localhost:3000/7.0",{"_index":3004,"t":{"547":{"position":[[2642,25]]}}}],["http://localhost:3000/?name=john&pass=do",{"_index":3168,"t":{"580":{"position":[[1276,43]]}}}],["http://localhost:3000/?name=john&pass=doe&products=shoe,hat",{"_index":3421,"t":{"660":{"position":[[737,61]]}}}],["http://localhost:3000/allow",{"_index":2158,"t":{"348":{"position":[[952,29]]}}}],["http://localhost:3000/api/user/john",{"_index":184,"t":{"10":{"position":[[1218,35]]}}}],["http://localhost:3000/auth2",{"_index":2152,"t":{"346":{"position":[[1749,27]]}}}],["http://localhost:3000/authent",{"_index":2150,"t":{"346":{"position":[[1585,35]]}}}],["http://localhost:3000/bodi",{"_index":3552,"t":{"696":{"position":[[1574,26]]}}}],["http://localhost:3000/css/style.css",{"_index":218,"t":{"17":{"position":[[435,35]]}}}],["http://localhost:3000/flights/lax",{"_index":2897,"t":{"545":{"position":[[2140,33]]}}}],["http://localhost:3000/foo/1000",{"_index":2545,"t":{"470":{"position":[[861,32]]}}}],["http://localhost:3000/foo/3000",{"_index":2546,"t":{"470":{"position":[[952,32]]}}}],["http://localhost:3000/hello.html",{"_index":216,"t":{"17":{"position":[[355,32]]}}}],["http://localhost:3000/john",{"_index":178,"t":{"10":{"position":[[991,26]]}}}],["http://localhost:3000/js/jquery.j",{"_index":217,"t":{"17":{"position":[[394,34]]}}}],["http://localhost:3000/metr",{"_index":2329,"t":{"384":{"position":[[634,29]]}}}],["http://localhost:3000/old",{"_index":2450,"t":{"424":{"position":[[476,25]]},"444":{"position":[[456,25]]}}}],["http://localhost:3000/old/hello",{"_index":2451,"t":{"424":{"position":[[507,31]]},"444":{"position":[[487,31]]}}}],["http://localhost:3000/plantae/prunus.persica",{"_index":2891,"t":{"545":{"position":[[1931,44]]}}}],["http://localhost:3000/query?title=title&body=body&date=2021",{"_index":3553,"t":{"696":{"position":[[1616,60]]}}}],["http://localhost:3000/shop/product/color:blue/size:x",{"_index":2905,"t":{"545":{"position":[[2479,53]]}}}],["http://localhost:3000/static/css/style.css",{"_index":228,"t":{"17":{"position":[[968,42]]}}}],["http://localhost:3000/static/hello.html",{"_index":226,"t":{"17":{"position":[[874,39]]}}}],["http://localhost:3000/static/js/jquery.j",{"_index":227,"t":{"17":{"position":[[920,41]]}}}],["http://localhost:3000/test",{"_index":2999,"t":{"547":{"position":[[2104,26]]}}}],["http://localhost:3001",{"_index":2419,"t":{"404":{"position":[[2276,24],[2459,24],[2875,24]]}}}],["http://localhost:3002",{"_index":2420,"t":{"404":{"position":[[2301,24],[2484,24],[2900,24]]}}}],["http://localhost:3003",{"_index":2421,"t":{"404":{"position":[[2326,24],[2509,24],[2925,24]]}}}],["http://localhost:8000",{"_index":2405,"t":{"404":{"position":[[820,25]]}}}],["http://localhost:8080",{"_index":3143,"t":{"578":{"position":[[92,21]]}}}],["http://localhost:8080/css/style.css",{"_index":206,"t":{"12":{"position":[[466,35]]}}}],["http://localhost:8080/hello",{"_index":3474,"t":{"680":{"position":[[84,27]]}}}],["http://localhost:8080/hello%20world",{"_index":173,"t":{"10":{"position":[[787,35]]}}}],["http://localhost:8080/hello.html",{"_index":204,"t":{"12":{"position":[[398,32]]}}}],["http://localhost:8080/js/jquery.j",{"_index":205,"t":{"12":{"position":[[431,34]]}}}],["http://www.foobar.com",{"_index":2429,"t":{"406":{"position":[[332,22]]}}}],["httpapi",{"_index":2081,"t":{"326":{"position":[[293,7]]}}}],["httperror",{"_index":1488,"t":{"137":{"position":[[23,9]]}}}],["httphandler",{"_index":1611,"t":{"159":{"position":[[27,11]]}}}],["httphandler(h",{"_index":1612,"t":{"159":{"position":[[39,13]]}}}],["httphandlerfunc",{"_index":1614,"t":{"159":{"position":[[111,15]]}}}],["httphandlerfunc(h",{"_index":1615,"t":{"159":{"position":[[127,17]]}}}],["httphandlerfunc(mw",{"_index":1618,"t":{"159":{"position":[[226,18]]}}}],["httpmiddlewar",{"_index":1617,"t":{"159":{"position":[[211,14]]}}}],["httponli",{"_index":3180,"t":{"582":{"position":[[822,9],[1027,9]]},"588":{"position":[[280,8]]}}}],["httpreq",{"_index":1660,"t":{"170":{"position":[[304,8]]}}}],["httpreq.url.str",{"_index":1663,"t":{"170":{"position":[[420,21]]}}}],["https://blog.trailofbits.com/2019/03/25/what",{"_index":1859,"t":{"228":{"position":[[733,44]]}}}],["https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/chart.bundle.min.j",{"_index":2352,"t":{"386":{"position":[[857,66]]}}}],["https://datatracker.ietf.org/doc/html/draft",{"_index":2079,"t":{"326":{"position":[[244,43]]}}}],["https://datatracker.ietf.org/doc/html/rfc8446#sect",{"_index":1858,"t":{"228":{"position":[[677,53]]}}}],["https://example.com",{"_index":783,"t":{"128":{"position":[[290,21]]},"574":{"position":[[198,19]]}}}],["https://example.com/page#chapt",{"_index":3136,"t":{"574":{"position":[[108,32]]}}}],["https://expressjs.com/en/4x/api.html#req.fresh",{"_index":3236,"t":{"600":{"position":[[0,46]]}}}],["https://expressjs.com/en/4x/api.html#req.stal",{"_index":3557,"t":{"700":{"position":[[0,46]]}}}],["https://fonts.googleapis.com/css2?family=roboto:wght@400;900&display=swap",{"_index":2349,"t":{"386":{"position":[[656,73]]}}}],["https://foobar.com",{"_index":2428,"t":{"406":{"position":[[311,20]]}}}],["https://github.com/geertjohan/go.ric",{"_index":2019,"t":{"306":{"position":[[0,37]]}}}],["https://github.com/go",{"_index":3040,"t":{"559":{"position":[[961,21]]}}}],["https://github.com/gobuffalo/packr",{"_index":2015,"t":{"304":{"position":[[0,34]]}}}],["https://github.com/markbates/pkg",{"_index":2011,"t":{"302":{"position":[[0,34]]}}}],["https://github.com/rakyll/statik",{"_index":2025,"t":{"310":{"position":[[0,32]]}}}],["https://github.com/smallnest/go",{"_index":2627,"t":{"485":{"position":[[3,31]]}}}],["https://github.com/unnoted/fileb0x",{"_index":2022,"t":{"308":{"position":[[0,34]]}}}],["https://gofiber.io",{"_index":1763,"t":{"208":{"position":[[369,20]]}}}],["https://gofiber.net",{"_index":1764,"t":{"208":{"position":[[390,21]]}}}],["https://i.imgur.com/\"+c.params(\"id\")+\".gif",{"_index":2407,"t":{"404":{"position":[[1119,44]]}}}],["https://programming.guide/go/format",{"_index":2253,"t":{"374":{"position":[[662,35]]}}}],["httptest.newrequest(\"get",{"_index":538,"t":{"59":{"position":[[588,26]]}}}],["hyphen",{"_index":2882,"t":{"545":{"position":[[1613,6]]}}}],["i.",{"_index":309,"t":{"19":{"position":[[1292,4]]},"228":{"position":[[965,4]]},"406":{"position":[[305,5]]},"541":{"position":[[1292,4]]},"561":{"position":[[1292,4]]}}}],["icon",{"_index":1968,"t":{"284":{"position":[[80,4]]}}}],["id",{"_index":1257,"t":{"130":{"position":[[10502,3],[11548,3]]},"372":{"position":[[656,2]]},"434":{"position":[[444,3]]},"436":{"position":[[259,2],[298,3],[503,2]]},"448":{"position":[[445,4]]},"452":{"position":[[363,2],[1322,2]]},"606":{"position":[[248,4]]},"642":{"position":[[426,3]]},"644":{"position":[[401,3],[453,7]]}}}],["idjohndoe/myembeddedfil",{"_index":2023,"t":{"308":{"position":[[149,24]]}}}],["module>/statik",{"_index":2030,"t":{"310":{"position":[[214,15]]}}}],["monitor",{"_index":2319,"t":{"380":{"position":[[0,7],[85,7],[101,7]]},"386":{"position":[[120,8],[263,10]]}}}],["monitor.new",{"_index":2324,"t":{"384":{"position":[[321,14]]}}}],["monitor.new(monitor.config{titl",{"_index":2327,"t":{"384":{"position":[[488,33]]}}}],["more",{"_index":116,"t":{"6":{"position":[[1512,4]]},"14":{"position":[[4,4]]},"17":{"position":[[1044,4]]},"23":{"position":[[39,4]]},"135":{"position":[[4813,4],[5057,4]]},"264":{"position":[[46,4]]},"344":{"position":[[1130,4]]},"362":{"position":[[1399,4]]},"372":{"position":[[725,4]]},"440":{"position":[[140,4]]},"490":{"position":[[113,4]]},"492":{"position":[[146,4]]},"496":{"position":[[144,4]]},"500":{"position":[[1275,4]]},"547":{"position":[[647,4],[857,4],[952,4],[1022,4]]},"551":{"position":[[437,4]]},"559":{"position":[[939,4]]},"578":{"position":[[386,7]]},"580":{"position":[[1453,7]]},"584":{"position":[[218,4]]},"586":{"position":[[275,4]]},"590":{"position":[[473,7]]},"598":{"position":[[453,7]]},"602":{"position":[[465,7]]},"606":{"position":[[532,7]]},"612":{"position":[[350,7]]},"638":{"position":[[356,7]]},"640":{"position":[[1182,7]]},"652":{"position":[[655,7]]},"664":{"position":[[462,4]]}}}],["mount",{"_index":323,"t":{"21":{"position":[[8,5],[43,6]]},"23":{"position":[[81,8],[435,8],[497,5],[536,8]]},"135":{"position":[[3436,7]]},"538":{"position":[[49,8],[71,5],[108,7],[201,9],[649,5],[728,5],[795,5],[848,5]]},"549":{"position":[[509,6]]}}}],["mount(prefix",{"_index":324,"t":{"21":{"position":[[74,12]]}}}],["mountpath",{"_index":332,"t":{"23":{"position":[[4,9],[116,11],[467,10]]}}}],["ms",{"_index":2532,"t":{"470":{"position":[[360,5],[1187,5]]},"475":{"position":[[448,3],[524,3]]},"477":{"position":[[74,3],[155,3]]},"479":{"position":[[74,3],[154,3]]},"481":{"position":[[74,3],[153,3]]},"483":{"position":[[76,3],[156,3]]},"485":{"position":[[178,3],[185,3],[193,3],[201,2],[540,2]]},"492":{"position":[[659,2]]}}}],["msg",{"_index":1533,"t":{"147":{"position":[[226,4]]}}}],["mstimeout",{"_index":531,"t":{"59":{"position":[[296,9]]}}}],["multi",{"_index":1447,"t":{"135":{"position":[[5492,5],[5520,5]]},"406":{"position":[[870,5],[901,5]]}}}],["multipart",{"_index":682,"t":{"98":{"position":[[20,9],[185,9],[632,9],[833,9],[1201,9],[1248,9],[1478,9]]},"135":{"position":[[1559,9],[1650,9]]},"634":{"position":[[10,9],[294,9]]},"682":{"position":[[27,9],[191,9]]},"684":{"position":[[27,9],[271,9]]}}}],["multipart.filehead",{"_index":3229,"t":{"596":{"position":[[138,23]]},"634":{"position":[[549,23]]},"682":{"position":[[87,22],[354,23]]},"684":{"position":[[126,22],[434,23]]}}}],["multipart.form",{"_index":3315,"t":{"634":{"position":[[207,17],[364,15]]},"682":{"position":[[261,15]]},"684":{"position":[[341,15]]}}}],["multipart/form",{"_index":683,"t":{"98":{"position":[[81,14]]},"130":{"position":[[807,15]]},"580":{"position":[[306,14]]}}}],["multipartform",{"_index":681,"t":{"98":{"position":[[0,13],[165,13],[580,14]]},"596":{"position":[[0,13]]},"634":{"position":[[64,16],[191,15]]}}}],["multipartform(arg",{"_index":686,"t":{"98":{"position":[[356,18]]}}}],["multipartform(nil",{"_index":691,"t":{"98":{"position":[[752,19],[1133,19],[1840,18]]}}}],["multipl",{"_index":155,"t":{"10":{"position":[[208,8]]},"17":{"position":[[500,8]]},"19":{"position":[[1625,9],[1742,8]]},"72":{"position":[[38,8]]},"78":{"position":[[68,8]]},"98":{"position":[[889,8]]},"135":{"position":[[4757,8]]},"326":{"position":[[200,8]]},"394":{"position":[[369,8]]},"400":{"position":[[64,8]]},"402":{"position":[[41,8]]},"541":{"position":[[1625,9],[1742,8]]},"547":{"position":[[1250,8],[1502,8]]},"556":{"position":[[66,8]]},"561":{"position":[[1625,9],[1742,8]]},"582":{"position":[[259,8]]},"710":{"position":[[166,8]]}}}],["mustach",{"_index":2704,"t":{"496":{"position":[[117,8]]},"556":{"position":[[130,8]]}}}],["mycustomstorag",{"_index":2184,"t":{"358":{"position":[[636,18]]}}}],["myembeddedfiles.http",{"_index":2024,"t":{"308":{"position":[[268,21]]}}}],["myfil",{"_index":2948,"t":{"547":{"position":[[628,6]]}}}],["mymiddlewar",{"_index":3483,"t":{"680":{"position":[[405,14]]}}}],["myservic",{"_index":2326,"t":{"384":{"position":[[443,10],[522,10]]}}}],["myvalid",{"_index":3057,"t":{"559":{"position":[[1588,11]]}}}],["myvalidator.validate(us",{"_index":3069,"t":{"559":{"position":[[2237,27]]}}}],["myvalidator.validator.registervalidation(\"teen",{"_index":3060,"t":{"559":{"position":[[1908,50]]}}}],["n",{"_index":2817,"t":{"526":{"position":[[615,5]]},"712":{"position":[[74,2]]},"714":{"position":[[99,2]]},"716":{"position":[[76,2]]}}}],["name",{"_index":200,"t":{"12":{"position":[[251,5]]},"17":{"position":[[306,5],[1857,4]]},"27":{"position":[[142,4],[301,6],[368,6]]},"37":{"position":[[24,4],[571,7],[638,7],[707,7],[787,7],[850,7],[916,7],[1003,7],[1095,7]]},"39":{"position":[[30,5],[356,7]]},"41":{"position":[[443,7]]},"98":{"position":[[1087,6],[1325,4],[1350,4],[1370,4],[1375,4]]},"106":{"position":[[93,5]]},"133":{"position":[[30,5]]},"135":{"position":[[330,4],[849,4],[920,5],[1299,5],[2532,4]]},"147":{"position":[[1037,7]]},"159":{"position":[[0,4]]},"220":{"position":[[570,4]]},"240":{"position":[[105,6]]},"244":{"position":[[940,5]]},"250":{"position":[[106,5]]},"336":{"position":[[402,4]]},"450":{"position":[[466,4],[864,6]]},"452":{"position":[[1354,4]]},"492":{"position":[[444,6]]},"526":{"position":[[57,7],[150,6],[889,5],[919,5]]},"530":{"position":[[62,7],[160,6]]},"545":{"position":[[62,5],[75,5],[254,4],[611,5],[3028,6],[3057,7]]},"554":{"position":[[591,4]]},"559":{"position":[[441,4],[1382,4],[2163,5]]},"566":{"position":[[245,9]]},"580":{"position":[[461,5],[526,4]]},"582":{"position":[[221,5],[279,6],[744,5],[938,5]]},"588":{"position":[[79,4]]},"596":{"position":[[40,5]]},"598":{"position":[[36,5],[251,7]]},"610":{"position":[[18,5]]},"622":{"position":[[220,4],[331,5],[420,9],[476,7],[550,9]]},"624":{"position":[[151,4],[203,5],[338,4],[445,5]]},"660":{"position":[[311,5],[376,4]]},"666":{"position":[[510,7],[687,7]]},"674":{"position":[[321,5],[386,4],[791,6]]},"680":{"position":[[258,6]]},"704":{"position":[[51,4]]},"720":{"position":[[255,4],[387,5]]}}}],["name(\"addus",{"_index":2819,"t":{"526":{"position":[[719,18]]}}}],["name(\"destroyus",{"_index":2821,"t":{"526":{"position":[[829,22]]}}}],["name(\"hom",{"_index":3253,"t":{"610":{"position":[[257,15]]}}}],["name(\"index",{"_index":464,"t":{"41":{"position":[[311,16]]},"526":{"position":[[420,16]]}}}],["name(\"us",{"_index":3448,"t":{"666":{"position":[[890,15]]}}}],["name(\"user.show",{"_index":3256,"t":{"610":{"position":[[357,20]]}}}],["name(nam",{"_index":434,"t":{"37":{"position":[[80,9]]}}}],["name1",{"_index":701,"t":{"98":{"position":[[1118,7],[1723,7]]}}}],["name2",{"_index":714,"t":{"98":{"position":[[1787,7]]}}}],["namegramehello",{"_index":3226,"t":{"594":{"position":[[409,9]]}}}],["packag",{"_index":125,"t":{"8":{"position":[[81,7]]},"19":{"position":[[1206,8]]},"162":{"position":[[0,7]]},"164":{"position":[[0,7]]},"166":{"position":[[0,7]]},"168":{"position":[[0,7]]},"170":{"position":[[0,7]]},"176":{"position":[[22,7]]},"186":{"position":[[22,7]]},"196":{"position":[[22,7]]},"208":{"position":[[22,7]]},"214":{"position":[[695,7]]},"218":{"position":[[22,7]]},"226":{"position":[[41,8]]},"232":{"position":[[22,7]]},"244":{"position":[[22,7]]},"256":{"position":[[22,7]]},"268":{"position":[[22,7]]},"274":{"position":[[109,7]]},"278":{"position":[[22,7]]},"288":{"position":[[22,7]]},"298":{"position":[[22,7]]},"300":{"position":[[90,7]]},"302":{"position":[[35,7]]},"304":{"position":[[35,7]]},"306":{"position":[[38,7]]},"308":{"position":[[35,7]]},"310":{"position":[[33,7]]},"320":{"position":[[0,7]]},"330":{"position":[[22,7]]},"344":{"position":[[0,7]]},"346":{"position":[[139,7]]},"348":{"position":[[0,7]]},"354":{"position":[[252,7]]},"358":{"position":[[22,7]]},"366":{"position":[[41,8]]},"372":{"position":[[22,7]]},"384":{"position":[[22,7]]},"390":{"position":[[142,7]]},"394":{"position":[[22,7]]},"404":{"position":[[22,7]]},"414":{"position":[[22,7]]},"424":{"position":[[0,7]]},"434":{"position":[[22,7]]},"444":{"position":[[0,7]]},"446":{"position":[[68,7]]},"450":{"position":[[22,7]]},"458":{"position":[[41,8]]},"464":{"position":[[22,7]]},"470":{"position":[[22,7]]},"500":{"position":[[57,7]]},"503":{"position":[[472,7]]},"510":{"position":[[384,7]]},"526":{"position":[[251,7]]},"538":{"position":[[288,7]]},"541":{"position":[[1206,8]]},"556":{"position":[[31,7],[173,7]]},"559":{"position":[[42,7],[303,7]]},"561":{"position":[[1206,8]]},"622":{"position":[[65,8]]},"720":{"position":[[72,8]]}}}],["packr.new(\"asset",{"_index":2017,"t":{"304":{"position":[[265,17]]}}}],["page",{"_index":139,"t":{"8":{"position":[[355,5]]},"384":{"position":[[462,5],[541,8]]},"386":{"position":[[77,4]]},"492":{"position":[[313,4]]},"494":{"position":[[320,4]]},"507":{"position":[[415,4],[494,5],[917,4]]},"559":{"position":[[123,4]]},"610":{"position":[[250,6]]},"668":{"position":[[375,6]]}}}],["pair",{"_index":1566,"t":{"147":{"position":[[927,5]]}}}],["panic",{"_index":2434,"t":{"410":{"position":[[48,6]]},"414":{"position":[[296,5]]},"503":{"position":[[335,6],[372,5],[689,5]]}}}],["panic(\"i'm",{"_index":2439,"t":{"414":{"position":[[375,10]]}}}],["panic(\"thi",{"_index":2742,"t":{"503":{"position":[[677,11]]}}}],["panic(err",{"_index":571,"t":{"68":{"position":[[183,10]]},"310":{"position":[[318,10]]},"450":{"position":[[440,10],[661,10],[805,10]]}}}],["param",{"_index":428,"t":{"35":{"position":[[401,9],[470,9],[538,9]]},"37":{"position":[[601,9],[670,9],[745,9],[812,9],[878,9],[947,9],[1040,9],[1133,9]]},"39":{"position":[[386,9]]},"41":{"position":[[473,9]]},"294":{"position":[[90,7]]},"545":{"position":[[228,6],[2930,7],[2953,7],[3020,7],[3108,7],[3220,7]]},"566":{"position":[[0,6],[50,6],[71,7]]},"610":{"position":[[148,6]]},"640":{"position":[[118,5],[187,5]]},"642":{"position":[[255,5]]},"644":{"position":[[101,9],[385,5]]},"656":{"position":[[417,5]]},"658":{"position":[[417,5]]},"666":{"position":[[298,7],[364,6]]}}}],["param:://:: Get request with value: hello world }) Optional parameter // GET http://localhost:3000/john app.Get(\"/:name?\", func(c *fiber.Ctx) error { if c.Params(\"name\") != \"\" { return c.SendString(\"Hello \" + c.Params(\"name\")) // => Hello john } return c.SendString(\"Where is john?\") }) Wildcards // GET http://localhost:3000/api/user/john app.Get(\"/api/*\", func(c *fiber.Ctx) error { return c.SendString(\"API path: \" + c.Params(\"*\")) // => API path: user/john })","s":"Basic routing","u":"/next/","h":"#basic-routing","p":1},{"i":12,"t":"To serve static files such as images, CSS, and JavaScript files, replace your function handler with a file or directory string. Function signature: app.Static(prefix, root string, config ...Static) Use the following code to serve files in a directory named ./public: app := fiber.New() app.Static(\"/\", \"./public\") app.Listen(\":3000\") Now, you can load the files that are in the ./public directory: http://localhost:8080/hello.html http://localhost:8080/js/jquery.js http://localhost:8080/css/style.css","s":"Static files","u":"/next/","h":"#static-files","p":1},{"i":14,"t":"For more information on how to build APIs in Go with Fiber, please check out this excellent article on building an express-style API in Go with Fiber.","s":"Note","u":"/next/","h":"#note","p":1},{"i":17,"t":"Use the Static method to serve static files such as images, CSS, and JavaScript. info By default, Static will serve index.html files in response to a request on a directory. Signature func (app *App) Static(prefix, root string, config ...Static) Router Use the following code to serve files in a directory named ./public app.Static(\"/\", \"./public\") // => http://localhost:3000/hello.html // => http://localhost:3000/js/jquery.js // => http://localhost:3000/css/style.css Examples // Serve files from multiple directories app.Static(\"/\", \"./public\") // Serve files from \"./files\" directory: app.Static(\"/\", \"./files\") You can use any virtual path prefix (where the path does not actually exist in the file system) for files that are served by the Static method, specify a prefix path for the static directory, as shown below: Examples app.Static(\"/static\", \"./public\") // => http://localhost:3000/static/hello.html // => http://localhost:3000/static/js/jquery.js // => http://localhost:3000/static/css/style.css If you want to have a little bit more control regarding the settings for serving static files. You could use the fiber.Static struct to enable specific settings. fiber.Static{} // Static defines configuration options when defining static assets. type Static struct { // When set to true, the server tries minimizing CPU usage by caching compressed files. // This works differently than the github.com/gofiber/compression middleware. // Optional. Default value false Compress bool `json:\"compress\"` // When set to true, enables byte range requests. // Optional. Default value false ByteRange bool `json:\"byte_range\"` // When set to true, enables directory browsing. // Optional. Default value false. Browse bool `json:\"browse\"` // When set to true, enables direct download. // Optional. Default value false. Download bool `json:\"download\"` // The name of the index file for serving a directory. // Optional. Default value \"index.html\". Index string `json:\"index\"` // Expiration duration for inactive file handlers. // Use a negative time.Duration to disable it. // // Optional. Default value 10 * time.Second. CacheDuration time.Duration `json:\"cache_duration\"` // The value for the Cache-Control HTTP-header // that is set on the file response. MaxAge is defined in seconds. // // Optional. Default value 0. MaxAge int `json:\"max_age\"` // ModifyResponse defines a function that allows you to alter the response. // // Optional. Default: nil ModifyResponse Handler // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *Ctx) bool } Example // Custom config app.Static(\"/\", \"./public\", fiber.Static{ Compress: true, ByteRange: true, Browse: true, Index: \"john.html\", CacheDuration: 10 * time.Second, MaxAge: 3600, })","s":"Static","u":"/next/api/app","h":"#static","p":15},{"i":19,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Route Handlers","u":"/next/api/app","h":"#route-handlers","p":15},{"i":21,"t":"You can Mount Fiber instance by creating a *Mount Signature func (a *App) Mount(prefix string, app *App) Router Examples func main() { app := fiber.New() micro := fiber.New() app.Mount(\"/john\", micro) // GET /john/doe -> 200 OK micro.Get(\"/doe\", func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusOK) }) log.Fatal(app.Listen(\":3000\")) }","s":"Mount","u":"/next/api/app","h":"#mount","p":15},{"i":23,"t":"The MountPath property contains one or more path patterns on which a sub-app was mounted. Signature func (app *App) MountPath() string Examples func main() { app := fiber.New() one := fiber.New() two := fiber.New() three := fiber.New() two.Mount(\"/three\", three) one.Mount(\"/two\", two) app.Mount(\"/one\", one) one.MountPath() // \"/one\" two.MountPath() // \"/one/two\" three.MountPath() // \"/one/two/three\" app.MountPath() // \"\" } caution Mounting order is important for MountPath. If you want to get mount paths properly, you should start mounting from the deepest app.","s":"MountPath","u":"/next/api/app","h":"#mountpath","p":15},{"i":25,"t":"You can group routes by creating a *Group struct. Signature func (app *App) Group(prefix string, handlers ...Handler) Router Examples func main() { app := fiber.New() api := app.Group(\"/api\", handler) // /api v1 := api.Group(\"/v1\", handler) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", handler) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) }","s":"Group","u":"/next/api/app","h":"#group","p":15},{"i":27,"t":"You can define routes with a common prefix inside the common function. Signature func (app *App) Route(prefix string, fn func(router Router), name ...string) Router Examples func main() { app := fiber.New() app.Route(\"/test\", func(api fiber.Router) { api.Get(\"/foo\", handler).Name(\"foo\") // /test/foo (name: test.foo) api.Get(\"/bar\", handler).Name(\"bar\") // /test/bar (name: test.bar) }, \"test.\") log.Fatal(app.Listen(\":3000\")) }","s":"Route","u":"/next/api/app","h":"#route","p":15},{"i":29,"t":"Server returns the underlying fasthttp server Signature func (app *App) Server() *fasthttp.Server Examples func main() { app := fiber.New() app.Server().MaxConnsPerIP = 1 // ... }","s":"Server","u":"/next/api/app","h":"#server","p":15},{"i":31,"t":"Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waits indefinitely for all connections to return to idle before shutting down. ShutdownWithTimeout will forcefully close any active connections after the timeout expires. ShutdownWithContext shuts down the server including by force if the context's deadline is exceeded. func (app *App) Shutdown() error func (app *App) ShutdownWithTimeout(timeout time.Duration) error func (app *App) ShutdownWithContext(ctx context.Context) error","s":"Server Shutdown","u":"/next/api/app","h":"#server-shutdown","p":15},{"i":33,"t":"This method returns the amount of registered handlers. Signature func (app *App) HandlersCount() uint32","s":"HandlersCount","u":"/next/api/app","h":"#handlerscount","p":15},{"i":35,"t":"This method returns the original router stack Signature func (app *App) Stack() [][]*Route Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/john/:age\", handler) app.Post(\"/register\", handler) data, _ := json.MarshalIndent(app.Stack(), \"\", \" \") fmt.Println(string(data)) app.Listen(\":3000\") } Result [ [ { \"method\": \"GET\", \"path\": \"/john/:age\", \"params\": [ \"age\" ] } ], [ { \"method\": \"HEAD\", \"path\": \"/john/:age\", \"params\": [ \"age\" ] } ], [ { \"method\": \"POST\", \"path\": \"/register\", \"params\": null } ] ]","s":"Stack","u":"/next/api/app","h":"#stack","p":15},{"i":37,"t":"This method assigns the name of latest created route. Signature func (app *App) Name(name string) Router Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/\", handler) app.Name(\"index\") app.Get(\"/doe\", handler).Name(\"home\") app.Trace(\"/tracer\", handler).Name(\"tracert\") app.Delete(\"/delete\", handler).Name(\"delete\") a := app.Group(\"/a\") a.Name(\"fd.\") a.Get(\"/test\", handler).Name(\"test\") data, _ := json.MarshalIndent(app.Stack(), \"\", \" \") fmt.Print(string(data)) app.Listen(\":3000\") } Result [ [ { \"method\": \"GET\", \"name\": \"index\", \"path\": \"/\", \"params\": null }, { \"method\": \"GET\", \"name\": \"home\", \"path\": \"/doe\", \"params\": null }, { \"method\": \"GET\", \"name\": \"fd.test\", \"path\": \"/a/test\", \"params\": null } ], [ { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/\", \"params\": null }, { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/doe\", \"params\": null }, { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/a/test\", \"params\": null } ], null, null, [ { \"method\": \"DELETE\", \"name\": \"delete\", \"path\": \"/delete\", \"params\": null } ], null, null, [ { \"method\": \"TRACE\", \"name\": \"tracert\", \"path\": \"/tracer\", \"params\": null } ], null ]","s":"Name","u":"/next/api/app","h":"#name","p":15},{"i":39,"t":"This method gets the route by name. Signature func (app *App) GetRoute(name string) Route Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/\", handler).Name(\"index\") data, _ := json.MarshalIndent(app.GetRoute(\"index\"), \"\", \" \") fmt.Print(string(data)) app.Listen(\":3000\") } Result { \"method\": \"GET\", \"name\": \"index\", \"path\": \"/\", \"params\": null }","s":"GetRoute","u":"/next/api/app","h":"#getroute","p":15},{"i":41,"t":"This method gets all routes. Signature func (app *App) GetRoutes(filterUseOption ...bool) []Route When filterUseOption equal to true, it will filter the routes registered by the middleware. Examples func main() { app := fiber.New() app.Post(\"/\", func (c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }).Name(\"index\") data, _ := json.MarshalIndent(app.GetRoutes(true), \"\", \" \") fmt.Print(string(data)) } Result [ { \"method\": \"POST\", \"name\": \"index\", \"path\": \"/\", \"params\": null } ]","s":"GetRoutes","u":"/next/api/app","h":"#getroutes","p":15},{"i":43,"t":"Config returns the app config as value ( read-only ). Signature func (app *App) Config() Config","s":"Config","u":"/next/api/app","h":"#config","p":15},{"i":45,"t":"Handler returns the server handler that can be used to serve custom *fasthttp.RequestCtx requests. Signature func (app *App) Handler() fasthttp.RequestHandler","s":"Handler","u":"/next/api/app","h":"#handler","p":15},{"i":47,"t":"Listen serves HTTP requests from the given address. Signature func (app *App) Listen(addr string) error Examples // Listen on port :8080 app.Listen(\":8080\") // Custom host app.Listen(\"127.0.0.1:8080\")","s":"Listen","u":"/next/api/app","h":"#listen","p":15},{"i":49,"t":"ListenTLS serves HTTPs requests from the given address using certFile and keyFile paths to as TLS certificate and key file. Signature func (app *App) ListenTLS(addr, certFile, keyFile string) error Examples app.ListenTLS(\":443\", \"./cert.pem\", \"./cert.key\"); Using ListenTLS defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{ cert, }, }","s":"ListenTLS","u":"/next/api/app","h":"#listentls","p":15},{"i":51,"t":"Signature func (app *App) ListenTLS(addr string, cert tls.Certificate) error Examples app.ListenTLSWithCertificate(\":443\", cert); Using ListenTLSWithCertificate defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{ cert, }, }","s":"ListenTLSWithCertificate","u":"/next/api/app","h":"#listentlswithcertificate","p":15},{"i":53,"t":"ListenMutualTLS serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file Signature func (app *App) ListenMutualTLS(addr, certFile, keyFile, clientCertFile string) error Examples app.ListenMutualTLS(\":443\", \"./cert.pem\", \"./cert.key\", \"./ca-chain-cert.pem\"); Using ListenMutualTLS defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, ClientAuth: tls.RequireAndVerifyClientCert, ClientCAs: clientCertPool, Certificates: []tls.Certificate{ cert, }, }","s":"ListenMutualTLS","u":"/next/api/app","h":"#listenmutualtls","p":15},{"i":55,"t":"ListenMutualTLSWithCertificate serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file Signature func (app *App) ListenMutualTLSWithCertificate(addr string, cert tls.Certificate, clientCertPool *x509.CertPool) error Examples app.ListenMutualTLSWithCertificate(\":443\", cert, clientCertPool); Using ListenMutualTLSWithCertificate defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, ClientAuth: tls.RequireAndVerifyClientCert, ClientCAs: clientCertPool, Certificates: []tls.Certificate{ cert, }, }","s":"ListenMutualTLSWithCertificate","u":"/next/api/app","h":"#listenmutualtlswithcertificate","p":15},{"i":57,"t":"You can pass your own net.Listener using the Listener method. This method can be used to enable TLS/HTTPS with a custom tls.Config. Signature func (app *App) Listener(ln net.Listener) error Examples ln, _ := net.Listen(\"tcp\", \":3000\") cer, _:= tls.LoadX509KeyPair(\"server.crt\", \"server.key\") ln = tls.NewListener(ln, &tls.Config{Certificates: []tls.Certificate{cer}}) app.Listener(ln)","s":"Listener","u":"/next/api/app","h":"#listener","p":15},{"i":59,"t":"Testing your application is done with the Test method. Use this method for creating _test.go files or when you need to debug your routing logic. The default timeout is 1s if you want to disable a timeout altogether, pass -1 as a second argument. Signature func (app *App) Test(req *http.Request, msTimeout ...int) (*http.Response, error) Examples // Create route with GET method for test: app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(c.BaseURL()) // => http://google.com fmt.Println(c.Get(\"X-Custom-Header\")) // => hi return c.SendString(\"hello, World!\") }) // http.Request req := httptest.NewRequest(\"GET\", \"http://google.com\", nil) req.Header.Set(\"X-Custom-Header\", \"hi\") // http.Response resp, _ := app.Test(req) // Do something with results: if resp.StatusCode == fiber.StatusOK { body, _ := ioutil.ReadAll(resp.Body) fmt.Println(string(body)) // => Hello, World! }","s":"Test","u":"/next/api/app","h":"#test","p":15},{"i":61,"t":"Hooks is a method to return hooks property. Signature func (app *App) Hooks() *Hooks","s":"Hooks","u":"/next/api/app","h":"#hooks","p":15},{"i":64,"t":"Start a http request with http method and url. Signatures // Client http methods func (c *Client) Get(url string) *Agent func (c *Client) Head(url string) *Agent func (c *Client) Post(url string) *Agent func (c *Client) Put(url string) *Agent func (c *Client) Patch(url string) *Agent func (c *Client) Delete(url string) *Agent","s":"Start request","u":"/next/api/client","h":"#start-request","p":62},{"i":66,"t":"Agent is built on top of FastHTTP's HostClient which has lots of convenient helper methods such as dedicated methods for request methods.","s":"✨ Agent","u":"/next/api/client","h":"#-agent","p":62},{"i":68,"t":"Parse initializes a HostClient. Parse a := AcquireAgent() req := a.Request() req.Header.SetMethod(MethodGet) req.SetRequestURI(\"http://example.com\") if err := a.Parse(); err != nil { panic(err) } code, body, errs := a.Bytes() // ...","s":"Parse","u":"/next/api/client","h":"#parse","p":62},{"i":70,"t":"Set sets the given key: value header. Signature func (a *Agent) Set(k, v string) *Agent func (a *Agent) SetBytesK(k []byte, v string) *Agent func (a *Agent) SetBytesV(k string, v []byte) *Agent func (a *Agent) SetBytesKV(k []byte, v []byte) *Agent Example agent.Set(\"k1\", \"v1\"). SetBytesK([]byte(\"k1\"), \"v1\"). SetBytesV(\"k1\", []byte(\"v1\")). SetBytesKV([]byte(\"k2\"), []byte(\"v2\")) // ...","s":"Set","u":"/next/api/client","h":"#set","p":62},{"i":72,"t":"Add adds the given key: value header. Multiple headers with the same key may be added with this function. Signature func (a *Agent) Add(k, v string) *Agent func (a *Agent) AddBytesK(k []byte, v string) *Agent func (a *Agent) AddBytesV(k string, v []byte) *Agent func (a *Agent) AddBytesKV(k []byte, v []byte) *Agent Example agent.Add(\"k1\", \"v1\"). AddBytesK([]byte(\"k1\"), \"v1\"). AddBytesV(\"k1\", []byte(\"v1\")). AddBytesKV([]byte(\"k2\"), []byte(\"v2\")) // Headers: // K1: v1 // K1: v1 // K1: v1 // K2: v2","s":"Add","u":"/next/api/client","h":"#add","p":62},{"i":74,"t":"ConnectionClose adds the Connection: close header. Signature func (a *Agent) ConnectionClose() *Agent Example agent.ConnectionClose() // ...","s":"ConnectionClose","u":"/next/api/client","h":"#connectionclose","p":62},{"i":76,"t":"UserAgent sets User-Agent header value. Signature func (a *Agent) UserAgent(userAgent string) *Agent func (a *Agent) UserAgentBytes(userAgent []byte) *Agent Example agent.UserAgent(\"fiber\") // ...","s":"UserAgent","u":"/next/api/client","h":"#useragent","p":62},{"i":78,"t":"Cookie sets a cookie in key: value form. Cookies can be used to set multiple cookies. Signature func (a *Agent) Cookie(key, value string) *Agent func (a *Agent) CookieBytesK(key []byte, value string) *Agent func (a *Agent) CookieBytesKV(key, value []byte) *Agent func (a *Agent) Cookies(kv ...string) *Agent func (a *Agent) CookiesBytesKV(kv ...[]byte) *Agent Example agent.Cookie(\"k\", \"v\") agent.Cookies(\"k1\", \"v1\", \"k2\", \"v2\") // ...","s":"Cookie","u":"/next/api/client","h":"#cookie","p":62},{"i":80,"t":"Referer sets the Referer header value. Signature func (a *Agent) Referer(referer string) *Agent func (a *Agent) RefererBytes(referer []byte) *Agent Example agent.Referer(\"https://docs.gofiber.io\") // ...","s":"Referer","u":"/next/api/client","h":"#referer","p":62},{"i":82,"t":"ContentType sets Content-Type header value. Signature func (a *Agent) ContentType(contentType string) *Agent func (a *Agent) ContentTypeBytes(contentType []byte) *Agent Example agent.ContentType(\"custom-type\") // ...","s":"ContentType","u":"/next/api/client","h":"#contenttype","p":62},{"i":84,"t":"Host sets the Host header. Signature func (a *Agent) Host(host string) *Agent func (a *Agent) HostBytes(host []byte) *Agent Example agent.Host(\"example.com\") // ...","s":"Host","u":"/next/api/client","h":"#host","p":62},{"i":86,"t":"QueryString sets the URI query string. Signature func (a *Agent) QueryString(queryString string) *Agent func (a *Agent) QueryStringBytes(queryString []byte) *Agent Example agent.QueryString(\"foo=bar\") // ...","s":"QueryString","u":"/next/api/client","h":"#querystring","p":62},{"i":88,"t":"BasicAuth sets the URI username and password using HTTP Basic Auth. Signature func (a *Agent) BasicAuth(username, password string) *Agent func (a *Agent) BasicAuthBytes(username, password []byte) *Agent Example agent.BasicAuth(\"foo\", \"bar\") // ...","s":"BasicAuth","u":"/next/api/client","h":"#basicauth","p":62},{"i":90,"t":"There are several ways to set request body. Signature func (a *Agent) BodyString(bodyString string) *Agent func (a *Agent) Body(body []byte) *Agent // BodyStream sets request body stream and, optionally body size. // // If bodySize is >= 0, then the bodyStream must provide exactly bodySize bytes // before returning io.EOF. // // If bodySize < 0, then bodyStream is read until io.EOF. // // bodyStream.Close() is called after finishing reading all body data // if it implements io.Closer. // // Note that GET and HEAD requests cannot have body. func (a *Agent) BodyStream(bodyStream io.Reader, bodySize int) *Agent Example agent.BodyString(\"foo=bar\") agent.Body([]byte(\"bar=baz\")) agent.BodyStream(strings.NewReader(\"body=stream\"), -1) // ...","s":"Body","u":"/next/api/client","h":"#body","p":62},{"i":92,"t":"JSON sends a JSON request by setting the Content-Type header to application/json. Signature func (a *Agent) JSON(v interface{}) *Agent Example agent.JSON(fiber.Map{\"success\": true}) // ...","s":"JSON","u":"/next/api/client","h":"#json","p":62},{"i":94,"t":"XML sends an XML request by setting the Content-Type header to application/xml. Signature func (a *Agent) XML(v interface{}) *Agent Example agent.XML(fiber.Map{\"success\": true}) // ...","s":"XML","u":"/next/api/client","h":"#xml","p":62},{"i":96,"t":"Form sends a form request by setting the Content-Type header to application/x-www-form-urlencoded. Signature // Form sends form request with body if args is non-nil. // // It is recommended obtaining args via AcquireArgs and release it // manually in performance-critical code. func (a *Agent) Form(args *Args) *Agent Example args := AcquireArgs() args.Set(\"foo\", \"bar\") agent.Form(args) // ... ReleaseArgs(args)","s":"Form","u":"/next/api/client","h":"#form","p":62},{"i":98,"t":"MultipartForm sends multipart form request by setting the Content-Type header to multipart/form-data. These requests can include key-value's and files. Signature // MultipartForm sends multipart form request with k-v and files. // // It is recommended to obtain args via AcquireArgs and release it // manually in performance-critical code. func (a *Agent) MultipartForm(args *Args) *Agent Example args := AcquireArgs() args.Set(\"foo\", \"bar\") agent.MultipartForm(args) // ... ReleaseArgs(args) Fiber provides several methods for sending files. Note that they must be called before MultipartForm. Boundary​ Boundary sets boundary for multipart form request. Signature func (a *Agent) Boundary(boundary string) *Agent Example agent.Boundary(\"myBoundary\") .MultipartForm(nil) // ... SendFile(s)​ SendFile read a file and appends it to a multipart form request. Sendfiles can be used to append multiple files. Signature func (a *Agent) SendFile(filename string, fieldname ...string) *Agent func (a *Agent) SendFiles(filenamesAndFieldnames ...string) *Agent Example agent.SendFile(\"f\", \"field name\") .SendFiles(\"f1\", \"field name1\", \"f2\"). .MultipartForm(nil) // ... FileData​ FileData appends file data for multipart form request. // FormFile represents multipart form file type FormFile struct { // Fieldname is form file's field name Fieldname string // Name is form file's name Name string // Content is form file's content Content []byte } Signature // FileData appends files for multipart form request. // // It is recommended obtaining formFile via AcquireFormFile and release it // manually in performance-critical code. func (a *Agent) FileData(formFiles ...*FormFile) *Agent Example ff1 := &FormFile{\"filename1\", \"field name1\", []byte(\"content\")} ff2 := &FormFile{\"filename2\", \"field name2\", []byte(\"content\")} agent.FileData(ff1, ff2). MultipartForm(nil) // ...","s":"MultipartForm","u":"/next/api/client","h":"#multipartform","p":62},{"i":100,"t":"Debug mode enables logging request and response detail to io.writer(default is os.Stdout). Signature func (a *Agent) Debug(w ...io.Writer) *Agent Example agent.Debug() // ...","s":"Debug","u":"/next/api/client","h":"#debug","p":62},{"i":102,"t":"Timeout sets request timeout duration. Signature func (a *Agent) Timeout(timeout time.Duration) *Agent Example agent.Timeout(time.Second) // ...","s":"Timeout","u":"/next/api/client","h":"#timeout","p":62},{"i":104,"t":"Reuse enables the Agent instance to be used again after one request. If agent is reusable, then it should be released manually when it is no longer used. Signature func (a *Agent) Reuse() *Agent Example agent.Reuse() // ...","s":"Reuse","u":"/next/api/client","h":"#reuse","p":62},{"i":106,"t":"InsecureSkipVerify controls whether the Agent verifies the server certificate chain and host name. Signature func (a *Agent) InsecureSkipVerify() *Agent Example agent.InsecureSkipVerify() // ...","s":"InsecureSkipVerify","u":"/next/api/client","h":"#insecureskipverify","p":62},{"i":108,"t":"TLSConfig sets tls config. Signature func (a *Agent) TLSConfig(config *tls.Config) *Agent Example // Create tls certificate cer, _ := tls.LoadX509KeyPair(\"pem\", \"key\") config := &tls.Config{ Certificates: []tls.Certificate{cer}, } agent.TLSConfig(config) // ...","s":"TLSConfig","u":"/next/api/client","h":"#tlsconfig","p":62},{"i":110,"t":"MaxRedirectsCount sets max redirect count for GET and HEAD. Signature func (a *Agent) MaxRedirectsCount(count int) *Agent Example agent.MaxRedirectsCount(7) // ...","s":"MaxRedirectsCount","u":"/next/api/client","h":"#maxredirectscount","p":62},{"i":112,"t":"JSONEncoder sets custom json encoder. Signature func (a *Agent) JSONEncoder(jsonEncoder utils.JSONMarshal) *Agent Example agent.JSONEncoder(json.Marshal) // ...","s":"JSONEncoder","u":"/next/api/client","h":"#jsonencoder","p":62},{"i":114,"t":"JSONDecoder sets custom json decoder. Signature func (a *Agent) JSONDecoder(jsonDecoder utils.JSONUnmarshal) *Agent Example agent.JSONDecoder(json.Unmarshal) // ...","s":"JSONDecoder","u":"/next/api/client","h":"#jsondecoder","p":62},{"i":116,"t":"Request returns Agent request instance. Signature func (a *Agent) Request() *Request Example req := agent.Request() // ...","s":"Request","u":"/next/api/client","h":"#request","p":62},{"i":118,"t":"SetResponse sets custom response for the Agent instance. It is recommended obtaining custom response via AcquireResponse and release it manually in performance-critical code. Signature func (a *Agent) SetResponse(customResp *Response) *Agent Example resp := AcquireResponse() agent.SetResponse(resp) // ... ReleaseResponse(resp)","s":"SetResponse","u":"/next/api/client","h":"#setresponse","p":62},{"i":120,"t":"Dest sets custom dest. The contents of dest will be replaced by the response body, if the dest is too small a new slice will be allocated. Signature func (a *Agent) Dest(dest []byte) *Agent { Example agent.Dest(nil) // ...","s":"Dest","u":"/next/api/client","h":"#dest","p":62},{"i":122,"t":"Bytes returns the status code, bytes body and errors of url. Signature func (a *Agent) Bytes() (code int, body []byte, errs []error) Example code, body, errs := agent.Bytes() // ...","s":"Bytes","u":"/next/api/client","h":"#bytes","p":62},{"i":124,"t":"String returns the status code, string body and errors of url. Signature func (a *Agent) String() (int, string, []error) Example code, body, errs := agent.String() // ...","s":"String","u":"/next/api/client","h":"#string","p":62},{"i":126,"t":"Struct returns the status code, bytes body and errors of url. And bytes body will be unmarshalled to given v. Signature func (a *Agent) Struct(v interface{}) (code int, body []byte, errs []error) Example var d data code, body, errs := agent.Struct(&d) // ...","s":"Struct","u":"/next/api/client","h":"#struct","p":62},{"i":128,"t":"RetryIf controls whether a retry should be attempted after an error. By default, will use isIdempotent function from fasthttp Signature func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent Example agent.Get(\"https://example.com\").RetryIf(func (req *fiber.Request) bool { return req.URI() == \"https://example.com\" }) // ...","s":"RetryIf","u":"/next/api/client","h":"#retryif","p":62},{"i":130,"t":"HTTP methods were copied from net/http. const ( MethodGet = \"GET\" // RFC 7231, 4.3.1 MethodHead = \"HEAD\" // RFC 7231, 4.3.2 MethodPost = \"POST\" // RFC 7231, 4.3.3 MethodPut = \"PUT\" // RFC 7231, 4.3.4 MethodPatch = \"PATCH\" // RFC 5789 MethodDelete = \"DELETE\" // RFC 7231, 4.3.5 MethodConnect = \"CONNECT\" // RFC 7231, 4.3.6 MethodOptions = \"OPTIONS\" // RFC 7231, 4.3.7 MethodTrace = \"TRACE\" // RFC 7231, 4.3.8 methodUse = \"USE\" ) MIME types that are commonly used const ( MIMETextXML = \"text/xml\" MIMETextHTML = \"text/html\" MIMETextPlain = \"text/plain\" MIMEApplicationXML = \"application/xml\" MIMEApplicationJSON = \"application/json\" MIMEApplicationJavaScript = \"application/javascript\" MIMEApplicationForm = \"application/x-www-form-urlencoded\" MIMEOctetStream = \"application/octet-stream\" MIMEMultipartForm = \"multipart/form-data\" MIMETextXMLCharsetUTF8 = \"text/xml; charset=utf-8\" MIMETextHTMLCharsetUTF8 = \"text/html; charset=utf-8\" MIMETextPlainCharsetUTF8 = \"text/plain; charset=utf-8\" MIMEApplicationXMLCharsetUTF8 = \"application/xml; charset=utf-8\" MIMEApplicationJSONCharsetUTF8 = \"application/json; charset=utf-8\" MIMEApplicationJavaScriptCharsetUTF8 = \"application/javascript; charset=utf-8\" ) HTTP status codes were copied from net/http. const ( StatusContinue = 100 // RFC 7231, 6.2.1 StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2 StatusProcessing = 102 // RFC 2518, 10.1 StatusEarlyHints = 103 // RFC 8297 StatusOK = 200 // RFC 7231, 6.3.1 StatusCreated = 201 // RFC 7231, 6.3.2 StatusAccepted = 202 // RFC 7231, 6.3.3 StatusNonAuthoritativeInformation = 203 // RFC 7231, 6.3.4 StatusNoContent = 204 // RFC 7231, 6.3.5 StatusResetContent = 205 // RFC 7231, 6.3.6 StatusPartialContent = 206 // RFC 7233, 4.1 StatusMultiStatus = 207 // RFC 4918, 11.1 StatusAlreadyReported = 208 // RFC 5842, 7.1 StatusIMUsed = 226 // RFC 3229, 10.4.1 StatusMultipleChoices = 300 // RFC 7231, 6.4.1 StatusMovedPermanently = 301 // RFC 7231, 6.4.2 StatusFound = 302 // RFC 7231, 6.4.3 StatusSeeOther = 303 // RFC 7231, 6.4.4 StatusNotModified = 304 // RFC 7232, 4.1 StatusUseProxy = 305 // RFC 7231, 6.4.5 StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7 StatusPermanentRedirect = 308 // RFC 7538, 3 StatusBadRequest = 400 // RFC 7231, 6.5.1 StatusUnauthorized = 401 // RFC 7235, 3.1 StatusPaymentRequired = 402 // RFC 7231, 6.5.2 StatusForbidden = 403 // RFC 7231, 6.5.3 StatusNotFound = 404 // RFC 7231, 6.5.4 StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5 StatusNotAcceptable = 406 // RFC 7231, 6.5.6 StatusProxyAuthRequired = 407 // RFC 7235, 3.2 StatusRequestTimeout = 408 // RFC 7231, 6.5.7 StatusConflict = 409 // RFC 7231, 6.5.8 StatusGone = 410 // RFC 7231, 6.5.9 StatusLengthRequired = 411 // RFC 7231, 6.5.10 StatusPreconditionFailed = 412 // RFC 7232, 4.2 StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11 StatusRequestURITooLong = 414 // RFC 7231, 6.5.12 StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13 StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4 StatusExpectationFailed = 417 // RFC 7231, 6.5.14 StatusTeapot = 418 // RFC 7168, 2.3.3 StatusMisdirectedRequest = 421 // RFC 7540, 9.1.2 StatusUnprocessableEntity = 422 // RFC 4918, 11.2 StatusLocked = 423 // RFC 4918, 11.3 StatusFailedDependency = 424 // RFC 4918, 11.4 StatusTooEarly = 425 // RFC 8470, 5.2. StatusUpgradeRequired = 426 // RFC 7231, 6.5.15 StatusPreconditionRequired = 428 // RFC 6585, 3 StatusTooManyRequests = 429 // RFC 6585, 4 StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5 StatusUnavailableForLegalReasons = 451 // RFC 7725, 3 StatusInternalServerError = 500 // RFC 7231, 6.6.1 StatusNotImplemented = 501 // RFC 7231, 6.6.2 StatusBadGateway = 502 // RFC 7231, 6.6.3 StatusServiceUnavailable = 503 // RFC 7231, 6.6.4 StatusGatewayTimeout = 504 // RFC 7231, 6.6.5 StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6 StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1 StatusInsufficientStorage = 507 // RFC 4918, 11.5 StatusLoopDetected = 508 // RFC 5842, 7.2 StatusNotExtended = 510 // RFC 2774, 7 StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6 ) Errors var ( ErrBadRequest = NewError(StatusBadRequest) // RFC 7231, 6.5.1 ErrUnauthorized = NewError(StatusUnauthorized) // RFC 7235, 3.1 ErrPaymentRequired = NewError(StatusPaymentRequired) // RFC 7231, 6.5.2 ErrForbidden = NewError(StatusForbidden) // RFC 7231, 6.5.3 ErrNotFound = NewError(StatusNotFound) // RFC 7231, 6.5.4 ErrMethodNotAllowed = NewError(StatusMethodNotAllowed) // RFC 7231, 6.5.5 ErrNotAcceptable = NewError(StatusNotAcceptable) // RFC 7231, 6.5.6 ErrProxyAuthRequired = NewError(StatusProxyAuthRequired) // RFC 7235, 3.2 ErrRequestTimeout = NewError(StatusRequestTimeout) // RFC 7231, 6.5.7 ErrConflict = NewError(StatusConflict) // RFC 7231, 6.5.8 ErrGone = NewError(StatusGone) // RFC 7231, 6.5.9 ErrLengthRequired = NewError(StatusLengthRequired) // RFC 7231, 6.5.10 ErrPreconditionFailed = NewError(StatusPreconditionFailed) // RFC 7232, 4.2 ErrRequestEntityTooLarge = NewError(StatusRequestEntityTooLarge) // RFC 7231, 6.5.11 ErrRequestURITooLong = NewError(StatusRequestURITooLong) // RFC 7231, 6.5.12 ErrUnsupportedMediaType = NewError(StatusUnsupportedMediaType) // RFC 7231, 6.5.13 ErrRequestedRangeNotSatisfiable = NewError(StatusRequestedRangeNotSatisfiable) // RFC 7233, 4.4 ErrExpectationFailed = NewError(StatusExpectationFailed) // RFC 7231, 6.5.14 ErrTeapot = NewError(StatusTeapot) // RFC 7168, 2.3.3 ErrMisdirectedRequest = NewError(StatusMisdirectedRequest) // RFC 7540, 9.1.2 ErrUnprocessableEntity = NewError(StatusUnprocessableEntity) // RFC 4918, 11.2 ErrLocked = NewError(StatusLocked) // RFC 4918, 11.3 ErrFailedDependency = NewError(StatusFailedDependency) // RFC 4918, 11.4 ErrTooEarly = NewError(StatusTooEarly) // RFC 8470, 5.2. ErrUpgradeRequired = NewError(StatusUpgradeRequired) // RFC 7231, 6.5.15 ErrPreconditionRequired = NewError(StatusPreconditionRequired) // RFC 6585, 3 ErrTooManyRequests = NewError(StatusTooManyRequests) // RFC 6585, 4 ErrRequestHeaderFieldsTooLarge = NewError(StatusRequestHeaderFieldsTooLarge) // RFC 6585, 5 ErrUnavailableForLegalReasons = NewError(StatusUnavailableForLegalReasons) // RFC 7725, 3 ErrInternalServerError = NewError(StatusInternalServerError) // RFC 7231, 6.6.1 ErrNotImplemented = NewError(StatusNotImplemented) // RFC 7231, 6.6.2 ErrBadGateway = NewError(StatusBadGateway) // RFC 7231, 6.6.3 ErrServiceUnavailable = NewError(StatusServiceUnavailable) // RFC 7231, 6.6.4 ErrGatewayTimeout = NewError(StatusGatewayTimeout) // RFC 7231, 6.6.5 ErrHTTPVersionNotSupported = NewError(StatusHTTPVersionNotSupported) // RFC 7231, 6.6.6 ErrVariantAlsoNegotiates = NewError(StatusVariantAlsoNegotiates) // RFC 2295, 8.1 ErrInsufficientStorage = NewError(StatusInsufficientStorage) // RFC 4918, 11.5 ErrLoopDetected = NewError(StatusLoopDetected) // RFC 5842, 7.2 ErrNotExtended = NewError(StatusNotExtended) // RFC 2774, 7 ErrNetworkAuthenticationRequired = NewError(StatusNetworkAuthenticationRequired) // RFC 6585, 6 ) HTTP Headers were copied from net/http. const ( HeaderAuthorization = \"Authorization\" HeaderProxyAuthenticate = \"Proxy-Authenticate\" HeaderProxyAuthorization = \"Proxy-Authorization\" HeaderWWWAuthenticate = \"WWW-Authenticate\" HeaderAge = \"Age\" HeaderCacheControl = \"Cache-Control\" HeaderClearSiteData = \"Clear-Site-Data\" HeaderExpires = \"Expires\" HeaderPragma = \"Pragma\" HeaderWarning = \"Warning\" HeaderAcceptCH = \"Accept-CH\" HeaderAcceptCHLifetime = \"Accept-CH-Lifetime\" HeaderContentDPR = \"Content-DPR\" HeaderDPR = \"DPR\" HeaderEarlyData = \"Early-Data\" HeaderSaveData = \"Save-Data\" HeaderViewportWidth = \"Viewport-Width\" HeaderWidth = \"Width\" HeaderETag = \"ETag\" HeaderIfMatch = \"If-Match\" HeaderIfModifiedSince = \"If-Modified-Since\" HeaderIfNoneMatch = \"If-None-Match\" HeaderIfUnmodifiedSince = \"If-Unmodified-Since\" HeaderLastModified = \"Last-Modified\" HeaderVary = \"Vary\" HeaderConnection = \"Connection\" HeaderKeepAlive = \"Keep-Alive\" HeaderAccept = \"Accept\" HeaderAcceptCharset = \"Accept-Charset\" HeaderAcceptEncoding = \"Accept-Encoding\" HeaderAcceptLanguage = \"Accept-Language\" HeaderCookie = \"Cookie\" HeaderExpect = \"Expect\" HeaderMaxForwards = \"Max-Forwards\" HeaderSetCookie = \"Set-Cookie\" HeaderAccessControlAllowCredentials = \"Access-Control-Allow-Credentials\" HeaderAccessControlAllowHeaders = \"Access-Control-Allow-Headers\" HeaderAccessControlAllowMethods = \"Access-Control-Allow-Methods\" HeaderAccessControlAllowOrigin = \"Access-Control-Allow-Origin\" HeaderAccessControlExposeHeaders = \"Access-Control-Expose-Headers\" HeaderAccessControlMaxAge = \"Access-Control-Max-Age\" HeaderAccessControlRequestHeaders = \"Access-Control-Request-Headers\" HeaderAccessControlRequestMethod = \"Access-Control-Request-Method\" HeaderOrigin = \"Origin\" HeaderTimingAllowOrigin = \"Timing-Allow-Origin\" HeaderXPermittedCrossDomainPolicies = \"X-Permitted-Cross-Domain-Policies\" HeaderDNT = \"DNT\" HeaderTk = \"Tk\" HeaderContentDisposition = \"Content-Disposition\" HeaderContentEncoding = \"Content-Encoding\" HeaderContentLanguage = \"Content-Language\" HeaderContentLength = \"Content-Length\" HeaderContentLocation = \"Content-Location\" HeaderContentType = \"Content-Type\" HeaderForwarded = \"Forwarded\" HeaderVia = \"Via\" HeaderXForwardedFor = \"X-Forwarded-For\" HeaderXForwardedHost = \"X-Forwarded-Host\" HeaderXForwardedProto = \"X-Forwarded-Proto\" HeaderXForwardedProtocol = \"X-Forwarded-Protocol\" HeaderXForwardedSsl = \"X-Forwarded-Ssl\" HeaderXUrlScheme = \"X-Url-Scheme\" HeaderLocation = \"Location\" HeaderFrom = \"From\" HeaderHost = \"Host\" HeaderReferer = \"Referer\" HeaderReferrerPolicy = \"Referrer-Policy\" HeaderUserAgent = \"User-Agent\" HeaderAllow = \"Allow\" HeaderServer = \"Server\" HeaderAcceptRanges = \"Accept-Ranges\" HeaderContentRange = \"Content-Range\" HeaderIfRange = \"If-Range\" HeaderRange = \"Range\" HeaderContentSecurityPolicy = \"Content-Security-Policy\" HeaderContentSecurityPolicyReportOnly = \"Content-Security-Policy-Report-Only\" HeaderCrossOriginResourcePolicy = \"Cross-Origin-Resource-Policy\" HeaderExpectCT = \"Expect-CT\" HeaderFeaturePolicy = \"Feature-Policy\" HeaderPublicKeyPins = \"Public-Key-Pins\" HeaderPublicKeyPinsReportOnly = \"Public-Key-Pins-Report-Only\" HeaderStrictTransportSecurity = \"Strict-Transport-Security\" HeaderUpgradeInsecureRequests = \"Upgrade-Insecure-Requests\" HeaderXContentTypeOptions = \"X-Content-Type-Options\" HeaderXDownloadOptions = \"X-Download-Options\" HeaderXFrameOptions = \"X-Frame-Options\" HeaderXPoweredBy = \"X-Powered-By\" HeaderXXSSProtection = \"X-XSS-Protection\" HeaderLastEventID = \"Last-Event-ID\" HeaderNEL = \"NEL\" HeaderPingFrom = \"Ping-From\" HeaderPingTo = \"Ping-To\" HeaderReportTo = \"Report-To\" HeaderTE = \"TE\" HeaderTrailer = \"Trailer\" HeaderTransferEncoding = \"Transfer-Encoding\" HeaderSecWebSocketAccept = \"Sec-WebSocket-Accept\" HeaderSecWebSocketExtensions = \"Sec-WebSocket-Extensions\" HeaderSecWebSocketKey = \"Sec-WebSocket-Key\" HeaderSecWebSocketProtocol = \"Sec-WebSocket-Protocol\" HeaderSecWebSocketVersion = \"Sec-WebSocket-Version\" HeaderAcceptPatch = \"Accept-Patch\" HeaderAcceptPushPolicy = \"Accept-Push-Policy\" HeaderAcceptSignature = \"Accept-Signature\" HeaderAltSvc = \"Alt-Svc\" HeaderDate = \"Date\" HeaderIndex = \"Index\" HeaderLargeAllocation = \"Large-Allocation\" HeaderLink = \"Link\" HeaderPushPolicy = \"Push-Policy\" HeaderRetryAfter = \"Retry-After\" HeaderServerTiming = \"Server-Timing\" HeaderSignature = \"Signature\" HeaderSignedHeaders = \"Signed-Headers\" HeaderSourceMap = \"SourceMap\" HeaderUpgrade = \"Upgrade\" HeaderXDNSPrefetchControl = \"X-DNS-Prefetch-Control\" HeaderXPingback = \"X-Pingback\" HeaderXRequestID = \"X-Request-ID\" HeaderXRequestedWith = \"X-Requested-With\" HeaderXRobotsTag = \"X-Robots-Tag\" HeaderXUACompatible = \"X-UA-Compatible\" )","s":"📋 Constants","u":"/next/api/constants","h":"","p":129},{"i":133,"t":"This method creates a new App named instance. You can pass optional config when creating a new instance. Signature func New(config ...Config) *App Example // Default config app := fiber.New() // ...","s":"New","u":"/next/api/fiber","h":"#new","p":131},{"i":135,"t":"You can pass an optional Config when creating a new Fiber instance. Example // Custom config app := fiber.New(fiber.Config{ Prefork: true, CaseSensitive: true, StrictRouting: true, ServerHeader: \"Fiber\", AppName: \"Test App v1.0.1\", }) // ... Config fields Property Type Description Default AppName string This allows to setup app name for the app \"\" 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 CaseSensitive bool When enabled, /Foo and /foo are different routes. When disabled, /Fooand /foo are treated the same. false ColorScheme Colors You can define custom color scheme. They'll be used for startup message, route list and some middlewares. DefaultColors CompressedFileSuffix string Adds a suffix to the original file name and tries saving the resulting compressed file under the new file name. \".fiber.gz\" Concurrency int Maximum number of concurrent connections. 256 * 1024 DisableDefaultContentType bool When set to true, causes the default Content-Type header to be excluded from the Response. false DisableDefaultDate bool When set to true causes the default date header to be excluded from the response. false DisableHeaderNormalizing bool By default all header names are normalized: conteNT-tYPE -> Content-Type false DisableKeepalive bool Disable keep-alive connections, the server will close incoming connections after sending the first response to the client false DisablePreParseMultipartForm bool Will not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data. false DisableStartupMessage bool When set to true, it will not print out debug information false ETag bool Enable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method (CRC-32). Weak ETags are the default when enabled. false EnableIPValidation bool If set to true, c.IP() and c.IPs() will validate IP addresses before returning them. Also, c.IP() will return only the first valid IP rather than just the raw header value that may be a comma seperated string. WARNING: There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header. false EnablePrintRoutes bool EnablePrintRoutes enables print all routes with their method, path, name and handler.. false EnableTrustedProxyCheck bool When set to true, fiber will check whether proxy is trusted, using TrustedProxies list. By default c.Protocol() will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, c.IP() will get value from ProxyHeader header, c.Hostname() will get value from X-Forwarded-Host header. If EnableTrustedProxyCheck is true, and RemoteIP is in the list of TrustedProxies c.Protocol(), c.IP(), and c.Hostname() will have the same behaviour when EnableTrustedProxyCheck disabled, if RemoteIP isn't in the list, c.Protocol() will return https in case when tls connection is handled by the app, or http otherwise, c.IP() will return RemoteIP() from fasthttp context, c.Hostname() will return fasthttp.Request.URI().Host() false ErrorHandler ErrorHandler ErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests. DefaultErrorHandler GETOnly bool Rejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set. false 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 Immutable bool When enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue #185. false JSONDecoder utils.JSONUnmarshal Allowing for flexibility in using another json library for decoding. json.Unmarshal JSONEncoder utils.JSONMarshal Allowing for flexibility in using another json library for encoding. json.Marshal Network string Known networks are \"tcp\", \"tcp4\" (IPv4-only), \"tcp6\" (IPv6-only) WARNING: When prefork is set to true, only \"tcp4\" and \"tcp6\" can be chosen. NetworkTCP4 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 Prefork bool Enables use of theSO_REUSEPORTsocket option. This will spawn multiple Go processes listening on the same port. learn more about socket sharding. NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with CMD ./app or CMD [\"sh\", \"-c\", \"/app\"]. For more info, see this issue comment. false ProxyHeader string This will enable c.IP() to return the value of the given header key. By default c.IP()will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. X-Forwarded-*. \"\" ReadBufferSize int per-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies). 4096 ReadTimeout time.Duration The amount of time allowed to read the full request, including the body. The default timeout is unlimited. nil RequestMethods []string RequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish. DefaultMethods ServerHeader string Enables the Server HTTP header with the given value. \"\" StreamRequestBody bool StreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit. false StrictRouting bool When enabled, the router treats /foo and /foo/ as different. Otherwise, the router treats /foo and /foo/ as the same. false TrustedProxies []string Contains the list of trusted proxy IP's. Look at EnableTrustedProxyCheck doc. It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses. []string*__* UnescapePath bool Converts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special characters false 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. \"\" WriteBufferSize int Per-connection buffer size for responses' writing. 4096 WriteTimeout time.Duration The maximum duration before timing out writes of the response. The default timeout is unlimited. nil XMLEncoder utils.XMLMarshal Allowing for flexibility in using another XML library for encoding. xml.Marshal","s":"Config","u":"/next/api/fiber","h":"#config","p":131},{"i":137,"t":"NewError creates a new HTTPError instance with an optional message. Signature func NewError(code int, message ...string) *Error Example app.Get(\"/\", func(c *fiber.Ctx) error { return fiber.NewError(782, \"Custom error message\") })","s":"NewError","u":"/next/api/fiber","h":"#newerror","p":131},{"i":139,"t":"IsChild determines if the current process is a result of Prefork. Signature func IsChild() bool Example // Prefork will spawn child processes app := fiber.New(fiber.Config{ Prefork: true, }) if !fiber.IsChild() { fmt.Println(\"I'm the parent process\") } else { fmt.Println(\"I'm a child process\") } // ...","s":"IsChild","u":"/next/api/fiber","h":"#ischild","p":131},{"i":141,"t":"We can use logs to observe program behavior, diagnose problems, or configure corresponding alarms. And defining a well structured log can improve search efficiency and facilitate handling of problems. Fiber provides a default way to print logs in the standard output. It also provides several global functions, such as log.Info, log.Errorf, log.Warnw, etc.","s":"Log","u":"/next/api/log","h":"#log","p":140},{"i":143,"t":"const ( LevelTrace Level = iota LevelDebug LevelInfo LevelWarn LevelError LevelFatal LevelPanic )","s":"Log levels","u":"/next/api/log","h":"#log-levels","p":140},{"i":145,"t":"Fiber provides the AllLogger interface for adapting the various log libraries. type CommonLogger interface { Logger FormatLogger WithLogger } type AllLogger interface { CommonLogger ControlLogger WithLogger }","s":"Custom log","u":"/next/api/log","h":"#custom-log","p":140},{"i":147,"t":"Note: The method of calling the Fatal level will interrupt the program running after printing the log, please use it with caution. Directly print logs of different levels, which will be entered into messageKey, the default is msg. log.Info(\"Hello, World!\") log.Debug(\"Are you OK?\") log.Info(\"42 is the answer to life, the universe, and everything\") log.Warn(\"We are under attack!\") log.Error(\"Houston, we have a problem.\") log.Fatal(\"So Long, and Thanks for All the Fislog.\") log.Panic(\"The system is down.\") Format and print logs of different levels, all methods end with f log.Debugf(\"Hello %s\", \"boy\") log.Infof(\"%d is the answer to life, the universe, and everything\", 233) log.Warnf(\"We are under attack %s!\", \"boss\") log.Errorf(\"%s, we have a problem.\", \"Master Shifu\") log.Fatalf(\"So Long, and Thanks for All the %s.\", \"banana\") Print a message with the key and value, or KEYVALS UNPAIRED if the key and value are not a pair. log.Debugw(\"\", \"Hello\", \"boy\") log.Infow(\"\", \"number\", 233) log.Warnw(\"\", \"job\", \"boss\") log.Errorw(\"\", \"name\", \"Master Shifu\") log.Fatalw(\"\", \"fruit\", \"banana\")","s":"Print log","u":"/next/api/log","h":"#print-log","p":140},{"i":149,"t":"If you are in a project and just want to use a simple log function that can be printed at any time in the global, we provide a global log. import \"github.com/gofiber/fiber/v2/log\" log.Info(\"info\") log.Warn(\"warn\") The above is using the default log.DefaultLogger standard output. You can also find an already implemented adaptation under contrib, or use your own implemented Logger and use log.SetLogger to set the global log logger. import ( \"log\" fiberlog \"github.com/gofiber/fiber/v2/log\" ) var _ log.AllLogger = (*customLogger)(nil) type customLogger struct { stdlog *log.Logger } // ... // inject your custom logger fiberlog.SetLogger(customLogger)","s":"Global log","u":"/next/api/log","h":"#global-log","p":140},{"i":151,"t":"log.SetLevel sets the level of logs below which logs will not be output. The default logger is LevelTrace. Note that this method is not concurrent-safe. import \"github.com/gofiber/fiber/v2/log\" log.SetLevel(log.LevelInfo)","s":"Set Level","u":"/next/api/log","h":"#set-level","p":140},{"i":153,"t":"log.SetOutput sets the output destination of the logger. The default logger types the log in the console. var logger AllLogger = &defaultLogger{ stdlog: log.New(os.Stderr, \"\", log.LstdFlags|log.Lshortfile|log.Lmicroseconds), depth: 4, } Set the output destination to the file. // Output to ./test.log file f, err := os.OpenFile(\"test.log\", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) if err != nil { return } log.SetOutput(f) Set the output destination to the console and file. // Output to ./test.log file file, _ := os.OpenFile(\"test.log\", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) iw := io.MultiWriter(os.Stdout, file) log.SetOutput(iw)","s":"Set output","u":"/next/api/log","h":"#set-output","p":140},{"i":155,"t":"Set the context, using the following method will return a CommonLogger instance bound to the specified context commonLogger := log.WithContext(ctx) commonLogger.Info(\"info\")","s":"Bind context","u":"/next/api/log","h":"#bind-context","p":140},{"i":157,"t":"Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!","s":"Adaptor","u":"/next/api/middleware/adaptor","h":"","p":156},{"i":159,"t":"Name Signature Description HTTPHandler HTTPHandler(h http.Handler) fiber.Handler http.Handler -> fiber.Handler HTTPHandlerFunc HTTPHandlerFunc(h http.HandlerFunc) fiber.Handler http.HandlerFunc -> fiber.Handler HTTPMiddleware HTTPHandlerFunc(mw func(http.Handler) http.Handler) fiber.Handler func(http.Handler) http.Handler -> fiber.Handler FiberHandler FiberHandler(h fiber.Handler) http.Handler fiber.Handler -> http.Handler FiberHandlerFunc FiberHandlerFunc(h fiber.Handler) http.HandlerFunc fiber.Handler -> http.HandlerFunc FiberApp FiberApp(app *fiber.App) http.HandlerFunc Fiber app -> http.HandlerFunc ConvertRequest ConvertRequest(c *fiber.Ctx, forServer bool) (*http.Request, error) fiber.Ctx -> http.Request CopyContextToFiberContext CopyContextToFiberContext(context interface{}, requestContext *fasthttp.RequestCtx) context.Context -> fasthttp.RequestCtx","s":"Signatures","u":"/next/api/middleware/adaptor","h":"#signatures","p":156},{"i":162,"t":"package main import ( \"fmt\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // New fiber app app := fiber.New() // http.Handler -> fiber.Handler app.Get(\"/\", adaptor.HTTPHandler(handler(greet))) // http.HandlerFunc -> fiber.Handler app.Get(\"/func\", adaptor.HTTPHandlerFunc(greet)) // Listen on port 3000 app.Listen(\":3000\") } func handler(f http.HandlerFunc) http.Handler { return http.HandlerFunc(f) } func greet(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, \"Hello World!\") }","s":"net/http to Fiber","u":"/next/api/middleware/adaptor","h":"#nethttp-to-fiber","p":156},{"i":164,"t":"package main import ( \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // New fiber app app := fiber.New() // http middleware -> fiber.Handler app.Use(adaptor.HTTPMiddleware(logMiddleware)) // Listen on port 3000 app.Listen(\":3000\") } func logMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { log.Println(\"log middleware\") next.ServeHTTP(w, r) }) }","s":"net/http middleware to Fiber","u":"/next/api/middleware/adaptor","h":"#nethttp-middleware-to-fiber","p":156},{"i":166,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // fiber.Handler -> http.Handler http.Handle(\"/\", adaptor.FiberHandler(greet)) // fiber.Handler -> http.HandlerFunc http.HandleFunc(\"/func\", adaptor.FiberHandlerFunc(greet)) // Listen on port 3000 http.ListenAndServe(\":3000\", nil) } func greet(c *fiber.Ctx) error { return c.SendString(\"Hello World!\") }","s":"Fiber Handler to net/http","u":"/next/api/middleware/adaptor","h":"#fiber-handler-to-nethttp","p":156},{"i":168,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { app := fiber.New() app.Get(\"/greet\", greet) // Listen on port 3000 http.ListenAndServe(\":3000\", adaptor.FiberApp(app)) } func greet(c *fiber.Ctx) error { return c.SendString(\"Hello World!\") }","s":"Fiber App to net/http","u":"/next/api/middleware/adaptor","h":"#fiber-app-to-nethttp","p":156},{"i":170,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { app := fiber.New() app.Get(\"/greet\", greetWithHTTPReq) // Listen on port 3000 http.ListenAndServe(\":3000\", adaptor.FiberApp(app)) } func greetWithHTTPReq(c *fiber.Ctx) error { httpReq, err := adaptor.ConvertRequest(c, false) if err != nil { return err } return c.SendString(\"Request URL: \" + httpReq.URL.String()) }","s":"Fiber Context to (net/http).Request","u":"/next/api/middleware/adaptor","h":"#fiber-context-to-nethttprequest","p":156},{"i":172,"t":"Basic Authentication middleware for Fiber that provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized or a custom response for missing or invalid credentials.","s":"BasicAuth","u":"/next/api/middleware/basicauth","h":"","p":171},{"i":174,"t":"func New(config Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/basicauth","h":"#signatures","p":171},{"i":176,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/basicauth\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config app.Use(basicauth.New(basicauth.Config{ Users: map[string]string{ \"john\": \"doe\", \"admin\": \"123456\", }, })) // Or extend your config for customization app.Use(basicauth.New(basicauth.Config{ Users: map[string]string{ \"john\": \"doe\", \"admin\": \"123456\", }, Realm: \"Forbidden\", Authorizer: func(user, pass string) bool { if user == \"john\" && pass == \"doe\" { return true } if user == \"admin\" && pass == \"123456\" { return true } return false }, Unauthorized: func(c *fiber.Ctx) error { return c.SendFile(\"./unauthorized.html\") }, ContextUsername: \"_user\", ContextPassword: \"_pass\", }))","s":"Examples","u":"/next/api/middleware/basicauth","h":"#examples","p":171},{"i":178,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Users defines the allowed credentials // // Required. Default: map[string]string{} Users map[string]string // Realm is a string to define realm attribute of BasicAuth. // the realm identifies the system to authenticate against // and can be used by clients to save credentials // // Optional. Default: \"Restricted\". Realm string // Authorizer defines a function you can pass // to check the credentials however you want. // It will be called with a username and password // and is expected to return true or false to indicate // that the credentials were approved or not. // // Optional. Default: nil. Authorizer func(string, string) bool // Unauthorized defines the response body for unauthorized responses. // By default it will return with a 401 Unauthorized and the correct WWW-Auth header // // Optional. Default: nil Unauthorized fiber.Handler // ContextUser is the key to store the username in Locals // // Optional. Default: \"username\" ContextUsername string // ContextPass is the key to store the password in Locals // // Optional. Default: \"password\" ContextPassword string }","s":"Config","u":"/next/api/middleware/basicauth","h":"#config","p":171},{"i":180,"t":"var ConfigDefault = Config{ Next: nil, Users: map[string]string{}, Realm: \"Restricted\", Authorizer: nil, Unauthorized: nil, ContextUsername: \"username\", ContextPassword: \"password\", }","s":"Default Config","u":"/next/api/middleware/basicauth","h":"#default-config","p":171},{"i":182,"t":"Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core! Request Directives Cache-Control: no-cache will return the up-to-date response but still caches it. You will always get a miss cache status. Cache-Control: no-store will refrain from caching. You will always get the up-to-date response.","s":"Cache","u":"/next/api/middleware/cache","h":"","p":181},{"i":184,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/cache","h":"#signatures","p":181},{"i":186,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/cache\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(cache.New()) // Or extend your config for customization app.Use(cache.New(cache.Config{ Next: func(c *fiber.Ctx) bool { return c.Query(\"refresh\") == \"true\" }, Expiration: 30 * time.Minute, CacheControl: true, })) Or you can custom key and expire time like this: app.Use(cache.New(cache.Config{ ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration { newCacheTime, _ := strconv.Atoi(c.GetRespHeader(\"Cache-Time\", \"600\")) return time.Second * time.Duration(newCacheTime) }, KeyGenerator: func(c *fiber.Ctx) string { return utils.CopyString(c.Path()) }, })) app.Get(\"/\", func(c *fiber.Ctx) error { c.Response().Header.Add(\"Cache-Time\", \"6000\") return c.SendString(\"hi\") })","s":"Examples","u":"/next/api/middleware/cache","h":"#examples","p":181},{"i":188,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Expiration is the time that an cached response will live // // Optional. Default: 1 * time.Minute Expiration time.Duration // CacheHeader header on response header, indicate cache status, with the following possible return value // // hit, miss, unreachable // // Optional. Default: X-Cache CacheHeader string // CacheControl enables client side caching if set to true // // Optional. Default: false CacheControl bool // Key allows you to generate custom keys, by default c.Path() is used // // Default: func(c *fiber.Ctx) string { // return utils.CopyString(c.Path()) // } 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 // Store is used to store the state of the middleware // // Default: an in memory store for this process only Storage fiber.Storage // allows you to store additional headers generated by next middlewares & handler // // Default: false StoreResponseHeaders bool // Max number of bytes of response bodies simultaneously stored in cache. When limit is reached, // entries with the nearest expiration are deleted to make room for new. // 0 means no limit // // Default: 0 MaxBytes uint // You can specify HTTP methods to cache. // The middleware just caches the routes of its methods in this slice. // // Default: []string{fiber.MethodGet, fiber.MethodHead} Methods []string }","s":"Config","u":"/next/api/middleware/cache","h":"#config","p":181},{"i":190,"t":"var ConfigDefault = Config{ Next: nil, Expiration: 1 * time.Minute, CacheHeader: \"X-Cache\", CacheControl: false, KeyGenerator: func(c *fiber.Ctx) string { return utils.CopyString(c.Path()) }, ExpirationGenerator: nil, StoreResponseHeaders: false, Storage: nil, MaxBytes: 0, Methods: []string{fiber.MethodGet, fiber.MethodHead}, }","s":"Default Config","u":"/next/api/middleware/cache","h":"#default-config","p":181},{"i":192,"t":"Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.","s":"Compress","u":"/next/api/middleware/compress","h":"","p":191},{"i":194,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/compress","h":"#signatures","p":191},{"i":196,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/compress\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(compress.New()) // Or extend your config for customization app.Use(compress.New(compress.Config{ Level: compress.LevelBestSpeed, // 1 })) // Skip middleware for specific routes app.Use(compress.New(compress.Config{ Next: func(c *fiber.Ctx) bool { return c.Path() == \"/dont_compress\" }, Level: compress.LevelBestSpeed, // 1 }))","s":"Examples","u":"/next/api/middleware/compress","h":"#examples","p":191},{"i":198,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Level determines the compression algoritm // // Optional. Default: LevelDefault // LevelDisabled: -1 // LevelDefault: 0 // LevelBestSpeed: 1 // LevelBestCompression: 2 Level int }","s":"Config","u":"/next/api/middleware/compress","h":"#config","p":191},{"i":200,"t":"var ConfigDefault = Config{ Next: nil, Level: LevelDefault, }","s":"Default Config","u":"/next/api/middleware/compress","h":"#default-config","p":191},{"i":202,"t":"// Compression levels const ( LevelDisabled = -1 LevelDefault = 0 LevelBestSpeed = 1 LevelBestCompression = 2 )","s":"Constants","u":"/next/api/middleware/compress","h":"#constants","p":191},{"i":204,"t":"CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.","s":"CORS","u":"/next/api/middleware/cors","h":"","p":203},{"i":206,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/cors","h":"#signatures","p":203},{"i":208,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/cors\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(cors.New()) // Or extend your config for customization app.Use(cors.New(cors.Config{ AllowOrigins: \"https://gofiber.io, https://gofiber.net\", AllowHeaders: \"Origin, Content-Type, Accept\", })) Using the AllowOriginsFunc function. In this example any origin will be allowed via CORS. For example, if a browser running on http://localhost:3000 sends a request, this will be accepted and the access-control-allow-origin response header will be set to http://localhost:3000. Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via AllowOrigins. app.Use(cors.New()) app.Use(cors.New(cors.Config{ AllowOriginsFunc: func(origin string) bool { return os.Getenv(\"ENVIRONMENT\") == \"development\" }, }))","s":"Examples","u":"/next/api/middleware/cors","h":"#examples","p":203},{"i":210,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // AllowOriginsFunc defines a function that will set the 'access-control-allow-origin' // response header to the 'origin' request header when returned true. // // Note: Using this feature is discouraged in production and it's best practice to explicitly // set CORS origins via 'AllowOrigins' // // Optional. Default: nil AllowOriginsFunc func(origin string) bool // AllowOrigin defines a list of origins that may access the resource. // // Optional. Default value \"*\" AllowOrigins string // AllowMethods defines a list methods allowed when accessing the resource. // This is used in response to a preflight request. // // Optional. Default value \"GET,POST,HEAD,PUT,DELETE,PATCH\" AllowMethods string // AllowHeaders defines a list of request headers that can be used when // making the actual request. This is in response to a preflight request. // // Optional. Default value \"\". AllowHeaders string // AllowCredentials indicates whether or not the response to the request // can be exposed when the credentials flag is true. When used as part of // a response to a preflight request, this indicates whether or not the // actual request can be made using credentials. // // Optional. Default value false. AllowCredentials bool // ExposeHeaders defines a whitelist headers that clients are allowed to // access. // // Optional. Default value \"\". ExposeHeaders string // MaxAge indicates how long (in seconds) the results of a preflight request // can be cached. // // Optional. Default value 0. MaxAge int }","s":"Config","u":"/next/api/middleware/cors","h":"#config","p":203},{"i":212,"t":"var ConfigDefault = Config{ Next: nil, AllowOriginsFunc: nil, AllowOrigins: \"*\", AllowMethods: strings.Join([]string{ fiber.MethodGet, fiber.MethodPost, fiber.MethodHead, fiber.MethodPut, fiber.MethodDelete, fiber.MethodPatch, }, \",\"), AllowHeaders: \"\", AllowCredentials: false, ExposeHeaders: \"\", MaxAge: 0, }","s":"Default Config","u":"/next/api/middleware/cors","h":"#default-config","p":203},{"i":214,"t":"CSRF middleware for Fiber that provides Cross-site request forgery protection by passing a csrf token via cookies. This cookie value will be used to compare against the client csrf token on requests, other than those defined as \"safe\" by RFC7231 (GET, HEAD, OPTIONS, or TRACE). When the csrf token is invalid, this middleware will return the fiber.ErrForbidden error. CSRF Tokens are generated on GET requests. You can retrieve the CSRF token with c.Locals(contextKey), where contextKey is the string you set in the config (see Custom Config below). When no csrf_ cookie is set, or the token has expired, a new token will be generated and csrf_ cookie set. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.","s":"CSRF","u":"/next/api/middleware/csrf","h":"","p":213},{"i":216,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/csrf","h":"#signatures","p":213},{"i":218,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/csrf\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(csrf.New()) // Or extend your config for customization app.Use(csrf.New(csrf.Config{ KeyLookup: \"header:X-Csrf-Token\", CookieName: \"csrf_\", CookieSameSite: \"Lax\", Expiration: 1 * time.Hour, KeyGenerator: utils.UUID, Extractor: func(c *fiber.Ctx) (string, error) { ... }, })) note KeyLookup will be ignored if Extractor is explicitly set.","s":"Examples","u":"/next/api/middleware/csrf","h":"#examples","p":213},{"i":220,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // KeyLookup is a string in the form of \":\" that is used // to create an Extractor that extracts the token from the request. // Possible values: // - \"header:\" // - \"query:\" // - \"param:\" // - \"form:\" // - \"cookie:\" // // Ignored if an Extractor is explicitly set. // // Optional. Default: \"header:X-CSRF-Token\" KeyLookup string // Name of the session cookie. This cookie will store session key. // Optional. Default value \"csrf_\". CookieName string // Domain of the CSRF cookie. // Optional. Default value \"\". CookieDomain string // Path of the CSRF cookie. // Optional. Default value \"\". CookiePath string // Indicates if CSRF cookie is secure. // Optional. Default value false. CookieSecure bool // Indicates if CSRF cookie is HTTP only. // Optional. Default value false. CookieHTTPOnly bool // Indicates if CSRF cookie is requested by SameSite. // Optional. Default value \"Lax\". CookieSameSite string // Decides whether cookie should last for only the browser sesison. // Ignores Expiration if set to true CookieSessionOnly bool // Expiration is the duration before csrf token will expire // // Optional. Default: 1 * time.Hour Expiration time.Duration // Store is used to store the state of the middleware // // Optional. Default: memory.New() Storage fiber.Storage // Context key to store generated CSRF token into context. // If left empty, token will not be stored in context. // // Optional. Default: \"\" ContextKey string // KeyGenerator creates a new CSRF token // // Optional. Default: utils.UUID KeyGenerator func() string // Extractor returns the csrf token // // If set this will be used in place of an Extractor based on KeyLookup. // // Optional. Default will create an Extractor based on KeyLookup. Extractor func(c *fiber.Ctx) (string, error) }","s":"Config","u":"/next/api/middleware/csrf","h":"#config","p":213},{"i":222,"t":"var ConfigDefault = Config{ KeyLookup: \"header:\" + HeaderName, CookieName: \"csrf_\", CookieSameSite: \"Lax\", Expiration: 1 * time.Hour, KeyGenerator: utils.UUID, ErrorHandler: defaultErrorHandler, Extractor: CsrfFromHeader(HeaderName), }","s":"Default Config","u":"/next/api/middleware/csrf","h":"#default-config","p":213},{"i":224,"t":"const ( HeaderName = \"X-Csrf-Token\" )","s":"Constants","u":"/next/api/middleware/csrf","h":"#constants","p":213},{"i":226,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 app.Use(csrf.New(csrf.Config{ Storage: storage, }))","s":"Custom Storage/Database","u":"/next/api/middleware/csrf","h":"#custom-storagedatabase","p":213},{"i":228,"t":"The Early Data middleware for Fiber adds support for TLS 1.3's early data (\"0-RTT\") feature. Citing RFC 8446, when a client and server share a PSK, TLS 1.3 allows clients to send data on the first flight (\"early data\") to speed up the request, effectively reducing the regular 1-RTT request to a 0-RTT request. Make sure to enable fiber's EnableTrustedProxyCheck config option before using this middleware in order to not trust bogus HTTP request headers of the client. Also be aware that enabling support for early data in your reverse proxy (e.g. nginx, as done with a simple ssl_early_data on;) makes requests replayable. Refer to the following documents before continuing: https://datatracker.ietf.org/doc/html/rfc8446#section-8 https://blog.trailofbits.com/2019/03/25/what-application-developers-need-to-know-about-tls-early-data-0rtt/ By default, this middleware allows early data requests on safe HTTP request methods only and rejects the request otherwise, i.e. aborts the request before executing your handler. This behavior can be controlled by the AllowEarlyData config option. Safe HTTP methods — GET, HEAD, OPTIONS and TRACE — should not modify a state on the server.","s":"EarlyData","u":"/next/api/middleware/earlydata","h":"","p":227},{"i":230,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/earlydata","h":"#signatures","p":227},{"i":232,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/earlydata\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(earlydata.New()) // Or extend your config for customization app.Use(earlydata.New(earlydata.Config{ Error: fiber.ErrTooEarly, // ... }))","s":"Examples","u":"/next/api/middleware/earlydata","h":"#examples","p":227},{"i":234,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // IsEarlyData returns whether the request is an early-data request. // // Optional. Default: a function which checks if the \"Early-Data\" request header equals \"1\". IsEarlyData func(c *fiber.Ctx) bool // AllowEarlyData returns whether the early-data request should be allowed or rejected. // // Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods. AllowEarlyData func(c *fiber.Ctx) bool // Error is returned in case an early-data request is rejected. // // Optional. Default: fiber.ErrTooEarly. Error error }","s":"Config","u":"/next/api/middleware/earlydata","h":"#config","p":227},{"i":236,"t":"var ConfigDefault = Config{ IsEarlyData: func(c *fiber.Ctx) bool { return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue }, AllowEarlyData: func(c *fiber.Ctx) bool { return fiber.IsMethodSafe(c.Method()) }, Error: fiber.ErrTooEarly, }","s":"Default Config","u":"/next/api/middleware/earlydata","h":"#default-config","p":227},{"i":238,"t":"const ( DefaultHeaderName = \"Early-Data\" DefaultHeaderTrueValue = \"1\" )","s":"Constants","u":"/next/api/middleware/earlydata","h":"#constants","p":227},{"i":240,"t":"Encrypt middleware for Fiber which encrypts cookie values. Note: this middleware does not encrypt cookie names.","s":"Encrypt Cookie","u":"/next/api/middleware/encryptcookie","h":"","p":239},{"i":242,"t":"// Intitializes the middleware func New(config ...Config) fiber.Handler // Returns a random 32 character long string func GenerateKey() string","s":"Signatures","u":"/next/api/middleware/encryptcookie","h":"#signatures","p":239},{"i":244,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/encryptcookie\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config // `Key` must be a 32 character string. It's used to encrypt the values, so make sure it is random and keep it secret. // You can run `openssl rand -base64 32` or call `encryptcookie.GenerateKey()` to create a random key for you. // Make sure not to set `Key` to `encryptcookie.GenerateKey()` because that will create a new key every run. app.Use(encryptcookie.New(encryptcookie.Config{ Key: \"secret-thirty-2-character-string\", })) // Get / reading out the encrypted cookie app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"value=\" + c.Cookies(\"test\")) }) // Post / create the encrypted cookie app.Post(\"/\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"test\", Value: \"SomeThing\", }) return nil })","s":"Examples","u":"/next/api/middleware/encryptcookie","h":"#examples","p":239},{"i":246,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Array of cookie keys that should not be encrypted. // // Optional. Default: [\"csrf_\"] Except []string // Base64 encoded unique key to encode & decode cookies. // // Required. The key should be 32 bytes of random data in base64-encoded form. // You may run `openssl rand -base64 32` or use `encryptcookie.GenerateKey()` to generate a new key. Key string // Custom function to encrypt cookies. // // Optional. Default: EncryptCookie Encryptor func(decryptedString, key string) (string, error) // Custom function to decrypt cookies. // // Optional. Default: DecryptCookie Decryptor func(encryptedString, key string) (string, error) }","s":"Config","u":"/next/api/middleware/encryptcookie","h":"#config","p":239},{"i":248,"t":"var ConfigDefault = Config{ Next: nil, Except: []string{\"csrf_\"}, Key: \"\", Encryptor: EncryptCookie, Decryptor: DecryptCookie, }","s":"Default Config","u":"/next/api/middleware/encryptcookie","h":"#default-config","p":239},{"i":250,"t":"Normally, encryptcookie middleware skips csrf_ cookies. However, it won't work when you use custom cookie names for CSRF. You should update Except config to avoid this problem. For example: app.Use(encryptcookie.New(encryptcookie.Config{ Key: \"secret-thirty-2-character-string\", Except: []string{\"csrf_1\"}, // exclude CSRF cookie })) app.Use(csrf.New(csrf.Config{ KeyLookup: \"form:test\", CookieName: \"csrf_1\", CookieHTTPOnly: true, }))","s":"Usage of CSRF and Encryptcookie Middlewares with Custom Cookie Names","u":"/next/api/middleware/encryptcookie","h":"#usage-of-csrf-and-encryptcookie-middlewares-with-custom-cookie-names","p":239},{"i":252,"t":"EnvVar middleware for Fiber that can be used to expose environment variables with various options.","s":"EnvVar","u":"/next/api/middleware/envvar","h":"","p":251},{"i":254,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/envvar","h":"#signatures","p":251},{"i":256,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/envvar\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(\"/expose/envvars\", envvar.New()) // Or extend your config for customization app.Use(\"/expose/envvars\", envvar.New( envvar.Config{ ExportVars: map[string]string{\"testKey\": \"\", \"testDefaultKey\": \"testDefaultVal\"}, ExcludeVars: map[string]string{\"excludeKey\": \"\"}, }), ) note You will need to provide a path to use the envvar middleware.","s":"Examples","u":"/next/api/middleware/envvar","h":"#examples","p":251},{"i":258,"t":"Http response contract: { \"vars\": { \"someEnvVariable\": \"someValue\", \"anotherEnvVariable\": \"anotherValue\", } }","s":"Response","u":"/next/api/middleware/envvar","h":"#response","p":251},{"i":260,"t":"// Config defines the config for middleware. type Config struct { // ExportVars specifies the environment variables that should export ExportVars map[string]string // ExcludeVars specifies the environment variables that should not export ExcludeVars map[string]string }","s":"Config","u":"/next/api/middleware/envvar","h":"#config","p":251},{"i":262,"t":"Config{}","s":"Default Config","u":"/next/api/middleware/envvar","h":"#default-config","p":251},{"i":264,"t":"ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.","s":"ETag","u":"/next/api/middleware/etag","h":"","p":263},{"i":266,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/etag","h":"#signatures","p":263},{"i":268,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/etag\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(etag.New()) // Get / receives Etag: \"13-1831710635\" in response header app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) // Or extend your config for customization app.Use(etag.New(etag.Config{ Weak: true, })) // Get / receives Etag: \"W/\"13-1831710635\" in response header app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") })","s":"Examples","u":"/next/api/middleware/etag","h":"#examples","p":263},{"i":270,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Weak indicates that a weak validator is used. Weak etags are easy // to generate, but are far less useful for comparisons. Strong // validators are ideal for comparisons but can be very difficult // to generate efficiently. Weak ETag values of two representations // of the same resources might be semantically equivalent, but not // byte-for-byte identical. This means weak etags prevent caching // when byte range requests are used, but strong etags mean range // requests can still be cached. Weak bool }","s":"Config","u":"/next/api/middleware/etag","h":"#config","p":263},{"i":272,"t":"var ConfigDefault = Config{ Next: nil, Weak: false, }","s":"Default Config","u":"/next/api/middleware/etag","h":"#default-config","p":263},{"i":274,"t":"Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.","s":"ExpVar","u":"/next/api/middleware/expvar","h":"","p":273},{"i":276,"t":"func New() fiber.Handler","s":"Signatures","u":"/next/api/middleware/expvar","h":"#signatures","p":273},{"i":278,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" expvarmw \"github.com/gofiber/fiber/v2/middleware/expvar\" ) After you initiate your Fiber app, you can use the following possibilities: var count = expvar.NewInt(\"count\") app.Use(expvarmw.New()) app.Get(\"/\", func(c *fiber.Ctx) error { count.Add(1) return c.SendString(fmt.Sprintf(\"hello expvar count %d\", count.Value())) }) Visit path /debug/vars to see all vars and use query r=key to filter exposed variables. curl 127.0.0.1:3000 hello expvar count 1 curl 127.0.0.1:3000/debug/vars { \"cmdline\": [\"xxx\"], \"count\": 1, \"expvarHandlerCalls\": 33, \"expvarRegexpErrors\": 0, \"memstats\": {...} } curl 127.0.0.1:3000/debug/vars?r=c { \"cmdline\": [\"xxx\"], \"count\": 1 }","s":"Examples","u":"/next/api/middleware/expvar","h":"#examples","p":273},{"i":280,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool }","s":"Config","u":"/next/api/middleware/expvar","h":"#config","p":273},{"i":282,"t":"var ConfigDefault = Config{ Next: nil, }","s":"Default Config","u":"/next/api/middleware/expvar","h":"#default-config","p":273},{"i":284,"t":"Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware. note This middleware is exclusively for serving the default, implicit favicon, which is GET /favicon.ico or custom favicon URL.","s":"Favicon","u":"/next/api/middleware/favicon","h":"","p":283},{"i":286,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/favicon","h":"#signatures","p":283},{"i":288,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/favicon\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(favicon.New()) // Or extend your config for customization app.Use(favicon.New(favicon.Config{ File: \"./favicon.ico\", URL: \"/favicon.ico\", }))","s":"Examples","u":"/next/api/middleware/favicon","h":"#examples","p":283},{"i":290,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // File holds the path to an actual favicon that will be cached // // Optional. Default: \"\" File string // URL for favicon handler // // Optional. Default: \"/favicon.ico\" URL string // FileSystem is an optional alternate filesystem to search for the favicon in. // An example of this could be an embedded or network filesystem // // Optional. Default: nil FileSystem http.FileSystem // CacheControl defines how the Cache-Control header in the response should be set // // Optional. Default: \"public, max-age=31536000\" CacheControl string }","s":"Config","u":"/next/api/middleware/favicon","h":"#config","p":283},{"i":292,"t":"var ConfigDefault = Config{ Next: nil, File: \"\", URL: fPath, CacheControl: \"public, max-age=31536000\", }","s":"Default Config","u":"/next/api/middleware/favicon","h":"#default-config","p":283},{"i":294,"t":"Filesystem middleware for Fiber that enables you to serve files from a directory. caution :params & :optionals? within the prefix path are not supported! To handle paths with spaces (or other url encoded values) make sure to set fiber.Config{ UnescapePath: true }","s":"FileSystem","u":"/next/api/middleware/filesystem","h":"","p":293},{"i":296,"t":"func New(config Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/filesystem","h":"#signatures","p":293},{"i":298,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config app.Use(filesystem.New(filesystem.Config{ Root: http.Dir(\"./assets\"), })) // Or extend your config for customization app.Use(filesystem.New(filesystem.Config{ Root: http.Dir(\"./assets\"), Browse: true, Index: \"index.html\", NotFoundFile: \"404.html\", MaxAge: 3600, })) If your environment (Go 1.16+) supports it, we recommend using Go Embed instead of the other solutions listed as this one is native to Go and the easiest to use.","s":"Examples","u":"/next/api/middleware/filesystem","h":"#examples","p":293},{"i":300,"t":"Embed is the native method to embed files in a Golang excecutable. Introduced in Go 1.16. package main import ( \"embed\" \"io/fs\" \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" ) // Embed a single file //go:embed index.html var f embed.FS // Embed a directory //go:embed static/* var embedDirStatic embed.FS func main() { app := fiber.New() app.Use(\"/\", filesystem.New(filesystem.Config{ Root: http.FS(f), })) // Access file \"image.png\" under `static/` directory via URL: `http:///static/image.png`. // Without `PathPrefix`, you have to access it via URL: // `http:///static/static/image.png`. app.Use(\"/static\", filesystem.New(filesystem.Config{ Root: http.FS(embedDirStatic), PathPrefix: \"static\", Browse: true, })) log.Fatal(app.Listen(\":3000\")) }","s":"embed","u":"/next/api/middleware/filesystem","h":"#embed","p":293},{"i":302,"t":"https://github.com/markbates/pkger package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/markbates/pkger\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: pkger.Dir(\"/assets\"), })) log.Fatal(app.Listen(\":3000\")) }","s":"pkger","u":"/next/api/middleware/filesystem","h":"#pkger","p":293},{"i":304,"t":"https://github.com/gobuffalo/packr package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/gobuffalo/packr/v2\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: packr.New(\"Assets Box\", \"/assets\"), })) log.Fatal(app.Listen(\":3000\")) }","s":"packr","u":"/next/api/middleware/filesystem","h":"#packr","p":293},{"i":306,"t":"https://github.com/GeertJohan/go.rice package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/GeertJohan/go.rice\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: rice.MustFindBox(\"assets\").HTTPBox(), })) log.Fatal(app.Listen(\":3000\")) }","s":"go.rice","u":"/next/api/middleware/filesystem","h":"#gorice","p":293},{"i":308,"t":"https://github.com/UnnoTed/fileb0x package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"/myEmbeddedFiles\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: myEmbeddedFiles.HTTP, })) log.Fatal(app.Listen(\":3000\")) }","s":"fileb0x","u":"/next/api/middleware/filesystem","h":"#fileb0x","p":293},{"i":310,"t":"https://github.com/rakyll/statik package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" // Use blank to invoke init function and register data to statik _ \"/statik\" \"github.com/rakyll/statik/fs\" ) func main() { statikFS, err := fs.New() if err != nil { panic(err) } app := fiber.New() app.Use(\"/\", filesystem.New(filesystem.Config{ Root: statikFS, })) log.Fatal(app.Listen(\":3000\")) }","s":"statik","u":"/next/api/middleware/filesystem","h":"#statik","p":293},{"i":312,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Root is a FileSystem that provides access // to a collection of files and directories. // // Required. Default: nil Root http.FileSystem `json:\"-\"` // PathPrefix defines a prefix to be added to a filepath when // reading a file from the FileSystem. // // Use when using Go 1.16 embed.FS // // Optional. Default \"\" PathPrefix string `json:\"path_prefix\"` // Enable directory browsing. // // Optional. Default: false Browse bool `json:\"browse\"` // Index file for serving a directory. // // Optional. Default: \"index.html\" Index string `json:\"index\"` // The value for the Cache-Control HTTP-header // that is set on the file response. MaxAge is defined in seconds. // // Optional. Default value 0. MaxAge int `json:\"max_age\"` // File to return if path is not found. Useful for SPA's. // // Optional. Default: \"\" NotFoundFile string `json:\"not_found_file\"` // The value for the Content-Type HTTP-header // that is set on the file response // // Optional. Default: \"\" ContentTypeCharset string `json:\"content_type_charset\"` }","s":"Config","u":"/next/api/middleware/filesystem","h":"#config","p":293},{"i":314,"t":"var ConfigDefault = Config{ Next: nil, Root: nil, PathPrefix: \"\", Browse: false, Index: \"/index.html\", MaxAge: 0, ContentTypeCharset: \"\", }","s":"Default Config","u":"/next/api/middleware/filesystem","h":"#default-config","p":293},{"i":316,"t":"Idempotency middleware for Fiber allows for fault-tolerant APIs where duplicate requests — for example due to networking issues on the client-side — do not erroneously cause the same action performed multiple times on the server-side. Refer to https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-02 for a better understanding.","s":"Idempotency","u":"/next/api/middleware/idempotency","h":"","p":315},{"i":318,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/idempotency","h":"#signatures","p":315},{"i":320,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/idempotency\" ) After you initiate your Fiber app, you can use the following possibilities:","s":"Examples","u":"/next/api/middleware/idempotency","h":"#examples","p":315},{"i":322,"t":"app.Use(idempotency.New())","s":"Default Config","u":"/next/api/middleware/idempotency","h":"#default-config","p":315},{"i":324,"t":"app.Use(idempotency.New(idempotency.Config{ Lifetime: 42 * time.Minute, // ... }))","s":"Custom Config","u":"/next/api/middleware/idempotency","h":"#custom-config","p":315},{"i":326,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: a function which skips the middleware on safe HTTP request method. Next func(c *fiber.Ctx) bool // Lifetime is the maximum lifetime of an idempotency key. // // Optional. Default: 30 * time.Minute Lifetime time.Duration // KeyHeader is the name of the header that contains the idempotency key. // // Optional. Default: X-Idempotency-Key KeyHeader string // KeyHeaderValidate defines a function to validate the syntax of the idempotency header. // // Optional. Default: a function which ensures the header is 36 characters long (the size of an UUID). KeyHeaderValidate func(string) error // KeepResponseHeaders is a list of headers that should be kept from the original response. // // Optional. Default: nil (to keep all headers) KeepResponseHeaders []string // Lock locks an idempotency key. // // Optional. Default: an in-memory locker for this process only. Lock Locker // Storage stores response data by idempotency key. // // Optional. Default: an in-memory storage for this process only. Storage fiber.Storage }","s":"Config","u":"/next/api/middleware/idempotency","h":"#config","p":315},{"i":328,"t":"var ConfigDefault = Config{ Next: func(c *fiber.Ctx) bool { // Skip middleware if the request was done using a safe HTTP method return fiber.IsMethodSafe(c.Method()) }, Lifetime: 30 * time.Minute, KeyHeader: \"X-Idempotency-Key\", KeyHeaderValidate: func(k string) error { if l, wl := len(k), 36; l != wl { // UUID length is 36 chars return fmt.Errorf(\"%w: invalid length: %d != %d\", ErrInvalidIdempotencyKey, l, wl) } return nil }, KeepResponseHeaders: nil, Lock: nil, // Set in configDefault so we don't allocate data here. Storage: nil, // Set in configDefault so we don't allocate data here. }","s":"Default Config","u":"/next/api/middleware/idempotency","h":"#default-config-1","p":315},{"i":330,"t":"Helmet middleware helps secure your apps by setting various HTTP headers.","s":"Helmet","u":"/next/api/middleware/helmet","h":"","p":329},{"i":332,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/helmet","h":"#signatures","p":329},{"i":334,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/helmet\" ) func main() { app := fiber.New() app.Use(helmet.New()) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome!\") }) app.Listen(\":3000\") } Test: curl -I http://localhost:3000","s":"Examples","u":"/next/api/middleware/helmet","h":"#examples","p":329},{"i":336,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // XSSProtection // Optional. Default value \"0\". XSSProtection string // ContentTypeNosniff // Optional. Default value \"nosniff\". ContentTypeNosniff string // XFrameOptions // Optional. Default value \"SAMEORIGIN\". // Possible values: \"SAMEORIGIN\", \"DENY\", \"ALLOW-FROM uri\" XFrameOptions string // HSTSMaxAge // Optional. Default value 0. HSTSMaxAge int // HSTSExcludeSubdomains // Optional. Default value false. HSTSExcludeSubdomains bool // ContentSecurityPolicy // Optional. Default value \"\". ContentSecurityPolicy string // CSPReportOnly // Optional. Default value false. CSPReportOnly bool // HSTSPreloadEnabled // Optional. Default value false. HSTSPreloadEnabled bool // ReferrerPolicy // Optional. Default value \"ReferrerPolicy\". ReferrerPolicy string // Permissions-Policy // Optional. Default value \"\". PermissionPolicy string // Cross-Origin-Embedder-Policy // Optional. Default value \"require-corp\". CrossOriginEmbedderPolicy string // Cross-Origin-Opener-Policy // Optional. Default value \"same-origin\". CrossOriginOpenerPolicy string // Cross-Origin-Resource-Policy // Optional. Default value \"same-origin\". CrossOriginResourcePolicy string // Origin-Agent-Cluster // Optional. Default value \"?1\". OriginAgentCluster string // X-DNS-Prefetch-Control // Optional. Default value \"off\". XDNSPrefetchControl string // X-Download-Options // Optional. Default value \"noopen\". XDownloadOptions string // X-Permitted-Cross-Domain-Policies // Optional. Default value \"none\". XPermittedCrossDomain string }","s":"Config","u":"/next/api/middleware/helmet","h":"#config","p":329},{"i":338,"t":"var ConfigDefault = Config{ XSSProtection: \"0\", ContentTypeNosniff: \"nosniff\", XFrameOptions: \"SAMEORIGIN\", ReferrerPolicy: \"no-referrer\", CrossOriginEmbedderPolicy: \"require-corp\", CrossOriginOpenerPolicy: \"same-origin\", CrossOriginResourcePolicy: \"same-origin\", OriginAgentCluster: \"?1\", XDNSPrefetchControl: \"off\", XDownloadOptions: \"noopen\", XPermittedCrossDomain: \"none\", }","s":"Default Config","u":"/next/api/middleware/helmet","h":"#default-config","p":329},{"i":340,"t":"Key auth middleware provides a key based authentication.","s":"Keyauth","u":"/next/api/middleware/keyauth","h":"","p":339},{"i":342,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/keyauth","h":"#signatures","p":339},{"i":344,"t":"package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" ) var ( apiKey = \"correct horse battery staple\" ) func validateAPIKey(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey } func main() { app := fiber.New() // note that the keyauth middleware needs to be defined before the routes are defined! app.Use(keyauth.New(keyauth.Config{ KeyLookup: \"cookie:access_token\", Validator: validateAPIKey, })) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Listen(\":3000\") } Test: # No api-key specified -> 400 missing curl http://localhost:3000 #> missing or malformed API Key curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000 #> Successfully authenticated! curl --cookie \"access_token=Clearly A Wrong Key\" http://localhost:3000 #> missing or malformed API Key For a more detailed example, see also the github.com/gofiber/recipes repository and specifically the fiber-envoy-extauthz repository and the keyauth example code.","s":"Examples","u":"/next/api/middleware/keyauth","h":"#examples","p":339},{"i":346,"t":"If you want to authenticate only certain endpoints, you can use the Config of keyauth and apply a filter function (eg. authFilter) like so package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" \"regexp\" \"strings\" ) var ( apiKey = \"correct horse battery staple\" protectedURLs = []*regexp.Regexp{ regexp.MustCompile(\"^/authenticated$\"), regexp.MustCompile(\"^/auth2$\"), } ) func validateAPIKey(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey } func authFilter(c *fiber.Ctx) bool { originalURL := strings.ToLower(c.OriginalURL()) for _, pattern := range protectedURLs { if pattern.MatchString(originalURL) { return false } } return true } func main() { app := fiber.New() app.Use(keyauth.New(keyauth.Config{ Next: authFilter, KeyLookup: \"cookie:access_token\", Validator: validateAPIKey, })) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome\") }) app.Get(\"/authenticated\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Get(\"/auth2\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated 2!\") }) app.Listen(\":3000\") } Which results in this # / does not need to be authenticated curl http://localhost:3000 #> Welcome # /authenticated needs to be authenticated curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000/authenticated #> Successfully authenticated! # /auth2 needs to be authenticated too curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000/auth2 #> Successfully authenticated 2!","s":"Authenticate only certain endpoints","u":"/next/api/middleware/keyauth","h":"#authenticate-only-certain-endpoints","p":339},{"i":348,"t":"package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" ) const ( apiKey = \"my-super-secret-key\" ) func main() { app := fiber.New() authMiddleware := keyauth.New(keyauth.Config{ Validator: func(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey }, }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome\") }) app.Get(\"/allowed\", authMiddleware, func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Listen(\":3000\") } Which results in this # / does not need to be authenticated curl http://localhost:3000 #> Welcome # /allowed needs to be authenticated too curl --header \"Authorization: Bearer my-super-secret-key\" http://localhost:3000/allowed #> Successfully authenticated!","s":"Specifying middleware in the handler","u":"/next/api/middleware/keyauth","h":"#specifying-middleware-in-the-handler","p":339},{"i":350,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // SuccessHandler defines a function which is executed for a valid key. // Optional. Default: nil SuccessHandler fiber.Handler // ErrorHandler defines a function which is executed for an invalid key. // It may be used to define a custom error. // Optional. Default: 401 Invalid or expired key ErrorHandler fiber.ErrorHandler // KeyLookup is a string in the form of \":\" that is used // to extract key from the request. // Optional. Default value \"header:Authorization\". // Possible values: // - \"header:\" // - \"query:\" // - \"form:\" // - \"param:\" // - \"cookie:\" KeyLookup string // AuthScheme to be used in the Authorization header. // Optional. Default value \"Bearer\". AuthScheme string // Validator is a function to validate key. Validator func(*fiber.Ctx, string) (bool, error) // Context key to store the bearertoken from the token into context. // Optional. Default: \"token\". ContextKey string }","s":"Config","u":"/next/api/middleware/keyauth","h":"#config","p":339},{"i":352,"t":"var ConfigDefault = Config{ SuccessHandler: func(c *fiber.Ctx) error { return c.Next() }, ErrorHandler: func(c *fiber.Ctx, err error) error { if err == ErrMissingOrMalformedAPIKey { return c.Status(fiber.StatusUnauthorized).SendString(err.Error()) } return c.Status(fiber.StatusUnauthorized).SendString(\"Invalid or expired API Key\") }, KeyLookup: \"header:\" + fiber.HeaderAuthorization, AuthScheme: \"Bearer\", ContextKey: \"token\", }","s":"Default Config","u":"/next/api/middleware/keyauth","h":"#default-config","p":339},{"i":354,"t":"Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases. note This module does not share state with other processes/servers by default.","s":"Limiter","u":"/next/api/middleware/limiter","h":"","p":353},{"i":356,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/limiter","h":"#signatures","p":353},{"i":358,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/limiter\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(limiter.New()) // Or extend your config for customization app.Use(limiter.New(limiter.Config{ Next: func(c *fiber.Ctx) bool { return c.IP() == \"127.0.0.1\" }, Max: 20, Expiration: 30 * time.Second, KeyGenerator: func(c *fiber.Ctx) string { return c.Get(\"x-forwarded-for\") }, LimitReached: func(c *fiber.Ctx) error { return c.SendFile(\"./toofast.html\") }, Storage: myCustomStorage{}, }))","s":"Examples","u":"/next/api/middleware/limiter","h":"#examples","p":353},{"i":360,"t":"Instead of using the standard fixed window algorithm, you can enable the sliding window algorithm. A example of such configuration is: app.Use(limiter.New(limiter.Config{ Max: 20, Expiration: 30 * time.Second, LimiterMiddleware: limiter.SlidingWindow{}, })) This means that every window will take into account the previous window(if there was any). The given formula for the rate is: weightOfPreviousWindpw = previous window's amount request * (whenNewWindow / Expiration) rate = weightOfPreviousWindpw + current window's amount request.","s":"Sliding window","u":"/next/api/middleware/limiter","h":"#sliding-window","p":353},{"i":362,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Max number of recent connections during `Duration` seconds before sending a 429 response // // Default: 5 Max int // KeyGenerator allows you to generate custom keys, by default c.IP() is used // // Default: func(c *fiber.Ctx) string { // return c.IP() // } KeyGenerator func(*fiber.Ctx) string // Expiration is the time on how long to keep records of requests in memory // // Default: 1 * time.Minute Expiration time.Duration // LimitReached is called when a request hits the limit // // Default: func(c *fiber.Ctx) error { // return c.SendStatus(fiber.StatusTooManyRequests) // } LimitReached fiber.Handler // When set to true, requests with StatusCode >= 400 won't be counted. // // Default: false SkipFailedRequests bool // When set to true, requests with StatusCode < 400 won't be counted. // // Default: false SkipSuccessfulRequests bool // Store is used to store the state of the middleware // // Default: an in memory store for this process only Storage fiber.Storage // LimiterMiddleware is the struct that implements limiter middleware. // // Default: a new Fixed Window Rate Limiter LimiterMiddleware LimiterHandler } note A custom store can be used if it implements the Storage interface - more details and an example can be found in store.go.","s":"Config","u":"/next/api/middleware/limiter","h":"#config","p":353},{"i":364,"t":"var ConfigDefault = Config{ Max: 5, Expiration: 1 * time.Minute, KeyGenerator: func(c *fiber.Ctx) string { return c.IP() }, LimitReached: func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusTooManyRequests) }, SkipFailedRequests: false, SkipSuccessfulRequests: false, LimiterMiddleware: FixedWindow{}, }","s":"Default Config","u":"/next/api/middleware/limiter","h":"#default-config","p":353},{"i":366,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 app.Use(limiter.New(limiter.Config{ Storage: storage, }))","s":"Custom Storage/Database","u":"/next/api/middleware/limiter","h":"#custom-storagedatabase","p":353},{"i":368,"t":"Pprof middleware for Fiber that serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.","s":"Pprof","u":"/next/api/middleware/pprof","h":"","p":367},{"i":370,"t":"func New() fiber.Handler","s":"Signatures","u":"/next/api/middleware/pprof","h":"#signatures","p":367},{"i":372,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/pprof\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(pprof.New()) // Or extend your config for customization // For example, in systems where you have multiple ingress endpoints, it is common to add a URL prefix, like so: app.Use(pprof.New(pprof.Config{Prefix: \"/endpoint-prefix\"})) // This prefix will be added to the default path of \"/debug/pprof/\", for a resulting URL of: \"/endpoint-prefix/debug/pprof/\".","s":"Examples","u":"/next/api/middleware/pprof","h":"#examples","p":367},{"i":374,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Prefix defines a URL prefix added before \"/debug/pprof\". // Note that it should start with (but not end with) a slash. // Example: \"/federated-fiber\" // // Optional. Default: \"\" Prefix string }","s":"Config","u":"/next/api/middleware/pprof","h":"#config","p":367},{"i":376,"t":"var ConfigDefault = Config{ Next: nil, }","s":"Default Config","u":"/next/api/middleware/pprof","h":"#default-config","p":367},{"i":378,"t":"Logger middleware for Fiber that logs HTTP request/response details.","s":"Logger","u":"/next/api/middleware/logger","h":"","p":377},{"i":380,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/logger","h":"#signatures","p":377},{"i":382,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/logger\" ) tip The order of registration plays a role. Only all routes that are registered after this one will be logged. The middleware should therefore be one of the first to be registered. After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(logger.New()) // Or extend your config for customization // Logging remote IP and Port app.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) // Logging Request ID app.Use(requestid.New()) app.Use(logger.New(logger.Config{ // For more options, see the Config section Format: \"${pid} ${locals:requestid} ${status} - ${method} ${path}​\\n\", })) // Changing TimeZone & TimeFormat app.Use(logger.New(logger.Config{ Format: \"${pid} ${status} - ${method} ${path}\\n\", TimeFormat: \"02-Jan-2006\", TimeZone: \"America/New_York\", })) // Custom File Writer file, err := os.OpenFile(\"./123.log\", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) if err != nil { log.Fatalf(\"error opening file: %v\", err) } defer file.Close() app.Use(logger.New(logger.Config{ Output: file, })) // Add Custom Tags app.Use(logger.New(logger.Config{ CustomTags: map[string]logger.LogFunc{ \"custom_tag\": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) { return output.WriteString(\"it is a custom tag\") }, }, })) // Callback after log is written app.Use(logger.New(logger.Config{ TimeFormat: time.RFC3339Nano, TimeZone: \"Asia/Shanghai\", Done: func(c *fiber.Ctx, logString []byte) { if c.Response().StatusCode() != fiber.StatusOK { reporter.SendToSlack(logString) } }, })) // Disable colors when outputting to default format app.Use(logger.New(logger.Config{ DisableColors: true, }))","s":"Examples","u":"/next/api/middleware/logger","h":"#examples","p":377},{"i":384,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Done is a function that is called after the log string for a request is written to Output, // and pass the log string as parameter. // // Optional. Default: nil Done func(c *fiber.Ctx, logString []byte) // tagFunctions defines the custom tag action // // Optional. Default: map[string]LogFunc CustomTags map[string]LogFunc // Format defines the logging tags // // Optional. Default: [${time}] ${status} - ${latency} ${method} ${path}\\n Format string // TimeFormat https://programming.guide/go/format-parse-string-time-date-example.html // // Optional. Default: 15:04:05 TimeFormat string // TimeZone can be specified, such as \"UTC\" and \"America/New_York\" and \"Asia/Chongqing\", etc // // Optional. Default: \"Local\" TimeZone string // TimeInterval is the delay before the timestamp is updated // // Optional. Default: 500 * time.Millisecond TimeInterval time.Duration // Output is a writer where logs are written // // Default: os.Stdout Output io.Writer // DisableColors defines if the logs output should be colorized // // Default: false DisableColors bool enableColors bool enableLatency bool timeZoneLocation *time.Location } type LogFunc func(buf logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error)","s":"Config","u":"/next/api/middleware/logger","h":"#config","p":377},{"i":386,"t":"var ConfigDefault = Config{ Next: nil, Done: nil, Format: \"[${time}] ${status} - ${latency} ${method} ${path}\\n\", TimeFormat: \"15:04:05\", TimeZone: \"Local\", TimeInterval: 500 * time.Millisecond, Output: os.Stdout, DisableColors: false, }","s":"Default Config","u":"/next/api/middleware/logger","h":"#default-config","p":377},{"i":388,"t":"// Logger variables const ( TagPid = \"pid\" TagTime = \"time\" TagReferer = \"referer\" TagProtocol = \"protocol\" TagPort = \"port\" TagIP = \"ip\" TagIPs = \"ips\" TagHost = \"host\" TagMethod = \"method\" TagPath = \"path\" TagURL = \"url\" TagUA = \"ua\" TagLatency = \"latency\" TagStatus = \"status\" // response status TagResBody = \"resBody\" // response body TagReqHeaders = \"reqHeaders\" TagQueryStringParams = \"queryParams\" // request query parameters TagBody = \"body\" // request body TagBytesSent = \"bytesSent\" TagBytesReceived = \"bytesReceived\" TagRoute = \"route\" TagError = \"error\" // DEPRECATED: Use TagReqHeader instead TagHeader = \"header:\" // request header TagReqHeader = \"reqHeader:\" // request header TagRespHeader = \"respHeader:\" // response header TagQuery = \"query:\" // request query TagForm = \"form:\" // request form TagCookie = \"cookie:\" // request cookie TagLocals = \"locals:\" // colors TagBlack = \"black\" TagRed = \"red\" TagGreen = \"green\" TagYellow = \"yellow\" TagBlue = \"blue\" TagMagenta = \"magenta\" TagCyan = \"cyan\" TagWhite = \"white\" TagReset = \"reset\" )","s":"Constants","u":"/next/api/middleware/logger","h":"#constants","p":377},{"i":390,"t":"Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.","s":"Recover","u":"/next/api/middleware/recover","h":"","p":389},{"i":392,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/recover","h":"#signatures","p":389},{"i":394,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/recover\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(recover.New()) // This panic will be caught by the middleware app.Get(\"/\", func(c *fiber.Ctx) error { panic(\"I'm an error\") })","s":"Examples","u":"/next/api/middleware/recover","h":"#examples","p":389},{"i":396,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // EnableStackTrace enables handling stack trace // // Optional. Default: false EnableStackTrace bool // StackTraceHandler defines a function to handle stack trace // // Optional. Default: defaultStackTraceHandler StackTraceHandler func(c *fiber.Ctx, e interface{}) }","s":"Config","u":"/next/api/middleware/recover","h":"#config","p":389},{"i":398,"t":"var ConfigDefault = Config{ Next: nil, EnableStackTrace: false, StackTraceHandler: defaultStackTraceHandler, }","s":"Default Config","u":"/next/api/middleware/recover","h":"#default-config","p":389},{"i":400,"t":"Proxy middleware for Fiber that allows you to proxy requests to multiple servers.","s":"Proxy","u":"/next/api/middleware/proxy","h":"","p":399},{"i":402,"t":"// Balancer create a load balancer among multiple upstrem servers. func Balancer(config Config) fiber.Handler // Forward performs the given http request and fills the given http response. func Forward(addr string, clients ...*fasthttp.Client) fiber.Handler // Do performs the given http request and fills the given http response. func Do(c *fiber.Ctx, addr string, clients ...*fasthttp.Client) error // DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects. func DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error // DoDeadline performs the given request and waits for response until the given deadline. func DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error // DoTimeout performs the given request and waits for response during the given timeout duration. func DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error // DomainForward the given http request based on the given domain and fills the given http response func DomainForward(hostname string, addr string, clients ...*fasthttp.Client) fiber.Handler // BalancerForward performs the given http request based round robin balancer and fills the given http response func BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler","s":"Signatures","u":"/next/api/middleware/proxy","h":"#signatures","p":399},{"i":404,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/proxy\" ) After you initiate your Fiber app, you can use the following possibilities: // if target https site uses a self-signed certificate, you should // call WithTlsConfig before Do and Forward proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true, }) // if you need to use global self-custom client, you should use proxy.WithClient. proxy.WithClient(&fasthttp.Client{ NoDefaultUserAgentHeader: true, DisablePathNormalizing: true, }) // Forward to url app.Get(\"/gif\", proxy.Forward(\"https://i.imgur.com/IWaBepg.gif\")) // If you want to forward with a specific domain. You have to use proxy.DomainForward. app.Get(\"/payments\", proxy.DomainForward(\"docs.gofiber.io\", \"http://localhost:8000\")) // Forward to url with local custom client app.Get(\"/gif\", proxy.Forward(\"https://i.imgur.com/IWaBepg.gif\", &fasthttp.Client{ NoDefaultUserAgentHeader: true, DisablePathNormalizing: true, })) // Make request within handler app.Get(\"/:id\", func(c *fiber.Ctx) error { url := \"https://i.imgur.com/\"+c.Params(\"id\")+\".gif\" if err := proxy.Do(c, url); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests while following redirects app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoRedirects(c, \"http://google.com\", 3); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests and wait up to 5 seconds before timing out app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoTimeout(c, \"http://localhost:3000\", time.Second * 5); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests, timeout a minute from now app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoDeadline(c, \"http://localhost\", time.Now().Add(time.Minute)); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Minimal round robin balancer app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }, })) // Or extend your balancer for customization app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }, ModifyRequest: func(c *fiber.Ctx) error { c.Request().Header.Add(\"X-Real-IP\", c.IP()) return nil }, ModifyResponse: func(c *fiber.Ctx) error { c.Response().Header.Del(fiber.HeaderServer) return nil }, })) // Or this way if the balancer is using https and the destination server is only using http. app.Use(proxy.BalancerForward([]string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }))","s":"Examples","u":"/next/api/middleware/proxy","h":"#examples","p":399},{"i":406,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Servers defines a list of :// HTTP servers, // // which are used in a round-robin manner. // i.e.: \"https://foobar.com, http://www.foobar.com\" // // Required Servers []string // ModifyRequest allows you to alter the request // // Optional. Default: nil ModifyRequest fiber.Handler // ModifyResponse allows you to alter the response // // Optional. Default: nil ModifyResponse fiber.Handler // Timeout is the request timeout used when calling the proxy client // // Optional. Default: 1 second Timeout time.Duration // Per-connection buffer size for requests' reading. // This also limits the maximum header size. // Increase this buffer if your clients send multi-KB RequestURIs // and/or multi-KB headers (for example, BIG cookies). ReadBufferSize int // Per-connection buffer size for responses' writing. WriteBufferSize int // tls config for the http client. TlsConfig *tls.Config // Client is custom client when client config is complex. // Note that Servers, Timeout, WriteBufferSize, ReadBufferSize and TlsConfig // will not be used if the client are set. Client *fasthttp.LBClient }","s":"Config","u":"/next/api/middleware/proxy","h":"#config","p":399},{"i":408,"t":"var ConfigDefault = Config{ Next: nil, ModifyRequest: nil, ModifyResponse: nil, Timeout: fasthttp.DefaultLBClientTimeout, }","s":"Default Config","u":"/next/api/middleware/proxy","h":"#default-config","p":399},{"i":410,"t":"Redirection middleware for Fiber.","s":"Redirect","u":"/next/api/middleware/redirect","h":"","p":409},{"i":412,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/redirect","h":"#signatures","p":409},{"i":414,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/redirect\" ) func main() { app := fiber.New() app.Use(redirect.New(redirect.Config{ Rules: map[string]string{ \"/old\": \"/new\", \"/old/*\": \"/new/$1\", }, StatusCode: 301, })) app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Get(\"/new/*\", func(c *fiber.Ctx) error { return c.SendString(\"Wildcard: \" + c.Params(\"*\")) }) app.Listen(\":3000\") } Test: curl http://localhost:3000/old curl http://localhost:3000/old/hello","s":"Examples","u":"/next/api/middleware/redirect","h":"#examples","p":409},{"i":416,"t":"// Config defines the config for middleware. type Config struct { // Filter defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // Rules defines the URL path rewrite rules. The values captured in asterisk can be // retrieved by index e.g. $1, $2 and so on. // Required. Example: // \"/old\": \"/new\", // \"/api/*\": \"/$1\", // \"/js/*\": \"/public/javascripts/$1\", // \"/users/*/orders/*\": \"/user/$1/order/$2\", Rules map[string]string // The status code when redirecting // This is ignored if Redirect is disabled // Optional. Default: 302 (fiber.StatusFound) StatusCode int rulesRegex map[*regexp.Regexp]string }","s":"Config","u":"/next/api/middleware/redirect","h":"#config","p":409},{"i":418,"t":"var ConfigDefault = Config{ StatusCode: fiber.StatusFound, }","s":"Default Config","u":"/next/api/middleware/redirect","h":"#default-config","p":409},{"i":420,"t":"RequestID middleware for Fiber that adds an indentifier to the response.","s":"RequestID","u":"/next/api/middleware/requestid","h":"","p":419},{"i":422,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/requestid","h":"#signatures","p":419},{"i":424,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/requestid\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(requestid.New()) // Or extend your config for customization app.Use(requestid.New(requestid.Config{ Header: \"X-Custom-Header\", Generator: func() string { return \"static-id\" }, }))","s":"Examples","u":"/next/api/middleware/requestid","h":"#examples","p":419},{"i":426,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Header is the header key where to get/set the unique request ID // // Optional. Default: \"X-Request-ID\" Header string // Generator defines a function to generate the unique identifier. // // Optional. Default: utils.UUID Generator func() string // ContextKey defines the key used when storing the request ID in // the locals for a specific request. // // Optional. Default: requestid ContextKey interface{} }","s":"Config","u":"/next/api/middleware/requestid","h":"#config","p":419},{"i":428,"t":"The default config uses a fast UUID generator which will expose the number of requests made to the server. To conceal this value for better privacy, use the utils.UUIDv4 generator. var ConfigDefault = Config{ Next: nil, Header: fiber.HeaderXRequestID, Generator: utils.UUID, ContextKey: \"requestid\", }","s":"Default Config","u":"/next/api/middleware/requestid","h":"#default-config","p":419},{"i":430,"t":"Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.","s":"Rewrite","u":"/next/api/middleware/rewrite","h":"","p":429},{"i":432,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/next/api/middleware/rewrite","h":"#signatures","p":429},{"i":434,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/rewrite\" ) func main() { app := fiber.New() app.Use(rewrite.New(rewrite.Config{ Rules: map[string]string{ \"/old\": \"/new\", \"/old/*\": \"/new/$1\", }, })) app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Get(\"/new/*\", func(c *fiber.Ctx) error { return c.SendString(\"Wildcard: \" + c.Params(\"*\")) }) app.Listen(\":3000\") } Test: curl http://localhost:3000/old curl http://localhost:3000/old/hello","s":"Examples","u":"/next/api/middleware/rewrite","h":"#examples","p":429},{"i":436,"t":"Skip middleware for Fiber that skips a wrapped handler if a predicate is true.","s":"Skip","u":"/next/api/middleware/skip","h":"","p":435},{"i":438,"t":"func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler","s":"Signatures","u":"/next/api/middleware/skip","h":"#signatures","p":435},{"i":440,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/skip\" ) After you initiate your Fiber app, you can use the following possibilities: func main() { app := fiber.New() app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool { return ctx.Method() == fiber.MethodGet })) app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendString(\"It was a GET request!\") }) log.Fatal(app.Listen(\":3000\")) } func BasicHandler(ctx *fiber.Ctx) error { return ctx.SendString(\"It was not a GET request!\") } tip app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.","s":"Examples","u":"/next/api/middleware/skip","h":"#examples","p":435},{"i":442,"t":"Session middleware for Fiber. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.","s":"Session","u":"/next/api/middleware/session","h":"","p":441},{"i":444,"t":"func New(config ...Config) *Store func (s *Store) RegisterType(i interface{}) func (s *Store) Get(c *fiber.Ctx) (*Session, error) func (s *Store) Reset() error func (s *Session) Get(key string) interface{} func (s *Session) Set(key string, val interface{}) func (s *Session) Delete(key string) func (s *Session) Destroy() error func (s *Session) Regenerate() error func (s *Session) Save() error func (s *Session) Fresh() bool func (s *Session) ID() string func (s *Session) Keys() []string caution Storing interface{} values are limited to built-ins Go types.","s":"Signatures","u":"/next/api/middleware/session","h":"#signatures","p":441},{"i":446,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/session\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config // This stores all of your app's sessions store := session.New() app.Get(\"/\", func(c *fiber.Ctx) error { // Get session from storage sess, err := store.Get(c) if err != nil { panic(err) } // Get value name := sess.Get(\"name\") // Set key/value sess.Set(\"name\", \"john\") // Get all Keys keys := sess.Keys() // Delete key sess.Delete(\"name\") // Destroy session if err := sess.Destroy(); err != nil { panic(err) } // Sets a specific expiration for this session sess.SetExpiry(time.Second * 2) // Save session if err := sess.Save(); err != nil { panic(err) } return c.SendString(fmt.Sprintf(\"Welcome %v\", name)) })","s":"Examples","u":"/next/api/middleware/session","h":"#examples","p":441},{"i":448,"t":"// Config defines the config for middleware. type Config struct { // Allowed session duration // Optional. Default value 24 * time.Hour Expiration time.Duration // Storage interface to store the session data // Optional. Default value memory.New() Storage fiber.Storage // KeyLookup is a string in the form of \":\" that is used // to extract session id from the request. // Possible values: \"header:\", \"query:\" or \"cookie:\" // Optional. Default value \"cookie:session_id\". KeyLookup string // Domain of the CSRF cookie. // Optional. Default value \"\". CookieDomain string // Path of the CSRF cookie. // Optional. Default value \"\". CookiePath string // Indicates if CSRF cookie is secure. // Optional. Default value false. CookieSecure bool // Indicates if CSRF cookie is HTTP only. // Optional. Default value false. CookieHTTPOnly bool // Value of SameSite cookie. // Optional. Default value \"Lax\". CookieSameSite string // Decides whether cookie should last for only the browser sesison. // Ignores Expiration if set to true // Optional. Default value false. CookieSessionOnly bool // KeyGenerator generates the session key. // Optional. Default value utils.UUIDv4 KeyGenerator func() string // Deprecated: Please use KeyLookup CookieName string // Source defines where to obtain the session id source Source // The session name sessionName string }","s":"Config","u":"/next/api/middleware/session","h":"#config","p":441},{"i":450,"t":"var ConfigDefault = Config{ Expiration: 24 * time.Hour, KeyLookup: \"cookie:session_id\", KeyGenerator: utils.UUIDv4, source: \"cookie\", sessionName: \"session_id\", }","s":"Default Config","u":"/next/api/middleware/session","h":"#default-config","p":441},{"i":452,"t":"const ( SourceCookie Source = \"cookie\" SourceHeader Source = \"header\" SourceURLQuery Source = \"query\" )","s":"Constants","u":"/next/api/middleware/session","h":"#constants","p":441},{"i":454,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 store := session.New(session.Config{ Storage: storage, }) To use the store, see the Examples.","s":"Custom Storage/Database","u":"/next/api/middleware/session","h":"#custom-storagedatabase","p":441},{"i":456,"t":"Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor caution Monitor is still in beta, API might change in the future!","s":"Monitor","u":"/next/api/middleware/monitor","h":"","p":455},{"i":458,"t":"func New() fiber.Handler","s":"Signatures","u":"/next/api/middleware/monitor","h":"#signatures","p":455},{"i":460,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/monitor\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config (Assign the middleware to /metrics) app.Get(\"/metrics\", monitor.New()) // Or extend your config for customization // Assign the middleware to /metrics // and change the Title to `MyService Metrics Page` app.Get(\"/metrics\", monitor.New(monitor.Config{Title: \"MyService Metrics Page\"})) You can also access the API endpoint with curl -X GET -H \"Accept: application/json\" http://localhost:3000/metrics which returns: {\"pid\":{ \"cpu\":0.4568381746582226, \"ram\":20516864, \"conns\":3 }, \"os\": { \"cpu\":8.759124087593099, \"ram\":3997155328, \"conns\":44, \"total_ram\":8245489664, \"load_avg\":0.51 }}","s":"Examples","u":"/next/api/middleware/monitor","h":"#examples","p":455},{"i":462,"t":"// Config defines the config for middleware. type Config struct { // Metrics page title // // Optional. Default: \"Fiber Monitor\" Title string // Refresh period // // Optional. Default: 3 seconds Refresh time.Duration // Whether the service should expose only the monitoring API. // // Optional. Default: false APIOnly bool // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Custom HTML Code to Head Section(Before End) // // Optional. Default: empty CustomHead string // FontURL for specify font resource path or URL . also you can use relative path // // Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap FontURL string // ChartJsURL for specify ChartJS library path or URL . also you can use relative path // // Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js ChartJsURL string index string }","s":"Config","u":"/next/api/middleware/monitor","h":"#config","p":455},{"i":464,"t":"var ConfigDefault = Config{ Title: defaultTitle, Refresh: defaultRefresh, FontURL: defaultFontURL, ChartJsURL: defaultChartJSURL, CustomHead: defaultCustomHead, APIOnly: false, Next: nil, index: newIndex(viewBag{ defaultTitle, defaultRefresh, defaultFontURL, defaultChartJSURL, defaultCustomHead, }), }","s":"Default Config","u":"/next/api/middleware/monitor","h":"#default-config","p":455},{"i":467,"t":"TechEmpower provides a performance comparison of many web application frameworks executing fundamental tasks such as JSON serialization, database access, and server-side template composition. Each framework is operating in a realistic production configuration. Results are captured on cloud instances and on physical hardware. The test implementations are largely community-contributed and all source is available at the GitHub repository. Fiber v1.10.0 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 2.20GHz 32GB RAM Ubuntu 18.04.3 4.15.0-88-generic Dedicated Cisco 10-Gbit Ethernet switch.","s":"TechEmpower","u":"/next/extra/benchmarks","h":"#techempower","p":465},{"i":469,"t":"The Plaintext test is an exercise of the request-routing fundamentals only, designed to demonstrate the capacity of high-performance platforms in particular. Requests will be sent using HTTP pipelining. The response payload is still small, meaning good performance is still necessary in order to saturate the gigabit Ethernet of the test environment. See Plaintext requirements Fiber - 6,162,556 responses per second with an average latency of 2.0 ms. Express - 367,069 responses per second with an average latency of 354.1 ms.","s":"Plaintext","u":"/next/extra/benchmarks","h":"#plaintext","p":465},{"i":471,"t":"Fiber handled 11,846 responses per second with an average latency of 42.8 ms. Express handled 2,066 responses per second with an average latency of 390.44 ms.","s":"Data Updates","u":"/next/extra/benchmarks","h":"#data-updates","p":465},{"i":473,"t":"Fiber handled 19,664 responses per second with an average latency of 25.7 ms. Express handled 4,302 responses per second with an average latency of 117.2 ms.","s":"Multiple Queries","u":"/next/extra/benchmarks","h":"#multiple-queries","p":465},{"i":475,"t":"Fiber handled 368,647 responses per second with an average latency of 0.7 ms. Express handled 57,880 responses per second with an average latency of 4.4 ms.","s":"Single Query","u":"/next/extra/benchmarks","h":"#single-query","p":465},{"i":477,"t":"Fiber handled 1,146,667 responses per second with an average latency of 0.4 ms. Express handled 244,847 responses per second with an average latency of 1.1 ms.","s":"JSON Serialization","u":"/next/extra/benchmarks","h":"#json-serialization","p":465},{"i":479,"t":"🔗 https://github.com/smallnest/go-web-framework-benchmark CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz MEM 4GB GO go1.13.6 linux/amd64 OS Linux The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers. The concurrency clients are 5000. Latency is the time of real processing time by web servers. The smaller is the better. Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better. If we enable http pipelining, test result as below: Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is: If we enable http pipelining, test result as below: Dependency graph for v1.9.0","s":"Go web framework benchmark","u":"/next/extra/benchmarks","h":"#go-web-framework-benchmark","p":465},{"i":481,"t":"There exist two distinct implementations of timeout middleware Fiber. New Wraps a fiber.Handler with a timeout. If the handler takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler. caution This has been deprecated since it raises race conditions. NewWithContext As a fiber.Handler wrapper, it creates a context with context.WithTimeout and pass it in UserContext. If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler. It does not cancel long running executions. Underlying executions must handle timeout by using context.Context parameter.","s":"Timeout","u":"/next/api/middleware/timeout","h":"","p":480},{"i":483,"t":"func New(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler func NewWithContext(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler","s":"Signatures","u":"/next/api/middleware/timeout","h":"#signatures","p":480},{"i":485,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/timeout\" ) After you initiate your Fiber app, you can use the following possibilities: func main() { app := fiber.New() h := func(c *fiber.Ctx) error { sleepTime, _ := time.ParseDuration(c.Params(\"sleepTime\") + \"ms\") if err := sleepWithContext(c.UserContext(), sleepTime); err != nil { return fmt.Errorf(\"%w: execution error\", err) } return nil } app.Get(\"/foo/:sleepTime\", timeout.New(h, 2*time.Second)) log.Fatal(app.Listen(\":3000\")) } func sleepWithContext(ctx context.Context, d time.Duration) error { timer := time.NewTimer(d) select { case <-ctx.Done(): if !timer.Stop() { <-timer.C } return context.DeadlineExceeded case <-timer.C: } return nil } Test http 200 with curl: curl --location -I --request GET 'http://localhost:3000/foo/1000' Test http 408 with curl: curl --location -I --request GET 'http://localhost:3000/foo/3000' Use with custom error: var ErrFooTimeOut = errors.New(\"foo context canceled\") func main() { app := fiber.New() h := func(c *fiber.Ctx) error { sleepTime, _ := time.ParseDuration(c.Params(\"sleepTime\") + \"ms\") if err := sleepWithContextWithCustomError(c.UserContext(), sleepTime); err != nil { return fmt.Errorf(\"%w: execution error\", err) } return nil } app.Get(\"/foo/:sleepTime\", timeout.NewWithContext(h, 2*time.Second, ErrFooTimeOut)) log.Fatal(app.Listen(\":3000\")) } func sleepWithContextWithCustomError(ctx context.Context, d time.Duration) error { timer := time.NewTimer(d) select { case <-ctx.Done(): if !timer.Stop() { <-timer.C } return ErrFooTimeOut case <-timer.C: } return nil } Sample usage with a DB call: func main() { app := fiber.New() db, _ := gorm.Open(postgres.Open(\"postgres://localhost/foodb\"), &gorm.Config{}) handler := func(ctx *fiber.Ctx) error { tran := db.WithContext(ctx.UserContext()).Begin() if tran = tran.Exec(\"SELECT pg_sleep(50)\"); tran.Error != nil { return tran.Error } if tran = tran.Commit(); tran.Error != nil { return tran.Error } return nil } app.Get(\"/foo\", timeout.NewWithContext(handler, 10*time.Second)) log.Fatal(app.Listen(\":3000\")) }","s":"Examples","u":"/next/api/middleware/timeout","h":"#examples","p":480},{"i":488,"t":"There is no definitive answer to this question. The answer depends on the scale of your application and the team that is involved. To be as flexible as possible, Fiber makes no assumptions in terms of structure. Routes and other application-specific logic can live in as many files as you wish, in any directory structure you prefer. View the following examples for inspiration: gofiber/boilerplate thomasvvugt/fiber-boilerplate Youtube - Building a REST API using Gorm and Fiber embedmode/fiberseed","s":"How should I structure my application?","u":"/next/extra/faq","h":"#how-should-i-structure-my-application","p":486},{"i":490,"t":"If you're using v2.32.0 or later, all you need to do is to implement a custom error handler. See below, or see a more detailed explanation at Error Handling. If you're using v2.31.0 or earlier, the error handler will not capture 404 errors. Instead, you need to add a middleware function at the very bottom of the stack (below all other functions) to handle a 404 response: Example app.Use(func(c *fiber.Ctx) error { return c.Status(fiber.StatusNotFound).SendString(\"Sorry can't find that!\") })","s":"How do I handle custom 404 responses?","u":"/next/extra/faq","h":"#how-do-i-handle-custom-404-responses","p":486},{"i":492,"t":"Air is a handy tool that automatically restarts your Go applications whenever the source code changes, making your development process faster and more efficient. To use Air in a Fiber project, follow these steps: Install Air by downloading the appropriate binary for your operating system from the GitHub release page or by building the tool directly from source. Create a configuration file for Air in your project directory. This file can be named, for example, .air.toml or air.conf. Here's a sample configuration file that works with Fiber: # .air.toml root = \".\" tmp_dir = \"tmp\" [build] cmd = \"go build -o ./tmp/main .\" bin = \"./tmp/main\" delay = 1000 # ms exclude_dir = [\"assets\", \"tmp\", \"vendor\"] include_ext = [\"go\", \"tpl\", \"tmpl\", \"html\"] exclude_regex = [\"_test\\\\.go\"] Start your Fiber application using Air by running the following command in the terminal: air As you make changes to your source code, Air will detect them and automatically restart the application. A complete example demonstrating the use of Air with Fiber can be found in the Fiber Recipes repository. This example shows how to configure and use Air in a Fiber project to create an efficient development environment.","s":"How can i use live reload ?","u":"/next/extra/faq","h":"#how-can-i-use-live-reload-","p":486},{"i":494,"t":"To override the default error handler, you can override the default when providing a Config when initiating a new Fiber instance. Example app := fiber.New(fiber.Config{ ErrorHandler: func(c *fiber.Ctx, err error) error { return c.Status(fiber.StatusInternalServerError).SendString(err.Error()) }, }) We have a dedicated page explaining how error handling works in Fiber, see Error Handling.","s":"How do I set up an error handler?","u":"/next/extra/faq","h":"#how-do-i-set-up-an-error-handler","p":486},{"i":496,"t":"Fiber currently supports 9 template engines in our gofiber/template middleware: ace amber django handlebars html jet mustache pug slim To learn more about using Templates in Fiber, see Templates.","s":"Which template engines does Fiber support?","u":"/next/extra/faq","h":"#which-template-engines-does-fiber-support","p":486},{"i":498,"t":"Yes, we have our own Discord server, where we hang out. We have different rooms for every subject. If you have questions or just want to have a chat, feel free to join us via this > invite link <.","s":"Does Fiber have a community chat?","u":"/next/extra/faq","h":"#does-fiber-have-a-community-chat","p":486},{"i":500,"t":"Yes we do, here are some examples: This example works v2 package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/logger\" ) type Host struct { Fiber *fiber.App } func main() { // Hosts hosts := map[string]*Host{} //----- // API //----- api := fiber.New() api.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"api.localhost:3000\"] = &Host{api} api.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"API\") }) //------ // Blog //------ blog := fiber.New() blog.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"blog.localhost:3000\"] = &Host{blog} blog.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Blog\") }) //--------- // Website //--------- site := fiber.New() site.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"localhost:3000\"] = &Host{site} site.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Website\") }) // Server app := fiber.New() app.Use(func(c *fiber.Ctx) error { host := hosts[c.Hostname()] if host == nil { return c.SendStatus(fiber.StatusNotFound) } else { host.Fiber.Handler()(c.Context()) return nil } }) log.Fatal(app.Listen(\":3000\")) } If more information is needed, please refer to this issue #750","s":"Does fiber support sub domain routing ?","u":"/next/extra/faq","h":"#does-fiber-support-sub-domain-routing-","p":486},{"i":503,"t":"It’s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them. Example app.Get(\"/\", func(c *fiber.Ctx) error { // Pass error to Fiber return c.SendFile(\"file-does-not-exist\") }) Fiber does not handle panics by default. To recover from a panic thrown by any handler in the stack, you need to include the Recover middleware below: Example package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/recover\" ) func main() { app := fiber.New() app.Use(recover.New()) app.Get(\"/\", func(c *fiber.Ctx) error { panic(\"This panic is caught by fiber\") }) log.Fatal(app.Listen(\":3000\")) } You could use Fiber's custom error struct to pass an additional status code using fiber.NewError(). It's optional to pass a message; if this is left empty, it will default to the status code message (404 equals Not Found). Example app.Get(\"/\", func(c *fiber.Ctx) error { // 503 Service Unavailable return fiber.ErrServiceUnavailable // 503 On vacation! return fiber.NewError(fiber.StatusServiceUnavailable, \"On vacation!\") })","s":"Catching Errors","u":"/next/guide/error-handling","h":"#catching-errors","p":501},{"i":505,"t":"Fiber provides an error handler by default. For a standard error, the response is sent as 500 Internal Server Error. If the error is of type fiber.Error, the response is sent with the provided status code and message. Example // Default error handler var DefaultErrorHandler = func(c *fiber.Ctx, err error) error { // Status code defaults to 500 code := fiber.StatusInternalServerError // Retrieve the custom status code if it's a *fiber.Error var e *fiber.Error if errors.As(err, &e) { code = e.Code } // Set Content-Type: text/plain; charset=utf-8 c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8) // Return status code with error message return c.Status(code).SendString(err.Error()) }","s":"Default Error Handler","u":"/next/guide/error-handling","h":"#default-error-handler","p":501},{"i":507,"t":"A custom error handler can be set using a Config when initializing a Fiber instance. In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response. The following example shows how to display error pages for different types of errors. Example // Create a new fiber instance with custom config app := fiber.New(fiber.Config{ // Override default error handler ErrorHandler: func(ctx *fiber.Ctx, err error) error { // Status code defaults to 500 code := fiber.StatusInternalServerError // Retrieve the custom status code if it's a *fiber.Error var e *fiber.Error if errors.As(err, &e) { code = e.Code } // Send custom error page err = ctx.Status(code).SendFile(fmt.Sprintf(\"./%d.html\", code)) if err != nil { // In case the SendFile fails return ctx.Status(fiber.StatusInternalServerError).SendString(\"Internal Server Error\") } // Return from handler return nil }, }) // ... Special thanks to the Echo & Express framework for inspiration regarding error handling.","s":"Custom Error Handler","u":"/next/guide/error-handling","h":"#custom-error-handler","p":501},{"i":510,"t":"Since Fiber v2.32.0, we use encoding/json as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of encoding/json, we recommend you to use these libraries: goccy/go-json bytedance/sonic segmentio/encoding mailru/easyjson minio/simdjson-go wI2L/jettison Example package main import \"github.com/gofiber/fiber/v2\" import \"github.com/goccy/go-json\" func main() { app := fiber.New(fiber.Config{ JSONEncoder: json.Marshal, JSONDecoder: json.Unmarshal, }) # ... }","s":"Custom JSON Encoder/Decoder","u":"/next/guide/faster-fiber","h":"#custom-json-encoderdecoder","p":508},{"i":512,"t":"Set custom JSON encoder for client Set custom JSON decoder for client Set custom JSON encoder for application Set custom JSON decoder for application","s":"References","u":"/next/guide/faster-fiber","h":"#references","p":508},{"i":514,"t":"info In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.","s":"🎭 Grouping","u":"/next/guide/grouping","h":"","p":513},{"i":516,"t":"Like Routing, groups can also have paths that belong to a cluster. func main() { app := fiber.New() api := app.Group(\"/api\", middleware) // /api v1 := api.Group(\"/v1\", middleware) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", middleware) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } A Group of paths can have an optional handler. func main() { app := fiber.New() api := app.Group(\"/api\") // /api v1 := api.Group(\"/v1\") // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\") // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } caution Running /api, /v1 or /v2 will result in 404 error, make sure you have the errors set.","s":"Paths","u":"/next/guide/grouping","h":"#paths","p":513},{"i":518,"t":"Group handlers can also be used as a routing path but they must have Next added to them so that the flow can continue. func main() { app := fiber.New() handler := func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusOK) } api := app.Group(\"/api\") // /api v1 := api.Group(\"/v1\", func(c *fiber.Ctx) error { // middleware for /api/v1 c.Set(\"Version\", \"v1\") return c.Next() }) v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user log.Fatal(app.Listen(\":3000\")) }","s":"Group Handlers","u":"/next/guide/grouping","h":"#group-handlers","p":513},{"i":520,"t":"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks: OnRoute OnName OnGroup OnGroupName OnListen OnFork OnShutdown OnMount","s":"🪝 Hooks","u":"/next/guide/hooks","h":"","p":519},{"i":522,"t":"// Handlers define a function to create hooks for Fiber. type OnRouteHandler = func(Route) error type OnNameHandler = OnRouteHandler type OnGroupHandler = func(Group) error type OnGroupNameHandler = OnGroupHandler type OnListenHandler = func(ListenData) error type OnForkHandler = func(int) error type OnShutdownHandler = func() error type OnMountHandler = func(*App) error","s":"Constants","u":"/next/guide/hooks","h":"#constants","p":519},{"i":524,"t":"OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by route parameter. Signature func (app *App) OnRoute(handler ...OnRouteHandler)","s":"OnRoute","u":"/next/guide/hooks","h":"#onroute","p":519},{"i":526,"t":"OnName is a hook to execute user functions on each route naming. Also you can get route properties by route parameter. caution OnName only works with naming routes, not groups. Signature func (app *App) OnName(handler ...OnNameHandler) OnName Example package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" ) func main() { app := fiber.New() app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"index\") app.Hooks().OnName(func(r fiber.Route) error { fmt.Print(\"Name: \" + r.Name + \", \") return nil }) app.Hooks().OnName(func(r fiber.Route) error { fmt.Print(\"Method: \" + r.Method + \"\\n\") return nil }) app.Get(\"/add/user\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"addUser\") app.Delete(\"/destroy/user\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"destroyUser\") app.Listen(\":5000\") } // Results: // Name: addUser, Method: GET // Name: destroyUser, Method: DELETE","s":"OnName","u":"/next/guide/hooks","h":"#onname","p":519},{"i":528,"t":"OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by group parameter. Signature func (app *App) OnGroup(handler ...OnGroupHandler)","s":"OnGroup","u":"/next/guide/hooks","h":"#ongroup","p":519},{"i":530,"t":"OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by group parameter. caution OnGroupName only works with naming groups, not routes. Signature func (app *App) OnGroupName(handler ...OnGroupNameHandler)","s":"OnGroupName","u":"/next/guide/hooks","h":"#ongroupname","p":519},{"i":532,"t":"OnListen is a hook to execute user functions on Listen, ListenTLS, Listener. Signature func (app *App) OnListen(handler ...OnListenHandler) OnListen Example app := fiber.New(fiber.Config{ DisableStartupMessage: true, }) app.Hooks().OnListen(func(listenData fiber.ListenData) error { if fiber.IsChild() { return nil } scheme := \"http\" if data.TLS { scheme = \"https\" } log.Println(scheme + \"://\" + listenData.Host + \":\" + listenData.Port) return nil }) app.Listen(\":5000\")","s":"OnListen","u":"/next/guide/hooks","h":"#onlisten","p":519},{"i":534,"t":"OnFork is a hook to execute user functions on Fork. Signature func (app *App) OnFork(handler ...OnForkHandler)","s":"OnFork","u":"/next/guide/hooks","h":"#onfork","p":519},{"i":536,"t":"OnShutdown is a hook to execute user functions after Shutdown. Signature func (app *App) OnShutdown(handler ...OnShutdownHandler)","s":"OnShutdown","u":"/next/guide/hooks","h":"#onshutdown","p":519},{"i":538,"t":"OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting. Signature func (h *Hooks) OnMount(handler ...OnMountHandler) OnMount Example package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" ) func main() { app := New() app.Get(\"/\", testSimpleHandler).Name(\"x\") subApp := New() subApp.Get(\"/test\", testSimpleHandler) subApp.Hooks().OnMount(func(parent *fiber.App) error { fmt.Print(\"Mount path of parent app: \"+parent.MountPath()) // ... return nil }) app.Mount(\"/sub\", subApp) } // Result: // Mount path of parent app: caution OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.","s":"OnMount","u":"/next/guide/hooks","h":"#onmount","p":519},{"i":541,"t":"Fiber provides a Views interface to provide your own template engine: Views type Views interface { Load() error Render(io.Writer, string, interface{}, ...string) error } Views interface contains a Load and Render method, Load is executed by Fiber on app initialization to load/parse the templates. // Pass engine to Fiber's Views Engine app := fiber.New(fiber.Config{ Views: engine, // Views Layout is the global layout for all template render until override on Render function. ViewsLayout: \"layouts/main\" }) The Render method is linked to the ctx.Render() function that accepts a template name and binding data. It will use global layout if layout is not being defined in Render function. If the Fiber config option PassLocalsToViews is enabled, then all locals set using ctx.Locals(key, value) will be passed to the template. app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"hello\": \"world\", }); })","s":"Template interfaces","u":"/next/guide/templates","h":"#template-interfaces","p":539},{"i":543,"t":"Fiber team maintains templates package that provides wrappers for multiple template engines: ace amber django handlebars html jet mustache pug slim Example views/index.html package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html/v2\" ) func main() { // Initialize standard Go html template engine engine := html.New(\"./views\", \".html\") // If you want other engine, just replace with following // Create a new engine with django // engine := django.New(\"./views\", \".django\") app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index template return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) }

{{.Title}}

","s":"Engines","u":"/next/guide/templates","h":"#engines","p":539},{"i":546,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Handlers","u":"/next/guide/routing","h":"#handlers","p":544},{"i":548,"t":"Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be strings or string patterns. Examples of route paths based on strings // This route path will match requests to the root route, \"/\": app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"root\") }) // This route path will match requests to \"/about\": app.Get(\"/about\", func(c *fiber.Ctx) error { return c.SendString(\"about\") }) // This route path will match requests to \"/random.txt\": app.Get(\"/random.txt\", func(c *fiber.Ctx) error { return c.SendString(\"random.txt\") }) As with the expressJs framework, the order of the route declaration plays a role. When a request is received, the routes are checked in the order in which they are declared. info So please be careful to write routes with variable parameters after the routes that contain fixed parts, so that these variable parts do not match instead and unexpected behavior occurs.","s":"Paths","u":"/next/guide/routing","h":"#paths","p":544},{"i":550,"t":"Route parameters are dynamic elements in the route, which are named or not named segments. This segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the Params function, with the name of the route parameter specified in the path as their respective keys or for unnamed parameters the character(*, +) and the counter of this. The characters :, +, and * are characters that introduce a parameter. Greedy parameters are indicated by wildcard(*) or plus(+) signs. The routing also offers the possibility to use optional parameters, for the named parameters these are marked with a final \"?\", unlike the plus sign which is not optional, you can use the wildcard character for a parameter range which is optional and greedy. Example of define routes with route parameters // Parameters app.Get(\"/user/:name/books/:title\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s\\n\", c.Params(\"name\")) fmt.Fprintf(c, \"%s\\n\", c.Params(\"title\")) return nil }) // Plus - greedy - not optional app.Get(\"/user/+\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"+\")) }) // Optional parameter app.Get(\"/user/:name?\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"name\")) }) // Wildcard - greedy - optional app.Get(\"/user/*\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"*\")) }) // This route path will match requests to \"/v1/some/resource/name:customVerb\", since the parameter character is escaped app.Get(\"/v1/some/resource/name\\\\:customVerb\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, Community\") }) info Since the hyphen (-) and the dot (.) are interpreted literally, they can be used along with route parameters for useful purposes. info All special parameter characters can also be escaped with \"\\\\\" and lose their value, so you can use them in the route if you want, like in the custom methods of the google api design guide. // http://localhost:3000/plantae/prunus.persica app.Get(\"/plantae/:genus.:species\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s.%s\\n\", c.Params(\"genus\"), c.Params(\"species\")) return nil // prunus.persica }) // http://localhost:3000/flights/LAX-SFO app.Get(\"/flights/:from-:to\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s-%s\\n\", c.Params(\"from\"), c.Params(\"to\")) return nil // LAX-SFO }) Our intelligent router recognizes that the introductory parameter characters should be part of the request route in this case and can process them as such. // http://localhost:3000/shop/product/color:blue/size:xs app.Get(\"/shop/product/color::color/size::size\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s:%s\\n\", c.Params(\"color\"), c.Params(\"size\")) return nil // blue:xs }) In addition, several parameters in a row and several unnamed parameter characters in the route, such as the wildcard or plus character, are possible, which greatly expands the possibilities of the router for the user. // GET /@v1 // Params: \"sign\" -> \"@\", \"param\" -> \"v1\" app.Get(\"/:sign:param\", handler) // GET /api-v1 // Params: \"name\" -> \"v1\" app.Get(\"/api-:name\", handler) // GET /customer/v1/cart/proxy // Params: \"*1\" -> \"customer/\", \"*2\" -> \"/cart\" app.Get(\"/*v1*/proxy\", handler) // GET /v1/brand/4/shop/blue/xs // Params: \"*1\" -> \"brand/4\", \"*2\" -> \"blue/xs\" app.Get(\"/v1/*/shop/*\", handler) We have adapted the routing strongly to the express routing, but currently without the possibility of the regular expressions, because they are quite slow. The possibilities can be tested with version 0.1.7 (express 4) in the online Express route tester.","s":"Parameters","u":"/next/guide/routing","h":"#parameters","p":544},{"i":552,"t":"Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values by parameters. The feature was intorduced in v2.37.0 and inspired by .NET Core. caution Constraints aren't validation for parameters. If constraint aren't valid for parameter value, Fiber returns 404 handler. Constraint Example Example matches int :id 123456789, -123456789 bool :active true,false guid :id CD2C1638-1638-72D5-1638-DEADBEEF1638 float :weight 1.234, -1,001.01e8 minLen(value) :username Test (must be at least 4 characters) maxLen(value) :filename MyFile (must be no more than 8 characters len(length) :filename somefile.txt (exactly 12 characters) min(value) :age 19 (Integer value must be at least 18) max(value) :age 91 (Integer value must be no more than 120) range(min,max) :age 91 (Integer value must be at least 18 but no more than 120) alpha :name Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive) datetime :dob 2005-11-01 regex(expression) :date 2022-08-27 (Must match regular expression) Examples Single Constraint Multiple Constraints Regex Constraint app.Get(\"/:test\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/12 // 12 // curl -X GET http://localhost:3000/1 // Cannot GET /1 You can use ; for multiple constraints. app.Get(\"/:test\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/120000 // Cannot GET /120000 // curl -X GET http://localhost:3000/1 // Cannot GET /1 // curl -X GET http://localhost:3000/250 // 250 Fiber precompiles regex query when to register routes. So there're no performance overhead for regex constraint. app.Get(\"/:date\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"date\")) }) // curl -X GET http://localhost:3000/125 // Cannot GET /125 // curl -X GET http://localhost:3000/test // Cannot GET /test // curl -X GET http://localhost:3000/2022-08-27 // 2022-08-27 caution You should use \\\\ before routing-specific characters when to use datetime constraint (*, +, ?, :, /, <, >, ;, (, )), to avoid wrong parsing. Optional Parameter Example You can impose constraints on optional parameters as well. app.Get(\"/:test?\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/42 // 42 // curl -X GET http://localhost:3000/ // // curl -X GET http://localhost:3000/7.0 // Cannot GET /7.0","s":"Constraints","u":"/next/guide/routing","h":"#constraints","p":544},{"i":554,"t":"Functions that are designed to make changes to the request or response are called middleware functions. The Next is a Fiber router function, when called, executes the next function that matches the current route. Example of a middleware function app.Use(func(c *fiber.Ctx) error { // Set a custom header on all responses: c.Set(\"X-Custom-Header\", \"Hello, World\") // Go to next middleware: return c.Next() }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) Use method path is a mount, or prefix path, and limits middleware to only apply to any paths requested that begin with it.","s":"Middleware","u":"/next/guide/routing","h":"#middleware","p":544},{"i":556,"t":"If you have many endpoints, you can organize your routes using Group. func main() { app := fiber.New() api := app.Group(\"/api\", middleware) // /api v1 := api.Group(\"/v1\", middleware) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", middleware) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } More information about this in our Grouping Guide","s":"Grouping","u":"/next/guide/routing","h":"#grouping","p":544},{"i":559,"t":"Fiber can make great use of the validator package to ensure correct validation of data to store. Official validator Github page (Installation, use, examples..). You can find the detailed descriptions of the validations used in the fields contained on the structs below: Detailed docs Validation Example package main import ( \"fmt\" \"log\" \"strings\" \"github.com/go-playground/validator/v10\" \"github.com/gofiber/fiber/v2\" ) type ( User struct { Name string `validate:\"required,min=5,max=20\"` // Required field, min 5 char long max 20 Age int `validate:\"required,teener\"` // Required field, and client needs to implement our 'teener' tag format which we'll see later } ErrorResponse struct { Error bool FailedField string Tag string Value interface{} } XValidator struct { validator *validator.Validate } GlobalErrorHandlerResp struct { Success bool `json:\"success\"` Message string `json:\"message\"` } ) // This is the validator instance // for more information see: https://github.com/go-playground/validator var validate = validator.New() func (v XValidator) Validate(data interface{}) []ErrorResponse { validationErrors := []ErrorResponse{} errs := validate.Struct(data) if errs != nil { for _, err := range errs.(validator.ValidationErrors) { // In this case data object is actually holding the User struct var elem ErrorResponse elem.FailedField = err.Field() // Export struct field name elem.Tag = err.Tag() // Export struct tag elem.Value = err.Value() // Export field value elem.Error = true validationErrors = append(validationErrors, elem) } } return validationErrors } func main() { myValidator := &XValidator{ validator: validate, } app := fiber.New(fiber.Config{ // Global custom error handler ErrorHandler: func(c *fiber.Ctx, err error) error { return c.Status(fiber.StatusBadRequest).JSON(GlobalErrorHandlerResp{ Success: false, Message: err.Error(), }) }, }) // Custom struct validation tag format myValidator.validator.RegisterValidation(\"teener\", func(fl validator.FieldLevel) bool { // User.Age needs to fit our needs, 12-18 years old. return fl.Field().Int() >= 12 && fl.Field().Int() <= 18 }) app.Get(\"/\", func(c *fiber.Ctx) error { user := &User{ Name: c.Query(\"name\"), Age: c.QueryInt(\"age\"), } // Validation if errs := myValidator.Validate(user); len(errs) > 0 && errs[0].Error { errMsgs := make([]string, 0) for _, err := range errs { errMsgs = append(errMsgs, fmt.Sprintf( \"[%s]: '%v' | Needs to implement '%s'\", err.FailedField, err.Value, err.Tag, )) } return &fiber.Error{ Code: fiber.ErrBadRequest.Code, Message: strings.Join(errMsgs, \" and \"), } } // Logic, validated with success return c.SendString(\"Hello, World!\") }) log.Fatal(app.Listen(\":3000\")) } /** OUTPUT [1] Request: GET http://127.0.0.1:3000/ Response: {\"success\":false,\"message\":\"[Name]: '' | Needs to implement 'required' and [Age]: '0' | Needs to implement 'required'\"} [2] Request: GET http://127.0.0.1:3000/?name=efdal&age=9 Response: {\"success\":false,\"message\":\"[Age]: '9' | Needs to implement 'teener'\"} [3] Request: GET http://127.0.0.1:3000/?name=efdal&age= Response: {\"success\":false,\"message\":\"[Age]: '0' | Needs to implement 'required'\"} [4] Request: GET http://127.0.0.1:3000/?name=efdal&age=18 Response: Hello, World! **/","s":"Validator package","u":"/next/guide/validation","h":"#validator-package","p":557},{"i":561,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Route Handlers","u":"/next/partials/routing/route-handlers","h":"","p":560},{"i":564,"t":"Checks, if the specified extensions or content types are acceptable. info Based on the request’s Accept HTTP header. Signature func (c *Ctx) Accepts(offers ...string) string func (c *Ctx) AcceptsCharsets(offers ...string) string func (c *Ctx) AcceptsEncodings(offers ...string) string func (c *Ctx) AcceptsLanguages(offers ...string) string Example // Accept: text/html, application/json; q=0.8, text/plain; q=0.5; charset=\"utf-8\" app.Get(\"/\", func(c *fiber.Ctx) error { c.Accepts(\"html\") // \"html\" c.Accepts(\"text/html\") // \"text/html\" c.Accepts(\"json\", \"text\") // \"json\" c.Accepts(\"application/json\") // \"application/json\" c.Accepts(\"text/plain\", \"application/json\") // \"application/json\", due to quality c.Accepts(\"image/png\") // \"\" c.Accepts(\"png\") // \"\" // ... }) Example 2 // Accept: text/html, text/*, application/json, */*; q=0 app.Get(\"/\", func(c *fiber.Ctx) error { c.Accepts(\"text/plain\", \"application/json\") // \"application/json\", due to specificity c.Accepts(\"application/json\", \"text/html\") // \"text/html\", due to first match c.Accepts(\"image/png\") // \"\", due to */* without q factor 0 is Not Acceptable // ... }) Fiber provides similar functions for the other accept headers. // Accept-Charset: utf-8, iso-8859-1;q=0.2 // Accept-Encoding: gzip, compress;q=0.2 // Accept-Language: en;q=0.8, nl, ru app.Get(\"/\", func(c *fiber.Ctx) error { c.AcceptsCharsets(\"utf-16\", \"iso-8859-1\") // \"iso-8859-1\" c.AcceptsEncodings(\"compress\", \"br\") // \"compress\" c.AcceptsLanguages(\"pt\", \"nl\", \"ru\") // \"nl\" // ... })","s":"Accepts","u":"/next/api/ctx","h":"#accepts","p":562},{"i":566,"t":"Params is used to get all route parameters. Using Params method to get params. Signature func (c *Ctx) AllParams() map[string]string Example // GET http://example.com/user/fenny app.Get(\"/user/:name\", func(c *fiber.Ctx) error { c.AllParams() // \"{\"name\": \"fenny\"}\" // ... }) // GET http://example.com/user/fenny/123 app.Get(\"/user/*\", func(c *fiber.Ctx) error { c.AllParams() // \"{\"*1\": \"fenny/123\"}\" // ... })","s":"AllParams","u":"/next/api/ctx","h":"#allparams","p":562},{"i":568,"t":"Returns the *App reference so you could easily access all application settings. Signature func (c *Ctx) App() *App Example app.Get(\"/stack\", func(c *fiber.Ctx) error { return c.JSON(c.App().Stack()) })","s":"App","u":"/next/api/ctx","h":"#app","p":562},{"i":570,"t":"Appends the specified value to the HTTP response header field. caution If the header is not already set, it creates the header with the specified value. Signature func (c *Ctx) Append(field string, values ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Append(\"Link\", \"http://google.com\", \"http://localhost\") // => Link: http://localhost, http://google.com c.Append(\"Link\", \"Test\") // => Link: http://localhost, http://google.com, Test // ... })","s":"Append","u":"/next/api/ctx","h":"#append","p":562},{"i":572,"t":"Sets the HTTP response Content-Disposition header field to attachment. Signature func (c *Ctx) Attachment(filename ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Attachment() // => Content-Disposition: attachment c.Attachment(\"./upload/images/logo.png\") // => Content-Disposition: attachment; filename=\"logo.png\" // => Content-Type: image/png // ... })","s":"Attachment","u":"/next/api/ctx","h":"#attachment","p":562},{"i":574,"t":"Returns the base URL (protocol + host) as a string. Signature func (c *Ctx) BaseURL() string Example // GET https://example.com/page#chapter-1 app.Get(\"/\", func(c *fiber.Ctx) error { c.BaseURL() // https://example.com // ... })","s":"BaseURL","u":"/next/api/ctx","h":"#baseurl","p":562},{"i":576,"t":"Add vars to default view var map binding to template engine. Variables are read by the Render method and may be overwritten. Signature func (c *Ctx) Bind(vars Map) error Example app.Use(func(c *fiber.Ctx) error { c.Bind(fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"xxx.tmpl\", fiber.Map{}) // Render will use Title variable })","s":"Bind","u":"/next/api/ctx","h":"#bind","p":562},{"i":578,"t":"Returns the raw request body. Signature func (c *Ctx) Body() []byte Example // curl -X POST http://localhost:8080 -d user=john app.Post(\"/\", func(c *fiber.Ctx) error { // Get raw body from POST request: return c.Send(c.Body()) // []byte(\"user=john\") }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Body","u":"/next/api/ctx","h":"#body","p":562},{"i":580,"t":"Binds the request body to a struct. It is important to specify the correct struct tag based on the content type to be parsed. For example, if you want to parse a JSON body with a field called Pass, you would use a struct field of json:\"pass\". content-type struct tag application/x-www-form-urlencoded form multipart/form-data form application/json json application/xml xml text/xml xml Signature func (c *Ctx) BodyParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `json:\"name\" xml:\"name\" form:\"name\"` Pass string `json:\"pass\" xml:\"pass\" form:\"pass\"` } app.Post(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.BodyParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe // ... }) // Run tests with the following curl commands // curl -X POST -H \"Content-Type: application/json\" --data \"{\\\"name\\\":\\\"john\\\",\\\"pass\\\":\\\"doe\\\"}\" localhost:3000 // curl -X POST -H \"Content-Type: application/xml\" --data \"johndoe\" localhost:3000 // curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" --data \"name=john&pass=doe\" localhost:3000 // curl -X POST -F name=john -F pass=doe http://localhost:3000 // curl -X POST \"http://localhost:3000/?name=john&pass=doe\" Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"BodyParser","u":"/next/api/ctx","h":"#bodyparser","p":562},{"i":582,"t":"Expire a client cookie (or all cookies if left empty) Signature func (c *Ctx) ClearCookie(key ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { // Clears all cookies: c.ClearCookie() // Expire specific cookie by name: c.ClearCookie(\"user\") // Expire multiple cookies by names: c.ClearCookie(\"token\", \"session\", \"track_id\", \"version\") // ... }) caution Web browsers and other compliant clients will only clear the cookie if the given options are identical to those when creating the cookie, excluding expires and maxAge. ClearCookie will not set these values for you - a technique similar to the one shown below should be used to ensure your cookie is deleted. Example app.Get(\"/set\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"token\", Value: \"randomvalue\", Expires: time.Now().Add(24 * time.Hour), HTTPOnly: true, SameSite: \"lax\", }) // ... }) app.Get(\"/delete\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"token\", // Set expiry date to the past Expires: time.Now().Add(-(time.Hour * 2)), HTTPOnly: true, SameSite: \"lax\", }) // ... })","s":"ClearCookie","u":"/next/api/ctx","h":"#clearcookie","p":562},{"i":584,"t":"ClientHelloInfo contains information from a ClientHello message in order to guide application logic in the GetCertificate and GetConfigForClient callbacks. You can refer to the ClientHelloInfo struct documentation for more information on the returned struct. Signature func (c *Ctx) ClientHelloInfo() *tls.ClientHelloInfo Example // GET http://example.com/hello app.Get(\"/hello\", func(c *fiber.Ctx) error { chi := c.ClientHelloInfo() // ... })","s":"ClientHelloInfo","u":"/next/api/ctx","h":"#clienthelloinfo","p":562},{"i":586,"t":"Returns *fasthttp.RequestCtx that is compatible with the context.Context interface that requires a deadline, a cancellation signal, and other values across API boundaries. Signature func (c *Ctx) Context() *fasthttp.RequestCtx info Please read the Fasthttp Documentation for more information.","s":"Context","u":"/next/api/ctx","h":"#context","p":562},{"i":588,"t":"Set cookie Signature func (c *Ctx) Cookie(cookie *Cookie) type Cookie struct { Name string `json:\"name\"` Value string `json:\"value\"` Path string `json:\"path\"` Domain string `json:\"domain\"` MaxAge int `json:\"max_age\"` Expires time.Time `json:\"expires\"` Secure bool `json:\"secure\"` HTTPOnly bool `json:\"http_only\"` SameSite string `json:\"same_site\"` SessionOnly bool `json:\"session_only\"` } Example app.Get(\"/\", func(c *fiber.Ctx) error { // Create cookie cookie := new(fiber.Cookie) cookie.Name = \"john\" cookie.Value = \"doe\" cookie.Expires = time.Now().Add(24 * time.Hour) // Set cookie c.Cookie(cookie) // ... })","s":"Cookie","u":"/next/api/ctx","h":"#cookie","p":562},{"i":590,"t":"Get cookie value by key, you could pass an optional default value that will be returned if the cookie key does not exist. Signature func (c *Ctx) Cookies(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { // Get cookie by key: c.Cookies(\"name\") // \"john\" c.Cookies(\"empty\", \"doe\") // \"doe\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Cookies","u":"/next/api/ctx","h":"#cookies","p":562},{"i":592,"t":"Transfers the file from path as an attachment. Typically, browsers will prompt the user to download. By default, the Content-Disposition header filename= parameter is the file path (this typically appears in the browser dialog). Override this default with the filename parameter. Signature func (c *Ctx) Download(file string, filename ...string) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.Download(\"./files/report-12345.pdf\"); // => Download report-12345.pdf return c.Download(\"./files/report-12345.pdf\", \"report.pdf\"); // => Download report.pdf })","s":"Download","u":"/next/api/ctx","h":"#download","p":562},{"i":594,"t":"Performs content-negotiation on the Accept HTTP header. It uses Accepts to select a proper format. info If the header is not specified or there is no proper format, text/plain is used. Signature func (c *Ctx) Format(body interface{}) error Example app.Get(\"/\", func(c *fiber.Ctx) error { // Accept: text/plain c.Format(\"Hello, World!\") // => Hello, World! // Accept: text/html c.Format(\"Hello, World!\") // =>

Hello, World!

// Accept: application/json c.Format(\"Hello, World!\") // => \"Hello, World!\" // .. })","s":"Format","u":"/next/api/ctx","h":"#format","p":562},{"i":596,"t":"MultipartForm files can be retrieved by name, the first file from the given key is returned. Signature func (c *Ctx) FormFile(key string) (*multipart.FileHeader, error) Example app.Post(\"/\", func(c *fiber.Ctx) error { // Get first file from form field \"document\": file, err := c.FormFile(\"document\") // Save file to root directory: return c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)) })","s":"FormFile","u":"/next/api/ctx","h":"#formfile","p":562},{"i":598,"t":"Any form values can be retrieved by name, the first value from the given key is returned. Signature func (c *Ctx) FormValue(key string, defaultValue ...string) string Example app.Post(\"/\", func(c *fiber.Ctx) error { // Get first value from form field \"name\": c.FormValue(\"name\") // => \"john\" or \"\" if not exist // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"FormValue","u":"/next/api/ctx","h":"#formvalue","p":562},{"i":600,"t":"https://expressjs.com/en/4x/api.html#req.fresh Signature func (c *Ctx) Fresh() bool","s":"Fresh","u":"/next/api/ctx","h":"#fresh","p":562},{"i":602,"t":"Returns the HTTP request header specified by the field. tip The match is case-insensitive. Signature func (c *Ctx) Get(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Get(\"Content-Type\") // \"text/plain\" c.Get(\"CoNtEnT-TypE\") // \"text/plain\" c.Get(\"something\", \"john\") // \"john\" // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Get","u":"/next/api/ctx","h":"#get","p":562},{"i":604,"t":"Returns the HTTP request headers. Signature func (c *Ctx) GetReqHeaders() map[string]string","s":"GetReqHeaders","u":"/next/api/ctx","h":"#getreqheaders","p":562},{"i":606,"t":"Returns the HTTP response header specified by the field. tip The match is case-insensitive. Signature func (c *Ctx) GetRespHeader(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.GetRespHeader(\"X-Request-Id\") // \"8d7ad5e3-aaf3-450b-a241-2beb887efd54\" c.GetRespHeader(\"Content-Type\") // \"text/plain\" c.GetRespHeader(\"something\", \"john\") // \"john\" // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"GetRespHeader","u":"/next/api/ctx","h":"#getrespheader","p":562},{"i":608,"t":"Returns the HTTP response headers. Signature func (c *Ctx) GetRespHeaders() map[string]string","s":"GetRespHeaders","u":"/next/api/ctx","h":"#getrespheaders","p":562},{"i":610,"t":"Generates URLs to named routes, with parameters. URLs are relative, for example: \"/user/1831\" Signature func (c *Ctx) GetRouteURL(routeName string, params Map) (string, error) Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Home page\") }).Name(\"home\") app.Get(\"/user/:id\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"id\")) }).Name(\"user.show\") app.Get(\"/test\", func(c *fiber.Ctx) error { location, _ := c.GetRouteURL(\"user.show\", fiber.Map{\"id\": 1}) return c.SendString(location) }) // /test returns \"/user/1\"","s":"GetRouteURL","u":"/next/api/ctx","h":"#getrouteurl","p":562},{"i":612,"t":"Returns the hostname derived from the Host HTTP header. Signature func (c *Ctx) Hostname() string Example // GET http://google.com/search app.Get(\"/\", func(c *fiber.Ctx) error { c.Hostname() // \"google.com\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Hostname","u":"/next/api/ctx","h":"#hostname","p":562},{"i":614,"t":"Returns the remote IP address of the request. Signature func (c *Ctx) IP() string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.IP() // \"127.0.0.1\" // ... }) When registering the proxy request header in the fiber app, the ip address of the header is returned (Fiber configuration) app := fiber.New(fiber.Config{ ProxyHeader: fiber.HeaderXForwardedFor, })","s":"IP","u":"/next/api/ctx","h":"#ip","p":562},{"i":616,"t":"Returns an array of IP addresses specified in the X-Forwarded-For request header. Signature func (c *Ctx) IPs() []string Example // X-Forwarded-For: proxy1, 127.0.0.1, proxy3 app.Get(\"/\", func(c *fiber.Ctx) error { c.IPs() // [\"proxy1\", \"127.0.0.1\", \"proxy3\"] // ... }) caution Improper use of the X-Forwarded-For header can be a security risk. For details, see the Security and privacy concerns section.","s":"IPs","u":"/next/api/ctx","h":"#ips","p":562},{"i":618,"t":"Returns the matching content type, if the incoming request’s Content-Type HTTP header field matches the MIME type specified by the type parameter. info If the request has no body, it returns false. Signature func (c *Ctx) Is(extension string) bool Example // Content-Type: text/html; charset=utf-8 app.Get(\"/\", func(c *fiber.Ctx) error { c.Is(\"html\") // true c.Is(\".html\") // true c.Is(\"json\") // false // ... })","s":"Is","u":"/next/api/ctx","h":"#is","p":562},{"i":620,"t":"Returns true if request came from localhost Signature func (c *Ctx) IsFromLocal() bool { Example app.Get(\"/\", func(c *fiber.Ctx) error { // If request came from localhost, return true else return false c.IsFromLocal() // ... })","s":"IsFromLocal","u":"/next/api/ctx","h":"#isfromlocal","p":562},{"i":622,"t":"Converts any interface or string to JSON using the goccy/go-json package. info JSON also sets the content header to application/json. Signature func (c *Ctx) JSON(data interface{}) error Example type SomeStruct struct { Name string Age uint8 } app.Get(\"/json\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ Name: \"Grame\", Age: 20, } return c.JSON(data) // => Content-Type: application/json // => \"{\"Name\": \"Grame\", \"Age\": 20}\" return c.JSON(fiber.Map{ \"name\": \"Grame\", \"age\": 20, }) // => Content-Type: application/json // => \"{\"name\": \"Grame\", \"age\": 20}\" })","s":"JSON","u":"/next/api/ctx","h":"#json","p":562},{"i":624,"t":"Sends a JSON response with JSONP support. This method is identical to JSON, except that it opts-in to JSONP callback support. By default, the callback name is simply callback. Override this by passing a named string in the method. Signature func (c *Ctx) JSONP(data interface{}, callback ...string) error Example type SomeStruct struct { name string age uint8 } app.Get(\"/\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ name: \"Grame\", age: 20, } return c.JSONP(data) // => callback({\"name\": \"Grame\", \"age\": 20}) return c.JSONP(data, \"customFunc\") // => customFunc({\"name\": \"Grame\", \"age\": 20}) })","s":"JSONP","u":"/next/api/ctx","h":"#jsonp","p":562},{"i":626,"t":"Joins the links followed by the property to populate the response’s Link HTTP header field. Signature func (c *Ctx) Links(link ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Links( \"http://api.example.com/users?page=2\", \"next\", \"http://api.example.com/users?page=5\", \"last\", ) // Link: ; rel=\"next\", // ; rel=\"last\" // ... })","s":"Links","u":"/next/api/ctx","h":"#links","p":562},{"i":628,"t":"A method that stores variables scoped to the request and, therefore, are available only to the routes that match the request. tip This is useful if you want to pass some specific data to the next middleware. Signature func (c *Ctx) Locals(key interface{}, value ...interface{}) interface{} Example app.Use(func(c *fiber.Ctx) error { c.Locals(\"user\", \"admin\") return c.Next() }) app.Get(\"/admin\", func(c *fiber.Ctx) error { if c.Locals(\"user\") == \"admin\" { return c.Status(fiber.StatusOK).SendString(\"Welcome, admin!\") } return c.SendStatus(fiber.StatusForbidden) })","s":"Locals","u":"/next/api/ctx","h":"#locals","p":562},{"i":630,"t":"Sets the response Location HTTP header to the specified path parameter. Signature func (c *Ctx) Location(path string) Example app.Post(\"/\", func(c *fiber.Ctx) error { c.Location(\"http://example.com\") c.Location(\"/foo/bar\") return nil })","s":"Location","u":"/next/api/ctx","h":"#location","p":562},{"i":632,"t":"Returns a string corresponding to the HTTP method of the request: GET, POST, PUT, and so on. Optionally, you could override the method by passing a string. Signature func (c *Ctx) Method(override ...string) string Example app.Post(\"/\", func(c *fiber.Ctx) error { c.Method() // \"POST\" c.Method(\"GET\") c.Method() // GET // ... })","s":"Method","u":"/next/api/ctx","h":"#method","p":562},{"i":634,"t":"To access multipart form entries, you can parse the binary with MultipartForm(). This returns a map[string][]string, so given a key, the value will be a string slice. Signature func (c *Ctx) MultipartForm() (*multipart.Form, error) Example app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form if token := form.Value[\"token\"]; len(token) > 0 { // Get key value: fmt.Println(token[0]) } // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to disk: if err := c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)); err != nil { return err } } } return err })","s":"MultipartForm","u":"/next/api/ctx","h":"#multipartform","p":562},{"i":636,"t":"When Next is called, it executes the next method in the stack that matches the current route. You can pass an error struct within the method that will end the chaining and call the error handler. Signature func (c *Ctx) Next() error Example app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(\"1st route!\") return c.Next() }) app.Get(\"*\", func(c *fiber.Ctx) error { fmt.Println(\"2nd route!\") return c.Next() }) app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(\"3rd route!\") return c.SendString(\"Hello, World!\") })","s":"Next","u":"/next/api/ctx","h":"#next","p":562},{"i":638,"t":"Returns the original request URL. Signature func (c *Ctx) OriginalURL() string Example // GET http://example.com/search?q=something app.Get(\"/\", func(c *fiber.Ctx) error { c.OriginalURL() // \"/search?q=something\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"OriginalURL","u":"/next/api/ctx","h":"#originalurl","p":562},{"i":640,"t":"Method can be used to get the route parameters, you could pass an optional default value that will be returned if the param key does not exist. info Defaults to empty string (\"\"), if the param doesn't exist. Signature func (c *Ctx) Params(key string, defaultValue ...string) string Example // GET http://example.com/user/fenny app.Get(\"/user/:name\", func(c *fiber.Ctx) error { c.Params(\"name\") // \"fenny\" // ... }) // GET http://example.com/user/fenny/123 app.Get(\"/user/*\", func(c *fiber.Ctx) error { c.Params(\"*\") // \"fenny/123\" c.Params(\"*1\") // \"fenny/123\" // ... }) Unnamed route parameters(*, +) can be fetched by the character and the counter in the route. Example // ROUTE: /v1/*/shop/* // GET: /v1/brand/4/shop/blue/xs c.Params(\"*1\") // \"brand/4\" c.Params(\"*2\") // \"blue/xs\" For reasons of downward compatibility, the first parameter segment for the parameter character can also be accessed without the counter. Example app.Get(\"/v1/*/shop/*\", func(c *fiber.Ctx) error { c.Params(\"*\") // outputs the values of the first wildcard segment }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Params","u":"/next/api/ctx","h":"#params","p":562},{"i":642,"t":"Method can be used to get an integer from the route parameters. Please note if that parameter is not in the request, zero will be returned. If the parameter is NOT a number, zero and an error will be returned info Defaults to the integer zero (0), if the param doesn't exist. Signature func (c *Ctx) ParamsInt(key string) (int, error) Example // GET http://example.com/user/123 app.Get(\"/user/:id\", func(c *fiber.Ctx) error { id, err := c.ParamsInt(\"id\") // int 123 and no error // ... }) This method is equivalent of using atoi with ctx.Params","s":"ParamsInt","u":"/next/api/ctx","h":"#paramsint","p":562},{"i":644,"t":"This method is similar to BodyParser, but for path parameters. It is important to use the struct tag \"params\". For example, if you want to parse a path parameter with a field called Pass, you would use a struct field of params:\"pass\" Signature func (c *Ctx) ParamsParser(out interface{}) error Example // GET http://example.com/user/111 app.Get(\"/user/:id\", func(c *fiber.Ctx) error { param := struct {ID uint `params:\"id\"`}{} c.ParamsParser(¶m) // \"{\"id\": 111}\" // ... })","s":"ParamsParser","u":"/next/api/ctx","h":"#paramsparser","p":562},{"i":646,"t":"Contains the path part of the request URL. Optionally, you could override the path by passing a string. For internal redirects, you might want to call RestartRouting instead of Next. Signature func (c *Ctx) Path(override ...string) string Example // GET http://example.com/users?sort=desc app.Get(\"/users\", func(c *fiber.Ctx) error { c.Path() // \"/users\" c.Path(\"/john\") c.Path() // \"/john\" // ... })","s":"Path","u":"/next/api/ctx","h":"#path","p":562},{"i":648,"t":"Contains the request protocol string: http or https for TLS requests. Signature func (c *Ctx) Protocol() string Example // GET http://example.com app.Get(\"/\", func(c *fiber.Ctx) error { c.Protocol() // \"http\" // ... })","s":"Protocol","u":"/next/api/ctx","h":"#protocol","p":562},{"i":650,"t":"Queries is a function that returns an object containing a property for each query string parameter in the route. Signature func (c *Ctx) Queries() map[string]string Example // GET http://example.com/?name=alex&want_pizza=false&id= app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"name\"] // \"alex\" m[\"want_pizza\"] // \"false\" m[\"id\"] // \"\" // ... }) Example // GET http://example.com/?field1=value1&field1=value2&field2=value3 app.Get(\"/\", func (c *fiber.Ctx) error { m := c.Queries() m[\"field1\"] // \"value2\" m[\"field2\"] // value3 }) Example // GET http://example.com/?list_a=1&list_a=2&list_a=3&list_b[]=1&list_b[]=2&list_b[]=3&list_c=1,2,3 app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"list_a\"] // \"3\" m[\"list_b[]\"] // \"3\" m[\"list_c\"] // \"1,2,3\" }) Example // GET /api/posts?filters.author.name=John&filters.category.name=Technology app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"filters.author.name\"] // John m[\"filters.category.name\"] // Technology }) Example // GET /api/posts?tags=apple,orange,banana&filters[tags]=apple,orange,banana&filters[category][name]=fruits&filters.tags=apple,orange,banana&filters.category.name=fruits app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"tags\"] // apple,orange,banana m[\"filters[tags]\"] // apple,orange,banana m[\"filters[category][name]\"] // fruits m[\"filters.tags\"] // apple,orange,banana m[\"filters.category.name\"] // fruits })","s":"Queries","u":"/next/api/ctx","h":"#queries","p":562},{"i":652,"t":"This property is an object containing a property for each query string parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. info If there is no query string, it returns an empty string. Signature func (c *Ctx) Query(key string, defaultValue ...string) string Example // GET http://example.com/?order=desc&brand=nike app.Get(\"/\", func(c *fiber.Ctx) error { c.Query(\"order\") // \"desc\" c.Query(\"brand\") // \"nike\" c.Query(\"empty\", \"nike\") // \"nike\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Query","u":"/next/api/ctx","h":"#query","p":562},{"i":654,"t":"This property is an object containing a property for each query boolean parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, false will be returned. If the parameter is not a boolean, it is still tried to be converted and usually returned as false. Signature func (c *Ctx) QueryBool(key string, defaultValue ...bool) bool Example // GET http://example.com/?name=alex&want_pizza=false&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryBool(\"want_pizza\") // false c.QueryBool(\"want_pizza\", true) // false c.QueryBool(\"name\") // false c.QueryBool(\"name\", true) // true c.QueryBool(\"id\") // false c.QueryBool(\"id\", true) // true // ... })","s":"QueryBool","u":"/next/api/ctx","h":"#querybool","p":562},{"i":656,"t":"This property is an object containing a property for each query float64 parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, zero will be returned. If the parameter is not a number, it is still tried to be converted and usually returned as 1. info Defaults to the float64 zero (0), if the param doesn't exist. Signature func (c *Ctx) QueryFloat(key string, defaultValue ...float64) float64 Example // GET http://example.com/?name=alex&amount=32.23&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryFloat(\"amount\") // 32.23 c.QueryFloat(\"amount\", 3) // 32.23 c.QueryFloat(\"name\", 1) // 1 c.QueryFloat(\"name\") // 0 c.QueryFloat(\"id\", 3) // 3 // ... })","s":"QueryFloat","u":"/next/api/ctx","h":"#queryfloat","p":562},{"i":658,"t":"This property is an object containing a property for each query integer parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, zero will be returned. If the parameter is not a number, it is still tried to be converted and usually returned as 1. info Defaults to the integer zero (0), if the param doesn't exist. Signature func (c *Ctx) QueryInt(key string, defaultValue ...int) int Example // GET http://example.com/?name=alex&wanna_cake=2&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryInt(\"wanna_cake\", 1) // 2 c.QueryInt(\"name\", 1) // 1 c.QueryInt(\"id\", 1) // 1 c.QueryInt(\"id\") // 0 // ... })","s":"QueryInt","u":"/next/api/ctx","h":"#queryint","p":562},{"i":660,"t":"This method is similar to BodyParser, but for query parameters. It is important to use the struct tag \"query\". For example, if you want to parse a query parameter with a field called Pass, you would use a struct field of query:\"pass\". Signature func (c *Ctx) QueryParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `query:\"name\"` Pass string `query:\"pass\"` Products []string `query:\"products\"` } app.Get(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.QueryParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe log.Println(p.Products) // [shoe, hat] // ... }) // Run tests with the following curl command // curl \"http://localhost:3000/?name=john&pass=doe&products=shoe,hat\"","s":"QueryParser","u":"/next/api/ctx","h":"#queryparser","p":562},{"i":662,"t":"A struct containing the type and a slice of ranges will be returned. Signature func (c *Ctx) Range(size int) (Range, error) Example // Range: bytes=500-700, 700-900 app.Get(\"/\", func(c *fiber.Ctx) error { b := c.Range(1000) if b.Type == \"bytes\" { for r := range r.Ranges { fmt.Println(r) // [500, 700] } } })","s":"Range","u":"/next/api/ctx","h":"#range","p":562},{"i":664,"t":"Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. Signature func (c *Ctx) Redirect(location string, status ...int) error Example app.Get(\"/coffee\", func(c *fiber.Ctx) error { return c.Redirect(\"/teapot\") }) app.Get(\"/teapot\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusTeapot).Send(\"🍵 short and stout 🍵\") }) More examples app.Get(\"/\", func(c *fiber.Ctx) error { return c.Redirect(\"/foo/bar\") return c.Redirect(\"../login\") return c.Redirect(\"http://example.com\") return c.Redirect(\"http://example.com\", 301) })","s":"Redirect","u":"/next/api/ctx","h":"#redirect","p":562},{"i":666,"t":"Redirects to the specific route along with the parameters and with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. info If you want to send queries to route, you must add \"queries\" key typed as map[string]string to params. Signature func (c *Ctx) RedirectToRoute(routeName string, params fiber.Map, status ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { // /user/fiber return c.RedirectToRoute(\"user\", fiber.Map{ \"name\": \"fiber\" }) }) app.Get(\"/with-queries\", func(c *fiber.Ctx) error { // /user/fiber?data[0][name]=john&data[0][age]=10&test=doe return c.RedirectToRoute(\"user\", fiber.Map{ \"name\": \"fiber\", \"queries\": map[string]string{\"data[0][name]\": \"john\", \"data[0][age]\": \"10\", \"test\": \"doe\"}, }) }) app.Get(\"/user/:name\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"name\")) }).Name(\"user\")","s":"RedirectToRoute","u":"/next/api/ctx","h":"#redirecttoroute","p":562},{"i":668,"t":"Redirects back to refer URL. It redirects to fallback URL if refer header doesn't exists, with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. Signature func (c *Ctx) RedirectBack(fallback string, status ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Home page\") }) app.Get(\"/test\", func(c *fiber.Ctx) error { c.Set(\"Content-Type\", \"text/html\") return c.SendString(`Back`) }) app.Get(\"/back\", func(c *fiber.Ctx) error { return c.RedirectBack(\"/\") })","s":"RedirectBack","u":"/next/api/ctx","h":"#redirectback","p":562},{"i":670,"t":"Renders a view with data and sends a text/html response. By default Render uses the default Go Template engine. If you want to use another View engine, please take a look at our Template middleware. Signature func (c *Ctx) Render(name string, bind interface{}, layouts ...string) error","s":"Render","u":"/next/api/ctx","h":"#render","p":562},{"i":672,"t":"Request return the *fasthttp.Request pointer Signature func (c *Ctx) Request() *fasthttp.Request Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Request().Header.Method() // => []byte(\"GET\") })","s":"Request","u":"/next/api/ctx","h":"#request","p":562},{"i":674,"t":"This method is similar to BodyParser, but for request headers. It is important to use the struct tag \"reqHeader\". For example, if you want to parse a request header with a field called Pass, you would use a struct field of reqHeader:\"pass\". Signature func (c *Ctx) ReqHeaderParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `reqHeader:\"name\"` Pass string `reqHeader:\"pass\"` Products []string `reqHeader:\"products\"` } app.Get(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.ReqHeaderParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe log.Println(p.Products) // [shoe, hat] // ... }) // Run tests with the following curl command // curl \"http://localhost:3000/\" -H \"name: john\" -H \"pass: doe\" -H \"products: shoe,hat\"","s":"ReqHeaderParser","u":"/next/api/ctx","h":"#reqheaderparser","p":562},{"i":676,"t":"Response return the *fasthttp.Response pointer Signature func (c *Ctx) Response() *fasthttp.Response Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Response().BodyWriter().Write([]byte(\"Hello, World!\")) // => \"Hello, World!\" return nil })","s":"Response","u":"/next/api/ctx","h":"#response","p":562},{"i":678,"t":"Instead of executing the next method when calling Next, RestartRouting restarts execution from the first method that matches the current route. This may be helpful after overriding the path, i. e. an internal redirect. Note that handlers might be executed again which could result in an infinite loop. Signature func (c *Ctx) RestartRouting() error Example app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"From /new\") }) app.Get(\"/old\", func(c *fiber.Ctx) error { c.Path(\"/new\") return c.RestartRouting() })","s":"RestartRouting","u":"/next/api/ctx","h":"#restartrouting","p":562},{"i":680,"t":"Returns the matched Route struct. Signature func (c *Ctx) Route() *Route Example // http://localhost:8080/hello app.Get(\"/hello/:name\", func(c *fiber.Ctx) error { r := c.Route() fmt.Println(r.Method, r.Path, r.Params, r.Handlers) // GET /hello/:name handler [name] // ... }) caution Do not rely on c.Route() in middlewares before calling c.Next() - c.Route() returns the last executed route. Example func MyMiddleware() fiber.Handler { return func(c *fiber.Ctx) error { beforeNext := c.Route().Path // Will be '/' err := c.Next() afterNext := c.Route().Path // Will be '/hello/:name' return err } }","s":"Route","u":"/next/api/ctx","h":"#route","p":562},{"i":682,"t":"Method is used to save any multipart file to disk. Signature func (c *Ctx) SaveFile(fh *multipart.FileHeader, path string) error Example app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to disk: if err := c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)); err != nil { return err } } return err } })","s":"SaveFile","u":"/next/api/ctx","h":"#savefile","p":562},{"i":684,"t":"Method is used to save any multipart file to an external storage system. Signature func (c *Ctx) SaveFileToStorage(fileheader *multipart.FileHeader, path string, storage Storage) error Example storage := memory.New() app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to storage: if err := c.SaveFileToStorage(file, fmt.Sprintf(\"./%s\", file.Filename), storage); err != nil { return err } } return err } })","s":"SaveFileToStorage","u":"/next/api/ctx","h":"#savefiletostorage","p":562},{"i":686,"t":"A boolean property that is true , if a TLS connection is established. Signature func (c *Ctx) Secure() bool Example // Secure() method is equivalent to: c.Protocol() == \"https\"","s":"Secure","u":"/next/api/ctx","h":"#secure","p":562},{"i":688,"t":"Sets the HTTP response body. Signature func (c *Ctx) Send(body []byte) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.Send([]byte(\"Hello, World!\")) // => \"Hello, World!\" }) Fiber also provides SendString and SendStream methods for raw inputs. tip Use this if you don't need type assertion, recommended for faster performance. Signature func (c *Ctx) SendString(body string) error func (c *Ctx) SendStream(stream io.Reader, size ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") // => \"Hello, World!\" return c.SendStream(bytes.NewReader([]byte(\"Hello, World!\"))) // => \"Hello, World!\" })","s":"Send","u":"/next/api/ctx","h":"#send","p":562},{"i":690,"t":"Transfers the file from the given path. Sets the Content-Type response HTTP header field based on the filenames extension. caution Method doesn´t use gzipping by default, set it to true to enable. Signature func (c *Ctx) SendFile(file string, compress ...bool) error Example app.Get(\"/not-found\", func(c *fiber.Ctx) error { return c.SendFile(\"./public/404.html\"); // Disable compression return c.SendFile(\"./static/index.html\", false); }) info If the file contains an url specific character you have to escape it before passing the file path into the sendFile function. Example app.Get(\"/file-with-url-chars\", func(c *fiber.Ctx) error { return c.SendFile(url.PathEscape(\"hash_sign_#.txt\")) })","s":"SendFile","u":"/next/api/ctx","h":"#sendfile","p":562},{"i":692,"t":"Sets the status code and the correct status message in the body, if the response body is empty. tip You can find all used status codes and messages here. Signature func (c *Ctx) SendStatus(status int) error Example app.Get(\"/not-found\", func(c *fiber.Ctx) error { return c.SendStatus(415) // => 415 \"Unsupported Media Type\" c.SendString(\"Hello, World!\") return c.SendStatus(415) // => 415 \"Hello, World!\" })","s":"SendStatus","u":"/next/api/ctx","h":"#sendstatus","p":562},{"i":694,"t":"Sets the response’s HTTP header field to the specified key, value. Signature func (c *Ctx) Set(key string, val string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Set(\"Content-Type\", \"text/plain\") // => \"Content-type: text/plain\" // ... })","s":"Set","u":"/next/api/ctx","h":"#set","p":562},{"i":696,"t":"Allow you to config BodyParser/QueryParser decoder, base on schema's options, providing possibility to add custom type for parsing. Signature func SetParserDecoder(parserConfig fiber.ParserConfig{ IgnoreUnknownKeys bool, ParserType []fiber.ParserType{ Customtype interface{}, Converter func(string) reflect.Value, }, ZeroEmpty bool, SetAliasTag string, }) Example type CustomTime time.Time // String() returns the time in string func (ct *CustomTime) String() string { t := time.Time(*ct).String() return t } // Register the converter for CustomTime type format as 2006-01-02 var timeConverter = func(value string) reflect.Value { fmt.Println(\"timeConverter\", value) if v, err := time.Parse(\"2006-01-02\", value); err == nil { return reflect.ValueOf(v) } return reflect.Value{} } customTime := fiber.ParserType{ Customtype: CustomTime{}, Converter: timeConverter, } // Add setting to the Decoder fiber.SetParserDecoder(fiber.ParserConfig{ IgnoreUnknownKeys: true, ParserType: []fiber.ParserType{customTime}, ZeroEmpty: true, }) // Example to use CustomType, you pause custom time format not in RFC3339 type Demo struct { Date CustomTime `form:\"date\" query:\"date\"` Title string `form:\"title\" query:\"title\"` Body string `form:\"body\" query:\"body\"` } app.Post(\"/body\", func(c *fiber.Ctx) error { var d Demo c.BodyParser(&d) fmt.Println(\"d.Date\", d.Date.String()) return c.JSON(d) }) app.Get(\"/query\", func(c *fiber.Ctx) error { var d Demo c.QueryParser(&d) fmt.Println(\"d.Date\", d.Date.String()) return c.JSON(d) }) // curl -X POST -F title=title -F body=body -F date=2021-10-20 http://localhost:3000/body // curl -X GET \"http://localhost:3000/query?title=title&body=body&date=2021-10-20\"","s":"SetParserDecoder","u":"/next/api/ctx","h":"#setparserdecoder","p":562},{"i":698,"t":"Sets the user specified implementation for context interface. Signature func (c *Ctx) SetUserContext(ctx context.Context) Example app.Get(\"/\", func(c *fiber.Ctx) error { ctx := context.Background() c.SetUserContext(ctx) // Here ctx could be any context implementation // ... })","s":"SetUserContext","u":"/next/api/ctx","h":"#setusercontext","p":562},{"i":700,"t":"https://expressjs.com/en/4x/api.html#req.stale Signature func (c *Ctx) Stale() bool","s":"Stale","u":"/next/api/ctx","h":"#stale","p":562},{"i":702,"t":"Sets the HTTP status for the response. info Method is a chainable. Signature func (c *Ctx) Status(status int) *Ctx Example app.Get(\"/fiber\", func(c *fiber.Ctx) error { c.Status(fiber.StatusOK) return nil } app.Get(\"/hello\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusBadRequest).SendString(\"Bad Request\") } app.Get(\"/world\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusNotFound).SendFile(\"./public/gopher.png\") })","s":"Status","u":"/next/api/ctx","h":"#status","p":562},{"i":704,"t":"Returns a string slice of subdomains in the domain name of the request. The application property subdomain offset, which defaults to 2, is used for determining the beginning of the subdomain segments. Signature func (c *Ctx) Subdomains(offset ...int) []string Example // Host: \"tobi.ferrets.example.com\" app.Get(\"/\", func(c *fiber.Ctx) error { c.Subdomains() // [\"ferrets\", \"tobi\"] c.Subdomains(1) // [\"tobi\"] // ... })","s":"Subdomains","u":"/next/api/ctx","h":"#subdomains","p":562},{"i":706,"t":"Sets the Content-Type HTTP header to the MIME type listed here specified by the file extension. Signature func (c *Ctx) Type(ext string, charset ...string) *Ctx Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Type(\".html\") // => \"text/html\" c.Type(\"html\") // => \"text/html\" c.Type(\"png\") // => \"image/png\" c.Type(\"json\", \"utf-8\") // => \"application/json; charset=utf-8\" // ... })","s":"Type","u":"/next/api/ctx","h":"#type","p":562},{"i":708,"t":"UserContext returns a context implementation that was set by user earlier or returns a non-nil, empty context, if it was not set earlier. Signature func (c *Ctx) UserContext() context.Context Example app.Get(\"/\", func(c *fiber.Ctx) error { ctx := c.UserContext() // ctx is context implementation set by user // ... })","s":"UserContext","u":"/next/api/ctx","h":"#usercontext","p":562},{"i":710,"t":"Adds the given header field to the Vary response header. This will append the header, if not already listed, otherwise leaves it listed in the current location. info Multiple fields are allowed. Signature func (c *Ctx) Vary(fields ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Vary(\"Origin\") // => Vary: Origin c.Vary(\"User-Agent\") // => Vary: Origin, User-Agent // No duplicates c.Vary(\"Origin\") // => Vary: Origin, User-Agent c.Vary(\"Accept-Encoding\", \"Accept\") // => Vary: Origin, User-Agent, Accept-Encoding, Accept // ... })","s":"Vary","u":"/next/api/ctx","h":"#vary","p":562},{"i":712,"t":"Write adopts the Writer interface Signature func (c *Ctx) Write(p []byte) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Write([]byte(\"Hello, World!\")) // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"Write","u":"/next/api/ctx","h":"#write","p":562},{"i":714,"t":"Writef adopts the string with variables Signature func (c *Ctx) Writef(f string, a ...interface{}) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { world := \"World!\" c.Writef(\"Hello, %s\", world) // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"Writef","u":"/next/api/ctx","h":"#writef","p":562},{"i":716,"t":"WriteString adopts the string Signature func (c *Ctx) WriteString(s string) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.WriteString(\"Hello, World!\") // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"WriteString","u":"/next/api/ctx","h":"#writestring","p":562},{"i":718,"t":"A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery). Signature func (c *Ctx) XHR() bool Example // X-Requested-With: XMLHttpRequest app.Get(\"/\", func(c *fiber.Ctx) error { c.XHR() // true // ... })","s":"XHR","u":"/next/api/ctx","h":"#xhr","p":562},{"i":720,"t":"Converts any interface or string to XML using the standard encoding/xml package. info XML also sets the content header to application/xml. Signature func (c *Ctx) XML(data interface{}) error Example type SomeStruct struct { XMLName xml.Name `xml:\"Fiber\"` Name string `xml:\"Name\"` Age uint8 `xml:\"Age\"` } app.Get(\"/\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ Name: \"Grame\", Age: 20, } return c.XML(data) // // Grame // 20 // })","s":"XML","u":"/next/api/ctx","h":"#xml","p":562}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2",[0,5.72,1,3.184,2,4.307,3,0.895,4,3.862,5,5.041,6,3.766,7,1.515,8,2.272,9,6.309,10,6.309,11,3.958,12,4.81,13,2.871,14,5.331,15,5.331,16,4.81,17,6.309,18,2.042,19,4.452,20,3.474,21,4.81,22,6.309,23,6.309,24,4.81,25,5.72,26,5.041,27,4.81,28,4.307,29,4.81,30,3.614,31,6.309,32,5.331,33,4.452,34,4.617,35,6.309,36,6.309,37,6.309]],["t/4",[20,5.665,38,5.007,39,5.84,40,8.107,41,7.981,42,7.981,43,5.007,44,5.631,45,1.495,46,6.084,47,2.876]],["t/6",[3,0.736,7,0.794,8,0.814,30,2.972,45,1.475,48,2.809,49,1.086,50,1.217,51,5.115,52,1.408,53,3.308,54,2.999,55,5.188,56,1.397,57,2.522,58,3.308,59,4.016,60,3.667,61,2.781,62,2.42,63,1.697,64,3.308,65,2.42,66,2.999,67,2.334,68,2.025,69,3.308,70,3.661,71,0.51,72,5.188,73,0.937,74,0.539,75,4.669,76,3.284,77,3.918,78,5.188,79,1.857,80,6.402,81,2.075,82,3.308,83,3.18,84,3.919,85,2.795,86,4.384,87,3.308,88,0.624,89,3.308,90,3.308,91,3.308,92,3.308,93,3.308,94,4.384,95,3.308,96,1.57,97,1.134,98,3.308,99,1.134,100,2.795,101,2.795,102,2.522,103,3.308,104,3.308,105,0.552,106,3.308,107,2.999,108,0.913,109,1.669,110,2.999,111,3.308,112,2.999,113,2.999,114,2.075,115,1.18,116,1.485,117,2.258,118,2.025,119,2.258,120,2.999,121,2.999]],["t/8",[7,2.029,8,1.602,20,3.585,47,2.347,49,0.976,50,1.006,68,3.986,71,0.64,73,0.953,74,0.511,96,3.091,105,1.087,122,5.903,123,5.903,124,6.511,125,2.088,126,3.394,127,2.168,128,2.71,129,1.86,130,3.73,131,4.132,132,3.894,133,3.809,134,6.511,135,4.765,136,4.194,137,3.73,138,3.519,139,4.313]],["t/10",[1,1.755,7,0.835,8,0.856,18,1.746,48,1.169,49,1.208,50,1.151,56,2.005,59,2.182,61,1.228,63,1.784,73,1.249,74,0.553,88,0.656,99,2.266,105,1.244,129,0.993,130,3.09,131,3.233,138,3.572,140,3.139,141,2.779,142,2.182,143,5.395,144,1.846,145,3.152,146,2.454,147,2.779,148,3.206,149,1.915,150,2.14,151,4.559,152,3.302,153,3.948,154,2.034,155,1.915,156,2.722,157,2.97,158,3.152,159,2.545,160,1.35,161,2.938,162,0.55,163,3.477,164,3.948,165,2.08,166,2.938,167,1.675,168,2.779,169,1.915,170,2.545,171,1.992,172,2.524,173,3.477,174,3.477,175,3.152,176,3.477,177,1.228,178,3.477,179,3.477,180,4.559,181,2.97,182,3.477,183,2.938,184,3.477,185,3.152,186,3.152,187,2.779,188,3.477]],["t/12",[7,1.492,45,1.164,61,2.194,74,0.309,81,3.898,88,1.547,94,5.25,99,2.809,128,2.585,132,3.716,160,2.412,162,0.983,171,3.559,189,5.016,190,6.547,191,4.88,192,5.632,193,5.632,194,5.632,195,5.25,196,6.258,197,6.213,198,1.368,199,3.135,200,2.467,201,6.708,202,5.632,203,4.964,204,6.213,205,6.213,206,6.213]],["t/14",[1,4.757,5,7.533,8,2.319,11,4.864,20,5.191,116,3.481,117,5.293,118,4.746,119,5.293,207,5.91,208,7.752,209,7.752,210,7.752]],["t/17",[3,0.658,7,0.852,18,0.674,39,2.596,45,1.152,48,2.531,49,0.312,52,2.209,56,0.955,61,1.253,68,1.274,71,0.204,74,0.542,81,1.306,88,0.67,97,0.713,99,1.216,105,0.347,108,1.973,109,1.05,115,2.686,116,0.934,135,3.394,148,1.743,149,1.146,150,1.148,155,1.146,160,0.808,162,0.329,166,1.758,167,1.002,171,1.192,177,2.874,189,4.609,190,6.502,191,4.319,192,1.886,193,1.886,194,1.886,196,4.879,198,0.781,199,1.05,200,1.409,201,4.5,202,4.967,211,1.05,212,2.705,213,1.706,214,2.081,215,1.274,216,2.081,217,2.081,218,2.081,219,2.122,220,1.663,221,1.274,222,1.468,223,1.034,224,1.886,225,2.081,226,2.081,227,2.081,228,2.081,229,1.105,230,2.081,231,1.886,232,2.172,233,1.886,234,4.638,235,1.333,236,3.139,237,2.622,238,1.34,239,1.758,240,0.643,241,1.586,242,1.586,243,1.758,244,1.886,245,2.226,246,3.272,247,1.34,248,1.586,249,2.081,250,0.852,251,2.396,252,2.108,253,2.081,254,1.018,255,1.306,256,3.548,257,2.081,258,1.886,259,1.886,260,2.081,261,2.839,262,1.886,263,1.067,264,1.421,265,2.081,266,2.081,267,1.992,268,1.523,269,2.705,270,2.705,271,3.548,272,2.081,273,0.632,274,3.166,275,1.245,276,1.067,277,0.876,278,1.758,279,2.835,280,1.886,281,0.996,282,1.24,283,0.947,284,0.57,285,2.081,286,1.886]],["t/19",[1,2.124,3,0.597,4,2.576,7,2.501,18,1.739,45,0.788,48,0.858,49,1.177,50,1.214,56,1.857,61,3.698,71,0.902,73,1.15,74,0.518,88,1.697,97,0.874,105,1.24,109,1.287,125,0.818,140,1.977,148,1.582,149,1.404,150,2.018,152,2.576,153,1.866,154,1.492,155,2.317,157,3.799,162,0.666,170,3.08,181,1.404,215,5.622,219,3.213,250,0.613,273,0.775,287,2.517,288,3.363,289,2.155,290,2.155,291,2.155,292,2.155,293,2.155,294,2.155,295,2.155,296,2.155,297,2.155,298,1.461,299,2.155,300,2.155,301,1.689,302,1.866,303,2.155,304,2.155,305,3.556,306,2.155,307,2.155,308,1.866,309,1.944,310,2.038,311,2.155,312,2.155,313,1.088,314,1.741,315,4.57,316,3.556,317,3.363,318,1.561,319,2.155,320,1.944,321,2.038,322,2.155]],["t/21",[3,0.902,7,2.362,8,1.564,49,0.953,50,0.983,71,0.817,73,0.931,74,0.538,88,1.2,96,3.018,105,1.062,126,2.554,128,3.462,162,1.006,165,3.803,215,3.892,310,5.081,323,6.342,324,6.359,325,8.319,326,6.359,327,5.373,328,5.765,329,6.359,330,5.765,331,3.436]],["t/23",[3,0.759,4,3.278,7,2.312,71,0.728,74,0.537,88,1.011,116,2.404,126,2.151,127,1.783,128,3.816,148,2.785,162,0.847,169,2.948,229,2.842,323,6.99,332,8.497,333,3.006,334,6.47,335,4.524,336,4.854,337,6.261,338,7.41,339,5.354,340,5.354,341,5.354,342,5.354,343,5.354,344,5.354,345,5.354,346,5.354,347,5.354,348,2.842,349,3.778,350,5.354,351,5.354]],["t/25",[1,3.862,3,0.796,7,2.092,33,3.96,61,3.769,71,0.752,74,0.55,88,1.059,96,2.664,126,2.255,128,2.336,140,2.065,162,0.888,215,3.436,235,2.109,331,3.033,352,5.069,353,5.613,354,4.485,355,3.832,356,4.485,357,4.485,358,4.485,359,4.485,360,4.485,361,4.485,362,4.743,363,4.743,364,4.743,365,4.743,366,4.743,367,4.743]],["t/27",[3,0.861,7,2.177,71,0.793,74,0.525,88,1.524,99,2.082,126,2.44,128,2.527,140,2.235,162,0.961,200,3.6,215,4.941,219,3.633,237,2.59,331,3.282,368,7.317,369,6.074,370,6.074,371,6.074,372,5.506,373,6.074,374,6.074,375,5.506,376,6.074,377,6.074,378,6.074,379,6.074,380,6.074,381,6.074,382,6.074,383,6.074,384,3.168]],["t/29",[3,1.031,7,2.371,16,5.54,49,1.089,71,0.89,74,0.539,85,6.141,126,2.919,128,3.024,162,1.15,167,4.756,385,7.268,386,7.268,387,3.138]],["t/31",[7,2.431,38,3.546,49,0.847,71,0.859,73,1.279,167,3.704,247,3.64,263,2.899,267,3.173,388,7.924,389,5.652,390,8.74,391,7.924,392,4.309,393,5.124,394,7.69,395,6.167,396,6.498,397,4.776,398,3.306,399,4.516,400,5.652,401,5.652,402,3.237,403,5.652,404,5.652,405,3.64,406,5.652,407,4.516,408,5.652,409,5.652,410,4.776,411,5.652,412,5.652,413,5.652,414,3.988]],["t/33",[7,2.346,49,1.232,61,2.904,71,0.808,150,2.662,162,1.301,287,4.918,415,6.948,416,8.223,417,8.223]],["t/35",[3,0.695,7,1.946,49,1.044,50,0.758,61,2.861,71,0.684,73,0.718,74,0.569,77,2.649,105,0.819,126,1.969,128,2.04,132,2.932,140,1.804,148,3.045,150,2.855,152,3.001,162,0.776,215,3.001,281,1.376,287,2.932,418,3.076,419,5.097,420,1.925,421,4.902,422,4.902,423,2.172,424,2.649,425,4.444,426,4.902,427,6.966,428,4.74,429,5.097,430,3.347,431,3.917]],["t/37",[3,0.491,7,1.583,49,0.519,50,0.535,61,1.899,71,0.528,73,0.507,74,0.565,77,1.871,88,0.654,96,1.644,105,0.578,126,1.391,128,1.441,129,0.989,132,2.071,140,1.274,148,3.452,150,3.054,162,0.548,200,3.746,215,2.12,261,2.12,281,0.972,317,2.767,420,1.36,423,1.534,424,1.871,425,3.139,428,5.374,430,4.5,431,8.074,432,3.139,433,3.463,434,3.463,435,3.463,436,3.463,437,3.463,438,3.463,439,3.463,440,3.463,441,3.463,442,3.463,443,3.463,444,3.463,445,3.463,446,2.926,447,3.671,448,3.463,449,5.377,450,4.824,451,2.64,452,3.463,453,3.463]],["t/39",[3,0.836,7,2.145,49,0.884,50,0.912,61,2.083,71,0.777,73,0.863,74,0.554,77,3.187,88,1.113,105,0.985,126,2.369,128,2.454,129,1.684,132,3.527,140,2.912,148,2.216,150,2.562,162,0.933,200,3.143,261,3.61,281,1.656,420,2.316,423,2.613,424,3.187,428,3.45,431,4.712,446,4.984,454,4.984,455,5.898,456,5.898,457,5.898]],["t/41",[3,0.802,7,2.099,49,0.847,50,0.874,71,0.859,73,0.827,74,0.55,77,3.054,115,2.016,126,2.27,128,2.352,130,3.237,131,2.764,140,3.216,148,2.124,150,2.489,152,3.46,162,0.894,200,2.244,250,1.357,252,1.937,261,3.46,287,3.38,423,2.504,424,3.054,428,3.306,431,4.516,446,4.776,454,4.776,458,5.652,459,5.652,460,4.776,461,4.516,462,3.546,463,1.496,464,5.124,465,5.652]],["t/43",[7,2.471,48,2.683,49,1.196,71,0.784,74,0.477,162,1.263,198,2.351,466,4.236]],["t/45",[7,2.291,45,1.48,49,1.184,56,2.127,61,3.618,71,0.776,97,2.709,162,1.25,167,3.807,189,4.838,467,6.678,468,7.903]],["t/47",[3,1.04,7,2.188,18,2.374,56,1.974,71,0.72,73,1.073,74,0.453,88,1.384,97,2.514,162,1.16,189,4.489,398,5.33,469,4.038,470,5.174,471,7.333,472,4.857,473,7.333,474,7.333,475,4.723,476,7.333]],["t/49",[3,0.849,7,1.92,18,1.937,45,1.686,52,2.169,56,1.611,71,0.588,73,0.876,74,0.478,88,1.13,148,2.249,160,2.324,162,0.947,189,3.663,191,2.883,198,1.76,398,3.501,469,3.295,470,4.223,477,7.245,478,6.753,479,6.753,480,3.964,481,5.639,482,2.202,483,5.425,484,5.984,485,5.425,486,5.425,487,2.761,488,5.639,489,4.782,490,4.782,491,4.782,492,4.782]],["t/51",[3,0.954,7,2.072,45,1.616,52,2.342,71,0.661,73,0.984,74,0.5,88,1.27,160,2.612,162,1.064,198,1.9,398,3.935,481,4.746,483,6.098,487,3.104,488,6.088,489,5.375,490,5.375,491,6.894,492,7.611,493,6.727,494,6.727]],["t/53",[3,0.796,7,1.838,18,1.817,45,1.631,52,2.078,56,1.511,71,0.551,73,0.821,74,0.465,88,1.059,148,2.109,160,2.179,162,0.888,189,3.436,191,2.704,198,1.686,398,3.283,469,3.09,470,3.96,478,6.467,479,6.467,480,3.718,481,5.4,482,2.065,485,6.939,486,5.088,487,2.59,488,5.4,489,4.485,490,4.485,491,4.485,492,4.485,495,7.654,496,6.939,497,5.613,498,5.613,499,5.613,500,4.485,501,5.088,502,5.088,503,5.088,504,5.088]],["t/55",[3,0.807,7,1.856,18,1.842,45,1.643,52,2.097,56,1.532,71,0.559,73,0.833,74,0.468,88,1.074,148,2.139,160,2.21,162,0.9,189,3.484,191,2.742,198,1.702,398,3.329,469,3.134,470,4.016,478,4.809,479,4.809,480,3.77,481,5.452,482,2.094,487,2.626,488,5.452,489,4.548,490,4.548,491,6.174,492,7.009,496,5.16,501,5.16,502,5.16,503,5.16,504,7.952,505,7.726,506,5.691,507,5.691,508,5.691]],["t/57",[3,0.946,7,2.061,45,1.608,71,0.655,73,0.976,74,0.427,97,2.287,150,2.778,162,1.055,236,3.821,398,3.903,424,4.638,488,4.707,509,3.078,510,8.582,511,6.672,512,6.672,513,8.582,514,6.672,515,4.882,516,6.048,517,6.672,518,6.672,519,6.672,520,6.672,521,6.048,522,6.672]],["t/59",[3,0.634,7,1.566,44,3.155,45,0.838,49,0.67,50,0.691,52,1.214,71,0.439,73,0.954,74,0.547,77,2.416,79,2.51,96,3.095,97,2.235,105,0.747,129,1.277,130,2.561,131,3.188,138,2.416,140,2.399,142,2.805,150,2.49,162,0.707,191,2.154,229,2.373,268,3.272,273,1.98,275,2.674,277,1.883,281,1.255,384,4.013,387,1.931,405,4.198,424,3.523,509,2.063,523,4.471,524,3.778,525,3.573,526,4.471,527,4.471,528,4.471,529,4.471,530,5.209,531,4.471,532,6.519,533,4.471,534,5.509,535,4.471,536,6.519,537,3.573,538,4.471,539,4.471,540,4.054,541,4.471,542,4.054,543,4.471,544,4.054,545,2.332,546,4.471,547,4.471]],["t/61",[7,2.346,49,1.232,71,0.808,150,2.662,162,1.301,333,4.616,548,6.763]],["t/64",[4,3.691,18,2.923,56,1.623,71,1.013,74,0.3,88,1.947,144,5.589,150,2.6,162,0.954,463,2.731,549,2.744,550,6.029,551,4.293,552,6.029,553,6.029,554,6.029,555,6.029,556,6.029]],["t/66",[14,6.744,15,6.744,56,2.148,81,5.007,150,3.33,551,3.321,557,7.981,558,7.235,559,7.981,560,7.981,561,7.981,562,6.744]],["t/68",[74,0.555,199,3.572,281,1.987,537,5.656,545,3.692,558,6.417,563,5.455,564,3.266,565,7.078,566,7.078,567,7.078,568,7.078,569,4.439,570,7.078,571,5.981,572,7.078]],["t/70",[3,0.868,48,2.057,71,0.952,74,0.403,88,1.717,108,2.239,162,0.968,254,4.738,273,1.858,355,5.538,469,3.369,482,2.252,551,4.466,573,6.12,574,6.417,575,6.12,576,6.12,577,6.12,578,6.12,579,6.12,580,6.12,581,5.548,582,6.12,583,5.548]],["t/72",[3,0.764,33,3.803,48,1.812,71,0.903,74,0.48,88,1.609,99,1.848,155,2.968,162,0.853,254,4.497,273,2.589,298,4.264,301,3.57,355,6.588,469,2.968,482,2.739,551,4.337,574,6.091,581,4.886,583,4.886,584,4.109,585,5.39,586,5.39,587,5.39,588,5.39,589,5.39,590,5.39,591,5.39,592,5.39,593,8.527,594,4.886]],["t/74",[3,1.132,71,0.784,74,0.477,162,1.263,273,2.423,298,4.571,395,5.631,396,6.744,551,3.993,595,9.595,596,7.981]],["t/76",[3,1.059,48,2.511,71,0.905,74,0.458,88,1.41,108,2.061,162,1.181,254,3.652,273,2.268,551,4.46,597,7.468,598,3.768,599,7.468,600,7.468,601,7.468]],["t/78",[3,0.836,33,4.161,45,1.105,48,3.209,71,0.978,74,0.394,88,1.686,108,2.185,155,3.247,162,0.933,254,4.368,355,4.026,482,2.17,551,4.533,574,3.906,594,5.347,602,5.067,603,3.311,604,5.898,605,5.898,606,5.898,607,5.898,608,5.898,609,5.898,610,5.898]],["t/80",[3,1.069,48,2.534,63,4.753,71,0.91,74,0.461,88,1.423,108,2.081,162,1.192,254,3.686,273,2.289,551,4.356,611,7.537,612,7.537,613,7.537]],["t/82",[3,1.049,48,2.488,71,0.9,74,0.456,88,1.397,108,2.043,162,1.171,240,2.833,254,3.619,273,2.247,551,4.328,614,7.4,615,3.619,616,7.4,617,7.4,618,7.4]],["t/84",[3,1.079,71,0.915,74,0.463,88,1.436,108,2.1,162,1.203,254,3.72,273,2.31,475,6.002,551,4.37,619,7.607,620,7.607,621,7.607]],["t/86",[3,1.069,71,0.91,74,0.461,88,1.749,108,2.081,147,6.022,162,1.192,254,3.686,551,4.356,622,7.537,623,4.614,624,7.537,625,7.537,626,7.537]],["t/88",[3,1.004,18,2.291,45,1.326,71,0.875,74,0.443,88,1.336,108,1.954,147,5.656,162,1.12,254,3.461,551,4.26,627,6.417,628,5.981,629,7.793,630,6.417,631,5.981,632,7.078,633,7.078,634,7.078,635,5.981]],["t/90",[3,0.691,49,0.73,56,2.174,71,0.793,74,0.545,88,0.92,108,1.915,162,0.771,177,1.721,254,3.392,276,3.558,277,2.053,387,2.104,402,2.791,423,2.159,430,3.327,466,3.682,487,2.248,545,4.85,551,4.021,636,3.894,637,4.118,638,4.873,639,4.873,640,8.075,641,4.118,642,3.715,643,8.798,644,4.418,645,6.936,646,3.894,647,4.873,648,2.459,649,4.873,650,3.228,651,4.873,652,2.42,653,4.873,654,4.418,655,4.873,656,4.873,657,4.873]],["t/92",[3,1.069,56,2.029,71,0.74,74,0.461,108,2.081,115,2.689,162,1.192,240,2.33,273,2.289,313,3.214,551,3.856,615,3.686,658,5.421,659,4.508,660,5.145,661,7.537,662,7.537]],["t/94",[3,1.069,56,2.029,71,0.74,74,0.461,108,2.081,115,2.689,162,1.192,240,2.33,273,2.289,313,3.214,551,3.856,615,3.686,659,4.508,663,7.404,664,6.022,665,7.537,666,7.537]],["t/96",[3,0.836,30,3.378,34,4.316,56,2.13,65,4.316,71,0.579,74,0.521,108,1.628,162,0.933,199,2.976,240,1.823,273,1.791,281,1.656,545,3.077,551,3.293,603,5.59,615,2.884,635,4.984,659,4.733,667,4.984,668,4.712,669,4.984,670,8.654,671,4.984,672,4.316,673,3.7,674,7.175,675,4.712,676,4.984,677,5.898,678,5.347,679,5.898,680,5.347]],["t/98",[3,0.933,8,0.686,30,2.592,34,3.311,45,0.522,56,2.197,65,3.311,71,0.71,74,0.528,88,1.462,108,1.249,150,0.902,155,1.534,162,1.04,191,4.096,199,2.283,200,2.871,235,1.047,240,1.399,254,1.363,273,0.846,402,1.596,407,2.227,423,2.005,466,1.479,482,1.025,487,1.286,551,3.758,574,1.846,603,5.07,615,3.216,635,2.355,636,2.227,648,1.406,652,1.384,659,3.416,670,5.179,672,3.311,673,2.839,674,4.102,675,3.615,676,3.823,678,2.526,680,2.526,681,4.827,682,6.221,683,2.355,684,2.787,685,2.787,686,2.787,687,2.787,688,5.179,689,2.787,690,2.787,691,5.712,692,2.787,693,3.823,694,5.556,695,2.787,696,5.712,697,2.787,698,2.787,699,3.838,700,2.787,701,4.525,702,2.787,703,5.712,704,6.576,705,2.787,706,5.712,707,2.787,708,2.787,709,2.787,710,2.787,711,4.525,712,4.525,713,2.787,714,2.787,715,2.787]],["t/100",[3,1.079,56,2.048,71,0.747,74,0.463,162,1.203,213,2.799,236,4.358,524,6.428,551,3.878,716,6.897,717,4.111,718,5.368,719,7.607,720,6.428,721,7.607,722,6.897,723,7.607]],["t/102",[3,1.121,56,2.127,71,0.776,74,0.474,108,2.182,162,1.25,264,5.395,267,4.436,405,6.143,551,3.969,724,7.903,725,7.903]],["t/104",[3,1.04,34,5.366,45,1.707,56,1.974,71,0.72,74,0.453,162,1.16,165,4.386,236,4.2,334,5.174,551,4.314,675,5.859,726,9.111,727,6.648,728,7.333,729,6.648,730,7.333]],["t/106",[3,1.079,71,0.747,74,0.463,162,1.203,167,3.665,200,3.021,232,4.657,475,4.9,481,5.368,500,6.079,551,4.193,731,8.449,732,5.194,733,7.607,734,7.607]],["t/108",[3,0.987,71,0.683,74,0.533,96,3.302,108,1.92,162,1.101,198,1.941,424,3.76,480,5.838,481,6.22,482,2.56,488,6.22,516,6.307,521,6.307,551,3.668,735,6.307,736,6.957,737,6.957,738,6.957]],["t/110",[3,1.11,71,0.769,74,0.472,108,2.161,162,1.238,277,3.297,430,5.343,551,3.946,739,7.096,740,5.041,741,5.041,742,6.614,743,7.827,744,7.827]],["t/112",[3,1.121,71,0.776,74,0.474,97,2.709,108,2.182,162,1.25,551,3.969,658,4.623,745,6.678,746,5.235,747,7.903,748,7.165,749,7.903]],["t/114",[3,1.121,71,0.776,74,0.474,97,2.709,108,2.182,162,1.25,551,3.969,658,4.623,750,6.678,751,6.025,752,7.903,753,7.165,754,7.903]],["t/116",[3,1.11,49,1.173,56,2.854,71,0.769,74,0.507,162,1.238,165,4.681,537,6.254,551,3.946,755,7.827]],["t/118",[3,0.97,30,3.918,34,5.005,65,5.005,71,0.672,74,0.477,97,2.989,108,1.888,162,1.082,165,4.091,199,3.452,213,3.532,540,6.201,551,3.995,672,5.005,673,4.291,675,5.465,676,5.78,756,6.84,757,8.72,758,6.84,759,6.84,760,6.84]],["t/120",[3,1.022,29,5.491,71,0.708,74,0.489,97,2.469,108,1.988,162,1.14,195,6.087,213,2.65,254,3.523,545,3.758,551,3.749,615,3.523,761,10.302,762,6.087,763,3.523,764,5.491,765,7.203,766,7.203]],["t/122",[3,1.013,49,1.07,71,0.701,73,1.311,74,0.487,162,1.13,199,4.942,254,5.022,277,3.007,545,5.108,549,3.249,551,2.971,569,4.078,767,3.662,768,7.14]],["t/124",[3,1.04,49,1.099,71,0.72,73,1.333,74,0.493,88,1.957,162,1.16,199,4.598,277,3.089,545,4.753,549,3.337,551,3.051,569,3.337,767,3.761,769,7.333]],["t/126",[3,0.938,49,0.991,71,0.65,73,1.249,74,0.47,162,1.047,199,4.769,235,2.487,254,4.622,277,2.787,313,2.822,420,2.598,423,2.932,469,3.643,545,5.209,549,3.011,551,2.754,569,3.885,574,4.383,767,3.394,770,6.617,771,6.617,772,4.842,773,6.617]],["t/128",[3,0.978,16,5.258,45,1.292,49,1.034,52,1.872,71,0.678,73,1.01,74,0.521,99,2.365,162,1.091,232,4.223,252,2.365,537,5.512,551,3.648,732,4.709,774,6.898,775,6.253,776,6.898,777,6.898,778,6.898,779,6.898,780,6.898,781,6.898,782,6.898,783,6.253]],["t/130",[18,0.496,29,0.425,39,0.408,45,0.2,56,0.633,62,0.408,63,0.286,73,0.082,74,0.567,84,0.937,108,0.154,109,1.371,120,0.505,150,0.496,151,0.471,152,0.341,157,0.587,162,0.169,167,0.513,177,0.691,199,0.281,201,0.78,232,2.408,240,0.473,245,0.35,255,1.228,261,0.341,263,0.286,273,0.714,327,0.471,395,0.752,418,1.228,420,0.219,423,0.868,429,0.78,430,0.381,450,0.408,451,0.425,475,0.686,482,0.563,549,0.254,551,0.232,598,0.281,602,0.566,603,0.313,615,2.049,641,0.471,660,0.728,664,0.852,667,0.471,668,0.852,669,0.471,673,0.35,683,0.471,740,0.686,746,1.014,767,0.286,775,0.505,784,1.045,785,1.337,786,0.558,787,9.198,788,9.101,789,0.558,790,0.558,791,0.558,792,0.558,793,0.558,794,0.558,795,0.558,796,0.558,797,1.066,798,0.558,799,0.558,800,0.558,801,0.558,802,0.558,803,0.558,804,0.558,805,0.558,806,0.558,807,0.558,808,0.471,809,0.558,810,0.558,811,0.966,812,0.558,813,0.752,814,0.558,815,0.752,816,0.558,817,0.558,818,0.558,819,1.066,820,0.558,821,0.558,822,0.558,823,0.558,824,0.558,825,2.17,826,1.916,827,0.558,828,0.558,829,0.558,830,0.558,831,0.558,832,0.558,833,0.505,834,0.558,835,0.558,836,0.558,837,0.558,838,0.558,839,0.558,840,0.558,841,0.558,842,0.558,843,0.558,844,0.558,845,0.558,846,0.558,847,0.558,848,0.558,849,0.558,850,0.558,851,0.558,852,0.558,853,0.558,854,0.558,855,0.558,856,0.558,857,0.558,858,0.558,859,0.558,860,0.558,861,0.558,862,0.558,863,0.558,864,1.531,865,1.066,866,0.558,867,0.558,868,3.661,869,0.558,870,0.558,871,0.558,872,1.531,873,0.558,874,0.558,875,0.558,876,0.558,877,0.558,878,0.558,879,0.558,880,0.558,881,0.558,882,0.471,883,0.558,884,0.558,885,0.425,886,0.558,887,0.558,888,0.558,889,0.558,890,0.558,891,0.558,892,1.531,893,0.558,894,0.558,895,0.558,896,0.558,897,0.558,898,0.558,899,0.558,900,0.558,901,0.558,902,1.721,903,0.558,904,0.471,905,1.066,906,0.558,907,0.446,908,1.958,909,1.066,910,0.558,911,0.558,912,1.066,913,0.558,914,0.558,915,1.066,916,0.558,917,0.425,918,1.066,919,0.558,920,0.558,921,1.066,922,0.558,923,0.558,924,1.066,925,0.558,926,0.558,927,1.066,928,0.558,929,0.505,930,1.066,931,0.558,932,0.558,933,1.066,934,0.558,935,0.558,936,1.066,937,0.558,938,0.558,939,1.066,940,0.558,941,0.558,942,1.066,943,0.558,944,0.505,945,1.066,946,0.558,947,0.558,948,1.066,949,0.558,950,0.505,951,1.066,952,0.558,953,0.558,954,0.966,955,0.558,956,0.558,957,1.066,958,0.558,959,0.558,960,1.066,961,1.066,962,0.558,963,0.558,964,1.066,965,1.066,966,0.558,967,0.558,968,1.066,969,0.558,970,0.558,971,1.066,972,0.558,973,0.558,974,1.066,975,0.558,976,0.558,977,1.066,978,1.066,979,0.558,980,1.066,981,0.558,982,0.558,983,3.368,984,0.558,985,0.505,986,0.78,987,0.558,988,0.558,989,0.812,990,0.558,991,0.558,992,1.066,993,0.558,994,0.393,995,1.066,996,0.558,997,0.558,998,1.066,999,0.558,1000,0.558,1001,1.066,1002,0.558,1003,0.505,1004,1.066,1005,0.558,1006,0.558,1007,1.066,1008,0.558,1009,0.558,1010,1.066,1011,0.558,1012,0.558,1013,1.066,1014,1.066,1015,0.558,1016,0.558,1017,1.066,1018,0.558,1019,0.558,1020,1.066,1021,0.558,1022,0.558,1023,1.066,1024,1.066,1025,0.558,1026,0.558,1027,1.066,1028,0.558,1029,0.558,1030,0.558,1031,0.558,1032,0.558,1033,0.558,1034,0.558,1035,0.558,1036,0.558,1037,0.558,1038,0.558,1039,0.558,1040,0.558,1041,0.558,1042,0.558,1043,0.558,1044,0.558,1045,0.558,1046,0.558,1047,0.558,1048,0.558,1049,0.558,1050,0.558,1051,0.558,1052,0.558,1053,0.558,1054,0.558,1055,0.558,1056,0.558,1057,0.558,1058,0.558,1059,0.558,1060,0.558,1061,0.558,1062,0.558,1063,0.558,1064,0.558,1065,0.558,1066,0.558,1067,0.558,1068,0.558,1069,0.558,1070,0.558,1071,0.558,1072,0.558,1073,0.558,1074,0.558,1075,0.558,1076,0.558,1077,0.558,1078,0.558,1079,0.558,1080,0.558,1081,0.558,1082,0.558,1083,0.558,1084,0.558,1085,0.558,1086,0.558,1087,0.558,1088,0.558,1089,0.558,1090,0.558,1091,0.558,1092,0.558,1093,0.558,1094,0.558,1095,0.558,1096,0.558,1097,0.558,1098,0.558,1099,0.558,1100,0.558,1101,0.558,1102,0.558,1103,0.558,1104,0.558,1105,0.558,1106,0.558,1107,0.558,1108,0.558,1109,0.78,1110,0.558,1111,0.752,1112,0.752,1113,0.558,1114,0.558,1115,0.558,1116,0.558,1117,0.558,1118,0.505,1119,0.446,1120,0.558,1121,0.558,1122,0.558,1123,0.558,1124,0.505,1125,0.558,1126,2.776,1127,1.066,1128,0.558,1129,0.446,1130,0.558,1131,1.066,1132,0.558,1133,0.558,1134,0.446,1135,0.558,1136,0.333,1137,0.558,1138,0.558,1139,1.066,1140,0.558,1141,0.558,1142,0.425,1143,0.558,1144,0.558,1145,0.966,1146,0.558,1147,0.471,1148,0.558,1149,0.558,1150,0.558,1151,0.812,1152,0.558,1153,0.505,1154,0.558,1155,0.558,1156,0.505,1157,0.558,1158,0.558,1159,0.471,1160,0.558,1161,0.558,1162,0.966,1163,0.558,1164,0.558,1165,0.901,1166,0.558,1167,2.155,1168,0.558,1169,0.558,1170,2.113,1171,0.446,1172,0.558,1173,0.558,1174,0.558,1175,0.558,1176,0.393,1177,0.558,1178,0.558,1179,0.558,1180,0.558,1181,0.558,1182,0.637,1183,0.558,1184,3.09,1185,0.505,1186,0.852,1187,0.381,1188,3.053,1189,0.558,1190,0.558,1191,0.558,1192,0.558,1193,0.558,1194,0.471,1195,0.558,1196,0.558,1197,0.558,1198,0.505,1199,0.558,1200,0.812,1201,0.558,1202,0.558,1203,0.558,1204,0.558,1205,0.558,1206,0.558,1207,0.505,1208,0.558,1209,0.812,1210,0.558,1211,0.505,1212,0.558,1213,0.471,1214,0.558,1215,0.558,1216,0.558,1217,0.558,1218,0.558,1219,0.505,1220,0.558,1221,0.558,1222,0.558,1223,0.558,1224,0.558,1225,0.558,1226,0.558,1227,0.558,1228,1.08,1229,0.558,1230,1.294,1231,0.558,1232,0.408,1233,0.558,1234,0.505,1235,0.558,1236,0.425,1237,0.558,1238,1.066,1239,0.558,1240,0.558,1241,0.558,1242,0.558,1243,0.558,1244,1.066,1245,0.558,1246,0.558,1247,0.558,1248,0.558,1249,0.558,1250,0.558,1251,0.558,1252,0.558,1253,0.558,1254,0.471,1255,0.558,1256,0.505,1257,0.706,1258,0.558,1259,0.558,1260,0.558,1261,1.066,1262,0.558,1263,0.558,1264,0.558,1265,0.558,1266,0.558,1267,0.558,1268,0.558,1269,0.471,1270,0.558,1271,2.352,1272,2.352,1273,0.558,1274,0.446,1275,0.558,1276,0.558,1277,0.558,1278,0.471,1279,0.558,1280,0.558,1281,1.066,1282,0.558,1283,0.558,1284,0.558,1285,0.558,1286,0.558,1287,0.408,1288,0.558,1289,0.558,1290,0.471,1291,0.558,1292,0.408,1293,0.558,1294,0.558,1295,0.558,1296,0.558,1297,0.558,1298,0.471,1299,0.558,1300,0.558,1301,0.558,1302,0.558,1303,0.505,1304,0.505,1305,0.558,1306,0.558,1307,0.558,1308,0.558,1309,0.558,1310,0.558,1311,0.381,1312,0.558,1313,0.505,1314,0.446]],["t/133",[3,1.013,7,2.352,52,1.938,71,0.701,74,0.511,96,4.253,128,2.971,150,2.311,162,1.13,165,5.359,177,2.521,198,2.157,200,2.835,509,3.294,763,4.382,1315,3.603]],["t/135",[3,0.256,7,1.279,8,0.772,15,0.824,16,0.744,18,1.016,19,2.214,20,0.537,27,0.744,30,0.559,32,0.824,38,1.132,45,1.159,48,1.673,49,0.845,50,0.151,51,1.105,52,1.531,56,1.518,59,1.58,61,1.108,62,1.843,73,0.264,74,0.341,75,0.628,76,1.889,77,0.527,79,0.548,83,0.484,86,2.128,88,1.005,96,0.463,97,0.619,99,0.619,102,0.744,108,1.774,109,2.101,113,0.884,114,0.612,115,2.207,116,0.81,117,0.666,119,0.666,121,0.884,137,2.109,140,1.355,142,1.132,144,0.958,148,0.678,150,1.192,155,0.537,156,0.492,159,0.714,165,0.583,167,1.512,169,0.537,177,1.108,191,1.213,198,0.555,200,1.462,203,0.779,207,1.376,211,0.492,213,1.532,215,1.105,219,0.583,236,3.681,237,0.416,238,0.628,240,0.97,241,0.744,246,0.688,247,0.628,248,1.376,250,0.754,251,3.228,252,2.53,255,1.132,264,0.666,267,1.413,268,2.695,273,1.951,277,1.322,281,0.881,282,0.341,298,0.559,301,2.439,313,0.416,318,1.541,323,0.744,333,1.013,384,0.509,395,3.241,396,0.824,398,0.571,399,0.779,402,1.442,405,1.162,407,0.779,415,1.525,418,0.612,423,1.116,454,0.824,463,0.258,466,0.958,469,1.386,470,1.777,472,0.646,475,0.628,480,0.646,482,0.359,487,0.45,509,0.833,524,0.824,545,1.637,549,0.821,563,1.105,602,0.518,603,1.013,615,1.231,641,0.824,642,3.174,646,1.442,648,0.492,652,0.484,658,1.056,659,1.506,663,0.779,671,0.824,682,1.376,699,0.518,716,0.884,732,0.666,745,0.824,746,2.079,748,0.884,750,0.824,751,0.744,753,0.884,762,0.824,763,0.883,944,0.884,986,0.714,1111,1.777,1124,1.636,1126,0.646,1136,0.583,1142,2.392,1156,1.636,1167,2.598,1182,1.506,1184,2.293,1207,0.884,1209,0.744,1211,0.884,1213,1.525,1254,0.824,1287,0.714,1290,0.824,1316,2.845,1317,1.805,1318,1.805,1319,1.805,1320,1.805,1321,0.975,1322,0.779,1323,0.975,1324,0.975,1325,3.112,1326,0.975,1327,2.214,1328,0.975,1329,2.518,1330,4.593,1331,0.975,1332,3.138,1333,0.975,1334,1.442,1335,0.975,1336,0.975,1337,0.666,1338,2.439,1339,0.975,1340,0.975,1341,0.975,1342,0.975,1343,1.525,1344,0.666,1345,0.975,1346,0.975,1347,1.636,1348,1.376,1349,0.975,1350,0.975,1351,0.884,1352,0.975,1353,0.824,1354,0.975,1355,0.975,1356,0.975,1357,0.824,1358,0.975,1359,0.975,1360,0.884,1361,1.442,1362,1.056,1363,0.975,1364,1.442,1365,0.884,1366,0.975,1367,0.975,1368,0.779,1369,0.975,1370,3.241,1371,3.047,1372,0.824,1373,0.975,1374,0.975,1375,1.805,1376,0.884,1377,0.884,1378,1.805,1379,2.283,1380,0.779,1381,1.805,1382,2.845,1383,2.518,1384,2.128,1385,1.636,1386,2.283,1387,2.518,1388,0.975,1389,0.975,1390,0.628,1391,0.537,1392,1.525,1393,0.975,1394,1.668,1395,0.401,1396,0.975,1397,0.666,1398,0.824,1399,0.975,1400,0.824,1401,1.805,1402,0.824,1403,0.975,1404,1.636,1405,1.805,1406,1.805,1407,1.442,1408,2.283,1409,2.283,1410,1.92,1411,0.884,1412,0.884,1413,1.525,1414,0.975,1415,1.805,1416,1.805,1417,0.975,1418,1.805,1419,0.975,1420,0.975,1421,0.975,1422,1.636,1423,0.666,1424,2.598,1425,0.975,1426,0.884,1427,0.628,1428,0.884,1429,0.975,1430,0.975,1431,1.805,1432,0.688,1433,0.975,1434,0.714,1435,0.824,1436,0.975,1437,0.744,1438,1.636,1439,0.975,1440,0.975,1441,0.975,1442,0.824,1443,0.824,1444,0.779,1445,1.273,1446,0.884,1447,1.636,1448,1.636,1449,0.884,1450,0.824,1451,0.884,1452,1.805,1453,0.884,1454,1.805,1455,1.805,1456,0.975,1457,0.975,1458,0.824,1459,0.975,1460,1.805,1461,0.975,1462,0.975,1463,0.646,1464,0.975,1465,0.884,1466,0.975,1467,0.427,1468,0.975,1469,0.884,1470,0.666,1471,1.195,1472,0.884,1473,0.744,1474,2.296,1475,0.824,1476,1.92,1477,0.884,1478,1.525,1479,0.714,1480,0.646,1481,0.884,1482,1.442,1483,0.975,1484,0.975,1485,0.975,1486,0.975]],["t/137",[3,1.013,49,1.07,50,1.104,71,0.701,73,1.433,74,0.446,88,1.348,96,3.389,97,2.448,105,1.192,129,2.039,162,1.13,165,4.27,177,2.521,277,3.007,763,3.492,1337,6.685,1487,7.14,1488,7.14,1489,7.14,1490,7.14]],["t/139",[3,0.938,7,1.589,71,0.65,74,0.548,77,3.576,114,4.152,115,2.361,141,5.287,162,1.047,252,2.268,1316,8.568,1426,5.999,1427,6.431,1463,4.383,1491,8.537,1492,8.537,1493,5.999,1494,8.537,1495,5.999]],["t/141",[8,1.602,45,1.22,52,1.767,81,4.085,99,2.232,153,4.765,161,5.502,237,2.777,238,4.194,487,3.898,636,5.203,637,5.502,717,5.069,1361,5.203,1391,3.585,1479,4.765,1496,6.511,1497,5.903,1498,5.203,1499,6.511,1500,7.139,1501,4.964,1502,6.511,1503,5.903,1504,5.903,1505,5.903,1506,5.203,1507,6.511,1508,4.594,1509,4.313,1510,6.511,1511,6.511,1512,5.903]],["t/143",[74,0.514,785,5.502,1397,5.502,1513,7.307,1514,8.06,1515,8.06,1516,8.06,1517,8.06,1518,8.06,1519,8.06,1520,8.06]],["t/145",[8,1.788,74,0.514,240,2.801,313,4.21,487,3.353,717,3.928,1410,5.54,1521,8.214,1522,6.141,1523,5.128,1524,8.214,1525,5.128,1526,7.268,1527,9.06,1528,7.268]],["t/147",[45,0.815,48,2.149,52,1.181,102,4.872,118,2.664,131,2.128,133,2.546,138,2.352,150,2.069,200,1.728,222,3.071,248,4.872,328,3.945,348,2.31,391,3.945,393,3.945,482,2.351,648,2.196,652,2.161,717,4.093,1337,2.971,1344,2.971,1361,6.669,1397,5.171,1497,3.945,1500,5.4,1512,3.945,1529,4.352,1530,3.945,1531,4.352,1532,4.352,1533,4.352,1534,4.352,1535,4.352,1536,4.352,1537,5.794,1538,6.391,1539,6.391,1540,6.391,1541,4.352,1542,6.391,1543,4.352,1544,4.352,1545,4.509,1546,5.107,1547,4.352,1548,4.352,1549,2.803,1550,3.477,1551,3.317,1552,4.352,1553,5.774,1554,6.391,1555,4.352,1556,6.391,1557,4.352,1558,6.391,1559,4.352,1560,6.391,1561,6.391,1562,4.352,1563,6.391,1564,4.352,1565,4.352,1566,4.352,1567,4.352,1568,4.352,1569,4.352,1570,4.352,1571,4.352,1572,3.945]],["t/149",[45,1.727,52,1.473,74,0.519,97,1.86,99,1.86,100,4.585,102,4.136,108,1.498,127,2.49,170,3.97,229,2.88,235,2.039,240,1.677,420,2.13,424,2.932,487,2.503,650,4.953,717,4.984,1182,3.245,1361,4.335,1380,4.335,1479,6.261,1508,3.828,1509,3.594,1522,4.585,1525,6.037,1573,4.919,1574,6.779,1575,5.426,1576,5.426,1577,5.426,1578,4.335,1579,5.426,1580,5.426,1581,5.426,1582,5.426,1583,5.426,1584,5.426,1585,4.919,1586,5.426,1587,5.426,1588,5.426]],["t/151",[52,2.104,68,4.746,108,2.14,127,2.581,150,2.509,652,3.85,717,5.095,1343,6.551,1397,5.293,1509,5.135,1513,7.028,1525,5.47,1574,7.028,1589,7.752,1590,5.673,1591,7.752]],["t/153",[49,0.808,52,1.463,74,0.538,108,2.354,191,4.807,240,1.666,281,1.513,420,2.116,424,2.913,569,3.387,717,2.913,986,3.944,1509,6.392,1521,4.886,1525,6.016,1551,4.109,1585,4.886,1592,5.39,1593,7.73,1594,7.444,1595,5.39,1596,5.39,1597,5.39,1598,5.39,1599,7.444,1600,7.444,1601,7.444,1602,6.748,1603,5.39,1604,5.39,1605,5.39,1606,5.39]],["t/155",[45,1.48,49,1.184,59,5.984,74,0.393,108,2.182,150,2.558,160,3.069,165,4.727,223,3.925,288,6.315,1524,8.647,1607,7.903,1608,7.903]],["t/157",[8,2.044,56,2.236,61,3.47,784,5.671,1470,5.671,1473,6.332,1546,6.637,1609,8.307,1610,8.307]],["t/159",[7,1.269,8,1.3,50,1.135,73,0.773,74,0.516,162,0.836,200,2.099,252,1.812,313,2.254,414,3.729,467,6.205,530,5.867,1322,4.223,1395,4.386,1611,5.285,1612,5.285,1613,7.925,1614,5.285,1615,5.285,1616,8.381,1617,5.285,1618,5.285,1619,7.343,1620,5.285,1621,5.285,1622,5.285,1623,5.285,1624,5.285,1625,5.285,1626,4.466,1627,5.285,1628,5.285,1629,5.285,1630,5.285,1631,5.285,1632,5.285]],["t/162",[7,1.856,8,1.4,47,2.051,49,0.853,71,0.862,74,0.557,125,1.825,126,3.103,127,1.895,128,2.368,129,1.626,131,2.783,132,3.404,138,3.076,398,3.329,472,3.77,515,4.165,530,4.548,763,2.783,784,3.885,1395,3.177,1613,6.174,1616,6.529,1633,4.548,1634,4.339,1635,5.691,1636,5.691,1637,5.691,1638,5.691,1639,5.691,1640,5.691,1641,5.16,1642,4.548,1643,5.691]],["t/164",[7,1.92,8,1.472,18,1.937,47,2.157,49,0.897,71,0.785,74,0.555,125,1.919,126,3.21,127,1.993,128,2.49,132,3.579,250,1.92,398,3.501,472,3.964,515,4.379,530,4.782,717,3.234,763,2.927,784,4.086,1395,2.461,1613,6.386,1634,4.562,1641,5.425,1642,6.386,1644,5.984,1645,5.984,1646,5.984,1647,5.984,1648,5.984]],["t/166",[47,2.31,49,0.96,50,0.991,71,0.821,73,0.938,74,0.554,125,2.055,126,3.359,127,2.134,130,3.671,131,3.134,281,1.799,398,3.749,472,4.245,515,4.69,784,4.375,1395,3.438,1613,5.121,1616,5.415,1634,4.886,1649,6.409,1650,6.409,1651,6.409,1652,6.409,1653,5.415,1654,5.81]],["t/168",[7,1.629,47,2.444,49,1.016,50,1.048,71,0.852,73,0.993,74,0.545,125,2.175,126,3.484,127,2.259,128,2.823,130,3.885,131,3.317,398,3.968,472,4.493,515,4.963,784,4.631,1634,5.171,1653,5.732,1654,6.149,1655,6.149,1656,6.783,1657,6.149]],["t/170",[7,1.448,47,2.173,49,1.203,50,0.932,71,0.789,73,0.882,74,0.558,125,1.933,126,3.226,127,2.008,128,2.509,251,2.637,281,1.693,398,3.527,472,3.993,515,4.412,549,2.744,569,4.11,784,4.116,1634,4.596,1653,5.094,1655,5.465,1657,5.465,1658,6.029,1659,6.029,1660,6.029,1661,6.029,1662,6.029,1663,6.029]],["t/172",[8,1.854,18,2.44,61,2.662,76,3.866,97,2.584,213,2.773,250,1.81,282,2.635,487,3.477,630,8.401,648,3.803,907,6.022,1112,6.538,1171,7.404,1664,6.022,1665,6.022,1666,6.022]],["t/174",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/176",[6,2.092,7,1.104,8,1.637,13,2.092,45,0.861,47,1.657,49,1.283,50,0.711,73,0.673,74,0.557,88,0.868,97,1.576,105,0.768,115,2.373,125,1.474,127,2.215,160,1.785,181,4.304,198,1.465,242,3.505,250,1.104,251,2.011,252,1.576,447,5.336,487,2.121,509,3.606,564,2.121,598,4.323,1109,3.364,1467,2.011,1664,3.674,1667,2.151,1668,4.598,1669,6.652,1670,4.072,1671,7.086,1672,7.817,1673,2.581,1674,3.885,1675,4.598,1676,4.598,1677,4.598,1678,3.885,1679,4.598,1680,3.885,1681,4.598]],["t/178",[43,2.201,45,0.657,49,0.996,50,0.542,52,2.504,74,0.555,88,1.528,99,1.862,105,0.586,109,1.77,115,1.937,119,2.394,144,1.862,177,3.023,198,1.464,213,1.998,222,2.475,229,1.862,235,1.318,237,3.651,240,1.084,250,1.304,251,1.534,252,1.862,273,1.065,281,1.866,282,1.899,283,1.596,482,1.998,509,1.618,545,1.83,598,2.741,627,3.18,628,5.616,629,5.31,631,2.964,648,1.77,668,2.803,907,2.803,1109,3.974,1112,2.475,1136,2.098,1165,2.964,1171,5.979,1395,1.442,1423,3.708,1664,5.979,1670,3.325,1674,6.323,1678,2.964,1680,2.964,1682,3.507,1683,2.964,1684,3.18,1685,3.18,1686,2.394,1687,3.507,1688,2.964,1689,2.567,1690,3.507,1691,2.656,1692,3.507]],["t/180",[74,0.463,198,1.675,281,2.829,282,2.66,420,2.987,598,3.839,628,6.428,629,6.079,1109,5.567,1664,6.079,1670,4.657,1674,6.428,1678,6.428,1680,6.428,1685,6.897,1693,3.778]],["t/182",[8,1.966,21,4.562,24,6.093,45,1.121,49,0.897,56,1.611,96,2.841,213,3.311,232,4.892,240,1.85,245,6.784,250,2.161,259,5.425,545,3.122,615,2.927,767,3.07,1287,5.848,1473,4.562,1546,4.782,1665,4.782,1683,5.057,1691,2.927,1694,5.984,1695,4.562,1696,4.782,1697,5.057,1698,5.984,1699,5.057,1700,4.223,1701,7.992,1702,5.984]],["t/184",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/186",[6,2.104,7,1.111,8,1.643,13,2.104,45,0.866,47,1.666,49,1.287,50,1.328,52,1.255,73,0.677,74,0.549,88,0.873,97,2.29,105,1.434,115,2.383,125,1.483,127,2.224,129,1.321,160,1.795,198,1.471,250,1.111,252,1.585,263,3.426,267,2.596,270,3.525,282,1.617,424,2.499,482,1.701,564,3.082,1182,4.69,1467,2.022,1667,2.164,1673,2.596,1703,4.624,1704,4.624,1705,6.68,1706,4.624,1707,3.384,1708,3.157,1709,3.525,1710,3.907,1711,4.624,1712,4.624,1713,4.624,1714,4.624,1715,4.624,1716,4.624,1717,2.901,1718,3.907,1719,4.624,1720,4.624,1721,4.624]],["t/188",[18,0.911,28,1.922,45,0.855,48,0.947,49,0.862,50,0.705,52,2.565,61,0.994,74,0.557,83,1.398,88,1.249,97,1.564,99,0.965,105,0.762,108,0.777,109,2.903,115,1.628,140,1.036,144,1.494,150,1.862,160,1.093,164,3.339,177,2.567,198,1.457,213,2.117,223,1.398,235,1.058,236,1.613,237,1.946,240,0.87,245,5.142,250,1.746,251,1.996,252,1.972,254,1.377,263,3.729,267,2.561,273,1.747,276,2.34,281,1.281,282,2.011,283,1.281,387,1.216,450,2.06,482,2.434,545,1.469,740,1.813,763,1.377,764,2.146,767,1.444,1182,1.684,1184,1.55,1327,3.219,1344,1.922,1362,3.365,1427,1.813,1467,1.231,1665,2.25,1686,1.922,1691,3.555,1696,2.25,1708,1.922,1709,3.478,1710,2.379,1717,1.766,1718,2.379,1722,2.552,1723,4.136,1724,2.552,1725,2.815,1726,2.146,1727,2.146,1728,1.58,1729,2.146,1730,2.379,1731,2.552,1732,2.815,1733,2.815,1734,2.552,1735,2.815,1736,2.552,1737,2.146,1738,2.552,1739,2.552,1740,2.552,1741,2.379]],["t/190",[49,0.991,50,1.023,74,0.514,88,1.249,105,1.105,150,2.142,198,1.457,245,4.152,251,3.734,263,3.394,276,3.394,281,2.654,282,2.314,387,2.857,420,2.598,1184,3.643,1693,3.287,1708,4.518,1709,5.045,1710,5.592,1717,4.152,1718,5.592,1723,5.999,1728,3.715,1731,5.999,1738,5.999,1740,5.999,1741,5.592]],["t/192",[8,1.963,45,1.495,213,2.936,246,7.259,250,1.917,273,2.423,746,5.286,1126,5.286,1742,6.744,1743,7.981,1744,7.981,1745,6.744]],["t/194",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/196",[6,2.608,7,1.377,8,1.91,13,2.608,45,1.074,47,2.066,49,0.859,50,0.886,52,1.556,74,0.548,97,1.965,105,0.957,125,1.838,127,2.585,140,2.109,149,3.156,160,2.225,198,1.71,250,1.865,252,1.965,282,2.004,283,2.608,387,3.352,564,3.582,1397,5.3,1467,2.507,1667,2.682,1673,3.217,1696,4.58,1746,5.731,1747,5.731,1748,7.763,1749,7.763,1750,5.731]],["t/198",[49,0.877,50,0.905,52,2.138,74,0.553,99,2.007,105,0.978,115,2.089,141,4.679,177,2.781,198,1.96,235,2.2,237,3.359,240,1.81,246,4.131,250,1.892,252,2.007,276,3.003,277,2.466,281,1.644,282,2.754,283,2.665,387,3.401,1397,5.377,1751,5.855,1752,6.655,1753,5.308,1754,5.308,1755,5.308,1756,3.502]],["t/200",[74,0.492,198,1.848,281,2.356,282,2.934,420,3.295,1397,5.729,1693,4.168,1752,7.092]],["t/202",[74,0.553,246,5.418,276,3.939,387,4.048,785,5.243,1397,5.243,1752,6.489,1753,6.962,1754,6.962,1755,6.962,1756,4.593]],["t/204",[8,2.023,45,1.54,177,2.904,236,4.71,250,1.975,418,5.159,1186,6.57,1232,6.017,1523,5.802,1757,6.948,1758,6.948]],["t/206",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/208",[3,0.951,6,2.116,7,1.117,8,1.65,13,2.116,26,3.716,45,1.474,47,1.676,49,0.697,52,1.262,56,1.252,74,0.508,88,0.878,97,1.594,99,1.594,108,1.851,109,3.385,125,1.491,127,2.233,133,2.72,136,4.32,160,1.806,198,1.477,213,1.711,232,2.847,240,1.438,250,1.117,252,1.594,273,1.412,418,5.403,564,3.095,615,2.274,652,2.31,659,2.781,673,4.208,1126,4.442,1170,2.918,1236,3.545,1467,2.034,1667,2.176,1673,2.61,1757,5.668,1759,4.65,1760,6.707,1761,6.707,1762,5.668,1763,4.65,1764,4.65,1765,3.93,1766,5.668,1767,3.545,1768,4.216,1769,3.545,1770,3.403,1771,4.216,1772,4.216,1773,3.716,1774,4.216,1775,4.65]],["t/210",[45,1.374,48,2.638,49,0.693,50,0.443,52,2.332,56,2.389,74,0.555,77,1.548,83,1.423,88,1.385,99,1.586,105,0.478,108,1.277,109,2.938,115,2.077,144,1.521,150,0.927,177,3.034,198,1.282,213,2.699,220,3.698,232,1.754,235,1.077,237,3.52,240,0.886,245,1.798,250,1.111,251,1.253,252,1.996,273,2.03,274,3.159,275,1.713,276,1.47,277,1.207,281,1.299,282,1.618,283,1.304,418,4.193,652,1.423,673,1.798,732,3.159,1170,4.193,1171,3.698,1176,2.022,1232,3.386,1236,2.184,1338,3.856,1545,2.022,1667,1.341,1686,3.974,1757,2.421,1762,4.919,1765,3.91,1766,3.91,1768,2.597,1769,2.184,1770,2.097,1771,2.597,1772,2.597,1773,2.289,1774,2.597,1776,4.195,1777,6.684,1778,2.865,1779,4.195,1780,2.865,1781,2.421,1782,4.195,1783,2.865]],["t/212",[74,0.542,198,1.532,251,3.043,274,4.749,276,3.568,281,2.475,282,2.432,420,2.732,1693,3.455,1741,5.879,1762,5.879,1765,5.879,1766,5.879,1776,6.307,1779,6.307,1782,6.307,1784,6.957,1785,6.307,1786,6.957,1787,6.957,1788,6.957,1789,6.957]],["t/214",[3,0.667,8,1.157,28,3.211,45,1.267,48,1.581,49,0.705,52,1.277,56,2.131,68,4.14,73,0.688,88,0.888,97,1.613,108,2.186,125,1.509,137,3.874,144,2.497,177,1.661,198,1.489,237,2.006,238,3.03,250,2.079,263,2.413,313,2.006,318,2.88,423,2.084,430,3.211,451,3.586,487,2.17,509,2.17,602,4.595,652,2.336,673,2.951,763,2.3,1119,3.759,1136,2.813,1186,3.759,1254,3.975,1362,3.956,1432,3.319,1523,3.319,1590,3.442,1666,3.759,1684,4.264,1728,2.641,1790,6.988,1791,4.704,1792,6.517,1793,4.264,1794,4.264,1795,4.704,1796,4.704,1797,3.319,1798,4.704,1799,3.442,1800,4.949,1801,5.404,1802,3.442]],["t/216",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/218",[6,2.554,7,1.348,8,1.883,13,2.554,45,1.051,47,2.023,50,0.868,52,1.524,73,0.821,74,0.531,88,1.059,97,1.924,105,0.937,108,1.549,125,1.8,127,2.549,160,2.179,198,1.686,250,1.348,263,2.879,387,2.424,564,3.531,652,2.788,1467,2.455,1667,2.626,1673,3.151,1717,3.521,1773,4.485,1790,4.107,1792,3.718,1800,4.107,1803,5.613,1804,5.613,1805,4.743,1806,4.929,1807,5.088,1808,4.279,1809,4.485,1810,4.107,1811,3.96,1812,4.279,1813,6.467,1814,4.279]],["t/220",[18,0.791,45,0.976,48,2.591,49,0.609,50,0.628,52,2.508,56,1.093,59,3.27,71,0.24,73,0.358,74,0.558,88,1.581,96,2.474,99,0.838,105,0.678,108,1.439,115,1.449,148,0.918,177,3.263,198,1.148,200,0.97,235,0.918,237,1.732,240,0.755,250,1.252,251,1.776,252,2.082,263,3.115,264,1.668,267,1.372,281,0.686,282,1.42,283,1.112,387,1.055,402,1.4,482,1.494,602,4.284,603,1.372,732,1.668,763,1.195,1151,1.863,1187,1.668,1228,1.724,1362,1.429,1467,1.069,1686,3.558,1691,3.296,1717,2.548,1727,1.863,1728,1.372,1729,1.863,1767,1.863,1773,1.952,1790,6.321,1792,5.105,1799,1.788,1800,1.788,1806,3.911,1807,2.215,1808,1.863,1809,1.952,1810,1.788,1811,1.724,1812,1.863,1813,6.145,1814,3.096,1815,2.443,1816,2.065,1817,2.065,1818,2.065,1819,2.215,1820,2.215,1821,2.065,1822,2.972,1823,2.215,1824,2.215,1825,2.215,1826,2.065,1827,1.952,1828,2.215,1829,2.215,1830,2.215,1831,2.065,1832,2.065,1833,1.668,1834,2.443,1835,2.616]],["t/222",[74,0.516,198,1.615,263,3.761,273,2.227,387,3.167,420,2.879,1394,4.857,1400,6.197,1693,3.642,1717,4.601,1800,5.366,1806,4.723,1808,5.59,1809,5.859,1810,5.366,1811,5.174,1812,5.59,1813,6.197,1836,6.648,1837,7.333]],["t/224",[74,0.525,785,5.789,1184,4.669,1790,6.205,1792,5.617,1836,7.687]],["t/226",[45,1.51,74,0.514,125,2.585,1728,6.146,1805,6.81,1838,6.81,1839,6.81]],["t/228",[2,2.608,8,0.94,18,2.269,24,2.912,26,3.053,38,2.397,44,2.696,45,0.716,52,1.037,56,2.614,61,1.349,63,1.96,74,0.288,79,2.145,83,2.88,109,2.926,142,2.397,144,3.72,150,1.877,156,1.928,160,1.483,167,2.793,170,2.796,177,2.475,198,1.277,232,2.339,236,3.321,250,1.683,273,1.16,276,2.974,298,2.188,309,2.912,318,3.55,349,2.696,387,1.65,402,4.014,423,4.077,430,2.608,451,2.912,480,4.642,659,2.285,787,3.463,826,2.696,1111,2.696,1134,7.076,1145,3.463,1236,2.912,1376,3.463,1379,3.463,1382,3.463,1392,3.228,1402,3.228,1437,2.912,1444,3.053,1498,3.053,1590,4.243,1727,2.912,1758,3.228,1840,3.82,1841,7.008,1842,3.82,1843,3.82,1844,3.82,1845,3.82,1846,3.82,1847,3.228,1848,3.82,1849,3.228,1850,3.228,1851,3.82,1852,3.82,1853,3.82,1854,3.82,1855,3.82,1856,3.82,1857,3.463,1858,3.82,1859,3.82,1860,3.82,1861,3.82,1862,3.82,1863,3.228]],["t/230",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/232",[6,3.061,7,1.616,8,2.123,13,3.061,45,1.26,47,2.424,52,1.826,73,0.984,74,0.538,97,2.306,125,2.157,127,2.873,160,2.612,198,1.9,250,1.616,564,3.981,1467,2.942,1667,3.148,1673,3.776,1864,6.727,1865,6.727,1866,6.727,1867,5.684]],["t/234",[18,1.455,49,1.27,50,1.193,52,2.301,56,2.677,73,1.13,74,0.538,99,2.646,105,1.289,109,3.303,115,1.604,119,3.069,150,1.455,177,2.994,198,1.7,235,1.69,237,2.791,240,1.39,250,1.572,252,2.646,273,1.365,281,1.262,282,2.288,283,2.046,387,1.941,423,3.756,460,3.799,732,4.468,1134,6.773,1390,2.896,1402,6.522,1590,3.29,1863,5.531,1867,3.799,1868,5.934,1869,4.496]],["t/236",[49,1.35,50,1.393,73,1.054,74,0.546,105,1.504,198,1.586,252,3.089,420,2.828,1693,3.578,1863,6.087,1867,6.087,1868,6.53,1870,7.203,1871,6.53,1872,6.53]],["t/238",[74,0.538,387,3.587,423,3.68,785,5.671,1134,6.637,1871,7.53,1873,8.307]],["t/240",[8,2.023,48,2.764,200,3.265,250,2.346,602,5.185,652,4.084,1874,8.805]],["t/242",[49,1.162,71,0.926,74,0.469,88,1.78,198,1.707,250,1.862,1315,3.912,1368,6.194,1395,3.188,1471,5.135,1545,5.47,1875,7.752,1876,6.551,1877,7.752]],["t/244",[6,1.959,7,1.034,8,1.56,13,1.959,45,1.188,47,1.552,48,2.132,49,0.95,50,0.98,62,3.151,73,0.928,74,0.541,83,3.149,88,1.197,96,3.573,105,1.059,108,1.189,125,1.381,127,2.112,129,1.23,133,3.71,152,2.636,160,1.672,175,3.903,198,0.948,200,1.71,207,3.282,242,3.282,250,1.034,281,1.209,384,2.246,462,2.701,466,2.285,482,3.257,487,1.987,542,3.903,564,1.987,602,3.366,648,2.173,763,2.106,1368,5.067,1437,4.834,1467,1.883,1471,4.2,1667,2.015,1756,2.575,1770,3.151,1874,6.361,1876,5.358,1878,4.306,1879,5.358,1880,3.903,1881,3.903,1882,3.903,1883,5.749,1884,3.903,1885,3.903,1886,4.306,1887,3.903]],["t/246",[43,2.659,45,0.794,49,0.635,50,0.655,52,2.237,73,0.917,74,0.548,88,1.738,97,2.149,99,2.557,105,0.708,115,1.512,133,2.479,177,2.91,198,1.643,235,1.593,237,2.673,240,1.31,250,1.505,252,1.453,254,2.073,281,1.19,282,2.191,283,1.929,423,1.878,482,3.505,602,4.374,603,2.379,746,4.94,751,3.231,763,2.073,1362,2.479,1368,5.008,1697,3.581,1800,3.102,1874,5.296,1876,3.581,1880,3.842,1881,3.842,1882,6.761,1883,3.842,1888,3.842,1889,3.387,1890,3.581,1891,3.842,1892,4.238,1893,4.238,1894,3.842,1895,3.842,1896,4.238]],["t/248",[74,0.509,198,1.741,281,2.219,282,2.763,420,3.103,482,2.908,1693,3.925,1889,6.315,1890,6.678,1891,7.165,1894,7.165,1895,7.165,1897,7.903]],["t/250",[3,0.895,45,1.182,74,0.459,88,1.191,97,2.163,115,2.251,198,1.39,200,2.505,247,4.063,250,1.515,283,2.871,482,2.321,602,4.903,1348,4.81,1351,5.72,1471,4.179,1500,5.331,1756,3.773,1790,6.057,1800,4.617,1805,5.331,1806,4.063,1808,4.81,1826,5.331,1879,5.331,1884,5.72,1885,5.72,1889,6.613,1890,5.331,1898,5.72,1899,5.72,1900,5.72,1901,6.309,1902,6.309,1903,6.309]],["t/252",[8,2.065,45,1.572,75,5.405,177,2.964,250,2.016,1176,5.922,1434,6.141,1523,5.922,1904,7.608]],["t/254",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/256",[6,2.723,7,1.437,8,1.966,13,2.723,45,1.497,47,2.157,52,1.624,74,0.531,79,3.359,97,2.051,125,1.919,127,2.661,148,2.249,160,2.324,198,1.76,250,1.92,487,2.761,564,3.687,652,2.972,1467,2.617,1667,2.8,1673,3.359,1904,5.425,1905,5.984,1906,7.992,1907,7.992,1908,5.984,1909,5.425,1910,5.984,1911,5.984,1912,5.984,1913,5.425,1914,5.984]],["t/258",[18,2.635,74,0.534,213,2.995,420,3.196,1915,8.14,1916,8.14,1917,8.14,1918,8.14,1919,8.14]],["t/260",[74,0.526,75,5.771,198,2.157,223,4.45,235,2.683,237,3.045,240,2.207,250,1.715,1434,6.557,1670,5.485,1909,8.123,1913,8.123,1920,8.123]],["t/262",[198,2.015]],["t/264",[6,3.528,8,1.907,67,5.47,79,4.352,116,3.481,167,3.735,213,2.852,245,4.864,250,1.862,615,3.791,1136,4.636,1142,5.91,1453,7.028,1506,6.194,1921,7.752,1922,7.752,1923,7.752]],["t/266",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/268",[6,2.421,7,1.278,8,1.815,13,2.421,45,0.996,47,1.917,49,1.105,50,1.14,52,1.444,73,1.08,74,0.545,97,1.823,105,1.232,115,1.898,125,1.706,127,2.456,129,2.107,130,4.225,131,3.607,160,2.065,198,1.625,213,2.714,250,1.278,273,2.24,564,3.403,1142,5.623,1364,4.25,1467,2.326,1667,2.489,1673,2.986,1924,5.319,1925,5.319,1926,6.687,1927,5.319,1928,7.376,1929,5.319,1930,5.319]],["t/270",[45,1.478,48,1.572,49,0.701,50,0.723,52,1.27,56,1.813,74,0.538,76,3.455,99,1.603,105,0.781,115,1.668,177,1.652,198,1.738,235,1.758,237,2.872,240,1.446,245,4.225,250,1.618,252,2.309,254,3.86,255,4.225,281,1.313,282,2.355,283,2.128,301,3.098,337,3.952,1142,6.582,1232,3.422,1362,3.94,1364,7.615,1365,6.106,1506,3.737,1686,3.193,1700,3.3,1737,5.134,1931,4.677,1932,4.677,1933,4.677,1934,6.106,1935,4.677,1936,4.24,1937,4.677,1938,4.677,1939,4.677,1940,3.952,1941,3.737,1942,4.677]],["t/272",[74,0.492,198,1.848,251,3.67,281,2.356,282,2.934,420,3.295,1364,6.706,1693,4.168]],["t/274",[8,1.804,18,2.949,61,2.59,125,2.352,127,2.442,148,2.756,167,3.533,189,4.489,250,1.761,287,4.386,658,4.29,673,4.601,1176,5.174,1391,4.038,1549,4.723,1726,5.59,1847,6.197,1943,6.648,1944,6.648,1945,7.333,1946,6.197,1947,6.648]],["t/276",[71,0.879,763,4.375,1395,3.678]],["t/278",[6,2.258,7,1.192,8,1.728,13,2.258,45,1.316,47,1.788,49,0.743,50,0.767,73,0.726,74,0.524,75,3.196,105,0.829,125,1.591,127,2.339,129,1.417,137,2.842,138,2.682,148,1.865,160,1.927,250,1.192,276,2.545,387,3.522,420,2.759,461,3.965,564,2.29,623,3.038,742,7.91,772,3.631,1176,3.501,1467,2.17,1667,2.322,1943,6.369,1947,4.499,1948,4.962,1949,4.962,1950,4.962,1951,4.962,1952,4.962,1953,4.962,1954,4.962,1955,4.962,1956,4.962,1957,4.672,1958,4.962,1959,4.962,1960,7.026,1961,7.026,1962,4.962,1963,4.962,1964,4.962,1965,4.962,1966,4.962]],["t/280",[49,1.06,50,1.094,52,1.921,74,0.536,99,2.426,105,1.182,115,2.525,177,2.5,198,2.148,235,2.66,237,3.8,240,2.188,250,2.14,252,2.426,281,1.987,282,3.116,283,3.221]],["t/282",[74,0.498,198,1.887,281,2.406,282,2.996,420,3.365,1693,4.256]],["t/284",[8,1.552,28,4.307,30,3.614,45,1.182,52,1.713,56,2.486,97,2.163,189,3.862,245,3.958,250,2.355,283,2.871,402,3.614,487,2.911,549,2.871,551,2.625,598,3.184,652,3.134,717,3.41,1170,3.958,1348,4.81,1458,5.331,1504,5.72,1525,4.452,1814,4.81,1967,8.889,1968,6.309,1969,5.331,1970,6.994,1971,6.309,1972,6.309,1973,6.309,1974,6.309]],["t/286",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/288",[6,3.061,7,1.616,8,2.123,13,3.061,45,1.26,47,2.424,52,1.826,74,0.517,97,2.306,125,2.157,127,2.873,160,2.612,191,3.24,198,1.9,250,1.616,549,3.061,564,3.981,1467,2.942,1667,3.148,1673,3.776,1970,7.291,1975,6.727,1976,6.727,1977,6.727]],["t/290",[3,0.656,49,0.693,50,0.715,52,2.473,61,1.633,74,0.554,88,1.48,99,1.585,105,0.772,107,4.192,108,1.276,115,1.649,122,4.192,148,1.738,177,3.353,191,3.218,198,1.727,201,3.384,213,1.701,220,3.695,232,2.83,235,1.738,237,3.344,240,1.43,245,4.191,250,1.604,252,1.585,273,1.404,281,1.875,282,2.335,283,2.104,549,3.04,740,2.978,1413,3.907,1505,4.192,1709,5.092,1967,7.109,1970,3.907,1978,4.192,1979,7.258,1980,4.192,1981,4.192]],["t/292",[74,0.509,191,3.807,198,1.741,201,5.783,281,2.219,282,2.763,420,3.103,549,3.596,740,5.09,1693,3.925,1709,6.025,1981,7.165,1982,7.903]],["t/294",[8,1.726,48,2.359,60,4.019,74,0.441,83,3.485,108,1.937,115,2.503,148,3.331,177,2.478,189,4.295,191,3.38,196,4.79,219,4.197,236,4.019,250,1.685,318,4.295,348,3.725,428,4.105,549,3.193,746,4.648,1391,3.863,1437,5.349,1469,6.361,1979,5.929,1983,7.017,1984,7.017]],["t/296",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/298",[6,2.537,7,1.339,8,1.874,13,2.537,20,4.778,45,1.626,47,2.009,74,0.501,97,1.911,115,1.989,125,1.788,127,2.537,135,4.079,160,2.164,171,4.363,198,1.678,212,4.249,242,4.249,250,1.339,261,3.412,274,3.806,286,5.053,318,3.412,334,3.933,487,2.572,564,2.572,672,4.079,1338,3.692,1434,4.079,1467,2.438,1667,2.608,1673,3.129,1985,3.933,1986,7.618,1987,7.618,1988,5.053,1989,5.574,1990,4.71,1991,5.053,1992,3.069,1993,5.574,1994,5.053,1995,5.574]],["t/300",[7,1.177,20,2.699,47,1.767,71,0.482,74,0.533,102,3.737,115,1.749,125,1.572,126,2.798,127,1.632,128,2.04,135,3.587,150,1.587,171,3.99,190,6.474,191,3.903,196,4.755,212,3.737,302,3.587,331,2.649,392,3.737,420,2.735,549,3.17,673,4.37,717,2.649,784,3.347,1170,4.37,1551,3.737,1802,3.587,1985,3.459,1990,4.143,1991,8.448,1994,4.444,1996,4.902,1997,4.902,1998,4.444,1999,4.902,2000,6.966,2001,6.315,2002,4.902,2003,5.097,2004,4.902,2005,4.902,2006,4.902,2007,5.886,2008,4.902,2009,4.902,2010,4.902]],["t/302",[7,1.777,47,2.667,71,0.727,74,0.542,125,2.373,126,3.68,127,2.464,128,3.079,171,4.239,331,3.999,1985,5.221,2003,5.415,2011,7.4,2012,7.4,2013,5.913,2014,7.4]],["t/304",[7,1.746,47,2.619,71,0.714,74,0.539,125,2.331,126,3.639,127,2.42,128,3.024,171,4.163,239,6.141,331,3.928,1985,5.128,2003,5.318,2013,5.807,2015,7.268,2016,7.268,2017,7.268,2018,7.268]],["t/306",[7,1.777,47,2.667,71,0.727,74,0.542,125,2.373,126,3.68,127,2.464,128,3.079,171,4.239,331,3.999,1985,5.221,2003,5.415,2013,5.913,2019,7.4,2020,7.4,2021,7.4]],["t/308",[7,1.761,20,4.038,47,2.643,71,0.72,74,0.54,125,2.352,126,3.66,127,2.442,128,3.051,171,4.2,331,3.963,1985,5.174,2003,5.366,2013,5.859,2022,7.333,2023,7.333,2024,7.333]],["t/310",[7,1.481,20,3.395,45,1.155,47,2.222,71,0.606,74,0.55,99,2.114,125,1.977,126,3.275,127,2.053,128,2.566,171,3.532,281,1.731,287,3.688,302,4.512,331,3.332,423,2.732,424,3.332,569,3.71,571,5.21,1985,4.351,2003,4.512,2025,6.166,2026,6.166,2027,6.166,2028,6.166,2029,6.166,2030,6.166,2031,6.166,2032,8.152,2033,6.166]],["t/312",[18,1.723,20,1.882,43,2.145,45,1.225,48,2.198,49,0.798,50,0.528,52,2.483,74,0.56,88,1.393,99,1.172,105,0.571,108,1.47,115,1.22,135,3.896,148,1.285,171,3.05,177,3.124,189,2.093,191,4.081,196,4.464,198,1.44,212,2.606,213,1.959,219,2.045,232,2.093,235,1.285,236,1.958,237,3.147,240,1.646,245,2.145,250,1.279,251,1.495,252,1.825,258,3.099,261,3.259,262,3.099,273,1.617,274,3.635,275,2.045,276,1.754,277,1.44,278,2.889,281,1.495,282,1.862,283,1.556,466,1.815,487,1.577,584,2.606,615,1.672,658,2,1170,2.145,1979,4.499,1980,3.099,1988,3.099,1990,2.889,2001,3.099,2007,4.499,2034,3.419,2035,3.419,2036,3.419,2037,2.265,2038,3.419,2039,3.419,2040,3.099,2041,3.419]],["t/314",[74,0.522,135,5.567,171,4.358,198,1.675,212,5.799,251,3.327,261,4.657,274,5.194,276,3.902,281,2.617,282,2.66,420,2.987,1693,3.778,2007,6.428,2040,6.897]],["t/316",[1,3.312,3,0.931,8,1.615,30,3.76,56,1.767,63,3.367,74,0.422,109,3.312,144,3.484,155,3.614,167,3.162,250,1.577,273,1.993,301,4.348,482,2.415,1182,3.926,1347,5.951,1407,5.245,1413,5.547,1726,6.474,2042,7.176,2043,6.564,2044,6.564,2045,5.951,2046,5.547,2047,6.564,2048,5.547,2049,6.564,2050,6.564,2051,6.564,2052,5.245,2053,5.547,2054,6.564]],["t/318",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/320",[6,3.495,7,1.844,8,2.306,13,3.495,45,1.438,47,2.768,74,0.466,125,2.463,127,3.121,160,2.982,250,1.844,564,3.543,1467,3.359,1667,3.593,2055,7.679]],["t/322",[2056,9.147]],["t/324",[74,0.541,1129,6.776,1708,5.789,2057,8.48,2058,7.687]],["t/326",[18,1.192,28,3.849,49,0.552,50,0.569,52,2.466,56,0.991,62,2.694,73,0.539,74,0.548,76,1.889,88,1.064,99,2.632,105,0.615,115,1.314,150,1.192,169,2.027,177,3.208,198,1.509,200,1.462,213,2.074,235,1.384,237,2.922,240,1.138,250,1.646,252,1.262,267,2.067,273,2.513,281,1.034,282,1.971,283,2.566,418,2.31,423,1.631,482,3.045,642,2.807,1129,5.474,1184,2.027,1325,3.111,1338,2.439,1427,3.631,1471,2.439,1545,2.598,1590,2.694,1688,3.111,1691,1.801,1707,2.694,1708,2.514,1728,3.846,1729,2.807,2042,7.376,2059,5.111,2060,5.111,2061,3.682,2062,2.942,2063,3.338,2064,3.111,2065,5.111,2066,3.682,2067,6.211,2068,5.638]],["t/328",[18,1.54,29,5.199,44,3.358,45,0.891,49,1.194,50,0.736,56,1.281,70,4.812,73,0.697,74,0.546,88,0.898,105,0.795,108,1.882,150,1.54,198,1.048,250,1.143,252,1.631,281,2.444,282,1.664,283,2.166,420,1.869,423,3.022,482,1.751,772,4.99,1129,3.803,1184,2.62,1198,6.182,1590,3.483,1666,3.803,1693,3.958,1707,3.483,1708,3.249,1728,2.672,1872,4.314,2042,4.021,2059,4.314,2060,4.314,2063,6.182,2064,4.021,2065,4.314,2067,4.314,2069,4.759,2070,7.97,2071,7.97,2072,4.759,2073,4.021,2074,4.314,2075,4.759,2076,6.182]],["t/330",[7,2.016,18,2.716,108,2.317,250,2.016,273,2.548,1228,5.922,1523,5.922,2077,8.392,2078,7.092]],["t/332",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/334",[7,1.7,47,2.551,49,1.06,50,1.094,71,0.695,73,1.036,74,0.544,105,1.182,125,2.27,126,3.579,127,2.357,128,2.945,129,2.022,132,4.233,136,4.558,384,3.692,1957,4.054,2079,7.078,2080,7.078,2081,5.981]],["t/336",[39,2.025,43,1.736,48,3.41,52,2.753,74,0.554,88,1.805,99,0.949,109,1.397,147,2.211,164,2.025,177,3.611,198,1.252,232,1.694,235,1.04,237,1.919,240,0.856,250,1.081,251,2.487,252,2.245,276,2.308,277,1.166,281,0.777,282,1.573,283,1.259,301,2.98,387,1.195,397,2.339,418,4.844,551,1.152,1147,2.339,1184,3.131,1185,2.509,1186,5.233,1187,1.889,1188,6.532,1232,2.025,1303,2.509,1304,2.509,1467,1.21,2082,4.079,2083,4.079,2084,2.509,2085,4.079,2086,4.079,2087,2.768,2088,4.5,2089,4.5,2090,4.5,2091,4.5,2092,4.5,2093,5.155,2094,2.768,2095,2.768,2096,2.768,2097,2.509,2098,2.509,2099,2.509,2100,2.509,2101,2.509,2102,2.509,2103,2.509,2104,2.509,2105,2.509,2106,2.509]],["t/338",[43,4.365,74,0.438,198,1.532,276,3.568,301,5.838,387,3.004,418,5.53,420,2.732,1147,5.879,1219,6.307,1693,3.455,2082,6.307,2083,6.307,2084,6.307,2085,6.307,2086,6.307,2093,6.307,2097,6.307,2098,6.307,2099,6.307,2100,6.307,2102,6.307,2103,6.307,2104,6.307,2105,6.307,2106,6.307]],["t/340",[250,2.058,482,3.682,487,3.954,631,7.241,1112,6.046,1835,5.519]],["t/342",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/344",[1,3.516,3,0.817,7,0.909,8,0.931,47,1.364,49,1.044,50,0.89,71,0.566,73,0.843,74,0.548,76,1.941,79,2.125,88,0.714,105,0.632,115,1.35,116,1.699,125,1.214,126,2.313,127,1.26,128,1.575,129,1.081,132,2.264,136,4.488,137,2.168,140,1.393,149,2.084,199,1.91,223,1.88,237,2.455,250,0.909,251,1.655,252,1.297,281,1.063,384,1.974,387,1.634,402,2.168,420,1.486,482,3.083,602,3.056,652,1.88,718,2.671,904,3.198,1112,4.063,1665,5.568,1689,2.77,1806,2.438,1957,3.992,2107,3.198,2108,3.198,2109,3.198,2110,3.198,2111,5.22,2112,5.22,2113,5.22,2114,3.431,2115,3.198,2116,3.198,2117,4.865,2118,3.198,2119,3.198,2120,3.198,2121,5.22,2122,3.431,2123,3.431,2124,3.431,2125,3.198,2126,5.758,2127,3.431,2128,3.198,2129,3.785,2130,3.431,2131,3.785,2132,4.865,2133,3.785,2134,3.785]],["t/346",[7,0.76,45,0.593,47,1.141,49,1.287,50,1.192,71,0.611,73,1.036,74,0.558,76,1.624,77,1.711,79,3.493,88,0.946,99,1.085,105,1.039,115,1.788,125,1.015,126,2.013,127,1.054,128,1.318,129,0.904,132,1.894,136,2.039,146,2.234,198,0.697,229,1.681,251,2.192,252,1.718,255,1.986,281,0.889,282,1.107,335,2.675,387,1.367,420,1.243,424,1.711,461,2.53,482,1.165,602,2.661,1112,6.473,1398,2.675,1689,2.317,1756,2.998,1806,2.039,1957,3.564,2081,2.675,2107,2.675,2108,2.675,2109,2.675,2110,2.675,2111,5.641,2112,5.641,2113,5.641,2114,2.87,2115,2.675,2116,2.675,2117,4.236,2118,2.675,2119,2.675,2120,2.675,2121,2.87,2122,2.87,2123,2.87,2124,2.87,2125,4.236,2127,4.544,2128,4.236,2135,3.166,2136,2.87,2137,5.013,2138,3.166,2139,5.013,2140,3.166,2141,3.166,2142,3.166,2143,3.166,2144,2.87,2145,3.166,2146,3.166,2147,3.166,2148,3.166,2149,2.87,2150,3.166,2151,3.166,2152,3.166]],["t/348",[7,1.051,47,1.577,49,1.254,50,1.174,71,0.43,73,1.112,74,0.56,76,2.244,77,2.364,79,3.602,88,0.826,105,1.269,109,2.208,115,1.561,125,1.403,126,2.577,127,1.457,128,1.821,129,1.25,132,2.617,136,2.818,251,1.913,252,1.5,273,1.329,281,1.228,387,1.889,482,2.795,785,2.987,1109,3.202,1112,5.904,1879,5.422,1957,3.675,2081,3.697,2107,3.697,2108,3.697,2109,3.697,2110,3.697,2115,3.697,2116,3.697,2117,5.422,2118,3.697,2119,3.697,2120,3.697,2125,3.697,2128,3.697,2149,3.966,2153,6.416,2154,6.416,2155,4.375,2156,4.375,2157,3.697,2158,4.375]],["t/350",[45,1.324,48,2.377,52,2.417,56,1.043,59,3.677,73,0.858,74,0.55,76,4.043,88,1.598,97,1.328,99,2.702,156,2.958,164,4.289,177,3.145,198,1.557,235,1.456,237,3.61,240,1.198,250,1.408,252,2.009,263,1.988,273,1.177,281,1.646,282,2.049,283,1.763,482,3.276,603,2.175,907,3.096,1109,2.836,1394,3.882,1395,1.593,1467,1.695,1666,4.683,1691,1.895,1792,3.882,1799,2.836,1806,3.775,1816,3.274,1817,3.274,1818,3.274,1819,3.513,1820,3.513,1821,3.274,2157,3.274,2159,5.314,2160,3.875,2161,3.513,2162,3.875,2163,5.314,2164,3.875]],["t/352",[1,3.184,49,1.384,50,1.279,73,1.352,74,0.548,105,1.382,198,1.39,263,3.236,273,1.916,315,4.179,420,2.477,482,2.321,569,3.766,1394,4.179,1693,3.134,1792,4.179,1799,4.617,1806,4.063,2157,5.331,2159,5.72,2163,5.72,2165,6.309,2166,6.309,2167,6.309,2168,6.309]],["t/354",[1,4.013,3,0.843,6,2.703,8,1.462,28,4.056,45,1.679,52,2.159,56,1.599,68,3.637,79,3.335,81,3.727,125,1.905,137,3.403,144,3.153,146,4.192,201,4.347,238,3.826,250,2.153,313,2.533,318,3.637,423,2.632,629,4.747,652,3.95,1136,3.553,1327,5.612,1432,4.192,1450,5.02,1523,4.192,1727,4.529,1728,3.335,1758,5.02,1801,6.355,1802,4.347,2169,5.941,2170,5.02,2171,5.941,2172,5.386,2173,5.941,2174,5.941,2175,5.941]],["t/356",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/358",[6,2.437,7,1.286,8,1.823,13,2.437,45,1.003,47,1.93,49,1.273,50,1.313,52,1.453,73,0.784,74,0.546,88,1.011,97,1.835,105,1.419,125,1.717,127,2.467,160,2.079,198,1.632,250,1.286,252,1.835,263,2.746,270,4.082,282,1.872,564,3.419,740,3.448,1167,3.778,1370,3.778,1467,2.342,1667,2.505,1673,3.006,1707,3.918,1717,3.359,1728,3.006,2176,5.354,2177,5.354,2178,4.524,2179,4.524,2180,3.778,2181,5.354,2182,4.524,2183,5.354,2184,5.354]],["t/360",[3,0.836,45,1.105,56,2.13,74,0.521,81,3.7,159,4.316,236,3.378,238,3.798,263,4.06,270,4.496,415,6.688,469,3.247,740,3.798,1463,3.906,1508,4.161,1707,4.316,1737,4.496,1992,3.247,2178,4.984,2180,4.161,2185,4.984,2186,8.098,2187,7.914,2188,5.898,2189,4.984,2190,5.898,2191,5.898,2192,7.914,2193,5.898,2194,5.898,2195,7.175,2196,7.914,2197,7.914,2198,5.898]],["t/362",[3,0.435,28,3.34,45,1.142,49,0.914,50,0.943,52,2.527,56,1.872,62,2.247,73,0.449,74,0.558,88,0.923,97,1.677,99,1.053,105,1.018,108,1.35,109,1.549,115,2.175,116,1.379,164,2.247,177,1.084,198,1.343,213,1.13,235,1.838,237,2.086,240,0.949,250,1.67,251,2.14,252,2.09,263,2.509,264,2.096,267,1.724,275,1.836,277,1.293,281,0.862,282,1.71,283,1.397,313,1.309,387,1.326,395,2.167,402,1.759,482,1.13,648,1.549,650,3.24,652,1.525,659,1.836,718,2.167,740,3.151,742,4.134,763,1.502,904,4.134,985,2.784,989,2.341,1182,1.836,1327,4.303,1344,2.096,1362,1.796,1370,3.452,1395,1.263,1427,1.978,1545,2.167,1691,3.401,1695,3.729,1708,2.096,1717,3.069,1724,2.784,1727,2.341,1728,2.746,1729,2.341,1898,4.435,2037,2.034,2182,4.134,2185,2.595,2186,2.784,2189,4.134,2195,2.784,2199,3.071,2200,2.784,2201,3.071,2202,2.784,2203,2.784,2204,2.784,2205,3.071,2206,3.071]],["t/364",[49,1.293,50,1.334,73,0.984,74,0.538,88,1.27,105,1.441,198,1.481,251,3.773,263,3.45,387,2.905,420,2.641,740,4.332,989,5.128,1370,4.746,1693,3.341,1708,4.592,1717,4.22,2182,5.684,2189,5.684,2202,6.098,2203,6.098,2204,6.098,2207,6.727]],["t/366",[45,1.51,74,0.514,125,2.585,1728,6.146,1838,6.81,1839,6.81,2178,6.81]],["t/368",[8,1.741,18,2.884,61,2.5,125,2.27,127,2.357,148,2.66,167,3.41,189,4.333,250,1.7,287,4.233,308,5.179,423,3.136,673,4.441,1165,5.981,1391,3.897,1549,4.558,1726,5.396,1847,5.981,1944,6.417,1946,5.981,2208,8.911,2209,7.078,2210,7.078,2211,6.417,2212,5.981]],["t/370",[71,0.879,763,4.375,1395,3.678]],["t/372",[3,0.836,6,2.684,7,1.417,8,1.947,13,2.684,45,1.105,47,2.125,52,2.148,74,0.51,77,3.187,97,2.022,125,1.891,127,2.635,146,6.303,148,2.216,155,3.247,160,2.29,198,1.743,219,5.342,222,4.161,250,1.417,298,3.378,368,5.347,549,3.602,564,3.652,584,4.496,1467,2.579,1667,2.76,1673,3.311,2212,4.984,2213,5.898,2214,5.898,2215,5.898,2216,5.898,2217,5.898]],["t/374",[3,0.83,4,3.584,8,1.441,49,0.877,50,0.905,52,2.138,74,0.55,88,1.105,99,2.007,105,0.978,115,2.089,177,2.781,198,1.96,219,5.323,235,2.2,237,3.795,240,1.81,250,1.892,252,2.007,281,1.644,282,2.754,283,2.665,402,3.354,549,2.665,584,4.464,652,2.908,1550,4.679,2212,4.948,2218,5.855,2219,5.855]],["t/376",[74,0.498,198,1.887,281,2.406,282,2.996,420,3.365,1693,4.256]],["t/378",[8,2.108,18,2.774,250,2.058,717,4.631,718,6.046,1525,6.046,2220,8.569]],["t/380",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/382",[6,1.408,7,0.743,8,1.211,13,1.408,38,1.941,44,2.183,45,0.58,47,1.115,49,0.464,50,0.761,52,1.336,56,0.833,67,2.183,73,0.453,74,0.549,88,0.584,97,2.394,105,0.517,115,1.104,116,1.389,125,0.992,127,1.639,137,1.772,140,1.138,150,1.984,160,1.201,168,2.472,177,1.093,191,3.365,198,1.35,250,1.182,254,1.513,268,2.264,277,1.303,281,0.869,287,2.943,298,1.772,334,3.473,349,2.183,397,2.614,423,1.371,463,0.819,472,2.049,544,2.805,564,2.271,569,2.789,574,2.049,717,3.775,767,3.144,1257,2.049,1311,3.36,1334,2.472,1371,2.264,1442,2.614,1467,1.353,1509,3.26,1549,4.499,1602,2.805,1667,1.448,1673,1.737,2052,2.472,2221,2.805,2222,2.183,2223,3.094,2224,2.805,2225,2.805,2226,2.805,2227,3.094,2228,8.515,2229,2.805,2230,3.933,2231,2.805,2232,2.805,2233,4.159,2234,3.094,2235,3.094,2236,5.179,2237,5.179,2238,3.094,2239,2.805,2240,2.805,2241,2.614,2242,3.094,2243,3.094,2244,3.094,2245,3.094,2246,3.094,2247,2.805,2248,3.094,2249,3.094,2250,3.094,2251,2.805,2252,2.805,2253,2.805,2254,3.094,2255,2.805,2256,3.094,2257,3.094,2258,2.805,2259,3.094,2260,3.094,2261,2.614]],["t/384",[44,3.57,49,0.48,50,0.969,52,2.5,56,0.862,73,0.469,74,0.551,81,2.01,88,1.629,97,1.098,99,1.734,105,0.845,115,1.143,150,1.037,153,2.344,172,1.499,177,3.048,198,1.381,223,1.591,235,1.204,237,3.307,240,1.564,250,1.215,251,1.401,252,2.442,254,1.567,267,1.798,277,1.349,281,1.42,282,1.769,283,1.458,402,1.835,423,1.419,463,0.848,509,1.478,563,1.961,648,1.617,717,4.191,720,2.707,722,2.904,767,1.643,994,2.26,1182,3.026,1287,2.344,1311,3.454,1334,2.56,1423,2.187,1509,4.718,1549,3.258,1899,2.904,2048,2.707,2230,2.56,2236,4.275,2237,4.275,2240,2.904,2241,2.707,2247,2.904,2251,2.904,2252,2.904,2253,2.904,2255,4.587,2258,2.904,2261,4.275,2262,3.204,2263,5.059,2264,2.122,2265,3.204,2266,3.204,2267,2.904,2268,3.204,2269,3.204,2270,4.587,2271,2.904,2272,3.204,2273,2.904,2274,3.204,2275,3.204,2276,3.204,2277,3.204,2278,3.204,2279,3.204]],["t/386",[44,4.994,74,0.485,150,2.291,198,1.559,251,3.096,281,2.502,282,2.475,420,2.779,720,5.981,767,3.631,994,4.994,1182,4.233,1423,4.832,1509,4.688,1549,4.558,1693,3.515,2230,5.656,2236,5.981,2237,5.981,2261,5.981,2264,4.688,2267,6.417,2270,6.417,2273,6.417]],["t/388",[45,0.62,56,2.352,63,1.697,73,0.484,74,0.57,75,2.13,140,1.217,148,1.243,150,1.071,172,1.548,213,2.355,273,2.201,472,2.191,475,2.13,545,3.34,549,1.505,602,2.754,603,2.913,623,3.919,767,2.661,785,2.258,1182,1.978,1209,2.522,1313,2.999,1334,2.643,1371,3.797,1423,2.258,1525,2.334,1992,1.821,2170,2.795,2233,2.795,2264,2.191,2280,3.308,2281,3.308,2282,3.308,2283,3.308,2284,3.308,2285,5.188,2286,3.308,2287,3.308,2288,3.308,2289,3.308,2290,3.308,2291,3.308,2292,3.308,2293,3.308,2294,3.308,2295,6.402,2296,4.704,2297,3.308,2298,3.308,2299,3.308,2300,3.308,2301,3.308,2302,3.308,2303,3.308,2304,3.308,2305,3.308,2306,2.795,2307,3.308,2308,3.308,2309,3.308,2310,3.308,2311,3.308,2312,3.308,2313,3.308,2314,3.308,2315,3.308,2316,3.308,2317,3.308,2318,3.308,2319,3.308,2320,3.308,2321,3.308,2322,3.308,2323,3.308,2324,3.308,2325,3.308,2326,3.308,2327,3.308,2328,3.308,2329,3.308,2330,3.308]],["t/390",[8,2.003,110,7.38,232,4.983,250,1.955,419,5.957,500,6.504,1391,4.482,1394,5.392,2331,8.802,2332,6.879,2333,6.879]],["t/392",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/394",[6,3.011,7,1.589,8,2.1,13,3.011,45,1.24,47,2.385,50,1.023,52,1.796,73,1.249,74,0.526,105,1.105,125,2.122,127,2.843,129,1.89,160,2.569,198,1.457,250,2.05,564,3.939,1467,2.894,1667,3.096,2332,5.592,2334,5.999,2335,5.999,2336,5.999,2337,6.617]],["t/396",[49,0.841,50,1.183,52,2.364,74,0.546,99,2.624,105,1.278,115,2.002,177,3.076,198,1.918,235,2.109,236,3.215,237,3.714,240,1.735,250,1.838,251,2.455,252,2.624,281,1.576,282,2.676,283,2.554,313,2.393,419,5.601,451,5.835,1391,4.214,2338,6.939,2339,6.939,2340,5.088,2341,4.485]],["t/398",[74,0.486,198,1.811,251,3.596,281,2.309,282,2.875,420,3.229,1693,4.084,2338,7.454,2339,7.454,2340,7.454]],["t/400",[8,2.086,56,2.283,109,4.279,155,4.669,167,4.085,250,2.037,1111,7.018]],["t/402",[18,3.11,24,2.606,30,4.853,50,1.141,56,2.381,71,0.899,73,1.08,74,0.455,88,1.727,96,1.623,144,4.695,155,1.882,160,1.328,167,1.647,198,0.753,203,2.732,213,3.255,264,2.334,267,1.919,277,1.44,399,4.254,405,3.429,410,4.499,469,5.67,646,2.732,739,4.827,741,2.202,1167,2.412,1187,2.334,1395,3.035,1443,5.526,1835,3.429,2200,3.099,2342,3.419,2343,3.419,2344,7.999,2345,3.419,2346,8.019,2347,3.419,2348,7.999,2349,3.419,2350,3.419,2351,3.419,2352,3.419,2353,2.889,2354,3.419,2355,3.419,2356,3.419,2357,3.419,2358,3.419,2359,2.889,2360,2.889,2361,3.419]],["t/404",[6,1.017,7,0.537,8,0.927,13,1.017,18,1.582,24,1.704,45,1.386,47,0.806,49,1.253,50,1.074,56,1.545,60,1.28,61,0.789,73,1.017,74,0.555,79,1.255,83,2.851,88,0.712,94,1.889,97,1.676,105,1.161,115,2.287,125,0.717,127,1.255,136,1.44,144,2.001,149,1.231,160,1.464,167,3.564,207,1.704,213,2.112,229,1.186,242,1.704,250,0.537,270,1.704,273,1.743,275,1.337,279,1.786,281,2.348,399,1.786,402,2.159,405,1.44,481,1.577,534,1.889,549,2.612,564,1.031,569,4.009,637,1.889,648,1.128,731,2.026,741,1.44,902,1.636,989,2.874,1111,3.449,1119,1.786,1167,4.05,1182,1.337,1187,1.526,1298,1.889,1370,1.577,1371,1.636,1423,1.526,1443,4.131,1467,0.978,1479,1.636,1593,2.026,1667,1.046,1673,1.255,2346,2.026,2359,1.889,2360,1.889,2362,2.235,2363,2.235,2364,3.77,2365,2.235,2366,2.235,2367,2.235,2368,2.235,2369,3.77,2370,3.77,2371,3.77,2372,3.77,2373,2.235,2374,2.235,2375,2.235,2376,2.235,2377,2.235,2378,2.235,2379,2.235,2380,5.74,2381,6.41,2382,4.889,2383,2.235,2384,2.235,2385,2.235,2386,2.235,2387,2.026,2388,2.235,2389,3.77,2390,4.889,2391,4.889,2392,4.889,2393,1.889,2394,2.235,2395,2.026,2396,2.235]],["t/406",[3,0.475,18,1.696,43,2.101,45,1.209,49,0.502,50,0.518,52,1.981,56,1.737,74,0.551,86,5.452,88,0.632,97,1.148,99,1.148,105,0.559,108,0.924,109,2.644,115,1.195,144,4.822,167,3.516,177,2.577,198,1.745,213,1.927,235,1.258,237,2.752,240,1.035,250,1.258,252,1.148,267,1.88,273,1.591,275,2.003,277,2.207,279,4.186,280,4.749,281,1.812,282,1.832,283,1.524,309,2.553,387,1.446,395,3.696,405,4.7,466,1.777,480,2.218,488,2.363,602,1.777,642,4.919,648,1.69,652,1.663,659,2.003,735,4.749,1111,2.363,1325,2.83,1327,2.363,1338,2.218,1395,2.154,1404,4.749,1445,3.696,1446,3.036,1447,4.749,1448,4.749,1449,3.036,1450,2.83,1451,3.036,1481,4.749,1482,2.676,2359,2.83,2360,2.83,2393,4.427,2397,3.349,2398,3.349,2399,3.349,2400,3.349,2401,3.349,2402,3.349]],["t/408",[74,0.48,198,1.775,279,6.44,281,2.901,282,2.818,405,5.191,420,3.165,1693,4.003,2393,6.81,2403,8.06]],["t/410",[8,2.201,250,2.149,741,5.762]],["t/412",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/414",[7,1.406,47,2.11,49,1.18,50,1.217,57,4.464,71,0.575,73,1.153,74,0.553,105,1.315,125,1.878,126,3.164,127,1.95,128,2.437,130,3.354,131,2.863,132,3.502,187,4.679,384,3.054,763,2.863,882,4.948,1670,3.584,1695,4.464,1957,4.511,2404,5.855,2405,5.855,2406,6.293,2407,5.308,2408,6.655,2409,5.308,2410,5.308,2411,5.308]],["t/416",[1,2.551,3,0.717,43,3.171,48,1.699,52,1.932,57,6.281,74,0.548,99,1.733,148,1.9,164,3.699,177,2.514,198,1.815,199,2.551,235,1.9,237,3.513,240,1.563,250,1.71,252,1.733,261,3.094,268,3.699,277,2.129,281,1.419,282,1.767,283,2.3,387,3.074,461,4.039,549,2.3,741,4.584,763,2.472,767,2.593,885,3.853,1444,4.039,1670,3.094,1695,3.853,1756,3.023,1797,3.567,1814,3.853,2406,4.039,2412,4.582,2413,3.853,2414,5.055,2415,5.055,2416,5.055,2417,5.055,2418,5.055,2419,4.582,2420,5.055,2421,5.055]],["t/418",[74,0.498,198,1.887,420,3.365,1693,4.256,1695,6.532,2419,7.768]],["t/420",[8,2.131,213,3.186,250,2.08,298,4.961,2422,7.318,2423,8.66]],["t/422",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/424",[6,2.871,7,1.515,8,2.036,13,2.871,45,1.182,47,2.274,49,0.945,52,1.713,71,0.62,74,0.53,88,1.191,97,2.837,125,2.023,127,2.756,160,2.45,190,5.041,198,1.823,250,1.515,273,2.513,564,3.819,1184,3.474,1257,4.179,1362,3.691,1467,2.759,1667,2.952,1673,3.542,2231,5.72,2424,6.309,2425,6.309]],["t/426",[45,0.918,49,0.735,50,0.758,52,2.395,56,2.375,71,0.482,74,0.548,88,1.315,99,2.388,105,0.819,115,1.749,149,2.699,177,3.115,198,1.784,235,1.842,237,3.762,240,1.516,250,1.673,252,1.681,273,2.46,281,1.376,282,2.435,283,2.231,313,2.091,482,2.563,1184,2.699,1257,5.366,1362,4.74,1423,3.347,1683,4.143,1691,2.398,1697,5.886,1799,5.097,1812,3.737,2422,4.143,2426,4.902]],["t/428",[25,6.201,45,1.633,48,2.3,52,1.857,56,1.841,74,0.434,167,3.295,198,1.921,273,2.077,281,1.92,282,2.391,420,2.686,1176,4.826,1344,4.67,1362,5.616,1693,3.397,1781,5.78,1799,5.005,1812,5.214,2053,5.78,2064,5.78,2422,5.78,2427,6.84,2428,6.201,2429,5.78,2430,6.84]],["t/430",[57,5.967,96,3.715,116,3.514,148,2.941,250,1.88,487,3.611,549,3.562,1292,5.728,1314,6.254,1322,6.254,1835,5.041,2078,6.614,2412,8.597,2431,7.827,2432,7.827]],["t/432",[71,0.869,198,1.949,1315,4.465,1395,3.638]],["t/434",[7,1.427,47,2.141,49,1.192,50,1.229,57,4.529,71,0.584,73,1.164,74,0.554,105,1.328,125,1.905,126,3.195,127,1.978,128,2.472,130,3.403,131,2.905,132,3.553,187,4.747,384,3.099,763,2.905,1670,3.637,1957,4.555,2406,6.355,2407,5.386,2408,6.72,2409,5.386,2410,5.386,2411,5.386,2433,5.941,2434,5.941]],["t/436",[8,2.086,61,2.995,115,3.025,250,2.037,283,4.526,1475,7.165,2435,8.48]],["t/438",[50,1.311,71,0.833,105,1.416,252,2.907,1348,6.464,1395,4.09,2436,7.687]],["t/440",[3,0.759,6,2.437,7,1.78,8,1.823,13,2.437,45,1.003,47,1.93,49,1.273,50,1.313,56,2.287,71,0.728,73,1.084,74,0.542,100,4.524,125,1.717,126,2.151,127,2.467,128,2.228,129,1.529,140,1.97,150,2.398,160,2.079,250,1.286,252,1.835,283,2.437,302,3.918,331,2.894,564,2.47,1391,2.948,1467,2.342,1667,2.505,1785,4.854,2222,3.778,2437,5.354,2438,5.354,2439,6.261,2440,5.354,2441,7.41,2442,5.354]],["t/442",[3,1.031,8,1.788,28,4.962,45,1.361,52,1.973,68,4.449,125,2.331,137,4.163,238,4.681,250,2.371,313,3.099,318,4.449,423,3.22,652,3.61,1136,4.347,1432,5.128,1523,5.128,1728,4.08,1801,7.239,1802,5.318,1822,5.318]],["t/444",[14,4.143,20,2.699,48,1.648,50,0.758,71,1.063,73,1.364,88,1.759,198,1.08,240,1.516,252,1.681,313,3.762,348,2.602,482,1.804,1136,2.932,1257,3.247,1315,2.474,1327,3.459,1553,8.178,1691,4.557,1822,7.684,2170,4.143,2443,4.902,2444,4.902,2445,4.444,2446,4.444,2447,4.444,2448,4.902,2449,4.444,2450,4.902,2451,4.444,2452,4.902]],["t/446",[6,1.939,7,1.023,8,1.548,13,1.939,45,0.798,47,1.535,48,1.432,49,0.638,50,0.659,52,1.156,73,0.624,74,0.564,105,0.711,108,1.737,125,1.366,127,2.095,129,1.217,149,2.346,160,1.654,181,2.346,198,0.938,200,2.499,250,1.023,263,2.185,281,2.1,450,3.118,482,2.753,564,2.903,569,4.198,571,6.322,574,2.822,1136,2.548,1467,1.863,1667,1.994,1691,3.077,1728,2.392,1756,2.548,1822,6.449,2449,3.862,2453,4.261,2454,4.261,2455,4.261,2456,4.261,2457,4.261,2458,4.261,2459,4.261,2460,4.261,2461,4.261,2462,4.261,2463,4.261,2464,4.261,2465,4.261,2466,4.261]],["t/448",[18,1.025,45,0.939,48,3.279,52,2.551,56,0.852,65,2.317,71,0.311,74,0.55,88,1.682,108,0.874,109,1.598,115,1.129,118,1.938,148,1.19,177,3.318,198,1.37,200,1.257,235,1.19,237,2.138,240,0.979,250,0.76,251,2.721,252,2.133,263,2.571,264,2.161,267,1.777,313,1.35,423,1.403,482,1.165,602,4.353,603,1.777,732,2.161,1151,2.414,1187,2.161,1228,2.234,1257,3.32,1362,1.852,1467,1.385,1686,3.422,1691,1.548,1717,3.145,1728,2.814,1729,2.414,1767,2.414,1790,5.178,1806,4.007,1808,2.414,1809,2.53,1810,2.317,1811,2.234,1814,2.414,1816,2.675,1817,2.675,1818,2.675,1821,2.675,1822,6.001,1823,2.87,1824,2.87,1825,2.87,1826,2.675,1827,2.53,1828,2.87,1829,2.87,1830,2.87,1831,2.675,2161,2.87,2306,2.675,2429,2.675,2467,2.87,2468,2.87,2469,4.743,2470,2.87]],["t/450",[74,0.505,198,1.707,263,3.977,420,3.044,602,4.115,1693,3.85,1717,4.864,1806,4.993,1811,5.47,2429,6.551,2467,7.028,2468,7.028,2469,5.91,2470,7.028,2471,7.752]],["t/452",[74,0.542,273,2.4,602,4.195,623,4.838,785,5.395,2469,7.81,2472,7.903,2473,7.903,2474,7.903]],["t/454",[3,1.079,45,1.746,74,0.522,125,2.44,137,4.358,1691,4.558,1728,6.049,1838,6.428,1839,6.428,2475,7.607]],["t/456",[1,3.912,8,1.907,11,4.864,12,5.91,66,7.028,67,5.47,167,3.735,250,1.862,348,4.115,767,3.977,1230,6.551,1700,5.47,2476,9.21,2477,6.551,2478,7.752]],["t/458",[71,0.879,763,4.375,1395,3.678]],["t/460",[1,2.616,6,2.359,7,1.245,8,1.782,13,2.359,45,0.971,47,1.868,49,0.777,52,1.407,67,3.658,74,0.522,97,1.777,125,1.662,127,2.412,139,4.799,146,3.658,160,2.013,198,1.596,250,2.006,432,6.568,564,3.343,660,3.539,1126,3.433,1170,3.252,1184,2.854,1467,2.267,1667,2.426,1673,2.91,1957,2.969,2233,4.38,2477,7.641,2479,5.184,2480,7.245,2481,5.184,2482,3.793,2483,7.245,2484,5.184,2485,3.952,2486,5.184,2487,5.184,2488,5.184,2489,5.184,2490,4.699,2491,5.184,2492,5.184,2493,5.184,2494,5.184,2495,5.184]],["t/462",[1,2.023,8,0.986,45,1.126,49,0.601,50,0.62,52,2.539,74,0.555,88,1.621,97,1.374,99,1.374,105,0.669,115,1.43,139,2.655,148,3.013,177,3.303,198,1.589,199,2.023,223,2.986,235,1.506,237,2.564,240,1.239,250,1.444,251,1.753,252,2.061,261,2.454,267,2.25,275,2.397,281,1.125,282,2.102,283,1.824,430,2.737,549,2.736,732,2.737,902,2.933,1176,2.828,1232,2.933,1410,3.056,1550,3.203,1833,2.737,2476,5.451,2477,3.387,2482,4.4,2496,5.451,2497,4.009,2498,3.634,2499,3.634,2500,3.056,2501,4.009,2502,3.634,2503,5.451,2504,4.009,2505,5.451,2506,4.009,2507,5.451,2508,4.009,2509,4.009]],["t/464",[74,0.485,198,1.559,251,3.096,261,4.333,281,1.987,282,2.475,420,2.779,1693,3.515,2482,5.179,2496,6.417,2499,6.417,2502,6.417,2503,6.417,2507,6.417,2510,8.911,2511,8.911,2512,8.911,2513,8.911,2514,8.911,2515,7.078]],["t/467",[6,2.405,8,1.3,13,3.342,30,3.027,74,0.263,77,2.856,81,3.316,101,4.466,142,3.316,154,3.092,156,2.667,165,3.161,167,2.546,238,3.404,243,4.466,269,4.029,384,2.757,487,2.438,562,4.466,650,3.5,658,3.092,1170,3.316,1290,4.466,1362,3.092,1424,3.729,1699,4.466,1726,4.029,1769,4.029,1801,4.223,1934,4.791,2132,4.466,2172,4.791,2413,4.029,2469,4.029,2516,5.285,2517,4.466,2518,4.791,2519,5.285,2520,5.285,2521,4.791,2522,5.285,2523,5.285,2524,5.285,2525,5.285,2526,4.791,2527,5.285,2528,4.466,2529,5.285,2530,5.285,2531,5.285,2532,4.791,2533,4.791,2534,4.791,2535,5.285,2536,5.285,2537,5.285,2538,5.285,2539,5.285,2540,5.285,2541,5.285,2542,5.285,2543,5.285,2544,5.285,2545,4.791,2546,5.285]],["t/469",[8,1.41,11,3.596,18,1.855,21,4.369,30,4.447,43,3.596,45,1.074,54,5.196,56,2.09,137,3.283,140,2.109,145,5.196,213,3.239,275,4.643,349,4.044,384,4.05,762,4.843,1434,4.194,1445,5.478,1700,5.478,1737,4.369,2264,5.142,2518,5.196,2545,5.196,2547,7.763,2548,5.731,2549,5.196,2550,5.731,2551,5.731,2552,5.196,2553,5.196,2554,5.731,2555,5.731,2556,5.731,2557,5.731,2558,5.731,2559,5.731,2560,5.918,2561,5.731,2562,5.3,2563,5.731,2564,5.731]],["t/471",[8,1.854,11,4.729,213,3.41,275,5.542,1391,5.102,1445,6.538,2264,6.138,2560,7.064,2562,6.326,2565,7.537,2566,7.537,2567,7.537,2568,7.537]],["t/473",[8,1.854,11,4.729,213,3.41,275,5.542,1391,5.102,1445,6.538,2264,6.138,2560,7.064,2562,6.326,2569,7.537,2570,7.537,2571,7.537,2572,7.537]],["t/475",[8,1.854,11,4.729,213,3.41,275,5.542,954,6.833,1391,5.102,1445,6.538,2264,6.138,2560,7.064,2562,6.326,2573,7.537,2574,7.537,2575,7.537]],["t/477",[8,1.854,11,4.729,213,3.41,275,5.542,1391,5.102,1445,6.538,2264,6.138,2560,7.064,2562,6.326,2576,7.537,2577,7.537,2578,7.537,2579,7.537]],["t/479",[6,3.603,13,2.141,18,2.189,20,2.59,29,5.156,38,2.951,61,1.661,68,4.14,74,0.336,77,4.279,133,2.752,144,3.59,167,3.258,236,3.874,243,5.715,269,3.586,276,2.413,384,4.981,833,6.131,994,3.319,1182,5.178,1343,5.715,1390,3.03,1427,5.1,1707,3.442,1745,3.975,2053,5.715,2264,3.116,2395,4.264,2490,4.264,2532,4.264,2533,4.264,2534,4.264,2553,6.131,2562,6.261,2580,4.704,2581,4.704,2582,4.704,2583,4.704,2584,4.704,2585,4.704,2586,4.704,2587,4.704,2588,4.704,2589,4.704,2590,6.763,2591,6.763,2592,4.704,2593,4.704,2594,4.704,2595,4.264,2596,4.704,2597,4.704]],["t/481",[8,1.3,18,1.711,45,0.99,49,1.1,59,4.607,61,1.866,73,1.075,85,4.466,96,2.509,108,2.027,133,3.092,156,4.258,159,5.373,172,2.473,221,3.235,250,1.269,264,5.013,337,4.466,348,2.805,405,6.171,414,3.729,469,4.043,509,3.388,648,2.667,650,3.5,729,6.657,763,2.584,1167,5.181,1391,2.91,1394,4.863,1395,3.019,1475,4.466,1545,3.729,2136,4.791,2306,4.466,2333,6.205,2598,5.285,2599,5.285,2600,5.285,2601,5.285,2602,5.285,2603,4.791,2604,5.285,2605,4.791,2606,4.791,2607,5.285,2608,4.466]],["t/483",[71,0.931,73,1.388,267,5.323,405,6.107,1395,4.36,2436,7.096,2609,9.483,2610,7.827]],["t/485",[6,1.146,7,1.486,8,1.025,13,1.146,18,1.348,45,0.78,47,0.908,49,1.342,50,0.823,56,1.121,59,1.58,61,0.89,71,0.673,73,1.196,74,0.564,97,0.864,105,0.696,125,0.808,126,2.139,127,1.387,128,2.216,156,2.102,160,0.978,244,2.284,250,0.605,267,2.338,281,2.379,327,2.129,331,2.878,384,2.173,414,2.939,420,0.989,424,2.878,564,1.162,569,3.36,648,1.271,772,3.048,929,2.284,1200,3.176,1390,3.985,1467,1.102,1667,1.179,1957,3.544,2074,3.776,2439,2.129,2485,3.176,2562,2.844,2606,3.776,2608,2.129,2611,2.519,2612,6.188,2613,4.166,2614,2.519,2615,4.166,2616,2.519,2617,4.166,2618,2.519,2619,4.166,2620,4.166,2621,3.776,2622,4.166,2623,4.166,2624,6.188,2625,2.519,2626,2.519,2627,2.519,2628,5.326,2629,2.519,2630,2.519,2631,2.519,2632,2.519,2633,2.284,2634,2.519,2635,2.519,2636,5.326,2637,2.519,2638,2.519,2639,2.519,2640,6.188,2641,2.519,2642,2.519,2643,2.519,2644,2.519]],["t/488",[1,3.159,3,0.888,5,5.003,8,2.026,12,4.773,45,1.173,83,3.11,140,2.304,142,5.166,149,3.447,158,5.676,160,2.431,161,6.958,191,3.016,196,4.274,525,5.003,1408,5.676,1458,5.29,1467,2.738,1474,4.581,1537,7.465,1722,5.676,1745,5.29,2517,5.29,2645,5.676,2646,6.261,2647,5.676,2648,6.261,2649,6.261,2650,6.261,2651,6.261,2652,6.261,2653,6.261,2654,6.261,2655,6.261,2656,6.261,2657,6.261,2658,6.261]],["t/490",[3,0.843,45,1.49,49,0.89,50,0.918,61,2.809,68,4.868,73,1.461,74,0.395,79,4.464,97,2.036,99,2.726,116,2.667,137,4.555,213,2.186,250,1.427,298,3.403,314,4.056,419,4.347,650,3.935,718,4.192,917,6.063,1391,4.379,1435,6.72,1578,4.747,1936,5.386,1992,3.271,2413,4.529,2659,5.386,2660,5.386,2661,5.941,2662,5.941,2663,5.386,2664,5.941,2665,5.941,2666,5.941]],["t/492",[3,0.974,4,2.264,5,5.49,8,2.151,20,3.783,26,4.521,34,2.707,39,2.707,40,3.125,45,1.441,46,2.82,67,3.992,74,0.504,83,2.81,96,2.686,116,1.661,133,2.164,139,2.45,142,4.31,160,2.197,171,2.119,191,3.31,196,2.525,199,2.855,200,1.469,222,2.61,238,4.425,239,3.125,247,2.382,1357,3.125,1427,2.382,1434,2.707,1438,3.353,1506,4.521,1530,3.353,1573,6.228,2037,2.45,2132,3.125,2211,5.129,2271,3.353,2469,5.237,2500,2.82,2521,3.353,2528,3.125,2549,3.353,2562,2.525,2595,3.353,2633,3.353,2667,9.62,2668,3.353,2669,5.658,2670,5.129,2671,3.699,2672,3.353,2673,3.699,2674,3.699,2675,5.658,2676,3.699,2677,3.699,2678,3.699,2679,5.658,2680,3.699,2681,5.658,2682,3.699,2683,3.699,2684,3.699,2685,3.699,2686,3.699,2687,3.699,2688,3.699,2689,3.699,2690,3.699,2691,3.699,2692,3.699,2693,3.699,2694,3.353]],["t/494",[3,0.923,7,1.564,8,2.079,49,0.976,50,1.006,52,2.293,61,2.299,73,1.505,74,0.494,105,1.087,114,4.085,137,3.73,139,4.313,165,3.894,198,1.434,247,4.194,487,3.004,562,5.502,564,3.004,569,2.963,763,3.184,1391,4.652,1394,4.313,1480,5.596,2695,6.511,2696,6.511]],["t/496",[8,2.229,19,5.128,45,1.361,116,3.263,137,4.163,250,1.746,318,4.449,1424,6.965,1428,6.589,1463,4.814,2500,5.54,2697,6.589,2698,7.268,2699,6.589,2700,6.589,2701,6.589,2702,6.589,2703,6.589,2704,6.589,2705,6.589,2706,6.589]],["t/498",[74,0.463,167,3.665,207,5.799,229,4.038,248,5.799,673,4.773,1292,5.567,1736,6.897,2645,6.897,2707,6.897,2708,7.607,2709,7.607,2710,7.607,2711,7.607,2712,7.607,2713,7.607,2714,6.897,2715,7.607]],["t/500",[1,2.797,3,0.786,7,0.865,8,0.886,33,2.541,47,1.298,49,1.227,50,1.173,63,1.847,70,2.541,71,0.354,73,1.11,74,0.566,79,2.021,105,1.128,116,1.617,117,2.458,118,2.204,125,1.155,126,2.226,127,1.199,128,3.157,150,2.187,167,1.734,186,3.264,235,1.353,240,1.113,247,2.319,281,1.556,314,2.458,331,1.946,475,5.276,717,1.946,767,3.466,1119,2.877,1407,2.877,1549,4.351,1626,3.042,2221,3.264,2229,6.125,2230,5.398,2707,3.264,2716,3.601,2717,3.601,2718,3.601,2719,3.601,2720,3.601,2721,5.542,2722,3.601,2723,3.601,2724,3.601,2725,3.601,2726,3.601,2727,3.601,2728,3.601,2729,3.601,2730,3.601,2731,3.601,2732,3.601,2733,3.601,2734,3.601,2735,3.601,2736,3.601]],["t/503",[3,1.02,7,0.958,8,2.109,45,1.122,47,1.438,49,1.198,50,1.112,52,1.626,61,2.541,68,2.442,71,0.392,73,1.318,74,0.523,79,2.239,97,1.367,99,1.367,105,1.201,123,3.616,125,1.279,126,2.406,127,1.328,128,1.66,129,2.055,133,2.334,140,1.468,177,1.409,199,3.023,221,2.442,235,1.499,250,1.439,331,2.156,407,3.187,419,2.919,460,3.371,509,3.319,717,2.156,767,3.073,917,3.041,1003,5.431,1337,4.09,1391,2.196,1427,2.569,1730,3.371,1770,2.919,1832,3.371,1833,2.723,1850,3.371,2037,2.642,2062,3.187,2331,5.431,2332,6.079,2334,3.616,2335,3.616,2336,3.616,2498,3.616,2737,3.989,2738,5.991,2739,3.371,2740,3.989,2741,3.989,2742,3.989,2743,3.989,2744,3.989,2745,3.989,2746,5.991,2747,3.989]],["t/505",[3,0.691,8,1.199,49,1.039,50,0.753,52,2.192,61,2.449,73,1.487,74,0.533,97,1.67,105,0.814,108,1.345,167,2.348,199,4.876,213,2.552,240,2.144,420,2.723,487,3.2,569,2.218,615,2.383,767,4.513,815,3.438,825,3.894,826,3.438,994,4.894,1337,4.735,1400,4.118,1508,3.438,1770,3.566,1797,3.438,2341,5.542,2552,6.288,2748,4.118,2749,6.824,2750,4.418,2751,4.418,2752,4.418,2753,4.873,2754,4.873,2755,4.873]],["t/507",[3,0.775,7,0.85,8,1.345,11,2.22,12,2.697,13,1.61,45,0.663,49,1.001,50,0.547,52,1.814,61,2.87,73,1.503,74,0.539,96,1.679,97,2.945,108,0.977,112,3.207,114,2.22,139,4.426,144,1.878,159,2.589,160,1.374,165,3.27,167,1.704,198,1.204,199,4.101,213,2.012,222,2.496,229,1.878,233,3.207,240,1.69,248,4.168,281,1.535,420,1.389,564,1.632,569,3.041,658,2.07,659,3.996,693,2.99,717,1.912,763,1.73,767,2.804,994,2.496,1390,3.521,1391,1.948,1394,2.343,1444,4.369,1473,2.697,1480,2.343,1546,2.827,1770,2.589,1797,2.496,2048,2.99,2333,2.99,2341,4.369,2413,2.697,2439,2.99,2668,3.207,2694,3.207,2749,4.62,2750,3.207,2751,3.207,2752,3.207,2756,3.538,2757,3.538,2758,3.538,2759,3.538,2760,3.538,2761,3.538,2762,3.538,2763,3.538,2764,3.538]],["t/510",[3,0.807,7,1.367,8,1.4,20,3.134,30,3.26,45,1.447,47,2.051,52,1.545,71,0.559,74,0.504,114,3.571,125,1.825,126,3.103,127,2.573,231,5.16,658,5.132,672,4.165,745,4.809,750,4.809,1410,7.172,1411,5.16,1412,5.16,1435,4.809,1508,4.016,1793,5.16,2046,4.809,2659,5.16,2765,7.726,2766,5.691,2767,5.691,2768,5.16,2769,5.691,2770,5.691,2771,5.691,2772,5.16,2773,5.691,2774,5.691,2775,5.691,2776,5.691,2777,5.691,2778,5.691]],["t/512",[97,3.588,108,2.89,142,5.814,144,4.919,658,6.124,746,6.138,751,7.064]],["t/514",[8,2.169,13,3.166,60,3.985,99,2.385,119,4.749,140,2.56,166,5.879,211,3.511,219,4.161,349,4.909,352,6.738,1338,4.608,1362,4.07,1498,5.559,1737,5.303,1802,5.091,1941,5.559,2779,6.957,2780,6.957,2781,7.991,2782,8.772,2783,6.957]],["t/516",[1,4.457,7,1.517,33,5.295,61,3.537,71,0.62,73,0.924,74,0.559,77,2.315,83,2.127,108,1.182,126,2.537,128,2.628,133,2.506,140,1.576,148,2.374,177,1.513,250,1.802,331,3.414,348,2.273,352,4.184,354,5.047,355,5.123,356,5.047,357,5.047,358,5.047,359,5.047,360,5.047,361,5.047,362,5.338,363,5.338,364,5.338,365,5.338,366,5.338,367,5.338,917,3.265,1437,3.265,2101,3.883,2784,4.283]],["t/518",[1,3.918,7,1.377,45,1.074,49,1.163,50,1.2,61,3.332,71,0.563,73,1.136,74,0.555,105,1.296,126,2.302,128,2.385,140,2.109,148,2.154,250,1.377,282,2.004,315,3.796,330,5.196,331,3.097,352,3.796,354,4.58,355,5.3,356,4.58,357,4.58,358,4.58,359,4.58,360,4.58,361,4.58,584,4.369,1857,5.196,2785,5.731,2786,5.731]],["t/520",[8,1.872,70,5.368,97,2.608,99,2.608,133,4.45,150,2.462,156,3.839,548,4.773,598,3.839,1338,5.039,2787,7.607,2788,6.897,2789,6.897,2790,6.897,2791,6.897,2792,6.897,2793,6.897,2794,6.897,2795,6.897]],["t/522",[8,1.506,61,2.161,71,0.601,73,1.516,74,0.54,96,2.905,99,2.098,237,2.61,240,3.318,372,5.548,548,3.839,2796,7.354,2797,5.548,2798,7.354,2799,6.12,2800,5.548,2801,5.548,2802,6.12,2803,5.548,2804,6.12,2805,5.548,2806,5.548,2807,6.12]],["t/524",[7,2.251,71,0.754,99,2.632,140,3.723,154,4.492,156,3.875,162,1.215,172,3.593,333,4.311,548,4.818,598,3.875,2788,6.962,2796,6.962,2808,6.962,2809,7.679]],["t/526",[3,0.604,7,1.797,47,1.535,49,1.321,50,1.156,71,0.618,73,1.29,74,0.554,77,2.303,99,1.46,105,1.249,125,1.366,126,2.527,127,1.419,128,1.773,129,1.217,140,3.04,150,2.037,154,2.492,156,2.15,162,0.674,172,1.994,200,3.281,247,2.744,281,1.767,333,2.392,348,2.262,352,2.822,375,5.704,450,3.118,464,3.862,548,2.673,598,2.15,1633,3.404,2789,6.782,2797,3.862,2810,4.261,2811,7.481,2812,6.292,2813,4.261,2814,4.261,2815,4.261,2816,4.261,2817,3.404,2818,4.261,2819,4.261,2820,4.261,2821,4.261,2822,3.862,2823,4.261,2824,4.261]],["t/528",[7,2.251,71,0.754,99,2.632,154,4.492,156,3.875,162,1.215,172,3.593,333,4.311,352,6.701,548,4.818,598,3.875,2790,6.962,2798,6.962,2808,6.962,2825,7.679]],["t/530",[7,2.176,71,0.714,99,2.491,140,2.674,154,4.252,156,3.667,162,1.15,172,3.401,200,3.598,247,4.681,333,4.08,348,3.858,352,6.845,548,4.56,598,3.667,2791,8.214,2800,6.589,2826,7.268]],["t/532",[3,0.819,7,2.122,18,2.525,49,1.169,71,0.567,73,0.845,74,0.56,99,1.979,114,3.621,115,2.059,156,2.913,162,0.913,281,2.19,398,4.563,477,5.233,548,3.621,598,2.913,1213,6.591,1360,5.233,1493,5.233,2792,7.072,2801,5.233,2822,5.233,2827,5.772,2828,5.772,2829,5.772,2830,5.772,2831,5.772,2832,5.772,2833,5.772]],["t/534",[7,2.332,71,0.8,99,2.79,156,4.108,162,1.288,548,5.107,598,4.108,2793,7.38,2803,7.38,2834,8.14,2835,8.14]],["t/536",[7,2.332,71,0.8,99,2.79,156,4.108,162,1.288,388,7.38,548,5.107,598,4.108,2794,7.38,2805,7.38,2836,8.14]],["t/538",[3,0.641,4,2.768,7,2.392,45,0.847,47,1.629,49,0.677,71,0.646,73,0.662,74,0.525,77,2.443,99,1.55,125,1.45,126,2.64,127,1.505,129,1.291,140,2.418,148,2.91,156,2.281,162,0.715,172,2.115,219,2.704,247,2.912,281,1.269,323,7.593,334,3.19,336,5.958,348,2.4,352,4.353,509,2.086,548,4.857,598,2.281,763,3.214,1256,4.099,1427,2.912,1495,7.705,1626,3.82,1633,3.612,2485,3.447,2795,5.958,2806,4.099,2837,4.521,2838,4.521,2839,4.521,2840,6.572,2841,4.521,2842,4.521,2843,4.521,2844,4.521,2845,4.521,2846,4.521,2847,4.521,2848,4.521]],["t/541",[7,1.529,8,1.858,19,5.874,45,1.192,48,1.455,49,0.649,50,0.669,73,1.105,74,0.499,88,1.202,99,2.588,105,0.723,108,1.195,114,2.716,129,1.236,131,2.117,138,2.339,150,2.061,156,2.184,169,2.383,177,1.529,198,0.953,200,1.719,203,6.033,236,2.479,237,1.846,240,1.338,313,3.55,423,1.918,487,2.937,509,2.937,564,1.997,646,3.459,1126,2.867,1292,3.168,1422,3.924,1423,2.955,1424,6.259,1474,7.018,1476,6.763,1477,3.924,1478,7.035,1479,4.658,1480,2.867,1850,3.658,2849,4.329,2850,4.329,2851,4.329,2852,4.329,2853,3.459,2854,4.329,2855,4.329,2856,3.924,2857,3.459]],["t/543",[3,0.652,7,1.104,8,1.131,19,6.894,20,2.531,47,1.657,49,0.689,50,0.711,71,0.452,73,0.673,74,0.543,96,2.182,105,0.768,114,2.885,125,2.133,126,2.672,127,1.531,129,1.313,131,2.248,138,2.485,155,2.531,160,1.785,195,3.885,229,2.44,261,2.814,331,2.485,487,2.121,545,3.47,564,2.121,717,2.485,763,2.248,1424,6.044,1474,3.364,1476,3.505,1508,3.244,2482,3.364,2500,6.929,2603,4.168,2647,4.168,2699,4.168,2700,4.168,2701,7.086,2702,4.168,2703,4.168,2704,4.168,2705,4.168,2706,4.168,2856,4.168,2857,3.674,2858,4.598,2859,4.598,2860,4.598,2861,4.598,2862,4.598,2863,4.598,2864,4.598]],["t/546",[1,2.124,3,0.597,4,2.576,7,2.501,18,1.739,45,0.788,48,0.858,49,1.177,50,1.214,56,1.857,61,3.698,71,0.902,73,1.15,74,0.518,88,1.697,97,0.874,105,1.24,109,1.287,125,0.818,140,1.977,148,1.582,149,1.404,150,2.018,152,2.576,153,1.866,154,1.492,155,2.317,157,3.799,162,0.666,170,3.08,181,1.404,215,5.622,219,3.213,250,0.613,273,0.775,287,2.517,288,3.363,289,2.155,290,2.155,291,2.155,292,2.155,293,2.155,294,2.155,295,2.155,296,2.155,297,2.155,298,1.461,299,2.155,300,2.155,301,1.689,302,1.866,303,2.155,304,2.155,305,3.556,306,2.155,307,2.155,308,1.866,309,1.944,310,2.038,311,2.155,312,2.155,313,1.088,314,1.741,315,4.57,316,3.556,317,3.363,318,1.561,319,2.155,320,1.944,321,2.038,322,2.155]],["t/548",[3,0.638,13,2.046,49,1.156,50,1.193,56,2.531,73,1.13,74,0.512,75,4.215,88,1.457,105,1.289,118,2.752,119,3.069,129,1.284,140,3.84,146,3.172,148,3.533,150,1.455,157,4.667,169,2.476,171,2.575,172,2.104,211,2.269,237,1.917,335,3.799,349,4.618,1482,3.592,1498,3.592,1667,3.063,1781,3.799,1835,2.896,1926,4.076,1992,2.476,2185,3.799,2224,4.076,2225,4.076,2739,3.799,2781,4.076,2782,5.934,2865,4.496,2866,4.496,2867,4.496,2868,4.496,2869,4.496,2870,4.496,2871,4.496,2872,4.496,2873,4.496]],["t/550",[0,1.79,1,1.712,3,0.28,11,3.32,21,1.505,45,1.304,48,1.499,49,1.101,50,1.136,56,0.913,61,1.869,65,1.445,73,1.076,74,0.545,81,2.128,97,1.163,99,0.677,105,1.227,130,1.131,140,3.245,148,1.275,150,0.639,157,1.087,172,4.331,177,2.298,180,1.669,183,4.472,185,1.79,200,2.584,211,1.712,215,2.077,223,1.685,229,1.048,237,0.842,255,1.239,281,1.486,355,3.613,384,1.03,387,1.465,392,1.505,428,3.806,482,0.727,549,0.899,598,0.997,636,2.711,986,1.445,1278,1.669,1298,3.769,1390,1.272,1427,1.272,1463,1.308,1467,2.606,1471,5.088,1473,1.505,1522,1.669,1553,1.505,1667,0.924,1686,1.348,1730,1.669,1756,2.029,1797,1.393,1810,1.445,1849,1.669,1998,1.79,2413,1.505,2526,1.79,2768,1.79,2874,1.975,2875,1.975,2876,2.867,2877,1.578,2878,1.975,2879,3.076,2880,1.79,2881,5.292,2882,5.292,2883,1.975,2884,1.975,2885,1.975,2886,1.975,2887,1.975,2888,4.762,2889,3.564,2890,1.975,2891,2.711,2892,3.393,2893,1.578,2894,1.79,2895,1.975,2896,3.076,2897,1.975,2898,1.975,2899,1.975,2900,1.975,2901,1.975,2902,1.79,2903,1.975,2904,1.975,2905,1.975,2906,1.578,2907,1.975,2908,1.975,2909,1.975,2910,1.975,2911,1.975,2912,1.975,2913,1.975,2914,3.393,2915,1.975,2916,1.975,2917,1.975,2918,1.975,2919,1.975,2920,1.975,2921,1.975,2922,1.975,2923,1.975,2924,1.975,2925,1.975,2926,1.975,2927,1.975,2928,1.975,2929,1.975,2930,1.975,2931,1.975,2932,1.975,2933,1.975,2934,1.79,2935,1.79,2936,1.79,2937,1.79,2938,1.975,2939,1.975,2940,1.975,2941,1.975]],["t/552",[3,0.811,8,0.923,11,1.395,12,1.695,30,1.273,45,0.912,48,2.148,49,0.957,50,0.884,61,0.785,73,0.837,74,0.541,76,1.925,88,0.42,105,0.955,116,2.568,136,1.432,140,2.105,148,0.835,149,1.224,155,2.066,156,1.122,157,2.681,172,2.99,177,1.325,252,0.762,277,0.936,287,1.33,334,1.569,348,1.992,384,1.957,387,1.62,402,1.273,549,1.708,563,1.361,623,1.361,644,2.015,826,1.569,917,1.695,986,1.627,1184,4.727,1236,1.695,1353,1.878,1390,1.432,1471,4.233,1503,2.015,1699,1.878,1792,1.472,1802,1.627,1849,1.878,1900,2.015,1957,4.917,2052,1.776,2058,2.015,2130,2.015,2739,1.878,2906,1.776,2942,8.585,2943,2.223,2944,2.223,2945,2.223,2946,3.752,2947,2.223,2948,3.752,2949,2.223,2950,2.223,2951,2.223,2952,2.223,2953,3.752,2954,2.223,2955,2.223,2956,2.223,2957,2.223,2958,2.223,2959,2.223,2960,2.223,2961,2.223,2962,2.223,2963,2.223,2964,2.223,2965,2.223,2966,2.223,2967,2.223,2968,3.402,2969,2.223,2970,2.223,2971,2.223,2972,3.563,2973,3.402,2974,2.223,2975,2.223,2976,3.752,2977,3.752,2978,2.223,2979,2.223,2980,2.223,2981,2.223,2982,2.223,2983,2.223,2984,2.223,2985,2.223,2986,1.878,2987,3.752,2988,2.223,2989,3.402,2990,2.223,2991,2.223,2992,2.223,2993,2.223,2994,5.72,2995,3.752,2996,4.869,2997,4.869,2998,4.869,2999,2.223,3000,4.869,3001,2.223,3002,3.752,3003,2.223,3004,2.223,3005,2.223,3006,2.223,3007,2.223,3008,2.223,3009,2.223,3010,2.223,3011,2.223,3012,2.223,3013,2.223,3014,2.223,3015,2.223,3016,2.223,3017,2.223,3018,2.223,3019,2.223,3020,2.223,3021,2.223]],["t/554",[3,0.754,8,1.309,20,2.929,21,4.055,45,0.996,49,1.105,50,1.14,56,1.986,67,3.753,73,1.08,74,0.494,83,2.642,97,2.528,99,3.292,105,0.888,108,1.468,129,1.519,130,3.047,131,3.607,138,2.875,140,1.957,148,3.182,150,1.722,156,2.684,157,2.929,213,2.714,215,3.256,219,3.181,250,2.196,273,2.24,282,2.96,308,3.892,314,3.631,315,3.523,321,4.25,323,4.055,648,3.722,1327,3.753,1398,4.495,1463,3.523]],["t/556",[1,3.955,7,1.396,33,4.102,45,1.089,61,3.352,71,0.571,74,0.553,116,2.61,117,3.969,126,2.335,128,2.419,140,2.139,146,4.102,250,2.13,331,3.142,352,5.192,354,4.645,355,3.969,356,4.645,357,4.645,358,4.645,359,4.645,360,4.645,361,4.645,362,4.912,363,4.912,364,4.912,365,4.912,366,4.912,367,4.912,2517,4.912,2906,4.645,3022,5.813]],["t/559",[3,0.447,7,0.435,8,0.446,32,1.531,40,1.531,43,3.547,45,0.782,47,0.653,48,1.059,49,0.847,50,0.487,56,1.344,61,0.64,68,1.109,71,0.309,73,0.827,74,0.559,76,4.303,79,3.961,83,0.9,88,1.067,97,1.08,105,0.526,114,1.137,115,0.646,116,0.814,117,1.237,125,1.01,126,1.265,127,0.603,129,0.518,130,1.038,131,1.54,137,1.804,138,0.979,139,1.2,144,0.962,165,1.084,169,0.998,199,0.914,200,1.659,213,1.837,220,1.448,235,2.779,240,0.56,251,0.793,252,1.432,255,1.976,276,2.56,277,0.763,281,0.509,313,1.343,331,0.979,387,0.782,420,1.237,423,1.395,424,1.702,429,3.057,525,1.448,569,3.032,574,2.086,598,2.519,650,4.107,699,3.001,717,0.979,718,2.222,740,1.167,902,1.326,986,1.326,989,1.381,1311,3.408,1322,1.448,1337,2.852,1390,1.167,1394,1.2,1479,1.326,1509,1.2,1545,1.279,1549,2.028,1553,2.401,1578,1.448,1633,1.448,1689,1.326,1691,0.886,1756,1.084,1920,3.787,1978,1.643,2062,1.448,2073,1.531,2180,1.279,2406,1.448,2528,1.531,2660,1.643,2697,1.643,2749,1.531,2968,2.855,2973,2.855,3023,1.812,3024,1.812,3025,1.812,3026,1.812,3027,1.812,3028,1.812,3029,1.812,3030,3.15,3031,1.812,3032,4.992,3033,1.812,3034,4.177,3035,1.812,3036,1.812,3037,4.177,3038,1.812,3039,1.812,3040,1.812,3041,1.812,3042,1.812,3043,1.812,3044,4.177,3045,1.812,3046,1.812,3047,1.326,3048,3.15,3049,1.812,3050,1.812,3051,1.812,3052,3.15,3053,1.812,3054,3.15,3055,1.812,3056,1.812,3057,1.812,3058,1.812,3059,1.812,3060,1.812,3061,1.812,3062,1.812,3063,1.812,3064,1.812,3065,1.812,3066,3.15,3067,1.812,3068,1.812,3069,1.812,3070,1.812,3071,1.812,3072,3.15,3073,1.812,3074,1.812,3075,1.812,3076,1.812,3077,1.812,3078,1.812,3079,1.812,3080,1.812,3081,1.812,3082,3.15,3083,1.812,3084,1.812]],["t/561",[1,2.124,3,0.597,4,2.576,7,2.501,18,1.739,45,0.788,48,0.858,49,1.177,50,1.214,56,1.857,61,3.698,71,0.902,73,1.15,74,0.518,88,1.697,97,0.874,105,1.24,109,1.287,125,0.818,140,1.977,148,1.582,149,1.404,150,2.018,152,2.576,153,1.866,154,1.492,155,2.317,157,3.799,162,0.666,170,3.08,181,1.404,215,5.622,219,3.213,250,0.613,273,0.775,287,2.517,288,3.363,289,2.155,290,2.155,291,2.155,292,2.155,293,2.155,294,2.155,295,2.155,296,2.155,297,2.155,298,1.461,299,2.155,300,2.155,301,1.689,302,1.866,303,2.155,304,2.155,305,3.556,306,2.155,307,2.155,308,1.866,309,1.944,310,2.038,311,2.155,312,2.155,313,1.088,314,1.741,315,4.57,316,3.556,317,3.363,318,1.561,319,2.155,320,1.944,321,2.038,322,2.155]],["t/564",[3,0.707,8,0.773,18,1.017,38,1.971,50,0.957,71,0.692,73,0.906,74,0.553,88,1.677,99,1.077,105,1.034,119,2.145,129,1.768,149,1.73,157,1.73,162,0.497,211,1.585,223,1.56,240,0.971,246,2.217,273,1.513,276,1.611,284,1.928,387,2.151,392,2.395,463,1.865,487,1.45,615,1.536,658,1.838,660,5.848,746,2.081,813,5.42,815,2.217,826,3.515,1126,6.061,1159,2.655,1162,2.848,1274,2.51,1742,2.655,1756,1.879,1835,2.023,2046,5.953,2500,2.395,3085,2.655,3086,3.142,3087,3.142,3088,3.142,3089,3.142,3090,3.142,3091,3.142,3092,3.142,3093,3.142,3094,3.142,3095,3.142,3096,4.982,3097,4.982,3098,4.982,3099,3.142,3100,4.982,3101,3.142,3102,3.142,3103,3.142,3104,3.142,3105,2.395,3106,2.848,3107,6.191,3108,6.191,3109,3.142,3110,3.142,3111,3.142,3112,6.191,3113,4.982,3114,3.142,3115,3.142,3116,3.142,3117,3.142,3118,3.142]],["t/566",[3,0.881,45,1.535,50,1.266,71,0.61,73,1.199,74,0.555,105,1.368,140,2.286,150,2.011,162,0.983,172,2.907,200,2.467,284,1.701,387,2.683,428,5.363,463,1.645,1670,3.803,2891,4.964,2893,4.964,3119,6.213,3120,5.632,3121,8.193,3122,5.632,3123,5.632,3124,5.632]],["t/568",[3,1.049,7,2.39,49,1.373,50,1.144,63,3.796,71,0.727,73,1.083,74,0.456,105,1.236,108,2.043,142,4.643,162,1.171,284,2.026,463,1.959,1170,4.643,3125,7.4,3126,7.4,3127,7.4]],["t/570",[3,0.849,18,1.937,48,3.025,50,0.925,71,0.588,73,0.876,74,0.531,88,1.509,96,2.841,105,0.999,108,1.652,129,1.709,162,0.947,213,2.202,223,3.969,273,2.732,284,1.638,348,3.177,384,4.169,463,1.584,534,7.604,694,5.057,699,3.177,1292,5.848,1380,4.782,2387,8.157,3128,5.984,3129,7.992]],["t/572",[3,0.895,18,2.042,50,0.975,71,0.62,73,0.923,74,0.548,88,1.191,105,1.053,108,1.742,129,1.802,162,0.998,213,2.321,240,1.951,273,1.916,284,1.727,320,7.041,463,1.67,615,4.795,699,3.349,1194,7.805,3130,6.309,3131,6.309,3132,6.309,3133,6.309,3134,5.72]],["t/574",[3,0.995,49,1.051,50,1.085,71,0.689,73,1.027,74,0.543,88,1.673,105,1.172,129,2.004,162,1.11,284,1.921,387,3.03,463,1.858,475,4.519,549,3.193,783,6.361,1209,5.349,1835,4.519,3135,7.017,3136,7.017,3137,7.017]],["t/576",[3,0.861,19,4.286,45,1.138,49,0.91,50,1.248,52,1.649,71,0.597,73,1.327,74,0.514,75,5.198,105,1.014,129,1.735,131,2.97,138,3.282,150,1.966,162,0.961,284,1.663,298,3.479,314,4.147,420,3.169,463,1.608,466,3.224,1424,4.286,1474,4.445,1476,6.153,2482,5.906,2853,4.853,2857,4.853,3138,7.317,3139,6.074,3140,6.074,3141,6.074,3142,6.074]],["t/578",[3,0.849,45,1.121,48,2.012,49,1.348,50,0.925,51,3.663,56,2.151,60,3.428,61,2.113,63,3.07,71,0.588,73,0.876,74,0.498,76,3.07,83,2.972,84,3.663,105,0.999,108,1.652,116,2.687,152,4.892,162,0.947,254,2.927,284,1.638,462,3.755,463,1.584,466,3.177,545,4.694,772,4.379,1184,3.295,1372,6.753,1691,2.927,1957,3.428,1992,3.295,3143,5.984,3144,5.984,3145,5.984,3146,5.984]],["t/580",[3,0.709,4,1.931,45,0.936,46,2.404,48,1.06,49,0.749,50,0.487,51,1.931,56,0.849,60,1.807,61,1.114,63,1.618,71,0.31,73,0.731,74,0.524,76,1.618,83,1.566,84,1.931,88,0.943,105,0.527,108,0.871,116,1.416,127,1.05,133,1.845,136,2.031,152,4.711,160,1.225,162,0.499,181,1.736,200,1.984,223,1.566,229,1.674,235,2.892,240,2.531,281,0.885,284,0.863,313,1.345,384,1.645,423,3.128,447,2.153,462,1.979,463,0.835,466,1.674,509,2.306,545,2.607,563,3.059,569,2.824,603,3.964,615,3.764,648,1.592,658,2.923,660,3.412,663,3.993,664,3.993,667,4.223,668,3.993,669,4.223,683,2.665,699,3.294,811,2.859,1184,4.238,1311,3.412,1551,3.81,1689,2.308,1691,1.542,1835,2.031,1957,4.69,1992,1.736,2485,4.731,2853,2.52,3147,4.997,3148,3.154,3149,2.665,3150,2.665,3151,2.665,3152,2.859,3153,2.859,3154,3.154,3155,3.154,3156,3.154,3157,2.665,3158,2.665,3159,3.154,3160,2.665,3161,2.665,3162,3.154,3163,6.206,3164,3.154,3165,3.154,3166,3.154,3167,3.154,3168,3.154]],["t/582",[3,0.847,6,1.806,45,0.744,48,2.007,50,1.109,68,2.43,71,0.39,73,1.05,74,0.543,88,0.749,96,1.884,105,1.198,108,1.648,115,2.129,129,1.134,144,3.168,149,2.186,155,2.186,162,0.628,177,1.402,200,3.168,224,3.599,263,4.61,274,2.71,284,1.087,334,2.801,348,2.107,450,2.905,463,1.051,469,2.186,602,5.092,1118,5.411,1278,3.354,1287,2.905,1348,3.026,1756,2.374,1767,3.026,1792,3.954,1794,3.599,1810,4.368,1811,4.212,1822,2.905,1827,4.769,1832,3.354,1833,2.71,1887,5.411,1941,3.172,2062,3.172,3105,3.026,3169,3.97,3170,3.97,3171,3.97,3172,3.97,3173,3.97,3174,3.97,3175,3.97,3176,3.97,3177,3.97,3178,3.97,3179,3.599,3180,5.411,3181,3.97,3182,3.97,3183,3.97,3184,3.97]],["t/584",[2,4.341,3,0.902,49,0.953,50,0.983,63,3.262,71,0.625,73,0.931,74,0.521,105,1.062,116,2.855,117,5.679,142,3.989,162,1.006,168,5.081,169,3.501,235,3.126,284,1.741,349,4.487,463,1.683,525,5.081,1337,4.341,2906,5.081,3185,9.272,3186,6.359,3187,6.359,3188,6.359,3189,6.359,3190,6.359,3191,5.765,3192,6.359,3193,6.359]],["t/586",[1,3.635,2,4.918,16,5.491,43,4.519,48,2.422,49,1.079,59,4.519,71,0.708,116,3.234,117,4.918,118,4.409,162,1.14,211,3.635,284,1.972,313,3.072,410,6.087,414,5.083,463,1.907,466,3.824,467,7.614,688,6.53,1314,5.756,2608,6.087,3194,7.203]],["t/588",[3,0.717,48,1.699,50,0.781,71,0.497,73,0.74,74,0.541,88,1.779,96,2.399,105,0.844,108,1.965,129,1.444,148,1.9,162,0.8,181,2.783,200,2.007,235,1.9,240,1.563,252,2.824,263,2.593,274,3.451,277,2.129,278,4.271,284,1.384,447,3.451,463,1.338,602,5.191,1187,3.451,1228,3.567,1811,3.567,1827,4.039,2353,4.271,3152,4.582,3179,4.582,3180,4.582,3195,5.055,3196,5.055,3197,5.055,3198,5.055,3199,5.055,3200,5.055,3201,5.055,3202,5.055,3203,5.055,3204,5.055,3205,5.055,3206,5.055,3207,5.055,3208,5.055,3209,5.055]],["t/590",[3,0.813,45,1.074,48,2.96,49,1.163,50,0.886,51,3.509,52,1.556,60,3.283,61,2.024,63,2.94,71,0.563,73,0.839,74,0.517,76,2.94,83,2.847,84,3.509,88,1.662,105,0.957,108,1.582,116,2.573,129,1.637,162,0.907,177,2.024,181,3.156,221,3.509,284,1.569,447,5.3,463,1.517,466,3.042,482,3.239,509,2.644,602,4.673,1691,2.803,1992,3.156,3210,5.731,3211,3.796,3212,5.731,3213,5.731]],["t/592",[3,0.796,39,6.373,49,1.147,50,0.868,52,2.078,71,0.551,73,1.12,74,0.502,88,1.445,105,0.937,129,1.603,148,2.876,162,0.888,172,3.581,191,3.687,273,1.704,284,1.536,320,4.279,463,1.486,598,2.832,615,2.745,1194,4.743,1230,4.743,1269,4.743,1480,3.718,1767,5.835,1946,6.467,3214,5.613,3215,7.895,3216,5.613,3217,5.613,3218,5.613,3219,7.654,3220,8.709,3221,7.654]],["t/594",[3,0.775,18,1.768,30,3.129,45,1.407,50,0.844,71,0.537,73,1.099,74,0.547,105,0.912,129,1.56,131,4.742,138,4.06,162,0.864,211,2.756,223,2.713,273,2.281,284,1.495,313,2.329,463,1.446,615,2.671,660,3.729,813,3.854,815,5.301,1126,6.422,1549,4.838,2621,4.952,3222,5.462,3223,7.512,3224,5.462,3225,8.587,3226,5.462,3227,5.462]],["t/596",[2,4.242,3,0.881,38,5.14,49,1.228,50,0.96,71,0.61,73,1.199,74,0.504,88,1.173,105,1.037,162,0.983,171,3.559,191,4.88,196,4.242,200,2.467,284,1.701,462,3.898,463,1.645,469,3.421,482,2.286,569,2.827,603,3.488,681,5.25,699,3.298,1136,3.716,1797,4.384,3228,6.213,3229,4.964,3230,6.213,3231,5.25,3232,4.964,3233,4.964]],["t/598",[3,0.813,38,4.871,45,1.074,48,3.172,49,1.163,50,0.886,51,3.509,60,3.283,61,2.024,63,2.94,71,0.563,73,0.839,74,0.526,76,2.94,83,2.847,84,3.509,88,1.662,105,0.957,108,1.582,116,2.573,162,0.907,181,3.156,200,3.083,221,3.509,284,1.569,462,3.596,463,1.517,466,3.042,469,3.156,482,2.109,603,4.358,699,3.042,1691,2.803,1797,4.044,1992,3.156,3211,3.796,3234,5.731,3235,5.731]],["t/600",[71,0.842,162,1.356,252,2.937,284,2.346,463,2.269,2451,7.768,3236,8.569]],["t/602",[3,0.807,18,1.842,45,1.066,48,1.913,49,1.158,50,0.88,51,3.484,56,1.532,60,3.26,61,2.01,63,2.919,71,0.559,73,0.833,74,0.516,76,2.919,83,2.827,84,3.484,88,1.656,105,0.95,108,1.571,116,2.555,129,1.626,157,3.134,162,0.9,181,4.254,223,2.827,240,2.389,273,1.728,284,1.558,463,1.507,466,3.021,699,3.021,815,5.452,1390,3.665,1691,2.783,1992,3.134,2222,4.016,2445,5.16,2986,4.809,3211,3.77,3237,7.726,3238,5.691]],["t/604",[18,2.689,49,1.245,56,2.236,71,0.816,162,1.314,273,2.522,284,2.274,463,2.199,1670,5.085,3239,8.307]],["t/606",[3,0.78,18,1.78,45,1.03,48,1.849,49,1.131,50,0.85,51,3.366,56,1.48,60,3.15,61,1.942,63,2.821,71,0.54,73,0.805,74,0.511,76,2.821,83,2.731,84,3.366,88,1.627,105,0.918,108,1.518,116,2.469,129,1.571,157,3.028,162,0.87,181,4.155,213,2.023,223,2.731,240,1.7,273,1.67,284,1.505,463,1.456,466,2.919,699,2.919,815,3.88,1257,3.642,1390,3.542,1691,2.689,1992,3.028,2222,3.88,2986,4.647,3211,3.642,3240,5.499,3241,5.499,3242,5.499,3243,5.499,3244,5.499,3245,5.499,3246,5.499,3247,5.499,3248,5.499]],["t/608",[18,2.689,49,1.245,71,0.816,162,1.314,213,3.056,273,2.522,284,2.274,463,2.199,1670,5.085,3249,8.307]],["t/610",[3,1.096,49,1.41,50,1.356,71,0.559,73,1.377,74,0.504,88,1.458,105,1.465,129,1.626,139,3.77,140,2.094,162,0.9,172,2.663,200,2.26,284,1.558,384,2.969,387,2.458,424,3.076,428,3.329,463,1.507,549,3.516,1200,4.339,1362,3.329,2505,5.16,3138,5.16,3250,5.691,3251,5.691,3252,5.16,3253,5.691,3254,4.809,3255,5.691,3256,5.691,3257,5.16,3258,5.691,3259,5.691,3260,5.691,3261,5.691]],["t/612",[3,0.895,18,2.042,45,1.182,48,2.121,49,1.24,50,0.975,51,3.862,60,3.614,61,2.228,63,3.236,71,0.62,73,0.923,74,0.52,76,3.236,83,3.134,84,3.862,88,1.191,105,1.053,108,1.742,116,2.833,129,1.802,162,0.998,273,1.916,284,1.727,463,1.67,466,3.349,475,4.063,1386,5.72,1691,3.086,1992,3.474,3262,8.277,3263,5.72,3264,6.309,3265,6.309]],["t/614",[3,0.895,7,1.988,8,2.036,49,1.24,50,0.975,56,2.228,71,0.62,73,0.923,74,0.53,88,1.191,105,1.053,114,3.958,129,1.802,162,0.998,238,4.063,273,2.513,284,1.727,287,3.773,463,1.67,470,5.84,1111,4.452,1370,4.452,1371,6.759,1385,5.72,1442,5.331,2179,5.331,3266,6.309]],["t/616",[3,0.843,45,1.113,49,0.89,50,0.918,56,1.599,71,0.584,73,0.869,74,0.511,88,1.121,105,0.992,129,1.697,137,3.403,162,0.94,223,2.951,273,2.415,284,1.626,348,3.153,463,1.573,470,4.192,718,4.192,1167,6.326,1184,4.936,1228,5.612,1370,4.192,1371,5.82,1377,5.386,1888,5.386,2179,6.72,2232,5.386,2428,5.386,3267,7.953,3268,7.953,3269,5.941,3270,5.941]],["t/618",[3,0.819,18,1.868,49,1.169,50,0.892,56,1.554,71,0.567,73,0.845,74,0.527,88,1.09,105,0.964,115,2.783,129,1.649,157,4.295,162,0.913,172,2.701,211,2.913,223,2.867,240,3.056,251,3.412,252,1.979,273,1.753,284,1.58,463,1.528,545,3.011,615,4.321,699,3.064,808,4.877,813,4.073,825,4.612,826,4.073,1353,4.877,3085,4.877,3271,5.772,3272,5.772,3273,5.772,3274,5.772]],["t/620",[3,0.978,49,1.444,50,1.066,56,2.36,71,0.678,73,1.01,74,0.532,105,1.152,115,3.128,129,1.97,162,1.091,251,3.017,252,2.365,284,1.888,463,1.826,3275,8.767,3276,8.767,3277,6.898,3278,6.898]],["t/622",[3,0.687,45,0.907,49,1.035,50,0.749,71,0.476,73,1.011,74,0.547,88,1.304,96,2.299,105,0.809,108,1.337,125,1.553,162,0.766,200,3.683,211,2.444,235,2.595,240,2.488,273,1.471,284,1.326,313,2.945,423,3.06,429,6.788,463,1.282,615,3.936,658,4.708,660,5.495,1470,3.307,2180,6.191,2772,4.391,3279,4.844,3280,5.836,3281,4.093,3282,4.844,3283,7.414,3284,4.844,3285,4.844]],["t/624",[3,0.7,49,1.048,50,0.762,52,1.339,71,0.484,73,1.024,74,0.529,88,1.534,96,2.341,105,0.824,129,1.409,150,2.264,162,0.78,168,7.068,200,3.513,213,1.815,235,2.629,240,1.525,284,1.35,313,2.103,318,4.282,423,3.1,429,6.473,463,1.306,509,2.276,658,4.092,659,2.95,1480,3.267,1889,3.941,1941,3.941,2180,5.736,3280,5.911,3281,4.168,3283,6.869,3286,6.996,3287,4.932,3288,4.932,3289,4.932,3290,6.996,3291,4.932,3292,4.932,3293,4.932]],["t/626",[3,0.916,18,2.091,50,0.998,71,0.635,73,0.945,74,0.533,88,1.219,105,1.079,129,1.845,160,2.508,162,1.022,273,1.962,282,2.258,284,1.768,333,3.626,463,1.71,699,3.429,1151,4.924,1292,6.837,2714,5.856,3294,6.46,3295,5.856,3296,6.46,3297,6.46,3298,8.405,3299,8.405,3300,6.46,3301,6.46]],["t/628",[3,0.819,45,1.081,48,1.941,49,1.324,50,1.206,56,2.1,71,0.567,73,1.142,74,0.518,75,3.717,101,4.877,105,0.964,140,2.124,149,3.178,150,1.868,157,3.178,162,0.913,229,3.064,250,1.386,282,2.018,284,1.58,313,3.768,314,3.941,315,3.823,423,2.557,463,1.528,509,2.663,1671,8.01,1691,2.823,2222,4.073,2226,5.233,3302,5.772,3303,5.772,3304,7.8,3305,5.772,3306,5.772,3307,5.772]],["t/630",[3,1.022,18,2.332,49,1.079,50,1.113,71,0.708,73,1.054,74,0.448,88,1.36,105,1.203,108,1.988,148,2.707,162,1.14,172,3.371,213,2.65,223,3.578,273,2.187,281,2.022,284,1.972,462,4.519,463,1.907,1200,5.491,3308,7.203,3309,7.203,3310,7.203]],["t/632",[3,0.938,18,2.142,49,0.991,50,1.023,56,1.781,71,0.65,73,0.968,74,0.526,88,1.885,105,1.105,150,2.763,151,5.592,152,5.226,162,1.047,177,2.337,284,1.811,462,4.152,463,1.752,509,3.053,1480,4.383,1501,5.045,3311,6.617,3312,8.537,3313,6.617]],["t/634",[2,2.894,3,0.601,48,2.107,49,1.117,50,0.655,71,0.416,73,0.917,74,0.562,88,0.8,105,0.708,162,0.671,191,4.435,255,2.659,276,2.174,281,1.76,284,1.16,424,2.291,462,2.659,463,1.122,469,2.334,482,2.744,563,3.837,569,4.19,603,4.187,681,5.296,682,4.778,764,3.231,1136,2.535,1170,2.659,1357,3.581,1432,2.991,1734,3.842,1792,2.807,1969,3.581,3229,3.387,3231,3.581,3232,3.387,3233,3.387,3314,4.238,3315,5.296,3316,3.581,3317,4.238,3318,4.238,3319,4.238,3320,3.581,3321,3.387,3322,3.581,3323,3.581,3324,3.581,3325,3.581,3326,3.581,3327,3.581,3328,3.581]],["t/636",[3,0.796,49,1.305,50,1.346,60,3.215,61,1.982,71,0.551,73,1.479,74,0.502,105,1.454,129,2.487,130,3.215,131,2.745,140,3.442,150,2.477,156,2.832,157,3.09,162,0.888,235,2.109,282,3.045,284,1.536,315,5.069,419,4.107,463,1.486,500,4.485,509,2.59,648,3.862,1463,3.718,1550,4.485,3329,5.613,3330,5.613,3331,5.613]],["t/638",[3,0.909,45,1.2,48,2.155,49,1.253,50,0.991,51,3.923,56,1.725,60,3.671,61,2.263,63,3.287,71,0.63,73,0.938,74,0.522,76,3.287,83,3.183,84,3.923,88,1.21,105,1.07,108,1.769,116,2.877,129,1.83,162,1.014,284,1.754,418,4.021,463,1.697,466,3.402,549,2.916,1691,3.134,1992,3.529,2144,5.81,3332,6.409,3333,6.409,3334,6.409]],["t/640",[3,1.011,38,3.718,45,1.11,48,2.398,49,0.888,50,1.102,51,2.406,52,1.608,60,2.252,61,1.388,63,2.016,71,0.386,73,1.044,74,0.547,76,2.016,83,1.952,84,2.406,88,1.499,105,1.191,108,1.085,116,1.765,140,2.921,150,1.272,162,0.622,172,3.715,177,1.388,180,3.322,183,3.322,187,4.735,211,1.984,221,3.627,284,1.076,392,2.997,428,3.466,463,1.041,466,2.087,482,1.446,509,1.814,1170,2.466,1314,3.141,1471,3.925,1509,2.604,1691,1.923,1833,2.684,1992,2.164,2876,5.007,2879,3.564,2880,5.372,2891,3.141,2893,3.141,2934,3.564,2935,3.564,2936,3.564,2937,3.564,3120,3.564,3122,3.564,3123,3.564,3124,5.372,3211,2.604,3335,2.997,3336,3.931,3337,5.925,3338,3.931,3339,3.931,3340,3.931,3341,3.931,3342,3.931]],["t/642",[3,0.802,27,6.663,45,1.44,49,1.152,50,0.874,52,1.534,56,1.521,71,0.555,73,1.373,74,0.515,88,1.067,105,0.944,118,3.46,140,2.08,150,2.489,162,0.894,172,4.09,211,2.852,221,3.46,276,2.899,277,3.239,284,1.547,428,3.306,463,1.496,569,2.572,652,2.807,1257,3.743,1344,3.858,1940,4.776,2972,5.627,3254,4.776,3335,4.309,3343,5.652,3344,5.652,3345,5.652,3346,5.652,3347,5.652,3348,5.652]],["t/644",[3,1.122,45,1.482,50,0.912,71,0.579,73,1.158,74,0.521,105,0.985,127,1.964,148,2.974,150,1.909,162,0.933,172,3.703,229,3.13,235,3.357,284,1.614,313,2.515,428,4.63,463,1.561,509,2.721,563,3.61,648,2.976,699,4.201,1257,5.242,1311,4.026,1739,5.347,3105,4.496,3254,4.984,3349,4.984,3350,5.898,3351,5.898,3352,5.898,3353,5.898,3354,5.898,3355,5.898]],["t/646",[3,0.888,50,0.968,56,1.685,71,0.615,73,0.916,74,0.529,88,1.737,105,1.045,148,3.095,162,0.99,169,3.447,177,2.211,181,3.447,229,3.323,282,2.189,284,1.714,463,1.658,509,2.889,549,2.849,598,3.159,648,3.159,741,4.032,1480,4.147,1667,2.93,1696,6.58,1992,3.447,2748,5.29,2891,5.003,3356,5.676,3357,6.261,3358,6.261,3359,6.261]],["t/648",[3,0.995,18,3.144,50,1.085,56,2.386,71,0.689,73,1.027,74,0.534,88,1.673,105,1.172,129,2.004,162,1.11,169,3.863,284,1.921,463,1.858,480,4.648,1209,6.756,1384,5.929,3360,7.017]],["t/650",[3,1.193,49,0.572,50,1.3,71,0.57,73,1.231,74,0.566,88,0.721,99,1.31,105,1.307,129,2.403,140,1.406,154,2.235,162,0.604,169,2.103,172,1.788,181,2.103,251,1.671,284,1.046,333,2.145,463,1.535,623,4.29,902,4.243,1572,5.257,1670,2.339,3047,2.796,3361,3.463,3362,8.413,3363,8.413,3364,3.82,3365,3.82,3366,3.82,3367,3.82,3368,3.82,3369,3.82,3370,3.82,3371,3.82,3372,3.82,3373,3.82,3374,3.82,3375,3.82,3376,3.82,3377,3.82,3378,3.82,3379,3.82,3380,5.799,3381,3.82,3382,3.82,3383,3.82,3384,7.008,3385,3.82,3386,3.82,3387,3.82]],["t/652",[3,0.74,45,0.977,48,2.447,49,1.256,50,0.806,51,3.193,52,1.416,60,2.988,61,1.842,63,2.676,71,0.512,73,0.764,74,0.514,76,2.676,83,2.591,84,3.193,88,1.864,105,0.871,108,1.44,116,2.342,129,1.49,140,1.919,154,3.052,162,0.825,169,2.872,172,2.441,177,1.842,211,2.633,221,3.193,284,1.428,333,4.085,463,1.381,466,2.769,482,1.919,509,2.407,623,5.13,1691,2.551,1833,3.562,1992,2.872,3047,3.818,3211,3.455,3388,5.217,3389,5.217,3390,5.217,3391,5.217,3392,5.217,3393,8.38,3394,5.217]],["t/654",[3,0.717,48,1.699,49,1.234,50,0.781,52,1.372,56,1.361,71,0.497,73,0.74,74,0.531,88,0.954,105,0.844,115,3.363,118,3.094,129,1.444,140,1.86,154,2.957,162,0.8,169,2.783,172,3.855,177,1.785,221,3.094,241,3.853,251,4.277,252,2.44,284,1.384,333,3.996,348,2.683,463,1.338,482,1.86,509,2.332,623,4.357,652,2.511,1470,3.451,1700,3.567,3047,3.699,3211,3.348,3361,4.582,3395,6.015,3396,4.271,3397,5.055,3398,7.118,3399,7.118,3400,7.118]],["t/656",[3,0.695,27,5.31,48,1.648,49,1.214,50,0.758,52,1.891,56,1.32,71,0.482,73,0.718,74,0.522,88,0.925,105,0.819,118,3.001,129,1.4,140,1.804,154,2.868,162,0.776,169,2.699,172,3.791,177,1.731,211,2.474,221,4.264,241,3.737,276,3.573,284,1.342,333,3.91,348,2.602,387,3.499,428,2.868,463,1.298,482,1.804,509,2.262,623,4.264,652,2.435,902,5.929,1344,3.347,1470,3.347,1700,3.459,3047,3.587,3211,3.247,3335,3.737,3396,4.143,3401,8.822,3402,4.902,3403,4.902,3404,6.966,3405,6.966,3406,6.966,3407,4.902]],["t/658",[3,0.708,27,5.379,48,1.679,49,1.226,50,0.772,52,1.915,56,1.344,71,0.49,73,0.731,74,0.517,88,0.942,105,0.834,118,3.056,129,1.426,140,1.837,154,2.921,162,0.79,169,2.749,172,3.829,177,1.763,211,2.519,221,4.319,241,3.806,276,3.619,277,2.972,284,1.367,333,3.961,348,2.65,387,4.206,428,2.921,463,1.322,482,1.837,509,2.304,623,4.319,652,2.48,1344,3.409,1470,3.409,1700,3.523,1756,2.986,2972,5.163,3047,3.654,3211,3.307,3335,3.806,3396,4.219,3408,4.993,3409,4.993,3410,4.993,3411,4.993,3412,7.056]],["t/660",[3,0.94,4,2.799,45,1.241,46,3.485,49,0.685,50,0.707,71,0.449,73,0.97,74,0.546,88,1.471,105,0.763,127,1.522,129,1.306,133,2.675,150,1.48,160,1.775,162,0.723,172,3.1,181,2.517,200,2.631,229,2.427,235,2.928,240,1.413,281,1.284,284,1.251,313,1.95,384,2.385,447,3.121,463,1.21,509,3.057,563,2.799,569,3.546,623,4.77,648,2.307,699,4.136,1311,3.121,1769,3.485,1957,3.795,3105,3.485,3149,3.863,3150,3.863,3151,3.863,3157,3.863,3158,3.863,3160,3.863,3161,3.863,3349,3.863,3413,6.625,3414,4.572,3415,4.572,3416,4.572,3417,4.572,3418,4.145,3419,4.145,3420,4.145,3421,4.572]],["t/662",[3,0.868,49,0.917,50,0.946,71,0.601,73,1.187,74,0.55,105,1.022,129,1.748,162,0.968,169,3.369,235,2.3,240,1.892,254,2.993,255,6.079,277,2.578,284,1.675,463,1.62,764,4.665,994,4.318,1642,4.89,3422,6.12,3423,6.12,3424,9.099,3425,6.12,3426,6.12,3427,6.12,3428,6.12,3429,6.12,3430,6.12]],["t/664",[3,1.046,18,1.722,49,1.489,50,1.309,52,1.444,71,0.523,73,1.338,74,0.507,88,1.004,105,1.414,116,2.388,129,1.519,148,1.999,162,0.841,199,2.684,211,2.684,223,4.206,277,2.24,284,1.456,463,1.408,549,2.421,741,3.426,767,4.69,882,4.495,885,4.055,1501,4.055,2037,3.523,2877,4.25,2972,3.892,3263,4.822,3431,5.319,3432,5.319,3433,5.319,3434,5.319,3435,5.319,3436,5.319,3437,5.319,3438,5.319,3439,5.319,3440,7.376]],["t/666",[3,0.663,8,1.657,18,1.514,49,1.183,50,1.22,52,1.27,71,0.459,73,1.264,74,0.509,88,0.883,105,1.318,129,1.336,140,2.478,149,2.575,162,0.74,172,2.188,181,2.575,199,2.36,200,2.674,211,3.399,223,3.345,229,2.483,240,1.446,269,3.565,277,1.97,284,1.28,298,2.679,384,2.44,428,3.94,447,3.193,463,1.238,482,1.721,623,5.286,659,2.797,741,3.012,767,4.429,885,3.565,1501,3.565,1670,2.863,2037,3.098,2857,6.306,2877,3.737,2893,3.737,2894,4.24,2902,4.24,2972,3.422,3441,4.677,3442,4.677,3443,6.735,3444,4.677,3445,4.677,3446,4.677,3447,4.677,3448,4.677]],["t/668",[3,0.759,18,1.733,49,1.273,50,1.313,52,1.453,63,3.801,71,0.526,73,1.342,74,0.495,88,1.011,105,1.419,129,1.529,139,3.546,162,0.847,199,2.702,211,2.702,221,3.278,223,3.68,240,1.655,273,1.626,277,2.255,284,1.466,463,1.418,549,3.372,741,4.772,767,4.704,813,3.778,885,4.082,1472,4.854,1501,4.082,2037,3.546,2877,4.278,2972,3.918,3252,4.854,3257,4.854,3335,4.082,3449,5.354,3450,5.354,3451,4.854,3452,5.354,3453,5.354,3454,5.354,3455,5.354]],["t/670",[19,6.056,20,3.673,45,1.608,52,2.33,71,0.655,73,0.976,88,1.62,118,4.084,159,4.882,162,1.055,213,2.455,229,3.541,250,1.602,284,1.826,313,2.845,423,2.956,463,1.766,659,3.99,813,4.707,1409,6.048,1424,6.056,1465,6.048,1474,6.28,1476,6.543,1478,5.638,2853,5.331,3456,6.672]],["t/672",[3,1.059,49,1.119,50,1.154,56,2.48,71,0.734,73,1.093,74,0.519,105,1.247,129,2.133,162,1.181,284,2.044,463,1.977,3457,9.214,3458,6.77,3459,7.468,3460,7.468]],["t/674",[3,0.906,4,2.664,45,1.197,46,3.317,49,0.652,50,0.673,56,1.72,71,0.427,73,0.935,74,0.542,88,1.43,105,0.727,127,1.449,129,1.243,133,2.546,136,2.803,150,1.409,160,1.69,162,0.688,181,3.519,200,3.008,229,2.31,235,2.846,240,1.345,273,1.941,281,1.222,284,1.191,313,1.856,384,2.27,447,4.363,463,1.152,509,3.495,563,2.664,569,3.447,648,2.196,699,4.02,1311,2.971,1769,4.872,1957,3.661,2296,3.945,2485,5.774,3105,3.317,3149,3.677,3150,3.677,3151,3.677,3157,3.677,3158,3.677,3160,3.677,3161,3.677,3349,3.677,3418,3.945,3419,3.945,3420,3.945,3461,6.391,3462,4.352,3463,4.352,3464,4.352,3465,4.352,3466,4.352]],["t/676",[3,1.022,49,1.35,50,1.113,71,0.708,73,1.054,74,0.512,105,1.203,129,2.057,131,4.406,138,3.893,162,1.14,213,3.315,281,2.022,284,1.972,463,1.907,3458,6.53,3467,9.01,3468,7.203]],["t/678",[3,0.824,38,3.647,49,1.174,50,1.211,61,2.053,71,0.571,73,1.298,74,0.472,77,3.142,105,1.309,140,2.139,148,2.185,150,2.537,156,4.475,157,3.201,162,0.92,282,2.74,284,1.591,463,1.539,648,2.934,652,2.887,727,5.27,741,3.744,763,2.843,1463,3.85,1480,3.85,1992,3.201,2078,4.912,2341,4.645,2408,4.912,2670,5.27,2748,4.912,3321,4.645,3356,7.106,3469,5.813,3470,5.813,3471,5.813,3472,5.813,3473,5.813]],["t/680",[3,1.018,49,1.347,50,1.11,61,1.808,71,0.705,73,1.051,74,0.554,105,1.199,140,3.309,156,2.583,157,2.818,162,0.81,200,2.033,235,1.924,250,1.229,284,1.401,315,4.756,348,2.717,402,2.932,463,1.355,569,3.268,648,2.583,1151,3.902,1395,2.105,1642,4.09,3474,5.118,3475,5.118,3476,8.295,3477,5.118,3478,5.118,3479,5.118,3480,5.118,3481,7.181,3482,5.118,3483,5.118,3484,5.118,3485,7.181,3486,5.118]],["t/682",[2,3.193,3,0.663,45,0.876,49,1.009,50,0.723,71,0.459,73,0.986,74,0.561,88,0.883,105,0.781,148,1.758,150,1.514,162,0.74,191,4.731,255,2.934,281,1.891,284,1.28,424,2.528,462,2.934,463,1.238,482,1.721,563,2.863,569,4.337,603,3.781,682,5.134,1136,4.028,1432,3.3,1969,5.691,3229,5.381,3231,3.952,3232,3.737,3233,3.737,3315,3.952,3316,3.952,3320,3.952,3321,3.737,3322,3.952,3323,3.952,3324,3.952,3325,3.952,3326,3.952,3327,3.952,3328,3.952,3487,4.677]],["t/684",[2,3.053,3,0.634,45,0.838,49,0.977,50,0.691,71,0.439,73,0.954,74,0.56,88,0.844,105,0.747,148,1.68,150,1.447,162,0.707,191,4.667,222,3.155,255,2.805,281,1.83,284,1.224,424,2.416,462,2.805,463,1.184,482,1.645,563,2.737,569,4.27,603,3.66,682,4.97,1136,3.899,1432,3.155,1728,5.268,1831,3.778,3229,5.209,3232,3.573,3233,3.573,3315,3.778,3316,3.778,3320,3.778,3321,3.573,3322,3.778,3323,3.778,3324,3.778,3325,3.778,3326,3.778,3327,3.778,3328,3.778,3488,4.471,3489,4.471,3490,4.471]],["t/686",[3,1.059,18,2.417,71,0.734,74,0.497,115,2.664,150,2.417,162,1.181,252,2.56,284,2.044,333,4.192,395,5.269,463,1.977,480,4.946,1228,6.501,1384,6.31,1940,6.31,3395,6.31,3491,7.468]],["t/688",[3,0.992,8,1.213,18,1.596,30,2.825,45,0.924,49,1.218,50,1.081,71,0.799,73,1.367,74,0.523,79,2.769,88,0.931,105,1.168,108,1.361,129,1.998,130,2.825,131,4.744,138,4.393,150,1.596,162,1.107,213,1.815,240,1.525,254,2.412,277,2.077,284,2.225,463,2.152,487,2.276,545,2.573,642,3.76,654,4.471,672,3.609,1372,4.168,2076,4.471,2222,3.48,2672,4.471,3492,4.932,3493,4.932,3494,4.932,3495,4.932,3496,4.932,3497,4.932,3498,4.932,3499,4.932,3500,4.932]],["t/690",[3,1.014,18,1.646,45,0.953,49,1.239,50,1.105,52,1.381,71,0.5,73,1.21,74,0.47,88,0.96,99,1.744,105,1.194,108,1.973,115,1.814,148,2.687,149,2.801,150,1.646,162,0.805,169,2.801,191,3.982,211,2.567,213,1.871,236,2.913,240,1.573,246,5.044,251,2.225,252,1.744,268,3.722,273,1.545,284,1.392,348,2.7,402,2.913,463,1.347,469,2.801,509,2.347,549,3.253,615,2.487,693,4.298,699,2.7,1269,4.298,1274,4.064,1471,3.369,1742,4.298,1835,3.276,2037,3.369,2073,4.298,2896,4.611,3215,4.611,3501,5.086,3502,5.086,3503,4.611,3504,5.086,3505,5.086,3506,5.086,3507,5.086]],["t/692",[3,0.843,45,1.113,49,1.192,50,0.918,70,4.192,71,0.584,73,1.164,74,0.511,105,0.992,108,1.64,130,3.403,131,3.889,138,3.211,162,0.94,199,4.013,213,2.186,240,1.837,277,2.502,284,1.626,463,1.573,545,4.149,767,4.599,950,7.21,1337,5.429,1578,4.747,1689,4.347,1833,4.056,2037,3.935,2222,4.192,3503,5.386,3508,5.941,3509,7.953,3510,5.941,3511,5.941]],["t/694",[3,0.954,18,2.177,48,2.262,50,1.04,71,0.661,73,0.984,74,0.529,88,1.629,105,1.123,108,1.857,129,1.921,162,1.064,223,3.341,240,2.667,273,2.043,284,1.841,463,1.781,482,2.475,615,3.29,699,3.571,815,6.088,2446,6.098,2447,6.098,3295,6.098,3451,6.098]],["t/696",[3,0.686,45,0.567,48,1.625,49,1.205,50,0.747,71,0.475,73,0.707,74,0.539,88,1.655,97,1.657,105,0.807,108,0.835,109,1.526,115,1.724,152,1.852,162,0.479,177,1.068,198,0.666,235,1.137,240,2.132,252,1.657,269,3.685,281,0.849,287,1.809,298,2.769,313,1.29,420,2.371,487,1.396,545,1.578,563,1.852,569,2.2,574,2.004,751,3.685,772,3.537,1182,2.891,1184,2.662,1234,2.742,1287,2.213,1467,1.323,1470,4.122,1549,3.113,1551,4.603,1688,2.556,1835,1.948,1957,2.769,2052,3.862,2180,3.411,2239,2.742,2353,2.556,2482,2.213,2989,4.382,3512,3.025,3513,3.025,3514,3.025,3515,3.025,3516,4.834,3517,4.834,3518,4.834,3519,6.038,3520,6.038,3521,4.834,3522,3.025,3523,8.039,3524,4.834,3525,3.025,3526,4.834,3527,3.025,3528,3.025,3529,3.025,3530,3.025,3531,3.025,3532,3.025,3533,3.025,3534,3.025,3535,6.038,3536,3.025,3537,3.025,3538,3.025,3539,3.025,3540,3.025,3541,3.025,3542,3.025,3543,3.025,3544,4.834,3545,4.834,3546,4.834,3547,3.025,3548,3.025,3549,3.025,3550,3.025,3551,3.025,3552,3.025,3553,3.025]],["t/698",[3,0.978,50,1.066,59,5.501,70,4.867,71,0.678,73,1.01,74,0.532,105,1.152,108,1.904,129,1.97,162,1.091,223,3.426,284,2.638,313,2.941,414,4.867,463,1.826,598,3.481,650,5.807,3554,6.898,3555,6.898,3556,6.898]],["t/700",[71,0.842,162,1.356,252,2.937,284,2.346,463,2.269,3557,8.569,3558,8.569]],["t/702",[3,0.895,18,2.042,49,1.384,50,1.428,56,1.698,71,0.62,73,1.352,74,0.52,105,1.542,108,1.742,150,2.042,162,0.998,211,3.184,213,2.321,277,2.658,281,1.771,284,2.266,463,1.67,767,3.236,3191,5.72,3559,6.309,3560,6.309,3561,6.309,3562,6.309,3563,6.309,3564,6.309,3565,6.309]],["t/704",[3,0.874,45,1.155,49,0.924,50,0.953,52,1.674,56,1.66,71,0.606,73,0.902,74,0.527,88,1.539,105,1.03,129,1.761,141,4.927,142,3.868,162,0.975,200,2.448,277,2.597,284,1.688,308,4.512,333,3.461,463,1.632,475,3.971,764,4.7,1187,4.209,1756,3.688,2876,5.21,3566,9.133,3567,6.166,3568,6.166,3569,6.166,3570,6.166,3571,6.166,3572,8.152,3573,6.166]],["t/706",[3,0.836,18,1.909,50,0.912,70,4.161,71,0.579,73,0.863,74,0.55,88,1.494,105,0.985,108,1.628,129,1.684,162,0.933,191,2.841,223,2.929,240,2.447,273,1.791,284,2.166,463,1.561,615,2.884,660,4.026,808,4.984,813,5.584,825,4.712,826,5.584,1159,4.984,1274,4.712,1338,3.906,3106,5.347,3134,5.347,3574,5.898,3575,5.898,3576,5.898,3577,5.898,3578,5.898]],["t/708",[3,0.916,49,1.259,50,0.998,59,5.862,71,0.635,73,0.945,74,0.523,105,1.079,108,2.579,129,1.845,162,1.022,281,1.814,284,2.557,414,4.558,463,1.71,598,4.241,650,5.567,671,5.458,1833,4.41,2605,7.62,2663,7.62,3579,6.46]],["t/710",[3,0.735,50,0.801,71,0.509,73,0.759,74,0.543,88,0.978,105,0.866,109,2.616,129,1.48,155,2.854,162,0.82,211,2.616,213,1.907,273,2.536,284,1.419,298,2.969,418,5.673,463,1.372,469,2.854,551,3.763,598,4.214,694,4.38,699,3.846,746,4.799,1126,5.532,1153,8.625,1200,3.952,1338,4.799,1380,4.142,1392,4.38,1463,3.433,2045,4.699,3580,5.184,3581,5.184,3582,7.245,3583,5.184,3584,5.184]],["t/712",[3,0.938,50,1.023,71,0.65,73,1.249,74,0.514,105,1.105,129,1.89,131,4.884,138,5.108,162,1.047,254,3.236,277,2.787,284,1.811,313,2.822,463,1.752,569,3.011,1482,5.287,2241,5.592,2817,5.287,2888,5.287,2889,5.287,3585,5.592,3586,6.617,3587,6.617,3588,5.592]],["t/714",[3,0.902,50,0.983,71,0.625,73,1.218,74,0.521,75,4.095,88,1.57,105,1.062,129,1.816,131,5.121,138,5.011,162,1.006,277,2.678,284,1.741,313,2.712,463,1.683,569,2.894,1553,4.847,2817,5.081,2888,5.081,2889,5.081,3585,5.373,3588,5.373,3589,6.359,3590,6.359,3591,6.359]],["t/716",[3,0.946,50,1.031,71,0.655,73,1.256,74,0.515,88,1.62,105,1.114,129,1.905,131,4.899,138,5.128,162,1.055,277,2.81,284,1.826,463,1.766,569,3.036,2817,5.331,2888,5.331,2889,5.331,3585,5.638,3588,5.638,3592,6.672,3593,6.672,3594,6.672]],["t/718",[3,0.916,50,0.998,56,2.515,71,0.635,73,0.945,74,0.523,81,4.053,105,1.079,115,2.998,129,1.845,144,3.429,162,1.022,252,2.214,273,1.962,284,1.768,333,3.626,463,1.71,699,3.429,1184,4.628,1407,5.162,1410,4.924,1686,4.41,3085,5.458,3395,5.458,3595,8.405,3596,6.46,3597,6.46,3598,6.46]],["t/720",[3,0.759,8,1.823,45,1.003,49,0.802,50,0.828,71,0.526,73,1.084,74,0.537,88,1.399,96,2.542,105,0.894,108,1.478,125,1.717,129,1.529,162,0.847,200,2.942,211,2.702,235,2.785,240,1.655,273,1.626,284,1.466,313,3.16,423,3.283,429,5.422,463,1.418,615,2.618,663,5.921,664,4.278,1470,3.655,1508,3.778,2180,3.778,3153,4.854,3280,6.261,3281,4.524,3283,4.524,3599,5.354,3600,5.354,3601,5.354,3602,5.354,3603,5.354,3604,5.354,3605,5.354,3606,5.354,3607,5.354]]],"invertedIndex":[["",{"_index":74,"t":{"6":{"position":[[531,1],[533,2],[586,2],[605,2],[608,3],[612,1],[810,1],[812,2],[865,2],[884,2],[906,2],[967,2],[985,2],[1018,2],[1021,3],[1025,1],[1167,1],[1169,2],[1205,2],[1242,2],[1245,3],[1249,2],[1461,2],[1505,2]]},"8":{"position":[[143,1],[149,2],[202,1],[241,2],[264,1]]},"10":{"position":[[329,2],[639,2],[685,3],[727,1],[766,2],[780,2],[867,1],[897,1],[899,1],[920,2],[923,2],[962,2],[984,2],[1062,1],[1084,2],[1087,2],[1090,1],[1119,1],[1121,1],[1141,2],[1144,2],[1158,1],[1198,2],[1211,2],[1297,1],[1330,1],[1332,1],[1349,2],[1352,2],[1375,2]]},"12":{"position":[[271,2]]},"17":{"position":[[349,2],[352,2],[388,2],[391,2],[429,2],[432,2],[480,2],[549,2],[868,2],[871,2],[914,2],[917,2],[962,2],[965,2],[1188,2],[1276,1],[1278,2],[1366,2],[1444,2],[1509,2],[1559,2],[1627,2],[1676,2],[1738,2],[1784,2],[1850,2],[1905,2],[1974,2],[2025,2],[2072,2],[2075,2],[2105,1],[2172,2],[2219,2],[2286,2],[2289,2],[2347,2],[2423,2],[2426,2],[2475,2],[2546,2],[2549,2],[2598,1],[2608,2],[2752,1],[2781,2]]},"19":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"21":{"position":[[133,1],[139,2],[160,2],[201,2],[219,1],[271,1],[309,2],[343,1]]},"23":{"position":[[156,1],[162,2],[181,2],[200,2],[221,2],[325,2],[351,2],[383,2],[419,2],[422,2],[425,1]]},"25":{"position":[[146,1],[152,2],[171,2],[201,2],[212,2],[241,2],[277,2],[318,2],[337,2],[366,2],[402,2],[443,2],[490,1]]},"27":{"position":[[186,1],[192,2],[249,1],[288,2],[355,2],[385,2],[428,1]]},"29":{"position":[[119,1],[125,2],[167,1],[171,2],[174,3],[178,1]]},"35":{"position":[[112,1],[139,1],[152,1],[166,1],[172,2],[257,2],[292,3],[296,1],[298,2],[347,1],[356,1],[358,1],[360,1],[411,1],[419,1],[421,1],[423,2],[426,1],[428,1],[480,1],[488,1],[490,1],[492,2],[495,1],[497,1],[553,1],[555,1],[557,1]]},"37":{"position":[[126,1],[153,1],[166,1],[180,1],[186,2],[373,2],[451,2],[486,3],[490,1],[492,2],[539,1],[548,1],[550,1],[552,1],[596,4],[616,2],[619,1],[685,2],[688,1],[760,1],[762,2],[765,1],[767,1],[795,3],[807,4],[827,2],[830,1],[858,3],[893,2],[896,1],[924,3],[962,1],[964,2],[979,1],[981,1],[1055,1],[1057,2],[1072,1],[1074,1],[1148,1],[1150,2],[1158,1]]},"39":{"position":[[111,1],[138,1],[151,1],[165,1],[171,2],[230,2],[275,3],[279,1],[281,2],[328,1],[337,1],[381,4],[401,1]]},"41":{"position":[[211,1],[217,2],[272,1],[336,2],[379,3],[383,1],[385,2],[412,1],[421,1],[423,1],[468,4],[488,1],[490,1]]},"43":{"position":[[39,1],[51,2]]},"47":{"position":[[113,2],[157,2]]},"49":{"position":[[307,1],[349,1],[453,2],[456,1]]},"51":{"position":[[194,1],[236,1],[340,2],[343,1]]},"53":{"position":[[390,1],[432,1],[607,2],[610,1]]},"55":{"position":[[439,1],[481,1],[656,2],[659,1]]},"57":{"position":[[205,2],[295,1]]},"59":{"position":[[347,2],[427,1],[454,2],[457,2],[516,2],[519,2],[562,2],[565,2],[585,2],[681,2],[706,2],[723,2],[772,2],[790,1],[800,2],[855,2],[858,2],[875,1]]},"64":{"position":[[58,2]]},"68":{"position":[[40,2],[62,2],[156,2],[174,2],[181,1],[194,1],[213,2],[226,2],[229,3]]},"70":{"position":[[380,2],[383,3]]},"72":{"position":[[448,2],[460,2],[470,2],[480,2],[490,2]]},"74":{"position":[[134,2],[137,3]]},"76":{"position":[[190,2],[193,3]]},"78":{"position":[[429,2],[432,3]]},"80":{"position":[[197,2],[200,3]]},"82":{"position":[[210,2],[213,3]]},"84":{"position":[[158,2],[161,3]]},"86":{"position":[[201,2],[204,3]]},"88":{"position":[[241,2],[244,3]]},"90":{"position":[[148,2],[214,2],[217,2],[235,2],[297,2],[325,2],[328,2],[343,1],[386,2],[389,2],[459,2],[490,2],[493,2],[737,2],[740,3]]},"92":{"position":[[182,2],[185,3]]},"94":{"position":[[178,2],[181,3]]},"96":{"position":[[109,2],[166,2],[169,2],[236,2],[331,2],[388,2],[391,3]]},"98":{"position":[[162,2],[228,2],[231,2],[298,2],[402,2],[468,2],[471,3],[772,2],[775,3],[1153,2],[1156,3],[1225,2],[1289,1],[1291,2],[1347,2],[1387,2],[1436,1],[1448,2],[1502,2],[1505,2],[1580,2],[1690,2],[1754,2],[1859,2],[1862,3]]},"100":{"position":[[168,2],[171,3]]},"102":{"position":[[138,2],[141,3]]},"104":{"position":[[217,2],[220,3]]},"106":{"position":[[188,2],[191,3]]},"108":{"position":[[98,2],[131,2],[175,2],[229,1],[255,2],[258,3]]},"110":{"position":[[157,2],[160,3]]},"112":{"position":[[154,2],[157,3]]},"114":{"position":[[158,2],[161,3]]},"116":{"position":[[97,2],[116,2],[119,3]]},"118":{"position":[[255,2],[300,2],[303,3]]},"120":{"position":[[190,1],[216,2],[219,3]]},"122":{"position":[[158,2],[175,2],[178,3]]},"124":{"position":[[146,2],[164,2],[167,3]]},"126":{"position":[[232,2],[252,2],[255,3]]},"128":{"position":[[268,1],[287,2],[312,2],[315,2],[318,3]]},"130":{"position":[[46,1],[58,1],[66,2],[96,1],[105,2],[135,1],[144,2],[173,1],[181,2],[212,1],[222,2],[247,1],[258,2],[291,1],[303,2],[336,1],[348,2],[379,1],[389,2],[418,1],[426,1],[468,1],[482,1],[508,1],[536,1],[570,1],[610,1],[657,1],[704,1],[758,1],[805,1],[852,1],[904,1],[958,1],[1018,1],[1084,1],[1157,1],[1199,1],[1252,1],[1269,1],[1275,2],[1319,1],[1325,2],[1361,1],[1367,2],[1402,1],[1408,2],[1429,1],[1435,2],[1468,1],[1474,2],[1508,1],[1514,2],[1567,1],[1573,2],[1608,1],[1614,2],[1652,1],[1658,2],[1698,1],[1704,2],[1739,1],[1745,2],[1785,1],[1791,2],[1821,1],[1827,2],[1869,1],[1875,2],[1917,1],[1923,2],[1954,1],[1960,2],[1994,1],[2000,2],[2037,1],[2043,2],[2075,1],[2081,2],[2124,1],[2130,2],[2173,1],[2179,2],[2211,1],[2217,2],[2255,1],[2261,2],[2300,1],[2306,2],[2341,1],[2347,2],[2381,1],[2387,2],[2429,1],[2435,2],[2474,1],[2480,2],[2523,1],[2529,2],[2567,1],[2573,2],[2607,1],[2613,2],[2643,1],[2649,2],[2689,1],[2695,2],[2740,1],[2746,2],[2791,1],[2797,2],[2841,1],[2847,2],[2894,1],[2900,2],[2955,1],[2961,2],[3002,1],[3008,2],[3041,1],[3047,2],[3091,1],[3097,2],[3142,1],[3148,2],[3179,1],[3185,2],[3226,1],[3232,2],[3265,1],[3271,2],[3311,1],[3317,2],[3364,1],[3370,2],[3407,1],[3413,2],[3462,1],[3468,2],[3516,1],[3522,2],[3563,1],[3569,2],[3609,1],[3615,2],[3651,1],[3657,2],[3701,1],[3707,2],[3747,1],[3753,2],[3802,1],[3808,2],[3855,1],[3861,2],[3904,1],[3910,2],[3947,1],[3953,2],[3988,1],[3994,2],[4045,1],[4051,2],[4066,1],[4079,1],[4095,1],[4124,2],[4159,1],[4190,2],[4226,1],[4260,2],[4292,1],[4320,2],[4351,1],[4378,2],[4417,1],[4452,2],[4488,1],[4520,2],[4560,1],[4596,2],[4631,1],[4664,2],[4695,1],[4722,2],[4749,1],[4772,2],[4809,1],[4842,2],[4884,1],[4921,2],[4963,1],[5003,2],[5044,1],[5080,2],[5124,1],[5163,2],[5215,1],[5262,2],[5300,1],[5336,2],[5366,1],[5391,2],[5432,1],[5469,2],[5511,1],[5549,2],[5577,1],[5602,2],[5640,1],[5675,2],[5705,1],[5732,2],[5769,1],[5803,2],[5847,1],[5886,2],[5920,1],[5954,2],[6000,1],[6046,2],[6091,1],[6136,2],[6174,1],[6212,2],[6249,1],[6282,2],[6315,1],[6344,2],[6385,1],[6422,2],[6459,1],[6492,2],[6538,1],[6580,2],[6624,1],[6664,2],[6704,1],[6742,2],[6776,1],[6807,2],[6839,1],[6869,2],[6917,1],[6965,2],[6980,1],[7028,1],[7050,1],[7092,1],[7140,1],[7186,1],[7217,1],[7244,1],[7282,1],[7316,1],[7341,1],[7366,1],[7393,1],[7430,1],[7470,1],[7496,1],[7520,1],[7550,1],[7584,1],[7615,1],[7636,1],[7659,1],[7694,1],[7734,1],[7776,1],[7819,1],[7848,1],[7874,1],[7905,1],[7933,1],[7964,1],[8004,1],[8045,1],[8078,1],[8102,1],[8131,1],[8164,1],[8215,1],[8284,1],[8349,1],[8413,1],[8478,1],[8538,1],[8599,1],[8667,1],[8714,1],[8749,1],[8809,1],[8857,1],[8874,1],[8906,1],[8952,1],[8995,1],[9036,1],[9077,1],[9116,1],[9149,1],[9173,1],[9201,1],[9242,1],[9285,1],[9332,1],[9377,1],[9414,1],[9446,1],[9470,1],[9490,1],[9513,1],[9546,1],[9582,1],[9609,1],[9632,1],[9662,1],[9699,1],[9731,1],[9756,1],[9794,1],[9860,1],[9932,1],[9980,1],[10014,1],[10053,1],[10103,1],[10165,1],[10225,1],[10281,1],[10331,1],[10374,1],[10411,1],[10449,1],[10488,1],[10516,1],[10539,1],[10566,1],[10593,1],[10616,1],[10637,1],[10672,1],[10719,1],[10773,1],[10824,1],[10873,1],[10926,1],[10970,1],[11010,1],[11055,1],[11089,1],[11112,1],[11133,1],[11165,1],[11197,1],[11223,1],[11256,1],[11291,1],[11325,1],[11359,1],[11394,1],[11422,1],[11460,1],[11503,1],[11535,1],[11573,1],[11611,1],[11648,1],[11668,1]]},"133":{"position":[[155,2],[177,2],[192,2],[195,3]]},"135":{"position":[[76,2],[97,2],[232,2],[235,2],[238,3],[347,2],[508,1],[515,1],[1000,1],[1335,1],[5038,1],[5333,2],[5336,2],[5917,2],[6901,2]]},"137":{"position":[[174,1],[227,2]]},"139":{"position":[[104,2],[146,2],[188,2],[211,1],[251,1],[258,1],[295,1],[297,2],[300,3]]},"143":{"position":[[6,1],[25,1],[96,1]]},"145":{"position":[[107,1],[140,1],[167,1],[207,1]]},"149":{"position":[[441,1],[492,1],[514,1],[562,1],[583,1],[585,2],[588,3],[592,2]]},"153":{"position":[[127,1],[172,3],[235,1],[277,2],[313,2],[390,2],[397,1],[406,1],[477,2],[514,2],[587,2]]},"155":{"position":[[124,2]]},"159":{"position":[[95,1],[195,1],[325,1],[412,1],[510,1],[591,1],[704,1],[846,1]]},"162":{"position":[[20,1],[118,1],[132,1],[134,2],[155,2],[170,2],[187,1],[253,2],[274,1],[339,2],[382,1],[430,1],[459,1],[512,1],[544,1]]},"164":{"position":[[20,1],[118,1],[132,1],[134,2],[155,2],[170,2],[190,1],[253,2],[296,1],[349,1],[420,1],[473,2],[476,1]]},"166":{"position":[[20,1],[112,1],[126,1],[128,2],[146,1],[207,2],[225,1],[302,2],[359,1],[392,1],[430,1]]},"168":{"position":[[20,1],[112,1],[126,1],[132,2],[172,2],[247,1],[280,1],[318,1]]},"170":{"position":[[20,1],[112,1],[126,1],[132,2],[183,2],[258,1],[302,1],[317,2],[360,2],[367,1],[380,1],[416,1],[418,1],[442,1]]},"176":{"position":[[77,1],[160,1],[238,2],[366,2],[369,3],[373,2],[516,2],[580,1],[590,2],[600,2],[608,2],[617,1],[631,1],[641,2],[652,2],[660,2],[672,1],[686,1],[701,2],[743,1],[786,2],[841,3]]},"178":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[236,2],[239,2],[305,2],[366,2],[425,2],[475,2],[478,2],[527,2],[573,2],[619,2],[669,2],[724,2],[770,2],[773,2],[837,2],[907,2],[992,2],[995,2],[1048,2],[1106,2],[1109,2],[1165,2],[1223,2],[1226,2],[1282,1]]},"180":{"position":[[18,1],[182,1]]},"186":{"position":[[77,1],[156,1],[234,2],[284,2],[389,1],[417,2],[427,2],[445,1],[480,3],[638,1],[656,2],[729,1],[759,2],[802,1],[838,2],[841,3],[883,1],[957,2]]},"188":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[255,2],[258,2],[282,1],[321,2],[427,2],[430,2],[456,2],[459,2],[508,2],[567,2],[570,2],[616,2],[687,2],[690,2],[728,1],[730,2],[767,2],[770,1],[809,2],[898,2],[901,2],[977,2],[1031,2],[1034,2],[1109,2],[1181,1],[1191,2],[1194,2],[1238,2],[1335,2],[1408,2],[1428,2],[1431,2],[1459,2],[1501,2],[1572,2],[1575,2],[1648,1]]},"190":{"position":[[18,1],[53,1],[153,1],[189,2],[328,1]]},"196":{"position":[[77,1],[159,1],[237,2],[290,2],[403,2],[408,3],[412,2],[519,1],[537,2],[557,2],[592,2],[597,3]]},"198":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[240,2],[243,2],[278,2],[299,2],[318,2],[339,2],[376,1]]},"200":{"position":[[18,1],[60,1]]},"202":{"position":[[0,2],[28,1],[44,1],[62,1],[81,1],[106,1],[110,1]]},"208":{"position":[[77,1],[155,1],[233,2],[282,2],[458,3],[959,1],[993,2],[1010,2],[1013,3]]},"210":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[282,2],[352,2],[355,2],[449,2],[488,2],[491,2],[559,2],[630,2],[633,2],[660,3],[684,2],[760,2],[812,2],[815,2],[895,2],[967,2],[1041,2],[1044,2],[1071,3],[1095,2],[1168,2],[1242,2],[1314,2],[1363,2],[1366,2],[1422,2],[1495,2],[1506,2],[1509,2],[1536,3],[1561,2],[1638,2],[1656,2],[1659,2],[1700,1]]},"212":{"position":[[18,1],[76,4],[227,2],[230,5],[250,3],[294,3],[309,1]]},"218":{"position":[[77,1],[155,1],[233,2],[282,2],[447,1],[532,1],[534,3],[538,2],[541,3]]},"220":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[265,2],[333,2],[353,2],[374,2],[394,2],[414,2],[433,2],[454,2],[457,2],[503,2],[506,2],[567,2],[634,2],[688,2],[718,2],[745,3],[769,2],[797,2],[824,3],[846,2],[885,2],[937,2],[979,2],[1033,2],[1087,2],[1143,2],[1211,2],[1271,2],[1331,2],[1334,2],[1358,1],[1395,2],[1449,2],[1452,2],[1509,2],[1568,2],[1623,2],[1626,2],[1648,2],[1669,2],[1710,2],[1713,2],[1773,2],[1809,2],[1812,2],[1885,2],[1888,2],[1999,1]]},"222":{"position":[[18,1],[49,1],[121,1],[234,1]]},"224":{"position":[[6,1],[19,1],[36,1]]},"226":{"position":[[58,2],[75,2],[166,3]]},"228":{"position":[[1107,1],[1138,1]]},"232":{"position":[[77,1],[160,1],[238,2],[292,2],[401,2],[404,3],[408,3]]},"234":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[264,2],[267,2],[396,2],[484,2],[487,2],[648,2],[712,2],[715,2],[768,1]]},"236":{"position":[[18,1],[65,1],[99,2],[125,2],[168,1],[208,2],[237,1]]},"238":{"position":[[6,1],[26,1],[64,1],[70,1]]},"242":{"position":[[0,2],[72,2]]},"244":{"position":[[77,1],[164,1],[242,2],[270,2],[389,2],[500,2],[698,3],[702,2],[709,1],[782,1],[813,1],[834,2],[837,2],[845,1],[914,1],[974,2],[988,2]]},"246":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[249,2],[252,2],[300,2],[339,1],[357,2],[360,2],[439,2],[551,2],[590,2],[593,2],[689,2],[728,2],[731,2],[827,1]]},"248":{"position":[[18,1],[71,3],[127,1]]},"250":{"position":[[307,2],[330,3],[432,3]]},"256":{"position":[[77,1],[157,1],[235,2],[305,2],[443,3],[529,4],[534,3],[538,1]]},"258":{"position":[[24,1],[34,1],[106,1],[108,1]]},"260":{"position":[[0,2],[64,1],[66,2],[164,2],[268,1]]},"268":{"position":[[77,1],[155,1],[233,2],[282,2],[289,1],[379,1],[418,2],[421,2],[506,3],[510,2],[517,1],[610,1],[649,2]]},"270":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[264,2],[328,2],[394,2],[462,2],[529,2],[595,2],[661,2],[704,1]]},"272":{"position":[[18,1],[52,1]]},"278":{"position":[[77,1],[166,1],[254,1],[341,1],[429,2],[592,1],[689,5],[695,1],[732,1],[765,1]]},"280":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,1]]},"282":{"position":[[18,1],[39,1]]},"288":{"position":[[77,1],[158,1],[236,2],[288,2],[411,3]]},"290":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[259,2],[262,2],[284,2],[299,2],[326,2],[329,2],[377,2],[457,2],[522,2],[525,2],[578,2],[661,2],[664,2],[733,1]]},"292":{"position":[[18,1],[45,3],[103,1]]},"294":{"position":[[98,1],[262,1]]},"298":{"position":[[77,1],[161,1],[239,2],[337,3],[341,2],[529,3]]},"300":{"position":[[110,1],[227,1],[229,2],[289,2],[370,1],[376,2],[456,3],[460,2],[558,2],[614,2],[780,3],[815,1]]},"302":{"position":[[55,1],[168,1],[182,1],[188,2],[284,3],[319,1]]},"304":{"position":[[55,1],[171,1],[185,1],[191,2],[301,3],[336,1]]},"306":{"position":[[58,1],[174,1],[188,1],[194,2],[306,3],[341,1]]},"308":{"position":[[55,1],[174,1],[188,1],[194,2],[290,3],[325,1]]},"310":{"position":[[53,1],[137,2],[260,1],[274,1],[290,2],[309,2],[316,1],[329,1],[335,2],[413,3],[448,1]]},"312":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[240,2],[285,2],[288,2],[343,2],[346,2],[408,2],[447,2],[450,2],[485,2],[488,2],[509,2],[551,2],[581,2],[584,2],[640,2],[679,2],[682,2],[745,2],[792,2],[859,2],[862,2],[920,2],[978,2],[981,2],[1003,2],[1050,2],[1096,2],[1132,2],[1135,2],[1157,2],[1216,1]]},"314":{"position":[[18,1],[62,3],[134,3],[138,1]]},"316":{"position":[[89,1],[147,1]]},"320":{"position":[[77,1],[162,1]]},"324":{"position":[[57,1],[72,2],[75,3],[79,3]]},"326":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[258,2],[317,2],[320,2],[345,1],[382,2],[456,2],[459,2],[516,2],[606,2],[609,2],[749,2],[841,2],[844,2],[921,2],[955,2],[958,2],[1035,2],[1087,2],[1090,2],[1178,1]]},"328":{"position":[[18,1],[58,1],[60,2],[166,2],[182,1],[269,1],[280,2],[297,2],[303,1],[305,2],[374,2],[415,1],[428,2],[468,2],[538,2],[594,1]]},"334":{"position":[[20,1],[100,1],[114,1],[120,2],[195,1],[229,2],[252,1]]},"336":{"position":[[0,2],[64,1],[66,2],[113,2],[166,2],[183,2],[236,2],[258,2],[322,2],[339,2],[380,2],[460,2],[474,2],[519,2],[544,2],[605,2],[630,2],[657,3],[690,2],[707,2],[760,2],[782,2],[840,2],[858,2],[925,2],[947,2],[974,3],[1002,2],[1034,2],[1110,2],[1140,2],[1213,2],[1245,2],[1320,2],[1344,2],[1403,2],[1429,2],[1490,2],[1512,2],[1573,2],[1610,2],[1674,1]]},"338":{"position":[[18,1],[377,1]]},"344":{"position":[[20,1],[133,1],[139,1],[148,1],[181,1],[243,1],[258,2],[301,2],[392,2],[397,1],[416,1],[468,1],[482,1],[488,2],[503,2],[687,3],[729,1],[782,2],[805,1],[813,1],[837,1],[878,2],[990,2],[1092,2]]},"346":{"position":[[159,1],[291,1],[297,1],[306,1],[353,1],[445,1],[447,1],[509,1],[524,2],[567,2],[658,2],[663,1],[682,1],[734,1],[771,1],[785,2],[836,2],[859,1],[897,1],[912,1],[914,1],[928,1],[942,1],[948,2],[1078,3],[1120,1],[1153,2],[1207,1],[1260,2],[1306,1],[1361,2],[1384,1],[1408,1],[1410,1],[1473,2],[1484,1],[1621,2],[1652,1],[1777,2]]},"348":{"position":[[20,1],[133,1],[141,1],[150,1],[174,1],[188,1],[194,2],[224,2],[311,1],[326,2],[369,2],[460,2],[465,1],[484,1],[536,2],[539,2],[580,1],[613,2],[677,1],[730,2],[753,1],[777,1],[779,1],[842,2],[853,1],[982,2]]},"350":{"position":[[0,2],[64,1],[66,2],[113,2],[166,2],[238,2],[293,2],[366,2],[410,2],[491,2],[562,2],[598,2],[649,2],[669,2],[690,2],[710,2],[729,2],[749,2],[787,2],[841,2],[896,2],[989,2],[1058,2],[1107,1]]},"352":{"position":[[18,1],[69,1],[87,2],[140,1],[149,2],[180,1],[248,1],[333,2],[357,1],[429,1]]},"358":{"position":[[77,1],[158,1],[236,2],[288,2],[397,1],[413,2],[428,2],[455,1],[510,1],[544,2],[586,1],[624,2],[655,3]]},"360":{"position":[[195,1],[254,3],[407,1],[442,1],[459,1],[478,1],[503,1]]},"362":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[287,2],[290,2],[312,2],[390,2],[393,2],[431,1],[433,2],[450,2],[453,1],[492,2],[568,2],[571,2],[585,1],[624,2],[680,2],[683,2],[720,1],[722,2],[774,2],[777,1],[806,2],[852,2],[877,2],[880,2],[922,2],[968,1],[992,2],[995,2],[1041,2],[1095,2],[1098,2],[1173,2],[1244,2],[1247,2],[1324,1]]},"364":{"position":[[18,1],[50,1],[105,1],[121,2],[163,1],[214,2],[309,1]]},"366":{"position":[[58,2],[75,2],[172,3]]},"372":{"position":[[77,1],[156,1],[234,2],[284,2],[327,2],[501,2]]},"374":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[255,2],[317,2],[348,2],[351,2],[373,2],[390,1]]},"376":{"position":[[18,1],[39,1]]},"382":{"position":[[77,1],[157,1],[416,2],[467,2],[510,2],[633,3],[637,2],[718,2],[833,3],[837,2],[858,1],[1012,3],[1016,2],[1048,2],[1124,2],[1131,1],[1175,1],[1244,3],[1248,2],[1446,1],[1496,2],[1499,2],[1502,3],[1506,2],[1673,1],[1704,2],[1722,1],[1756,1],[1758,2],[1761,3],[1765,2],[1872,3]]},"384":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[289,2],[330,2],[333,2],[401,2],[447,2],[450,2],[521,2],[556,2],[559,2],[648,2],[734,2],[737,2],[786,2],[879,2],[882,2],[928,2],[989,2],[992,2],[1018,1],[1064,2],[1109,2],[1112,2],[1151,2],[1215,2],[1218,2],[1324,1]]},"386":{"position":[[18,1],[175,1],[236,1]]},"388":{"position":[[0,2],[26,1],[35,1],[51,1],[71,1],[95,1],[116,1],[131,1],[145,1],[161,1],[180,1],[199,1],[215,1],[229,1],[247,1],[269,1],[280,2],[310,1],[322,2],[353,1],[389,1],[405,2],[441,1],[450,2],[479,1],[510,1],[537,1],[556,1],[566,2],[616,1],[628,2],[659,1],[674,2],[706,1],[722,2],[750,1],[761,2],[786,1],[796,2],[822,1],[834,2],[862,1],[874,2],[893,1],[910,1],[927,1],[947,1],[966,1],[986,1],[1006,1],[1024,1],[1043,1],[1053,1]]},"394":{"position":[[77,1],[158,1],[236,2],[288,2],[373,1],[397,2]]},"396":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[244,2],[247,2],[297,2],[359,2],[362,2],[461,1]]},"398":{"position":[[18,1],[109,1]]},"402":{"position":[[0,2],[110,2],[257,2],[400,2],[634,2],[822,2],[1020,2],[1212,2]]},"404":{"position":[[77,1],[156,1],[234,2],[301,2],[404,2],[407,2],[586,2],[589,2],[673,2],[846,2],[1034,3],[1038,2],[1110,1],[1116,2],[1171,2],[1196,2],[1203,1],[1216,1],[1218,2],[1311,2],[1314,2],[1406,1],[1415,2],[1468,2],[1475,1],[1488,1],[1490,2],[1583,2],[1586,2],[1695,1],[1704,2],[1763,1],[1773,2],[1780,1],[1793,1],[1795,2],[1888,2],[1891,2],[1984,1],[1993,2],[2070,2],[2077,1],[2090,1],[2092,2],[2185,2],[2188,2],[2351,2],[2354,3],[2358,2],[2534,2],[2577,1],[2634,2],[2678,1],[2735,2],[2738,3],[2742,2],[2950,3]]},"406":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[256,2],[259,2],[302,2],[355,2],[358,2],[387,2],[436,2],[439,2],[493,2],[544,2],[547,2],[602,2],[671,2],[674,2],[727,2],[780,2],[825,2],[891,2],[965,2],[1039,2],[1096,2],[1154,2],[1231,2],[1300,1]]},"408":{"position":[[18,1],[122,1]]},"414":{"position":[[20,1],[102,1],[116,1],[122,2],[238,2],[258,3],[303,1],[342,2],[388,1],[421,1],[423,1],[440,2],[463,1]]},"416":{"position":[[0,2],[64,1],[66,2],[115,2],[168,2],[252,2],[297,2],[319,2],[338,2],[358,2],[396,2],[465,2],[501,2],[544,2],[642,1]]},"418":{"position":[[18,1],[59,1]]},"424":{"position":[[77,1],[160,1],[238,2],[292,2],[427,1],[448,2],[451,3]]},"426":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[262,2],[265,2],[316,2],[383,2],[386,2],[443,2],[509,2],[547,2],[550,2],[605,1]]},"428":{"position":[[199,1],[300,1]]},"434":{"position":[[20,1],[101,1],[115,1],[121,2],[235,2],[238,3],[283,1],[322,2],[368,1],[401,1],[403,1],[420,2],[443,1]]},"440":{"position":[[77,1],[155,1],[245,1],[251,2],[323,1],[345,2],[364,3],[408,1],[457,2],[491,1],[533,1],[586,1]]},"446":{"position":[[77,1],[158,1],[236,2],[265,2],[313,2],[368,1],[370,2],[408,2],[431,2],[438,1],[451,1],[453,2],[471,2],[491,2],[533,2],[554,2],[569,2],[603,2],[629,2],[652,2],[659,1],[672,1],[674,2],[748,1],[753,2],[776,2],[796,2],[803,1],[816,1],[871,2]]},"448":{"position":[[0,2],[64,1],[66,2],[94,2],[124,1],[161,2],[208,2],[270,2],[341,2],[384,2],[455,2],[520,2],[550,2],[577,3],[601,2],[629,2],[656,3],[678,2],[717,2],[769,2],[811,2],[865,2],[894,2],[950,2],[1018,2],[1055,2],[1112,2],[1155,2],[1222,2],[1276,2],[1339,2],[1378,1]]},"450":{"position":[[18,1],[43,1],[161,1]]},"452":{"position":[[6,1],[28,1],[59,1],[92,1],[102,1]]},"454":{"position":[[58,2],[75,2],[124,2],[173,2]]},"460":{"position":[[77,1],[158,1],[236,2],[336,2],[379,2],[416,2],[740,2],[749,1],[846,2]]},"462":{"position":[[0,2],[64,1],[66,2],[88,2],[91,2],[142,2],[160,2],[163,2],[217,2],[279,2],[282,2],[323,2],[394,2],[397,2],[452,2],[500,2],[503,2],[549,2],[598,1],[631,2],[634,2],[745,2],[799,1],[832,2],[835,2],[955,1]]},"464":{"position":[[18,1],[297,3],[301,1]]},"467":{"position":[[497,1]]},"479":{"position":[[0,2],[94,1]]},"485":{"position":[[77,1],[158,1],[248,1],[254,2],[271,2],[299,1],[314,2],[358,1],[373,2],[426,2],[433,1],[481,1],[494,1],[585,1],[653,1],[661,2],[688,1],[695,1],[726,1],[728,1],[738,1],[777,1],[788,1],[801,1],[1026,1],[1075,1],[1081,2],[1098,2],[1126,1],[1141,2],[1185,1],[1200,2],[1268,2],[1275,1],[1323,1],[1336,1],[1453,1],[1536,1],[1544,2],[1571,1],[1578,1],[1609,1],[1611,1],[1621,1],[1649,1],[1660,1],[1673,1],[1716,1],[1722,2],[1743,2],[1825,2],[1855,1],[1862,2],[1915,1],[1962,2],[1969,1],[1989,1],[1999,1],[2027,2],[2034,1],[2054,1],[2067,1],[2165,1]]},"490":{"position":[[415,1],[492,2]]},"492":{"position":[[545,1],[562,1],[564,3],[576,1],[596,1],[622,2],[629,1],[650,1],[657,1],[674,1],[716,1],[762,1]]},"494":{"position":[[142,2],[219,1],[294,2],[297,2]]},"498":{"position":[[180,1],[194,2]]},"500":{"position":[[77,1],[163,1],[182,1],[201,1],[215,1],[217,2],[232,2],[254,2],[262,2],[269,2],[281,2],[389,3],[421,1],[472,1],[501,2],[504,2],[513,2],[521,2],[535,2],[644,3],[677,1],[730,1],[760,2],[763,2],[775,2],[786,2],[803,2],[912,3],[940,1],[993,1],[1026,2],[1029,2],[1043,2],[1091,1],[1098,2],[1129,2],[1136,1],[1180,1],[1187,1],[1234,1],[1236,2],[1270,1]]},"503":{"position":[[244,1],[246,2],[310,2],[492,1],[579,1],[593,1],[599,2],[675,1],[716,2],[750,1],[1021,1],[1023,2],[1085,2],[1175,2]]},"505":{"position":[[226,2],[275,1],[313,1],[315,2],[351,2],[386,2],[485,1],[492,1],[501,1],[503,2],[613,2],[700,1]]},"507":{"position":[[539,2],[593,2],[620,2],[706,1],[708,2],[744,2],[779,2],[878,1],[885,1],[894,1],[896,2],[926,1],[993,2],[1000,1],[1002,2],[1119,1],[1121,2],[1155,2],[1158,2],[1161,2],[1164,3],[1195,1]]},"510":{"position":[[480,1],[486,2],[569,2],[572,1],[574,3],[578,1]]},"516":{"position":[[79,1],[85,2],[104,2],[137,2],[148,2],[180,2],[216,2],[257,2],[276,2],[308,2],[344,2],[385,2],[432,1],[493,1],[499,2],[518,2],[539,2],[550,2],[570,2],[606,2],[647,2],[666,2],[686,2],[722,2],[763,2],[810,1]]},"518":{"position":[[131,1],[137,2],[160,2],[188,1],[226,1],[232,2],[253,2],[264,2],[309,1],[311,2],[376,2],[404,2],[445,2],[492,1]]},"522":{"position":[[0,2],[77,1],[116,1],[153,1],[197,1],[235,1],[279,1],[320,1],[355,1]]},"526":{"position":[[271,1],[309,1],[323,1],[329,2],[382,1],[482,1],[501,1],[503,1],[512,1],[514,2],[517,2],[531,2],[579,1],[600,1],[602,1],[613,1],[632,2],[681,1],[791,1],[872,1],[874,2],[886,2],[916,2]]},"532":{"position":[[161,2],[217,2],[281,1],[302,1],[315,1],[324,2],[346,1],[355,1],[365,1],[386,1],[388,5],[394,1],[412,1],[414,3],[418,1],[448,2]]},"538":{"position":[[308,1],[346,1],[360,1],[366,2],[424,2],[525,1],[586,2],[589,3],[604,2],[633,1],[635,2],[646,2]]},"541":{"position":[[97,1],[168,1],[298,2],[341,2],[383,2],[507,2],[867,1],[923,3],[927,2]]},"543":{"position":[[193,1],[269,1],[283,1],[285,2],[339,2],[371,2],[428,2],[463,2],[473,2],[513,2],[555,2],[596,1],[598,2],[685,2],[688,2],[722,1]]},"546":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"548":{"position":[[185,2],[243,4],[286,1],[316,2],[319,2],[414,1],[445,2],[448,2],[553,1],[589,2]]},"550":{"position":[[372,2],[415,2],[418,2],[425,1],[658,4],[841,2],[916,1],[1012,2],[1015,2],[1091,1],[1128,2],[1131,2],[1202,1],[1242,2],[1245,2],[1321,1],[1358,2],[1361,2],[1553,1],[1595,2],[1620,1],[1622,1],[1636,3],[1796,4],[1928,2],[2037,1],[2116,2],[2134,2],[2137,2],[2233,1],[2306,2],[2317,2],[2476,2],[2607,1],[2683,2],[2694,2],[2915,2],[2927,2],[2946,1],[2948,4],[2962,1],[3002,2],[3017,2],[3036,1],[3074,2],[3105,2],[3122,1],[3143,1],[3185,2],[3217,2],[3234,1],[3253,1]]},"552":{"position":[[1339,1],[1379,2],[1382,2],[1422,2],[1428,2],[1467,2],[1496,1],[1587,1],[1627,2],[1630,2],[1674,2],[1696,2],[1735,2],[1752,2],[1793,2],[1986,1],[2026,2],[2029,2],[2070,2],[2089,2],[2131,2],[2151,2],[2199,2],[2236,2],[2306,3],[2310,2],[2313,2],[2316,2],[2319,2],[2322,2],[2325,2],[2328,2],[2331,2],[2334,3],[2497,1],[2537,2],[2540,2],[2580,2],[2586,2],[2624,2],[2627,2],[2668,2]]},"554":{"position":[[279,1],[281,2],[363,2],[405,2],[446,1],[485,2]]},"556":{"position":[[82,1],[88,2],[107,2],[140,2],[151,2],[183,2],[219,2],[260,2],[279,2],[311,2],[347,2],[388,2],[435,1]]},"559":{"position":[[323,1],[418,1],[425,1],[439,1],[488,2],[567,2],[662,1],[685,1],[746,1],[766,1],[798,1],[830,1],[894,1],[896,1],[898,2],[932,2],[1017,1],[1098,1],[1117,2],[1143,2],[1176,2],[1183,1],[1196,2],[1239,1],[1241,2],[1345,1],[1359,2],[1396,1],[1408,2],[1440,1],[1454,2],[1487,1],[1511,1],[1544,1],[1546,1],[1572,1],[1586,1],[1600,2],[1637,1],[1643,2],[1670,2],[1751,1],[1860,2],[1863,2],[1866,2],[1869,2],[1994,1],[1996,2],[2073,2],[2079,2],[2099,2],[2105,2],[2146,1],[2153,2],[2210,1],[2212,2],[2234,2],[2275,1],[2279,2],[2296,1],[2306,2],[2338,2],[2352,1],[2362,1],[2405,1],[2470,2],[2473,1],[2559,1],[2565,3],[2569,1],[2571,1],[2573,2],[2643,2],[2677,1],[2679,3],[2776,2],[2779,1],[2826,1],[2966,1],[3103,1],[3219,3]]},"561":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"564":{"position":[[349,2],[469,1],[489,2],[522,2],[563,2],[603,2],[669,2],[730,2],[733,2],[753,2],[756,2],[759,2],[762,3],[766,2],[779,2],[827,4],[874,1],[920,2],[1005,2],[1063,2],[1066,3],[1077,3],[1118,2],[1121,3],[1125,2],[1191,2],[1234,2],[1275,2],[1350,1],[1394,2],[1447,2],[1498,2],[1506,2],[1509,3],[1513,2]]},"566":{"position":[[141,2],[226,1],[242,2],[265,2],[268,3],[272,2],[275,2],[360,1],[376,2],[401,2],[404,3],[408,2]]},"568":{"position":[[166,1],[199,2]]},"570":{"position":[[262,1],[322,2],[325,2],[395,2],[398,2],[449,2],[452,3],[456,2]]},"572":{"position":[[172,1],[189,2],[192,2],[268,2],[271,2],[327,2],[330,2],[357,2],[360,3],[364,2]]},"574":{"position":[[31,1],[101,2],[181,1],[195,2],[218,2],[221,3],[225,2]]},"576":{"position":[[211,1],[257,2],[260,2],[301,1],[344,2],[378,2]]},"578":{"position":[[76,2],[166,1],[168,2],[227,2],[250,2]]},"580":{"position":[[452,2],[524,1],[624,1],[665,1],[669,2],[691,2],[715,2],[722,1],[735,1],[757,2],[785,2],[792,2],[795,3],[799,2],[802,2],[848,2],[961,2],[1085,2],[1197,2],[1260,2]]},"582":{"position":[[151,1],[153,2],[192,2],[249,2],[343,2],[346,3],[350,2],[718,1],[808,1],[855,2],[858,2],[861,3],[865,2],[912,1],[953,2],[1020,1],[1060,2],[1063,2],[1066,3],[1070,2]]},"584":{"position":[[330,2],[405,1],[411,2],[434,2],[437,3],[441,2]]},"588":{"position":[[77,1],[387,1],[435,1],[437,2],[461,2],[494,1],[516,1],[539,1],[559,1],[572,2],[603,2],[606,3],[610,2]]},"590":{"position":[[243,1],[245,2],[285,2],[321,2],[330,2],[333,3],[337,2]]},"592":{"position":[[398,1],[447,2],[450,2],[540,2],[543,2],[566,2]]},"594":{"position":[[286,1],[288,2],[336,2],[339,2],[356,2],[403,2],[406,2],[430,2],[484,2],[487,2],[506,2],[509,2],[512,2]]},"596":{"position":[[216,1],[218,2],[274,2],[300,2],[392,2]]},"598":{"position":[[214,1],[216,2],[279,2],[282,2],[295,2],[311,2],[314,2],[317,2]]},"602":{"position":[[208,1],[232,2],[270,2],[313,2],[323,2],[326,2],[329,2]]},"606":{"position":[[219,1],[253,2],[327,2],[380,2],[390,2],[393,2],[396,2]]},"610":{"position":[[222,1],[319,1],[420,1],[434,2],[514,2],[517,2]]},"612":{"position":[[106,2],[176,1],[191,2],[207,2],[210,3],[214,2]]},"614":{"position":[[128,1],[137,2],[152,2],[155,3],[159,2],[289,2],[356,2]]},"616":{"position":[[129,2],[213,1],[223,2],[260,2],[263,3],[267,2]]},"618":{"position":[[256,2],[336,1],[351,2],[373,2],[394,2],[403,2],[406,3],[410,2]]},"620":{"position":[[87,1],[135,1],[137,2],[218,2],[221,3],[225,2]]},"622":{"position":[[218,1],[242,1],[286,1],[288,2],[316,2],[355,1],[377,2],[380,2],[414,2],[417,2],[504,2],[507,2],[510,2],[544,2],[547,2],[581,2]]},"624":{"position":[[336,1],[360,1],[400,1],[402,2],[430,2],[469,1],[492,2],[495,2],[572,2],[575,2],[619,2]]},"626":{"position":[[184,1],[289,1],[291,2],[351,2],[404,2],[407,3],[411,2]]},"628":{"position":[[331,1],[375,2],[421,1],[443,2],[454,1],[518,1],[563,2]]},"630":{"position":[[165,1],[234,2]]},"632":{"position":[[261,1],[274,2],[311,2],[318,2],[321,3],[325,2]]},"634":{"position":[[279,1],[281,2],[323,2],[349,2],[356,1],[358,2],[361,2],[389,2],[424,1],[428,1],[430,2],[470,1],[472,2],[517,2],[543,2],[546,2],[573,2],[608,2],[623,1],[695,2],[698,2],[741,2],[775,2],[836,2],[843,1],[856,1],[858,1],[860,1],[873,2]]},"636":{"position":[[279,1],[323,2],[364,1],[408,2],[449,1],[514,2]]},"638":{"position":[[87,2],[170,1],[188,2],[213,2],[216,3],[220,2]]},"640":{"position":[[174,5],[290,2],[375,1],[394,2],[405,2],[408,3],[412,2],[415,2],[500,1],[516,2],[546,2],[561,2],[564,3],[568,2],[599,2],[672,2],[695,2],[743,2],[771,2],[978,1],[994,2],[1046,2]]},"642":{"position":[[343,2],[424,1],[434,2],[455,2],[479,2],[482,3],[486,2]]},"644":{"position":[[302,2],[383,1],[391,2],[450,2],[467,2],[470,3],[474,2]]},"646":{"position":[[247,2],[332,1],[343,2],[380,2],[391,2],[394,3],[398,2]]},"648":{"position":[[120,2],[184,1],[199,2],[209,2],[212,3],[216,2]]},"650":{"position":[[173,2],[269,1],[273,2],[298,2],[324,2],[343,2],[346,2],[349,2],[352,3],[356,2],[367,2],[475,1],[479,2],[506,2],[530,2],[540,2],[551,2],[689,1],[693,2],[720,2],[741,2],[760,2],[771,2],[782,2],[896,1],[900,2],[940,2],[975,2],[989,2],[1000,2],[1208,1],[1212,2],[1237,2],[1279,2],[1331,2],[1359,2],[1409,2],[1419,2]]},"652":{"position":[[334,2],[421,1],[440,2],[467,2],[502,2],[512,2],[515,3],[519,2]]},"654":{"position":[[458,2],[554,1],[582,2],[623,2],[652,2],[687,2],[713,2],[746,2],[754,2],[757,3],[761,2]]},"656":{"position":[[526,2],[618,1],[643,2],[678,2],[711,2],[737,2],[764,2],[769,2],[772,3],[776,2]]},"658":{"position":[[516,2],[608,1],[638,2],[665,2],[690,2],[712,2],[717,2],[720,3],[724,2]]},"660":{"position":[[302,2],[374,1],[467,1],[507,1],[511,2],[533,2],[558,2],[565,1],[578,1],[600,2],[628,2],[659,2],[674,2],[677,3],[681,2],[684,2],[729,2]]},"662":{"position":[[132,2],[203,1],[207,2],[234,2],[245,1],[253,2],[271,1],[288,2],[302,1],[304,1],[306,2]]},"664":{"position":[[313,1],[344,2],[391,1],[454,4],[459,2],[514,1],[661,2]]},"666":{"position":[[449,1],[451,2],[526,2],[529,2],[582,1],[584,2],[796,2],[799,2],[850,1]]},"668":{"position":[[347,1],[382,2],[427,1],[512,2],[557,1],[586,2]]},"672":{"position":[[143,1],[173,2],[176,2],[193,2]]},"674":{"position":[[312,2],[384,1],[489,1],[529,1],[533,2],[555,2],[584,2],[591,1],[604,1],[626,2],[654,2],[685,2],[700,2],[703,3],[707,2],[710,2],[755,2]]},"676":{"position":[[147,1],[206,2],[209,2],[239,2]]},"678":{"position":[[398,1],[433,2],[477,1],[520,2]]},"680":{"position":[[81,2],[161,1],[165,2],[230,2],[265,2],[268,3],[272,2],[434,1],[468,1],[481,2],[499,2],[510,3],[518,2],[540,2],[558,2],[595,1],[597,1]]},"682":{"position":[[176,1],[178,2],[220,2],[246,2],[253,1],[255,2],[258,2],[277,2],[322,2],[348,2],[351,2],[378,2],[413,2],[428,1],[500,2],[503,2],[546,2],[580,2],[641,2],[648,1],[661,1],[663,1],[676,1],[678,2]]},"684":{"position":[[201,2],[256,1],[258,2],[300,2],[326,2],[333,1],[335,2],[338,2],[357,2],[402,2],[428,2],[431,2],[458,2],[493,2],[508,1],[580,2],[583,2],[626,2],[663,2],[742,2],[749,1],[762,1],[764,1],[777,1],[779,2]]},"686":{"position":[[32,1],[116,2],[166,2]]},"688":{"position":[[123,1],[164,2],[167,2],[186,2],[504,1],[543,2],[546,2],[627,2],[630,2],[649,2]]},"690":{"position":[[322,1],[364,2],[436,2],[635,1],[690,2]]},"692":{"position":[[262,1],[289,2],[292,2],[379,2],[382,2],[405,2]]},"694":{"position":[[165,1],[203,2],[206,2],[236,2],[239,3],[243,2]]},"696":{"position":[[314,2],[353,2],[390,2],[467,1],[471,2],[507,1],[509,2],[594,1],[629,1],[677,2],[717,2],[724,1],[752,1],[777,1],[790,2],[863,1],[865,2],[1024,2],[1027,2],[1118,1],[1244,1],[1289,1],[1375,2],[1421,1],[1508,2],[1511,2],[1601,2]]},"698":{"position":[[168,1],[174,2],[220,2],[268,2],[271,3],[275,2]]},"702":{"position":[[166,1],[204,1],[249,1],[317,1],[362,1],[434,2]]},"704":{"position":[[268,2],[342,1],[359,2],[398,2],[410,2],[413,3],[417,2]]},"706":{"position":[[207,1],[225,2],[228,2],[258,2],[261,2],[290,2],[293,2],[332,2],[335,2],[372,2],[375,3],[379,2]]},"708":{"position":[[238,1],[244,2],[263,2],[308,2],[311,3],[315,2]]},"710":{"position":[[288,1],[307,2],[310,2],[347,2],[350,2],[378,2],[412,2],[415,2],[479,2],[482,2],[535,2],[538,3],[542,2]]},"712":{"position":[[139,1],[174,2],[177,2],[236,2],[268,2]]},"714":{"position":[[164,1],[172,2],[213,2],[216,2],[275,2],[307,2]]},"716":{"position":[[141,1],[174,2],[177,2],[236,2],[268,2]]},"718":{"position":[[220,2],[294,1],[304,2],[312,2],[315,3],[319,2]]},"720":{"position":[[222,1],[302,1],[342,1],[344,2],[372,2],[411,1],[432,2],[443,2],[465,2],[482,2],[494,2]]}}}],["0",{"_index":276,"t":{"17":{"position":[[2316,2]]},"90":{"position":[[238,2],[345,2]]},"188":{"position":[[1411,1],[1443,1]]},"190":{"position":[[271,2]]},"198":{"position":[[316,1]]},"202":{"position":[[64,1]]},"210":{"position":[[1686,2]]},"212":{"position":[[306,2]]},"228":{"position":[[74,3],[296,1]]},"278":{"position":[[674,2]]},"312":{"position":[[889,2]]},"314":{"position":[[111,2]]},"336":{"position":[[210,4],[501,2]]},"338":{"position":[[43,4]]},"479":{"position":[[176,1]]},"559":{"position":[[2277,1],[2324,2],[2822,3],[3099,3]]},"564":{"position":[[1098,1]]},"634":{"position":[[426,1]]},"642":{"position":[[243,4]]},"656":{"position":[[405,4],[740,1]]},"658":{"position":[[405,4],[715,1]]}}}],["0.1.7",{"_index":2940,"t":{"550":{"position":[[3499,5]]}}}],["0.4",{"_index":2577,"t":{"477":{"position":[[72,3]]}}}],["0.7",{"_index":2574,"t":{"475":{"position":[[70,3]]}}}],["01",{"_index":2989,"t":{"552":{"position":[[1108,4],[1126,2]]},"696":{"position":[[570,2],[697,2]]}}}],["02",{"_index":2052,"t":{"316":{"position":[[324,2]]},"382":{"position":[[967,3]]},"552":{"position":[[1113,4]]},"696":{"position":[[573,2],[700,4]]}}}],["0666",{"_index":1602,"t":{"153":{"position":[[377,5],[578,5]]},"382":{"position":[[1111,5]]}}}],["08",{"_index":2996,"t":{"552":{"position":[[1185,2],[2193,2],[2207,2]]}}}],["0rtt",{"_index":1861,"t":{"228":{"position":[[835,5]]}}}],["1",{"_index":387,"t":{"29":{"position":[[169,1]]},"59":{"position":[[222,1]]},"90":{"position":[[734,2]]},"188":{"position":[[280,1]]},"190":{"position":[[51,1]]},"196":{"position":[[406,1],[595,1]]},"198":{"position":[[297,1],[337,1]]},"202":{"position":[[47,1],[83,1]]},"218":{"position":[[445,1]]},"220":{"position":[[1356,1]]},"222":{"position":[[119,1]]},"228":{"position":[[277,1]]},"234":{"position":[[355,4]]},"238":{"position":[[66,3]]},"278":{"position":[[559,1],[623,2],[763,1]]},"336":{"position":[[1371,5]]},"338":{"position":[[284,5]]},"344":{"position":[[395,1]]},"346":{"position":[[661,1]]},"348":{"position":[[463,1]]},"362":{"position":[[583,1]]},"364":{"position":[[48,1]]},"406":{"position":[[696,1]]},"416":{"position":[[279,3],[351,6]]},"550":{"position":[[3116,4],[3228,4]]},"552":{"position":[[1481,2],[1749,2]]},"559":{"position":[[2690,3]]},"564":{"position":[[1390,3],[1407,2]]},"566":{"position":[[379,7]]},"574":{"position":[[141,1]]},"610":{"position":[[480,3]]},"656":{"position":[[368,2],[708,2],[714,1]]},"658":{"position":[[368,2],[635,2],[662,2],[668,1],[687,2],[693,1]]}}}],["1,001.01e8",{"_index":2959,"t":{"552":{"position":[[510,10]]}}}],["1,146,667",{"_index":2576,"t":{"477":{"position":[[14,9]]}}}],["1,2,3",{"_index":3377,"t":{"650":{"position":[[763,7]]}}}],["1.1",{"_index":2579,"t":{"477":{"position":[[152,3]]}}}],["1.16",{"_index":1990,"t":{"298":{"position":[[557,6]]},"300":{"position":[[84,5]]},"312":{"position":[[471,4]]}}}],["1.17",{"_index":41,"t":{"4":{"position":[[39,4]]}}}],["1.234",{"_index":2958,"t":{"552":{"position":[[502,6]]}}}],["1.3",{"_index":1845,"t":{"228":{"position":[[152,3]]}}}],["1.3'",{"_index":1840,"t":{"228":{"position":[[57,5]]}}}],["10",{"_index":269,"t":{"17":{"position":[[2102,2],[2749,2]]},"467":{"position":[[565,2]]},"479":{"position":[[182,2]]},"666":{"position":[[774,5]]},"696":{"position":[[1568,2],[1677,2]]}}}],["10*time.second",{"_index":2644,"t":{"485":{"position":[[2117,16]]}}}],["10.1",{"_index":841,"t":{"130":{"position":[[1380,4]]}}}],["10.4.1",{"_index":877,"t":{"130":{"position":[[1840,6]]}}}],["100",{"_index":833,"t":{"130":{"position":[[1271,3]]},"479":{"position":[[189,3],[580,4]]}}}],["1000",{"_index":2595,"t":{"479":{"position":[[585,5]]},"492":{"position":[[652,4]]}}}],["101",{"_index":836,"t":{"130":{"position":[[1321,3]]}}}],["102",{"_index":839,"t":{"130":{"position":[[1363,3]]}}}],["1024",{"_index":1329,"t":{"135":{"position":[[510,4],[517,4],[1002,4]]}}}],["103",{"_index":843,"t":{"130":{"position":[[1404,3]]}}}],["11",{"_index":2991,"t":{"552":{"position":[[1123,2]]}}}],["11,846",{"_index":2565,"t":{"471":{"position":[[14,6]]}}}],["11.1",{"_index":869,"t":{"130":{"position":[[1758,4]]}}}],["11.2",{"_index":968,"t":{"130":{"position":[[3161,4],[5562,4]]}}}],["11.3",{"_index":971,"t":{"130":{"position":[[3198,4],[5615,4]]}}}],["11.4",{"_index":974,"t":{"130":{"position":[[3245,4],[5688,4]]}}}],["11.5",{"_index":1017,"t":{"130":{"position":[[3923,4],[6755,4]]}}}],["111",{"_index":3355,"t":{"644":{"position":[[461,5]]}}}],["117.2",{"_index":2572,"t":{"473":{"position":[[148,5]]}}}],["12",{"_index":2968,"t":{"552":{"position":[[723,2],[1425,2]]},"559":{"position":[[2032,2],[2076,2]]}}}],["120",{"_index":2977,"t":{"552":{"position":[[867,4],[962,4]]}}}],["120000",{"_index":3005,"t":{"552":{"position":[[1688,7]]}}}],["123",{"_index":3346,"t":{"642":{"position":[[462,3]]}}}],["12345.pdf",{"_index":3220,"t":{"592":{"position":[[434,12],[469,9],[513,11]]}}}],["123456",{"_index":1672,"t":{"176":{"position":[[356,9],[506,9],[663,8]]}}}],["123456789",{"_index":2948,"t":{"552":{"position":[[377,10],[389,9]]}}}],["125",{"_index":3014,"t":{"552":{"position":[[2084,4]]}}}],["127.0.0.1",{"_index":2179,"t":{"358":{"position":[[416,11]]},"614":{"position":[[140,11]]},"616":{"position":[[157,10],[237,12]]}}}],["127.0.0.1:3000",{"_index":1958,"t":{"278":{"position":[[525,14]]}}}],["127.0.0.1:3000/debug/var",{"_index":1959,"t":{"278":{"position":[[566,25]]}}}],["127.0.0.1:3000/debug/vars?r=c",{"_index":1966,"t":{"278":{"position":[[702,29]]}}}],["13",{"_index":1927,"t":{"268":{"position":[[306,3]]}}}],["15:04:05",{"_index":2267,"t":{"384":{"position":[[759,8]]},"386":{"position":[[126,11]]}}}],["15th",{"_index":36,"t":{"2":{"position":[[363,5]]}}}],["16",{"_index":3115,"t":{"564":{"position":[[1375,4]]}}}],["1638",{"_index":2953,"t":{"552":{"position":[[453,4],[463,4]]}}}],["18",{"_index":2973,"t":{"552":{"position":[[798,3],[942,2]]},"559":{"position":[[2035,2],[2102,2]]}}}],["18.04.3",{"_index":2540,"t":{"467":{"position":[[523,7]]}}}],["1831710635",{"_index":1928,"t":{"268":{"position":[[310,11],[541,11]]}}}],["185",{"_index":121,"t":{"6":{"position":[[1552,5]]},"135":{"position":[[4104,5]]}}}],["19",{"_index":2971,"t":{"552":{"position":[[763,2]]}}}],["19,664",{"_index":2569,"t":{"473":{"position":[[14,6]]}}}],["1;q=0.2",{"_index":3109,"t":{"564":{"position":[[1226,7]]}}}],["1s",{"_index":526,"t":{"59":{"position":[[168,2]]}}}],["2",{"_index":1756,"t":{"198":{"position":[[364,1]]},"202":{"position":[[108,1]]},"244":{"position":[[677,1]]},"250":{"position":[[258,1]]},"346":{"position":[[1356,4],[1807,2]]},"416":{"position":[[283,2]]},"446":{"position":[[750,2]]},"550":{"position":[[3137,4],[3247,4]]},"559":{"position":[[2860,3]]},"564":{"position":[[777,1]]},"582":{"position":[[1022,4]]},"658":{"position":[[641,1]]},"704":{"position":[[133,2]]}}}],["2*time.second",{"_index":2617,"t":{"485":{"position":[[538,15],[1391,14]]}}}],["2,066",{"_index":2567,"t":{"471":{"position":[[94,5]]}}}],["2.0",{"_index":2561,"t":{"469":{"position":[[444,3]]}}}],["2.20ghz",{"_index":2536,"t":{"467":{"position":[[499,7]]}}}],["2.3.3",{"_index":961,"t":{"130":{"position":[[3060,5],[5404,5]]}}}],["2.30ghz",{"_index":2583,"t":{"479":{"position":[[96,7]]}}}],["20",{"_index":2180,"t":{"358":{"position":[[436,3]]},"360":{"position":[[176,3]]},"559":{"position":[[527,2]]},"622":{"position":[[351,3],[446,4],[500,3],[576,4]]},"624":{"position":[[465,3],[532,4],[614,4]]},"696":{"position":[[1571,2],[1680,3]]},"720":{"position":[[407,3]]}}}],["200",{"_index":327,"t":{"21":{"position":[[221,3]]},"130":{"position":[[1431,3]]},"485":{"position":[[813,3]]}}}],["2005",{"_index":2990,"t":{"552":{"position":[[1118,4]]}}}],["2006",{"_index":2239,"t":{"382":{"position":[[975,6]]},"696":{"position":[[565,4]]}}}],["201",{"_index":848,"t":{"130":{"position":[[1470,3]]}}}],["202",{"_index":851,"t":{"130":{"position":[[1510,3]]}}}],["2020",{"_index":37,"t":{"2":{"position":[[369,5]]}}}],["2022",{"_index":2995,"t":{"552":{"position":[[1180,4],[2202,4]]}}}],["203",{"_index":854,"t":{"130":{"position":[[1569,3]]}}}],["204",{"_index":857,"t":{"130":{"position":[[1610,3]]}}}],["205",{"_index":860,"t":{"130":{"position":[[1654,3]]}}}],["206",{"_index":863,"t":{"130":{"position":[[1700,3]]}}}],["207",{"_index":867,"t":{"130":{"position":[[1741,3]]}}}],["208",{"_index":871,"t":{"130":{"position":[[1787,3]]}}}],["226",{"_index":875,"t":{"130":{"position":[[1823,3]]}}}],["2295",{"_index":1013,"t":{"130":{"position":[[3868,5],[6671,5]]}}}],["233",{"_index":1556,"t":{"147":{"position":[[673,4],[988,4]]}}}],["24",{"_index":2467,"t":{"448":{"position":[[121,2]]},"450":{"position":[[40,2]]}}}],["244,847",{"_index":2578,"t":{"477":{"position":[[96,7]]}}}],["25.7",{"_index":2570,"t":{"473":{"position":[[69,4]]}}}],["250",{"_index":3007,"t":{"552":{"position":[[1796,3]]}}}],["2518",{"_index":840,"t":{"130":{"position":[[1374,5]]}}}],["256",{"_index":1345,"t":{"135":{"position":[[996,3]]}}}],["27",{"_index":2997,"t":{"552":{"position":[[1188,2],[2196,2],[2210,2]]}}}],["2774",{"_index":1023,"t":{"130":{"position":[[4001,5],[6876,5]]}}}],["28",{"_index":2530,"t":{"467":{"position":[[454,2]]}}}],["2beb887efd54",{"_index":3246,"t":{"606":{"position":[[281,13]]}}}],["3",{"_index":902,"t":{"130":{"position":[[2192,1],[3383,1],[3535,1],[5899,1],[6149,1]]},"404":{"position":[[1460,3]]},"462":{"position":[[185,1]]},"559":{"position":[[2998,3]]},"650":{"position":[[723,3],[744,3]]},"656":{"position":[[675,2],[761,2],[767,1]]}}}],["3.1",{"_index":909,"t":{"130":{"position":[[2274,3],[4203,3]]}}}],["3.2",{"_index":927,"t":{"130":{"position":[[2542,3],[4609,3]]}}}],["30",{"_index":1707,"t":{"186":{"position":[[442,2]]},"326":{"position":[[342,2]]},"328":{"position":[[179,2]]},"358":{"position":[[452,2]]},"360":{"position":[[192,2]]},"479":{"position":[[537,2]]}}}],["300",{"_index":879,"t":{"130":{"position":[[1871,3]]}}}],["3000",{"_index":515,"t":{"57":{"position":[[226,8]]},"162":{"position":[[357,4]]},"164":{"position":[[271,4]]},"166":{"position":[[320,4]]},"168":{"position":[[190,4]]},"170":{"position":[[201,4]]}}}],["301",{"_index":882,"t":{"130":{"position":[[1919,3]]},"414":{"position":[[253,4]]},"664":{"position":[[656,4]]}}}],["302",{"_index":885,"t":{"130":{"position":[[1956,3]]},"416":{"position":[[566,3]]},"664":{"position":[[179,3]]},"666":{"position":[[187,3]]},"668":{"position":[[215,3]]}}}],["303",{"_index":888,"t":{"130":{"position":[[1996,3]]}}}],["304",{"_index":891,"t":{"130":{"position":[[2039,3]]}}}],["305",{"_index":894,"t":{"130":{"position":[[2077,3]]}}}],["307",{"_index":897,"t":{"130":{"position":[[2126,3]]}}}],["308",{"_index":900,"t":{"130":{"position":[[2175,3]]}}}],["32",{"_index":1368,"t":{"135":{"position":[[1953,4]]},"242":{"position":[[92,2]]},"244":{"position":[[289,2],[426,3]]},"246":{"position":[[391,2],[476,3]]}}}],["32.23",{"_index":3405,"t":{"656":{"position":[[646,5],[681,5]]}}}],["3229",{"_index":876,"t":{"130":{"position":[[1834,5]]}}}],["32gb",{"_index":2537,"t":{"467":{"position":[[507,4]]}}}],["33",{"_index":1963,"t":{"278":{"position":[[648,3]]}}}],["354.1",{"_index":2564,"t":{"469":{"position":[[518,5]]}}}],["36",{"_index":2063,"t":{"326":{"position":[[670,2]]},"328":{"position":[[291,3],[323,2]]}}}],["3600",{"_index":286,"t":{"17":{"position":[[2775,5]]},"298":{"position":[[523,5]]}}}],["360641",{"_index":3327,"t":{"634":{"position":[[716,6]]},"682":{"position":[[521,6]]},"684":{"position":[[601,6]]}}}],["367,069",{"_index":2563,"t":{"469":{"position":[[462,7]]}}}],["368,647",{"_index":2573,"t":{"475":{"position":[[14,7]]}}}],["390.44",{"_index":2568,"t":{"471":{"position":[[148,6]]}}}],["3rd",{"_index":2769,"t":{"510":{"position":[[158,3]]}}}],["4",{"_index":986,"t":{"130":{"position":[[3426,1],[5967,1]]},"135":{"position":[[506,1]]},"153":{"position":[[232,2]]},"550":{"position":[[3514,2]]},"552":{"position":[[579,1]]},"559":{"position":[[3137,3]]}}}],["4,302",{"_index":2571,"t":{"473":{"position":[[94,5]]}}}],["4.1",{"_index":865,"t":{"130":{"position":[[1717,3],[2056,3]]}}}],["4.15.0",{"_index":2541,"t":{"467":{"position":[[531,6]]}}}],["4.2",{"_index":942,"t":{"130":{"position":[[2759,3],[4934,3]]}}}],["4.3.1",{"_index":789,"t":{"130":{"position":[[79,5]]}}}],["4.3.2",{"_index":791,"t":{"130":{"position":[[118,5]]}}}],["4.3.3",{"_index":793,"t":{"130":{"position":[[157,5]]}}}],["4.3.4",{"_index":795,"t":{"130":{"position":[[194,5]]}}}],["4.3.5",{"_index":800,"t":{"130":{"position":[[271,5]]}}}],["4.3.6",{"_index":802,"t":{"130":{"position":[[316,5]]}}}],["4.3.7",{"_index":804,"t":{"130":{"position":[[361,5]]}}}],["4.3.8",{"_index":806,"t":{"130":{"position":[[402,5]]}}}],["4.4",{"_index":954,"t":{"130":{"position":[[2974,3],[5275,3]]},"475":{"position":[[149,3]]}}}],["400",{"_index":904,"t":{"130":{"position":[[2213,3]]},"344":{"position":[[839,3]]},"362":{"position":[[855,3],[970,3]]}}}],["401",{"_index":907,"t":{"130":{"position":[[2257,3]]},"172":{"position":[[138,3]]},"178":{"position":[[943,3]]},"350":{"position":[[432,3]]}}}],["402",{"_index":911,"t":{"130":{"position":[[2302,3]]}}}],["403",{"_index":914,"t":{"130":{"position":[[2343,3]]}}}],["404",{"_index":917,"t":{"130":{"position":[[2383,3]]},"490":{"position":[[229,3],[360,3]]},"503":{"position":[[951,4]]},"516":{"position":[[860,3]]},"552":{"position":[[316,3]]}}}],["404.html",{"_index":1989,"t":{"298":{"position":[[503,11]]}}}],["405",{"_index":920,"t":{"130":{"position":[[2431,3]]}}}],["406",{"_index":923,"t":{"130":{"position":[[2476,3]]}}}],["407",{"_index":926,"t":{"130":{"position":[[2525,3]]}}}],["408",{"_index":929,"t":{"130":{"position":[[2569,3]]},"485":{"position":[[904,3]]}}}],["409",{"_index":932,"t":{"130":{"position":[[2609,3]]}}}],["4096",{"_index":1452,"t":{"135":{"position":[[5565,4],[6975,4]]}}}],["410",{"_index":935,"t":{"130":{"position":[[2645,3]]}}}],["411",{"_index":938,"t":{"130":{"position":[[2691,3]]}}}],["412",{"_index":941,"t":{"130":{"position":[[2742,3]]}}}],["413",{"_index":944,"t":{"130":{"position":[[2793,3]]},"135":{"position":[[465,3]]}}}],["414",{"_index":947,"t":{"130":{"position":[[2843,3]]}}}],["415",{"_index":950,"t":{"130":{"position":[[2896,3]]},"692":{"position":[[295,3],[385,3]]}}}],["416",{"_index":953,"t":{"130":{"position":[[2957,3]]}}}],["417",{"_index":956,"t":{"130":{"position":[[3004,3]]}}}],["418",{"_index":959,"t":{"130":{"position":[[3043,3]]}}}],["42",{"_index":2058,"t":{"324":{"position":[[54,2]]},"552":{"position":[[2583,2]]}}}],["42.8",{"_index":2566,"t":{"471":{"position":[[69,4]]}}}],["421",{"_index":963,"t":{"130":{"position":[[3093,3]]}}}],["422",{"_index":967,"t":{"130":{"position":[[3144,3]]}}}],["423",{"_index":970,"t":{"130":{"position":[[3181,3]]}}}],["424",{"_index":973,"t":{"130":{"position":[[3228,3]]}}}],["425",{"_index":976,"t":{"130":{"position":[[3267,3]]}}}],["426",{"_index":120,"t":{"6":{"position":[[1543,4]]},"130":{"position":[[3313,3]]}}}],["428",{"_index":982,"t":{"130":{"position":[[3366,3]]}}}],["429",{"_index":985,"t":{"130":{"position":[[3409,3]]},"362":{"position":[[274,3]]}}}],["431",{"_index":988,"t":{"130":{"position":[[3464,3]]}}}],["450b",{"_index":3244,"t":{"606":{"position":[[271,4]]}}}],["451",{"_index":991,"t":{"130":{"position":[[3518,3]]}}}],["4918",{"_index":868,"t":{"130":{"position":[[1752,5],[3155,5],[3192,5],[3239,5],[3917,5],[5556,5],[5609,5],[5682,5],[6749,5]]}}}],["4gb",{"_index":2585,"t":{"479":{"position":[[108,3]]}}}],["5",{"_index":989,"t":{"130":{"position":[[3481,1],[6059,1]]},"362":{"position":[[302,1]]},"364":{"position":[[33,2]]},"404":{"position":[[1624,1],[1765,3]]},"559":{"position":[[511,1]]}}}],["5.2",{"_index":978,"t":{"130":{"position":[[3284,4],[5745,4]]}}}],["500",{"_index":994,"t":{"130":{"position":[[3565,3]]},"384":{"position":[[1014,3]]},"386":{"position":[[171,3]]},"479":{"position":[[197,3]]},"505":{"position":[[90,3],[342,3]]},"507":{"position":[[735,3]]},"662":{"position":[[291,5]]}}}],["5000",{"_index":2590,"t":{"479":{"position":[[261,5],[591,4]]}}}],["501",{"_index":997,"t":{"130":{"position":[[3611,3]]}}}],["502",{"_index":1000,"t":{"130":{"position":[[3653,3]]}}}],["503",{"_index":1003,"t":{"130":{"position":[[3703,3]]},"503":{"position":[[1026,3],[1088,3]]}}}],["504",{"_index":1006,"t":{"130":{"position":[[3749,3]]}}}],["505",{"_index":1009,"t":{"130":{"position":[[3804,3]]}}}],["506",{"_index":1012,"t":{"130":{"position":[[3857,3]]}}}],["507",{"_index":1016,"t":{"130":{"position":[[3906,3]]}}}],["508",{"_index":1019,"t":{"130":{"position":[[3949,3]]}}}],["510",{"_index":1022,"t":{"130":{"position":[[3990,3]]}}}],["511",{"_index":1026,"t":{"130":{"position":[[4047,3]]}}}],["5120",{"_index":2535,"t":{"467":{"position":[[488,4]]}}}],["57,880",{"_index":2575,"t":{"475":{"position":[[94,6]]}}}],["5789",{"_index":798,"t":{"130":{"position":[[229,4]]}}}],["5842",{"_index":872,"t":{"130":{"position":[[1798,5],[3960,5],[6814,5]]}}}],["6",{"_index":1027,"t":{"130":{"position":[[4064,1],[6978,1]]}}}],["6,162,556",{"_index":2559,"t":{"469":{"position":[[386,9]]}}}],["6.2.1",{"_index":834,"t":{"130":{"position":[[1288,5]]}}}],["6.2.2",{"_index":837,"t":{"130":{"position":[[1338,5]]}}}],["6.3.1",{"_index":846,"t":{"130":{"position":[[1448,5]]}}}],["6.3.2",{"_index":849,"t":{"130":{"position":[[1487,5]]}}}],["6.3.3",{"_index":852,"t":{"130":{"position":[[1527,5]]}}}],["6.3.4",{"_index":855,"t":{"130":{"position":[[1586,5]]}}}],["6.3.5",{"_index":858,"t":{"130":{"position":[[1627,5]]}}}],["6.3.6",{"_index":861,"t":{"130":{"position":[[1671,5]]}}}],["6.4.1",{"_index":880,"t":{"130":{"position":[[1888,5]]}}}],["6.4.2",{"_index":883,"t":{"130":{"position":[[1936,5]]}}}],["6.4.3",{"_index":886,"t":{"130":{"position":[[1973,5]]}}}],["6.4.4",{"_index":889,"t":{"130":{"position":[[2013,5]]}}}],["6.4.5",{"_index":895,"t":{"130":{"position":[[2094,5]]}}}],["6.4.7",{"_index":898,"t":{"130":{"position":[[2143,5]]}}}],["6.5.1",{"_index":905,"t":{"130":{"position":[[2230,5],[4137,5]]}}}],["6.5.10",{"_index":939,"t":{"130":{"position":[[2708,6],[4855,6]]}}}],["6.5.11",{"_index":945,"t":{"130":{"position":[[2810,6],[5016,6]]}}}],["6.5.12",{"_index":948,"t":{"130":{"position":[[2860,6],[5093,6]]}}}],["6.5.13",{"_index":951,"t":{"130":{"position":[[2913,6],[5176,6]]}}}],["6.5.14",{"_index":957,"t":{"130":{"position":[[3021,6],[5349,6]]}}}],["6.5.15",{"_index":980,"t":{"130":{"position":[[3330,6],[5816,6]]}}}],["6.5.2",{"_index":912,"t":{"130":{"position":[[2319,5],[4273,5]]}}}],["6.5.3",{"_index":915,"t":{"130":{"position":[[2360,5],[4333,5]]}}}],["6.5.4",{"_index":918,"t":{"130":{"position":[[2400,5],[4391,5]]}}}],["6.5.5",{"_index":921,"t":{"130":{"position":[[2448,5],[4465,5]]}}}],["6.5.6",{"_index":924,"t":{"130":{"position":[[2493,5],[4533,5]]}}}],["6.5.7",{"_index":930,"t":{"130":{"position":[[2586,5],[4677,5]]}}}],["6.5.8",{"_index":933,"t":{"130":{"position":[[2626,5],[4735,5]]}}}],["6.5.9",{"_index":936,"t":{"130":{"position":[[2662,5],[4785,5]]}}}],["6.6.1",{"_index":995,"t":{"130":{"position":[[3582,5],[6225,5]]}}}],["6.6.2",{"_index":998,"t":{"130":{"position":[[3628,5],[6295,5]]}}}],["6.6.3",{"_index":1001,"t":{"130":{"position":[[3670,5],[6357,5]]}}}],["6.6.4",{"_index":1004,"t":{"130":{"position":[[3720,5],[6435,5]]}}}],["6.6.5",{"_index":1007,"t":{"130":{"position":[[3766,5],[6505,5]]}}}],["6.6.6",{"_index":1010,"t":{"130":{"position":[[3821,5],[6593,5]]}}}],["600",{"_index":1715,"t":{"186":{"position":[[702,7]]}}}],["6000",{"_index":1720,"t":{"186":{"position":[[923,7]]}}}],["6140",{"_index":2582,"t":{"479":{"position":[[85,4]]}}}],["6585",{"_index":983,"t":{"130":{"position":[[3377,5],[3420,5],[3475,5],[4058,5],[5893,5],[5961,5],[6053,5],[6972,5]]}}}],["7",{"_index":1024,"t":{"130":{"position":[[4007,1],[6882,1]]}}}],["7.0",{"_index":3021,"t":{"552":{"position":[[2682,4]]}}}],["7.1",{"_index":873,"t":{"130":{"position":[[1804,3]]}}}],["7.2",{"_index":1020,"t":{"130":{"position":[[3966,3],[6820,3]]}}}],["700",{"_index":3424,"t":{"662":{"position":[[152,4],[157,3],[297,4]]}}}],["7168",{"_index":960,"t":{"130":{"position":[[3054,5],[5398,5]]}}}],["7231",{"_index":788,"t":{"130":{"position":[[73,5],[112,5],[151,5],[188,5],[265,5],[310,5],[355,5],[396,5],[1282,5],[1332,5],[1442,5],[1481,5],[1521,5],[1580,5],[1621,5],[1665,5],[1882,5],[1930,5],[1967,5],[2007,5],[2088,5],[2137,5],[2224,5],[2313,5],[2354,5],[2394,5],[2442,5],[2487,5],[2580,5],[2620,5],[2656,5],[2702,5],[2804,5],[2854,5],[2907,5],[3015,5],[3324,5],[3576,5],[3622,5],[3664,5],[3714,5],[3760,5],[3815,5],[4131,5],[4267,5],[4327,5],[4385,5],[4459,5],[4527,5],[4671,5],[4729,5],[4779,5],[4849,5],[5010,5],[5087,5],[5170,5],[5343,5],[5810,5],[6219,5],[6289,5],[6351,5],[6429,5],[6499,5],[6587,5]]}}}],["7232",{"_index":892,"t":{"130":{"position":[[2050,5],[2753,5],[4928,5]]}}}],["7233",{"_index":864,"t":{"130":{"position":[[1711,5],[2968,5],[5269,5]]}}}],["7235",{"_index":908,"t":{"130":{"position":[[2268,5],[2536,5],[4197,5],[4603,5]]}}}],["72d5",{"_index":2954,"t":{"552":{"position":[[458,4]]}}}],["750",{"_index":2736,"t":{"500":{"position":[[1330,4]]}}}],["7538",{"_index":901,"t":{"130":{"position":[[2186,5]]}}}],["7540",{"_index":964,"t":{"130":{"position":[[3104,5],[5476,5]]}}}],["7725",{"_index":992,"t":{"130":{"position":[[3529,5],[6143,5]]}}}],["8",{"_index":826,"t":{"130":{"position":[[877,2],[930,2],[985,2],[1050,2],[1117,2],[1196,2]]},"228":{"position":[[731,1]]},"505":{"position":[[548,1]]},"552":{"position":[[657,1]]},"564":{"position":[[428,2],[1214,2]]},"618":{"position":[[296,1]]},"706":{"position":[[328,3],[369,2]]}}}],["8.1",{"_index":1014,"t":{"130":{"position":[[3874,3],[6677,3]]}}}],["8080",{"_index":473,"t":{"47":{"position":[[131,5]]}}}],["8297",{"_index":844,"t":{"130":{"position":[[1415,4]]}}}],["8446",{"_index":1843,"t":{"228":{"position":[[104,5]]}}}],["8470",{"_index":977,"t":{"130":{"position":[[3278,5],[5739,5]]}}}],["88",{"_index":2542,"t":{"467":{"position":[[538,2]]}}}],["8859",{"_index":3108,"t":{"564":{"position":[[1221,4],[1385,4],[1402,4]]}}}],["8d7ad5e3",{"_index":3242,"t":{"606":{"position":[[256,9]]}}}],["9",{"_index":2697,"t":{"496":{"position":[[25,1]]},"559":{"position":[[2962,3]]}}}],["9.1.2",{"_index":965,"t":{"130":{"position":[[3110,5],[5482,5]]}}}],["900",{"_index":3425,"t":{"662":{"position":[[161,3]]}}}],["91",{"_index":2976,"t":{"552":{"position":[[828,2],[907,2]]}}}],["_",{"_index":424,"t":{"35":{"position":[[255,1]]},"37":{"position":[[449,1]]},"39":{"position":[[228,1]]},"41":{"position":[[334,1]]},"57":{"position":[[203,1],[240,3]]},"59":{"position":[[704,1],[798,1]]},"108":{"position":[[129,1]]},"149":{"position":[[498,1]]},"153":{"position":[[512,1]]},"186":{"position":[[654,1]]},"310":{"position":[[202,1]]},"346":{"position":[[825,2]]},"485":{"position":[[312,1],[1139,1],[1741,1]]},"559":{"position":[[1189,2],[2331,2]]},"610":{"position":[[432,1]]},"634":{"position":[[600,2]]},"682":{"position":[[405,2]]},"684":{"position":[[485,2]]}}}],["_pass",{"_index":1681,"t":{"176":{"position":[[832,8]]}}}],["_test.go",{"_index":523,"t":{"59":{"position":[[84,8]]}}}],["_test\\\\.go",{"_index":2689,"t":{"492":{"position":[[764,14]]}}}],["_user",{"_index":1679,"t":{"176":{"position":[[806,8]]}}}],["a.byt",{"_index":572,"t":{"68":{"position":[[216,9]]}}}],["a.get(\"/test",{"_index":444,"t":{"37":{"position":[[406,14]]}}}],["a.name(\"fd",{"_index":443,"t":{"37":{"position":[[392,13]]}}}],["a.pars",{"_index":570,"t":{"68":{"position":[[159,10]]}}}],["a.request",{"_index":566,"t":{"68":{"position":[[65,11]]}}}],["a/test",{"_index":449,"t":{"37":{"position":[[734,10],[936,10]]}}}],["a241",{"_index":3245,"t":{"606":{"position":[[276,4]]}}}],["aaf3",{"_index":3243,"t":{"606":{"position":[[266,4]]}}}],["abort",{"_index":1862,"t":{"228":{"position":[[970,6]]}}}],["abov",{"_index":100,"t":{"6":{"position":[[1081,5]]},"149":{"position":[[218,5]]},"440":{"position":[[668,6]]}}}],["ac",{"_index":2699,"t":{"496":{"position":[[80,3]]},"543":{"position":[[93,3]]}}}],["accept",{"_index":1126,"t":{"130":{"position":[[7395,7],[7432,7],[7935,8],[7966,7],[8006,7],[8047,7],[9664,7],[10736,7],[10972,7],[11012,7],[11057,7]]},"135":{"position":[[3677,9]]},"192":{"position":[[125,6]]},"208":{"position":[[449,8],[641,8]]},"460":{"position":[[607,8]]},"541":{"position":[[572,7]]},"564":{"position":[[57,11],[97,6],[352,7],[782,7],[1107,10],[1175,6],[1194,6],[1237,6],[1278,6]]},"594":{"position":[[36,6],[64,7],[291,7],[359,7],[433,7]]},"710":{"position":[[469,9],[511,6],[528,6]]}}}],["accepts(off",{"_index":3086,"t":{"564":{"position":[[141,14]]}}}],["acceptscharsets(off",{"_index":3087,"t":{"564":{"position":[[188,22]]}}}],["acceptsencodings(off",{"_index":3088,"t":{"564":{"position":[[243,23]]}}}],["acceptslanguages(off",{"_index":3089,"t":{"564":{"position":[[299,23]]}}}],["access",{"_index":1170,"t":{"130":{"position":[[8217,7],[8286,7],[8351,7],[8415,7],[8480,7],[8540,7],[8601,7],[8669,7]]},"208":{"position":[[658,6]]},"210":{"position":[[252,7],[609,6],[736,9],[1498,7]]},"284":{"position":[[135,7]]},"300":{"position":[[463,6],[595,6]]},"312":{"position":[[233,6]]},"460":{"position":[[563,6]]},"467":{"position":[[146,7]]},"568":{"position":[[47,6]]},"634":{"position":[[3,6]]},"640":{"position":[[891,8]]}}}],["access_token=clearli",{"_index":2129,"t":{"344":{"position":[[1035,21]]}}}],["access_token=correct",{"_index":2127,"t":{"344":{"position":[[924,21]]},"346":{"position":[[1541,21],[1705,21]]}}}],["accordingli",{"_index":2757,"t":{"507":{"position":[[263,11]]}}}],["account",{"_index":2191,"t":{"360":{"position":[[302,7]]}}}],["acquireag",{"_index":565,"t":{"68":{"position":[[43,14]]}}}],["acquirearg",{"_index":674,"t":{"96":{"position":[[209,11],[334,13]]},"98":{"position":[[271,11],[405,13]]}}}],["acquireformfil",{"_index":707,"t":{"98":{"position":[[1549,15]]}}}],["acquirerespons",{"_index":757,"t":{"118":{"position":[[105,15],[258,17]]}}}],["action",{"_index":2048,"t":{"316":{"position":[[183,6]]},"384":{"position":[[440,6]]},"507":{"position":[[256,6]]}}}],["activ",{"_index":394,"t":{"31":{"position":[[67,6],[272,6]]}}}],["active20{{.title}}back/static/image.png",{"_index":2006,"t":{"300":{"position":[[522,35]]}}}],["http:///static/static/image.png",{"_index":2008,"t":{"300":{"position":[[617,42]]}}}],["http://api.example.com/users?page=2",{"_index":3298,"t":{"626":{"position":[[195,38],[300,38]]}}}],["http://api.example.com/users?page=5",{"_index":3299,"t":{"626":{"position":[[242,38],[354,38]]}}}],["http://example.com",{"_index":3360,"t":{"648":{"position":[[127,18]]}}}],["http://example.com/?field1=value1&field1=value2&field2=value3",{"_index":3368,"t":{"650":{"position":[[374,61]]}}}],["http://example.com/?list_a=1&list_a=2&list_a=3&list_b[]=1&list_b[]=2&list_b[]=3&list_c=1,2,3",{"_index":3373,"t":{"650":{"position":[[558,92]]}}}],["http://example.com/?name=alex&amount=32.23&id",{"_index":3403,"t":{"656":{"position":[[533,46]]}}}],["http://example.com/?name=alex&wanna_cake=2&id",{"_index":3409,"t":{"658":{"position":[[523,46]]}}}],["http://example.com/?name=alex&want_pizza=false&id",{"_index":3361,"t":{"650":{"position":[[180,50]]},"654":{"position":[[465,50]]}}}],["http://example.com/?order=desc&brand=nik",{"_index":3389,"t":{"652":{"position":[[341,41]]}}}],["http://example.com/hello",{"_index":3190,"t":{"584":{"position":[[337,24]]}}}],["http://example.com/search?q=someth",{"_index":3332,"t":{"638":{"position":[[94,37]]}}}],["http://example.com/user/111",{"_index":3352,"t":{"644":{"position":[[309,27]]}}}],["http://example.com/user/123",{"_index":3344,"t":{"642":{"position":[[350,27]]}}}],["http://example.com/user/fenni",{"_index":3120,"t":{"566":{"position":[[148,29]]},"640":{"position":[[297,29]]}}}],["http://example.com/user/fenny/123",{"_index":3123,"t":{"566":{"position":[[282,33]]},"640":{"position":[[422,33]]}}}],["http://example.com/users?sort=desc",{"_index":3358,"t":{"646":{"position":[[254,34]]}}}],["http://google.com",{"_index":534,"t":{"59":{"position":[[460,17],[615,20]]},"404":{"position":[[1439,20]]},"570":{"position":[[281,20],[352,17],[425,18]]}}}],["http://google.com/search",{"_index":3264,"t":{"612":{"position":[[113,24]]}}}],["http://localhost",{"_index":2387,"t":{"404":{"position":[[2016,19]]},"570":{"position":[[302,19],[334,17],[407,17]]}}}],["http://localhost:3000",{"_index":136,"t":{"8":{"position":[[293,21]]},"208":{"position":[[589,21],[717,22]]},"334":{"position":[[268,21]]},"344":{"position":[[856,21],[968,21],[1070,21]]},"346":{"position":[[1451,21]]},"348":{"position":[[820,21]]},"404":{"position":[[1726,24]]},"552":{"position":[[2601,22]]},"580":{"position":[[1238,21]]},"674":{"position":[[763,24]]}}}],["http://localhost:3000/1",{"_index":3002,"t":{"552":{"position":[[1443,23],[1711,23]]}}}],["http://localhost:3000/12",{"_index":3001,"t":{"552":{"position":[[1397,24]]}}}],["http://localhost:3000/120000",{"_index":3004,"t":{"552":{"position":[[1645,28]]}}}],["http://localhost:3000/125",{"_index":3013,"t":{"552":{"position":[[2044,25]]}}}],["http://localhost:3000/2022",{"_index":3016,"t":{"552":{"position":[[2166,26]]}}}],["http://localhost:3000/250",{"_index":3006,"t":{"552":{"position":[[1767,25]]}}}],["http://localhost:3000/42",{"_index":3019,"t":{"552":{"position":[[2555,24]]}}}],["http://localhost:3000/7.0",{"_index":3020,"t":{"552":{"position":[[2642,25]]}}}],["http://localhost:3000/?name=john&pass=do",{"_index":3168,"t":{"580":{"position":[[1276,43]]}}}],["http://localhost:3000/?name=john&pass=doe&products=shoe,hat",{"_index":3421,"t":{"660":{"position":[[737,61]]}}}],["http://localhost:3000/allow",{"_index":2158,"t":{"348":{"position":[[952,29]]}}}],["http://localhost:3000/api/user/john",{"_index":184,"t":{"10":{"position":[[1218,35]]}}}],["http://localhost:3000/auth2",{"_index":2152,"t":{"346":{"position":[[1749,27]]}}}],["http://localhost:3000/authent",{"_index":2150,"t":{"346":{"position":[[1585,35]]}}}],["http://localhost:3000/bodi",{"_index":3552,"t":{"696":{"position":[[1574,26]]}}}],["http://localhost:3000/css/style.css",{"_index":218,"t":{"17":{"position":[[435,35]]}}}],["http://localhost:3000/flights/lax",{"_index":2913,"t":{"550":{"position":[[2140,33]]}}}],["http://localhost:3000/foo/1000",{"_index":2626,"t":{"485":{"position":[[861,32]]}}}],["http://localhost:3000/foo/3000",{"_index":2627,"t":{"485":{"position":[[952,32]]}}}],["http://localhost:3000/hello.html",{"_index":216,"t":{"17":{"position":[[355,32]]}}}],["http://localhost:3000/john",{"_index":178,"t":{"10":{"position":[[991,26]]}}}],["http://localhost:3000/js/jquery.j",{"_index":217,"t":{"17":{"position":[[394,34]]}}}],["http://localhost:3000/metr",{"_index":2486,"t":{"460":{"position":[[634,29]]}}}],["http://localhost:3000/old",{"_index":2410,"t":{"414":{"position":[[476,25]]},"434":{"position":[[456,25]]}}}],["http://localhost:3000/old/hello",{"_index":2411,"t":{"414":{"position":[[507,31]]},"434":{"position":[[487,31]]}}}],["http://localhost:3000/plantae/prunus.persica",{"_index":2907,"t":{"550":{"position":[[1931,44]]}}}],["http://localhost:3000/query?title=title&body=body&date=2021",{"_index":3553,"t":{"696":{"position":[[1616,60]]}}}],["http://localhost:3000/shop/product/color:blue/size:x",{"_index":2921,"t":{"550":{"position":[[2479,53]]}}}],["http://localhost:3000/static/css/style.css",{"_index":228,"t":{"17":{"position":[[968,42]]}}}],["http://localhost:3000/static/hello.html",{"_index":226,"t":{"17":{"position":[[874,39]]}}}],["http://localhost:3000/static/js/jquery.j",{"_index":227,"t":{"17":{"position":[[920,41]]}}}],["http://localhost:3000/test",{"_index":3015,"t":{"552":{"position":[[2104,26]]}}}],["http://localhost:3001",{"_index":2390,"t":{"404":{"position":[[2276,24],[2459,24],[2875,24]]}}}],["http://localhost:3002",{"_index":2391,"t":{"404":{"position":[[2301,24],[2484,24],[2900,24]]}}}],["http://localhost:3003",{"_index":2392,"t":{"404":{"position":[[2326,24],[2509,24],[2925,24]]}}}],["http://localhost:8000",{"_index":2376,"t":{"404":{"position":[[820,25]]}}}],["http://localhost:8080",{"_index":3143,"t":{"578":{"position":[[92,21]]}}}],["http://localhost:8080/css/style.css",{"_index":206,"t":{"12":{"position":[[466,35]]}}}],["http://localhost:8080/hello",{"_index":3474,"t":{"680":{"position":[[84,27]]}}}],["http://localhost:8080/hello%20world",{"_index":173,"t":{"10":{"position":[[787,35]]}}}],["http://localhost:8080/hello.html",{"_index":204,"t":{"12":{"position":[[398,32]]}}}],["http://localhost:8080/js/jquery.j",{"_index":205,"t":{"12":{"position":[[431,34]]}}}],["http://www.foobar.com",{"_index":2400,"t":{"406":{"position":[[332,22]]}}}],["httpapi",{"_index":2051,"t":{"316":{"position":[[293,7]]}}}],["httperror",{"_index":1488,"t":{"137":{"position":[[23,9]]}}}],["httphandler",{"_index":1611,"t":{"159":{"position":[[27,11]]}}}],["httphandler(h",{"_index":1612,"t":{"159":{"position":[[39,13]]}}}],["httphandlerfunc",{"_index":1614,"t":{"159":{"position":[[111,15]]}}}],["httphandlerfunc(h",{"_index":1615,"t":{"159":{"position":[[127,17]]}}}],["httphandlerfunc(mw",{"_index":1618,"t":{"159":{"position":[[226,18]]}}}],["httpmiddlewar",{"_index":1617,"t":{"159":{"position":[[211,14]]}}}],["httponli",{"_index":3180,"t":{"582":{"position":[[822,9],[1027,9]]},"588":{"position":[[280,8]]}}}],["httpreq",{"_index":1660,"t":{"170":{"position":[[304,8]]}}}],["httpreq.url.str",{"_index":1663,"t":{"170":{"position":[[420,21]]}}}],["https://blog.trailofbits.com/2019/03/25/what",{"_index":1859,"t":{"228":{"position":[[733,44]]}}}],["https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/chart.bundle.min.j",{"_index":2509,"t":{"462":{"position":[[857,66]]}}}],["https://datatracker.ietf.org/doc/html/draft",{"_index":2049,"t":{"316":{"position":[[244,43]]}}}],["https://datatracker.ietf.org/doc/html/rfc8446#sect",{"_index":1858,"t":{"228":{"position":[[677,53]]}}}],["https://example.com",{"_index":783,"t":{"128":{"position":[[290,21]]},"574":{"position":[[198,19]]}}}],["https://example.com/page#chapt",{"_index":3136,"t":{"574":{"position":[[108,32]]}}}],["https://expressjs.com/en/4x/api.html#req.fresh",{"_index":3236,"t":{"600":{"position":[[0,46]]}}}],["https://expressjs.com/en/4x/api.html#req.stal",{"_index":3557,"t":{"700":{"position":[[0,46]]}}}],["https://fonts.googleapis.com/css2?family=roboto:wght@400;900&display=swap",{"_index":2506,"t":{"462":{"position":[[656,73]]}}}],["https://foobar.com",{"_index":2399,"t":{"406":{"position":[[311,20]]}}}],["https://github.com/geertjohan/go.ric",{"_index":2019,"t":{"306":{"position":[[0,37]]}}}],["https://github.com/go",{"_index":3040,"t":{"559":{"position":[[961,21]]}}}],["https://github.com/gobuffalo/packr",{"_index":2015,"t":{"304":{"position":[[0,34]]}}}],["https://github.com/markbates/pkg",{"_index":2011,"t":{"302":{"position":[[0,34]]}}}],["https://github.com/rakyll/statik",{"_index":2025,"t":{"310":{"position":[[0,32]]}}}],["https://github.com/smallnest/go",{"_index":2580,"t":{"479":{"position":[[3,31]]}}}],["https://github.com/unnoted/fileb0x",{"_index":2022,"t":{"308":{"position":[[0,34]]}}}],["https://gofiber.io",{"_index":1763,"t":{"208":{"position":[[369,20]]}}}],["https://gofiber.net",{"_index":1764,"t":{"208":{"position":[[390,21]]}}}],["https://i.imgur.com/\"+c.params(\"id\")+\".gif",{"_index":2378,"t":{"404":{"position":[[1119,44]]}}}],["https://programming.guide/go/format",{"_index":2265,"t":{"384":{"position":[[662,35]]}}}],["httptest.newrequest(\"get",{"_index":538,"t":{"59":{"position":[[588,26]]}}}],["hyphen",{"_index":2898,"t":{"550":{"position":[[1613,6]]}}}],["i.",{"_index":309,"t":{"19":{"position":[[1292,4]]},"228":{"position":[[965,4]]},"406":{"position":[[305,5]]},"546":{"position":[[1292,4]]},"561":{"position":[[1292,4]]}}}],["icon",{"_index":1968,"t":{"284":{"position":[[80,4]]}}}],["id",{"_index":1257,"t":{"130":{"position":[[10502,3],[11548,3]]},"382":{"position":[[656,2]]},"424":{"position":[[444,3]]},"426":{"position":[[259,2],[298,3],[503,2]]},"444":{"position":[[445,4]]},"448":{"position":[[363,2],[1322,2]]},"606":{"position":[[248,4]]},"642":{"position":[[426,3]]},"644":{"position":[[401,3],[453,7]]}}}],["idjohndoe/myembeddedfil",{"_index":2023,"t":{"308":{"position":[[149,24]]}}}],["module>/statik",{"_index":2030,"t":{"310":{"position":[[214,15]]}}}],["monitor",{"_index":2476,"t":{"456":{"position":[[0,7],[85,7],[101,7]]},"462":{"position":[[120,8],[263,10]]}}}],["monitor.new",{"_index":2481,"t":{"460":{"position":[[321,14]]}}}],["monitor.new(monitor.config{titl",{"_index":2484,"t":{"460":{"position":[[488,33]]}}}],["more",{"_index":116,"t":{"6":{"position":[[1512,4]]},"14":{"position":[[4,4]]},"17":{"position":[[1044,4]]},"23":{"position":[[39,4]]},"135":{"position":[[4813,4],[5057,4]]},"264":{"position":[[46,4]]},"344":{"position":[[1130,4]]},"362":{"position":[[1399,4]]},"382":{"position":[[725,4]]},"430":{"position":[[140,4]]},"490":{"position":[[113,4]]},"492":{"position":[[146,4]]},"496":{"position":[[144,4]]},"500":{"position":[[1275,4]]},"552":{"position":[[647,4],[857,4],[952,4],[1022,4]]},"556":{"position":[[437,4]]},"559":{"position":[[939,4]]},"578":{"position":[[386,7]]},"580":{"position":[[1453,7]]},"584":{"position":[[218,4]]},"586":{"position":[[275,4]]},"590":{"position":[[473,7]]},"598":{"position":[[453,7]]},"602":{"position":[[465,7]]},"606":{"position":[[532,7]]},"612":{"position":[[350,7]]},"638":{"position":[[356,7]]},"640":{"position":[[1182,7]]},"652":{"position":[[655,7]]},"664":{"position":[[462,4]]}}}],["mount",{"_index":323,"t":{"21":{"position":[[8,5],[43,6]]},"23":{"position":[[81,8],[435,8],[497,5],[536,8]]},"135":{"position":[[3436,7]]},"538":{"position":[[49,8],[71,5],[108,7],[201,9],[649,5],[728,5],[795,5],[848,5]]},"554":{"position":[[509,6]]}}}],["mount(prefix",{"_index":324,"t":{"21":{"position":[[74,12]]}}}],["mountpath",{"_index":332,"t":{"23":{"position":[[4,9],[116,11],[467,10]]}}}],["ms",{"_index":2562,"t":{"469":{"position":[[448,3],[524,3]]},"471":{"position":[[74,3],[155,3]]},"473":{"position":[[74,3],[154,3]]},"475":{"position":[[74,3],[153,3]]},"477":{"position":[[76,3],[156,3]]},"479":{"position":[[178,3],[185,3],[193,3],[201,2],[540,2]]},"485":{"position":[[360,5],[1187,5]]},"492":{"position":[[659,2]]}}}],["msg",{"_index":1533,"t":{"147":{"position":[[226,4]]}}}],["mstimeout",{"_index":531,"t":{"59":{"position":[[296,9]]}}}],["multi",{"_index":1447,"t":{"135":{"position":[[5492,5],[5520,5]]},"406":{"position":[[870,5],[901,5]]}}}],["multipart",{"_index":682,"t":{"98":{"position":[[20,9],[185,9],[632,9],[833,9],[1201,9],[1248,9],[1478,9]]},"135":{"position":[[1559,9],[1650,9]]},"634":{"position":[[10,9],[294,9]]},"682":{"position":[[27,9],[191,9]]},"684":{"position":[[27,9],[271,9]]}}}],["multipart.filehead",{"_index":3229,"t":{"596":{"position":[[138,23]]},"634":{"position":[[549,23]]},"682":{"position":[[87,22],[354,23]]},"684":{"position":[[126,22],[434,23]]}}}],["multipart.form",{"_index":3315,"t":{"634":{"position":[[207,17],[364,15]]},"682":{"position":[[261,15]]},"684":{"position":[[341,15]]}}}],["multipart/form",{"_index":683,"t":{"98":{"position":[[81,14]]},"130":{"position":[[807,15]]},"580":{"position":[[306,14]]}}}],["multipartform",{"_index":681,"t":{"98":{"position":[[0,13],[165,13],[580,14]]},"596":{"position":[[0,13]]},"634":{"position":[[64,16],[191,15]]}}}],["multipartform(arg",{"_index":686,"t":{"98":{"position":[[356,18]]}}}],["multipartform(nil",{"_index":691,"t":{"98":{"position":[[752,19],[1133,19],[1840,18]]}}}],["multipl",{"_index":155,"t":{"10":{"position":[[208,8]]},"17":{"position":[[500,8]]},"19":{"position":[[1625,9],[1742,8]]},"72":{"position":[[38,8]]},"78":{"position":[[68,8]]},"98":{"position":[[889,8]]},"135":{"position":[[4757,8]]},"316":{"position":[[200,8]]},"372":{"position":[[369,8]]},"400":{"position":[[64,8]]},"402":{"position":[[41,8]]},"543":{"position":[[66,8]]},"546":{"position":[[1625,9],[1742,8]]},"552":{"position":[[1250,8],[1502,8]]},"561":{"position":[[1625,9],[1742,8]]},"582":{"position":[[259,8]]},"710":{"position":[[166,8]]}}}],["mustach",{"_index":2704,"t":{"496":{"position":[[117,8]]},"543":{"position":[[130,8]]}}}],["mycustomstorag",{"_index":2184,"t":{"358":{"position":[[636,18]]}}}],["myembeddedfiles.http",{"_index":2024,"t":{"308":{"position":[[268,21]]}}}],["myfil",{"_index":2964,"t":{"552":{"position":[[628,6]]}}}],["mymiddlewar",{"_index":3483,"t":{"680":{"position":[[405,14]]}}}],["myservic",{"_index":2483,"t":{"460":{"position":[[443,10],[522,10]]}}}],["myvalid",{"_index":3057,"t":{"559":{"position":[[1588,11]]}}}],["myvalidator.validate(us",{"_index":3069,"t":{"559":{"position":[[2237,27]]}}}],["myvalidator.validator.registervalidation(\"teen",{"_index":3060,"t":{"559":{"position":[[1908,50]]}}}],["n",{"_index":2817,"t":{"526":{"position":[[615,5]]},"712":{"position":[[74,2]]},"714":{"position":[[99,2]]},"716":{"position":[[76,2]]}}}],["name",{"_index":200,"t":{"12":{"position":[[251,5]]},"17":{"position":[[306,5],[1857,4]]},"27":{"position":[[142,4],[301,6],[368,6]]},"37":{"position":[[24,4],[571,7],[638,7],[707,7],[787,7],[850,7],[916,7],[1003,7],[1095,7]]},"39":{"position":[[30,5],[356,7]]},"41":{"position":[[443,7]]},"98":{"position":[[1087,6],[1325,4],[1350,4],[1370,4],[1375,4]]},"106":{"position":[[93,5]]},"133":{"position":[[30,5]]},"135":{"position":[[330,4],[849,4],[920,5],[1299,5],[2532,4]]},"147":{"position":[[1037,7]]},"159":{"position":[[0,4]]},"220":{"position":[[570,4]]},"240":{"position":[[105,6]]},"244":{"position":[[940,5]]},"250":{"position":[[106,5]]},"326":{"position":[[402,4]]},"446":{"position":[[466,4],[864,6]]},"448":{"position":[[1354,4]]},"492":{"position":[[444,6]]},"526":{"position":[[57,7],[150,6],[889,5],[919,5]]},"530":{"position":[[62,7],[160,6]]},"541":{"position":[[591,4]]},"550":{"position":[[62,5],[75,5],[254,4],[611,5],[3028,6],[3057,7]]},"559":{"position":[[441,4],[1382,4],[2163,5]]},"566":{"position":[[245,9]]},"580":{"position":[[461,5],[526,4]]},"582":{"position":[[221,5],[279,6],[744,5],[938,5]]},"588":{"position":[[79,4]]},"596":{"position":[[40,5]]},"598":{"position":[[36,5],[251,7]]},"610":{"position":[[18,5]]},"622":{"position":[[220,4],[331,5],[420,9],[476,7],[550,9]]},"624":{"position":[[151,4],[203,5],[338,4],[445,5]]},"660":{"position":[[311,5],[376,4]]},"666":{"position":[[510,7],[687,7]]},"674":{"position":[[321,5],[386,4],[791,6]]},"680":{"position":[[258,6]]},"704":{"position":[[51,4]]},"720":{"position":[[255,4],[387,5]]}}}],["name(\"addus",{"_index":2819,"t":{"526":{"position":[[719,18]]}}}],["name(\"destroyus",{"_index":2821,"t":{"526":{"position":[[829,22]]}}}],["name(\"hom",{"_index":3253,"t":{"610":{"position":[[257,15]]}}}],["name(\"index",{"_index":464,"t":{"41":{"position":[[311,16]]},"526":{"position":[[420,16]]}}}],["name(\"us",{"_index":3448,"t":{"666":{"position":[[890,15]]}}}],["name(\"user.show",{"_index":3256,"t":{"610":{"position":[[357,20]]}}}],["name(nam",{"_index":434,"t":{"37":{"position":[[80,9]]}}}],["name1",{"_index":701,"t":{"98":{"position":[[1118,7],[1723,7]]}}}],["name2",{"_index":714,"t":{"98":{"position":[[1787,7]]}}}],["namegramehello",{"_index":3226,"t":{"594":{"position":[[409,9]]}}}],["packag",{"_index":125,"t":{"8":{"position":[[81,7]]},"19":{"position":[[1206,8]]},"162":{"position":[[0,7]]},"164":{"position":[[0,7]]},"166":{"position":[[0,7]]},"168":{"position":[[0,7]]},"170":{"position":[[0,7]]},"176":{"position":[[22,7]]},"186":{"position":[[22,7]]},"196":{"position":[[22,7]]},"208":{"position":[[22,7]]},"214":{"position":[[695,7]]},"218":{"position":[[22,7]]},"226":{"position":[[41,8]]},"232":{"position":[[22,7]]},"244":{"position":[[22,7]]},"256":{"position":[[22,7]]},"268":{"position":[[22,7]]},"274":{"position":[[109,7]]},"278":{"position":[[22,7]]},"288":{"position":[[22,7]]},"298":{"position":[[22,7]]},"300":{"position":[[90,7]]},"302":{"position":[[35,7]]},"304":{"position":[[35,7]]},"306":{"position":[[38,7]]},"308":{"position":[[35,7]]},"310":{"position":[[33,7]]},"320":{"position":[[22,7]]},"334":{"position":[[0,7]]},"344":{"position":[[0,7]]},"346":{"position":[[139,7]]},"348":{"position":[[0,7]]},"354":{"position":[[252,7]]},"358":{"position":[[22,7]]},"366":{"position":[[41,8]]},"368":{"position":[[142,7]]},"372":{"position":[[22,7]]},"382":{"position":[[22,7]]},"394":{"position":[[22,7]]},"404":{"position":[[22,7]]},"414":{"position":[[0,7]]},"424":{"position":[[22,7]]},"434":{"position":[[0,7]]},"440":{"position":[[22,7]]},"442":{"position":[[68,7]]},"446":{"position":[[22,7]]},"454":{"position":[[41,8]]},"460":{"position":[[22,7]]},"485":{"position":[[22,7]]},"500":{"position":[[57,7]]},"503":{"position":[[472,7]]},"510":{"position":[[384,7]]},"526":{"position":[[251,7]]},"538":{"position":[[288,7]]},"543":{"position":[[31,7],[173,7]]},"546":{"position":[[1206,8]]},"559":{"position":[[42,7],[303,7]]},"561":{"position":[[1206,8]]},"622":{"position":[[65,8]]},"720":{"position":[[72,8]]}}}],["packr.new(\"asset",{"_index":2017,"t":{"304":{"position":[[265,17]]}}}],["page",{"_index":139,"t":{"8":{"position":[[355,5]]},"460":{"position":[[462,5],[541,8]]},"462":{"position":[[77,4]]},"492":{"position":[[313,4]]},"494":{"position":[[320,4]]},"507":{"position":[[415,4],[494,5],[917,4]]},"559":{"position":[[123,4]]},"610":{"position":[[250,6]]},"668":{"position":[[375,6]]}}}],["pair",{"_index":1566,"t":{"147":{"position":[[927,5]]}}}],["panic",{"_index":2332,"t":{"390":{"position":[[48,6]]},"394":{"position":[[296,5]]},"503":{"position":[[335,6],[372,5],[689,5]]}}}],["panic(\"i'm",{"_index":2337,"t":{"394":{"position":[[375,10]]}}}],["panic(\"thi",{"_index":2742,"t":{"503":{"position":[[677,11]]}}}],["panic(err",{"_index":571,"t":{"68":{"position":[[183,10]]},"310":{"position":[[318,10]]},"446":{"position":[[440,10],[661,10],[805,10]]}}}],["param",{"_index":428,"t":{"35":{"position":[[401,9],[470,9],[538,9]]},"37":{"position":[[601,9],[670,9],[745,9],[812,9],[878,9],[947,9],[1040,9],[1133,9]]},"39":{"position":[[386,9]]},"41":{"position":[[473,9]]},"294":{"position":[[90,7]]},"550":{"position":[[228,6],[2930,7],[2953,7],[3020,7],[3108,7],[3220,7]]},"566":{"position":[[0,6],[50,6],[71,7]]},"610":{"position":[[148,6]]},"640":{"position":[[118,5],[187,5]]},"642":{"position":[[255,5]]},"644":{"position":[[101,9],[385,5]]},"656":{"position":[[417,5]]},"658":{"position":[[417,5]]},"666":{"position":[[298,7],[364,6]]}}}],["param:://::Route Handlers | Fiber - - + +
-
Version: v2.x

Route Handlers

Registers a route bound to a specific HTTP method.

Signatures
// HTTP methods
func (app *App) Get(path string, handlers ...Handler) Router
func (app *App) Head(path string, handlers ...Handler) Router
func (app *App) Post(path string, handlers ...Handler) Router
func (app *App) Put(path string, handlers ...Handler) Router
func (app *App) Delete(path string, handlers ...Handler) Router
func (app *App) Connect(path string, handlers ...Handler) Router
func (app *App) Options(path string, handlers ...Handler) Router
func (app *App) Trace(path string, handlers ...Handler) Router
func (app *App) Patch(path string, handlers ...Handler) Router

// Add allows you to specifiy a method as value
func (app *App) Add(method, path string, handlers ...Handler) Router

// All will register the route on all HTTP methods
// Almost the same as app.Use but not bound to prefixes
func (app *App) All(path string, handlers ...Handler) Router
Examples
// Simple GET handler
app.Get("/api/list", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")
})

// Simple POST handler
app.Post("/api/register", func(c *fiber.Ctx) error {
return c.SendString("I'm a POST request!")
})

Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc

Signature
func (app *App) Use(args ...interface{}) Router
Examples
// Match any request
app.Use(func(c *fiber.Ctx) error {
return c.Next()
})

// Match request starting with /api
app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})

// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})

// Attach multiple handlers
app.Use("/api", func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
return c.Next()
}, func(c *fiber.Ctx) error {
return c.Next()
})
- - +
Version: v2.x

Route Handlers

Registers a route bound to a specific HTTP method.

Signatures
// HTTP methods
func (app *App) Get(path string, handlers ...Handler) Router
func (app *App) Head(path string, handlers ...Handler) Router
func (app *App) Post(path string, handlers ...Handler) Router
func (app *App) Put(path string, handlers ...Handler) Router
func (app *App) Delete(path string, handlers ...Handler) Router
func (app *App) Connect(path string, handlers ...Handler) Router
func (app *App) Options(path string, handlers ...Handler) Router
func (app *App) Trace(path string, handlers ...Handler) Router
func (app *App) Patch(path string, handlers ...Handler) Router

// Add allows you to specifiy a method as value
func (app *App) Add(method, path string, handlers ...Handler) Router

// All will register the route on all HTTP methods
// Almost the same as app.Use but not bound to prefixes
func (app *App) All(path string, handlers ...Handler) Router
Examples
// Simple GET handler
app.Get("/api/list", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")
})

// Simple POST handler
app.Post("/api/register", func(c *fiber.Ctx) error {
return c.SendString("I'm a POST request!")
})

Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc

Signature
func (app *App) Use(args ...interface{}) Router
Examples
// Match any request
app.Use(func(c *fiber.Ctx) error {
return c.Next()
})

// Match request starting with /api
app.Use("/api", func(c *fiber.Ctx) error {
return c.Next()
})

// Match requests starting with /api or /home (multiple-prefix support)
app.Use([]string{"/api", "/home"}, func(c *fiber.Ctx) error {
return c.Next()
})

// Attach multiple handlers
app.Use("/api", func(c *fiber.Ctx) error {
c.Set("X-Custom-Header", random.String(32))
return c.Next()
}, func(c *fiber.Ctx) error {
return c.Next()
})
+ + \ No newline at end of file diff --git a/search-index.json b/search-index.json index 7a979eb4af3..cea6b967327 100644 --- a/search-index.json +++ b/search-index.json @@ -1 +1 @@ -[{"documents":[{"i":721,"t":"👋 Welcome","u":"/contrib/","b":[]},{"i":726,"t":"Casbin","u":"/contrib/casbin/","b":[]},{"i":742,"t":"Fiberi18n","u":"/contrib/fiberi18n/","b":[]},{"i":752,"t":"Fibernewrelic","u":"/contrib/fibernewrelic/","b":[]},{"i":764,"t":"Fibersentry","u":"/contrib/fibersentry/","b":[]},{"i":776,"t":"Fiberzap","u":"/contrib/fiberzap/","b":[]},{"i":786,"t":"Fiberzerolog","u":"/contrib/fiberzerolog/","b":[]},{"i":796,"t":"JWT","u":"/contrib/jwt/","b":[]},{"i":816,"t":"Opafiber","u":"/contrib/opafiber/","b":[]},{"i":828,"t":"Otelfiber","u":"/contrib/otelfiber/","b":["Otelfiber"]},{"i":840,"t":"Example","u":"/contrib/otelfiber/example/","b":["Otelfiber"]},{"i":842,"t":"Paseto","u":"/contrib/paseto/","b":[]},{"i":852,"t":"Swagger","u":"/contrib/swagger/","b":[]},{"i":864,"t":"Websocket","u":"/contrib/websocket/","b":[]},{"i":872,"t":"👋 Welcome","u":"/storage/","b":[]},{"i":877,"t":"ArangoDB","u":"/storage/arangodb/","b":[]},{"i":891,"t":"Azure Blob","u":"/storage/azureblob/","b":[]},{"i":905,"t":"Badger","u":"/storage/badger/","b":[]},{"i":919,"t":"Bbolt","u":"/storage/bbolt/","b":[]},{"i":933,"t":"Couchbase","u":"/storage/couchbase/","b":[]},{"i":947,"t":"DynamoDB","u":"/storage/dynamodb/","b":[]},{"i":961,"t":"Etcd","u":"/storage/etcd/","b":[]},{"i":975,"t":"Memcache","u":"/storage/memcache/","b":[]},{"i":989,"t":"Memory","u":"/storage/memory/","b":[]},{"i":1003,"t":"MongoDB","u":"/storage/mongodb/","b":[]},{"i":1017,"t":"MSSQL","u":"/storage/mssql/","b":[]},{"i":1031,"t":"MySQL","u":"/storage/mysql/","b":[]},{"i":1045,"t":"Pebble","u":"/storage/pebble/","b":[]},{"i":1059,"t":"Postgres","u":"/storage/postgres/","b":[]},{"i":1073,"t":"Redis","u":"/storage/redis/","b":[]},{"i":1087,"t":"Ristretto","u":"/storage/ristretto/","b":[]},{"i":1101,"t":"S3","u":"/storage/s3/","b":[]},{"i":1115,"t":"SQLite3","u":"/storage/sqlite3/","b":[]},{"i":1129,"t":"👋 Welcome","u":"/template/","b":[]},{"i":1141,"t":"Ace","u":"/template/ace/","b":[]},{"i":1145,"t":"Amber","u":"/template/amber/","b":[]},{"i":1149,"t":"Django","u":"/template/django/","b":[]},{"i":1157,"t":"Handlebars","u":"/template/handlebars/","b":[]},{"i":1161,"t":"HTML","u":"/template/html/","b":["HTML"]},{"i":1169,"t":"Golang Templates Cheatsheet","u":"/template/html/TEMPLATES_CHEATSHEET","b":["HTML"]},{"i":1191,"t":"Jet","u":"/template/jet/","b":[]},{"i":1195,"t":"Mustache","u":"/template/mustache/","b":[]},{"i":1199,"t":"Pug","u":"/template/pug/","b":[]},{"i":1203,"t":"Slim","u":"/template/slim/","b":[]},{"i":1207,"t":"👋 Welcome","u":"/","b":["🏠 Home"]},{"i":1221,"t":"🚀 App","u":"/api/app","b":["🏠 Home","API"]},{"i":1268,"t":"🌎 Client","u":"/api/client","b":["🏠 Home","API"]},{"i":1335,"t":"📋 Constants","u":"/api/constants","b":["🏠 Home","API"]},{"i":1337,"t":"📦 Fiber","u":"/api/fiber","b":["🏠 Home","API"]},{"i":1346,"t":"Adaptor","u":"/api/middleware/adaptor","b":["🏠 Home","API","🧬 Middleware"]},{"i":1361,"t":"BasicAuth","u":"/api/middleware/basicauth","b":["🏠 Home","API","🧬 Middleware"]},{"i":1371,"t":"Cache","u":"/api/middleware/cache","b":["🏠 Home","API","🧬 Middleware"]},{"i":1381,"t":"Compress","u":"/api/middleware/compress","b":["🏠 Home","API","🧬 Middleware"]},{"i":1393,"t":"CORS","u":"/api/middleware/cors","b":["🏠 Home","API","🧬 Middleware"]},{"i":1403,"t":"CSRF","u":"/api/middleware/csrf","b":["🏠 Home","API","🧬 Middleware"]},{"i":1417,"t":"EarlyData","u":"/api/middleware/earlydata","b":["🏠 Home","API","🧬 Middleware"]},{"i":1429,"t":"Encrypt Cookie","u":"/api/middleware/encryptcookie","b":["🏠 Home","API","🧬 Middleware"]},{"i":1441,"t":"EnvVar","u":"/api/middleware/envvar","b":["🏠 Home","API","🧬 Middleware"]},{"i":1453,"t":"ETag","u":"/api/middleware/etag","b":["🏠 Home","API","🧬 Middleware"]},{"i":1463,"t":"ExpVar","u":"/api/middleware/expvar","b":["🏠 Home","API","🧬 Middleware"]},{"i":1473,"t":"Favicon","u":"/api/middleware/favicon","b":["🏠 Home","API","🧬 Middleware"]},{"i":1483,"t":"FileSystem","u":"/api/middleware/filesystem","b":["🏠 Home","API","🧬 Middleware"]},{"i":1505,"t":"Helmet","u":"/api/middleware/helmet","b":["🏠 Home","API","🧬 Middleware"]},{"i":1515,"t":"Idempotency","u":"/api/middleware/idempotency","b":["🏠 Home","API","🧬 Middleware"]},{"i":1529,"t":"Keyauth","u":"/api/middleware/keyauth","b":["🏠 Home","API","🧬 Middleware"]},{"i":1543,"t":"Limiter","u":"/api/middleware/limiter","b":["🏠 Home","API","🧬 Middleware"]},{"i":1557,"t":"Logger","u":"/api/middleware/logger","b":["🏠 Home","API","🧬 Middleware"]},{"i":1569,"t":"Monitor","u":"/api/middleware/monitor","b":["🏠 Home","API","🧬 Middleware"]},{"i":1579,"t":"Pprof","u":"/api/middleware/pprof","b":["🏠 Home","API","🧬 Middleware"]},{"i":1589,"t":"Proxy","u":"/api/middleware/proxy","b":["🏠 Home","API","🧬 Middleware"]},{"i":1599,"t":"Recover","u":"/api/middleware/recover","b":["🏠 Home","API","🧬 Middleware"]},{"i":1609,"t":"Redirect","u":"/api/middleware/redirect","b":["🏠 Home","API","🧬 Middleware"]},{"i":1619,"t":"RequestID","u":"/api/middleware/requestid","b":["🏠 Home","API","🧬 Middleware"]},{"i":1629,"t":"Rewrite","u":"/api/middleware/rewrite","b":["🏠 Home","API","🧬 Middleware"]},{"i":1635,"t":"Session","u":"/api/middleware/session","b":["🏠 Home","API","🧬 Middleware"]},{"i":1649,"t":"Skip","u":"/api/middleware/skip","b":["🏠 Home","API","🧬 Middleware"]},{"i":1655,"t":"Timeout","u":"/api/middleware/timeout","b":["🏠 Home","API","🧬 Middleware"]},{"i":1661,"t":"📊 Benchmarks","u":"/extra/benchmarks","b":["🏠 Home","Extra"]},{"i":1676,"t":"🤔 FAQ","u":"/extra/faq","b":["🏠 Home","Extra"]},{"i":1691,"t":"🐛 Error Handling","u":"/guide/error-handling","b":["🏠 Home","Guide"]},{"i":1698,"t":"⚡ Make Fiber Faster","u":"/guide/faster-fiber","b":["🏠 Home","Guide"]},{"i":1703,"t":"🎭 Grouping","u":"/guide/grouping","b":["🏠 Home","Guide"]},{"i":1709,"t":"🪝 Hooks","u":"/guide/hooks","b":["🏠 Home","Guide"]},{"i":1729,"t":"🔌 Routing","u":"/guide/routing","b":["🏠 Home","Guide"]},{"i":1742,"t":"📝 Templates","u":"/guide/templates","b":["🏠 Home","Guide"]},{"i":1747,"t":"🔎 Validation","u":"/guide/validation","b":["🏠 Home","Guide"]},{"i":1750,"t":"Route Handlers","u":"/partials/routing/route-handlers","b":[]},{"i":1752,"t":"🧠 Ctx","u":"/api/ctx","b":["🏠 Home","API"]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/721",[0,1.285,1,2.441]],["t/726",[2,4.503]],["t/742",[3,4.503]],["t/752",[4,4.503]],["t/764",[5,4.503]],["t/776",[6,4.503]],["t/786",[7,4.503]],["t/796",[8,4.503]],["t/816",[9,4.503]],["t/828",[10,4.503]],["t/840",[11,4.503]],["t/842",[12,4.503]],["t/852",[13,4.503]],["t/864",[14,4.503]],["t/872",[0,1.285,1,2.441]],["t/877",[15,4.503]],["t/891",[16,3.34,17,3.34]],["t/905",[18,4.503]],["t/919",[19,4.503]],["t/933",[20,4.503]],["t/947",[21,4.503]],["t/961",[22,4.503]],["t/975",[23,4.503]],["t/989",[24,4.503]],["t/1003",[25,4.503]],["t/1017",[26,4.503]],["t/1031",[27,4.503]],["t/1045",[28,4.503]],["t/1059",[29,4.503]],["t/1073",[30,4.503]],["t/1087",[31,4.503]],["t/1101",[32,4.503]],["t/1115",[33,4.503]],["t/1129",[0,1.285,1,2.441]],["t/1141",[34,4.503]],["t/1145",[35,4.503]],["t/1149",[36,4.503]],["t/1157",[37,4.503]],["t/1161",[38,4.503]],["t/1169",[39,2.654,40,2.322,41,2.654]],["t/1191",[42,4.503]],["t/1195",[43,4.503]],["t/1199",[44,4.503]],["t/1203",[45,4.503]],["t/1207",[0,1.285,1,2.441]],["t/1221",[0,1.285,46,3.34]],["t/1268",[0,1.285,47,3.34]],["t/1335",[0,1.285,48,3.34]],["t/1337",[0,1.285,49,2.922]],["t/1346",[50,4.503]],["t/1361",[51,4.503]],["t/1371",[52,4.503]],["t/1381",[53,4.503]],["t/1393",[54,4.503]],["t/1403",[55,4.503]],["t/1417",[56,4.503]],["t/1429",[57,3.34,58,3.34]],["t/1441",[59,4.503]],["t/1453",[60,4.503]],["t/1463",[61,4.503]],["t/1473",[62,4.503]],["t/1483",[63,4.503]],["t/1505",[64,4.503]],["t/1515",[65,4.503]],["t/1529",[66,4.503]],["t/1543",[67,4.503]],["t/1557",[68,4.503]],["t/1569",[69,4.503]],["t/1579",[70,4.503]],["t/1589",[71,4.503]],["t/1599",[72,4.503]],["t/1609",[73,4.503]],["t/1619",[74,4.503]],["t/1629",[75,4.503]],["t/1635",[76,4.503]],["t/1649",[77,4.503]],["t/1655",[78,4.503]],["t/1661",[0,1.285,79,3.34]],["t/1676",[0,1.285,80,3.34]],["t/1691",[0,1.021,81,2.654,82,2.654]],["t/1698",[0,0.847,49,1.927,83,2.202,84,2.202]],["t/1703",[0,1.285,85,3.34]],["t/1709",[0,1.285,86,3.34]],["t/1729",[0,1.285,87,2.922]],["t/1742",[0,1.285,40,2.922]],["t/1747",[0,1.285,88,3.34]],["t/1750",[87,2.922,89,3.34]],["t/1752",[0,1.285,90,3.34]]],"invertedIndex":[["",{"_index":0,"t":{"721":{"position":[[0,2]]},"872":{"position":[[0,2]]},"1129":{"position":[[0,2]]},"1207":{"position":[[0,2]]},"1221":{"position":[[0,2]]},"1268":{"position":[[0,2]]},"1335":{"position":[[0,2]]},"1337":{"position":[[0,2]]},"1661":{"position":[[0,2]]},"1676":{"position":[[0,2]]},"1691":{"position":[[0,2]]},"1698":{"position":[[0,1]]},"1703":{"position":[[0,2]]},"1709":{"position":[[0,2]]},"1729":{"position":[[0,2]]},"1742":{"position":[[0,2]]},"1747":{"position":[[0,2]]},"1752":{"position":[[0,2]]}}}],["ac",{"_index":34,"t":{"1141":{"position":[[0,3]]}}}],["adaptor",{"_index":50,"t":{"1346":{"position":[[0,7]]}}}],["amber",{"_index":35,"t":{"1145":{"position":[[0,5]]}}}],["app",{"_index":46,"t":{"1221":{"position":[[3,3]]}}}],["arangodb",{"_index":15,"t":{"877":{"position":[[0,8]]}}}],["azur",{"_index":16,"t":{"891":{"position":[[0,5]]}}}],["badger",{"_index":18,"t":{"905":{"position":[[0,6]]}}}],["basicauth",{"_index":51,"t":{"1361":{"position":[[0,9]]}}}],["bbolt",{"_index":19,"t":{"919":{"position":[[0,5]]}}}],["benchmark",{"_index":79,"t":{"1661":{"position":[[3,10]]}}}],["blob",{"_index":17,"t":{"891":{"position":[[6,4]]}}}],["cach",{"_index":52,"t":{"1371":{"position":[[0,5]]}}}],["casbin",{"_index":2,"t":{"726":{"position":[[0,6]]}}}],["cheatsheet",{"_index":41,"t":{"1169":{"position":[[17,10]]}}}],["client",{"_index":47,"t":{"1268":{"position":[[3,6]]}}}],["compress",{"_index":53,"t":{"1381":{"position":[[0,8]]}}}],["constant",{"_index":48,"t":{"1335":{"position":[[3,9]]}}}],["cooki",{"_index":58,"t":{"1429":{"position":[[8,6]]}}}],["cor",{"_index":54,"t":{"1393":{"position":[[0,4]]}}}],["couchbas",{"_index":20,"t":{"933":{"position":[[0,9]]}}}],["csrf",{"_index":55,"t":{"1403":{"position":[[0,4]]}}}],["ctx",{"_index":90,"t":{"1752":{"position":[[3,3]]}}}],["django",{"_index":36,"t":{"1149":{"position":[[0,6]]}}}],["dynamodb",{"_index":21,"t":{"947":{"position":[[0,8]]}}}],["earlydata",{"_index":56,"t":{"1417":{"position":[[0,9]]}}}],["encrypt",{"_index":57,"t":{"1429":{"position":[[0,7]]}}}],["envvar",{"_index":59,"t":{"1441":{"position":[[0,6]]}}}],["error",{"_index":81,"t":{"1691":{"position":[[3,5]]}}}],["etag",{"_index":60,"t":{"1453":{"position":[[0,4]]}}}],["etcd",{"_index":22,"t":{"961":{"position":[[0,4]]}}}],["exampl",{"_index":11,"t":{"840":{"position":[[0,7]]}}}],["expvar",{"_index":61,"t":{"1463":{"position":[[0,6]]}}}],["faq",{"_index":80,"t":{"1676":{"position":[[3,3]]}}}],["faster",{"_index":84,"t":{"1698":{"position":[[13,6]]}}}],["favicon",{"_index":62,"t":{"1473":{"position":[[0,7]]}}}],["fiber",{"_index":49,"t":{"1337":{"position":[[3,5]]},"1698":{"position":[[7,5]]}}}],["fiberi18n",{"_index":3,"t":{"742":{"position":[[0,9]]}}}],["fibernewrel",{"_index":4,"t":{"752":{"position":[[0,13]]}}}],["fibersentri",{"_index":5,"t":{"764":{"position":[[0,11]]}}}],["fiberzap",{"_index":6,"t":{"776":{"position":[[0,8]]}}}],["fiberzerolog",{"_index":7,"t":{"786":{"position":[[0,12]]}}}],["filesystem",{"_index":63,"t":{"1483":{"position":[[0,10]]}}}],["golang",{"_index":39,"t":{"1169":{"position":[[0,6]]}}}],["group",{"_index":85,"t":{"1703":{"position":[[3,8]]}}}],["handl",{"_index":82,"t":{"1691":{"position":[[9,8]]}}}],["handlebar",{"_index":37,"t":{"1157":{"position":[[0,10]]}}}],["handler",{"_index":89,"t":{"1750":{"position":[[6,8]]}}}],["helmet",{"_index":64,"t":{"1505":{"position":[[0,6]]}}}],["hook",{"_index":86,"t":{"1709":{"position":[[3,5]]}}}],["html",{"_index":38,"t":{"1161":{"position":[[0,4]]}}}],["idempot",{"_index":65,"t":{"1515":{"position":[[0,11]]}}}],["jet",{"_index":42,"t":{"1191":{"position":[[0,3]]}}}],["jwt",{"_index":8,"t":{"796":{"position":[[0,3]]}}}],["keyauth",{"_index":66,"t":{"1529":{"position":[[0,7]]}}}],["limit",{"_index":67,"t":{"1543":{"position":[[0,7]]}}}],["logger",{"_index":68,"t":{"1557":{"position":[[0,6]]}}}],["make",{"_index":83,"t":{"1698":{"position":[[2,4]]}}}],["memcach",{"_index":23,"t":{"975":{"position":[[0,8]]}}}],["memori",{"_index":24,"t":{"989":{"position":[[0,6]]}}}],["mongodb",{"_index":25,"t":{"1003":{"position":[[0,7]]}}}],["monitor",{"_index":69,"t":{"1569":{"position":[[0,7]]}}}],["mssql",{"_index":26,"t":{"1017":{"position":[[0,5]]}}}],["mustach",{"_index":43,"t":{"1195":{"position":[[0,8]]}}}],["mysql",{"_index":27,"t":{"1031":{"position":[[0,5]]}}}],["opafib",{"_index":9,"t":{"816":{"position":[[0,8]]}}}],["otelfib",{"_index":10,"t":{"828":{"position":[[0,9]]}}}],["paseto",{"_index":12,"t":{"842":{"position":[[0,6]]}}}],["pebbl",{"_index":28,"t":{"1045":{"position":[[0,6]]}}}],["postgr",{"_index":29,"t":{"1059":{"position":[[0,8]]}}}],["pprof",{"_index":70,"t":{"1579":{"position":[[0,5]]}}}],["proxi",{"_index":71,"t":{"1589":{"position":[[0,5]]}}}],["pug",{"_index":44,"t":{"1199":{"position":[[0,3]]}}}],["recov",{"_index":72,"t":{"1599":{"position":[[0,7]]}}}],["redi",{"_index":30,"t":{"1073":{"position":[[0,5]]}}}],["redirect",{"_index":73,"t":{"1609":{"position":[[0,8]]}}}],["requestid",{"_index":74,"t":{"1619":{"position":[[0,9]]}}}],["rewrit",{"_index":75,"t":{"1629":{"position":[[0,7]]}}}],["ristretto",{"_index":31,"t":{"1087":{"position":[[0,9]]}}}],["rout",{"_index":87,"t":{"1729":{"position":[[3,7]]},"1750":{"position":[[0,5]]}}}],["s3",{"_index":32,"t":{"1101":{"position":[[0,2]]}}}],["session",{"_index":76,"t":{"1635":{"position":[[0,7]]}}}],["skip",{"_index":77,"t":{"1649":{"position":[[0,4]]}}}],["slim",{"_index":45,"t":{"1203":{"position":[[0,4]]}}}],["sqlite3",{"_index":33,"t":{"1115":{"position":[[0,7]]}}}],["swagger",{"_index":13,"t":{"852":{"position":[[0,7]]}}}],["templat",{"_index":40,"t":{"1169":{"position":[[7,9]]},"1742":{"position":[[3,9]]}}}],["timeout",{"_index":78,"t":{"1655":{"position":[[0,7]]}}}],["valid",{"_index":88,"t":{"1747":{"position":[[3,10]]}}}],["websocket",{"_index":14,"t":{"864":{"position":[[0,9]]}}}],["welcom",{"_index":1,"t":{"721":{"position":[[3,7]]},"872":{"position":[[3,7]]},"1129":{"position":[[3,7]]},"1207":{"position":[[3,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":722,"t":"Contrib","u":"/contrib/","h":"","p":721},{"i":724,"t":"📑 Middleware Implementations","u":"/contrib/","h":"#-middleware-implementations","p":721},{"i":728,"t":"Install","u":"/contrib/casbin/","h":"#install","p":726},{"i":730,"t":"Signature","u":"/contrib/casbin/","h":"#signature","p":726},{"i":732,"t":"Config","u":"/contrib/casbin/","h":"#config","p":726},{"i":734,"t":"Examples","u":"/contrib/casbin/","h":"#examples","p":726},{"i":736,"t":"CustomPermission","u":"/contrib/casbin/","h":"#custompermission","p":726},{"i":738,"t":"RoutePermission","u":"/contrib/casbin/","h":"#routepermission","p":726},{"i":740,"t":"RoleAuthorization","u":"/contrib/casbin/","h":"#roleauthorization","p":726},{"i":744,"t":"Install","u":"/contrib/fiberi18n/","h":"#install","p":742},{"i":746,"t":"Signature","u":"/contrib/fiberi18n/","h":"#signature","p":742},{"i":748,"t":"Config","u":"/contrib/fiberi18n/","h":"#config","p":742},{"i":750,"t":"Example","u":"/contrib/fiberi18n/","h":"#example","p":742},{"i":754,"t":"Install","u":"/contrib/fibernewrelic/","h":"#install","p":752},{"i":756,"t":"Signature","u":"/contrib/fibernewrelic/","h":"#signature","p":752},{"i":758,"t":"Config","u":"/contrib/fibernewrelic/","h":"#config","p":752},{"i":760,"t":"Usage","u":"/contrib/fibernewrelic/","h":"#usage","p":752},{"i":762,"t":"Usage with existing New Relic application","u":"/contrib/fibernewrelic/","h":"#usage-with-existing-new-relic-application","p":752},{"i":766,"t":"Install","u":"/contrib/fibersentry/","h":"#install","p":764},{"i":768,"t":"Signature","u":"/contrib/fibersentry/","h":"#signature","p":764},{"i":770,"t":"Config","u":"/contrib/fibersentry/","h":"#config","p":764},{"i":772,"t":"Usage","u":"/contrib/fibersentry/","h":"#usage","p":764},{"i":774,"t":"Accessing Context in BeforeSend callback","u":"/contrib/fibersentry/","h":"#accessing-context-in-beforesend-callback","p":764},{"i":778,"t":"Install","u":"/contrib/fiberzap/","h":"#install","p":776},{"i":780,"t":"Signature","u":"/contrib/fiberzap/","h":"#signature","p":776},{"i":782,"t":"Config","u":"/contrib/fiberzap/","h":"#config","p":776},{"i":784,"t":"Example","u":"/contrib/fiberzap/","h":"#example","p":776},{"i":788,"t":"Install","u":"/contrib/fiberzerolog/","h":"#install","p":786},{"i":790,"t":"Signature","u":"/contrib/fiberzerolog/","h":"#signature","p":786},{"i":792,"t":"Config","u":"/contrib/fiberzerolog/","h":"#config","p":786},{"i":794,"t":"Example","u":"/contrib/fiberzerolog/","h":"#example","p":786},{"i":798,"t":"Install","u":"/contrib/jwt/","h":"#install","p":796},{"i":800,"t":"Signature","u":"/contrib/jwt/","h":"#signature","p":796},{"i":802,"t":"Config","u":"/contrib/jwt/","h":"#config","p":796},{"i":804,"t":"HS256 Example","u":"/contrib/jwt/","h":"#hs256-example","p":796},{"i":806,"t":"HS256 Test","u":"/contrib/jwt/","h":"#hs256-test","p":796},{"i":808,"t":"RS256 Example","u":"/contrib/jwt/","h":"#rs256-example","p":796},{"i":810,"t":"RS256 Test","u":"/contrib/jwt/","h":"#rs256-test","p":796},{"i":812,"t":"JWK Set Test","u":"/contrib/jwt/","h":"#jwk-set-test","p":796},{"i":814,"t":"Custom KeyFunc example","u":"/contrib/jwt/","h":"#custom-keyfunc-example","p":796},{"i":818,"t":"Install","u":"/contrib/opafiber/","h":"#install","p":816},{"i":820,"t":"Signature","u":"/contrib/opafiber/","h":"#signature","p":816},{"i":822,"t":"Config","u":"/contrib/opafiber/","h":"#config","p":816},{"i":824,"t":"Types","u":"/contrib/opafiber/","h":"#types","p":816},{"i":826,"t":"Usage","u":"/contrib/opafiber/","h":"#usage","p":816},{"i":830,"t":"Install","u":"/contrib/otelfiber/","h":"#install","p":828},{"i":832,"t":"Signature","u":"/contrib/otelfiber/","h":"#signature","p":828},{"i":834,"t":"Config","u":"/contrib/otelfiber/","h":"#config","p":828},{"i":836,"t":"Usage","u":"/contrib/otelfiber/","h":"#usage","p":828},{"i":838,"t":"Example","u":"/contrib/otelfiber/","h":"#example","p":828},{"i":844,"t":"Install","u":"/contrib/paseto/","h":"#install","p":842},{"i":846,"t":"Signature","u":"/contrib/paseto/","h":"#signature","p":842},{"i":848,"t":"Config","u":"/contrib/paseto/","h":"#config","p":842},{"i":850,"t":"Instructions","u":"/contrib/paseto/","h":"#instructions","p":842},{"i":854,"t":"Table of Contents","u":"/contrib/swagger/","h":"#table-of-contents","p":852},{"i":856,"t":"Signatures","u":"/contrib/swagger/","h":"#signatures","p":852},{"i":858,"t":"Examples","u":"/contrib/swagger/","h":"#examples","p":852},{"i":860,"t":"Default Config","u":"/contrib/swagger/","h":"#default-config","p":852},{"i":862,"t":"Custom Config","u":"/contrib/swagger/","h":"#custom-config","p":852},{"i":866,"t":"Install","u":"/contrib/websocket/","h":"#install","p":864},{"i":868,"t":"Example","u":"/contrib/websocket/","h":"#example","p":864},{"i":870,"t":"Note with cache middleware","u":"/contrib/websocket/","h":"#note-with-cache-middleware","p":864},{"i":873,"t":"📦 Storage","u":"/storage/","h":"","p":872},{"i":875,"t":"📑 Storage Implementations","u":"/storage/","h":"#-storage-implementations","p":872},{"i":879,"t":"Table of Contents","u":"/storage/arangodb/","h":"#table-of-contents","p":877},{"i":881,"t":"Signatures","u":"/storage/arangodb/","h":"#signatures","p":877},{"i":883,"t":"Installation","u":"/storage/arangodb/","h":"#installation","p":877},{"i":885,"t":"Examples","u":"/storage/arangodb/","h":"#examples","p":877},{"i":887,"t":"Config","u":"/storage/arangodb/","h":"#config","p":877},{"i":889,"t":"Default Config","u":"/storage/arangodb/","h":"#default-config","p":877},{"i":893,"t":"Table of Contents","u":"/storage/azureblob/","h":"#table-of-contents","p":891},{"i":895,"t":"Signatures","u":"/storage/azureblob/","h":"#signatures","p":891},{"i":897,"t":"Installation","u":"/storage/azureblob/","h":"#installation","p":891},{"i":899,"t":"Examples","u":"/storage/azureblob/","h":"#examples","p":891},{"i":901,"t":"Config","u":"/storage/azureblob/","h":"#config","p":891},{"i":903,"t":"Default Config","u":"/storage/azureblob/","h":"#default-config","p":891},{"i":907,"t":"Table of Contents","u":"/storage/badger/","h":"#table-of-contents","p":905},{"i":909,"t":"Signatures","u":"/storage/badger/","h":"#signatures","p":905},{"i":911,"t":"Installation","u":"/storage/badger/","h":"#installation","p":905},{"i":913,"t":"Examples","u":"/storage/badger/","h":"#examples","p":905},{"i":915,"t":"Config","u":"/storage/badger/","h":"#config","p":905},{"i":917,"t":"Default Config","u":"/storage/badger/","h":"#default-config","p":905},{"i":921,"t":"Table of Contents","u":"/storage/bbolt/","h":"#table-of-contents","p":919},{"i":923,"t":"Signatures","u":"/storage/bbolt/","h":"#signatures","p":919},{"i":925,"t":"Installation","u":"/storage/bbolt/","h":"#installation","p":919},{"i":927,"t":"Examples","u":"/storage/bbolt/","h":"#examples","p":919},{"i":929,"t":"Config","u":"/storage/bbolt/","h":"#config","p":919},{"i":931,"t":"Default Config","u":"/storage/bbolt/","h":"#default-config","p":919},{"i":935,"t":"Table of Contents","u":"/storage/couchbase/","h":"#table-of-contents","p":933},{"i":937,"t":"Signatures","u":"/storage/couchbase/","h":"#signatures","p":933},{"i":939,"t":"Installation","u":"/storage/couchbase/","h":"#installation","p":933},{"i":941,"t":"Examples","u":"/storage/couchbase/","h":"#examples","p":933},{"i":943,"t":"Config","u":"/storage/couchbase/","h":"#config","p":933},{"i":945,"t":"Default Config","u":"/storage/couchbase/","h":"#default-config","p":933},{"i":949,"t":"Table of Contents","u":"/storage/dynamodb/","h":"#table-of-contents","p":947},{"i":951,"t":"Signatures","u":"/storage/dynamodb/","h":"#signatures","p":947},{"i":953,"t":"Installation","u":"/storage/dynamodb/","h":"#installation","p":947},{"i":955,"t":"Examples","u":"/storage/dynamodb/","h":"#examples","p":947},{"i":957,"t":"Config","u":"/storage/dynamodb/","h":"#config","p":947},{"i":959,"t":"Default Config","u":"/storage/dynamodb/","h":"#default-config","p":947},{"i":963,"t":"Table of Contents","u":"/storage/etcd/","h":"#table-of-contents","p":961},{"i":965,"t":"Signatures","u":"/storage/etcd/","h":"#signatures","p":961},{"i":967,"t":"Installation","u":"/storage/etcd/","h":"#installation","p":961},{"i":969,"t":"Examples","u":"/storage/etcd/","h":"#examples","p":961},{"i":971,"t":"Config","u":"/storage/etcd/","h":"#config","p":961},{"i":973,"t":"Default Config","u":"/storage/etcd/","h":"#default-config","p":961},{"i":977,"t":"Table of Contents","u":"/storage/memcache/","h":"#table-of-contents","p":975},{"i":979,"t":"Signatures","u":"/storage/memcache/","h":"#signatures","p":975},{"i":981,"t":"Installation","u":"/storage/memcache/","h":"#installation","p":975},{"i":983,"t":"Examples","u":"/storage/memcache/","h":"#examples","p":975},{"i":985,"t":"Config","u":"/storage/memcache/","h":"#config","p":975},{"i":987,"t":"Default Config","u":"/storage/memcache/","h":"#default-config","p":975},{"i":991,"t":"Table of Contents","u":"/storage/memory/","h":"#table-of-contents","p":989},{"i":993,"t":"Signatures","u":"/storage/memory/","h":"#signatures","p":989},{"i":995,"t":"Installation","u":"/storage/memory/","h":"#installation","p":989},{"i":997,"t":"Examples","u":"/storage/memory/","h":"#examples","p":989},{"i":999,"t":"Config","u":"/storage/memory/","h":"#config","p":989},{"i":1001,"t":"Default Config","u":"/storage/memory/","h":"#default-config","p":989},{"i":1005,"t":"Table of Contents","u":"/storage/mongodb/","h":"#table-of-contents","p":1003},{"i":1007,"t":"Signatures","u":"/storage/mongodb/","h":"#signatures","p":1003},{"i":1009,"t":"Installation","u":"/storage/mongodb/","h":"#installation","p":1003},{"i":1011,"t":"Examples","u":"/storage/mongodb/","h":"#examples","p":1003},{"i":1013,"t":"Config","u":"/storage/mongodb/","h":"#config","p":1003},{"i":1015,"t":"Default Config","u":"/storage/mongodb/","h":"#default-config","p":1003},{"i":1019,"t":"Table of Contents","u":"/storage/mssql/","h":"#table-of-contents","p":1017},{"i":1021,"t":"Signatures","u":"/storage/mssql/","h":"#signatures","p":1017},{"i":1023,"t":"Installation","u":"/storage/mssql/","h":"#installation","p":1017},{"i":1025,"t":"Examples","u":"/storage/mssql/","h":"#examples","p":1017},{"i":1027,"t":"Config","u":"/storage/mssql/","h":"#config","p":1017},{"i":1029,"t":"Default Config","u":"/storage/mssql/","h":"#default-config","p":1017},{"i":1033,"t":"Table of Contents","u":"/storage/mysql/","h":"#table-of-contents","p":1031},{"i":1035,"t":"Signatures","u":"/storage/mysql/","h":"#signatures","p":1031},{"i":1037,"t":"Installation","u":"/storage/mysql/","h":"#installation","p":1031},{"i":1039,"t":"Examples","u":"/storage/mysql/","h":"#examples","p":1031},{"i":1041,"t":"Config","u":"/storage/mysql/","h":"#config","p":1031},{"i":1043,"t":"Default Config","u":"/storage/mysql/","h":"#default-config","p":1031},{"i":1047,"t":"Table of Contents","u":"/storage/pebble/","h":"#table-of-contents","p":1045},{"i":1049,"t":"Signatures","u":"/storage/pebble/","h":"#signatures","p":1045},{"i":1051,"t":"Installation","u":"/storage/pebble/","h":"#installation","p":1045},{"i":1053,"t":"Examples","u":"/storage/pebble/","h":"#examples","p":1045},{"i":1055,"t":"Config","u":"/storage/pebble/","h":"#config","p":1045},{"i":1057,"t":"Default Config","u":"/storage/pebble/","h":"#default-config","p":1045},{"i":1061,"t":"Table of Contents","u":"/storage/postgres/","h":"#table-of-contents","p":1059},{"i":1063,"t":"Signatures","u":"/storage/postgres/","h":"#signatures","p":1059},{"i":1065,"t":"Installation","u":"/storage/postgres/","h":"#installation","p":1059},{"i":1067,"t":"Examples","u":"/storage/postgres/","h":"#examples","p":1059},{"i":1069,"t":"Config","u":"/storage/postgres/","h":"#config","p":1059},{"i":1071,"t":"Default Config","u":"/storage/postgres/","h":"#default-config","p":1059},{"i":1075,"t":"Table of Contents","u":"/storage/redis/","h":"#table-of-contents","p":1073},{"i":1077,"t":"Signatures","u":"/storage/redis/","h":"#signatures","p":1073},{"i":1079,"t":"Installation","u":"/storage/redis/","h":"#installation","p":1073},{"i":1081,"t":"Examples","u":"/storage/redis/","h":"#examples","p":1073},{"i":1083,"t":"Config","u":"/storage/redis/","h":"#config","p":1073},{"i":1085,"t":"Default Config","u":"/storage/redis/","h":"#default-config","p":1073},{"i":1089,"t":"Table of Contents","u":"/storage/ristretto/","h":"#table-of-contents","p":1087},{"i":1091,"t":"Signatures","u":"/storage/ristretto/","h":"#signatures","p":1087},{"i":1093,"t":"Installation","u":"/storage/ristretto/","h":"#installation","p":1087},{"i":1095,"t":"Examples","u":"/storage/ristretto/","h":"#examples","p":1087},{"i":1097,"t":"Config","u":"/storage/ristretto/","h":"#config","p":1087},{"i":1099,"t":"Default Config","u":"/storage/ristretto/","h":"#default-config","p":1087},{"i":1103,"t":"Table of Contents","u":"/storage/s3/","h":"#table-of-contents","p":1101},{"i":1105,"t":"Signatures","u":"/storage/s3/","h":"#signatures","p":1101},{"i":1107,"t":"Installation","u":"/storage/s3/","h":"#installation","p":1101},{"i":1109,"t":"Examples","u":"/storage/s3/","h":"#examples","p":1101},{"i":1111,"t":"Config","u":"/storage/s3/","h":"#config","p":1101},{"i":1113,"t":"Default Config","u":"/storage/s3/","h":"#default-config","p":1101},{"i":1117,"t":"Table of Contents","u":"/storage/sqlite3/","h":"#table-of-contents","p":1115},{"i":1119,"t":"Signatures","u":"/storage/sqlite3/","h":"#signatures","p":1115},{"i":1121,"t":"Installation","u":"/storage/sqlite3/","h":"#installation","p":1115},{"i":1123,"t":"Examples","u":"/storage/sqlite3/","h":"#examples","p":1115},{"i":1125,"t":"Config","u":"/storage/sqlite3/","h":"#config","p":1115},{"i":1127,"t":"Default Config","u":"/storage/sqlite3/","h":"#default-config","p":1115},{"i":1131,"t":"Installation","u":"/template/","h":"#installation","p":1129},{"i":1133,"t":"Example","u":"/template/","h":"#example","p":1129},{"i":1135,"t":"More Examples","u":"/template/","h":"#more-examples","p":1129},{"i":1137,"t":"embedded Systems","u":"/template/","h":"#embedded-systems","p":1129},{"i":1139,"t":"Benchmarks","u":"/template/","h":"#benchmarks","p":1129},{"i":1143,"t":"Basic Example","u":"/template/ace/","h":"#basic-example","p":1141},{"i":1147,"t":"Basic Example","u":"/template/amber/","h":"#basic-example","p":1145},{"i":1151,"t":"Basic Example","u":"/template/django/","h":"#basic-example","p":1149},{"i":1153,"t":"Using embedded file system (1.16+ only)","u":"/template/django/","h":"#using-embedded-file-system-116-only","p":1149},{"i":1155,"t":"Register and use custom functions","u":"/template/django/","h":"#register-and-use-custom-functions","p":1149},{"i":1159,"t":"Basic Example","u":"/template/handlebars/","h":"#basic-example","p":1157},{"i":1163,"t":"Basic Example","u":"/template/html/","h":"#basic-example","p":1161},{"i":1165,"t":"Example with embed.FS","u":"/template/html/","h":"#example-with-embedfs","p":1161},{"i":1167,"t":"Example with innerHTML","u":"/template/html/","h":"#example-with-innerhtml","p":1161},{"i":1171,"t":"Table of Contents","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#table-of-contents","p":1169},{"i":1173,"t":"Parsing and Creating Templates","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#parsing-and-creating-templates","p":1169},{"i":1175,"t":"Executing Templates","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#executing-templates","p":1169},{"i":1177,"t":"Template Encoding and HTML","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-encoding-and-html","p":1169},{"i":1179,"t":"Template Variables","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-variables","p":1169},{"i":1181,"t":"Template Actions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-actions","p":1169},{"i":1183,"t":"Template Functions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-functions","p":1169},{"i":1185,"t":"Template Comparison Functions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-comparison-functions","p":1169},{"i":1187,"t":"Nested Templates and Layouts","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#nested-templates-and-layouts","p":1169},{"i":1189,"t":"Templates Calling Functions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#templates-calling-functions","p":1169},{"i":1193,"t":"Basic Example","u":"/template/jet/","h":"#basic-example","p":1191},{"i":1197,"t":"Basic Example","u":"/template/mustache/","h":"#basic-example","p":1195},{"i":1201,"t":"Basic Example","u":"/template/pug/","h":"#basic-example","p":1199},{"i":1205,"t":"Basic Example","u":"/template/slim/","h":"#basic-example","p":1203},{"i":1209,"t":"Installation","u":"/","h":"#installation","p":1207},{"i":1211,"t":"Zero Allocation","u":"/","h":"#zero-allocation","p":1207},{"i":1213,"t":"Hello, World!","u":"/","h":"#hello-world","p":1207},{"i":1215,"t":"Basic routing","u":"/","h":"#basic-routing","p":1207},{"i":1217,"t":"Static files","u":"/","h":"#static-files","p":1207},{"i":1219,"t":"Note","u":"/","h":"#note","p":1207},{"i":1222,"t":"Static","u":"/api/app","h":"#static","p":1221},{"i":1224,"t":"Route Handlers","u":"/api/app","h":"#route-handlers","p":1221},{"i":1226,"t":"Mount","u":"/api/app","h":"#mount","p":1221},{"i":1228,"t":"MountPath","u":"/api/app","h":"#mountpath","p":1221},{"i":1230,"t":"Group","u":"/api/app","h":"#group","p":1221},{"i":1232,"t":"Route","u":"/api/app","h":"#route","p":1221},{"i":1234,"t":"Server","u":"/api/app","h":"#server","p":1221},{"i":1236,"t":"Server Shutdown","u":"/api/app","h":"#server-shutdown","p":1221},{"i":1238,"t":"HandlersCount","u":"/api/app","h":"#handlerscount","p":1221},{"i":1240,"t":"Stack","u":"/api/app","h":"#stack","p":1221},{"i":1242,"t":"Name","u":"/api/app","h":"#name","p":1221},{"i":1244,"t":"GetRoute","u":"/api/app","h":"#getroute","p":1221},{"i":1246,"t":"GetRoutes","u":"/api/app","h":"#getroutes","p":1221},{"i":1248,"t":"Config","u":"/api/app","h":"#config","p":1221},{"i":1250,"t":"Handler","u":"/api/app","h":"#handler","p":1221},{"i":1252,"t":"Listen","u":"/api/app","h":"#listen","p":1221},{"i":1254,"t":"ListenTLS","u":"/api/app","h":"#listentls","p":1221},{"i":1256,"t":"ListenTLSWithCertificate","u":"/api/app","h":"#listentlswithcertificate","p":1221},{"i":1258,"t":"ListenMutualTLS","u":"/api/app","h":"#listenmutualtls","p":1221},{"i":1260,"t":"ListenMutualTLSWithCertificate","u":"/api/app","h":"#listenmutualtlswithcertificate","p":1221},{"i":1262,"t":"Listener","u":"/api/app","h":"#listener","p":1221},{"i":1264,"t":"Test","u":"/api/app","h":"#test","p":1221},{"i":1266,"t":"Hooks","u":"/api/app","h":"#hooks","p":1221},{"i":1269,"t":"Start request","u":"/api/client","h":"#start-request","p":1268},{"i":1271,"t":"✨ Agent","u":"/api/client","h":"#-agent","p":1268},{"i":1273,"t":"Parse","u":"/api/client","h":"#parse","p":1268},{"i":1275,"t":"Set","u":"/api/client","h":"#set","p":1268},{"i":1277,"t":"Add","u":"/api/client","h":"#add","p":1268},{"i":1279,"t":"ConnectionClose","u":"/api/client","h":"#connectionclose","p":1268},{"i":1281,"t":"UserAgent","u":"/api/client","h":"#useragent","p":1268},{"i":1283,"t":"Cookie","u":"/api/client","h":"#cookie","p":1268},{"i":1285,"t":"Referer","u":"/api/client","h":"#referer","p":1268},{"i":1287,"t":"ContentType","u":"/api/client","h":"#contenttype","p":1268},{"i":1289,"t":"Host","u":"/api/client","h":"#host","p":1268},{"i":1291,"t":"QueryString","u":"/api/client","h":"#querystring","p":1268},{"i":1293,"t":"BasicAuth","u":"/api/client","h":"#basicauth","p":1268},{"i":1295,"t":"Body","u":"/api/client","h":"#body","p":1268},{"i":1297,"t":"JSON","u":"/api/client","h":"#json","p":1268},{"i":1299,"t":"XML","u":"/api/client","h":"#xml","p":1268},{"i":1301,"t":"Form","u":"/api/client","h":"#form","p":1268},{"i":1303,"t":"MultipartForm","u":"/api/client","h":"#multipartform","p":1268},{"i":1305,"t":"Debug","u":"/api/client","h":"#debug","p":1268},{"i":1307,"t":"Timeout","u":"/api/client","h":"#timeout","p":1268},{"i":1309,"t":"Reuse","u":"/api/client","h":"#reuse","p":1268},{"i":1311,"t":"InsecureSkipVerify","u":"/api/client","h":"#insecureskipverify","p":1268},{"i":1313,"t":"TLSConfig","u":"/api/client","h":"#tlsconfig","p":1268},{"i":1315,"t":"MaxRedirectsCount","u":"/api/client","h":"#maxredirectscount","p":1268},{"i":1317,"t":"JSONEncoder","u":"/api/client","h":"#jsonencoder","p":1268},{"i":1319,"t":"JSONDecoder","u":"/api/client","h":"#jsondecoder","p":1268},{"i":1321,"t":"Request","u":"/api/client","h":"#request","p":1268},{"i":1323,"t":"SetResponse","u":"/api/client","h":"#setresponse","p":1268},{"i":1325,"t":"Dest","u":"/api/client","h":"#dest","p":1268},{"i":1327,"t":"Bytes","u":"/api/client","h":"#bytes","p":1268},{"i":1329,"t":"String","u":"/api/client","h":"#string","p":1268},{"i":1331,"t":"Struct","u":"/api/client","h":"#struct","p":1268},{"i":1333,"t":"RetryIf","u":"/api/client","h":"#retryif","p":1268},{"i":1338,"t":"New","u":"/api/fiber","h":"#new","p":1337},{"i":1340,"t":"Config","u":"/api/fiber","h":"#config","p":1337},{"i":1342,"t":"NewError","u":"/api/fiber","h":"#newerror","p":1337},{"i":1344,"t":"IsChild","u":"/api/fiber","h":"#ischild","p":1337},{"i":1348,"t":"Signatures","u":"/api/middleware/adaptor","h":"#signatures","p":1346},{"i":1350,"t":"Examples","u":"/api/middleware/adaptor","h":"#examples","p":1346},{"i":1351,"t":"net/http to Fiber","u":"/api/middleware/adaptor","h":"#nethttp-to-fiber","p":1346},{"i":1353,"t":"net/http middleware to Fiber","u":"/api/middleware/adaptor","h":"#nethttp-middleware-to-fiber","p":1346},{"i":1355,"t":"Fiber Handler to net/http","u":"/api/middleware/adaptor","h":"#fiber-handler-to-nethttp","p":1346},{"i":1357,"t":"Fiber App to net/http","u":"/api/middleware/adaptor","h":"#fiber-app-to-nethttp","p":1346},{"i":1359,"t":"Fiber Context to (net/http).Request","u":"/api/middleware/adaptor","h":"#fiber-context-to-nethttprequest","p":1346},{"i":1363,"t":"Signatures","u":"/api/middleware/basicauth","h":"#signatures","p":1361},{"i":1365,"t":"Examples","u":"/api/middleware/basicauth","h":"#examples","p":1361},{"i":1367,"t":"Config","u":"/api/middleware/basicauth","h":"#config","p":1361},{"i":1369,"t":"Default Config","u":"/api/middleware/basicauth","h":"#default-config","p":1361},{"i":1373,"t":"Signatures","u":"/api/middleware/cache","h":"#signatures","p":1371},{"i":1375,"t":"Examples","u":"/api/middleware/cache","h":"#examples","p":1371},{"i":1377,"t":"Config","u":"/api/middleware/cache","h":"#config","p":1371},{"i":1379,"t":"Default Config","u":"/api/middleware/cache","h":"#default-config","p":1371},{"i":1383,"t":"Signatures","u":"/api/middleware/compress","h":"#signatures","p":1381},{"i":1385,"t":"Examples","u":"/api/middleware/compress","h":"#examples","p":1381},{"i":1387,"t":"Config","u":"/api/middleware/compress","h":"#config","p":1381},{"i":1389,"t":"Default Config","u":"/api/middleware/compress","h":"#default-config","p":1381},{"i":1391,"t":"Constants","u":"/api/middleware/compress","h":"#constants","p":1381},{"i":1395,"t":"Signatures","u":"/api/middleware/cors","h":"#signatures","p":1393},{"i":1397,"t":"Examples","u":"/api/middleware/cors","h":"#examples","p":1393},{"i":1399,"t":"Config","u":"/api/middleware/cors","h":"#config","p":1393},{"i":1401,"t":"Default Config","u":"/api/middleware/cors","h":"#default-config","p":1393},{"i":1405,"t":"Signatures","u":"/api/middleware/csrf","h":"#signatures","p":1403},{"i":1407,"t":"Examples","u":"/api/middleware/csrf","h":"#examples","p":1403},{"i":1409,"t":"Config","u":"/api/middleware/csrf","h":"#config","p":1403},{"i":1411,"t":"Default Config","u":"/api/middleware/csrf","h":"#default-config","p":1403},{"i":1413,"t":"Constants","u":"/api/middleware/csrf","h":"#constants","p":1403},{"i":1415,"t":"Custom Storage/Database","u":"/api/middleware/csrf","h":"#custom-storagedatabase","p":1403},{"i":1419,"t":"Signatures","u":"/api/middleware/earlydata","h":"#signatures","p":1417},{"i":1421,"t":"Examples","u":"/api/middleware/earlydata","h":"#examples","p":1417},{"i":1423,"t":"Config","u":"/api/middleware/earlydata","h":"#config","p":1417},{"i":1425,"t":"Default Config","u":"/api/middleware/earlydata","h":"#default-config","p":1417},{"i":1427,"t":"Constants","u":"/api/middleware/earlydata","h":"#constants","p":1417},{"i":1431,"t":"Signatures","u":"/api/middleware/encryptcookie","h":"#signatures","p":1429},{"i":1433,"t":"Examples","u":"/api/middleware/encryptcookie","h":"#examples","p":1429},{"i":1435,"t":"Config","u":"/api/middleware/encryptcookie","h":"#config","p":1429},{"i":1437,"t":"Default Config","u":"/api/middleware/encryptcookie","h":"#default-config","p":1429},{"i":1439,"t":"Usage of CSRF and Encryptcookie Middlewares with Custom Cookie Names","u":"/api/middleware/encryptcookie","h":"#usage-of-csrf-and-encryptcookie-middlewares-with-custom-cookie-names","p":1429},{"i":1443,"t":"Signatures","u":"/api/middleware/envvar","h":"#signatures","p":1441},{"i":1445,"t":"Examples","u":"/api/middleware/envvar","h":"#examples","p":1441},{"i":1447,"t":"Response","u":"/api/middleware/envvar","h":"#response","p":1441},{"i":1449,"t":"Config","u":"/api/middleware/envvar","h":"#config","p":1441},{"i":1451,"t":"Default Config","u":"/api/middleware/envvar","h":"#default-config","p":1441},{"i":1455,"t":"Signatures","u":"/api/middleware/etag","h":"#signatures","p":1453},{"i":1457,"t":"Examples","u":"/api/middleware/etag","h":"#examples","p":1453},{"i":1459,"t":"Config","u":"/api/middleware/etag","h":"#config","p":1453},{"i":1461,"t":"Default Config","u":"/api/middleware/etag","h":"#default-config","p":1453},{"i":1465,"t":"Signatures","u":"/api/middleware/expvar","h":"#signatures","p":1463},{"i":1467,"t":"Examples","u":"/api/middleware/expvar","h":"#examples","p":1463},{"i":1469,"t":"Config","u":"/api/middleware/expvar","h":"#config","p":1463},{"i":1471,"t":"Default Config","u":"/api/middleware/expvar","h":"#default-config","p":1463},{"i":1475,"t":"Signatures","u":"/api/middleware/favicon","h":"#signatures","p":1473},{"i":1477,"t":"Examples","u":"/api/middleware/favicon","h":"#examples","p":1473},{"i":1479,"t":"Config","u":"/api/middleware/favicon","h":"#config","p":1473},{"i":1481,"t":"Default Config","u":"/api/middleware/favicon","h":"#default-config","p":1473},{"i":1485,"t":"Signatures","u":"/api/middleware/filesystem","h":"#signatures","p":1483},{"i":1487,"t":"Examples","u":"/api/middleware/filesystem","h":"#examples","p":1483},{"i":1489,"t":"embed","u":"/api/middleware/filesystem","h":"#embed","p":1483},{"i":1491,"t":"pkger","u":"/api/middleware/filesystem","h":"#pkger","p":1483},{"i":1493,"t":"packr","u":"/api/middleware/filesystem","h":"#packr","p":1483},{"i":1495,"t":"go.rice","u":"/api/middleware/filesystem","h":"#gorice","p":1483},{"i":1497,"t":"fileb0x","u":"/api/middleware/filesystem","h":"#fileb0x","p":1483},{"i":1499,"t":"statik","u":"/api/middleware/filesystem","h":"#statik","p":1483},{"i":1501,"t":"Config","u":"/api/middleware/filesystem","h":"#config","p":1483},{"i":1503,"t":"Default Config","u":"/api/middleware/filesystem","h":"#default-config","p":1483},{"i":1507,"t":"Signatures","u":"/api/middleware/helmet","h":"#signatures","p":1505},{"i":1509,"t":"Examples","u":"/api/middleware/helmet","h":"#examples","p":1505},{"i":1511,"t":"Config","u":"/api/middleware/helmet","h":"#config","p":1505},{"i":1513,"t":"Default Config","u":"/api/middleware/helmet","h":"#default-config","p":1505},{"i":1517,"t":"Signatures","u":"/api/middleware/idempotency","h":"#signatures","p":1515},{"i":1519,"t":"Examples","u":"/api/middleware/idempotency","h":"#examples","p":1515},{"i":1521,"t":"Default Config","u":"/api/middleware/idempotency","h":"#default-config","p":1515},{"i":1523,"t":"Custom Config","u":"/api/middleware/idempotency","h":"#custom-config","p":1515},{"i":1525,"t":"Config","u":"/api/middleware/idempotency","h":"#config","p":1515},{"i":1527,"t":"Default Config","u":"/api/middleware/idempotency","h":"#default-config-1","p":1515},{"i":1531,"t":"Signatures","u":"/api/middleware/keyauth","h":"#signatures","p":1529},{"i":1533,"t":"Examples","u":"/api/middleware/keyauth","h":"#examples","p":1529},{"i":1535,"t":"Authenticate only certain endpoints","u":"/api/middleware/keyauth","h":"#authenticate-only-certain-endpoints","p":1529},{"i":1537,"t":"Specifying middleware in the handler","u":"/api/middleware/keyauth","h":"#specifying-middleware-in-the-handler","p":1529},{"i":1539,"t":"Config","u":"/api/middleware/keyauth","h":"#config","p":1529},{"i":1541,"t":"Default Config","u":"/api/middleware/keyauth","h":"#default-config","p":1529},{"i":1545,"t":"Signatures","u":"/api/middleware/limiter","h":"#signatures","p":1543},{"i":1547,"t":"Examples","u":"/api/middleware/limiter","h":"#examples","p":1543},{"i":1549,"t":"Sliding window","u":"/api/middleware/limiter","h":"#sliding-window","p":1543},{"i":1551,"t":"Config","u":"/api/middleware/limiter","h":"#config","p":1543},{"i":1553,"t":"Default Config","u":"/api/middleware/limiter","h":"#default-config","p":1543},{"i":1555,"t":"Custom Storage/Database","u":"/api/middleware/limiter","h":"#custom-storagedatabase","p":1543},{"i":1559,"t":"Signatures","u":"/api/middleware/logger","h":"#signatures","p":1557},{"i":1561,"t":"Examples","u":"/api/middleware/logger","h":"#examples","p":1557},{"i":1563,"t":"Config","u":"/api/middleware/logger","h":"#config","p":1557},{"i":1565,"t":"Default Config","u":"/api/middleware/logger","h":"#default-config","p":1557},{"i":1567,"t":"Constants","u":"/api/middleware/logger","h":"#constants","p":1557},{"i":1571,"t":"Signatures","u":"/api/middleware/monitor","h":"#signatures","p":1569},{"i":1573,"t":"Examples","u":"/api/middleware/monitor","h":"#examples","p":1569},{"i":1575,"t":"Config","u":"/api/middleware/monitor","h":"#config","p":1569},{"i":1577,"t":"Default Config","u":"/api/middleware/monitor","h":"#default-config","p":1569},{"i":1581,"t":"Signatures","u":"/api/middleware/pprof","h":"#signatures","p":1579},{"i":1583,"t":"Examples","u":"/api/middleware/pprof","h":"#examples","p":1579},{"i":1585,"t":"Config","u":"/api/middleware/pprof","h":"#config","p":1579},{"i":1587,"t":"Default Config","u":"/api/middleware/pprof","h":"#default-config","p":1579},{"i":1591,"t":"Signatures","u":"/api/middleware/proxy","h":"#signatures","p":1589},{"i":1593,"t":"Examples","u":"/api/middleware/proxy","h":"#examples","p":1589},{"i":1595,"t":"Config","u":"/api/middleware/proxy","h":"#config","p":1589},{"i":1597,"t":"Default Config","u":"/api/middleware/proxy","h":"#default-config","p":1589},{"i":1601,"t":"Signatures","u":"/api/middleware/recover","h":"#signatures","p":1599},{"i":1603,"t":"Examples","u":"/api/middleware/recover","h":"#examples","p":1599},{"i":1605,"t":"Config","u":"/api/middleware/recover","h":"#config","p":1599},{"i":1607,"t":"Default Config","u":"/api/middleware/recover","h":"#default-config","p":1599},{"i":1611,"t":"Signatures","u":"/api/middleware/redirect","h":"#signatures","p":1609},{"i":1613,"t":"Examples","u":"/api/middleware/redirect","h":"#examples","p":1609},{"i":1615,"t":"Config","u":"/api/middleware/redirect","h":"#config","p":1609},{"i":1617,"t":"Default Config","u":"/api/middleware/redirect","h":"#default-config","p":1609},{"i":1621,"t":"Signatures","u":"/api/middleware/requestid","h":"#signatures","p":1619},{"i":1623,"t":"Examples","u":"/api/middleware/requestid","h":"#examples","p":1619},{"i":1625,"t":"Config","u":"/api/middleware/requestid","h":"#config","p":1619},{"i":1627,"t":"Default Config","u":"/api/middleware/requestid","h":"#default-config","p":1619},{"i":1631,"t":"Signatures","u":"/api/middleware/rewrite","h":"#signatures","p":1629},{"i":1633,"t":"Examples","u":"/api/middleware/rewrite","h":"#examples","p":1629},{"i":1637,"t":"Signatures","u":"/api/middleware/session","h":"#signatures","p":1635},{"i":1639,"t":"Examples","u":"/api/middleware/session","h":"#examples","p":1635},{"i":1641,"t":"Config","u":"/api/middleware/session","h":"#config","p":1635},{"i":1643,"t":"Default Config","u":"/api/middleware/session","h":"#default-config","p":1635},{"i":1645,"t":"Constants","u":"/api/middleware/session","h":"#constants","p":1635},{"i":1647,"t":"Custom Storage/Database","u":"/api/middleware/session","h":"#custom-storagedatabase","p":1635},{"i":1651,"t":"Signatures","u":"/api/middleware/skip","h":"#signatures","p":1649},{"i":1653,"t":"Examples","u":"/api/middleware/skip","h":"#examples","p":1649},{"i":1657,"t":"Signatures","u":"/api/middleware/timeout","h":"#signatures","p":1655},{"i":1659,"t":"Examples","u":"/api/middleware/timeout","h":"#examples","p":1655},{"i":1662,"t":"TechEmpower","u":"/extra/benchmarks","h":"#techempower","p":1661},{"i":1664,"t":"Plaintext","u":"/extra/benchmarks","h":"#plaintext","p":1661},{"i":1666,"t":"Data Updates","u":"/extra/benchmarks","h":"#data-updates","p":1661},{"i":1668,"t":"Multiple Queries","u":"/extra/benchmarks","h":"#multiple-queries","p":1661},{"i":1670,"t":"Single Query","u":"/extra/benchmarks","h":"#single-query","p":1661},{"i":1672,"t":"JSON Serialization","u":"/extra/benchmarks","h":"#json-serialization","p":1661},{"i":1674,"t":"Go web framework benchmark","u":"/extra/benchmarks","h":"#go-web-framework-benchmark","p":1661},{"i":1677,"t":"How should I structure my application?","u":"/extra/faq","h":"#how-should-i-structure-my-application","p":1676},{"i":1679,"t":"How do I handle custom 404 responses?","u":"/extra/faq","h":"#how-do-i-handle-custom-404-responses","p":1676},{"i":1681,"t":"How can i use live reload ?","u":"/extra/faq","h":"#how-can-i-use-live-reload-","p":1676},{"i":1683,"t":"How do I set up an error handler?","u":"/extra/faq","h":"#how-do-i-set-up-an-error-handler","p":1676},{"i":1685,"t":"Which template engines does Fiber support?","u":"/extra/faq","h":"#which-template-engines-does-fiber-support","p":1676},{"i":1687,"t":"Does Fiber have a community chat?","u":"/extra/faq","h":"#does-fiber-have-a-community-chat","p":1676},{"i":1689,"t":"Does fiber support sub domain routing ?","u":"/extra/faq","h":"#does-fiber-support-sub-domain-routing-","p":1676},{"i":1692,"t":"Catching Errors","u":"/guide/error-handling","h":"#catching-errors","p":1691},{"i":1694,"t":"Default Error Handler","u":"/guide/error-handling","h":"#default-error-handler","p":1691},{"i":1696,"t":"Custom Error Handler","u":"/guide/error-handling","h":"#custom-error-handler","p":1691},{"i":1699,"t":"Custom JSON Encoder/Decoder","u":"/guide/faster-fiber","h":"#custom-json-encoderdecoder","p":1698},{"i":1701,"t":"References","u":"/guide/faster-fiber","h":"#references","p":1698},{"i":1705,"t":"Paths","u":"/guide/grouping","h":"#paths","p":1703},{"i":1707,"t":"Group Handlers","u":"/guide/grouping","h":"#group-handlers","p":1703},{"i":1711,"t":"Constants","u":"/guide/hooks","h":"#constants","p":1709},{"i":1713,"t":"OnRoute","u":"/guide/hooks","h":"#onroute","p":1709},{"i":1715,"t":"OnName","u":"/guide/hooks","h":"#onname","p":1709},{"i":1717,"t":"OnGroup","u":"/guide/hooks","h":"#ongroup","p":1709},{"i":1719,"t":"OnGroupName","u":"/guide/hooks","h":"#ongroupname","p":1709},{"i":1721,"t":"OnListen","u":"/guide/hooks","h":"#onlisten","p":1709},{"i":1723,"t":"OnFork","u":"/guide/hooks","h":"#onfork","p":1709},{"i":1725,"t":"OnShutdown","u":"/guide/hooks","h":"#onshutdown","p":1709},{"i":1727,"t":"OnMount","u":"/guide/hooks","h":"#onmount","p":1709},{"i":1730,"t":"Handlers","u":"/guide/routing","h":"#handlers","p":1729},{"i":1732,"t":"Paths","u":"/guide/routing","h":"#paths","p":1729},{"i":1734,"t":"Parameters","u":"/guide/routing","h":"#parameters","p":1729},{"i":1736,"t":"Constraints","u":"/guide/routing","h":"#constraints","p":1729},{"i":1738,"t":"Middleware","u":"/guide/routing","h":"#middleware","p":1729},{"i":1740,"t":"Grouping","u":"/guide/routing","h":"#grouping","p":1729},{"i":1743,"t":"Template interfaces","u":"/guide/templates","h":"#template-interfaces","p":1742},{"i":1745,"t":"Engines","u":"/guide/templates","h":"#engines","p":1742},{"i":1748,"t":"Validator package","u":"/guide/validation","h":"#validator-package","p":1747},{"i":1753,"t":"Accepts","u":"/api/ctx","h":"#accepts","p":1752},{"i":1755,"t":"AllParams","u":"/api/ctx","h":"#allparams","p":1752},{"i":1757,"t":"App","u":"/api/ctx","h":"#app","p":1752},{"i":1759,"t":"Append","u":"/api/ctx","h":"#append","p":1752},{"i":1761,"t":"Attachment","u":"/api/ctx","h":"#attachment","p":1752},{"i":1763,"t":"BaseURL","u":"/api/ctx","h":"#baseurl","p":1752},{"i":1765,"t":"Bind","u":"/api/ctx","h":"#bind","p":1752},{"i":1767,"t":"Body","u":"/api/ctx","h":"#body","p":1752},{"i":1769,"t":"BodyParser","u":"/api/ctx","h":"#bodyparser","p":1752},{"i":1771,"t":"ClearCookie","u":"/api/ctx","h":"#clearcookie","p":1752},{"i":1773,"t":"ClientHelloInfo","u":"/api/ctx","h":"#clienthelloinfo","p":1752},{"i":1775,"t":"Context","u":"/api/ctx","h":"#context","p":1752},{"i":1777,"t":"Cookie","u":"/api/ctx","h":"#cookie","p":1752},{"i":1779,"t":"Cookies","u":"/api/ctx","h":"#cookies","p":1752},{"i":1781,"t":"Download","u":"/api/ctx","h":"#download","p":1752},{"i":1783,"t":"Format","u":"/api/ctx","h":"#format","p":1752},{"i":1785,"t":"FormFile","u":"/api/ctx","h":"#formfile","p":1752},{"i":1787,"t":"FormValue","u":"/api/ctx","h":"#formvalue","p":1752},{"i":1789,"t":"Fresh","u":"/api/ctx","h":"#fresh","p":1752},{"i":1791,"t":"Get","u":"/api/ctx","h":"#get","p":1752},{"i":1793,"t":"GetReqHeaders","u":"/api/ctx","h":"#getreqheaders","p":1752},{"i":1795,"t":"GetRespHeader","u":"/api/ctx","h":"#getrespheader","p":1752},{"i":1797,"t":"GetRespHeaders","u":"/api/ctx","h":"#getrespheaders","p":1752},{"i":1799,"t":"GetRouteURL","u":"/api/ctx","h":"#getrouteurl","p":1752},{"i":1801,"t":"Hostname","u":"/api/ctx","h":"#hostname","p":1752},{"i":1803,"t":"IP","u":"/api/ctx","h":"#ip","p":1752},{"i":1805,"t":"IPs","u":"/api/ctx","h":"#ips","p":1752},{"i":1807,"t":"Is","u":"/api/ctx","h":"#is","p":1752},{"i":1809,"t":"IsFromLocal","u":"/api/ctx","h":"#isfromlocal","p":1752},{"i":1811,"t":"JSON","u":"/api/ctx","h":"#json","p":1752},{"i":1813,"t":"JSONP","u":"/api/ctx","h":"#jsonp","p":1752},{"i":1815,"t":"Links","u":"/api/ctx","h":"#links","p":1752},{"i":1817,"t":"Locals","u":"/api/ctx","h":"#locals","p":1752},{"i":1819,"t":"Location","u":"/api/ctx","h":"#location","p":1752},{"i":1821,"t":"Method","u":"/api/ctx","h":"#method","p":1752},{"i":1823,"t":"MultipartForm","u":"/api/ctx","h":"#multipartform","p":1752},{"i":1825,"t":"Next","u":"/api/ctx","h":"#next","p":1752},{"i":1827,"t":"OriginalURL","u":"/api/ctx","h":"#originalurl","p":1752},{"i":1829,"t":"Params","u":"/api/ctx","h":"#params","p":1752},{"i":1831,"t":"ParamsInt","u":"/api/ctx","h":"#paramsint","p":1752},{"i":1833,"t":"ParamsParser","u":"/api/ctx","h":"#paramsparser","p":1752},{"i":1835,"t":"Path","u":"/api/ctx","h":"#path","p":1752},{"i":1837,"t":"Protocol","u":"/api/ctx","h":"#protocol","p":1752},{"i":1839,"t":"Queries","u":"/api/ctx","h":"#queries","p":1752},{"i":1841,"t":"Query","u":"/api/ctx","h":"#query","p":1752},{"i":1843,"t":"QueryBool","u":"/api/ctx","h":"#querybool","p":1752},{"i":1845,"t":"QueryFloat","u":"/api/ctx","h":"#queryfloat","p":1752},{"i":1847,"t":"QueryInt","u":"/api/ctx","h":"#queryint","p":1752},{"i":1849,"t":"QueryParser","u":"/api/ctx","h":"#queryparser","p":1752},{"i":1851,"t":"Range","u":"/api/ctx","h":"#range","p":1752},{"i":1853,"t":"Redirect","u":"/api/ctx","h":"#redirect","p":1752},{"i":1855,"t":"RedirectToRoute","u":"/api/ctx","h":"#redirecttoroute","p":1752},{"i":1857,"t":"RedirectBack","u":"/api/ctx","h":"#redirectback","p":1752},{"i":1859,"t":"Render","u":"/api/ctx","h":"#render","p":1752},{"i":1861,"t":"Request","u":"/api/ctx","h":"#request","p":1752},{"i":1863,"t":"ReqHeaderParser","u":"/api/ctx","h":"#reqheaderparser","p":1752},{"i":1865,"t":"Response","u":"/api/ctx","h":"#response","p":1752},{"i":1867,"t":"RestartRouting","u":"/api/ctx","h":"#restartrouting","p":1752},{"i":1869,"t":"Route","u":"/api/ctx","h":"#route","p":1752},{"i":1871,"t":"SaveFile","u":"/api/ctx","h":"#savefile","p":1752},{"i":1873,"t":"SaveFileToStorage","u":"/api/ctx","h":"#savefiletostorage","p":1752},{"i":1875,"t":"Secure","u":"/api/ctx","h":"#secure","p":1752},{"i":1877,"t":"Send","u":"/api/ctx","h":"#send","p":1752},{"i":1879,"t":"SendFile","u":"/api/ctx","h":"#sendfile","p":1752},{"i":1881,"t":"SendStatus","u":"/api/ctx","h":"#sendstatus","p":1752},{"i":1883,"t":"Set","u":"/api/ctx","h":"#set","p":1752},{"i":1885,"t":"SetParserDecoder","u":"/api/ctx","h":"#setparserdecoder","p":1752},{"i":1887,"t":"SetUserContext","u":"/api/ctx","h":"#setusercontext","p":1752},{"i":1889,"t":"Stale","u":"/api/ctx","h":"#stale","p":1752},{"i":1891,"t":"Status","u":"/api/ctx","h":"#status","p":1752},{"i":1893,"t":"Subdomains","u":"/api/ctx","h":"#subdomains","p":1752},{"i":1895,"t":"Type","u":"/api/ctx","h":"#type","p":1752},{"i":1897,"t":"UserContext","u":"/api/ctx","h":"#usercontext","p":1752},{"i":1899,"t":"Vary","u":"/api/ctx","h":"#vary","p":1752},{"i":1901,"t":"Write","u":"/api/ctx","h":"#write","p":1752},{"i":1903,"t":"Writef","u":"/api/ctx","h":"#writef","p":1752},{"i":1905,"t":"WriteString","u":"/api/ctx","h":"#writestring","p":1752},{"i":1907,"t":"XHR","u":"/api/ctx","h":"#xhr","p":1752},{"i":1909,"t":"XML","u":"/api/ctx","h":"#xml","p":1752}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/722",[0,6.557]],["t/724",[1,2.935,2,2.935,3,3.577]],["t/728",[4,3.138]],["t/730",[5,2.462]],["t/732",[6,1.835]],["t/734",[7,2.249]],["t/736",[8,6.557]],["t/738",[9,6.557]],["t/740",[10,6.557]],["t/744",[4,3.138]],["t/746",[5,2.462]],["t/748",[6,1.835]],["t/750",[7,2.249]],["t/754",[4,3.138]],["t/756",[5,2.462]],["t/758",[6,1.835]],["t/760",[11,4.91]],["t/762",[11,2.093,12,2.796,13,2.551,14,2.796,15,2.551]],["t/766",[4,3.138]],["t/768",[5,2.462]],["t/770",[6,1.835]],["t/772",[11,4.91]],["t/774",[16,3.264,17,2.79,18,3.264,19,3.264]],["t/778",[4,3.138]],["t/780",[5,2.462]],["t/782",[6,1.835]],["t/784",[7,2.249]],["t/788",[4,3.138]],["t/790",[5,2.462]],["t/792",[6,1.835]],["t/794",[7,2.249]],["t/798",[4,3.138]],["t/800",[5,2.462]],["t/802",[6,1.835]],["t/804",[7,1.683,20,4.477]],["t/806",[20,4.477,21,3.983]],["t/808",[7,1.683,22,4.477]],["t/810",[21,3.983,22,4.477]],["t/812",[21,3.182,23,3.92,24,3.182]],["t/814",[7,1.345,25,2.552,26,3.92]],["t/818",[4,3.138]],["t/820",[5,2.462]],["t/822",[6,1.835]],["t/824",[27,5.983]],["t/826",[11,4.91]],["t/830",[4,3.138]],["t/832",[5,2.462]],["t/834",[6,1.835]],["t/836",[11,4.91]],["t/838",[7,2.249]],["t/844",[4,3.138]],["t/846",[5,2.462]],["t/848",[6,1.835]],["t/850",[28,6.557]],["t/854",[29,2.709,30,2.709]],["t/856",[5,2.462]],["t/858",[7,2.249]],["t/860",[6,1.373,31,2.039]],["t/862",[6,1.373,25,3.195]],["t/866",[4,3.138]],["t/868",[7,2.249]],["t/870",[2,2.935,32,3.577,33,3.92]],["t/873",[1,3.674,34,4.477]],["t/875",[1,2.935,3,3.577,34,3.577]],["t/879",[29,2.709,30,2.709]],["t/881",[5,2.462]],["t/883",[4,3.138]],["t/885",[7,2.249]],["t/887",[6,1.835]],["t/889",[6,1.373,31,2.039]],["t/893",[29,2.709,30,2.709]],["t/895",[5,2.462]],["t/897",[4,3.138]],["t/899",[7,2.249]],["t/901",[6,1.835]],["t/903",[6,1.373,31,2.039]],["t/907",[29,2.709,30,2.709]],["t/909",[5,2.462]],["t/911",[4,3.138]],["t/913",[7,2.249]],["t/915",[6,1.835]],["t/917",[6,1.373,31,2.039]],["t/921",[29,2.709,30,2.709]],["t/923",[5,2.462]],["t/925",[4,3.138]],["t/927",[7,2.249]],["t/929",[6,1.835]],["t/931",[6,1.373,31,2.039]],["t/935",[29,2.709,30,2.709]],["t/937",[5,2.462]],["t/939",[4,3.138]],["t/941",[7,2.249]],["t/943",[6,1.835]],["t/945",[6,1.373,31,2.039]],["t/949",[29,2.709,30,2.709]],["t/951",[5,2.462]],["t/953",[4,3.138]],["t/955",[7,2.249]],["t/957",[6,1.835]],["t/959",[6,1.373,31,2.039]],["t/963",[29,2.709,30,2.709]],["t/965",[5,2.462]],["t/967",[4,3.138]],["t/969",[7,2.249]],["t/971",[6,1.835]],["t/973",[6,1.373,31,2.039]],["t/977",[29,2.709,30,2.709]],["t/979",[5,2.462]],["t/981",[4,3.138]],["t/983",[7,2.249]],["t/985",[6,1.835]],["t/987",[6,1.373,31,2.039]],["t/991",[29,2.709,30,2.709]],["t/993",[5,2.462]],["t/995",[4,3.138]],["t/997",[7,2.249]],["t/999",[6,1.835]],["t/1001",[6,1.373,31,2.039]],["t/1005",[29,2.709,30,2.709]],["t/1007",[5,2.462]],["t/1009",[4,3.138]],["t/1011",[7,2.249]],["t/1013",[6,1.835]],["t/1015",[6,1.373,31,2.039]],["t/1019",[29,2.709,30,2.709]],["t/1021",[5,2.462]],["t/1023",[4,3.138]],["t/1025",[7,2.249]],["t/1027",[6,1.835]],["t/1029",[6,1.373,31,2.039]],["t/1033",[29,2.709,30,2.709]],["t/1035",[5,2.462]],["t/1037",[4,3.138]],["t/1039",[7,2.249]],["t/1041",[6,1.835]],["t/1043",[6,1.373,31,2.039]],["t/1047",[29,2.709,30,2.709]],["t/1049",[5,2.462]],["t/1051",[4,3.138]],["t/1053",[7,2.249]],["t/1055",[6,1.835]],["t/1057",[6,1.373,31,2.039]],["t/1061",[29,2.709,30,2.709]],["t/1063",[5,2.462]],["t/1065",[4,3.138]],["t/1067",[7,2.249]],["t/1069",[6,1.835]],["t/1071",[6,1.373,31,2.039]],["t/1075",[29,2.709,30,2.709]],["t/1077",[5,2.462]],["t/1079",[4,3.138]],["t/1081",[7,2.249]],["t/1083",[6,1.835]],["t/1085",[6,1.373,31,2.039]],["t/1089",[29,2.709,30,2.709]],["t/1091",[5,2.462]],["t/1093",[4,3.138]],["t/1095",[7,2.249]],["t/1097",[6,1.835]],["t/1099",[6,1.373,31,2.039]],["t/1103",[29,2.709,30,2.709]],["t/1105",[5,2.462]],["t/1107",[4,3.138]],["t/1109",[7,2.249]],["t/1111",[6,1.835]],["t/1113",[6,1.373,31,2.039]],["t/1117",[29,2.709,30,2.709]],["t/1119",[5,2.462]],["t/1121",[4,3.138]],["t/1123",[7,2.249]],["t/1125",[6,1.835]],["t/1127",[6,1.373,31,2.039]],["t/1131",[4,3.138]],["t/1133",[7,2.249]],["t/1135",[7,1.683,35,4.907]],["t/1137",[36,4.477,37,4.477]],["t/1139",[38,5.983]],["t/1143",[7,1.683,39,3.271]],["t/1147",[7,1.683,39,3.271]],["t/1151",[7,1.683,39,3.271]],["t/1153",[36,2.551,37,2.551,40,2.39,41,2.551,42,2.796]],["t/1155",[25,2.125,40,2.79,43,3.264,44,2.65]],["t/1159",[7,1.683,39,3.271]],["t/1163",[7,1.683,39,3.271]],["t/1165",[7,1.683,45,4.907]],["t/1167",[7,1.683,46,4.907]],["t/1171",[29,2.709,30,2.709]],["t/1173",[47,3.577,48,3.92,49,2.552]],["t/1175",[49,3.195,50,4.907]],["t/1177",[49,2.552,51,3.92,52,3.92]],["t/1179",[49,3.195,53,4.907]],["t/1181",[49,3.195,54,4.907]],["t/1183",[44,3.983,49,3.195]],["t/1185",[44,3.182,49,2.552,55,3.92]],["t/1187",[49,2.552,56,3.92,57,3.92]],["t/1189",[44,3.182,49,2.552,58,3.92]],["t/1193",[7,1.683,39,3.271]],["t/1197",[7,1.683,39,3.271]],["t/1201",[7,1.683,39,3.271]],["t/1205",[7,1.683,39,3.271]],["t/1209",[4,3.138]],["t/1211",[59,4.907,60,4.907]],["t/1213",[61,4.907,62,4.907]],["t/1215",[39,3.271,63,3.815]],["t/1217",[41,4.477,64,4.477]],["t/1219",[32,5.983]],["t/1222",[64,5.983]],["t/1224",[63,3.815,65,3.355]],["t/1226",[66,6.557]],["t/1228",[67,6.557]],["t/1230",[68,5.606]],["t/1232",[63,5.098]],["t/1234",[69,5.983]],["t/1236",[69,4.477,70,4.907]],["t/1238",[71,6.557]],["t/1240",[72,6.557]],["t/1242",[73,5.983]],["t/1244",[74,5.983]],["t/1246",[74,5.983]],["t/1248",[6,1.835]],["t/1250",[65,4.484]],["t/1252",[75,5.983]],["t/1254",[76,6.557]],["t/1256",[77,6.557]],["t/1258",[78,6.557]],["t/1260",[79,6.557]],["t/1262",[75,5.983]],["t/1264",[21,5.323]],["t/1266",[80,6.557]],["t/1269",[81,4.907,82,4.195]],["t/1271",[1,3.674,83,4.907]],["t/1273",[47,5.983]],["t/1275",[24,5.323]],["t/1277",[84,6.557]],["t/1279",[85,6.557]],["t/1281",[86,6.557]],["t/1283",[87,5.323]],["t/1285",[88,5.983]],["t/1287",[89,6.557]],["t/1289",[90,6.557]],["t/1291",[91,6.557]],["t/1293",[92,6.557]],["t/1295",[93,5.983]],["t/1297",[94,5.323]],["t/1299",[95,5.983]],["t/1301",[96,6.557]],["t/1303",[97,5.983]],["t/1305",[98,6.557]],["t/1307",[99,6.557]],["t/1309",[100,6.557]],["t/1311",[101,6.557]],["t/1313",[102,6.557]],["t/1315",[103,6.557]],["t/1317",[104,6.557]],["t/1319",[105,6.557]],["t/1321",[82,5.606]],["t/1323",[106,6.557]],["t/1325",[107,6.557]],["t/1327",[108,6.557]],["t/1329",[109,6.557]],["t/1331",[110,6.557]],["t/1333",[111,6.557]],["t/1338",[13,5.983]],["t/1340",[6,1.835]],["t/1342",[112,6.557]],["t/1344",[113,6.557]],["t/1348",[5,2.462]],["t/1350",[7,2.249]],["t/1351",[114,3.983,115,3.449]],["t/1353",[2,2.935,114,3.182,115,2.755]],["t/1355",[65,2.681,114,3.182,115,2.755]],["t/1357",[114,3.182,115,2.755,116,3.577]],["t/1359",[17,3.351,115,2.755,117,3.92]],["t/1363",[5,2.462]],["t/1365",[7,2.249]],["t/1367",[6,1.835]],["t/1369",[6,1.373,31,2.039]],["t/1373",[5,2.462]],["t/1375",[7,2.249]],["t/1377",[6,1.835]],["t/1379",[6,1.373,31,2.039]],["t/1383",[5,2.462]],["t/1385",[7,2.249]],["t/1387",[6,1.835]],["t/1389",[6,1.373,31,2.039]],["t/1391",[118,4.91]],["t/1395",[5,2.462]],["t/1397",[7,2.249]],["t/1399",[6,1.835]],["t/1401",[6,1.373,31,2.039]],["t/1405",[5,2.462]],["t/1407",[7,2.249]],["t/1409",[6,1.835]],["t/1411",[6,1.373,31,2.039]],["t/1413",[118,4.91]],["t/1415",[25,3.195,119,4.195]],["t/1419",[5,2.462]],["t/1421",[7,2.249]],["t/1423",[6,1.835]],["t/1425",[6,1.373,31,2.039]],["t/1427",[118,4.91]],["t/1431",[5,2.462]],["t/1433",[7,2.249]],["t/1435",[6,1.835]],["t/1437",[6,1.373,31,2.039]],["t/1439",[2,1.627,11,1.627,25,1.415,73,1.982,87,1.764,120,2.172,121,2.172]],["t/1443",[5,2.462]],["t/1445",[7,2.249]],["t/1447",[122,5.606]],["t/1449",[6,1.835]],["t/1451",[6,1.373,31,2.039]],["t/1455",[5,2.462]],["t/1457",[7,2.249]],["t/1459",[6,1.835]],["t/1461",[6,1.373,31,2.039]],["t/1465",[5,2.462]],["t/1467",[7,2.249]],["t/1469",[6,1.835]],["t/1471",[6,1.373,31,2.039]],["t/1475",[5,2.462]],["t/1477",[7,2.249]],["t/1479",[6,1.835]],["t/1481",[6,1.373,31,2.039]],["t/1485",[5,2.462]],["t/1487",[7,2.249]],["t/1489",[123,6.557]],["t/1491",[124,6.557]],["t/1493",[125,6.557]],["t/1495",[126,6.557]],["t/1497",[127,6.557]],["t/1499",[128,6.557]],["t/1501",[6,1.835]],["t/1503",[6,1.373,31,2.039]],["t/1507",[5,2.462]],["t/1509",[7,2.249]],["t/1511",[6,1.835]],["t/1513",[6,1.373,31,2.039]],["t/1517",[5,2.462]],["t/1519",[7,2.249]],["t/1521",[6,1.373,31,2.039]],["t/1523",[6,1.373,25,3.195]],["t/1525",[6,1.835]],["t/1527",[6,1.373,31,2.039]],["t/1531",[5,2.462]],["t/1533",[7,2.249]],["t/1535",[129,3.92,130,3.92,131,3.92]],["t/1537",[2,2.935,65,2.681,132,3.92]],["t/1539",[6,1.835]],["t/1541",[6,1.373,31,2.039]],["t/1545",[5,2.462]],["t/1547",[7,2.249]],["t/1549",[133,4.907,134,4.907]],["t/1551",[6,1.835]],["t/1553",[6,1.373,31,2.039]],["t/1555",[25,3.195,119,4.195]],["t/1559",[5,2.462]],["t/1561",[7,2.249]],["t/1563",[6,1.835]],["t/1565",[6,1.373,31,2.039]],["t/1567",[118,4.91]],["t/1571",[5,2.462]],["t/1573",[7,2.249]],["t/1575",[6,1.835]],["t/1577",[6,1.373,31,2.039]],["t/1581",[5,2.462]],["t/1583",[7,2.249]],["t/1585",[6,1.835]],["t/1587",[6,1.373,31,2.039]],["t/1591",[5,2.462]],["t/1593",[7,2.249]],["t/1595",[6,1.835]],["t/1597",[6,1.373,31,2.039]],["t/1601",[5,2.462]],["t/1603",[7,2.249]],["t/1605",[6,1.835]],["t/1607",[6,1.373,31,2.039]],["t/1611",[5,2.462]],["t/1613",[7,2.249]],["t/1615",[6,1.835]],["t/1617",[6,1.373,31,2.039]],["t/1621",[5,2.462]],["t/1623",[7,2.249]],["t/1625",[6,1.835]],["t/1627",[6,1.373,31,2.039]],["t/1631",[5,2.462]],["t/1633",[7,2.249]],["t/1637",[5,2.462]],["t/1639",[7,2.249]],["t/1641",[6,1.835]],["t/1643",[6,1.373,31,2.039]],["t/1645",[118,4.91]],["t/1647",[25,3.195,119,4.195]],["t/1651",[5,2.462]],["t/1653",[7,2.249]],["t/1657",[5,2.462]],["t/1659",[7,2.249]],["t/1662",[135,6.557]],["t/1664",[136,6.557]],["t/1666",[137,4.907,138,4.907]],["t/1668",[139,4.907,140,3.983]],["t/1670",[140,3.983,141,4.907]],["t/1672",[94,3.983,142,4.907]],["t/1674",[38,2.978,143,3.264,144,3.264,145,3.264]],["t/1677",[15,4.477,146,4.907]],["t/1679",[25,2.125,122,2.79,147,3.264,148,3.264]],["t/1681",[1,2.444,40,2.79,149,3.264,150,3.264]],["t/1683",[24,2.65,65,2.232,151,3.264,152,2.65]],["t/1685",[49,2.125,115,2.294,153,2.978,154,2.978]],["t/1687",[115,2.755,155,3.92,156,3.92]],["t/1689",[1,1.831,63,1.901,115,1.719,154,2.231,157,2.445,158,2.445]],["t/1692",[152,3.983,159,4.907]],["t/1694",[31,1.629,65,2.681,152,3.182]],["t/1696",[25,2.552,65,2.681,152,3.182]],["t/1699",[25,2.552,94,3.182,160,3.92]],["t/1701",[88,5.983]],["t/1705",[161,5.606]],["t/1707",[65,3.355,68,4.195]],["t/1711",[118,4.91]],["t/1713",[162,6.557]],["t/1715",[163,6.557]],["t/1717",[164,6.557]],["t/1719",[165,6.557]],["t/1721",[166,6.557]],["t/1723",[167,6.557]],["t/1725",[168,6.557]],["t/1727",[169,6.557]],["t/1730",[65,4.484]],["t/1732",[161,5.606]],["t/1734",[170,6.557]],["t/1736",[171,6.557]],["t/1738",[2,4.91]],["t/1740",[68,5.606]],["t/1743",[49,3.195,172,4.907]],["t/1745",[153,5.983]],["t/1748",[173,4.907,174,4.907]],["t/1753",[175,6.557]],["t/1755",[176,6.557]],["t/1757",[116,5.983]],["t/1759",[177,6.557]],["t/1761",[178,6.557]],["t/1763",[179,6.557]],["t/1765",[180,6.557]],["t/1767",[93,5.983]],["t/1769",[181,6.557]],["t/1771",[182,6.557]],["t/1773",[183,6.557]],["t/1775",[17,5.606]],["t/1777",[87,5.323]],["t/1779",[87,5.323]],["t/1781",[184,6.557]],["t/1783",[185,6.557]],["t/1785",[186,6.557]],["t/1787",[187,6.557]],["t/1789",[188,6.557]],["t/1791",[]],["t/1793",[189,6.557]],["t/1795",[190,5.983]],["t/1797",[190,5.983]],["t/1799",[191,6.557]],["t/1801",[192,6.557]],["t/1803",[193,5.983]],["t/1805",[193,5.983]],["t/1807",[]],["t/1809",[194,6.557]],["t/1811",[94,5.323]],["t/1813",[195,6.557]],["t/1815",[196,6.557]],["t/1817",[197,6.557]],["t/1819",[198,6.557]],["t/1821",[199,6.557]],["t/1823",[97,5.983]],["t/1825",[200,6.557]],["t/1827",[201,6.557]],["t/1829",[202,6.557]],["t/1831",[203,6.557]],["t/1833",[204,6.557]],["t/1835",[161,5.606]],["t/1837",[205,6.557]],["t/1839",[140,5.323]],["t/1841",[140,5.323]],["t/1843",[206,6.557]],["t/1845",[207,6.557]],["t/1847",[208,6.557]],["t/1849",[209,6.557]],["t/1851",[210,6.557]],["t/1853",[211,6.557]],["t/1855",[212,6.557]],["t/1857",[213,6.557]],["t/1859",[214,6.557]],["t/1861",[82,5.606]],["t/1863",[215,6.557]],["t/1865",[122,5.606]],["t/1867",[216,6.557]],["t/1869",[63,5.098]],["t/1871",[217,6.557]],["t/1873",[218,6.557]],["t/1875",[219,6.557]],["t/1877",[220,6.557]],["t/1879",[221,6.557]],["t/1881",[222,6.557]],["t/1883",[24,5.323]],["t/1885",[223,6.557]],["t/1887",[224,6.557]],["t/1889",[225,6.557]],["t/1891",[226,6.557]],["t/1893",[227,6.557]],["t/1895",[27,5.983]],["t/1897",[228,6.557]],["t/1899",[229,6.557]],["t/1901",[230,6.557]],["t/1903",[231,6.557]],["t/1905",[232,6.557]],["t/1907",[233,6.557]],["t/1909",[95,5.983]]],"invertedIndex":[["",{"_index":1,"t":{"724":{"position":[[0,2]]},"873":{"position":[[0,2]]},"875":{"position":[[0,2]]},"1271":{"position":[[0,1]]},"1681":{"position":[[26,1]]},"1689":{"position":[[38,1]]}}}],["1.16",{"_index":42,"t":{"1153":{"position":[[27,6]]}}}],["404",{"_index":148,"t":{"1679":{"position":[[23,3]]}}}],["accept",{"_index":175,"t":{"1753":{"position":[[0,7]]}}}],["access",{"_index":16,"t":{"774":{"position":[[0,9]]}}}],["action",{"_index":54,"t":{"1181":{"position":[[9,7]]}}}],["add",{"_index":84,"t":{"1277":{"position":[[0,3]]}}}],["agent",{"_index":83,"t":{"1271":{"position":[[2,5]]}}}],["alloc",{"_index":60,"t":{"1211":{"position":[[5,10]]}}}],["allparam",{"_index":176,"t":{"1755":{"position":[[0,9]]}}}],["app",{"_index":116,"t":{"1357":{"position":[[6,3]]},"1757":{"position":[[0,3]]}}}],["append",{"_index":177,"t":{"1759":{"position":[[0,6]]}}}],["applic",{"_index":15,"t":{"762":{"position":[[30,11]]},"1677":{"position":[[26,12]]}}}],["attach",{"_index":178,"t":{"1761":{"position":[[0,10]]}}}],["authent",{"_index":129,"t":{"1535":{"position":[[0,12]]}}}],["baseurl",{"_index":179,"t":{"1763":{"position":[[0,7]]}}}],["basic",{"_index":39,"t":{"1143":{"position":[[0,5]]},"1147":{"position":[[0,5]]},"1151":{"position":[[0,5]]},"1159":{"position":[[0,5]]},"1163":{"position":[[0,5]]},"1193":{"position":[[0,5]]},"1197":{"position":[[0,5]]},"1201":{"position":[[0,5]]},"1205":{"position":[[0,5]]},"1215":{"position":[[0,5]]}}}],["basicauth",{"_index":92,"t":{"1293":{"position":[[0,9]]}}}],["beforesend",{"_index":18,"t":{"774":{"position":[[21,10]]}}}],["benchmark",{"_index":38,"t":{"1139":{"position":[[0,10]]},"1674":{"position":[[17,9]]}}}],["bind",{"_index":180,"t":{"1765":{"position":[[0,4]]}}}],["bodi",{"_index":93,"t":{"1295":{"position":[[0,4]]},"1767":{"position":[[0,4]]}}}],["bodypars",{"_index":181,"t":{"1769":{"position":[[0,10]]}}}],["byte",{"_index":108,"t":{"1327":{"position":[[0,5]]}}}],["cach",{"_index":33,"t":{"870":{"position":[[10,5]]}}}],["call",{"_index":58,"t":{"1189":{"position":[[10,7]]}}}],["callback",{"_index":19,"t":{"774":{"position":[[32,8]]}}}],["catch",{"_index":159,"t":{"1692":{"position":[[0,8]]}}}],["certain",{"_index":130,"t":{"1535":{"position":[[18,7]]}}}],["chat",{"_index":156,"t":{"1687":{"position":[[28,5]]}}}],["clearcooki",{"_index":182,"t":{"1771":{"position":[[0,11]]}}}],["clienthelloinfo",{"_index":183,"t":{"1773":{"position":[[0,15]]}}}],["commun",{"_index":155,"t":{"1687":{"position":[[18,9]]}}}],["comparison",{"_index":55,"t":{"1185":{"position":[[9,10]]}}}],["config",{"_index":6,"t":{"732":{"position":[[0,6]]},"748":{"position":[[0,6]]},"758":{"position":[[0,6]]},"770":{"position":[[0,6]]},"782":{"position":[[0,6]]},"792":{"position":[[0,6]]},"802":{"position":[[0,6]]},"822":{"position":[[0,6]]},"834":{"position":[[0,6]]},"848":{"position":[[0,6]]},"860":{"position":[[8,6]]},"862":{"position":[[7,6]]},"887":{"position":[[0,6]]},"889":{"position":[[8,6]]},"901":{"position":[[0,6]]},"903":{"position":[[8,6]]},"915":{"position":[[0,6]]},"917":{"position":[[8,6]]},"929":{"position":[[0,6]]},"931":{"position":[[8,6]]},"943":{"position":[[0,6]]},"945":{"position":[[8,6]]},"957":{"position":[[0,6]]},"959":{"position":[[8,6]]},"971":{"position":[[0,6]]},"973":{"position":[[8,6]]},"985":{"position":[[0,6]]},"987":{"position":[[8,6]]},"999":{"position":[[0,6]]},"1001":{"position":[[8,6]]},"1013":{"position":[[0,6]]},"1015":{"position":[[8,6]]},"1027":{"position":[[0,6]]},"1029":{"position":[[8,6]]},"1041":{"position":[[0,6]]},"1043":{"position":[[8,6]]},"1055":{"position":[[0,6]]},"1057":{"position":[[8,6]]},"1069":{"position":[[0,6]]},"1071":{"position":[[8,6]]},"1083":{"position":[[0,6]]},"1085":{"position":[[8,6]]},"1097":{"position":[[0,6]]},"1099":{"position":[[8,6]]},"1111":{"position":[[0,6]]},"1113":{"position":[[8,6]]},"1125":{"position":[[0,6]]},"1127":{"position":[[8,6]]},"1248":{"position":[[0,6]]},"1340":{"position":[[0,6]]},"1367":{"position":[[0,6]]},"1369":{"position":[[8,6]]},"1377":{"position":[[0,6]]},"1379":{"position":[[8,6]]},"1387":{"position":[[0,6]]},"1389":{"position":[[8,6]]},"1399":{"position":[[0,6]]},"1401":{"position":[[8,6]]},"1409":{"position":[[0,6]]},"1411":{"position":[[8,6]]},"1423":{"position":[[0,6]]},"1425":{"position":[[8,6]]},"1435":{"position":[[0,6]]},"1437":{"position":[[8,6]]},"1449":{"position":[[0,6]]},"1451":{"position":[[8,6]]},"1459":{"position":[[0,6]]},"1461":{"position":[[8,6]]},"1469":{"position":[[0,6]]},"1471":{"position":[[8,6]]},"1479":{"position":[[0,6]]},"1481":{"position":[[8,6]]},"1501":{"position":[[0,6]]},"1503":{"position":[[8,6]]},"1511":{"position":[[0,6]]},"1513":{"position":[[8,6]]},"1521":{"position":[[8,6]]},"1523":{"position":[[7,6]]},"1525":{"position":[[0,6]]},"1527":{"position":[[8,6]]},"1539":{"position":[[0,6]]},"1541":{"position":[[8,6]]},"1551":{"position":[[0,6]]},"1553":{"position":[[8,6]]},"1563":{"position":[[0,6]]},"1565":{"position":[[8,6]]},"1575":{"position":[[0,6]]},"1577":{"position":[[8,6]]},"1585":{"position":[[0,6]]},"1587":{"position":[[8,6]]},"1595":{"position":[[0,6]]},"1597":{"position":[[8,6]]},"1605":{"position":[[0,6]]},"1607":{"position":[[8,6]]},"1615":{"position":[[0,6]]},"1617":{"position":[[8,6]]},"1625":{"position":[[0,6]]},"1627":{"position":[[8,6]]},"1641":{"position":[[0,6]]},"1643":{"position":[[8,6]]}}}],["connectionclos",{"_index":85,"t":{"1279":{"position":[[0,15]]}}}],["constant",{"_index":118,"t":{"1391":{"position":[[0,9]]},"1413":{"position":[[0,9]]},"1427":{"position":[[0,9]]},"1567":{"position":[[0,9]]},"1645":{"position":[[0,9]]},"1711":{"position":[[0,9]]}}}],["constraint",{"_index":171,"t":{"1736":{"position":[[0,11]]}}}],["content",{"_index":30,"t":{"854":{"position":[[9,8]]},"879":{"position":[[9,8]]},"893":{"position":[[9,8]]},"907":{"position":[[9,8]]},"921":{"position":[[9,8]]},"935":{"position":[[9,8]]},"949":{"position":[[9,8]]},"963":{"position":[[9,8]]},"977":{"position":[[9,8]]},"991":{"position":[[9,8]]},"1005":{"position":[[9,8]]},"1019":{"position":[[9,8]]},"1033":{"position":[[9,8]]},"1047":{"position":[[9,8]]},"1061":{"position":[[9,8]]},"1075":{"position":[[9,8]]},"1089":{"position":[[9,8]]},"1103":{"position":[[9,8]]},"1117":{"position":[[9,8]]},"1171":{"position":[[9,8]]}}}],["contenttyp",{"_index":89,"t":{"1287":{"position":[[0,11]]}}}],["context",{"_index":17,"t":{"774":{"position":[[10,7]]},"1359":{"position":[[6,7]]},"1775":{"position":[[0,7]]}}}],["contrib",{"_index":0,"t":{"722":{"position":[[0,7]]}}}],["cooki",{"_index":87,"t":{"1283":{"position":[[0,6]]},"1439":{"position":[[56,6]]},"1777":{"position":[[0,6]]},"1779":{"position":[[0,7]]}}}],["creat",{"_index":48,"t":{"1173":{"position":[[12,8]]}}}],["csrf",{"_index":120,"t":{"1439":{"position":[[9,4]]}}}],["custom",{"_index":25,"t":{"814":{"position":[[0,6]]},"862":{"position":[[0,6]]},"1155":{"position":[[17,6]]},"1415":{"position":[[0,6]]},"1439":{"position":[[49,6]]},"1523":{"position":[[0,6]]},"1555":{"position":[[0,6]]},"1647":{"position":[[0,6]]},"1679":{"position":[[16,6]]},"1696":{"position":[[0,6]]},"1699":{"position":[[0,6]]}}}],["custompermiss",{"_index":8,"t":{"736":{"position":[[0,16]]}}}],["data",{"_index":137,"t":{"1666":{"position":[[0,4]]}}}],["debug",{"_index":98,"t":{"1305":{"position":[[0,5]]}}}],["default",{"_index":31,"t":{"860":{"position":[[0,7]]},"889":{"position":[[0,7]]},"903":{"position":[[0,7]]},"917":{"position":[[0,7]]},"931":{"position":[[0,7]]},"945":{"position":[[0,7]]},"959":{"position":[[0,7]]},"973":{"position":[[0,7]]},"987":{"position":[[0,7]]},"1001":{"position":[[0,7]]},"1015":{"position":[[0,7]]},"1029":{"position":[[0,7]]},"1043":{"position":[[0,7]]},"1057":{"position":[[0,7]]},"1071":{"position":[[0,7]]},"1085":{"position":[[0,7]]},"1099":{"position":[[0,7]]},"1113":{"position":[[0,7]]},"1127":{"position":[[0,7]]},"1369":{"position":[[0,7]]},"1379":{"position":[[0,7]]},"1389":{"position":[[0,7]]},"1401":{"position":[[0,7]]},"1411":{"position":[[0,7]]},"1425":{"position":[[0,7]]},"1437":{"position":[[0,7]]},"1451":{"position":[[0,7]]},"1461":{"position":[[0,7]]},"1471":{"position":[[0,7]]},"1481":{"position":[[0,7]]},"1503":{"position":[[0,7]]},"1513":{"position":[[0,7]]},"1521":{"position":[[0,7]]},"1527":{"position":[[0,7]]},"1541":{"position":[[0,7]]},"1553":{"position":[[0,7]]},"1565":{"position":[[0,7]]},"1577":{"position":[[0,7]]},"1587":{"position":[[0,7]]},"1597":{"position":[[0,7]]},"1607":{"position":[[0,7]]},"1617":{"position":[[0,7]]},"1627":{"position":[[0,7]]},"1643":{"position":[[0,7]]},"1694":{"position":[[0,7]]}}}],["dest",{"_index":107,"t":{"1325":{"position":[[0,4]]}}}],["domain",{"_index":158,"t":{"1689":{"position":[[23,6]]}}}],["download",{"_index":184,"t":{"1781":{"position":[[0,8]]}}}],["emb",{"_index":123,"t":{"1489":{"position":[[0,5]]}}}],["embed",{"_index":36,"t":{"1137":{"position":[[0,8]]},"1153":{"position":[[6,8]]}}}],["embed.f",{"_index":45,"t":{"1165":{"position":[[13,8]]}}}],["encod",{"_index":51,"t":{"1177":{"position":[[9,8]]}}}],["encoder/decod",{"_index":160,"t":{"1699":{"position":[[12,15]]}}}],["encryptcooki",{"_index":121,"t":{"1439":{"position":[[18,13]]}}}],["endpoint",{"_index":131,"t":{"1535":{"position":[[26,9]]}}}],["engin",{"_index":153,"t":{"1685":{"position":[[15,7]]},"1745":{"position":[[0,7]]}}}],["error",{"_index":152,"t":{"1683":{"position":[[19,5]]},"1692":{"position":[[9,6]]},"1694":{"position":[[8,5]]},"1696":{"position":[[7,5]]}}}],["exampl",{"_index":7,"t":{"734":{"position":[[0,8]]},"750":{"position":[[0,7]]},"784":{"position":[[0,7]]},"794":{"position":[[0,7]]},"804":{"position":[[6,7]]},"808":{"position":[[6,7]]},"814":{"position":[[15,7]]},"838":{"position":[[0,7]]},"858":{"position":[[0,8]]},"868":{"position":[[0,7]]},"885":{"position":[[0,8]]},"899":{"position":[[0,8]]},"913":{"position":[[0,8]]},"927":{"position":[[0,8]]},"941":{"position":[[0,8]]},"955":{"position":[[0,8]]},"969":{"position":[[0,8]]},"983":{"position":[[0,8]]},"997":{"position":[[0,8]]},"1011":{"position":[[0,8]]},"1025":{"position":[[0,8]]},"1039":{"position":[[0,8]]},"1053":{"position":[[0,8]]},"1067":{"position":[[0,8]]},"1081":{"position":[[0,8]]},"1095":{"position":[[0,8]]},"1109":{"position":[[0,8]]},"1123":{"position":[[0,8]]},"1133":{"position":[[0,7]]},"1135":{"position":[[5,8]]},"1143":{"position":[[6,7]]},"1147":{"position":[[6,7]]},"1151":{"position":[[6,7]]},"1159":{"position":[[6,7]]},"1163":{"position":[[6,7]]},"1165":{"position":[[0,7]]},"1167":{"position":[[0,7]]},"1193":{"position":[[6,7]]},"1197":{"position":[[6,7]]},"1201":{"position":[[6,7]]},"1205":{"position":[[6,7]]},"1350":{"position":[[0,8]]},"1365":{"position":[[0,8]]},"1375":{"position":[[0,8]]},"1385":{"position":[[0,8]]},"1397":{"position":[[0,8]]},"1407":{"position":[[0,8]]},"1421":{"position":[[0,8]]},"1433":{"position":[[0,8]]},"1445":{"position":[[0,8]]},"1457":{"position":[[0,8]]},"1467":{"position":[[0,8]]},"1477":{"position":[[0,8]]},"1487":{"position":[[0,8]]},"1509":{"position":[[0,8]]},"1519":{"position":[[0,8]]},"1533":{"position":[[0,8]]},"1547":{"position":[[0,8]]},"1561":{"position":[[0,8]]},"1573":{"position":[[0,8]]},"1583":{"position":[[0,8]]},"1593":{"position":[[0,8]]},"1603":{"position":[[0,8]]},"1613":{"position":[[0,8]]},"1623":{"position":[[0,8]]},"1633":{"position":[[0,8]]},"1639":{"position":[[0,8]]},"1653":{"position":[[0,8]]},"1659":{"position":[[0,8]]}}}],["execut",{"_index":50,"t":{"1175":{"position":[[0,9]]}}}],["exist",{"_index":12,"t":{"762":{"position":[[11,8]]}}}],["fiber",{"_index":115,"t":{"1351":{"position":[[12,5]]},"1353":{"position":[[23,5]]},"1355":{"position":[[0,5]]},"1357":{"position":[[0,5]]},"1359":{"position":[[0,5]]},"1685":{"position":[[28,5]]},"1687":{"position":[[5,5]]},"1689":{"position":[[5,5]]}}}],["file",{"_index":41,"t":{"1153":{"position":[[15,4]]},"1217":{"position":[[7,5]]}}}],["fileb0x",{"_index":127,"t":{"1497":{"position":[[0,7]]}}}],["form",{"_index":96,"t":{"1301":{"position":[[0,4]]}}}],["format",{"_index":185,"t":{"1783":{"position":[[0,6]]}}}],["formfil",{"_index":186,"t":{"1785":{"position":[[0,8]]}}}],["formvalu",{"_index":187,"t":{"1787":{"position":[[0,9]]}}}],["framework",{"_index":145,"t":{"1674":{"position":[[7,9]]}}}],["fresh",{"_index":188,"t":{"1789":{"position":[[0,5]]}}}],["function",{"_index":44,"t":{"1155":{"position":[[24,9]]},"1183":{"position":[[9,9]]},"1185":{"position":[[20,9]]},"1189":{"position":[[18,9]]}}}],["getreqhead",{"_index":189,"t":{"1793":{"position":[[0,13]]}}}],["getresphead",{"_index":190,"t":{"1795":{"position":[[0,13]]},"1797":{"position":[[0,14]]}}}],["getrout",{"_index":74,"t":{"1244":{"position":[[0,8]]},"1246":{"position":[[0,9]]}}}],["getrouteurl",{"_index":191,"t":{"1799":{"position":[[0,11]]}}}],["go",{"_index":143,"t":{"1674":{"position":[[0,2]]}}}],["go.ric",{"_index":126,"t":{"1495":{"position":[[0,7]]}}}],["group",{"_index":68,"t":{"1230":{"position":[[0,5]]},"1707":{"position":[[0,5]]},"1740":{"position":[[0,8]]}}}],["handl",{"_index":147,"t":{"1679":{"position":[[9,6]]}}}],["handler",{"_index":65,"t":{"1224":{"position":[[6,8]]},"1250":{"position":[[0,7]]},"1355":{"position":[[6,7]]},"1537":{"position":[[29,7]]},"1683":{"position":[[25,8]]},"1694":{"position":[[14,7]]},"1696":{"position":[[13,7]]},"1707":{"position":[[6,8]]},"1730":{"position":[[0,8]]}}}],["handlerscount",{"_index":71,"t":{"1238":{"position":[[0,13]]}}}],["hello",{"_index":61,"t":{"1213":{"position":[[0,6]]}}}],["hook",{"_index":80,"t":{"1266":{"position":[[0,5]]}}}],["host",{"_index":90,"t":{"1289":{"position":[[0,4]]}}}],["hostnam",{"_index":192,"t":{"1801":{"position":[[0,8]]}}}],["hs256",{"_index":20,"t":{"804":{"position":[[0,5]]},"806":{"position":[[0,5]]}}}],["html",{"_index":52,"t":{"1177":{"position":[[22,4]]}}}],["implement",{"_index":3,"t":{"724":{"position":[[14,15]]},"875":{"position":[[11,15]]}}}],["innerhtml",{"_index":46,"t":{"1167":{"position":[[13,9]]}}}],["insecureskipverifi",{"_index":101,"t":{"1311":{"position":[[0,18]]}}}],["instal",{"_index":4,"t":{"728":{"position":[[0,7]]},"744":{"position":[[0,7]]},"754":{"position":[[0,7]]},"766":{"position":[[0,7]]},"778":{"position":[[0,7]]},"788":{"position":[[0,7]]},"798":{"position":[[0,7]]},"818":{"position":[[0,7]]},"830":{"position":[[0,7]]},"844":{"position":[[0,7]]},"866":{"position":[[0,7]]},"883":{"position":[[0,12]]},"897":{"position":[[0,12]]},"911":{"position":[[0,12]]},"925":{"position":[[0,12]]},"939":{"position":[[0,12]]},"953":{"position":[[0,12]]},"967":{"position":[[0,12]]},"981":{"position":[[0,12]]},"995":{"position":[[0,12]]},"1009":{"position":[[0,12]]},"1023":{"position":[[0,12]]},"1037":{"position":[[0,12]]},"1051":{"position":[[0,12]]},"1065":{"position":[[0,12]]},"1079":{"position":[[0,12]]},"1093":{"position":[[0,12]]},"1107":{"position":[[0,12]]},"1121":{"position":[[0,12]]},"1131":{"position":[[0,12]]},"1209":{"position":[[0,12]]}}}],["instruct",{"_index":28,"t":{"850":{"position":[[0,12]]}}}],["interfac",{"_index":172,"t":{"1743":{"position":[[9,10]]}}}],["ip",{"_index":193,"t":{"1803":{"position":[[0,2]]},"1805":{"position":[[0,3]]}}}],["ischild",{"_index":113,"t":{"1344":{"position":[[0,7]]}}}],["isfromloc",{"_index":194,"t":{"1809":{"position":[[0,11]]}}}],["json",{"_index":94,"t":{"1297":{"position":[[0,4]]},"1672":{"position":[[0,4]]},"1699":{"position":[[7,4]]},"1811":{"position":[[0,4]]}}}],["jsondecod",{"_index":105,"t":{"1319":{"position":[[0,11]]}}}],["jsonencod",{"_index":104,"t":{"1317":{"position":[[0,11]]}}}],["jsonp",{"_index":195,"t":{"1813":{"position":[[0,5]]}}}],["jwk",{"_index":23,"t":{"812":{"position":[[0,3]]}}}],["keyfunc",{"_index":26,"t":{"814":{"position":[[7,7]]}}}],["layout",{"_index":57,"t":{"1187":{"position":[[21,7]]}}}],["link",{"_index":196,"t":{"1815":{"position":[[0,5]]}}}],["listen",{"_index":75,"t":{"1252":{"position":[[0,6]]},"1262":{"position":[[0,8]]}}}],["listenmutualtl",{"_index":78,"t":{"1258":{"position":[[0,15]]}}}],["listenmutualtlswithcertif",{"_index":79,"t":{"1260":{"position":[[0,30]]}}}],["listentl",{"_index":76,"t":{"1254":{"position":[[0,9]]}}}],["listentlswithcertif",{"_index":77,"t":{"1256":{"position":[[0,24]]}}}],["live",{"_index":149,"t":{"1681":{"position":[[14,4]]}}}],["local",{"_index":197,"t":{"1817":{"position":[[0,6]]}}}],["locat",{"_index":198,"t":{"1819":{"position":[[0,8]]}}}],["maxredirectscount",{"_index":103,"t":{"1315":{"position":[[0,17]]}}}],["method",{"_index":199,"t":{"1821":{"position":[[0,6]]}}}],["middlewar",{"_index":2,"t":{"724":{"position":[[3,10]]},"870":{"position":[[16,10]]},"1353":{"position":[[9,10]]},"1439":{"position":[[32,11]]},"1537":{"position":[[11,10]]},"1738":{"position":[[0,10]]}}}],["more",{"_index":35,"t":{"1135":{"position":[[0,4]]}}}],["mount",{"_index":66,"t":{"1226":{"position":[[0,5]]}}}],["mountpath",{"_index":67,"t":{"1228":{"position":[[0,9]]}}}],["multipartform",{"_index":97,"t":{"1303":{"position":[[0,13]]},"1823":{"position":[[0,13]]}}}],["multipl",{"_index":139,"t":{"1668":{"position":[[0,8]]}}}],["name",{"_index":73,"t":{"1242":{"position":[[0,4]]},"1439":{"position":[[63,5]]}}}],["nest",{"_index":56,"t":{"1187":{"position":[[0,6]]}}}],["net/http",{"_index":114,"t":{"1351":{"position":[[0,8]]},"1353":{"position":[[0,8]]},"1355":{"position":[[17,8]]},"1357":{"position":[[13,8]]}}}],["net/http).request",{"_index":117,"t":{"1359":{"position":[[17,18]]}}}],["new",{"_index":13,"t":{"762":{"position":[[20,3]]},"1338":{"position":[[0,3]]}}}],["newerror",{"_index":112,"t":{"1342":{"position":[[0,8]]}}}],["next",{"_index":200,"t":{"1825":{"position":[[0,4]]}}}],["note",{"_index":32,"t":{"870":{"position":[[0,4]]},"1219":{"position":[[0,4]]}}}],["onfork",{"_index":167,"t":{"1723":{"position":[[0,6]]}}}],["ongroup",{"_index":164,"t":{"1717":{"position":[[0,7]]}}}],["ongroupnam",{"_index":165,"t":{"1719":{"position":[[0,11]]}}}],["onlisten",{"_index":166,"t":{"1721":{"position":[[0,8]]}}}],["onmount",{"_index":169,"t":{"1727":{"position":[[0,7]]}}}],["onnam",{"_index":163,"t":{"1715":{"position":[[0,6]]}}}],["onrout",{"_index":162,"t":{"1713":{"position":[[0,7]]}}}],["onshutdown",{"_index":168,"t":{"1725":{"position":[[0,10]]}}}],["originalurl",{"_index":201,"t":{"1827":{"position":[[0,11]]}}}],["packag",{"_index":174,"t":{"1748":{"position":[[10,7]]}}}],["packr",{"_index":125,"t":{"1493":{"position":[[0,5]]}}}],["param",{"_index":202,"t":{"1829":{"position":[[0,6]]}}}],["paramet",{"_index":170,"t":{"1734":{"position":[[0,10]]}}}],["paramsint",{"_index":203,"t":{"1831":{"position":[[0,9]]}}}],["paramspars",{"_index":204,"t":{"1833":{"position":[[0,12]]}}}],["pars",{"_index":47,"t":{"1173":{"position":[[0,7]]},"1273":{"position":[[0,5]]}}}],["path",{"_index":161,"t":{"1705":{"position":[[0,5]]},"1732":{"position":[[0,5]]},"1835":{"position":[[0,4]]}}}],["pkger",{"_index":124,"t":{"1491":{"position":[[0,5]]}}}],["plaintext",{"_index":136,"t":{"1664":{"position":[[0,9]]}}}],["protocol",{"_index":205,"t":{"1837":{"position":[[0,8]]}}}],["queri",{"_index":140,"t":{"1668":{"position":[[9,7]]},"1670":{"position":[[7,5]]},"1839":{"position":[[0,7]]},"1841":{"position":[[0,5]]}}}],["querybool",{"_index":206,"t":{"1843":{"position":[[0,9]]}}}],["queryfloat",{"_index":207,"t":{"1845":{"position":[[0,10]]}}}],["queryint",{"_index":208,"t":{"1847":{"position":[[0,8]]}}}],["querypars",{"_index":209,"t":{"1849":{"position":[[0,11]]}}}],["querystr",{"_index":91,"t":{"1291":{"position":[[0,11]]}}}],["rang",{"_index":210,"t":{"1851":{"position":[[0,5]]}}}],["redirect",{"_index":211,"t":{"1853":{"position":[[0,8]]}}}],["redirectback",{"_index":213,"t":{"1857":{"position":[[0,12]]}}}],["redirecttorout",{"_index":212,"t":{"1855":{"position":[[0,15]]}}}],["refer",{"_index":88,"t":{"1285":{"position":[[0,7]]},"1701":{"position":[[0,10]]}}}],["regist",{"_index":43,"t":{"1155":{"position":[[0,8]]}}}],["relic",{"_index":14,"t":{"762":{"position":[[24,5]]}}}],["reload",{"_index":150,"t":{"1681":{"position":[[19,6]]}}}],["render",{"_index":214,"t":{"1859":{"position":[[0,6]]}}}],["reqheaderpars",{"_index":215,"t":{"1863":{"position":[[0,15]]}}}],["request",{"_index":82,"t":{"1269":{"position":[[6,7]]},"1321":{"position":[[0,7]]},"1861":{"position":[[0,7]]}}}],["respons",{"_index":122,"t":{"1447":{"position":[[0,8]]},"1679":{"position":[[27,10]]},"1865":{"position":[[0,8]]}}}],["restartrout",{"_index":216,"t":{"1867":{"position":[[0,14]]}}}],["retryif",{"_index":111,"t":{"1333":{"position":[[0,7]]}}}],["reus",{"_index":100,"t":{"1309":{"position":[[0,5]]}}}],["roleauthor",{"_index":10,"t":{"740":{"position":[[0,17]]}}}],["rout",{"_index":63,"t":{"1215":{"position":[[6,7]]},"1224":{"position":[[0,5]]},"1232":{"position":[[0,5]]},"1689":{"position":[[30,7]]},"1869":{"position":[[0,5]]}}}],["routepermiss",{"_index":9,"t":{"738":{"position":[[0,15]]}}}],["rs256",{"_index":22,"t":{"808":{"position":[[0,5]]},"810":{"position":[[0,5]]}}}],["savefil",{"_index":217,"t":{"1871":{"position":[[0,8]]}}}],["savefiletostorag",{"_index":218,"t":{"1873":{"position":[[0,17]]}}}],["secur",{"_index":219,"t":{"1875":{"position":[[0,6]]}}}],["send",{"_index":220,"t":{"1877":{"position":[[0,4]]}}}],["sendfil",{"_index":221,"t":{"1879":{"position":[[0,8]]}}}],["sendstatu",{"_index":222,"t":{"1881":{"position":[[0,10]]}}}],["serial",{"_index":142,"t":{"1672":{"position":[[5,13]]}}}],["server",{"_index":69,"t":{"1234":{"position":[[0,6]]},"1236":{"position":[[0,6]]}}}],["set",{"_index":24,"t":{"812":{"position":[[4,3]]},"1275":{"position":[[0,3]]},"1683":{"position":[[9,3]]},"1883":{"position":[[0,3]]}}}],["setparserdecod",{"_index":223,"t":{"1885":{"position":[[0,16]]}}}],["setrespons",{"_index":106,"t":{"1323":{"position":[[0,11]]}}}],["setusercontext",{"_index":224,"t":{"1887":{"position":[[0,14]]}}}],["shutdown",{"_index":70,"t":{"1236":{"position":[[7,8]]}}}],["signatur",{"_index":5,"t":{"730":{"position":[[0,9]]},"746":{"position":[[0,9]]},"756":{"position":[[0,9]]},"768":{"position":[[0,9]]},"780":{"position":[[0,9]]},"790":{"position":[[0,9]]},"800":{"position":[[0,9]]},"820":{"position":[[0,9]]},"832":{"position":[[0,9]]},"846":{"position":[[0,9]]},"856":{"position":[[0,10]]},"881":{"position":[[0,10]]},"895":{"position":[[0,10]]},"909":{"position":[[0,10]]},"923":{"position":[[0,10]]},"937":{"position":[[0,10]]},"951":{"position":[[0,10]]},"965":{"position":[[0,10]]},"979":{"position":[[0,10]]},"993":{"position":[[0,10]]},"1007":{"position":[[0,10]]},"1021":{"position":[[0,10]]},"1035":{"position":[[0,10]]},"1049":{"position":[[0,10]]},"1063":{"position":[[0,10]]},"1077":{"position":[[0,10]]},"1091":{"position":[[0,10]]},"1105":{"position":[[0,10]]},"1119":{"position":[[0,10]]},"1348":{"position":[[0,10]]},"1363":{"position":[[0,10]]},"1373":{"position":[[0,10]]},"1383":{"position":[[0,10]]},"1395":{"position":[[0,10]]},"1405":{"position":[[0,10]]},"1419":{"position":[[0,10]]},"1431":{"position":[[0,10]]},"1443":{"position":[[0,10]]},"1455":{"position":[[0,10]]},"1465":{"position":[[0,10]]},"1475":{"position":[[0,10]]},"1485":{"position":[[0,10]]},"1507":{"position":[[0,10]]},"1517":{"position":[[0,10]]},"1531":{"position":[[0,10]]},"1545":{"position":[[0,10]]},"1559":{"position":[[0,10]]},"1571":{"position":[[0,10]]},"1581":{"position":[[0,10]]},"1591":{"position":[[0,10]]},"1601":{"position":[[0,10]]},"1611":{"position":[[0,10]]},"1621":{"position":[[0,10]]},"1631":{"position":[[0,10]]},"1637":{"position":[[0,10]]},"1651":{"position":[[0,10]]},"1657":{"position":[[0,10]]}}}],["singl",{"_index":141,"t":{"1670":{"position":[[0,6]]}}}],["slide",{"_index":133,"t":{"1549":{"position":[[0,7]]}}}],["specifi",{"_index":132,"t":{"1537":{"position":[[0,10]]}}}],["stack",{"_index":72,"t":{"1240":{"position":[[0,5]]}}}],["stale",{"_index":225,"t":{"1889":{"position":[[0,5]]}}}],["start",{"_index":81,"t":{"1269":{"position":[[0,5]]}}}],["static",{"_index":64,"t":{"1217":{"position":[[0,6]]},"1222":{"position":[[0,6]]}}}],["statik",{"_index":128,"t":{"1499":{"position":[[0,6]]}}}],["statu",{"_index":226,"t":{"1891":{"position":[[0,6]]}}}],["storag",{"_index":34,"t":{"873":{"position":[[3,7]]},"875":{"position":[[3,7]]}}}],["storage/databas",{"_index":119,"t":{"1415":{"position":[[7,16]]},"1555":{"position":[[7,16]]},"1647":{"position":[[7,16]]}}}],["string",{"_index":109,"t":{"1329":{"position":[[0,6]]}}}],["struct",{"_index":110,"t":{"1331":{"position":[[0,6]]}}}],["structur",{"_index":146,"t":{"1677":{"position":[[13,9]]}}}],["sub",{"_index":157,"t":{"1689":{"position":[[19,3]]}}}],["subdomain",{"_index":227,"t":{"1893":{"position":[[0,10]]}}}],["support",{"_index":154,"t":{"1685":{"position":[[34,8]]},"1689":{"position":[[11,7]]}}}],["system",{"_index":37,"t":{"1137":{"position":[[9,7]]},"1153":{"position":[[20,6]]}}}],["tabl",{"_index":29,"t":{"854":{"position":[[0,5]]},"879":{"position":[[0,5]]},"893":{"position":[[0,5]]},"907":{"position":[[0,5]]},"921":{"position":[[0,5]]},"935":{"position":[[0,5]]},"949":{"position":[[0,5]]},"963":{"position":[[0,5]]},"977":{"position":[[0,5]]},"991":{"position":[[0,5]]},"1005":{"position":[[0,5]]},"1019":{"position":[[0,5]]},"1033":{"position":[[0,5]]},"1047":{"position":[[0,5]]},"1061":{"position":[[0,5]]},"1075":{"position":[[0,5]]},"1089":{"position":[[0,5]]},"1103":{"position":[[0,5]]},"1117":{"position":[[0,5]]},"1171":{"position":[[0,5]]}}}],["techempow",{"_index":135,"t":{"1662":{"position":[[0,11]]}}}],["templat",{"_index":49,"t":{"1173":{"position":[[21,9]]},"1175":{"position":[[10,9]]},"1177":{"position":[[0,8]]},"1179":{"position":[[0,8]]},"1181":{"position":[[0,8]]},"1183":{"position":[[0,8]]},"1185":{"position":[[0,8]]},"1187":{"position":[[7,9]]},"1189":{"position":[[0,9]]},"1685":{"position":[[6,8]]},"1743":{"position":[[0,8]]}}}],["test",{"_index":21,"t":{"806":{"position":[[6,4]]},"810":{"position":[[6,4]]},"812":{"position":[[8,4]]},"1264":{"position":[[0,4]]}}}],["timeout",{"_index":99,"t":{"1307":{"position":[[0,7]]}}}],["tlsconfig",{"_index":102,"t":{"1313":{"position":[[0,9]]}}}],["type",{"_index":27,"t":{"824":{"position":[[0,5]]},"1895":{"position":[[0,4]]}}}],["up",{"_index":151,"t":{"1683":{"position":[[13,2]]}}}],["updat",{"_index":138,"t":{"1666":{"position":[[5,7]]}}}],["us",{"_index":40,"t":{"1153":{"position":[[0,5]]},"1155":{"position":[[13,3]]},"1681":{"position":[[10,3]]}}}],["usag",{"_index":11,"t":{"760":{"position":[[0,5]]},"762":{"position":[[0,5]]},"772":{"position":[[0,5]]},"826":{"position":[[0,5]]},"836":{"position":[[0,5]]},"1439":{"position":[[0,5]]}}}],["userag",{"_index":86,"t":{"1281":{"position":[[0,9]]}}}],["usercontext",{"_index":228,"t":{"1897":{"position":[[0,11]]}}}],["valid",{"_index":173,"t":{"1748":{"position":[[0,9]]}}}],["vari",{"_index":229,"t":{"1899":{"position":[[0,4]]}}}],["variabl",{"_index":53,"t":{"1179":{"position":[[9,9]]}}}],["web",{"_index":144,"t":{"1674":{"position":[[3,3]]}}}],["window",{"_index":134,"t":{"1549":{"position":[[8,6]]}}}],["world",{"_index":62,"t":{"1213":{"position":[[7,6]]}}}],["write",{"_index":230,"t":{"1901":{"position":[[0,5]]}}}],["writef",{"_index":231,"t":{"1903":{"position":[[0,6]]}}}],["writestr",{"_index":232,"t":{"1905":{"position":[[0,11]]}}}],["xhr",{"_index":233,"t":{"1907":{"position":[[0,3]]}}}],["xml",{"_index":95,"t":{"1299":{"position":[[0,3]]},"1909":{"position":[[0,3]]}}}],["zero",{"_index":59,"t":{"1211":{"position":[[0,4]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":723,"t":"Repository for third party middlewares with dependencies.","s":"Contrib","u":"/contrib/","h":"","p":721},{"i":725,"t":"Casbin Fiberi18n Fibersentry Fiberzap Fiberzerolog JWT NewRelic Open Policy Agent Otelfiber (OpenTelemetry) Paseto Swagger Websocket","s":"📑 Middleware Implementations","u":"/contrib/","h":"#-middleware-implementations","p":721},{"i":727,"t":"Casbin middleware for Fiber.","s":"Casbin","u":"/contrib/casbin/","h":"","p":726},{"i":729,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/casbin choose an adapter from here go get -u github.com/casbin/xorm-adapter","s":"Install","u":"/contrib/casbin/","h":"#install","p":726},{"i":731,"t":"casbin.New(config ...casbin.Config) *casbin.Middleware","s":"Signature","u":"/contrib/casbin/","h":"#signature","p":726},{"i":733,"t":"Property Type Description Default ModelFilePath string Model file path \"./model.conf\" PolicyAdapter persist.Adapter Database adapter for policies ./policy.csv Enforcer *casbin.Enforcer Custom casbin enforcer Middleware generated enforcer using ModelFilePath & PolicyAdapter Lookup func(*fiber.Ctx) string Look up for current subject \"\" Unauthorized func(*fiber.Ctx) error Response body for unauthorized responses Unauthorized Forbidden func(*fiber.Ctx) error Response body for forbidden responses Forbidden","s":"Config","u":"/contrib/casbin/","h":"#config","p":726},{"i":735,"t":"Gorm Adapter File Adapter","s":"Examples","u":"/contrib/casbin/","h":"#examples","p":726},{"i":737,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/casbin\" _ \"github.com/go-sql-driver/mysql\" \"github.com/casbin/xorm-adapter/v2\" ) func main() { app := fiber.New() authz := casbin.New(casbin.Config{ ModelFilePath: \"path/to/rbac_model.conf\", PolicyAdapter: xormadapter.NewAdapter(\"mysql\", \"root:@tcp(127.0.0.1:3306)/\"), Lookup: func(c *fiber.Ctx) string { // fetch authenticated user subject }, }) app.Post(\"/blog\", authz.RequiresPermissions([]string{\"blog:create\"}, casbin.WithValidationRule(casbin.MatchAllRule)), func(c *fiber.Ctx) error { // your handler }, ) app.Delete(\"/blog/:id\", authz.RequiresPermissions([]string{\"blog:create\", \"blog:delete\"}, casbin.WithValidationRule(casbin.AtLeastOneRule)), func(c *fiber.Ctx) error { // your handler }, ) app.Listen(\":8080\") }","s":"CustomPermission","u":"/contrib/casbin/","h":"#custompermission","p":726},{"i":739,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/casbin\" _ \"github.com/go-sql-driver/mysql\" \"github.com/casbin/xorm-adapter/v2\" ) func main() { app := fiber.New() authz := casbin.New(casbin.Config{ ModelFilePath: \"path/to/rbac_model.conf\", PolicyAdapter: xormadapter.NewAdapter(\"mysql\", \"root:@tcp(127.0.0.1:3306)/\"), Lookup: func(c *fiber.Ctx) string { // fetch authenticated user subject }, }) // check permission with Method and Path app.Post(\"/blog\", authz.RoutePermission(), func(c *fiber.Ctx) error { // your handler }, ) app.Listen(\":8080\") }","s":"RoutePermission","u":"/contrib/casbin/","h":"#routepermission","p":726},{"i":741,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/casbin\" _ \"github.com/go-sql-driver/mysql\" \"github.com/casbin/xorm-adapter/v2\" ) func main() { app := fiber.New() authz := casbin.New(casbin.Config{ ModelFilePath: \"path/to/rbac_model.conf\", PolicyAdapter: xormadapter.NewAdapter(\"mysql\", \"root:@tcp(127.0.0.1:3306)/\"), Lookup: func(c *fiber.Ctx) string { // fetch authenticated user subject }, }) app.Put(\"/blog/:id\", authz.RequiresRoles([]string{\"admin\"}), func(c *fiber.Ctx) error { // your handler }, ) app.Listen(\":8080\") }","s":"RoleAuthorization","u":"/contrib/casbin/","h":"#roleauthorization","p":726},{"i":743,"t":"go-i18n support for Fiber.","s":"Fiberi18n","u":"/contrib/fiberi18n/","h":"","p":742},{"i":745,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/fiberi18n","s":"Install","u":"/contrib/fiberi18n/","h":"#install","p":742},{"i":747,"t":"fiberi18n.New(config ...*Config) fiber.Handler","s":"Signature","u":"/contrib/fiberi18n/","h":"#signature","p":742},{"i":749,"t":"Property Type Description Default Next func(c *fiber.Ctx) bool A function to skip this middleware when returned true. nil RootPath string The i18n template folder path. \"./example/localize\" AcceptLanguages []language.Tag A collection of languages that can be processed. []language.Tag{language.Chinese, language.English} FormatBundleFile string The type of the template file. \"yaml\" DefaultLanguage language.Tag The default returned language type. language.English Loader Loader The implementation of the Loader interface, which defines how to read the file. We provide both os.ReadFile and embed.FS.ReadFile. LoaderFunc(os.ReadFile) UnmarshalFunc i18n.UnmarshalFunc The function used for decoding template files. yaml.Unmarshal LangHandler func(ctx *fiber.Ctx, defaultLang string) string Used to get the kind of language handled by *fiber.Ctx and defaultLang. Retrieved from the request header Accept-Language or query parameter lang.","s":"Config","u":"/contrib/fiberi18n/","h":"#config","p":742},{"i":751,"t":"package main import ( \"github.com/gofiber/contrib/fiberi18n\" \"github.com/gofiber/fiber/v2\" \"github.com/nicksnyder/go-i18n/v2/i18n\" \"golang.org/x/text/language\" ) func main() { app := fiber.New() app.Use( fiberi18n.New(&fiberi18n.Config{ RootPath: \"./example/localize\", AcceptLanguages: []language.Tag{language.Chinese, language.English}, DefaultLanguage: language.Chinese, }), ) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(fiberi18n.MustGetMessage(\"welcome\")) }) app.Get(\"/:name\", func(ctx *fiber.Ctx) error { return ctx.SendString(fiberi18n.MustGetMessage(&i18n.LocalizeConfig{ MessageID: \"welcomeWithName\", TemplateData: map[string]string{ \"name\": ctx.Params(\"name\"), }, })) }) app.Listen(\"127.0.0.1:3000\") }","s":"Example","u":"/contrib/fiberi18n/","h":"#example","p":742},{"i":753,"t":"NewRelic support for Fiber.","s":"Fibernewrelic","u":"/contrib/fibernewrelic/","h":"","p":752},{"i":755,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/fibernewrelic","s":"Install","u":"/contrib/fibernewrelic/","h":"#install","p":752},{"i":757,"t":"fibernewrelic.New(config fibernewrelic.Config) fiber.Handler","s":"Signature","u":"/contrib/fibernewrelic/","h":"#signature","p":752},{"i":759,"t":"Property Type Description Default License string Required - New Relic License Key \"\" AppName string New Relic Application Name fiber-api Enabled bool Enable/Disable New Relic false TransportType string Can be HTTP or HTTPS (Deprecated) \"HTTP\" Application Application Existing New Relic App nil ErrorStatusCodeHandler func(c *fiber.Ctx, err error) int If you want to change newrelic status code, you can use it. DefaultErrorStatusCodeHandler","s":"Config","u":"/contrib/fibernewrelic/","h":"#config","p":752},{"i":761,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/fibernewrelic\" ) func main() { app := fiber.New() app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendStatus(200) }) cfg := fibernewrelic.Config{ License: \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\", AppName: \"MyCustomApi\", Enabled: true, } app.Use(fibernewrelic.New(cfg)) app.Listen(\":8080\") }","s":"Usage","u":"/contrib/fibernewrelic/","h":"#usage","p":752},{"i":763,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/fibernewrelic\" \"github.com/newrelic/go-agent/v3/newrelic\" ) func main() { newrelicApp, err := newrelic.NewApplication( newrelic.ConfigAppName(\"MyCustomApi\"), newrelic.ConfigLicense(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\"), newrelic.ConfigEnabled(true), ) app := fiber.New() app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendStatus(200) }) cfg := fibernewrelic.Config{ Application: newrelicApp } app.Use(fibernewrelic.New(cfg)) app.Listen(\":8080\") }","s":"Usage with existing New Relic application","u":"/contrib/fibernewrelic/","h":"#usage-with-existing-new-relic-application","p":752},{"i":765,"t":"Sentry support for Fiber.","s":"Fibersentry","u":"/contrib/fibersentry/","h":"","p":764},{"i":767,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/fibersentry go get -u github.com/getsentry/sentry-go","s":"Install","u":"/contrib/fibersentry/","h":"#install","p":764},{"i":769,"t":"fibersentry.New(config ...Config) fiber.Handler","s":"Signature","u":"/contrib/fibersentry/","h":"#signature","p":764},{"i":771,"t":"Property Type Description Default Repanic bool Repanic configures whether Sentry should repanic after recovery. Set to true, if Recover middleware is used. false WaitForDelivery bool WaitForDelivery configures whether you want to block the request before moving forward with the response. If Recover middleware is used, it's safe to either skip this option or set it to false. false Timeout time.Duration Timeout for the event delivery requests. time.Second * 2","s":"Config","u":"/contrib/fibersentry/","h":"#config","p":764},{"i":773,"t":"fibersentry attaches an instance of *sentry.Hub (https://godoc.org/github.com/getsentry/sentry-go#Hub) to the request's context, which makes it available throughout the rest of the request's lifetime. You can access it by using the fibersentry.GetHubFromContext() method on the context itself in any of your proceeding middleware and routes. And it should be used instead of the global sentry.CaptureMessage, sentry.CaptureException, or any other calls, as it keeps the separation of data between the requests. Keep in mind that *sentry.Hub won't be available in middleware attached before to fibersentry! package main import ( \"fmt\" \"log\" \"github.com/getsentry/sentry-go\" \"github.com/gofiber/contrib/fibersentry\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/utils\" ) func main() { _ = sentry.Init(sentry.ClientOptions{ Dsn: \"\", BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event { if hint.Context != nil { if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok { // You have access to the original Context if it panicked fmt.Println(utils.ImmutableString(c.Hostname())) } } fmt.Println(event) return event }, Debug: true, AttachStacktrace: true, }) app := fiber.New() app.Use(fibersentry.New(fibersentry.Config{ Repanic: true, WaitForDelivery: true, })) enhanceSentryEvent := func(c *fiber.Ctx) error { if hub := fibersentry.GetHubFromContext(c); hub != nil { hub.Scope().SetTag(\"someRandomTag\", \"maybeYouNeedIt\") } return c.Next() } app.All(\"/foo\", enhanceSentryEvent, func(c *fiber.Ctx) error { panic(\"y tho\") }) app.All(\"/\", func(c *fiber.Ctx) error { if hub := fibersentry.GetHubFromContext(c); hub != nil { hub.WithScope(func(scope *sentry.Scope) { scope.SetExtra(\"unwantedQuery\", \"someQueryDataMaybe\") hub.CaptureMessage(\"User provided unwanted query string, but we recovered just fine\") }) } return c.SendStatus(fiber.StatusOK) }) log.Fatal(app.Listen(\":3000\")) }","s":"Usage","u":"/contrib/fibersentry/","h":"#usage","p":764},{"i":775,"t":"sentry.Init(sentry.ClientOptions{ Dsn: \"your-public-dsn\", BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event { if hint.Context != nil { if c, ok := hint.Context.Value(sentry.RequestContextKey).(*fiber.Ctx); ok { // You have access to the original Context if it panicked fmt.Println(c.Hostname()) } } return event }, })","s":"Accessing Context in BeforeSend callback","u":"/contrib/fibersentry/","h":"#accessing-context-in-beforesend-callback","p":764},{"i":777,"t":"Zap logging support for Fiber.","s":"Fiberzap","u":"/contrib/fiberzap/","h":"","p":776},{"i":779,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/fiberzap go get -u go.uber.org/zap","s":"Install","u":"/contrib/fiberzap/","h":"#install","p":776},{"i":781,"t":"fiberzap.New(config ...Config) fiber.Handler","s":"Signature","u":"/contrib/fiberzap/","h":"#signature","p":776},{"i":783,"t":"Property Type Description Default Next func(*Ctx) bool Define a function to skip this middleware when returned true nil Logger *zap.Logger Add custom zap logger. zap.NewDevelopment() Fields []string Add fields what you want see. []string{\"latency\", \"status\", \"method\", \"url\"} Messages []string Custom response messages. []string{\"Server error\", \"Client error\", \"Success\"} Levels []zapcore.Level Custom response levels. []zapcore.Level{zapcore.ErrorLevel, zapcore.WarnLevel, zapcore.InfoLevel} SkipURIs []string Skip logging these URI. []string{} GetResBody func(c *fiber.Ctx) []byte Define a function to get response body when return non-nil. eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody. nil","s":"Config","u":"/contrib/fiberzap/","h":"#config","p":776},{"i":785,"t":"package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/fiberzap\" \"go.uber.org/zap\" ) func main() { app := fiber.New() logger, _ := zap.NewProduction() app.Use(fiberzap.New(fiberzap.Config{ Logger: logger, })) app.Get(\"/\", func (c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Example","u":"/contrib/fiberzap/","h":"#example","p":776},{"i":787,"t":"Zerolog logging support for Fiber.","s":"Fiberzerolog","u":"/contrib/fiberzerolog/","h":"","p":786},{"i":789,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/fiberzerolog go get -u github.com/rs/zerolog/log","s":"Install","u":"/contrib/fiberzerolog/","h":"#install","p":786},{"i":791,"t":"fiberzerolog.New(config ...Config) fiber.Handler","s":"Signature","u":"/contrib/fiberzerolog/","h":"#signature","p":786},{"i":793,"t":"Property Type Description Default Next func(*Ctx) bool Define a function to skip this middleware when returned true nil Logger *zerolog.Logger Add custom zerolog logger. zerolog.New(os.Stderr).With().Timestamp().Logger() GetLogger func(*fiber.Ctx) zerolog.Logger Get custom zerolog logger, if it's defined the returned logger will replace the Logger value. nil Fields []string Add fields what you want see. []string{\"latency\", \"status\", \"method\", \"url\", \"error\"} Messages []string Custom response messages. []string{\"Server error\", \"Client error\", \"Success\"} Levels []zerolog.Level Custom response levels. []zerolog.Level{zerolog.ErrorLevel, zerolog.WarnLevel, zerolog.InfoLevel} SkipURIs []string Skip logging these URI. []string{} GetResBody func(c *fiber.Ctx) []byte Define a function to get response body when return non-nil. eg: When use compress middleware, resBody is unreadable. you can set GetResBody func to get readable resBody. nil","s":"Config","u":"/contrib/fiberzerolog/","h":"#config","p":786},{"i":795,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/fiberzerolog\" \"github.com/rs/zerolog\" ) func main() { app := fiber.New() logger := zerolog.New(os.Stderr).With().Timestamp().Logger() app.Use(fiberzerolog.New(fiberzerolog.Config{ Logger: &logger, })) app.Get(\"/\", func (c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) if err := app.Listen(\":3000\"); err != nil { logger.Fatal().Err(err).Msg(\"Fiber app error\") } }","s":"Example","u":"/contrib/fiberzerolog/","h":"#example","p":786},{"i":797,"t":"JWT returns a JSON Web Token (JWT) auth middleware. For valid token, it sets the user in Ctx.Locals and calls next handler. For invalid token, it returns \"401 - Unauthorized\" error. For missing token, it returns \"400 - Bad Request\" error. Special thanks and credits to Echo","s":"JWT","u":"/contrib/jwt/","h":"","p":796},{"i":799,"t":"This middleware supports Fiber v1 & v2, install accordingly. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/jwt go get -u github.com/golang-jwt/jwt/v5","s":"Install","u":"/contrib/jwt/","h":"#install","p":796},{"i":801,"t":"jwtware.New(config ...jwtware.Config) func(*fiber.Ctx) error","s":"Signature","u":"/contrib/jwt/","h":"#signature","p":796},{"i":803,"t":"Property Type Description Default Filter func(*fiber.Ctx) bool Defines a function to skip middleware nil SuccessHandler func(*fiber.Ctx) error SuccessHandler defines a function which is executed for a valid token. nil ErrorHandler func(*fiber.Ctx, error) error ErrorHandler defines a function which is executed for an invalid token. 401 Invalid or expired JWT SigningKey interface{} Signing key to validate token. Used as fallback if SigningKeys has length 0. nil SigningKeys map[string]interface{} Map of signing keys to validate token with kid field usage. nil ContextKey string Context key to store user information from the token into context. \"user\" Claims jwt.Claim Claims are extendable claims data defining token content. jwt.MapClaims{} TokenLookup string TokenLookup is a string in the form of : that is used \"header:Authorization\" AuthScheme string AuthScheme to be used in the Authorization header. The default value (\"Bearer\") will only be used in conjuction with the default TokenLookup value. \"Bearer\" KeyFunc func() jwt.Keyfunc KeyFunc defines a user-defined function that supplies the public key for a token validation. jwtKeyFunc JWKSetURLs []string A slice of unique JSON Web Key (JWK) Set URLs to used to parse JWTs. nil","s":"Config","u":"/contrib/jwt/","h":"#config","p":796},{"i":805,"t":"package main import ( \"time\" \"github.com/gofiber/fiber/v2\" jwtware \"github.com/gofiber/contrib/jwt\" \"github.com/golang-jwt/jwt/v5\" ) func main() { app := fiber.New() // Login route app.Post(\"/login\", login) // Unauthenticated route app.Get(\"/\", accessible) // JWT Middleware app.Use(jwtware.New(jwtware.Config{ SigningKey: jwtware.SigningKey{Key: []byte(\"secret\")}, })) // Restricted Routes app.Get(\"/restricted\", restricted) app.Listen(\":3000\") } func login(c *fiber.Ctx) error { user := c.FormValue(\"user\") pass := c.FormValue(\"pass\") // Throws Unauthorized error if user != \"john\" || pass != \"doe\" { return c.SendStatus(fiber.StatusUnauthorized) } // Create the Claims claims := jwt.MapClaims{ \"name\": \"John Doe\", \"admin\": true, \"exp\": time.Now().Add(time.Hour * 72).Unix(), } // Create token token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) // Generate encoded token and send it as response. t, err := token.SignedString([]byte(\"secret\")) if err != nil { return c.SendStatus(fiber.StatusInternalServerError) } return c.JSON(fiber.Map{\"token\": t}) } func accessible(c *fiber.Ctx) error { return c.SendString(\"Accessible\") } func restricted(c *fiber.Ctx) error { user := c.Locals(\"user\").(*jwt.Token) claims := user.Claims.(jwt.MapClaims) name := claims[\"name\"].(string) return c.SendString(\"Welcome \" + name) }","s":"HS256 Example","u":"/contrib/jwt/","h":"#hs256-example","p":796},{"i":807,"t":"Login using username and password to retrieve a token. curl --data \"user=john&pass=doe\" http://localhost:3000/login Response { \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY\" } Request a restricted resource using the token in Authorization request header. curl localhost:3000/restricted -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY\" Response Welcome John Doe","s":"HS256 Test","u":"/contrib/jwt/","h":"#hs256-test","p":796},{"i":809,"t":"package main import ( \"crypto/rand\" \"crypto/rsa\" \"log\" \"time\" \"github.com/gofiber/fiber/v2\" \"github.com/golang-jwt/jwt/v5\" jwtware \"github.com/gofiber/contrib/jwt\" ) var ( // Obviously, this is just a test example. Do not do this in production. // In production, you would have the private key and public key pair generated // in advance. NEVER add a private key to any GitHub repo. privateKey *rsa.PrivateKey ) func main() { app := fiber.New() // Just as a demo, generate a new private/public key pair on each run. See note above. rng := rand.Reader var err error privateKey, err = rsa.GenerateKey(rng, 2048) if err != nil { log.Fatalf(\"rsa.GenerateKey: %v\", err) } // Login route app.Post(\"/login\", login) // Unauthenticated route app.Get(\"/\", accessible) // JWT Middleware app.Use(jwtware.New(jwtware.Config{ SigningKey: jwtware.SigningKey{ JWTAlg: jwtware.RS256, Key: privateKey.Public(), }, })) // Restricted Routes app.Get(\"/restricted\", restricted) app.Listen(\":3000\") } func login(c *fiber.Ctx) error { user := c.FormValue(\"user\") pass := c.FormValue(\"pass\") // Throws Unauthorized error if user != \"john\" || pass != \"doe\" { return c.SendStatus(fiber.StatusUnauthorized) } // Create the Claims claims := jwt.MapClaims{ \"name\": \"John Doe\", \"admin\": true, \"exp\": time.Now().Add(time.Hour * 72).Unix(), } // Create token token := jwt.NewWithClaims(jwt.SigningMethodRS256, claims) // Generate encoded token and send it as response. t, err := token.SignedString(privateKey) if err != nil { log.Printf(\"token.SignedString: %v\", err) return c.SendStatus(fiber.StatusInternalServerError) } return c.JSON(fiber.Map{\"token\": t}) } func accessible(c *fiber.Ctx) error { return c.SendString(\"Accessible\") } func restricted(c *fiber.Ctx) error { user := c.Locals(\"user\").(*jwt.Token) claims := user.Claims.(jwt.MapClaims) name := claims[\"name\"].(string) return c.SendString(\"Welcome \" + name) }","s":"RS256 Example","u":"/contrib/jwt/","h":"#rs256-example","p":796},{"i":811,"t":"The RS256 is actually identical to the HS256 test above.","s":"RS256 Test","u":"/contrib/jwt/","h":"#rs256-test","p":796},{"i":813,"t":"The tests are identical to basic JWT tests above, with exception that JWKSetURLs to valid public keys collection in JSON Web Key (JWK) Set format should be supplied. See RFC 7517.","s":"JWK Set Test","u":"/contrib/jwt/","h":"#jwk-set-test","p":796},{"i":815,"t":"KeyFunc defines a user-defined function that supplies the public key for a token validation. The function shall take care of verifying the signing algorithm and selecting the proper key. A user-defined KeyFunc can be useful if tokens are issued by an external party. When a user-defined KeyFunc is provided, SigningKey, SigningKeys, and SigningMethod are ignored. This is one of the three options to provide a token validation key. The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey. Required if neither SigningKeys nor SigningKey is provided. Default to an internal implementation verifying the signing algorithm and selecting the proper key. package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" jwtware \"github.com/gofiber/contrib/jwt\" \"github.com/golang-jwt/jwt/v5\" ) func main() { app := fiber.New() app.Use(jwtware.New(jwtware.Config{ KeyFunc: customKeyFunc(), })) app.Get(\"/ok\", func(c *fiber.Ctx) error { return c.SendString(\"OK\") }) } func customKeyFunc() jwt.Keyfunc { return func(t *jwt.Token) (interface{}, error) { // Always check the signing method if t.Method.Alg() != jwtware.HS256 { return nil, fmt.Errorf(\"Unexpected jwt signing method=%v\", t.Header[\"alg\"]) } // TODO custom implementation of loading signing key like from a database signingKey := \"secret\" return []byte(signingKey), nil } }","s":"Custom KeyFunc example","u":"/contrib/jwt/","h":"#custom-keyfunc-example","p":796},{"i":817,"t":"Open Policy Agent support for Fiber. Note: Requires Go 1.18 and above","s":"Opafiber","u":"/contrib/opafiber/","h":"","p":816},{"i":819,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/opafiber","s":"Install","u":"/contrib/opafiber/","h":"#install","p":816},{"i":821,"t":"opafiber.New(config opafiber.Config) fiber.Handler","s":"Signature","u":"/contrib/opafiber/","h":"#signature","p":816},{"i":823,"t":"Property Type Description Default RegoQuery string Required - Rego query - RegoPolicy io.Reader Required - Rego policy - IncludeQueryString bool Include query string as input to rego policy false DeniedStatusCode int Http status code to return when policy denies request 400 DeniedResponseMessage string Http response body text to return when policy denies request \"\" IncludeHeaders []string Include headers as input to rego policy - InputCreationMethod InputCreationFunc Use your own function to provide input for OPA func defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)","s":"Config","u":"/contrib/opafiber/","h":"#config","p":816},{"i":825,"t":"type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)","s":"Types","u":"/contrib/opafiber/","h":"#types","p":816},{"i":827,"t":"OPA Fiber middleware sends the following example data to the policy engine as input: { \"method\": \"GET\", \"path\": \"/somePath\", \"query\": { \"name\": [\"John Doe\"] }, \"headers\": { \"Accept\": \"application/json\", \"Content-Type\": \"application/json\" } } package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/opafiber\" ) func main() { app := fiber.New() module := ` package example.authz default allow := false allow { input.method == \"GET\" } ` cfg := opafiber.Config{ RegoQuery: \"data.example.authz.allow\", RegoPolicy: bytes.NewBufferString(module), IncludeQueryString: true, DeniedStatusCode: fiber.StatusForbidden, DeniedResponseMessage: \"status forbidden\", IncludeHeaders: []string{\"Authorization\"}, InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) { return map[string]interface{}{ \"method\": ctx.Method(), \"path\": ctx.Path(), }, nil }, } app.Use(opafiber.New(cfg)) app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendStatus(200) }) app.Listen(\":8080\") }","s":"Usage","u":"/contrib/opafiber/","h":"#usage","p":816},{"i":829,"t":"OpenTelemetry support for Fiber. Can be found on OpenTelemetry Registry.","s":"Otelfiber","u":"/contrib/otelfiber/","h":"","p":828},{"i":831,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/contrib/otelfiber","s":"Install","u":"/contrib/otelfiber/","h":"#install","p":828},{"i":833,"t":"otelfiber.Middleware(opts ...Option) fiber.Handler","s":"Signature","u":"/contrib/otelfiber/","h":"#signature","p":828},{"i":835,"t":"Property Type Description Default Next func(*fiber.Ctx) bool Define a function to skip this middleware when returned trueRequired - Rego quer nil TracerProvider oteltrace.TracerProvider Specifies a tracer provider to use for creating a tracer nil - the global tracer provider is used MeterProvider otelmetric.MeterProvider Specifies a meter provider to use for reporting nil - the global meter provider is used Port *int Specifies the value to use when setting the net.host.port attribute on metrics/spans Required: If not default (80 for http, 443 for https) Propagators propagation.TextMapPropagator Specifies propagators to use for extracting information from the HTTP requests If none are specified, global ones will be used ServerName *string specifies the value to use when setting the http.server_name attribute on metrics/spans - SpanNameFormatter func(*fiber.Ctx) string Takes a function that will be called on every request and the returned string will become the Span Name default formatter returns the route pathRaw","s":"Config","u":"/contrib/otelfiber/","h":"#config","p":828},{"i":837,"t":"Please refer to example","s":"Usage","u":"/contrib/otelfiber/","h":"#usage","p":828},{"i":839,"t":"package main import ( \"context\" \"errors\" \"log\" \"go.opentelemetry.io/otel/sdk/resource\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/otelfiber\" \"go.opentelemetry.io/otel\" \"go.opentelemetry.io/otel/attribute\" stdout \"go.opentelemetry.io/otel/exporters/stdout/stdouttrace\" //\"go.opentelemetry.io/otel/exporters/jaeger\" \"go.opentelemetry.io/otel/propagation\" sdktrace \"go.opentelemetry.io/otel/sdk/trace\" semconv \"go.opentelemetry.io/otel/semconv/v1.4.0\" oteltrace \"go.opentelemetry.io/otel/trace\" ) var tracer = otel.Tracer(\"fiber-server\") func main() { tp := initTracer() defer func() { if err := tp.Shutdown(context.Background()); err != nil { log.Printf(\"Error shutting down tracer provider: %v\", err) } }() app := fiber.New() app.Use(otelfiber.Middleware()) app.Get(\"/error\", func(ctx *fiber.Ctx) error { return errors.New(\"abc\") }) app.Get(\"/users/:id\", func(c *fiber.Ctx) error { id := c.Params(\"id\") name := getUser(c.UserContext(), id) return c.JSON(fiber.Map{\"id\": id, name: name}) }) log.Fatal(app.Listen(\":3000\")) } func initTracer() *sdktrace.TracerProvider { exporter, err := stdout.New(stdout.WithPrettyPrint()) if err != nil { log.Fatal(err) } tp := sdktrace.NewTracerProvider( sdktrace.WithSampler(sdktrace.AlwaysSample()), sdktrace.WithBatcher(exporter), sdktrace.WithResource( resource.NewWithAttributes( semconv.SchemaURL, semconv.ServiceNameKey.String(\"my-service\"), )), ) otel.SetTracerProvider(tp) otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{})) return tp } func getUser(ctx context.Context, id string) string { _, span := tracer.Start(ctx, \"getUser\", oteltrace.WithAttributes(attribute.String(\"id\", id))) defer span.End() if id == \"123\" { return \"otelfiber tester\" } return \"unknown\" }","s":"Example","u":"/contrib/otelfiber/","h":"#example","p":828},{"i":841,"t":"An HTTP server using gofiber fiber and instrumentation. The server has a /users/:id endpoint. The server generates span information to stdout. These instructions expect you have docker-compose installed. Bring up the fiber-server and fiber-client services to run the example: docker-compose up --detach fiber-server fiber-client The fiber-client service sends just one HTTP request to fiber-server and then exits. View the span generated by fiber-server in the logs: docker-compose logs fiber-server Shut down the services when you are finished with the example: docker-compose down","s":"Example","u":"/contrib/otelfiber/example/","h":"","p":840},{"i":843,"t":"PASETO returns a Web Token (PASETO) auth middleware. For valid token, it sets the payload data in Ctx.Locals and calls next handler. For invalid token, it returns \"401 - Unauthorized\" error. For missing token, it returns \"400 - BadRequest\" error.","s":"Paseto","u":"/contrib/paseto/","h":"","p":842},{"i":845,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/paseto go get -u github.com/o1egl/paseto","s":"Install","u":"/contrib/paseto/","h":"#install","p":842},{"i":847,"t":"pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error","s":"Signature","u":"/contrib/paseto/","h":"#signature","p":842},{"i":849,"t":"Property Type Description Default Next func(*Ctx) bool Defines a function to skip middleware nil SuccessHandler func(*fiber.Ctx) error SuccessHandler defines a function which is executed for a valid token. c.Next() ErrorHandler func(*fiber.Ctx, error) error ErrorHandler defines a function which is executed for an invalid token. 401 Invalid or expired PASETO Validate PayloadValidator Defines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided. nil SymmetricKey []byte Secret key to encrypt token. If present the middleware will generate local tokens. nil PrivateKey ed25519.PrivateKey Secret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens. nil PublicKey crypto.PublicKey Public key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens. nil ContextKey string Context key to store user information from the token into context. \"auth-token\" TokenLookup [2]string TokenLookup is a string slice with size 2, that is used to extract token from the request [\"header\",\"Authorization\"]","s":"Config","u":"/contrib/paseto/","h":"#config","p":842},{"i":851,"t":"When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token. Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token. In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.","s":"Instructions","u":"/contrib/paseto/","h":"#instructions","p":842},{"i":853,"t":"Swagger middleware for Fiber. The middleware handles Swagger UI.","s":"Swagger","u":"/contrib/swagger/","h":"","p":852},{"i":855,"t":"Signatures Examples","s":"Table of Contents","u":"/contrib/swagger/","h":"#table-of-contents","p":852},{"i":857,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/contrib/swagger/","h":"#signatures","p":852},{"i":859,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/swagger\" ) Then create a Fiber app with app := fiber.New(). After you initiate your Fiber app, you can use the following possibilities:","s":"Examples","u":"/contrib/swagger/","h":"#examples","p":852},{"i":861,"t":"app.Use(swagger.New(cfg))","s":"Default Config","u":"/contrib/swagger/","h":"#default-config","p":852},{"i":863,"t":"cfg := swagger.Config{ BasePath: \"/\", //swagger ui base path FilePath: \"./docs/swagger.json\", } app.Use(swagger.New(cfg))","s":"Custom Config","u":"/contrib/swagger/","h":"#custom-config","p":852},{"i":865,"t":"Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.","s":"Websocket","u":"/contrib/websocket/","h":"","p":864},{"i":867,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/websocket","s":"Install","u":"/contrib/websocket/","h":"#install","p":864},{"i":869,"t":"package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/websocket\" ) func main() { app := fiber.New() app.Use(\"/ws\", func(c *fiber.Ctx) error { // IsWebSocketUpgrade returns true if the client // requested upgrade to the WebSocket protocol. if websocket.IsWebSocketUpgrade(c) { c.Locals(\"allowed\", true) return c.Next() } return fiber.ErrUpgradeRequired }) app.Get(\"/ws/:id\", websocket.New(func(c *websocket.Conn) { // c.Locals is added to the *websocket.Conn log.Println(c.Locals(\"allowed\")) // true log.Println(c.Params(\"id\")) // 123 log.Println(c.Query(\"v\")) // 1.0 log.Println(c.Cookies(\"session\")) // \"\" // websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index var ( mt int msg []byte err error ) for { if mt, msg, err = c.ReadMessage(); err != nil { log.Println(\"read:\", err) break } log.Printf(\"recv: %s\", msg) if err = c.WriteMessage(mt, msg); err != nil { log.Println(\"write:\", err) break } } })) log.Fatal(app.Listen(\":3000\")) // Access the websocket server: ws://localhost:3000/ws/123?v=1.0 // https://www.websocket.org/echo.html }","s":"Example","u":"/contrib/websocket/","h":"#example","p":864},{"i":871,"t":"If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path. app := fiber.New() app.Use(cache.New(cache.Config{ Next: func(c *fiber.Ctx) bool { return strings.Contains(c.Route().Path, \"/ws\") }, })) app.Get(\"/ws/:id\", websocket.New(func(c *websocket.Conn) {}))","s":"Note with cache middleware","u":"/contrib/websocket/","h":"#note-with-cache-middleware","p":864},{"i":874,"t":"Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares. // Storage interface for communicating with different database/key-value // providers. Visit https://github.com/gofiber/storage for more info. type Storage interface { // Get gets the value for the given key. // `nil, nil` is returned when the key does not exist Get(key string) ([]byte, error) // Set stores the given value for the given key along // with an expiration value, 0 means no expiration. // Empty key or value will be ignored without an error. Set(key string, val []byte, exp time.Duration) error // Delete deletes the value for the given key. // It returns no error if the storage does not contain the key, Delete(key string) error // Reset resets the storage and delete all keys. Reset() error // Close closes the storage and will stop any running garbage // collectors and open connections. Close() error }","s":"📦 Storage","u":"/storage/","h":"","p":872},{"i":876,"t":"ArangoDB AzureBlob Badger Bbolt Couchbase DynamoDB Etcd Memcache Memory MongoDB MSSQL MySQL Pebble Postgres Redis S3 SQLite3","s":"📑 Storage Implementations","u":"/storage/","h":"#-storage-implementations","p":872},{"i":878,"t":"A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.","s":"ArangoDB","u":"/storage/arangodb/","h":"","p":877},{"i":880,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/arangodb/","h":"#table-of-contents","p":877},{"i":882,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() driver.Client","s":"Signatures","u":"/storage/arangodb/","h":"#signatures","p":877},{"i":884,"t":"ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/arangodb/","h":"#installation","p":877},{"i":886,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/arangodb/","h":"#examples","p":877},{"i":888,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/arangodb/","h":"#config","p":877},{"i":890,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/arangodb/","h":"#default-config","p":877},{"i":892,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/azureblob/","h":"","p":891},{"i":894,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/azureblob/","h":"#table-of-contents","p":891},{"i":896,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/azureblob/","h":"#signatures","p":891},{"i":898,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/azureblob/","h":"#installation","p":891},{"i":900,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/azureblob/","h":"#examples","p":891},{"i":902,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/azureblob/","h":"#config","p":891},{"i":904,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/azureblob/","h":"#default-config","p":891},{"i":906,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/badger/","h":"","p":905},{"i":908,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/badger/","h":"#table-of-contents","p":905},{"i":910,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/badger/","h":"#signatures","p":905},{"i":912,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/badger/","h":"#installation","p":905},{"i":914,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/badger/","h":"#examples","p":905},{"i":916,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/badger/","h":"#config","p":905},{"i":918,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/badger/","h":"#default-config","p":905},{"i":920,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/bbolt/","h":"","p":919},{"i":922,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/bbolt/","h":"#table-of-contents","p":919},{"i":924,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/bbolt/","h":"#signatures","p":919},{"i":926,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/bbolt/","h":"#installation","p":919},{"i":928,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/bbolt/","h":"#examples","p":919},{"i":930,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/bbolt/","h":"#config","p":919},{"i":932,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/bbolt/","h":"#default-config","p":919},{"i":934,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/couchbase/","h":"","p":933},{"i":936,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/couchbase/","h":"#table-of-contents","p":933},{"i":938,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/couchbase/","h":"#signatures","p":933},{"i":940,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/couchbase/","h":"#installation","p":933},{"i":942,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/couchbase/","h":"#examples","p":933},{"i":944,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/couchbase/","h":"#config","p":933},{"i":946,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/couchbase/","h":"#default-config","p":933},{"i":948,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/dynamodb/","h":"","p":947},{"i":950,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/dynamodb/","h":"#table-of-contents","p":947},{"i":952,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/dynamodb/","h":"#signatures","p":947},{"i":954,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/dynamodb/","h":"#installation","p":947},{"i":956,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/dynamodb/","h":"#examples","p":947},{"i":958,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/dynamodb/","h":"#config","p":947},{"i":960,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/dynamodb/","h":"#default-config","p":947},{"i":962,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/etcd/","h":"","p":961},{"i":964,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd/","h":"#table-of-contents","p":961},{"i":966,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/etcd/","h":"#signatures","p":961},{"i":968,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/etcd/","h":"#installation","p":961},{"i":970,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/etcd/","h":"#examples","p":961},{"i":972,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/etcd/","h":"#config","p":961},{"i":974,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/etcd/","h":"#default-config","p":961},{"i":976,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/memcache/","h":"","p":975},{"i":978,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache/","h":"#table-of-contents","p":975},{"i":980,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/memcache/","h":"#signatures","p":975},{"i":982,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/memcache/","h":"#installation","p":975},{"i":984,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/memcache/","h":"#examples","p":975},{"i":986,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/memcache/","h":"#config","p":975},{"i":988,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/memcache/","h":"#default-config","p":975},{"i":990,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/memory/","h":"","p":989},{"i":992,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memory/","h":"#table-of-contents","p":989},{"i":994,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/memory/","h":"#signatures","p":989},{"i":996,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/memory/","h":"#installation","p":989},{"i":998,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/memory/","h":"#examples","p":989},{"i":1000,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/memory/","h":"#config","p":989},{"i":1002,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/memory/","h":"#default-config","p":989},{"i":1004,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/mongodb/","h":"","p":1003},{"i":1006,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mongodb/","h":"#table-of-contents","p":1003},{"i":1008,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/mongodb/","h":"#signatures","p":1003},{"i":1010,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/mongodb/","h":"#installation","p":1003},{"i":1012,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/mongodb/","h":"#examples","p":1003},{"i":1014,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/mongodb/","h":"#config","p":1003},{"i":1016,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/mongodb/","h":"#default-config","p":1003},{"i":1018,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/mssql/","h":"","p":1017},{"i":1020,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mssql/","h":"#table-of-contents","p":1017},{"i":1022,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/mssql/","h":"#signatures","p":1017},{"i":1024,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/mssql/","h":"#installation","p":1017},{"i":1026,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mssql/","h":"#examples","p":1017},{"i":1028,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/mssql/","h":"#config","p":1017},{"i":1030,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/mssql/","h":"#default-config","p":1017},{"i":1032,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/mysql/","h":"","p":1031},{"i":1034,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql/","h":"#table-of-contents","p":1031},{"i":1036,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/mysql/","h":"#signatures","p":1031},{"i":1038,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/mysql/","h":"#installation","p":1031},{"i":1040,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql/","h":"#examples","p":1031},{"i":1042,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/mysql/","h":"#config","p":1031},{"i":1044,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/mysql/","h":"#default-config","p":1031},{"i":1046,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/pebble/","h":"","p":1045},{"i":1048,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/pebble/","h":"#table-of-contents","p":1045},{"i":1050,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/pebble/","h":"#signatures","p":1045},{"i":1052,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/pebble/","h":"#installation","p":1045},{"i":1054,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/pebble/","h":"#examples","p":1045},{"i":1056,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/pebble/","h":"#config","p":1045},{"i":1058,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/pebble/","h":"#default-config","p":1045},{"i":1060,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/postgres/","h":"","p":1059},{"i":1062,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/postgres/","h":"#table-of-contents","p":1059},{"i":1064,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/postgres/","h":"#signatures","p":1059},{"i":1066,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/postgres/","h":"#installation","p":1059},{"i":1068,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/postgres/","h":"#examples","p":1059},{"i":1070,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/postgres/","h":"#config","p":1059},{"i":1072,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/postgres/","h":"#default-config","p":1059},{"i":1074,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/redis/","h":"","p":1073},{"i":1076,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/redis/","h":"#table-of-contents","p":1073},{"i":1078,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/redis/","h":"#signatures","p":1073},{"i":1080,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/redis/","h":"#installation","p":1073},{"i":1082,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/redis/","h":"#examples","p":1073},{"i":1084,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/redis/","h":"#config","p":1073},{"i":1086,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/redis/","h":"#default-config","p":1073},{"i":1088,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/ristretto/","h":"","p":1087},{"i":1090,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto/","h":"#table-of-contents","p":1087},{"i":1092,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/ristretto/","h":"#signatures","p":1087},{"i":1094,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/ristretto/","h":"#installation","p":1087},{"i":1096,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/ristretto/","h":"#examples","p":1087},{"i":1098,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/ristretto/","h":"#config","p":1087},{"i":1100,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/ristretto/","h":"#default-config","p":1087},{"i":1102,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/s3/","h":"","p":1101},{"i":1104,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/s3/","h":"#table-of-contents","p":1101},{"i":1106,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/s3/","h":"#signatures","p":1101},{"i":1108,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/s3/","h":"#installation","p":1101},{"i":1110,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/s3/","h":"#examples","p":1101},{"i":1112,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/s3/","h":"#config","p":1101},{"i":1114,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/s3/","h":"#default-config","p":1101},{"i":1116,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/sqlite3/","h":"","p":1115},{"i":1118,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3/","h":"#table-of-contents","p":1115},{"i":1120,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/sqlite3/","h":"#signatures","p":1115},{"i":1122,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/sqlite3/","h":"#installation","p":1115},{"i":1124,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/sqlite3/","h":"#examples","p":1115},{"i":1126,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/sqlite3/","h":"#config","p":1115},{"i":1128,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/sqlite3/","h":"#default-config","p":1115},{"i":1130,"t":"This package provides universal methods to use multiple template engines with the Fiber web framework using the new Views interface that is available from > v1.11.1. Special thanks to @bdtomlin & @arsmn for helping! 9 template engines are supported: ace amber django handlebars html jet mustache pug slim","s":"👋 Welcome","u":"/template/","h":"","p":1129},{"i":1132,"t":"Go version 1.17 or higher is required. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/template/any_template_engine/vX","s":"Installation","u":"/template/","h":"#installation","p":1129},{"i":1134,"t":"package main import ( \"log\" \"github.com/gofiber/fiber/v2\" // To use a specific template engine, import as shown below: // \"github.com/gofiber/template/pug\" // \"github.com/gofiber/template/mustache\" // etc.. // In this example we use the html template engine \"github.com/gofiber/template/html/v2\" ) func main() { // Create a new engine by passing the template folder // and template extension using .New(dir, ext string) engine := html.New(\"./views\", \".html\") // We also support the http.FileSystem interface // See examples below to load templates from embedded files engine := html.NewFileSystem(http.Dir(\"./views\"), \".html\") // Reload the templates on each render, good for development engine.Reload(true) // Optional. Default: false // Debug will print each template that is parsed, good for debugging engine.Debug(true) // Optional. Default: false // Layout defines the variable name that is used to yield templates within layouts engine.Layout(\"embed\") // Optional. Default: \"embed\" // Delims sets the action delimiters to the specified strings engine.Delims(\"{{\", \"}}\") // Optional. Default: engine delimiters // AddFunc adds a function to the template's global function map. engine.AddFunc(\"greet\", func(name string) string { return \"Hello, \" + name + \"!\" }) // After you created your engine, you can pass it to Fiber's Views Engine app := fiber.New(fiber.Config{ Views: engine, }) // To render a template, you can call the ctx.Render function // Render(tmpl string, values interface{}, layout ...string) app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) // Render with layout example app.Get(\"/layout\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Example","u":"/template/","h":"#example","p":1129},{"i":1136,"t":"To view more specific examples, you could visit each engine folder to learn more ace amber django handlebars html jet mustache pug slim","s":"More Examples","u":"/template/","h":"#more-examples","p":1129},{"i":1138,"t":"We support the http.FileSystem interface, so you can use different libraries to load the templates from embedded binaries. pkger​ Read documentation: https://github.com/markbates/pkger package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/markbates/pkger\" ) func main() { engine := html.NewFileSystem(pkger.Dir(\"/views\"), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run pkger && go build } packr​ Read documentation: https://github.com/gobuffalo/packr package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/gobuffalo/packr/v2\" ) func main() { engine := html.NewFileSystem(packr.New(\"Templates\", \"/views\"), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run packr && go build } go.rice​ Read documentation: https://github.com/GeertJohan/go.rice package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/GeertJohan/go.rice\" ) func main() { engine := html.NewFileSystem(rice.MustFindBox(\"views\").HTTPBox(), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run rice embed-go && go build } fileb0x​ Read documentation: https://github.com/UnnoTed/fileb0x package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" // your generated package \"github.com///static\" ) func main() { engine := html.NewFileSystem(static.HTTP, \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // Read the documentation on how to use fileb0x }","s":"embedded Systems","u":"/template/","h":"#embedded-systems","p":1129},{"i":1140,"t":"Simple​ Extended​ Benchmarks were ran on Apple Macbook M1. Each engine was benchmarked 20 times and the results averaged into a single xlsx file. Mustache was excluded from the extended benchmark","s":"Benchmarks","u":"/template/","h":"#benchmarks","p":1129},{"i":1142,"t":"Ace is a template engine create by yossi, to see the original syntax documentation please click here","s":"Ace","u":"/template/ace/","h":"","p":1141},{"i":1144,"t":"./views/index.ace = include ./views/partials/header . h1 {{.Title}} = include ./views/partials/footer . ./views/partials/header.ace h1 Header ./views/partials/footer.ace h1 Footer ./views/layouts/main.ace = doctype html html head title Main body {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/ace/v2\" ) func main() { // Create a new engine engine := ace.New(\"./views\", \".ace\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".ace\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/ace/","h":"#basic-example","p":1141},{"i":1146,"t":"Amber is a template engine create by eknkc, to see the original syntax documentation please click here","s":"Amber","u":"/template/amber/","h":"","p":1145},{"i":1148,"t":"./views/index.amber import ./views/partials/header h1 #{Title} import ./views/partials/footer ./views/partials/header.amber h1 Header ./views/partials/footer.amber h1 Footer ./views/layouts/main.amber doctype html html head title Main body #{embed()} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/amber/v2\" ) func main() { // Create a new engine engine := amber.New(\"./views\", \".amber\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".amber\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/amber/","h":"#basic-example","p":1145},{"i":1150,"t":"Django is a template engine create by flosch, to see the original syntax documentation please click here","s":"Django","u":"/template/django/","h":"","p":1149},{"i":1152,"t":"./views/index.django {% include \"partials/header.django\" %}

{{ Title }}

{% include \"partials/footer.django\" %} ./views/partials/header.django

Header

./views/partials/footer.django

Footer

./views/layouts/main.django Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/django/v3\" ) func main() { // Create a new engine engine := django.New(\"./views\", \".django\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".django\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/django/","h":"#basic-example","p":1149},{"i":1154,"t":"When using the // go:embed directive, resolution of inherited templates using django's {% extend '' %} keyword fails when instantiating the template engine with django.NewFileSystem(). In that case, use the django.NewPathForwardingFileSystem() function to instantiate the template engine. This function provides the proper configuration for resolving inherited templates. Assume you have the following files: views/ancenstor.django views/descendant.djando then package main import ( \"log\" \"embed\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/django/v3\" ) //go:embed views var viewsAsssets embed.FS func main() { // Create a new engine engine := NewPathForwardingFileSystem(http.FS(viewsAsssets), \"/views\", \".django\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render descendant return c.Render(\"descendant\", fiber.Map{ \"greeting\": \"World\", }) }) log.Fatal(app.Listen(\":3000\")) }","s":"Using embedded file system (1.16+ only)","u":"/template/django/","h":"#using-embedded-file-system-116-only","p":1149},{"i":1156,"t":"// My custom function func Nl2brHtml(value interface{}) string { if str, ok := value.(string); ok { return strings.Replace(str, \"\\n\", \"
\", -1) } return \"\" } // Create a new engine engine := django.New(\"./views\", \".django\") // register functions engine.AddFunc(\"nl2br\", Nl2brHtml) // Pass the engine to the Views app := fiber.New(fiber.Config{Views: engine}) in the handler c.Render(\"index\", fiber.Map{ \"Fiber\": \"Hello, World!\\n\\nGreetings from Fiber Team\", }) ./views/index.django {{ nl2br(Fiber) }} Output: Hello, World!

Greetings from Fiber Team ","s":"Register and use custom functions","u":"/template/django/","h":"#register-and-use-custom-functions","p":1149},{"i":1158,"t":"Handlebars is a template engine create by aymerick, to see the original syntax documentation please click here","s":"Handlebars","u":"/template/handlebars/","h":"","p":1157},{"i":1160,"t":"./views/index.hbs {{> 'partials/header' }}

{{Title}}

{{> 'partials/footer' }} ./views/partials/header.hbs

Header

./views/partials/footer.hbs

Footer

./views/layouts/main.hbs Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/handlebars/v2\" ) func main() { // Create a new engine engine := handlebars.New(\"./views\", \".hbs\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".hbs\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/handlebars/","h":"#basic-example","p":1157},{"i":1162,"t":"HTML is the official Go template engine html/template, to see the original syntax documentation please click here Info: All templates within the specified view directory are analyzed and compiled at the beginning to increase the performance when using them. Thus it should be noted that no definition with the same name should exist, otherwise they will overwrite each other. For templating the {{embed}} tag should be used","s":"HTML","u":"/template/html/","h":"","p":1161},{"i":1164,"t":"./views/index.html {{template \"partials/header\" .}}

{{.Title}}

{{template \"partials/footer\" .}} ./views/partials/header.html

Header

./views/partials/footer.html

Footer

./views/layouts/main.html Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html/v2\" ) func main() { // Create a new engine engine := html.New(\"./views\", \".html\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".html\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/html/","h":"#basic-example","p":1161},{"i":1166,"t":"package main import ( \"log\" \"net/http\" \"embed\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" ) //go:embed views/* var viewsfs embed.FS func main() { engine := html.NewFileSystem(http.FS(viewsfs), \".html\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index - start with views directory return c.Render(\"views/index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) } and change the starting point to the views directory ./views/index.html {{template \"views/partials/header\" .}}

{{.Title}}

{{template \"views/partials/footer\" .}}","s":"Example with embed.FS","u":"/template/html/","h":"#example-with-embedfs","p":1161},{"i":1168,"t":"package main import ( \"embed\" \"html/template\" \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" ) //go:embed views/* var viewsfs embed.FS func main() { engine := html.NewFileSystem(http.FS(viewsfs), \".html\") engine.AddFunc( // add unescape function \"unescape\", func(s string) template.HTML { return template.HTML(s) }, ) // Pass the engine to the Views app := fiber.New(fiber.Config{Views: engine}) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"views/index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) } and change the starting point to the views directory ./views/index.html

{{ unescape .Title}}

html output

Hello, World!

","s":"Example with innerHTML","u":"/template/html/","h":"#example-with-innerhtml","p":1161},{"i":1170,"t":"The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.","s":"Golang Templates Cheatsheet","u":"/template/html/TEMPLATES_CHEATSHEET","h":"","p":1169},{"i":1172,"t":"Parsing and Creating Templates Executing Templates Template Encoding and HTML Template Variables Template Actions Template Functions Template Comparison Functions Nested Templates and Layouts Templates Calling Functions","s":"Table of Contents","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#table-of-contents","p":1169},{"i":1174,"t":"Naming Templates​ There is no defined file extension for Go templates. One of the most popular is .tmpl supported by vim-go and referenced in the text/template godocs. The extension .gohtml supports syntax highlighting in both Atom and GoSublime editors. Finally analysis of large Go codebases finds that .tpl is often used by developers. While the extension is not important it is still good to be consistent within a project for clarity. Creating a Template​ tpl, err := template.Parse(filename) will get the template at filename and store it in tpl. tpl can then be executed to show the template. Parsing Multiple Templates​ template.ParseFiles(filenames) takes a list of filenames and stores all templates. template.ParseGlob(pattern) will find all templates matching the pattern and store the templates.","s":"Parsing and Creating Templates","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#parsing-and-creating-templates","p":1169},{"i":1176,"t":"Execute a Single Template​ Once a template has been parsed there are two options to execute them. A single template tpl can be executed using tpl.Execute(io.Writer, data). The content of tpl will be written to the io.Writer. Data is an interface passed to the template that will be useable in the template. Executing a Named Template​ tpl.ExecuteTemplate(io.Writer, name, data) works the same as execute but allows for a string name of the template the user wants to execute.","s":"Executing Templates","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#executing-templates","p":1169},{"i":1178,"t":"Contextual Encoding​ Go’s html/template package does encoding based on the context of the code. As a result, html/template encodes any characters that need encoding to be rendered correctly. For example the < and > in \"

A header!

\" will be encoded as <h1>A header!</h1> . Type template.HTML can be used to skip encoding by telling Go the string is safe. template.HTML(\"

A Safe header

\") will then be

A Safe header

. Using this type with user input is dangerous and leaves the application vulnerable. The go html/template package is aware of attributes within the template and will encode values differently based on the attribute. Go templates can also be used with javascript. Structs and maps will be expanded into JSON objects and quotes will be added to strings for use in function parameters and as variable values. // Go type Cat struct { Name string Age int } kitten := Cat{\"Sam\", 12} // Template // Javascript var cat = {\"Name\":\"Sam\", \"Age\" 12} Safe Strings and HTML Comments​ The html/template package will remove any comments from a template by default. This can cause issues when comments are necessary such as detecting internet explorer. We can use the Custom Functions method (Globally) to create a function that returns html preserving comments. Define a function htmlSafe in the FuncMap of the template. testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"htmlSafe\": func(html string) template.HTML { return template.HTML(html) }, }).ParseFiles(\"hello.gohtml\") This function takes a string and produces the unaltered HTML code. This function can be used in a template like so to preserve the comments : {{htmlSafe \"\" }}","s":"Template Encoding and HTML","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-encoding-and-html","p":1169},{"i":1180,"t":"The dot character (.)​ A template variable can be a boolean, string, character, integer, floating-point, imaginary, or complex constant in Go syntax. Data passed to the template can be accessed using dot {{ . }}. If the data is a complex type then it’s fields can be accessed using the dot with the field name {{ .FieldName }}. Dots can be chained together if the data contains multiple complex structures. {{ .Struct.StructTwo.Field }} Variables in Templates​ Data passed to the template can be saved in a variable and used throughout the template. {{$number := .}} We use the $number to create a variable then initialize it with the value passed to the template. To use the variable we call it in the template with {{$number}}. {{$number := .}}

It is day number {{$number}} of the month

var tpl *template.Template tpl = template.Must(template.ParseFiles(\"templateName\")) err := tpl.ExecuteTemplate(os.Stdout, \"templateName\", 23) In this example we pass 23 to the template and stored in the $number variable which can be used anywhere in the template","s":"Template Variables","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-variables","p":1169},{"i":1182,"t":"If/Else Statements​ Go templates support if/else statements like many programming languages. We can use the if statement to check for values, if it doesn’t exist we can use an else value. The empty values are false, 0, any nil pointer or interface value, and any array, slice, map, or string of length zero.

Hello, {{if .Name}} {{.Name}} {{else}} Anonymous {{end}}!

If .Name exists then Hello, Name will be printed (replaced with the name value) otherwise it will print Hello, Anonymous. Templates also provide the else if statment {{else if .Name2 }} which can be used to evaluate other options after an if. Removing Whitespace​ Adding different values to a template can add various amounts of whitespace. We can either change our template to better handle it, by ignoring or minimizing effects, or we can use the minus sign - within out template.

Hello, {{if .Name}} {{.Name}} {{- else}} Anonymous {{- end}}!

Here we are telling the template to remove all spaces between the Name variable and whatever comes after it. We are doing the same with the end keyword. This allows us to have whitespace within the template for easier reading but remove it in production. Range Blocks​ Go templates have a range keyword to iterate over all objects in a structure. Suppose we had the Go structures: type Item struct { Name string Price int } type ViewData struct { Name string Items []Item } We have an Item, with a name and price, then a ViewData which is the structure sent to the template. Consider the template containing the following: {{range .Items}}

{{.Name}}

${{.Price}}
{{end}} For each Item in the range of Items (in the ViewData structure) get the Name and Price of that item and create html for each Item automatically. Within a range each Item becomes the {{.}} and the item properties therefore become {{.Name}} or {{.Price}} in this example.","s":"Template Actions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-actions","p":1169},{"i":1184,"t":"The template package provides a list of predefined global functions. Below are some of the most used. Indexing structures in Templates​ If the data passed to the template is a map, slice, or array it can be indexed from the template. We use {{index x number}} where index is the keyword, x is the data and number is a integer for the index value. If we had {{index names 2}} it is equivalent to names[2]. We can add more integers to index deeper into data. {{index names 2 3 4}} is equivalent to names[2][3][4].

{{index .FavNums 2 }}

type person struct { Name string FavNums []int } func main() { tpl := template.Must(template.ParseGlob(\"*.gohtml\")) tpl.Execute(os.Stdout, &person{\"Curtis\", []int{7, 11, 94}}) } This code example passes a person structure and gets the 3rd favourite number from the FavNums slice. The and Function​ The and function returns the boolean AND of its arguments by returning the first empty argument or the last argument. and x y behaves logically as if x then y else x . Consider the following go code type User struct { Admin bool } type ViewData struct { *User } Pass a ViewData with a User that has Admin set true to the following template {{if and .User .User.Admin}} You are an admin user! {{else}} Access denied! {{end}} The result will be You are an admin user!. However if the ViewData did not include a *User object or Admin was set as false then the result will be Access denied!. The or Function​ The or function operates similarly to the and function however will stop at the first true. or x y is equivalent to if x then x else y so y will never be evaluated if x is not empty. The not Function​ The not function returns the boolean negation of the argument. {{ if not .Authenticated}} Access Denied! {{ end }}","s":"Template Functions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-functions","p":1169},{"i":1186,"t":"Comparisons​ The html/template package provides a variety of functions to do comparisons between operators. The operators may only be basic types or named basic types such as type Temp float32 Remember that template functions take the form {{ function arg1 arg2 }}. eq Returns the result of arg1 == arg2 ne Returns the result of arg1 != arg2 lt Returns the result of arg1 < arg2 le Returns the result of arg1 <= arg2 gt Returns the result of arg1 > arg2 ge Returns the result of arg1 >= arg2 Of special note eq can be used with two or more arguments by comparing all arguments to the first. {{ eq arg1 arg2 arg3 arg4}} will result in the following logical expression: arg1==arg2 || arg1==arg3 || arg1==arg4","s":"Template Comparison Functions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-comparison-functions","p":1169},{"i":1188,"t":"Nesting Templates​ Nested templates can be used for parts of code frequently used across templates, a footer or header for example. Rather than updating each template separately we can use a nested template that all other templates can use. You can define a template as follows: {{define \"footer\"}}

Here is the footer

{{end}} A template named “footer” is defined which can be used in other templates like so to add the footer template content into the other template: {{template \"footer\"}} Passing Variables between Templates​ The template action used to include nested templates also allows a second parameter to pass data to the nested template. // Define a nested template called header {{define \"header\"}}

{{.}}

{{end}} // Call template and pass a name parameter {{range .Items}}
{{template \"header\" .Name}} ${{.Price}}
{{end}} We use the same range to loop through Items as before but we pass the name to the header template each time in this simple example. Creating Layouts​ Glob patterns specify sets of filenames with wildcard characters. The template.ParseGlob(pattern string) function will parse all templates that match the string pattern. template.ParseFiles(files...) can also be used with a list of file names. The templates are named by default based on the base names of the argument files. This mean views/layouts/hello.gohtml will have the name hello.gohtml . If the template has a `{{define “templateName”}} within it then that name will be usable. A specific template can be executed using t.ExecuteTemplate(w, \"templateName\", nil) . t is an object of type Template, w is type io.Writer such as an http.ResponseWriter, Then there is the name of the template to execute, and finally passing any data to the template, in this case a nil value. Example main.go file // Omitted imports & package var LayoutDir string = \"views/layouts\" var bootstrap *template.Template func main() { var err error bootstrap, err = template.ParseGlob(LayoutDir + \"/*.gohtml\") if err != nil { panic(err) } http.HandleFunc(\"/\", handler) http.ListenAndServe(\":8080\", nil) } func handler(w http.ResponseWriter, r *http.Request) { bootstrap.ExecuteTemplate(w, \"bootstrap\", nil) } All .gohtml files are parsed in main. When route / is reached the template defined as bootstrap is executed using the handler function. Example views/layouts/bootstrap.gohtml file {{define \"bootstrap\"}} Go Templates

Filler header

Filler paragraph

{{end}}","s":"Nested Templates and Layouts","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#nested-templates-and-layouts","p":1169},{"i":1190,"t":"Function Variables (calling struct methods)​ We can use templates to call the methods of objects in the template to return data. Consider the User struct with the following method. type User struct { ID int Email string } func (u User) HasPermission(feature string) bool { if feature == \"feature-a\" { return true } else { return false } } When a type User has been passed to the template we can then call this method from the template. {{if .User.HasPermission \"feature-a\"}}

Feature A

Some other stuff here...

{{else}}

Feature A

To enable Feature A please upgrade your plan

{{end}} The template checks if the User HasPermission for the feature and renders depending on the result. Function Variables (call)​ If the Method HasPermission has to change at times then the Function Variables (Methods) implementation may not fit the design. Instead a HasPermission func(string) bool attribute can be added on the User type. This can then have a function assigned to it at creation. // Structs type ViewData struct { User User } type User struct { ID int Email string HasPermission func(string) bool } // Example of creating a ViewData vd := ViewData{ User: User{ ID: 1, Email: \"curtis.vermeeren@gmail.com\", // Create the HasPermission function HasPermission: func(feature string) bool { if feature == \"feature-b\" { return true } return false }, }, } // Executing the ViewData with the template err := testTemplate.Execute(w, vd) We need to tell the Go template that we want to call this function so we must change the template from the Function Variables (Methods) implementation to do this. We use the call keyword supplied by the go html/template package. Changing the previous template to use call results in: {{if (call .User.HasPermission \"feature-b\")}}

Feature B

Some other stuff here...

{{else}}

Feature B

To enable Feature B please upgrade your plan

{{end}} Custom Functions​ Another way to call functions is to create custom functions with template.FuncMap . This method creates global methods that can be used throughout the entire application. FuncMap has type map[string]interface{} mapping a string, the function name, to a function. The mapped functions must have either a single return value, or two return values where the second has type error. // Creating a template with function hasPermission testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"hasPermission\": func(user User, feature string) bool { if user.ID == 1 && feature == \"feature-a\" { return true } return false }, }).ParseFiles(\"hello.gohtml\") Here the function to check if a user has permission for a feature is mapped to the string \"hasPermission\" and stored in the FuncMap. Note that the custom functions must be created before calling ParseFiles() The function could be executed in the template as follows: {{ if hasPermission .User \"feature-a\" }} The .User and string \"feature-a\" are both passed to hasPermission as arguments. Custom Functions (Globally)​ The previous two methods of custom functions rely on .User being passed to the template. This works in many cases but in a large application passing too many objects to a template can become difficult to maintain across many templates. We can change the implementation of the custom function to work without the .User being passed. Using a similar feature example as the other 2 sections first you would have to create a default hasPermission function and define it in the template’s function map. testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"hasPermission\": func(feature string) bool { return false }, }).ParseFiles(\"hello.gohtml\") This function could be placed in main() or somewhere that ensures the default hasPermission is created in the hello.gohtml function map. The default function just returns false but it defines the function and implementation that doesn’t require User . Next a closure could be used to redefine the hasPermission function. It would use the User data available when it is created in a handler rather than having User data passed to it. Within the handler for the template you can redefine any functions to use the information available. func handler(w http.ResponseWriter, r *http.Request) { w.Header().Set(\"Content-Type\", \"text/html\") user := User{ ID: 1, Email: \"Curtis.vermeeren@gmail.com\", } vd := ViewData{} err := testTemplate.Funcs(template.FuncMap{ \"hasPermission\": func(feature string) bool { if user.ID == 1 && feature == \"feature-a\" { return true } return false }, }).Execute(w, vd) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) } } In this handler a User is created with ID and Email, Then a ViewData is created without passing the user to it. The hasPermission function is redefined using user.ID which is available when the function is created. {{if hasPermission \"feature-a\"}} can be used in a template without having to pass a User to the template as the User object in the handler is used instead.","s":"Templates Calling Functions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#templates-calling-functions","p":1169},{"i":1192,"t":"Jet is a template engine create by cloudykit, to see the original syntax documentation please click here","s":"Jet","u":"/template/jet/","h":"","p":1191},{"i":1194,"t":"./views/index.jet {{include \"partials/header\"}}

{{ Title }}

{{include \"partials/footer\"}} ./views/partials/header.jet

Header

./views/partials/footer.jet

Footer

./views/layouts/main.jet Title {{ embed() }} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/jet/v2\" ) func main() { // Create a new engine engine := jet.New(\"./views\", \".jet\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := jet.NewFileSystem(http.Dir(\"./views\", \".jet\")) // Pass the engine to the views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/jet/","h":"#basic-example","p":1191},{"i":1196,"t":"Mustache is a template engine created by hoisie/cbroglie, to see the original syntax documentation please click here","s":"Mustache","u":"/template/mustache/","h":"","p":1195},{"i":1198,"t":"./views/index.mustache {{> views/partials/header }}

{{Title}}

{{> views/partials/footer }} ./views/partials/header.mustache

Header

./views/partials/footer.mustache

Footer

./views/layouts/main.mustache Main {{{embed}}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/mustache/v2\" ) func main() { // Create a new engine engine := mustache.New(\"./views\", \".mustache\") // Or from an embedded system // Note that with an embedded system the partials included from template files must be // specified relative to the filesystem's root, not the current working directory // engine := mustache.NewFileSystem(http.Dir(\"./views\", \".mustache\"), \".mustache\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/mustache/","h":"#basic-example","p":1195},{"i":1200,"t":"Pug is a template engine create by joker, to see the original syntax documentation please click here","s":"Pug","u":"/template/pug/","h":"","p":1199},{"i":1202,"t":"./views/index.pug include partials/header.pug h1 #{.Title} include partials/footer.pug ./views/partials/header.pug h2 Header ./views/partials/footer.pug h2 Footer ./views/layouts/main.pug doctype html html head title Main include ../partials/meta.pug body | {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/pug/v2\" // \"net/http\" // embedded system ) func main() { // Create a new engine engine := pug.New(\"./views\", \".pug\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := pug.NewFileSystem(http.Dir(\"./views\", \".pug\")) // Pass the engine to the views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/pug/","h":"#basic-example","p":1199},{"i":1204,"t":"Slim is a template engine created by mattn, to see the original syntax documentation please click here","s":"Slim","u":"/template/slim/","h":"","p":1203},{"i":1206,"t":"./views/index.slim == render(\"partials/header.slim\") h1 = Title == render(\"partials/footer.slim\") ./views/partials/header.slim h2 = Header ./views/partials/footer.slim h2 = Footer ./views/layouts/main.slim doctype html html head title Main include ../partials/meta.slim body | {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/slim/v2\" // \"net/http\" // embedded system ) func main() { // Create a new engine engine := slim.New(\"./views\", \".slim\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := slim.NewFileSystem(http.Dir(\"./views\", \".slim\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/slim/","h":"#basic-example","p":1203},{"i":1208,"t":"An online API documentation with examples so you can start building web apps with Fiber right away! Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind. These docs are for Fiber v2, which was released on September 15th, 2020.","s":"👋 Welcome","u":"/","h":"","p":1207},{"i":1210,"t":"First of all, download and install Go. 1.17 or higher is required. Installation is done using the go get command: go get github.com/gofiber/fiber/v2","s":"Installation","u":"/","h":"#installation","p":1207},{"i":1212,"t":"Some values returned from *fiber.Ctx are not immutable by default. Because fiber is optimized for high-performance, values returned from fiber.Ctx are not immutable by default and will be re-used across requests. As a rule of thumb, you must only use context values within the handler, and you must not keep any references. As soon as you return from the handler, any values you have obtained from the context will be re-used in future requests and will change below your feet. Here is an example: func handler(c *fiber.Ctx) error { // Variable is only valid within this handler result := c.Params(\"foo\") // ... } If you need to persist such values outside the handler, make copies of their underlying buffer using the copy builtin. Here is an example for persisting a string: func handler(c *fiber.Ctx) error { // Variable is only valid within this handler result := c.Params(\"foo\") // Make a copy buffer := make([]byte, len(result)) copy(buffer, result) resultCopy := string(buffer) // Variable is now valid forever // ... } We created a custom CopyString function that does the above and is available under gofiber/utils. app.Get(\"/:foo\", func(c *fiber.Ctx) error { // Variable is now immutable result := utils.CopyString(c.Params(\"foo\")) // ... }) Alternatively, you can also use the Immutable setting. It will make all values returned from the context immutable, allowing you to persist them anywhere. Of course, this comes at the cost of performance. app := fiber.New(fiber.Config{ Immutable: true, }) For more information, please check #426 and #185.","s":"Zero Allocation","u":"/","h":"#zero-allocation","p":1207},{"i":1214,"t":"Embedded below is essentially the most straightforward Fiber app you can create: package main import \"github.com/gofiber/fiber/v2\" func main() { app := fiber.New() app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Listen(\":3000\") } go run server.go Browse to http://localhost:3000 and you should see Hello, World! on the page.","s":"Hello, World!","u":"/","h":"#hello-world","p":1207},{"i":1216,"t":"Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, PUT, POST, etc.). Each route can have multiple handler functions that are executed when the route is matched. Route definition takes the following structures: // Function signature app.Method(path string, ...func(*fiber.Ctx) error) app is an instance of Fiber Method is an HTTP request method: GET, PUT, POST, etc. path is a virtual path on the server func(*fiber.Ctx) error is a callback function containing the Context executed when the route is matched Simple route // Respond with \"Hello, World!\" on root path, \"/\" app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) Parameters // GET http://localhost:8080/hello%20world app.Get(\"/:value\", func(c *fiber.Ctx) error { return c.SendString(\"value: \" + c.Params(\"value\")) // => Get request with value: hello world }) Optional parameter // GET http://localhost:3000/john app.Get(\"/:name?\", func(c *fiber.Ctx) error { if c.Params(\"name\") != \"\" { return c.SendString(\"Hello \" + c.Params(\"name\")) // => Hello john } return c.SendString(\"Where is john?\") }) Wildcards // GET http://localhost:3000/api/user/john app.Get(\"/api/*\", func(c *fiber.Ctx) error { return c.SendString(\"API path: \" + c.Params(\"*\")) // => API path: user/john })","s":"Basic routing","u":"/","h":"#basic-routing","p":1207},{"i":1218,"t":"To serve static files such as images, CSS, and JavaScript files, replace your function handler with a file or directory string. Function signature: app.Static(prefix, root string, config ...Static) Use the following code to serve files in a directory named ./public: app := fiber.New() app.Static(\"/\", \"./public\") app.Listen(\":3000\") Now, you can load the files that are in the ./public directory: http://localhost:8080/hello.html http://localhost:8080/js/jquery.js http://localhost:8080/css/style.css","s":"Static files","u":"/","h":"#static-files","p":1207},{"i":1220,"t":"For more information on how to build APIs in Go with Fiber, please check out this excellent article on building an express-style API in Go with Fiber.","s":"Note","u":"/","h":"#note","p":1207},{"i":1223,"t":"Use the Static method to serve static files such as images, CSS, and JavaScript. info By default, Static will serve index.html files in response to a request on a directory. Signature func (app *App) Static(prefix, root string, config ...Static) Router Use the following code to serve files in a directory named ./public app.Static(\"/\", \"./public\") // => http://localhost:3000/hello.html // => http://localhost:3000/js/jquery.js // => http://localhost:3000/css/style.css Examples // Serve files from multiple directories app.Static(\"/\", \"./public\") // Serve files from \"./files\" directory: app.Static(\"/\", \"./files\") You can use any virtual path prefix (where the path does not actually exist in the file system) for files that are served by the Static method, specify a prefix path for the static directory, as shown below: Examples app.Static(\"/static\", \"./public\") // => http://localhost:3000/static/hello.html // => http://localhost:3000/static/js/jquery.js // => http://localhost:3000/static/css/style.css If you want to have a little bit more control regarding the settings for serving static files. You could use the fiber.Static struct to enable specific settings. fiber.Static{} // Static defines configuration options when defining static assets. type Static struct { // When set to true, the server tries minimizing CPU usage by caching compressed files. // This works differently than the github.com/gofiber/compression middleware. // Optional. Default value false Compress bool `json:\"compress\"` // When set to true, enables byte range requests. // Optional. Default value false ByteRange bool `json:\"byte_range\"` // When set to true, enables directory browsing. // Optional. Default value false. Browse bool `json:\"browse\"` // When set to true, enables direct download. // Optional. Default value false. Download bool `json:\"download\"` // The name of the index file for serving a directory. // Optional. Default value \"index.html\". Index string `json:\"index\"` // Expiration duration for inactive file handlers. // Use a negative time.Duration to disable it. // // Optional. Default value 10 * time.Second. CacheDuration time.Duration `json:\"cache_duration\"` // The value for the Cache-Control HTTP-header // that is set on the file response. MaxAge is defined in seconds. // // Optional. Default value 0. MaxAge int `json:\"max_age\"` // ModifyResponse defines a function that allows you to alter the response. // // Optional. Default: nil ModifyResponse Handler // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *Ctx) bool } Example // Custom config app.Static(\"/\", \"./public\", fiber.Static{ Compress: true, ByteRange: true, Browse: true, Index: \"john.html\", CacheDuration: 10 * time.Second, MaxAge: 3600, })","s":"Static","u":"/api/app","h":"#static","p":1221},{"i":1225,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Route Handlers","u":"/api/app","h":"#route-handlers","p":1221},{"i":1227,"t":"You can Mount Fiber instance by creating a *Mount Signature func (a *App) Mount(prefix string, app *App) Router Examples func main() { app := fiber.New() micro := fiber.New() app.Mount(\"/john\", micro) // GET /john/doe -> 200 OK micro.Get(\"/doe\", func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusOK) }) log.Fatal(app.Listen(\":3000\")) }","s":"Mount","u":"/api/app","h":"#mount","p":1221},{"i":1229,"t":"The MountPath property contains one or more path patterns on which a sub-app was mounted. Signature func (app *App) MountPath() string Examples func main() { app := fiber.New() one := fiber.New() two := fiber.New() three := fiber.New() two.Mount(\"/three\", three) one.Mount(\"/two\", two) app.Mount(\"/one\", one) one.MountPath() // \"/one\" two.MountPath() // \"/one/two\" three.MountPath() // \"/one/two/three\" app.MountPath() // \"\" } caution Mounting order is important for MountPath. If you want to get mount paths properly, you should start mounting from the deepest app.","s":"MountPath","u":"/api/app","h":"#mountpath","p":1221},{"i":1231,"t":"You can group routes by creating a *Group struct. Signature func (app *App) Group(prefix string, handlers ...Handler) Router Examples func main() { app := fiber.New() api := app.Group(\"/api\", handler) // /api v1 := api.Group(\"/v1\", handler) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", handler) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) }","s":"Group","u":"/api/app","h":"#group","p":1221},{"i":1233,"t":"You can define routes with a common prefix inside the common function. Signature func (app *App) Route(prefix string, fn func(router Router), name ...string) Router Examples func main() { app := fiber.New() app.Route(\"/test\", func(api fiber.Router) { api.Get(\"/foo\", handler).Name(\"foo\") // /test/foo (name: test.foo) api.Get(\"/bar\", handler).Name(\"bar\") // /test/bar (name: test.bar) }, \"test.\") log.Fatal(app.Listen(\":3000\")) }","s":"Route","u":"/api/app","h":"#route","p":1221},{"i":1235,"t":"Server returns the underlying fasthttp server Signature func (app *App) Server() *fasthttp.Server Examples func main() { app := fiber.New() app.Server().MaxConnsPerIP = 1 // ... }","s":"Server","u":"/api/app","h":"#server","p":1221},{"i":1237,"t":"Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waits indefinitely for all connections to return to idle before shutting down. ShutdownWithTimeout will forcefully close any active connections after the timeout expires. ShutdownWithContext shuts down the server including by force if the context's deadline is exceeded. func (app *App) Shutdown() error func (app *App) ShutdownWithTimeout(timeout time.Duration) error func (app *App) ShutdownWithContext(ctx context.Context) error","s":"Server Shutdown","u":"/api/app","h":"#server-shutdown","p":1221},{"i":1239,"t":"This method returns the amount of registered handlers. Signature func (app *App) HandlersCount() uint32","s":"HandlersCount","u":"/api/app","h":"#handlerscount","p":1221},{"i":1241,"t":"This method returns the original router stack Signature func (app *App) Stack() [][]*Route Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/john/:age\", handler) app.Post(\"/register\", handler) data, _ := json.MarshalIndent(app.Stack(), \"\", \" \") fmt.Println(string(data)) app.Listen(\":3000\") } Result [ [ { \"method\": \"GET\", \"path\": \"/john/:age\", \"params\": [ \"age\" ] } ], [ { \"method\": \"HEAD\", \"path\": \"/john/:age\", \"params\": [ \"age\" ] } ], [ { \"method\": \"POST\", \"path\": \"/register\", \"params\": null } ] ]","s":"Stack","u":"/api/app","h":"#stack","p":1221},{"i":1243,"t":"This method assigns the name of latest created route. Signature func (app *App) Name(name string) Router Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/\", handler) app.Name(\"index\") app.Get(\"/doe\", handler).Name(\"home\") app.Trace(\"/tracer\", handler).Name(\"tracert\") app.Delete(\"/delete\", handler).Name(\"delete\") a := app.Group(\"/a\") a.Name(\"fd.\") a.Get(\"/test\", handler).Name(\"test\") data, _ := json.MarshalIndent(app.Stack(), \"\", \" \") fmt.Print(string(data)) app.Listen(\":3000\") } Result [ [ { \"method\": \"GET\", \"name\": \"index\", \"path\": \"/\", \"params\": null }, { \"method\": \"GET\", \"name\": \"home\", \"path\": \"/doe\", \"params\": null }, { \"method\": \"GET\", \"name\": \"fd.test\", \"path\": \"/a/test\", \"params\": null } ], [ { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/\", \"params\": null }, { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/doe\", \"params\": null }, { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/a/test\", \"params\": null } ], null, null, [ { \"method\": \"DELETE\", \"name\": \"delete\", \"path\": \"/delete\", \"params\": null } ], null, null, [ { \"method\": \"TRACE\", \"name\": \"tracert\", \"path\": \"/tracer\", \"params\": null } ], null ]","s":"Name","u":"/api/app","h":"#name","p":1221},{"i":1245,"t":"This method gets the route by name. Signature func (app *App) GetRoute(name string) Route Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/\", handler).Name(\"index\") data, _ := json.MarshalIndent(app.GetRoute(\"index\"), \"\", \" \") fmt.Print(string(data)) app.Listen(\":3000\") } Result { \"method\": \"GET\", \"name\": \"index\", \"path\": \"/\", \"params\": null }","s":"GetRoute","u":"/api/app","h":"#getroute","p":1221},{"i":1247,"t":"This method gets all routes. Signature func (app *App) GetRoutes(filterUseOption ...bool) []Route When filterUseOption equal to true, it will filter the routes registered by the middleware. Examples func main() { app := fiber.New() app.Post(\"/\", func (c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }).Name(\"index\") data, _ := json.MarshalIndent(app.GetRoutes(true), \"\", \" \") fmt.Print(string(data)) } Result [ { \"method\": \"POST\", \"name\": \"index\", \"path\": \"/\", \"params\": null } ]","s":"GetRoutes","u":"/api/app","h":"#getroutes","p":1221},{"i":1249,"t":"Config returns the app config as value ( read-only ). Signature func (app *App) Config() Config","s":"Config","u":"/api/app","h":"#config","p":1221},{"i":1251,"t":"Handler returns the server handler that can be used to serve custom *fasthttp.RequestCtx requests. Signature func (app *App) Handler() fasthttp.RequestHandler","s":"Handler","u":"/api/app","h":"#handler","p":1221},{"i":1253,"t":"Listen serves HTTP requests from the given address. Signature func (app *App) Listen(addr string) error Examples // Listen on port :8080 app.Listen(\":8080\") // Custom host app.Listen(\"127.0.0.1:8080\")","s":"Listen","u":"/api/app","h":"#listen","p":1221},{"i":1255,"t":"ListenTLS serves HTTPs requests from the given address using certFile and keyFile paths to as TLS certificate and key file. Signature func (app *App) ListenTLS(addr, certFile, keyFile string) error Examples app.ListenTLS(\":443\", \"./cert.pem\", \"./cert.key\"); Using ListenTLS defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{ cert, }, }","s":"ListenTLS","u":"/api/app","h":"#listentls","p":1221},{"i":1257,"t":"Signature func (app *App) ListenTLS(addr string, cert tls.Certificate) error Examples app.ListenTLSWithCertificate(\":443\", cert); Using ListenTLSWithCertificate defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{ cert, }, }","s":"ListenTLSWithCertificate","u":"/api/app","h":"#listentlswithcertificate","p":1221},{"i":1259,"t":"ListenMutualTLS serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file Signature func (app *App) ListenMutualTLS(addr, certFile, keyFile, clientCertFile string) error Examples app.ListenMutualTLS(\":443\", \"./cert.pem\", \"./cert.key\", \"./ca-chain-cert.pem\"); Using ListenMutualTLS defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, ClientAuth: tls.RequireAndVerifyClientCert, ClientCAs: clientCertPool, Certificates: []tls.Certificate{ cert, }, }","s":"ListenMutualTLS","u":"/api/app","h":"#listenmutualtls","p":1221},{"i":1261,"t":"ListenMutualTLSWithCertificate serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file Signature func (app *App) ListenMutualTLSWithCertificate(addr string, cert tls.Certificate, clientCertPool *x509.CertPool) error Examples app.ListenMutualTLSWithCertificate(\":443\", cert, clientCertPool); Using ListenMutualTLSWithCertificate defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, ClientAuth: tls.RequireAndVerifyClientCert, ClientCAs: clientCertPool, Certificates: []tls.Certificate{ cert, }, }","s":"ListenMutualTLSWithCertificate","u":"/api/app","h":"#listenmutualtlswithcertificate","p":1221},{"i":1263,"t":"You can pass your own net.Listener using the Listener method. This method can be used to enable TLS/HTTPS with a custom tls.Config. Signature func (app *App) Listener(ln net.Listener) error Examples ln, _ := net.Listen(\"tcp\", \":3000\") cer, _:= tls.LoadX509KeyPair(\"server.crt\", \"server.key\") ln = tls.NewListener(ln, &tls.Config{Certificates: []tls.Certificate{cer}}) app.Listener(ln)","s":"Listener","u":"/api/app","h":"#listener","p":1221},{"i":1265,"t":"Testing your application is done with the Test method. Use this method for creating _test.go files or when you need to debug your routing logic. The default timeout is 1s if you want to disable a timeout altogether, pass -1 as a second argument. Signature func (app *App) Test(req *http.Request, msTimeout ...int) (*http.Response, error) Examples // Create route with GET method for test: app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(c.BaseURL()) // => http://google.com fmt.Println(c.Get(\"X-Custom-Header\")) // => hi return c.SendString(\"hello, World!\") }) // http.Request req := httptest.NewRequest(\"GET\", \"http://google.com\", nil) req.Header.Set(\"X-Custom-Header\", \"hi\") // http.Response resp, _ := app.Test(req) // Do something with results: if resp.StatusCode == fiber.StatusOK { body, _ := ioutil.ReadAll(resp.Body) fmt.Println(string(body)) // => Hello, World! }","s":"Test","u":"/api/app","h":"#test","p":1221},{"i":1267,"t":"Hooks is a method to return hooks property. Signature func (app *App) Hooks() *Hooks","s":"Hooks","u":"/api/app","h":"#hooks","p":1221},{"i":1270,"t":"Start a http request with http method and url. Signatures // Client http methods func (c *Client) Get(url string) *Agent func (c *Client) Head(url string) *Agent func (c *Client) Post(url string) *Agent func (c *Client) Put(url string) *Agent func (c *Client) Patch(url string) *Agent func (c *Client) Delete(url string) *Agent","s":"Start request","u":"/api/client","h":"#start-request","p":1268},{"i":1272,"t":"Agent is built on top of FastHTTP's HostClient which has lots of convenient helper methods such as dedicated methods for request methods.","s":"✨ Agent","u":"/api/client","h":"#-agent","p":1268},{"i":1274,"t":"Parse initializes a HostClient. Parse a := AcquireAgent() req := a.Request() req.Header.SetMethod(MethodGet) req.SetRequestURI(\"http://example.com\") if err := a.Parse(); err != nil { panic(err) } code, body, errs := a.Bytes() // ...","s":"Parse","u":"/api/client","h":"#parse","p":1268},{"i":1276,"t":"Set sets the given key: value header. Signature func (a *Agent) Set(k, v string) *Agent func (a *Agent) SetBytesK(k []byte, v string) *Agent func (a *Agent) SetBytesV(k string, v []byte) *Agent func (a *Agent) SetBytesKV(k []byte, v []byte) *Agent Example agent.Set(\"k1\", \"v1\"). SetBytesK([]byte(\"k1\"), \"v1\"). SetBytesV(\"k1\", []byte(\"v1\")). SetBytesKV([]byte(\"k2\"), []byte(\"v2\")) // ...","s":"Set","u":"/api/client","h":"#set","p":1268},{"i":1278,"t":"Add adds the given key: value header. Multiple headers with the same key may be added with this function. Signature func (a *Agent) Add(k, v string) *Agent func (a *Agent) AddBytesK(k []byte, v string) *Agent func (a *Agent) AddBytesV(k string, v []byte) *Agent func (a *Agent) AddBytesKV(k []byte, v []byte) *Agent Example agent.Add(\"k1\", \"v1\"). AddBytesK([]byte(\"k1\"), \"v1\"). AddBytesV(\"k1\", []byte(\"v1\")). AddBytesKV([]byte(\"k2\"), []byte(\"v2\")) // Headers: // K1: v1 // K1: v1 // K1: v1 // K2: v2","s":"Add","u":"/api/client","h":"#add","p":1268},{"i":1280,"t":"ConnectionClose adds the Connection: close header. Signature func (a *Agent) ConnectionClose() *Agent Example agent.ConnectionClose() // ...","s":"ConnectionClose","u":"/api/client","h":"#connectionclose","p":1268},{"i":1282,"t":"UserAgent sets User-Agent header value. Signature func (a *Agent) UserAgent(userAgent string) *Agent func (a *Agent) UserAgentBytes(userAgent []byte) *Agent Example agent.UserAgent(\"fiber\") // ...","s":"UserAgent","u":"/api/client","h":"#useragent","p":1268},{"i":1284,"t":"Cookie sets a cookie in key: value form. Cookies can be used to set multiple cookies. Signature func (a *Agent) Cookie(key, value string) *Agent func (a *Agent) CookieBytesK(key []byte, value string) *Agent func (a *Agent) CookieBytesKV(key, value []byte) *Agent func (a *Agent) Cookies(kv ...string) *Agent func (a *Agent) CookiesBytesKV(kv ...[]byte) *Agent Example agent.Cookie(\"k\", \"v\") agent.Cookies(\"k1\", \"v1\", \"k2\", \"v2\") // ...","s":"Cookie","u":"/api/client","h":"#cookie","p":1268},{"i":1286,"t":"Referer sets the Referer header value. Signature func (a *Agent) Referer(referer string) *Agent func (a *Agent) RefererBytes(referer []byte) *Agent Example agent.Referer(\"https://docs.gofiber.io\") // ...","s":"Referer","u":"/api/client","h":"#referer","p":1268},{"i":1288,"t":"ContentType sets Content-Type header value. Signature func (a *Agent) ContentType(contentType string) *Agent func (a *Agent) ContentTypeBytes(contentType []byte) *Agent Example agent.ContentType(\"custom-type\") // ...","s":"ContentType","u":"/api/client","h":"#contenttype","p":1268},{"i":1290,"t":"Host sets the Host header. Signature func (a *Agent) Host(host string) *Agent func (a *Agent) HostBytes(host []byte) *Agent Example agent.Host(\"example.com\") // ...","s":"Host","u":"/api/client","h":"#host","p":1268},{"i":1292,"t":"QueryString sets the URI query string. Signature func (a *Agent) QueryString(queryString string) *Agent func (a *Agent) QueryStringBytes(queryString []byte) *Agent Example agent.QueryString(\"foo=bar\") // ...","s":"QueryString","u":"/api/client","h":"#querystring","p":1268},{"i":1294,"t":"BasicAuth sets the URI username and password using HTTP Basic Auth. Signature func (a *Agent) BasicAuth(username, password string) *Agent func (a *Agent) BasicAuthBytes(username, password []byte) *Agent Example agent.BasicAuth(\"foo\", \"bar\") // ...","s":"BasicAuth","u":"/api/client","h":"#basicauth","p":1268},{"i":1296,"t":"There are several ways to set request body. Signature func (a *Agent) BodyString(bodyString string) *Agent func (a *Agent) Body(body []byte) *Agent // BodyStream sets request body stream and, optionally body size. // // If bodySize is >= 0, then the bodyStream must provide exactly bodySize bytes // before returning io.EOF. // // If bodySize < 0, then bodyStream is read until io.EOF. // // bodyStream.Close() is called after finishing reading all body data // if it implements io.Closer. // // Note that GET and HEAD requests cannot have body. func (a *Agent) BodyStream(bodyStream io.Reader, bodySize int) *Agent Example agent.BodyString(\"foo=bar\") agent.Body([]byte(\"bar=baz\")) agent.BodyStream(strings.NewReader(\"body=stream\"), -1) // ...","s":"Body","u":"/api/client","h":"#body","p":1268},{"i":1298,"t":"JSON sends a JSON request by setting the Content-Type header to application/json. Signature func (a *Agent) JSON(v interface{}) *Agent Example agent.JSON(fiber.Map{\"success\": true}) // ...","s":"JSON","u":"/api/client","h":"#json","p":1268},{"i":1300,"t":"XML sends an XML request by setting the Content-Type header to application/xml. Signature func (a *Agent) XML(v interface{}) *Agent Example agent.XML(fiber.Map{\"success\": true}) // ...","s":"XML","u":"/api/client","h":"#xml","p":1268},{"i":1302,"t":"Form sends a form request by setting the Content-Type header to application/x-www-form-urlencoded. Signature // Form sends form request with body if args is non-nil. // // It is recommended obtaining args via AcquireArgs and release it // manually in performance-critical code. func (a *Agent) Form(args *Args) *Agent Example args := AcquireArgs() args.Set(\"foo\", \"bar\") agent.Form(args) // ... ReleaseArgs(args)","s":"Form","u":"/api/client","h":"#form","p":1268},{"i":1304,"t":"MultipartForm sends multipart form request by setting the Content-Type header to multipart/form-data. These requests can include key-value's and files. Signature // MultipartForm sends multipart form request with k-v and files. // // It is recommended to obtain args via AcquireArgs and release it // manually in performance-critical code. func (a *Agent) MultipartForm(args *Args) *Agent Example args := AcquireArgs() args.Set(\"foo\", \"bar\") agent.MultipartForm(args) // ... ReleaseArgs(args) Fiber provides several methods for sending files. Note that they must be called before MultipartForm. Boundary​ Boundary sets boundary for multipart form request. Signature func (a *Agent) Boundary(boundary string) *Agent Example agent.Boundary(\"myBoundary\") .MultipartForm(nil) // ... SendFile(s)​ SendFile read a file and appends it to a multipart form request. Sendfiles can be used to append multiple files. Signature func (a *Agent) SendFile(filename string, fieldname ...string) *Agent func (a *Agent) SendFiles(filenamesAndFieldnames ...string) *Agent Example agent.SendFile(\"f\", \"field name\") .SendFiles(\"f1\", \"field name1\", \"f2\"). .MultipartForm(nil) // ... FileData​ FileData appends file data for multipart form request. // FormFile represents multipart form file type FormFile struct { // Fieldname is form file's field name Fieldname string // Name is form file's name Name string // Content is form file's content Content []byte } Signature // FileData appends files for multipart form request. // // It is recommended obtaining formFile via AcquireFormFile and release it // manually in performance-critical code. func (a *Agent) FileData(formFiles ...*FormFile) *Agent Example ff1 := &FormFile{\"filename1\", \"field name1\", []byte(\"content\")} ff2 := &FormFile{\"filename2\", \"field name2\", []byte(\"content\")} agent.FileData(ff1, ff2). MultipartForm(nil) // ...","s":"MultipartForm","u":"/api/client","h":"#multipartform","p":1268},{"i":1306,"t":"Debug mode enables logging request and response detail to io.writer(default is os.Stdout). Signature func (a *Agent) Debug(w ...io.Writer) *Agent Example agent.Debug() // ...","s":"Debug","u":"/api/client","h":"#debug","p":1268},{"i":1308,"t":"Timeout sets request timeout duration. Signature func (a *Agent) Timeout(timeout time.Duration) *Agent Example agent.Timeout(time.Second) // ...","s":"Timeout","u":"/api/client","h":"#timeout","p":1268},{"i":1310,"t":"Reuse enables the Agent instance to be used again after one request. If agent is reusable, then it should be released manually when it is no longer used. Signature func (a *Agent) Reuse() *Agent Example agent.Reuse() // ...","s":"Reuse","u":"/api/client","h":"#reuse","p":1268},{"i":1312,"t":"InsecureSkipVerify controls whether the Agent verifies the server certificate chain and host name. Signature func (a *Agent) InsecureSkipVerify() *Agent Example agent.InsecureSkipVerify() // ...","s":"InsecureSkipVerify","u":"/api/client","h":"#insecureskipverify","p":1268},{"i":1314,"t":"TLSConfig sets tls config. Signature func (a *Agent) TLSConfig(config *tls.Config) *Agent Example // Create tls certificate cer, _ := tls.LoadX509KeyPair(\"pem\", \"key\") config := &tls.Config{ Certificates: []tls.Certificate{cer}, } agent.TLSConfig(config) // ...","s":"TLSConfig","u":"/api/client","h":"#tlsconfig","p":1268},{"i":1316,"t":"MaxRedirectsCount sets max redirect count for GET and HEAD. Signature func (a *Agent) MaxRedirectsCount(count int) *Agent Example agent.MaxRedirectsCount(7) // ...","s":"MaxRedirectsCount","u":"/api/client","h":"#maxredirectscount","p":1268},{"i":1318,"t":"JSONEncoder sets custom json encoder. Signature func (a *Agent) JSONEncoder(jsonEncoder utils.JSONMarshal) *Agent Example agent.JSONEncoder(json.Marshal) // ...","s":"JSONEncoder","u":"/api/client","h":"#jsonencoder","p":1268},{"i":1320,"t":"JSONDecoder sets custom json decoder. Signature func (a *Agent) JSONDecoder(jsonDecoder utils.JSONUnmarshal) *Agent Example agent.JSONDecoder(json.Unmarshal) // ...","s":"JSONDecoder","u":"/api/client","h":"#jsondecoder","p":1268},{"i":1322,"t":"Request returns Agent request instance. Signature func (a *Agent) Request() *Request Example req := agent.Request() // ...","s":"Request","u":"/api/client","h":"#request","p":1268},{"i":1324,"t":"SetResponse sets custom response for the Agent instance. It is recommended obtaining custom response via AcquireResponse and release it manually in performance-critical code. Signature func (a *Agent) SetResponse(customResp *Response) *Agent Example resp := AcquireResponse() agent.SetResponse(resp) // ... ReleaseResponse(resp)","s":"SetResponse","u":"/api/client","h":"#setresponse","p":1268},{"i":1326,"t":"Dest sets custom dest. The contents of dest will be replaced by the response body, if the dest is too small a new slice will be allocated. Signature func (a *Agent) Dest(dest []byte) *Agent { Example agent.Dest(nil) // ...","s":"Dest","u":"/api/client","h":"#dest","p":1268},{"i":1328,"t":"Bytes returns the status code, bytes body and errors of url. Signature func (a *Agent) Bytes() (code int, body []byte, errs []error) Example code, body, errs := agent.Bytes() // ...","s":"Bytes","u":"/api/client","h":"#bytes","p":1268},{"i":1330,"t":"String returns the status code, string body and errors of url. Signature func (a *Agent) String() (int, string, []error) Example code, body, errs := agent.String() // ...","s":"String","u":"/api/client","h":"#string","p":1268},{"i":1332,"t":"Struct returns the status code, bytes body and errors of url. And bytes body will be unmarshalled to given v. Signature func (a *Agent) Struct(v interface{}) (code int, body []byte, errs []error) Example var d data code, body, errs := agent.Struct(&d) // ...","s":"Struct","u":"/api/client","h":"#struct","p":1268},{"i":1334,"t":"RetryIf controls whether a retry should be attempted after an error. By default, will use isIdempotent function from fasthttp Signature func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent Example agent.Get(\"https://example.com\").RetryIf(func (req *fiber.Request) bool { return req.URI() == \"https://example.com\" }) // ...","s":"RetryIf","u":"/api/client","h":"#retryif","p":1268},{"i":1336,"t":"HTTP methods were copied from net/http. const ( MethodGet = \"GET\" // RFC 7231, 4.3.1 MethodHead = \"HEAD\" // RFC 7231, 4.3.2 MethodPost = \"POST\" // RFC 7231, 4.3.3 MethodPut = \"PUT\" // RFC 7231, 4.3.4 MethodPatch = \"PATCH\" // RFC 5789 MethodDelete = \"DELETE\" // RFC 7231, 4.3.5 MethodConnect = \"CONNECT\" // RFC 7231, 4.3.6 MethodOptions = \"OPTIONS\" // RFC 7231, 4.3.7 MethodTrace = \"TRACE\" // RFC 7231, 4.3.8 methodUse = \"USE\" ) MIME types that are commonly used const ( MIMETextXML = \"text/xml\" MIMETextHTML = \"text/html\" MIMETextPlain = \"text/plain\" MIMEApplicationXML = \"application/xml\" MIMEApplicationJSON = \"application/json\" MIMEApplicationJavaScript = \"application/javascript\" MIMEApplicationForm = \"application/x-www-form-urlencoded\" MIMEOctetStream = \"application/octet-stream\" MIMEMultipartForm = \"multipart/form-data\" MIMETextXMLCharsetUTF8 = \"text/xml; charset=utf-8\" MIMETextHTMLCharsetUTF8 = \"text/html; charset=utf-8\" MIMETextPlainCharsetUTF8 = \"text/plain; charset=utf-8\" MIMEApplicationXMLCharsetUTF8 = \"application/xml; charset=utf-8\" MIMEApplicationJSONCharsetUTF8 = \"application/json; charset=utf-8\" MIMEApplicationJavaScriptCharsetUTF8 = \"application/javascript; charset=utf-8\" ) HTTP status codes were copied from net/http. const ( StatusContinue = 100 // RFC 7231, 6.2.1 StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2 StatusProcessing = 102 // RFC 2518, 10.1 StatusEarlyHints = 103 // RFC 8297 StatusOK = 200 // RFC 7231, 6.3.1 StatusCreated = 201 // RFC 7231, 6.3.2 StatusAccepted = 202 // RFC 7231, 6.3.3 StatusNonAuthoritativeInformation = 203 // RFC 7231, 6.3.4 StatusNoContent = 204 // RFC 7231, 6.3.5 StatusResetContent = 205 // RFC 7231, 6.3.6 StatusPartialContent = 206 // RFC 7233, 4.1 StatusMultiStatus = 207 // RFC 4918, 11.1 StatusAlreadyReported = 208 // RFC 5842, 7.1 StatusIMUsed = 226 // RFC 3229, 10.4.1 StatusMultipleChoices = 300 // RFC 7231, 6.4.1 StatusMovedPermanently = 301 // RFC 7231, 6.4.2 StatusFound = 302 // RFC 7231, 6.4.3 StatusSeeOther = 303 // RFC 7231, 6.4.4 StatusNotModified = 304 // RFC 7232, 4.1 StatusUseProxy = 305 // RFC 7231, 6.4.5 StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7 StatusPermanentRedirect = 308 // RFC 7538, 3 StatusBadRequest = 400 // RFC 7231, 6.5.1 StatusUnauthorized = 401 // RFC 7235, 3.1 StatusPaymentRequired = 402 // RFC 7231, 6.5.2 StatusForbidden = 403 // RFC 7231, 6.5.3 StatusNotFound = 404 // RFC 7231, 6.5.4 StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5 StatusNotAcceptable = 406 // RFC 7231, 6.5.6 StatusProxyAuthRequired = 407 // RFC 7235, 3.2 StatusRequestTimeout = 408 // RFC 7231, 6.5.7 StatusConflict = 409 // RFC 7231, 6.5.8 StatusGone = 410 // RFC 7231, 6.5.9 StatusLengthRequired = 411 // RFC 7231, 6.5.10 StatusPreconditionFailed = 412 // RFC 7232, 4.2 StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11 StatusRequestURITooLong = 414 // RFC 7231, 6.5.12 StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13 StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4 StatusExpectationFailed = 417 // RFC 7231, 6.5.14 StatusTeapot = 418 // RFC 7168, 2.3.3 StatusMisdirectedRequest = 421 // RFC 7540, 9.1.2 StatusUnprocessableEntity = 422 // RFC 4918, 11.2 StatusLocked = 423 // RFC 4918, 11.3 StatusFailedDependency = 424 // RFC 4918, 11.4 StatusTooEarly = 425 // RFC 8470, 5.2. StatusUpgradeRequired = 426 // RFC 7231, 6.5.15 StatusPreconditionRequired = 428 // RFC 6585, 3 StatusTooManyRequests = 429 // RFC 6585, 4 StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5 StatusUnavailableForLegalReasons = 451 // RFC 7725, 3 StatusInternalServerError = 500 // RFC 7231, 6.6.1 StatusNotImplemented = 501 // RFC 7231, 6.6.2 StatusBadGateway = 502 // RFC 7231, 6.6.3 StatusServiceUnavailable = 503 // RFC 7231, 6.6.4 StatusGatewayTimeout = 504 // RFC 7231, 6.6.5 StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6 StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1 StatusInsufficientStorage = 507 // RFC 4918, 11.5 StatusLoopDetected = 508 // RFC 5842, 7.2 StatusNotExtended = 510 // RFC 2774, 7 StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6 ) Errors var ( ErrBadRequest = NewError(StatusBadRequest) // RFC 7231, 6.5.1 ErrUnauthorized = NewError(StatusUnauthorized) // RFC 7235, 3.1 ErrPaymentRequired = NewError(StatusPaymentRequired) // RFC 7231, 6.5.2 ErrForbidden = NewError(StatusForbidden) // RFC 7231, 6.5.3 ErrNotFound = NewError(StatusNotFound) // RFC 7231, 6.5.4 ErrMethodNotAllowed = NewError(StatusMethodNotAllowed) // RFC 7231, 6.5.5 ErrNotAcceptable = NewError(StatusNotAcceptable) // RFC 7231, 6.5.6 ErrProxyAuthRequired = NewError(StatusProxyAuthRequired) // RFC 7235, 3.2 ErrRequestTimeout = NewError(StatusRequestTimeout) // RFC 7231, 6.5.7 ErrConflict = NewError(StatusConflict) // RFC 7231, 6.5.8 ErrGone = NewError(StatusGone) // RFC 7231, 6.5.9 ErrLengthRequired = NewError(StatusLengthRequired) // RFC 7231, 6.5.10 ErrPreconditionFailed = NewError(StatusPreconditionFailed) // RFC 7232, 4.2 ErrRequestEntityTooLarge = NewError(StatusRequestEntityTooLarge) // RFC 7231, 6.5.11 ErrRequestURITooLong = NewError(StatusRequestURITooLong) // RFC 7231, 6.5.12 ErrUnsupportedMediaType = NewError(StatusUnsupportedMediaType) // RFC 7231, 6.5.13 ErrRequestedRangeNotSatisfiable = NewError(StatusRequestedRangeNotSatisfiable) // RFC 7233, 4.4 ErrExpectationFailed = NewError(StatusExpectationFailed) // RFC 7231, 6.5.14 ErrTeapot = NewError(StatusTeapot) // RFC 7168, 2.3.3 ErrMisdirectedRequest = NewError(StatusMisdirectedRequest) // RFC 7540, 9.1.2 ErrUnprocessableEntity = NewError(StatusUnprocessableEntity) // RFC 4918, 11.2 ErrLocked = NewError(StatusLocked) // RFC 4918, 11.3 ErrFailedDependency = NewError(StatusFailedDependency) // RFC 4918, 11.4 ErrTooEarly = NewError(StatusTooEarly) // RFC 8470, 5.2. ErrUpgradeRequired = NewError(StatusUpgradeRequired) // RFC 7231, 6.5.15 ErrPreconditionRequired = NewError(StatusPreconditionRequired) // RFC 6585, 3 ErrTooManyRequests = NewError(StatusTooManyRequests) // RFC 6585, 4 ErrRequestHeaderFieldsTooLarge = NewError(StatusRequestHeaderFieldsTooLarge) // RFC 6585, 5 ErrUnavailableForLegalReasons = NewError(StatusUnavailableForLegalReasons) // RFC 7725, 3 ErrInternalServerError = NewError(StatusInternalServerError) // RFC 7231, 6.6.1 ErrNotImplemented = NewError(StatusNotImplemented) // RFC 7231, 6.6.2 ErrBadGateway = NewError(StatusBadGateway) // RFC 7231, 6.6.3 ErrServiceUnavailable = NewError(StatusServiceUnavailable) // RFC 7231, 6.6.4 ErrGatewayTimeout = NewError(StatusGatewayTimeout) // RFC 7231, 6.6.5 ErrHTTPVersionNotSupported = NewError(StatusHTTPVersionNotSupported) // RFC 7231, 6.6.6 ErrVariantAlsoNegotiates = NewError(StatusVariantAlsoNegotiates) // RFC 2295, 8.1 ErrInsufficientStorage = NewError(StatusInsufficientStorage) // RFC 4918, 11.5 ErrLoopDetected = NewError(StatusLoopDetected) // RFC 5842, 7.2 ErrNotExtended = NewError(StatusNotExtended) // RFC 2774, 7 ErrNetworkAuthenticationRequired = NewError(StatusNetworkAuthenticationRequired) // RFC 6585, 6 ) HTTP Headers were copied from net/http. const ( HeaderAuthorization = \"Authorization\" HeaderProxyAuthenticate = \"Proxy-Authenticate\" HeaderProxyAuthorization = \"Proxy-Authorization\" HeaderWWWAuthenticate = \"WWW-Authenticate\" HeaderAge = \"Age\" HeaderCacheControl = \"Cache-Control\" HeaderClearSiteData = \"Clear-Site-Data\" HeaderExpires = \"Expires\" HeaderPragma = \"Pragma\" HeaderWarning = \"Warning\" HeaderAcceptCH = \"Accept-CH\" HeaderAcceptCHLifetime = \"Accept-CH-Lifetime\" HeaderContentDPR = \"Content-DPR\" HeaderDPR = \"DPR\" HeaderEarlyData = \"Early-Data\" HeaderSaveData = \"Save-Data\" HeaderViewportWidth = \"Viewport-Width\" HeaderWidth = \"Width\" HeaderETag = \"ETag\" HeaderIfMatch = \"If-Match\" HeaderIfModifiedSince = \"If-Modified-Since\" HeaderIfNoneMatch = \"If-None-Match\" HeaderIfUnmodifiedSince = \"If-Unmodified-Since\" HeaderLastModified = \"Last-Modified\" HeaderVary = \"Vary\" HeaderConnection = \"Connection\" HeaderKeepAlive = \"Keep-Alive\" HeaderAccept = \"Accept\" HeaderAcceptCharset = \"Accept-Charset\" HeaderAcceptEncoding = \"Accept-Encoding\" HeaderAcceptLanguage = \"Accept-Language\" HeaderCookie = \"Cookie\" HeaderExpect = \"Expect\" HeaderMaxForwards = \"Max-Forwards\" HeaderSetCookie = \"Set-Cookie\" HeaderAccessControlAllowCredentials = \"Access-Control-Allow-Credentials\" HeaderAccessControlAllowHeaders = \"Access-Control-Allow-Headers\" HeaderAccessControlAllowMethods = \"Access-Control-Allow-Methods\" HeaderAccessControlAllowOrigin = \"Access-Control-Allow-Origin\" HeaderAccessControlExposeHeaders = \"Access-Control-Expose-Headers\" HeaderAccessControlMaxAge = \"Access-Control-Max-Age\" HeaderAccessControlRequestHeaders = \"Access-Control-Request-Headers\" HeaderAccessControlRequestMethod = \"Access-Control-Request-Method\" HeaderOrigin = \"Origin\" HeaderTimingAllowOrigin = \"Timing-Allow-Origin\" HeaderXPermittedCrossDomainPolicies = \"X-Permitted-Cross-Domain-Policies\" HeaderDNT = \"DNT\" HeaderTk = \"Tk\" HeaderContentDisposition = \"Content-Disposition\" HeaderContentEncoding = \"Content-Encoding\" HeaderContentLanguage = \"Content-Language\" HeaderContentLength = \"Content-Length\" HeaderContentLocation = \"Content-Location\" HeaderContentType = \"Content-Type\" HeaderForwarded = \"Forwarded\" HeaderVia = \"Via\" HeaderXForwardedFor = \"X-Forwarded-For\" HeaderXForwardedHost = \"X-Forwarded-Host\" HeaderXForwardedProto = \"X-Forwarded-Proto\" HeaderXForwardedProtocol = \"X-Forwarded-Protocol\" HeaderXForwardedSsl = \"X-Forwarded-Ssl\" HeaderXUrlScheme = \"X-Url-Scheme\" HeaderLocation = \"Location\" HeaderFrom = \"From\" HeaderHost = \"Host\" HeaderReferer = \"Referer\" HeaderReferrerPolicy = \"Referrer-Policy\" HeaderUserAgent = \"User-Agent\" HeaderAllow = \"Allow\" HeaderServer = \"Server\" HeaderAcceptRanges = \"Accept-Ranges\" HeaderContentRange = \"Content-Range\" HeaderIfRange = \"If-Range\" HeaderRange = \"Range\" HeaderContentSecurityPolicy = \"Content-Security-Policy\" HeaderContentSecurityPolicyReportOnly = \"Content-Security-Policy-Report-Only\" HeaderCrossOriginResourcePolicy = \"Cross-Origin-Resource-Policy\" HeaderExpectCT = \"Expect-CT\" HeaderFeaturePolicy = \"Feature-Policy\" HeaderPublicKeyPins = \"Public-Key-Pins\" HeaderPublicKeyPinsReportOnly = \"Public-Key-Pins-Report-Only\" HeaderStrictTransportSecurity = \"Strict-Transport-Security\" HeaderUpgradeInsecureRequests = \"Upgrade-Insecure-Requests\" HeaderXContentTypeOptions = \"X-Content-Type-Options\" HeaderXDownloadOptions = \"X-Download-Options\" HeaderXFrameOptions = \"X-Frame-Options\" HeaderXPoweredBy = \"X-Powered-By\" HeaderXXSSProtection = \"X-XSS-Protection\" HeaderLastEventID = \"Last-Event-ID\" HeaderNEL = \"NEL\" HeaderPingFrom = \"Ping-From\" HeaderPingTo = \"Ping-To\" HeaderReportTo = \"Report-To\" HeaderTE = \"TE\" HeaderTrailer = \"Trailer\" HeaderTransferEncoding = \"Transfer-Encoding\" HeaderSecWebSocketAccept = \"Sec-WebSocket-Accept\" HeaderSecWebSocketExtensions = \"Sec-WebSocket-Extensions\" HeaderSecWebSocketKey = \"Sec-WebSocket-Key\" HeaderSecWebSocketProtocol = \"Sec-WebSocket-Protocol\" HeaderSecWebSocketVersion = \"Sec-WebSocket-Version\" HeaderAcceptPatch = \"Accept-Patch\" HeaderAcceptPushPolicy = \"Accept-Push-Policy\" HeaderAcceptSignature = \"Accept-Signature\" HeaderAltSvc = \"Alt-Svc\" HeaderDate = \"Date\" HeaderIndex = \"Index\" HeaderLargeAllocation = \"Large-Allocation\" HeaderLink = \"Link\" HeaderPushPolicy = \"Push-Policy\" HeaderRetryAfter = \"Retry-After\" HeaderServerTiming = \"Server-Timing\" HeaderSignature = \"Signature\" HeaderSignedHeaders = \"Signed-Headers\" HeaderSourceMap = \"SourceMap\" HeaderUpgrade = \"Upgrade\" HeaderXDNSPrefetchControl = \"X-DNS-Prefetch-Control\" HeaderXPingback = \"X-Pingback\" HeaderXRequestID = \"X-Request-ID\" HeaderXRequestedWith = \"X-Requested-With\" HeaderXRobotsTag = \"X-Robots-Tag\" HeaderXUACompatible = \"X-UA-Compatible\" )","s":"📋 Constants","u":"/api/constants","h":"","p":1335},{"i":1339,"t":"This method creates a new App named instance. You can pass optional config when creating a new instance. Signature func New(config ...Config) *App Example // Default config app := fiber.New() // ...","s":"New","u":"/api/fiber","h":"#new","p":1337},{"i":1341,"t":"You can pass an optional Config when creating a new Fiber instance. Example // Custom config app := fiber.New(fiber.Config{ Prefork: true, CaseSensitive: true, StrictRouting: true, ServerHeader: \"Fiber\", AppName: \"Test App v1.0.1\" }) // ... Config fields Property Type Description Default AppName string This allows to setup app name for the app \"\" 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 CaseSensitive bool When enabled, /Foo and /foo are different routes. When disabled, /Fooand /foo are treated the same. false ColorScheme Colors You can define custom color scheme. They'll be used for startup message, route list and some middlewares. DefaultColors CompressedFileSuffix string Adds a suffix to the original file name and tries saving the resulting compressed file under the new file name. \".fiber.gz\" Concurrency int Maximum number of concurrent connections. 256 * 1024 DisableDefaultContentType bool When set to true, causes the default Content-Type header to be excluded from the Response. false DisableDefaultDate bool When set to true causes the default date header to be excluded from the response. false DisableHeaderNormalizing bool By default all header names are normalized: conteNT-tYPE -> Content-Type false DisableKeepalive bool Disable keep-alive connections, the server will close incoming connections after sending the first response to the client false DisablePreParseMultipartForm bool Will not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data. false DisableStartupMessage bool When set to true, it will not print out debug information false ETag bool Enable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method (CRC-32). Weak ETags are the default when enabled. false EnableIPValidation bool If set to true, c.IP() and c.IPs() will validate IP addresses before returning them. Also, c.IP() will return only the first valid IP rather than just the raw header value that may be a comma seperated string. WARNING: There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header. false EnablePrintRoutes bool EnablePrintRoutes enables print all routes with their method, path, name and handler.. false EnableTrustedProxyCheck bool When set to true, fiber will check whether proxy is trusted, using TrustedProxies list. By default c.Protocol() will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, c.IP() will get value from ProxyHeader header, c.Hostname() will get value from X-Forwarded-Host header. If EnableTrustedProxyCheck is true, and RemoteIP is in the list of TrustedProxies c.Protocol(), c.IP(), and c.Hostname() will have the same behaviour when EnableTrustedProxyCheck disabled, if RemoteIP isn't in the list, c.Protocol() will return https in case when tls connection is handled by the app, or http otherwise, c.IP() will return RemoteIP() from fasthttp context, c.Hostname() will return fasthttp.Request.URI().Host() false ErrorHandler ErrorHandler ErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests. DefaultErrorHandler GETOnly bool Rejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set. false 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 Immutable bool When enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue #185. false JSONDecoder utils.JSONUnmarshal Allowing for flexibility in using another json library for decoding. json.Unmarshal JSONEncoder utils.JSONMarshal Allowing for flexibility in using another json library for encoding. json.Marshal Network string Known networks are \"tcp\", \"tcp4\" (IPv4-only), \"tcp6\" (IPv6-only) WARNING: When prefork is set to true, only \"tcp4\" and \"tcp6\" can be chosen. NetworkTCP4 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 Prefork bool Enables use of theSO_REUSEPORTsocket option. This will spawn multiple Go processes listening on the same port. learn more about socket sharding. NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with CMD ./app or CMD [\"sh\", \"-c\", \"/app\"]. For more info, see this issue comment. false ProxyHeader string This will enable c.IP() to return the value of the given header key. By default c.IP()will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. X-Forwarded-*. \"\" ReadBufferSize int per-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies). 4096 ReadTimeout time.Duration The amount of time allowed to read the full request, including the body. The default timeout is unlimited. nil RequestMethods []string RequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish. DefaultMethods ServerHeader string Enables the Server HTTP header with the given value. \"\" StreamRequestBody bool StreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit. false StrictRouting bool When enabled, the router treats /foo and /foo/ as different. Otherwise, the router treats /foo and /foo/ as the same. false TrustedProxies []string Contains the list of trusted proxy IP's. Look at EnableTrustedProxyCheck doc. It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses. []string*__* UnescapePath bool Converts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special characters false 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. \"\" WriteBufferSize int Per-connection buffer size for responses' writing. 4096 WriteTimeout time.Duration The maximum duration before timing out writes of the response. The default timeout is unlimited. nil XMLEncoder utils.XMLMarshal Allowing for flexibility in using another XML library for encoding. xml.Marshal","s":"Config","u":"/api/fiber","h":"#config","p":1337},{"i":1343,"t":"NewError creates a new HTTPError instance with an optional message. Signature func NewError(code int, message ...string) *Error Example app.Get(\"/\", func(c *fiber.Ctx) error { return fiber.NewError(782, \"Custom error message\") })","s":"NewError","u":"/api/fiber","h":"#newerror","p":1337},{"i":1345,"t":"IsChild determines if the current process is a result of Prefork. Signature func IsChild() bool Example // Prefork will spawn child processes app := fiber.New(fiber.Config{ Prefork: true, }) if !fiber.IsChild() { fmt.Println(\"I'm the parent process\") } else { fmt.Println(\"I'm a child process\") } // ...","s":"IsChild","u":"/api/fiber","h":"#ischild","p":1337},{"i":1347,"t":"Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!","s":"Adaptor","u":"/api/middleware/adaptor","h":"","p":1346},{"i":1349,"t":"Name Signature Description HTTPHandler HTTPHandler(h http.Handler) fiber.Handler http.Handler -> fiber.Handler HTTPHandlerFunc HTTPHandlerFunc(h http.HandlerFunc) fiber.Handler http.HandlerFunc -> fiber.Handler HTTPMiddleware HTTPHandlerFunc(mw func(http.Handler) http.Handler) fiber.Handler func(http.Handler) http.Handler -> fiber.Handler FiberHandler FiberHandler(h fiber.Handler) http.Handler fiber.Handler -> http.Handler FiberHandlerFunc FiberHandlerFunc(h fiber.Handler) http.HandlerFunc fiber.Handler -> http.HandlerFunc FiberApp FiberApp(app *fiber.App) http.HandlerFunc Fiber app -> http.HandlerFunc ConvertRequest ConvertRequest(c *fiber.Ctx, forServer bool) (*http.Request, error) fiber.Ctx -> http.Request CopyContextToFiberContext CopyContextToFiberContext(context interface{}, requestContext *fasthttp.RequestCtx) context.Context -> fasthttp.RequestCtx","s":"Signatures","u":"/api/middleware/adaptor","h":"#signatures","p":1346},{"i":1352,"t":"package main import ( \"fmt\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // New fiber app app := fiber.New() // http.Handler -> fiber.Handler app.Get(\"/\", adaptor.HTTPHandler(handler(greet))) // http.HandlerFunc -> fiber.Handler app.Get(\"/func\", adaptor.HTTPHandlerFunc(greet)) // Listen on port 3000 app.Listen(\":3000\") } func handler(f http.HandlerFunc) http.Handler { return http.HandlerFunc(f) } func greet(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, \"Hello World!\") }","s":"net/http to Fiber","u":"/api/middleware/adaptor","h":"#nethttp-to-fiber","p":1346},{"i":1354,"t":"package main import ( \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // New fiber app app := fiber.New() // http middleware -> fiber.Handler app.Use(adaptor.HTTPMiddleware(logMiddleware)) // Listen on port 3000 app.Listen(\":3000\") } func logMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { log.Println(\"log middleware\") next.ServeHTTP(w, r) }) }","s":"net/http middleware to Fiber","u":"/api/middleware/adaptor","h":"#nethttp-middleware-to-fiber","p":1346},{"i":1356,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // fiber.Handler -> http.Handler http.Handle(\"/\", adaptor.FiberHandler(greet)) // fiber.Handler -> http.HandlerFunc http.HandleFunc(\"/func\", adaptor.FiberHandlerFunc(greet)) // Listen on port 3000 http.ListenAndServe(\":3000\", nil) } func greet(c *fiber.Ctx) error { return c.SendString(\"Hello World!\") }","s":"Fiber Handler to net/http","u":"/api/middleware/adaptor","h":"#fiber-handler-to-nethttp","p":1346},{"i":1358,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { app := fiber.New() app.Get(\"/greet\", greet) // Listen on port 3000 http.ListenAndServe(\":3000\", adaptor.FiberApp(app)) } func greet(c *fiber.Ctx) error { return c.SendString(\"Hello World!\") }","s":"Fiber App to net/http","u":"/api/middleware/adaptor","h":"#fiber-app-to-nethttp","p":1346},{"i":1360,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { app := fiber.New() app.Get(\"/greet\", greetWithHTTPReq) // Listen on port 3000 http.ListenAndServe(\":3000\", adaptor.FiberApp(app)) } func greetWithHTTPReq(c *fiber.Ctx) error { httpReq, err := adaptor.ConvertRequest(c, false) if err != nil { return err } return c.SendString(\"Request URL: \" + httpReq.URL.String()) }","s":"Fiber Context to (net/http).Request","u":"/api/middleware/adaptor","h":"#fiber-context-to-nethttprequest","p":1346},{"i":1362,"t":"Basic Authentication middleware for Fiber that provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized or a custom response for missing or invalid credentials.","s":"BasicAuth","u":"/api/middleware/basicauth","h":"","p":1361},{"i":1364,"t":"func New(config Config) fiber.Handler","s":"Signatures","u":"/api/middleware/basicauth","h":"#signatures","p":1361},{"i":1366,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/basicauth\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config app.Use(basicauth.New(basicauth.Config{ Users: map[string]string{ \"john\": \"doe\", \"admin\": \"123456\", }, })) // Or extend your config for customization app.Use(basicauth.New(basicauth.Config{ Users: map[string]string{ \"john\": \"doe\", \"admin\": \"123456\", }, Realm: \"Forbidden\", Authorizer: func(user, pass string) bool { if user == \"john\" && pass == \"doe\" { return true } if user == \"admin\" && pass == \"123456\" { return true } return false }, Unauthorized: func(c *fiber.Ctx) error { return c.SendFile(\"./unauthorized.html\") }, ContextUsername: \"_user\", ContextPassword: \"_pass\", }))","s":"Examples","u":"/api/middleware/basicauth","h":"#examples","p":1361},{"i":1368,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Users defines the allowed credentials // // Required. Default: map[string]string{} Users map[string]string // Realm is a string to define realm attribute of BasicAuth. // the realm identifies the system to authenticate against // and can be used by clients to save credentials // // Optional. Default: \"Restricted\". Realm string // Authorizer defines a function you can pass // to check the credentials however you want. // It will be called with a username and password // and is expected to return true or false to indicate // that the credentials were approved or not. // // Optional. Default: nil. Authorizer func(string, string) bool // Unauthorized defines the response body for unauthorized responses. // By default it will return with a 401 Unauthorized and the correct WWW-Auth header // // Optional. Default: nil Unauthorized fiber.Handler // ContextUser is the key to store the username in Locals // // Optional. Default: \"username\" ContextUsername string // ContextPass is the key to store the password in Locals // // Optional. Default: \"password\" ContextPassword string }","s":"Config","u":"/api/middleware/basicauth","h":"#config","p":1361},{"i":1370,"t":"var ConfigDefault = Config{ Next: nil, Users: map[string]string{}, Realm: \"Restricted\", Authorizer: nil, Unauthorized: nil, ContextUsername: \"username\", ContextPassword: \"password\", }","s":"Default Config","u":"/api/middleware/basicauth","h":"#default-config","p":1361},{"i":1372,"t":"Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core! Request Directives Cache-Control: no-cache will return the up-to-date response but still caches it. You will always get a miss cache status. Cache-Control: no-store will refrain from caching. You will always get the up-to-date response.","s":"Cache","u":"/api/middleware/cache","h":"","p":1371},{"i":1374,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/cache","h":"#signatures","p":1371},{"i":1376,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/cache\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(cache.New()) // Or extend your config for customization app.Use(cache.New(cache.Config{ Next: func(c *fiber.Ctx) bool { return c.Query(\"refresh\") == \"true\" }, Expiration: 30 * time.Minute, CacheControl: true, })) Or you can custom key and expire time like this: app.Use(cache.New(cache.Config{ ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration { newCacheTime, _ := strconv.Atoi(c.GetRespHeader(\"Cache-Time\", \"600\")) return time.Second * time.Duration(newCacheTime) }, KeyGenerator: func(c *fiber.Ctx) string { return utils.CopyString(c.Path()) }, })) app.Get(\"/\", func(c *fiber.Ctx) error { c.Response().Header.Add(\"Cache-Time\", \"6000\") return c.SendString(\"hi\") })","s":"Examples","u":"/api/middleware/cache","h":"#examples","p":1371},{"i":1378,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Expiration is the time that an cached response will live // // Optional. Default: 1 * time.Minute Expiration time.Duration // CacheHeader header on response header, indicate cache status, with the following possible return value // // hit, miss, unreachable // // Optional. Default: X-Cache CacheHeader string // CacheControl enables client side caching if set to true // // Optional. Default: false CacheControl bool // Key allows you to generate custom keys, by default c.Path() is used // // Default: func(c *fiber.Ctx) string { // return utils.CopyString(c.Path()) // } 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 // Store is used to store the state of the middleware // // Default: an in memory store for this process only Storage fiber.Storage // allows you to store additional headers generated by next middlewares & handler // // Default: false StoreResponseHeaders bool // Max number of bytes of response bodies simultaneously stored in cache. When limit is reached, // entries with the nearest expiration are deleted to make room for new. // 0 means no limit // // Default: 0 MaxBytes uint // You can specify HTTP methods to cache. // The middleware just caches the routes of its methods in this slice. // // Default: []string{fiber.MethodGet, fiber.MethodHead} Methods []string }","s":"Config","u":"/api/middleware/cache","h":"#config","p":1371},{"i":1380,"t":"var ConfigDefault = Config{ Next: nil, Expiration: 1 * time.Minute, CacheHeader: \"X-Cache\", CacheControl: false, KeyGenerator: func(c *fiber.Ctx) string { return utils.CopyString(c.Path()) }, ExpirationGenerator: nil, StoreResponseHeaders: false, Storage: nil, MaxBytes: 0, Methods: []string{fiber.MethodGet, fiber.MethodHead}, }","s":"Default Config","u":"/api/middleware/cache","h":"#default-config","p":1371},{"i":1382,"t":"Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.","s":"Compress","u":"/api/middleware/compress","h":"","p":1381},{"i":1384,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/compress","h":"#signatures","p":1381},{"i":1386,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/compress\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(compress.New()) // Or extend your config for customization app.Use(compress.New(compress.Config{ Level: compress.LevelBestSpeed, // 1 })) // Skip middleware for specific routes app.Use(compress.New(compress.Config{ Next: func(c *fiber.Ctx) bool { return c.Path() == \"/dont_compress\" }, Level: compress.LevelBestSpeed, // 1 }))","s":"Examples","u":"/api/middleware/compress","h":"#examples","p":1381},{"i":1388,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Level determines the compression algoritm // // Optional. Default: LevelDefault // LevelDisabled: -1 // LevelDefault: 0 // LevelBestSpeed: 1 // LevelBestCompression: 2 Level int }","s":"Config","u":"/api/middleware/compress","h":"#config","p":1381},{"i":1390,"t":"var ConfigDefault = Config{ Next: nil, Level: LevelDefault, }","s":"Default Config","u":"/api/middleware/compress","h":"#default-config","p":1381},{"i":1392,"t":"// Compression levels const ( LevelDisabled = -1 LevelDefault = 0 LevelBestSpeed = 1 LevelBestCompression = 2 )","s":"Constants","u":"/api/middleware/compress","h":"#constants","p":1381},{"i":1394,"t":"CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.","s":"CORS","u":"/api/middleware/cors","h":"","p":1393},{"i":1396,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/cors","h":"#signatures","p":1393},{"i":1398,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/cors\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(cors.New()) // Or extend your config for customization app.Use(cors.New(cors.Config{ AllowOrigins: \"https://gofiber.io, https://gofiber.net\", AllowHeaders: \"Origin, Content-Type, Accept\", })) Using the AllowOriginsFunc function. In this example any origin will be allowed via CORS. For example, if a browser running on http://localhost:3000 sends a request, this will be accepted and the access-control-allow-origin response header will be set to http://localhost:3000. Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via AllowOrigins. app.Use(cors.New()) app.Use(cors.New(cors.Config{ AllowOriginsFunc: func(origin string) bool { return os.Getenv(\"ENVIRONMENT\") == \"development\" }, }))","s":"Examples","u":"/api/middleware/cors","h":"#examples","p":1393},{"i":1400,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // AllowOriginsFunc defines a function that will set the 'access-control-allow-origin' // response header to the 'origin' request header when returned true. // // Note: Using this feature is discouraged in production and it's best practice to explicitly // set CORS origins via 'AllowOrigins' // // Optional. Default: nil AllowOriginsFunc func(origin string) bool // AllowOrigin defines a list of origins that may access the resource. // // Optional. Default value \"*\" AllowOrigins string // AllowMethods defines a list methods allowed when accessing the resource. // This is used in response to a preflight request. // // Optional. Default value \"GET,POST,HEAD,PUT,DELETE,PATCH\" AllowMethods string // AllowHeaders defines a list of request headers that can be used when // making the actual request. This is in response to a preflight request. // // Optional. Default value \"\". AllowHeaders string // AllowCredentials indicates whether or not the response to the request // can be exposed when the credentials flag is true. When used as part of // a response to a preflight request, this indicates whether or not the // actual request can be made using credentials. // // Optional. Default value false. AllowCredentials bool // ExposeHeaders defines a whitelist headers that clients are allowed to // access. // // Optional. Default value \"\". ExposeHeaders string // MaxAge indicates how long (in seconds) the results of a preflight request // can be cached. // // Optional. Default value 0. MaxAge int }","s":"Config","u":"/api/middleware/cors","h":"#config","p":1393},{"i":1402,"t":"var ConfigDefault = Config{ Next: nil, AllowOriginsFunc: nil, AllowOrigins: \"*\", AllowMethods: strings.Join([]string{ fiber.MethodGet, fiber.MethodPost, fiber.MethodHead, fiber.MethodPut, fiber.MethodDelete, fiber.MethodPatch, }, \",\"), AllowHeaders: \"\", AllowCredentials: false, ExposeHeaders: \"\", MaxAge: 0, }","s":"Default Config","u":"/api/middleware/cors","h":"#default-config","p":1393},{"i":1404,"t":"CSRF middleware for Fiber that provides Cross-site request forgery protection by passing a csrf token via cookies. This cookie value will be used to compare against the client csrf token on requests, other than those defined as \"safe\" by RFC7231 (GET, HEAD, OPTIONS, or TRACE). When the csrf token is invalid, this middleware will return the fiber.ErrForbidden error. CSRF Tokens are generated on GET requests. You can retrieve the CSRF token with c.Locals(contextKey), where contextKey is the string you set in the config (see Custom Config below). When no csrf_ cookie is set, or the token has expired, a new token will be generated and csrf_ cookie set. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.","s":"CSRF","u":"/api/middleware/csrf","h":"","p":1403},{"i":1406,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/csrf","h":"#signatures","p":1403},{"i":1408,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/csrf\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(csrf.New()) // Or extend your config for customization app.Use(csrf.New(csrf.Config{ KeyLookup: \"header:X-Csrf-Token\", CookieName: \"csrf_\", CookieSameSite: \"Lax\", Expiration: 1 * time.Hour, KeyGenerator: utils.UUID, Extractor: func(c *fiber.Ctx) (string, error) { ... }, })) note KeyLookup will be ignored if Extractor is explicitly set.","s":"Examples","u":"/api/middleware/csrf","h":"#examples","p":1403},{"i":1410,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // KeyLookup is a string in the form of \":\" that is used // to create an Extractor that extracts the token from the request. // Possible values: // - \"header:\" // - \"query:\" // - \"param:\" // - \"form:\" // - \"cookie:\" // // Ignored if an Extractor is explicitly set. // // Optional. Default: \"header:X-CSRF-Token\" KeyLookup string // Name of the session cookie. This cookie will store session key. // Optional. Default value \"csrf_\". CookieName string // Domain of the CSRF cookie. // Optional. Default value \"\". CookieDomain string // Path of the CSRF cookie. // Optional. Default value \"\". CookiePath string // Indicates if CSRF cookie is secure. // Optional. Default value false. CookieSecure bool // Indicates if CSRF cookie is HTTP only. // Optional. Default value false. CookieHTTPOnly bool // Indicates if CSRF cookie is requested by SameSite. // Optional. Default value \"Lax\". CookieSameSite string // Decides whether cookie should last for only the browser sesison. // Ignores Expiration if set to true CookieSessionOnly bool // Expiration is the duration before csrf token will expire // // Optional. Default: 1 * time.Hour Expiration time.Duration // Store is used to store the state of the middleware // // Optional. Default: memory.New() Storage fiber.Storage // Context key to store generated CSRF token into context. // If left empty, token will not be stored in context. // // Optional. Default: \"\" ContextKey string // KeyGenerator creates a new CSRF token // // Optional. Default: utils.UUID KeyGenerator func() string // Extractor returns the csrf token // // If set this will be used in place of an Extractor based on KeyLookup. // // Optional. Default will create an Extractor based on KeyLookup. Extractor func(c *fiber.Ctx) (string, error) }","s":"Config","u":"/api/middleware/csrf","h":"#config","p":1403},{"i":1412,"t":"var ConfigDefault = Config{ KeyLookup: \"header:\" + HeaderName, CookieName: \"csrf_\", CookieSameSite: \"Lax\", Expiration: 1 * time.Hour, KeyGenerator: utils.UUID, ErrorHandler: defaultErrorHandler, Extractor: CsrfFromHeader(HeaderName), }","s":"Default Config","u":"/api/middleware/csrf","h":"#default-config","p":1403},{"i":1414,"t":"const ( HeaderName = \"X-Csrf-Token\" )","s":"Constants","u":"/api/middleware/csrf","h":"#constants","p":1403},{"i":1416,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 app.Use(csrf.New(csrf.Config{ Storage: storage, }))","s":"Custom Storage/Database","u":"/api/middleware/csrf","h":"#custom-storagedatabase","p":1403},{"i":1418,"t":"The Early Data middleware for Fiber adds support for TLS 1.3's early data (\"0-RTT\") feature. Citing RFC 8446, when a client and server share a PSK, TLS 1.3 allows clients to send data on the first flight (\"early data\") to speed up the request, effectively reducing the regular 1-RTT request to a 0-RTT request. Make sure to enable fiber's EnableTrustedProxyCheck config option before using this middleware in order to not trust bogus HTTP request headers of the client. Also be aware that enabling support for early data in your reverse proxy (e.g. nginx, as done with a simple ssl_early_data on;) makes requests replayable. Refer to the following documents before continuing: https://datatracker.ietf.org/doc/html/rfc8446#section-8 https://blog.trailofbits.com/2019/03/25/what-application-developers-need-to-know-about-tls-early-data-0rtt/ By default, this middleware allows early data requests on safe HTTP request methods only and rejects the request otherwise, i.e. aborts the request before executing your handler. This behavior can be controlled by the AllowEarlyData config option. Safe HTTP methods — GET, HEAD, OPTIONS and TRACE — should not modify a state on the server.","s":"EarlyData","u":"/api/middleware/earlydata","h":"","p":1417},{"i":1420,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/earlydata","h":"#signatures","p":1417},{"i":1422,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/earlydata\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(earlydata.New()) // Or extend your config for customization app.Use(earlydata.New(earlydata.Config{ Error: fiber.ErrTooEarly, // ... }))","s":"Examples","u":"/api/middleware/earlydata","h":"#examples","p":1417},{"i":1424,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // IsEarlyData returns whether the request is an early-data request. // // Optional. Default: a function which checks if the \"Early-Data\" request header equals \"1\". IsEarlyData func(c *fiber.Ctx) bool // AllowEarlyData returns whether the early-data request should be allowed or rejected. // // Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods. AllowEarlyData func(c *fiber.Ctx) bool // Error is returned in case an early-data request is rejected. // // Optional. Default: fiber.ErrTooEarly. Error error }","s":"Config","u":"/api/middleware/earlydata","h":"#config","p":1417},{"i":1426,"t":"var ConfigDefault = Config{ IsEarlyData: func(c *fiber.Ctx) bool { return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue }, AllowEarlyData: func(c *fiber.Ctx) bool { return fiber.IsMethodSafe(c.Method()) }, Error: fiber.ErrTooEarly, }","s":"Default Config","u":"/api/middleware/earlydata","h":"#default-config","p":1417},{"i":1428,"t":"const ( DefaultHeaderName = \"Early-Data\" DefaultHeaderTrueValue = \"1\" )","s":"Constants","u":"/api/middleware/earlydata","h":"#constants","p":1417},{"i":1430,"t":"Encrypt middleware for Fiber which encrypts cookie values. Note: this middleware does not encrypt cookie names.","s":"Encrypt Cookie","u":"/api/middleware/encryptcookie","h":"","p":1429},{"i":1432,"t":"// Intitializes the middleware func New(config ...Config) fiber.Handler // Returns a random 32 character long string func GenerateKey() string","s":"Signatures","u":"/api/middleware/encryptcookie","h":"#signatures","p":1429},{"i":1434,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/encryptcookie\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config // `Key` must be a 32 character string. It's used to encrypt the values, so make sure it is random and keep it secret. // You can run `openssl rand -base64 32` or call `encryptcookie.GenerateKey()` to create a random key for you. // Make sure not to set `Key` to `encryptcookie.GenerateKey()` because that will create a new key every run. app.Use(encryptcookie.New(encryptcookie.Config{ Key: \"secret-thirty-2-character-string\", })) // Get / reading out the encrypted cookie app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"value=\" + c.Cookies(\"test\")) }) // Post / create the encrypted cookie app.Post(\"/\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"test\", Value: \"SomeThing\", }) return nil })","s":"Examples","u":"/api/middleware/encryptcookie","h":"#examples","p":1429},{"i":1436,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Array of cookie keys that should not be encrypted. // // Optional. Default: [\"csrf_\"] Except []string // Base64 encoded unique key to encode & decode cookies. // // Required. The key should be 32 bytes of random data in base64-encoded form. // You may run `openssl rand -base64 32` or use `encryptcookie.GenerateKey()` to generate a new key. Key string // Custom function to encrypt cookies. // // Optional. Default: EncryptCookie Encryptor func(decryptedString, key string) (string, error) // Custom function to decrypt cookies. // // Optional. Default: DecryptCookie Decryptor func(encryptedString, key string) (string, error) }","s":"Config","u":"/api/middleware/encryptcookie","h":"#config","p":1429},{"i":1438,"t":"var ConfigDefault = Config{ Next: nil, Except: []string{\"csrf_\"}, Key: \"\", Encryptor: EncryptCookie, Decryptor: DecryptCookie, }","s":"Default Config","u":"/api/middleware/encryptcookie","h":"#default-config","p":1429},{"i":1440,"t":"Normally, encryptcookie middleware skips csrf_ cookies. However, it won't work when you use custom cookie names for CSRF. You should update Except config to avoid this problem. For example: app.Use(encryptcookie.New(encryptcookie.Config{ Key: \"secret-thirty-2-character-string\", Except: []string{\"csrf_1\"}, // exclude CSRF cookie })) app.Use(csrf.New(csrf.Config{ KeyLookup: \"form:test\", CookieName: \"csrf_1\", CookieHTTPOnly: true, }))","s":"Usage of CSRF and Encryptcookie Middlewares with Custom Cookie Names","u":"/api/middleware/encryptcookie","h":"#usage-of-csrf-and-encryptcookie-middlewares-with-custom-cookie-names","p":1429},{"i":1442,"t":"EnvVar middleware for Fiber that can be used to expose environment variables with various options.","s":"EnvVar","u":"/api/middleware/envvar","h":"","p":1441},{"i":1444,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/envvar","h":"#signatures","p":1441},{"i":1446,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/envvar\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(\"/expose/envvars\", envvar.New()) // Or extend your config for customization app.Use(\"/expose/envvars\", envvar.New( envvar.Config{ ExportVars: map[string]string{\"testKey\": \"\", \"testDefaultKey\": \"testDefaultVal\"}, ExcludeVars: map[string]string{\"excludeKey\": \"\"}, }), ) note You will need to provide a path to use the envvar middleware.","s":"Examples","u":"/api/middleware/envvar","h":"#examples","p":1441},{"i":1448,"t":"Http response contract: { \"vars\": { \"someEnvVariable\": \"someValue\", \"anotherEnvVariable\": \"anotherValue\", } }","s":"Response","u":"/api/middleware/envvar","h":"#response","p":1441},{"i":1450,"t":"// Config defines the config for middleware. type Config struct { // ExportVars specifies the environment variables that should export ExportVars map[string]string // ExcludeVars specifies the environment variables that should not export ExcludeVars map[string]string }","s":"Config","u":"/api/middleware/envvar","h":"#config","p":1441},{"i":1452,"t":"Config{}","s":"Default Config","u":"/api/middleware/envvar","h":"#default-config","p":1441},{"i":1454,"t":"ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.","s":"ETag","u":"/api/middleware/etag","h":"","p":1453},{"i":1456,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/etag","h":"#signatures","p":1453},{"i":1458,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/etag\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(etag.New()) // Get / receives Etag: \"13-1831710635\" in response header app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) // Or extend your config for customization app.Use(etag.New(etag.Config{ Weak: true, })) // Get / receives Etag: \"W/\"13-1831710635\" in response header app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") })","s":"Examples","u":"/api/middleware/etag","h":"#examples","p":1453},{"i":1460,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Weak indicates that a weak validator is used. Weak etags are easy // to generate, but are far less useful for comparisons. Strong // validators are ideal for comparisons but can be very difficult // to generate efficiently. Weak ETag values of two representations // of the same resources might be semantically equivalent, but not // byte-for-byte identical. This means weak etags prevent caching // when byte range requests are used, but strong etags mean range // requests can still be cached. Weak bool }","s":"Config","u":"/api/middleware/etag","h":"#config","p":1453},{"i":1462,"t":"var ConfigDefault = Config{ Next: nil, Weak: false, }","s":"Default Config","u":"/api/middleware/etag","h":"#default-config","p":1453},{"i":1464,"t":"Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.","s":"ExpVar","u":"/api/middleware/expvar","h":"","p":1463},{"i":1466,"t":"func New() fiber.Handler","s":"Signatures","u":"/api/middleware/expvar","h":"#signatures","p":1463},{"i":1468,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" expvarmw \"github.com/gofiber/fiber/v2/middleware/expvar\" ) After you initiate your Fiber app, you can use the following possibilities: var count = expvar.NewInt(\"count\") app.Use(expvarmw.New()) app.Get(\"/\", func(c *fiber.Ctx) error { count.Add(1) return c.SendString(fmt.Sprintf(\"hello expvar count %d\", count.Value())) }) Visit path /debug/vars to see all vars and use query r=key to filter exposed variables. curl 127.0.0.1:3000 hello expvar count 1 curl 127.0.0.1:3000/debug/vars { \"cmdline\": [\"xxx\"], \"count\": 1, \"expvarHandlerCalls\": 33, \"expvarRegexpErrors\": 0, \"memstats\": {...} } curl 127.0.0.1:3000/debug/vars?r=c { \"cmdline\": [\"xxx\"], \"count\": 1 }","s":"Examples","u":"/api/middleware/expvar","h":"#examples","p":1463},{"i":1470,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool }","s":"Config","u":"/api/middleware/expvar","h":"#config","p":1463},{"i":1472,"t":"var ConfigDefault = Config{ Next: nil, }","s":"Default Config","u":"/api/middleware/expvar","h":"#default-config","p":1463},{"i":1474,"t":"Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware. note This middleware is exclusively for serving the default, implicit favicon, which is GET /favicon.ico or custom favicon URL.","s":"Favicon","u":"/api/middleware/favicon","h":"","p":1473},{"i":1476,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/favicon","h":"#signatures","p":1473},{"i":1478,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/favicon\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(favicon.New()) // Or extend your config for customization app.Use(favicon.New(favicon.Config{ File: \"./favicon.ico\", URL: \"/favicon.ico\", }))","s":"Examples","u":"/api/middleware/favicon","h":"#examples","p":1473},{"i":1480,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // File holds the path to an actual favicon that will be cached // // Optional. Default: \"\" File string // URL for favicon handler // // Optional. Default: \"/favicon.ico\" URL string // FileSystem is an optional alternate filesystem to search for the favicon in. // An example of this could be an embedded or network filesystem // // Optional. Default: nil FileSystem http.FileSystem // CacheControl defines how the Cache-Control header in the response should be set // // Optional. Default: \"public, max-age=31536000\" CacheControl string }","s":"Config","u":"/api/middleware/favicon","h":"#config","p":1473},{"i":1482,"t":"var ConfigDefault = Config{ Next: nil, File: \"\", URL: fPath, CacheControl: \"public, max-age=31536000\", }","s":"Default Config","u":"/api/middleware/favicon","h":"#default-config","p":1473},{"i":1484,"t":"Filesystem middleware for Fiber that enables you to serve files from a directory. caution :params & :optionals? within the prefix path are not supported! To handle paths with spaces (or other url encoded values) make sure to set fiber.Config{ UnescapePath: true }","s":"FileSystem","u":"/api/middleware/filesystem","h":"","p":1483},{"i":1486,"t":"func New(config Config) fiber.Handler","s":"Signatures","u":"/api/middleware/filesystem","h":"#signatures","p":1483},{"i":1488,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config app.Use(filesystem.New(filesystem.Config{ Root: http.Dir(\"./assets\"), })) // Or extend your config for customization app.Use(filesystem.New(filesystem.Config{ Root: http.Dir(\"./assets\"), Browse: true, Index: \"index.html\", NotFoundFile: \"404.html\", MaxAge: 3600, })) If your environment (Go 1.16+) supports it, we recommend using Go Embed instead of the other solutions listed as this one is native to Go and the easiest to use.","s":"Examples","u":"/api/middleware/filesystem","h":"#examples","p":1483},{"i":1490,"t":"Embed is the native method to embed files in a Golang excecutable. Introduced in Go 1.16. package main import ( \"embed\" \"io/fs\" \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" ) // Embed a single file //go:embed index.html var f embed.FS // Embed a directory //go:embed static/* var embedDirStatic embed.FS func main() { app := fiber.New() app.Use(\"/\", filesystem.New(filesystem.Config{ Root: http.FS(f), })) // Access file \"image.png\" under `static/` directory via URL: `http:///static/image.png`. // Without `PathPrefix`, you have to access it via URL: // `http:///static/static/image.png`. app.Use(\"/static\", filesystem.New(filesystem.Config{ Root: http.FS(embedDirStatic), PathPrefix: \"static\", Browse: true, })) log.Fatal(app.Listen(\":3000\")) }","s":"embed","u":"/api/middleware/filesystem","h":"#embed","p":1483},{"i":1492,"t":"https://github.com/markbates/pkger package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/markbates/pkger\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: pkger.Dir(\"/assets\"), })) log.Fatal(app.Listen(\":3000\")) }","s":"pkger","u":"/api/middleware/filesystem","h":"#pkger","p":1483},{"i":1494,"t":"https://github.com/gobuffalo/packr package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/gobuffalo/packr/v2\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: packr.New(\"Assets Box\", \"/assets\"), })) log.Fatal(app.Listen(\":3000\")) }","s":"packr","u":"/api/middleware/filesystem","h":"#packr","p":1483},{"i":1496,"t":"https://github.com/GeertJohan/go.rice package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/GeertJohan/go.rice\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: rice.MustFindBox(\"assets\").HTTPBox(), })) log.Fatal(app.Listen(\":3000\")) }","s":"go.rice","u":"/api/middleware/filesystem","h":"#gorice","p":1483},{"i":1498,"t":"https://github.com/UnnoTed/fileb0x package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"/myEmbeddedFiles\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: myEmbeddedFiles.HTTP, })) log.Fatal(app.Listen(\":3000\")) }","s":"fileb0x","u":"/api/middleware/filesystem","h":"#fileb0x","p":1483},{"i":1500,"t":"https://github.com/rakyll/statik package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" // Use blank to invoke init function and register data to statik _ \"/statik\" \"github.com/rakyll/statik/fs\" ) func main() { statikFS, err := fs.New() if err != nil { panic(err) } app := fiber.New() app.Use(\"/\", filesystem.New(filesystem.Config{ Root: statikFS, })) log.Fatal(app.Listen(\":3000\")) }","s":"statik","u":"/api/middleware/filesystem","h":"#statik","p":1483},{"i":1502,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Root is a FileSystem that provides access // to a collection of files and directories. // // Required. Default: nil Root http.FileSystem `json:\"-\"` // PathPrefix defines a prefix to be added to a filepath when // reading a file from the FileSystem. // // Use when using Go 1.16 embed.FS // // Optional. Default \"\" PathPrefix string `json:\"path_prefix\"` // Enable directory browsing. // // Optional. Default: false Browse bool `json:\"browse\"` // Index file for serving a directory. // // Optional. Default: \"index.html\" Index string `json:\"index\"` // The value for the Cache-Control HTTP-header // that is set on the file response. MaxAge is defined in seconds. // // Optional. Default value 0. MaxAge int `json:\"max_age\"` // File to return if path is not found. Useful for SPA's. // // Optional. Default: \"\" NotFoundFile string `json:\"not_found_file\"` // The value for the Content-Type HTTP-header // that is set on the file response // // Optional. Default: \"\" ContentTypeCharset string `json:\"content_type_charset\"` }","s":"Config","u":"/api/middleware/filesystem","h":"#config","p":1483},{"i":1504,"t":"var ConfigDefault = Config{ Next: nil, Root: nil, PathPrefix: \"\", Browse: false, Index: \"/index.html\", MaxAge: 0, ContentTypeCharset: \"\", }","s":"Default Config","u":"/api/middleware/filesystem","h":"#default-config","p":1483},{"i":1506,"t":"Helmet middleware helps secure your apps by setting various HTTP headers.","s":"Helmet","u":"/api/middleware/helmet","h":"","p":1505},{"i":1508,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/helmet","h":"#signatures","p":1505},{"i":1510,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/helmet\" ) func main() { app := fiber.New() app.Use(helmet.New()) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome!\") }) app.Listen(\":3000\") } Test: curl -I http://localhost:3000","s":"Examples","u":"/api/middleware/helmet","h":"#examples","p":1505},{"i":1512,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // XSSProtection // Optional. Default value \"0\". XSSProtection string // ContentTypeNosniff // Optional. Default value \"nosniff\". ContentTypeNosniff string // XFrameOptions // Optional. Default value \"SAMEORIGIN\". // Possible values: \"SAMEORIGIN\", \"DENY\", \"ALLOW-FROM uri\" XFrameOptions string // HSTSMaxAge // Optional. Default value 0. HSTSMaxAge int // HSTSExcludeSubdomains // Optional. Default value false. HSTSExcludeSubdomains bool // ContentSecurityPolicy // Optional. Default value \"\". ContentSecurityPolicy string // CSPReportOnly // Optional. Default value false. CSPReportOnly bool // HSTSPreloadEnabled // Optional. Default value false. HSTSPreloadEnabled bool // ReferrerPolicy // Optional. Default value \"ReferrerPolicy\". ReferrerPolicy string // Permissions-Policy // Optional. Default value \"\". PermissionPolicy string // Cross-Origin-Embedder-Policy // Optional. Default value \"require-corp\". CrossOriginEmbedderPolicy string // Cross-Origin-Opener-Policy // Optional. Default value \"same-origin\". CrossOriginOpenerPolicy string // Cross-Origin-Resource-Policy // Optional. Default value \"same-origin\". CrossOriginResourcePolicy string // Origin-Agent-Cluster // Optional. Default value \"?1\". OriginAgentCluster string // X-DNS-Prefetch-Control // Optional. Default value \"off\". XDNSPrefetchControl string // X-Download-Options // Optional. Default value \"noopen\". XDownloadOptions string // X-Permitted-Cross-Domain-Policies // Optional. Default value \"none\". XPermittedCrossDomain string }","s":"Config","u":"/api/middleware/helmet","h":"#config","p":1505},{"i":1514,"t":"var ConfigDefault = Config{ XSSProtection: \"0\", ContentTypeNosniff: \"nosniff\", XFrameOptions: \"SAMEORIGIN\", ReferrerPolicy: \"no-referrer\", CrossOriginEmbedderPolicy: \"require-corp\", CrossOriginOpenerPolicy: \"same-origin\", CrossOriginResourcePolicy: \"same-origin\", OriginAgentCluster: \"?1\", XDNSPrefetchControl: \"off\", XDownloadOptions: \"noopen\", XPermittedCrossDomain: \"none\", }","s":"Default Config","u":"/api/middleware/helmet","h":"#default-config","p":1505},{"i":1516,"t":"Idempotency middleware for Fiber allows for fault-tolerant APIs where duplicate requests — for example due to networking issues on the client-side — do not erroneously cause the same action performed multiple times on the server-side. Refer to https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-02 for a better understanding.","s":"Idempotency","u":"/api/middleware/idempotency","h":"","p":1515},{"i":1518,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/idempotency","h":"#signatures","p":1515},{"i":1520,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/idempotency\" ) After you initiate your Fiber app, you can use the following possibilities:","s":"Examples","u":"/api/middleware/idempotency","h":"#examples","p":1515},{"i":1522,"t":"app.Use(idempotency.New())","s":"Default Config","u":"/api/middleware/idempotency","h":"#default-config","p":1515},{"i":1524,"t":"app.Use(idempotency.New(idempotency.Config{ Lifetime: 42 * time.Minute, // ... }))","s":"Custom Config","u":"/api/middleware/idempotency","h":"#custom-config","p":1515},{"i":1526,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: a function which skips the middleware on safe HTTP request method. Next func(c *fiber.Ctx) bool // Lifetime is the maximum lifetime of an idempotency key. // // Optional. Default: 30 * time.Minute Lifetime time.Duration // KeyHeader is the name of the header that contains the idempotency key. // // Optional. Default: X-Idempotency-Key KeyHeader string // KeyHeaderValidate defines a function to validate the syntax of the idempotency header. // // Optional. Default: a function which ensures the header is 36 characters long (the size of an UUID). KeyHeaderValidate func(string) error // KeepResponseHeaders is a list of headers that should be kept from the original response. // // Optional. Default: nil (to keep all headers) KeepResponseHeaders []string // Lock locks an idempotency key. // // Optional. Default: an in-memory locker for this process only. Lock Locker // Storage stores response data by idempotency key. // // Optional. Default: an in-memory storage for this process only. Storage fiber.Storage }","s":"Config","u":"/api/middleware/idempotency","h":"#config","p":1515},{"i":1528,"t":"var ConfigDefault = Config{ Next: func(c *fiber.Ctx) bool { // Skip middleware if the request was done using a safe HTTP method return fiber.IsMethodSafe(c.Method()) }, Lifetime: 30 * time.Minute, KeyHeader: \"X-Idempotency-Key\", KeyHeaderValidate: func(k string) error { if l, wl := len(k), 36; l != wl { // UUID length is 36 chars return fmt.Errorf(\"%w: invalid length: %d != %d\", ErrInvalidIdempotencyKey, l, wl) } return nil }, KeepResponseHeaders: nil, Lock: nil, // Set in configDefault so we don't allocate data here. Storage: nil, // Set in configDefault so we don't allocate data here. }","s":"Default Config","u":"/api/middleware/idempotency","h":"#default-config-1","p":1515},{"i":1530,"t":"Key auth middleware provides a key based authentication.","s":"Keyauth","u":"/api/middleware/keyauth","h":"","p":1529},{"i":1532,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/keyauth","h":"#signatures","p":1529},{"i":1534,"t":"package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" ) var ( apiKey = \"correct horse battery staple\" ) func validateAPIKey(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey } func main() { app := fiber.New() // note that the keyauth middleware needs to be defined before the routes are defined! app.Use(keyauth.New(keyauth.Config{ KeyLookup: \"cookie:access_token\", Validator: validateAPIKey, })) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Listen(\":3000\") } Test: # No api-key specified -> 400 missing curl http://localhost:3000 #> missing or malformed API Key curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000 #> Successfully authenticated! curl --cookie \"access_token=Clearly A Wrong Key\" http://localhost:3000 #> missing or malformed API Key For a more detailed example, see also the github.com/gofiber/recipes repository and specifically the fiber-envoy-extauthz repository and the keyauth example code.","s":"Examples","u":"/api/middleware/keyauth","h":"#examples","p":1529},{"i":1536,"t":"If you want to authenticate only certain endpoints, you can use the Config of keyauth and apply a filter function (eg. authFilter) like so package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" \"regexp\" \"strings\" ) var ( apiKey = \"correct horse battery staple\" protectedURLs = []*regexp.Regexp{ regexp.MustCompile(\"^/authenticated$\"), regexp.MustCompile(\"^/auth2$\"), } ) func validateAPIKey(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey } func authFilter(c *fiber.Ctx) bool { originalURL := strings.ToLower(c.OriginalURL()) for _, pattern := range protectedURLs { if pattern.MatchString(originalURL) { return false } } return true } func main() { app := fiber.New() app.Use(keyauth.New(keyauth.Config{ Next: authFilter, KeyLookup: \"cookie:access_token\", Validator: validateAPIKey, })) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome\") }) app.Get(\"/authenticated\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Get(\"/auth2\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated 2!\") }) app.Listen(\":3000\") } Which results in this # / does not need to be authenticated curl http://localhost:3000 #> Welcome # /authenticated needs to be authenticated curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000/authenticated #> Successfully authenticated! # /auth2 needs to be authenticated too curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000/auth2 #> Successfully authenticated 2!","s":"Authenticate only certain endpoints","u":"/api/middleware/keyauth","h":"#authenticate-only-certain-endpoints","p":1529},{"i":1538,"t":"package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" ) const ( apiKey = \"my-super-secret-key\" ) func main() { app := fiber.New() authMiddleware := keyauth.New(keyauth.Config{ Validator: func(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey }, }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome\") }) app.Get(\"/allowed\", authMiddleware, func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Listen(\":3000\") } Which results in this # / does not need to be authenticated curl http://localhost:3000 #> Welcome # /allowed needs to be authenticated too curl --header \"Authorization: Bearer my-super-secret-key\" http://localhost:3000/allowed #> Successfully authenticated!","s":"Specifying middleware in the handler","u":"/api/middleware/keyauth","h":"#specifying-middleware-in-the-handler","p":1529},{"i":1540,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // SuccessHandler defines a function which is executed for a valid key. // Optional. Default: nil SuccessHandler fiber.Handler // ErrorHandler defines a function which is executed for an invalid key. // It may be used to define a custom error. // Optional. Default: 401 Invalid or expired key ErrorHandler fiber.ErrorHandler // KeyLookup is a string in the form of \":\" that is used // to extract key from the request. // Optional. Default value \"header:Authorization\". // Possible values: // - \"header:\" // - \"query:\" // - \"form:\" // - \"param:\" // - \"cookie:\" KeyLookup string // AuthScheme to be used in the Authorization header. // Optional. Default value \"Bearer\". AuthScheme string // Validator is a function to validate key. Validator func(*fiber.Ctx, string) (bool, error) // Context key to store the bearertoken from the token into context. // Optional. Default: \"token\". ContextKey string }","s":"Config","u":"/api/middleware/keyauth","h":"#config","p":1529},{"i":1542,"t":"var ConfigDefault = Config{ SuccessHandler: func(c *fiber.Ctx) error { return c.Next() }, ErrorHandler: func(c *fiber.Ctx, err error) error { if err == ErrMissingOrMalformedAPIKey { return c.Status(fiber.StatusUnauthorized).SendString(err.Error()) } return c.Status(fiber.StatusUnauthorized).SendString(\"Invalid or expired API Key\") }, KeyLookup: \"header:\" + fiber.HeaderAuthorization, AuthScheme: \"Bearer\", ContextKey: \"token\", }","s":"Default Config","u":"/api/middleware/keyauth","h":"#default-config","p":1529},{"i":1544,"t":"Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases. note This module does not share state with other processes/servers by default.","s":"Limiter","u":"/api/middleware/limiter","h":"","p":1543},{"i":1546,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/limiter","h":"#signatures","p":1543},{"i":1548,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/limiter\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(limiter.New()) // Or extend your config for customization app.Use(limiter.New(limiter.Config{ Next: func(c *fiber.Ctx) bool { return c.IP() == \"127.0.0.1\" }, Max: 20, Expiration: 30 * time.Second, KeyGenerator: func(c *fiber.Ctx) string { return c.Get(\"x-forwarded-for\") }, LimitReached: func(c *fiber.Ctx) error { return c.SendFile(\"./toofast.html\") }, Storage: myCustomStorage{}, }))","s":"Examples","u":"/api/middleware/limiter","h":"#examples","p":1543},{"i":1550,"t":"Instead of using the standard fixed window algorithm, you can enable the sliding window algorithm. A example of such configuration is: app.Use(limiter.New(limiter.Config{ Max: 20, Expiration: 30 * time.Second, LimiterMiddleware: limiter.SlidingWindow{}, })) This means that every window will take into account the previous window(if there was any). The given formula for the rate is: weightOfPreviousWindpw = previous window's amount request * (whenNewWindow / Expiration) rate = weightOfPreviousWindpw + current window's amount request.","s":"Sliding window","u":"/api/middleware/limiter","h":"#sliding-window","p":1543},{"i":1552,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Max number of recent connections during `Duration` seconds before sending a 429 response // // Default: 5 Max int // KeyGenerator allows you to generate custom keys, by default c.IP() is used // // Default: func(c *fiber.Ctx) string { // return c.IP() // } KeyGenerator func(*fiber.Ctx) string // Expiration is the time on how long to keep records of requests in memory // // Default: 1 * time.Minute Expiration time.Duration // LimitReached is called when a request hits the limit // // Default: func(c *fiber.Ctx) error { // return c.SendStatus(fiber.StatusTooManyRequests) // } LimitReached fiber.Handler // When set to true, requests with StatusCode >= 400 won't be counted. // // Default: false SkipFailedRequests bool // When set to true, requests with StatusCode < 400 won't be counted. // // Default: false SkipSuccessfulRequests bool // Store is used to store the state of the middleware // // Default: an in memory store for this process only Storage fiber.Storage // LimiterMiddleware is the struct that implements limiter middleware. // // Default: a new Fixed Window Rate Limiter LimiterMiddleware LimiterHandler } note A custom store can be used if it implements the Storage interface - more details and an example can be found in store.go.","s":"Config","u":"/api/middleware/limiter","h":"#config","p":1543},{"i":1554,"t":"var ConfigDefault = Config{ Max: 5, Expiration: 1 * time.Minute, KeyGenerator: func(c *fiber.Ctx) string { return c.IP() }, LimitReached: func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusTooManyRequests) }, SkipFailedRequests: false, SkipSuccessfulRequests: false, LimiterMiddleware: FixedWindow{}, }","s":"Default Config","u":"/api/middleware/limiter","h":"#default-config","p":1543},{"i":1556,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 app.Use(limiter.New(limiter.Config{ Storage: storage, }))","s":"Custom Storage/Database","u":"/api/middleware/limiter","h":"#custom-storagedatabase","p":1543},{"i":1558,"t":"Logger middleware for Fiber that logs HTTP request/response details.","s":"Logger","u":"/api/middleware/logger","h":"","p":1557},{"i":1560,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/logger","h":"#signatures","p":1557},{"i":1562,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/logger\" ) tip The order of registration plays a role. Only all routes that are registered after this one will be logged. The middleware should therefore be one of the first to be registered. After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(logger.New()) // Or extend your config for customization // Logging remote IP and Port app.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) // Logging Request ID app.Use(requestid.New()) app.Use(logger.New(logger.Config{ // For more options, see the Config section Format: \"${pid} ${locals:requestid} ${status} - ${method} ${path}​\\n\", })) // Changing TimeZone & TimeFormat app.Use(logger.New(logger.Config{ Format: \"${pid} ${status} - ${method} ${path}\\n\", TimeFormat: \"02-Jan-2006\", TimeZone: \"America/New_York\", })) // Custom File Writer file, err := os.OpenFile(\"./123.log\", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) if err != nil { log.Fatalf(\"error opening file: %v\", err) } defer file.Close() app.Use(logger.New(logger.Config{ Output: file, })) // Add Custom Tags app.Use(logger.New(logger.Config{ CustomTags: map[string]logger.LogFunc{ \"custom_tag\": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) { return output.WriteString(\"it is a custom tag\") }, }, })) // Callback after log is written app.Use(logger.New(logger.Config{ TimeFormat: time.RFC3339Nano, TimeZone: \"Asia/Shanghai\", Done: func(c *fiber.Ctx, logString []byte) { if c.Response().StatusCode() != fiber.StatusOK { reporter.SendToSlack(logString) } }, })) // Disable colors when outputting to default format app.Use(logger.New(logger.Config{ DisableColors: true, }))","s":"Examples","u":"/api/middleware/logger","h":"#examples","p":1557},{"i":1564,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Done is a function that is called after the log string for a request is written to Output, // and pass the log string as parameter. // // Optional. Default: nil Done func(c *fiber.Ctx, logString []byte) // tagFunctions defines the custom tag action // // Optional. Default: map[string]LogFunc CustomTags map[string]LogFunc // Format defines the logging tags // // Optional. Default: [${time}] ${status} - ${latency} ${method} ${path}\\n Format string // TimeFormat https://programming.guide/go/format-parse-string-time-date-example.html // // Optional. Default: 15:04:05 TimeFormat string // TimeZone can be specified, such as \"UTC\" and \"America/New_York\" and \"Asia/Chongqing\", etc // // Optional. Default: \"Local\" TimeZone string // TimeInterval is the delay before the timestamp is updated // // Optional. Default: 500 * time.Millisecond TimeInterval time.Duration // Output is a writer where logs are written // // Default: os.Stdout Output io.Writer // DisableColors defines if the logs output should be colorized // // Default: false DisableColors bool enableColors bool enableLatency bool timeZoneLocation *time.Location } type LogFunc func(buf logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error)","s":"Config","u":"/api/middleware/logger","h":"#config","p":1557},{"i":1566,"t":"var ConfigDefault = Config{ Next: nil, Done: nil, Format: \"[${time}] ${status} - ${latency} ${method} ${path}\\n\", TimeFormat: \"15:04:05\", TimeZone: \"Local\", TimeInterval: 500 * time.Millisecond, Output: os.Stdout, DisableColors: true, }","s":"Default Config","u":"/api/middleware/logger","h":"#default-config","p":1557},{"i":1568,"t":"// Logger variables const ( TagPid = \"pid\" TagTime = \"time\" TagReferer = \"referer\" TagProtocol = \"protocol\" TagPort = \"port\" TagIP = \"ip\" TagIPs = \"ips\" TagHost = \"host\" TagMethod = \"method\" TagPath = \"path\" TagURL = \"url\" TagUA = \"ua\" TagLatency = \"latency\" TagStatus = \"status\" // response status TagResBody = \"resBody\" // response body TagReqHeaders = \"reqHeaders\" TagQueryStringParams = \"queryParams\" // request query parameters TagBody = \"body\" // request body TagBytesSent = \"bytesSent\" TagBytesReceived = \"bytesReceived\" TagRoute = \"route\" TagError = \"error\" // DEPRECATED: Use TagReqHeader instead TagHeader = \"header:\" // request header TagReqHeader = \"reqHeader:\" // request header TagRespHeader = \"respHeader:\" // response header TagQuery = \"query:\" // request query TagForm = \"form:\" // request form TagCookie = \"cookie:\" // request cookie TagLocals = \"locals:\" // colors TagBlack = \"black\" TagRed = \"red\" TagGreen = \"green\" TagYellow = \"yellow\" TagBlue = \"blue\" TagMagenta = \"magenta\" TagCyan = \"cyan\" TagWhite = \"white\" TagReset = \"reset\" )","s":"Constants","u":"/api/middleware/logger","h":"#constants","p":1557},{"i":1570,"t":"Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor caution Monitor is still in beta, API might change in the future!","s":"Monitor","u":"/api/middleware/monitor","h":"","p":1569},{"i":1572,"t":"func New() fiber.Handler","s":"Signatures","u":"/api/middleware/monitor","h":"#signatures","p":1569},{"i":1574,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/monitor\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config (Assign the middleware to /metrics) app.Get(\"/metrics\", monitor.New()) // Or extend your config for customization // Assign the middleware to /metrics // and change the Title to `MyService Metrics Page` app.Get(\"/metrics\", monitor.New(monitor.Config{Title: \"MyService Metrics Page\"})) You can also access the API endpoint with curl -X GET -H \"Accept: application/json\" http://localhost:3000/metrics which returns: {\"pid\":{ \"cpu\":0.4568381746582226, \"ram\":20516864, \"conns\":3 }, \"os\": { \"cpu\":8.759124087593099, \"ram\":3997155328, \"conns\":44, \"total_ram\":8245489664, \"load_avg\":0.51 }}","s":"Examples","u":"/api/middleware/monitor","h":"#examples","p":1569},{"i":1576,"t":"// Config defines the config for middleware. type Config struct { // Metrics page title // // Optional. Default: \"Fiber Monitor\" Title string // Refresh period // // Optional. Default: 3 seconds Refresh time.Duration // Whether the service should expose only the monitoring API. // // Optional. Default: false APIOnly bool // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Custom HTML Code to Head Section(Before End) // // Optional. Default: empty CustomHead string // FontURL for specify font resource path or URL . also you can use relative path // // Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap FontURL string // ChartJsURL for specify ChartJS library path or URL . also you can use relative path // // Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js ChartJsURL string index string }","s":"Config","u":"/api/middleware/monitor","h":"#config","p":1569},{"i":1578,"t":"var ConfigDefault = Config{ Title: defaultTitle, Refresh: defaultRefresh, FontURL: defaultFontURL, ChartJsURL: defaultChartJSURL, CustomHead: defaultCustomHead, APIOnly: false, Next: nil, index: newIndex(viewBag{ defaultTitle, defaultRefresh, defaultFontURL, defaultChartJSURL, defaultCustomHead, }), }","s":"Default Config","u":"/api/middleware/monitor","h":"#default-config","p":1569},{"i":1580,"t":"Pprof middleware for Fiber that serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.","s":"Pprof","u":"/api/middleware/pprof","h":"","p":1579},{"i":1582,"t":"func New() fiber.Handler","s":"Signatures","u":"/api/middleware/pprof","h":"#signatures","p":1579},{"i":1584,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/pprof\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(pprof.New()) // Or extend your config for customization // For example, in systems where you have multiple ingress endpoints, it is common to add a URL prefix, like so: app.Use(pprof.New(pprof.Config{Prefix: \"/endpoint-prefix\"})) // This prefix will be added to the default path of \"/debug/pprof/\", for a resulting URL of: \"/endpoint-prefix/debug/pprof/\".","s":"Examples","u":"/api/middleware/pprof","h":"#examples","p":1579},{"i":1586,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Prefix defines a URL prefix added before \"/debug/pprof\". // Note that it should start with (but not end with) a slash. // Example: \"/federated-fiber\" // // Optional. Default: \"\" Prefix string }","s":"Config","u":"/api/middleware/pprof","h":"#config","p":1579},{"i":1588,"t":"var ConfigDefault = Config{ Next: nil, }","s":"Default Config","u":"/api/middleware/pprof","h":"#default-config","p":1579},{"i":1590,"t":"Proxy middleware for Fiber that allows you to proxy requests to multiple servers.","s":"Proxy","u":"/api/middleware/proxy","h":"","p":1589},{"i":1592,"t":"// Balancer create a load balancer among multiple upstrem servers. func Balancer(config Config) fiber.Handler // Forward performs the given http request and fills the given http response. func Forward(addr string, clients ...*fasthttp.Client) fiber.Handler // Do performs the given http request and fills the given http response. func Do(c *fiber.Ctx, addr string, clients ...*fasthttp.Client) error // DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects. func DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error // DoDeadline performs the given request and waits for response until the given deadline. func DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error // DoTimeout performs the given request and waits for response during the given timeout duration. func DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error // DomainForward the given http request based on the given domain and fills the given http response func DomainForward(hostname string, addr string, clients ...*fasthttp.Client) fiber.Handler // BalancerForward performs the given http request based round robin balancer and fills the given http response func BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler","s":"Signatures","u":"/api/middleware/proxy","h":"#signatures","p":1589},{"i":1594,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/proxy\" ) After you initiate your Fiber app, you can use the following possibilities: // if target https site uses a self-signed certificate, you should // call WithTlsConfig before Do and Forward proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true, }) // if you need to use global self-custom client, you should use proxy.WithClient. proxy.WithClient(&fasthttp.Client{ NoDefaultUserAgentHeader: true, DisablePathNormalizing: true, }) // Forward to url app.Get(\"/gif\", proxy.Forward(\"https://i.imgur.com/IWaBepg.gif\")) // If you want to forward with a specific domain. You have to use proxy.DomainForward. app.Get(\"/payments\", proxy.DomainForward(\"docs.gofiber.io\", \"http://localhost:8000\")) // Forward to url with local custom client app.Get(\"/gif\", proxy.Forward(\"https://i.imgur.com/IWaBepg.gif\", &fasthttp.Client{ NoDefaultUserAgentHeader: true, DisablePathNormalizing: true, })) // Make request within handler app.Get(\"/:id\", func(c *fiber.Ctx) error { url := \"https://i.imgur.com/\"+c.Params(\"id\")+\".gif\" if err := proxy.Do(c, url); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests while following redirects app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoRedirects(c, \"http://google.com\", 3); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests and wait up to 5 seconds before timing out app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoTimeout(c, \"http://localhost:3000\", time.Second * 5); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests, timeout a minute from now app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoDeadline(c, \"http://localhost\", time.Now().Add(time.Minute)); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Minimal round robin balancer app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }, })) // Or extend your balancer for customization app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }, ModifyRequest: func(c *fiber.Ctx) error { c.Request().Header.Add(\"X-Real-IP\", c.IP()) return nil }, ModifyResponse: func(c *fiber.Ctx) error { c.Response().Header.Del(fiber.HeaderServer) return nil }, })) // Or this way if the balancer is using https and the destination server is only using http. app.Use(proxy.BalancerForward([]string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }))","s":"Examples","u":"/api/middleware/proxy","h":"#examples","p":1589},{"i":1596,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Servers defines a list of :// HTTP servers, // // which are used in a round-robin manner. // i.e.: \"https://foobar.com, http://www.foobar.com\" // // Required Servers []string // ModifyRequest allows you to alter the request // // Optional. Default: nil ModifyRequest fiber.Handler // ModifyResponse allows you to alter the response // // Optional. Default: nil ModifyResponse fiber.Handler // Timeout is the request timeout used when calling the proxy client // // Optional. Default: 1 second Timeout time.Duration // Per-connection buffer size for requests' reading. // This also limits the maximum header size. // Increase this buffer if your clients send multi-KB RequestURIs // and/or multi-KB headers (for example, BIG cookies). ReadBufferSize int // Per-connection buffer size for responses' writing. WriteBufferSize int // tls config for the http client. TlsConfig *tls.Config // Client is custom client when client config is complex. // Note that Servers, Timeout, WriteBufferSize, ReadBufferSize and TlsConfig // will not be used if the client are set. Client *fasthttp.LBClient }","s":"Config","u":"/api/middleware/proxy","h":"#config","p":1589},{"i":1598,"t":"var ConfigDefault = Config{ Next: nil, ModifyRequest: nil, ModifyResponse: nil, Timeout: fasthttp.DefaultLBClientTimeout, }","s":"Default Config","u":"/api/middleware/proxy","h":"#default-config","p":1589},{"i":1600,"t":"Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.","s":"Recover","u":"/api/middleware/recover","h":"","p":1599},{"i":1602,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/recover","h":"#signatures","p":1599},{"i":1604,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/recover\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(recover.New()) // This panic will be caught by the middleware app.Get(\"/\", func(c *fiber.Ctx) error { panic(\"I'm an error\") })","s":"Examples","u":"/api/middleware/recover","h":"#examples","p":1599},{"i":1606,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // EnableStackTrace enables handling stack trace // // Optional. Default: false EnableStackTrace bool // StackTraceHandler defines a function to handle stack trace // // Optional. Default: defaultStackTraceHandler StackTraceHandler func(c *fiber.Ctx, e interface{}) }","s":"Config","u":"/api/middleware/recover","h":"#config","p":1599},{"i":1608,"t":"var ConfigDefault = Config{ Next: nil, EnableStackTrace: false, StackTraceHandler: defaultStackTraceHandler, }","s":"Default Config","u":"/api/middleware/recover","h":"#default-config","p":1599},{"i":1610,"t":"Redirection middleware for Fiber.","s":"Redirect","u":"/api/middleware/redirect","h":"","p":1609},{"i":1612,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/redirect","h":"#signatures","p":1609},{"i":1614,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/redirect\" ) func main() { app := fiber.New() app.Use(redirect.New(redirect.Config{ Rules: map[string]string{ \"/old\": \"/new\", \"/old/*\": \"/new/$1\", }, StatusCode: 301, })) app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Get(\"/new/*\", func(c *fiber.Ctx) error { return c.SendString(\"Wildcard: \" + c.Params(\"*\")) }) app.Listen(\":3000\") } Test: curl http://localhost:3000/old curl http://localhost:3000/old/hello","s":"Examples","u":"/api/middleware/redirect","h":"#examples","p":1609},{"i":1616,"t":"// Config defines the config for middleware. type Config struct { // Filter defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // Rules defines the URL path rewrite rules. The values captured in asterisk can be // retrieved by index e.g. $1, $2 and so on. // Required. Example: // \"/old\": \"/new\", // \"/api/*\": \"/$1\", // \"/js/*\": \"/public/javascripts/$1\", // \"/users/*/orders/*\": \"/user/$1/order/$2\", Rules map[string]string // The status code when redirecting // This is ignored if Redirect is disabled // Optional. Default: 302 (fiber.StatusFound) StatusCode int rulesRegex map[*regexp.Regexp]string }","s":"Config","u":"/api/middleware/redirect","h":"#config","p":1609},{"i":1618,"t":"var ConfigDefault = Config{ StatusCode: fiber.StatusFound, }","s":"Default Config","u":"/api/middleware/redirect","h":"#default-config","p":1609},{"i":1620,"t":"RequestID middleware for Fiber that adds an indentifier to the response.","s":"RequestID","u":"/api/middleware/requestid","h":"","p":1619},{"i":1622,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/requestid","h":"#signatures","p":1619},{"i":1624,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/requestid\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(requestid.New()) // Or extend your config for customization app.Use(requestid.New(requestid.Config{ Header: \"X-Custom-Header\", Generator: func() string { return \"static-id\" }, }))","s":"Examples","u":"/api/middleware/requestid","h":"#examples","p":1619},{"i":1626,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Header is the header key where to get/set the unique request ID // // Optional. Default: \"X-Request-ID\" Header string // Generator defines a function to generate the unique identifier. // // Optional. Default: utils.UUID Generator func() string // ContextKey defines the key used when storing the request ID in // the locals for a specific request. // // Optional. Default: requestid ContextKey interface{} }","s":"Config","u":"/api/middleware/requestid","h":"#config","p":1619},{"i":1628,"t":"The default config uses a fast UUID generator which will expose the number of requests made to the server. To conceal this value for better privacy, use the utils.UUIDv4 generator. var ConfigDefault = Config{ Next: nil, Header: fiber.HeaderXRequestID, Generator: utils.UUID, ContextKey: \"requestid\", }","s":"Default Config","u":"/api/middleware/requestid","h":"#default-config","p":1619},{"i":1630,"t":"Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.","s":"Rewrite","u":"/api/middleware/rewrite","h":"","p":1629},{"i":1632,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/rewrite","h":"#signatures","p":1629},{"i":1634,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/rewrite\" ) func main() { app := fiber.New() app.Use(rewrite.New(rewrite.Config{ Rules: map[string]string{ \"/old\": \"/new\", \"/old/*\": \"/new/$1\", }, })) app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Get(\"/new/*\", func(c *fiber.Ctx) error { return c.SendString(\"Wildcard: \" + c.Params(\"*\")) }) app.Listen(\":3000\") } Test: curl http://localhost:3000/old curl http://localhost:3000/old/hello","s":"Examples","u":"/api/middleware/rewrite","h":"#examples","p":1629},{"i":1636,"t":"Session middleware for Fiber. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.","s":"Session","u":"/api/middleware/session","h":"","p":1635},{"i":1638,"t":"func New(config ...Config) *Store func (s *Store) RegisterType(i interface{}) func (s *Store) Get(c *fiber.Ctx) (*Session, error) func (s *Store) Reset() error func (s *Session) Get(key string) interface{} func (s *Session) Set(key string, val interface{}) func (s *Session) Delete(key string) func (s *Session) Destroy() error func (s *Session) Regenerate() error func (s *Session) Save() error func (s *Session) Fresh() bool func (s *Session) ID() string func (s *Session) Keys() []string caution Storing interface{} values are limited to built-ins Go types.","s":"Signatures","u":"/api/middleware/session","h":"#signatures","p":1635},{"i":1640,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/session\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config // This stores all of your app's sessions store := session.New() app.Get(\"/\", func(c *fiber.Ctx) error { // Get session from storage sess, err := store.Get(c) if err != nil { panic(err) } // Get value name := sess.Get(\"name\") // Set key/value sess.Set(\"name\", \"john\") // Get all Keys keys := sess.Keys() // Delete key sess.Delete(\"name\") // Destroy session if err := sess.Destroy(); err != nil { panic(err) } // Sets a specific expiration for this session sess.SetExpiry(time.Second * 2) // Save session if err := sess.Save(); err != nil { panic(err) } return c.SendString(fmt.Sprintf(\"Welcome %v\", name)) })","s":"Examples","u":"/api/middleware/session","h":"#examples","p":1635},{"i":1642,"t":"// Config defines the config for middleware. type Config struct { // Allowed session duration // Optional. Default value 24 * time.Hour Expiration time.Duration // Storage interface to store the session data // Optional. Default value memory.New() Storage fiber.Storage // KeyLookup is a string in the form of \":\" that is used // to extract session id from the request. // Possible values: \"header:\", \"query:\" or \"cookie:\" // Optional. Default value \"cookie:session_id\". KeyLookup string // Domain of the CSRF cookie. // Optional. Default value \"\". CookieDomain string // Path of the CSRF cookie. // Optional. Default value \"\". CookiePath string // Indicates if CSRF cookie is secure. // Optional. Default value false. CookieSecure bool // Indicates if CSRF cookie is HTTP only. // Optional. Default value false. CookieHTTPOnly bool // Value of SameSite cookie. // Optional. Default value \"Lax\". CookieSameSite string // Decides whether cookie should last for only the browser sesison. // Ignores Expiration if set to true // Optional. Default value false. CookieSessionOnly bool // KeyGenerator generates the session key. // Optional. Default value utils.UUIDv4 KeyGenerator func() string // Deprecated: Please use KeyLookup CookieName string // Source defines where to obtain the session id source Source // The session name sessionName string }","s":"Config","u":"/api/middleware/session","h":"#config","p":1635},{"i":1644,"t":"var ConfigDefault = Config{ Expiration: 24 * time.Hour, KeyLookup: \"cookie:session_id\", KeyGenerator: utils.UUIDv4, source: \"cookie\", sessionName: \"session_id\", }","s":"Default Config","u":"/api/middleware/session","h":"#default-config","p":1635},{"i":1646,"t":"const ( SourceCookie Source = \"cookie\" SourceHeader Source = \"header\" SourceURLQuery Source = \"query\" )","s":"Constants","u":"/api/middleware/session","h":"#constants","p":1635},{"i":1648,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 store := session.New(session.Config{ Storage: storage, }) To use the store, see the Examples.","s":"Custom Storage/Database","u":"/api/middleware/session","h":"#custom-storagedatabase","p":1635},{"i":1650,"t":"Skip middleware for Fiber that skips a wrapped handler if a predicate is true.","s":"Skip","u":"/api/middleware/skip","h":"","p":1649},{"i":1652,"t":"func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler","s":"Signatures","u":"/api/middleware/skip","h":"#signatures","p":1649},{"i":1654,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/skip\" ) After you initiate your Fiber app, you can use the following possibilities: func main() { app := fiber.New() app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool { return ctx.Method() == fiber.MethodGet })) app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendString(\"It was a GET request!\") }) log.Fatal(app.Listen(\":3000\")) } func BasicHandler(ctx *fiber.Ctx) error { return ctx.SendString(\"It was not a GET request!\") } tip app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.","s":"Examples","u":"/api/middleware/skip","h":"#examples","p":1649},{"i":1656,"t":"There exist two distinct implementations of timeout middleware Fiber. New Wraps a fiber.Handler with a timeout. If the handler takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler. caution This has been deprecated since it raises race conditions. NewWithContext As a fiber.Handler wrapper, it creates a context with context.WithTimeout and pass it in UserContext. If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler. It does not cancel long running executions. Underlying executions must handle timeout by using context.Context parameter.","s":"Timeout","u":"/api/middleware/timeout","h":"","p":1655},{"i":1658,"t":"func New(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler func NewWithContext(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler","s":"Signatures","u":"/api/middleware/timeout","h":"#signatures","p":1655},{"i":1660,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/timeout\" ) After you initiate your Fiber app, you can use the following possibilities: func main() { app := fiber.New() h := func(c *fiber.Ctx) error { sleepTime, _ := time.ParseDuration(c.Params(\"sleepTime\") + \"ms\") if err := sleepWithContext(c.UserContext(), sleepTime); err != nil { return fmt.Errorf(\"%w: execution error\", err) } return nil } app.Get(\"/foo/:sleepTime\", timeout.New(h, 2*time.Second)) log.Fatal(app.Listen(\":3000\")) } func sleepWithContext(ctx context.Context, d time.Duration) error { timer := time.NewTimer(d) select { case <-ctx.Done(): if !timer.Stop() { <-timer.C } return context.DeadlineExceeded case <-timer.C: } return nil } Test http 200 with curl: curl --location -I --request GET 'http://localhost:3000/foo/1000' Test http 408 with curl: curl --location -I --request GET 'http://localhost:3000/foo/3000' Use with custom error: var ErrFooTimeOut = errors.New(\"foo context canceled\") func main() { app := fiber.New() h := func(c *fiber.Ctx) error { sleepTime, _ := time.ParseDuration(c.Params(\"sleepTime\") + \"ms\") if err := sleepWithContextWithCustomError(c.UserContext(), sleepTime); err != nil { return fmt.Errorf(\"%w: execution error\", err) } return nil } app.Get(\"/foo/:sleepTime\", timeout.NewWithContext(h, 2*time.Second, ErrFooTimeOut)) log.Fatal(app.Listen(\":3000\")) } func sleepWithContextWithCustomError(ctx context.Context, d time.Duration) error { timer := time.NewTimer(d) select { case <-ctx.Done(): if !timer.Stop() { <-timer.C } return ErrFooTimeOut case <-timer.C: } return nil } Sample usage with a DB call: func main() { app := fiber.New() db, _ := gorm.Open(postgres.Open(\"postgres://localhost/foodb\"), &gorm.Config{}) handler := func(ctx *fiber.Ctx) error { tran := db.WithContext(ctx.UserContext()).Begin() if tran = tran.Exec(\"SELECT pg_sleep(50)\"); tran.Error != nil { return tran.Error } if tran = tran.Commit(); tran.Error != nil { return tran.Error } return nil } app.Get(\"/foo\", timeout.NewWithContext(handler, 10*time.Second)) log.Fatal(app.Listen(\":3000\")) }","s":"Examples","u":"/api/middleware/timeout","h":"#examples","p":1655},{"i":1663,"t":"TechEmpower provides a performance comparison of many web application frameworks executing fundamental tasks such as JSON serialization, database access, and server-side template composition. Each framework is operating in a realistic production configuration. Results are captured on cloud instances and on physical hardware. The test implementations are largely community-contributed and all source is available at the GitHub repository. Fiber v1.10.0 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 2.20GHz 32GB RAM Ubuntu 18.04.3 4.15.0-88-generic Dedicated Cisco 10-Gbit Ethernet switch.","s":"TechEmpower","u":"/extra/benchmarks","h":"#techempower","p":1661},{"i":1665,"t":"The Plaintext test is an exercise of the request-routing fundamentals only, designed to demonstrate the capacity of high-performance platforms in particular. Requests will be sent using HTTP pipelining. The response payload is still small, meaning good performance is still necessary in order to saturate the gigabit Ethernet of the test environment. See Plaintext requirements Fiber - 6,162,556 responses per second with an average latency of 2.0 ms. Express - 367,069 responses per second with an average latency of 354.1 ms.","s":"Plaintext","u":"/extra/benchmarks","h":"#plaintext","p":1661},{"i":1667,"t":"Fiber handled 11,846 responses per second with an average latency of 42.8 ms. Express handled 2,066 responses per second with an average latency of 390.44 ms.","s":"Data Updates","u":"/extra/benchmarks","h":"#data-updates","p":1661},{"i":1669,"t":"Fiber handled 19,664 responses per second with an average latency of 25.7 ms. Express handled 4,302 responses per second with an average latency of 117.2 ms.","s":"Multiple Queries","u":"/extra/benchmarks","h":"#multiple-queries","p":1661},{"i":1671,"t":"Fiber handled 368,647 responses per second with an average latency of 0.7 ms. Express handled 57,880 responses per second with an average latency of 4.4 ms.","s":"Single Query","u":"/extra/benchmarks","h":"#single-query","p":1661},{"i":1673,"t":"Fiber handled 1,146,667 responses per second with an average latency of 0.4 ms. Express handled 244,847 responses per second with an average latency of 1.1 ms.","s":"JSON Serialization","u":"/extra/benchmarks","h":"#json-serialization","p":1661},{"i":1675,"t":"🔗 https://github.com/smallnest/go-web-framework-benchmark CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz MEM 4GB GO go1.13.6 linux/amd64 OS Linux The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers. The concurrency clients are 5000. Latency is the time of real processing time by web servers. The smaller is the better. Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better. If we enable http pipelining, test result as below: Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is: If we enable http pipelining, test result as below: Dependency graph for v1.9.0","s":"Go web framework benchmark","u":"/extra/benchmarks","h":"#go-web-framework-benchmark","p":1661},{"i":1678,"t":"There is no definitive answer to this question. The answer depends on the scale of your application and the team that is involved. To be as flexible as possible, Fiber makes no assumptions in terms of structure. Routes and other application-specific logic can live in as many files as you wish, in any directory structure you prefer. View the following examples for inspiration: gofiber/boilerplate thomasvvugt/fiber-boilerplate Youtube - Building a REST API using Gorm and Fiber embedmode/fiberseed","s":"How should I structure my application?","u":"/extra/faq","h":"#how-should-i-structure-my-application","p":1676},{"i":1680,"t":"If you're using v2.32.0 or later, all you need to do is to implement a custom error handler. See below, or see a more detailed explanation at Error Handling. If you're using v2.31.0 or earlier, the error handler will not capture 404 errors. Instead, you need to add a middleware function at the very bottom of the stack (below all other functions) to handle a 404 response: Example app.Use(func(c *fiber.Ctx) error { return c.Status(fiber.StatusNotFound).SendString(\"Sorry can't find that!\") })","s":"How do I handle custom 404 responses?","u":"/extra/faq","h":"#how-do-i-handle-custom-404-responses","p":1676},{"i":1682,"t":"Air is a handy tool that automatically restarts your Go applications whenever the source code changes, making your development process faster and more efficient. To use Air in a Fiber project, follow these steps: Install Air by downloading the appropriate binary for your operating system from the GitHub release page or by building the tool directly from source. Create a configuration file for Air in your project directory. This file can be named, for example, .air.toml or air.conf. Here's a sample configuration file that works with Fiber: # .air.toml root = \".\" tmp_dir = \"tmp\" [build] cmd = \"go build -o ./tmp/main .\" bin = \"./tmp/main\" delay = 1000 # ms exclude_dir = [\"assets\", \"tmp\", \"vendor\"] include_ext = [\"go\", \"tpl\", \"tmpl\", \"html\"] exclude_regex = [\"_test\\\\.go\"] Start your Fiber application using Air by running the following command in the terminal: air As you make changes to your source code, Air will detect them and automatically restart the application. A complete example demonstrating the use of Air with Fiber can be found in the Fiber Recipes repository. This example shows how to configure and use Air in a Fiber project to create an efficient development environment.","s":"How can i use live reload ?","u":"/extra/faq","h":"#how-can-i-use-live-reload-","p":1676},{"i":1684,"t":"To override the default error handler, you can override the default when providing a Config when initiating a new Fiber instance. Example app := fiber.New(fiber.Config{ ErrorHandler: func(c *fiber.Ctx, err error) error { return c.Status(fiber.StatusInternalServerError).SendString(err.Error()) }, }) We have a dedicated page explaining how error handling works in Fiber, see Error Handling.","s":"How do I set up an error handler?","u":"/extra/faq","h":"#how-do-i-set-up-an-error-handler","p":1676},{"i":1686,"t":"Fiber currently supports 8 template engines in our gofiber/template middleware: Ace Amber Django Handlebars HTML Jet Mustache Pug To learn more about using Templates in Fiber, see Templates.","s":"Which template engines does Fiber support?","u":"/extra/faq","h":"#which-template-engines-does-fiber-support","p":1676},{"i":1688,"t":"Yes, we have our own Discord server, where we hang out. We have different rooms for every subject. If you have questions or just want to have a chat, feel free to join us via this > invite link <.","s":"Does Fiber have a community chat?","u":"/extra/faq","h":"#does-fiber-have-a-community-chat","p":1676},{"i":1690,"t":"Yes we do, here are some examples: This example works v2 package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/logger\" ) type Host struct { Fiber *fiber.App } func main() { // Hosts hosts := map[string]*Host{} //----- // API //----- api := fiber.New() api.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"api.localhost:3000\"] = &Host{api} api.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"API\") }) //------ // Blog //------ blog := fiber.New() blog.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"blog.localhost:3000\"] = &Host{blog} blog.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Blog\") }) //--------- // Website //--------- site := fiber.New() site.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"localhost:3000\"] = &Host{site} site.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Website\") }) // Server app := fiber.New() app.Use(func(c *fiber.Ctx) error { host := hosts[c.Hostname()] if host == nil { return c.SendStatus(fiber.StatusNotFound) } else { host.Fiber.Handler()(c.Context()) return nil } }) log.Fatal(app.Listen(\":3000\")) } If more information is needed, please refer to this issue #750","s":"Does fiber support sub domain routing ?","u":"/extra/faq","h":"#does-fiber-support-sub-domain-routing-","p":1676},{"i":1693,"t":"It’s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them. Example app.Get(\"/\", func(c *fiber.Ctx) error { // Pass error to Fiber return c.SendFile(\"file-does-not-exist\") }) Fiber does not handle panics by default. To recover from a panic thrown by any handler in the stack, you need to include the Recover middleware below: Example package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/recover\" ) func main() { app := fiber.New() app.Use(recover.New()) app.Get(\"/\", func(c *fiber.Ctx) error { panic(\"This panic is caught by fiber\") }) log.Fatal(app.Listen(\":3000\")) } You could use Fiber's custom error struct to pass an additional status code using fiber.NewError(). It's optional to pass a message; if this is left empty, it will default to the status code message (404 equals Not Found). Example app.Get(\"/\", func(c *fiber.Ctx) error { // 503 Service Unavailable return fiber.ErrServiceUnavailable // 503 On vacation! return fiber.NewError(fiber.StatusServiceUnavailable, \"On vacation!\") })","s":"Catching Errors","u":"/guide/error-handling","h":"#catching-errors","p":1691},{"i":1695,"t":"Fiber provides an error handler by default. For a standard error, the response is sent as 500 Internal Server Error. If the error is of type fiber.Error, the response is sent with the provided status code and message. Example // Default error handler var DefaultErrorHandler = func(c *fiber.Ctx, err error) error { // Status code defaults to 500 code := fiber.StatusInternalServerError // Retrieve the custom status code if it's a *fiber.Error var e *fiber.Error if errors.As(err, &e) { code = e.Code } // Set Content-Type: text/plain; charset=utf-8 c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8) // Return status code with error message return c.Status(code).SendString(err.Error()) }","s":"Default Error Handler","u":"/guide/error-handling","h":"#default-error-handler","p":1691},{"i":1697,"t":"A custom error handler can be set using a Config when initializing a Fiber instance. In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response. The following example shows how to display error pages for different types of errors. Example // Create a new fiber instance with custom config app := fiber.New(fiber.Config{ // Override default error handler ErrorHandler: func(ctx *fiber.Ctx, err error) error { // Status code defaults to 500 code := fiber.StatusInternalServerError // Retrieve the custom status code if it's a *fiber.Error var e *fiber.Error if errors.As(err, &e) { code = e.Code } // Send custom error page err = ctx.Status(code).SendFile(fmt.Sprintf(\"./%d.html\", code)) if err != nil { // In case the SendFile fails return ctx.Status(fiber.StatusInternalServerError).SendString(\"Internal Server Error\") } // Return from handler return nil }, }) // ... Special thanks to the Echo & Express framework for inspiration regarding error handling.","s":"Custom Error Handler","u":"/guide/error-handling","h":"#custom-error-handler","p":1691},{"i":1700,"t":"Since Fiber v2.32.0, we use encoding/json as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of encoding/json, we recommend you to use these libraries: goccy/go-json bytedance/sonic segmentio/encoding mailru/easyjson minio/simdjson-go wI2L/jettison Example package main import \"github.com/gofiber/fiber/v2\" import \"github.com/goccy/go-json\" func main() { app := fiber.New(fiber.Config{ JSONEncoder: json.Marshal, JSONDecoder: json.Unmarshal, }) # ... }","s":"Custom JSON Encoder/Decoder","u":"/guide/faster-fiber","h":"#custom-json-encoderdecoder","p":1698},{"i":1702,"t":"Set custom JSON encoder for client Set custom JSON decoder for client Set custom JSON encoder for application Set custom JSON decoder for application","s":"References","u":"/guide/faster-fiber","h":"#references","p":1698},{"i":1704,"t":"info In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.","s":"🎭 Grouping","u":"/guide/grouping","h":"","p":1703},{"i":1706,"t":"Like Routing, groups can also have paths that belong to a cluster. func main() { app := fiber.New() api := app.Group(\"/api\", middleware) // /api v1 := api.Group(\"/v1\", middleware) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", middleware) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } A Group of paths can have an optional handler. func main() { app := fiber.New() api := app.Group(\"/api\") // /api v1 := api.Group(\"/v1\") // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\") // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } caution Running /api, /v1 or /v2 will result in 404 error, make sure you have the errors set.","s":"Paths","u":"/guide/grouping","h":"#paths","p":1703},{"i":1708,"t":"Group handlers can also be used as a routing path but they must have Next added to them so that the flow can continue. func main() { app := fiber.New() handler := func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusOK) } api := app.Group(\"/api\") // /api v1 := api.Group(\"/v1\", func(c *fiber.Ctx) error { // middleware for /api/v1 c.Set(\"Version\", \"v1\") return c.Next() }) v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user log.Fatal(app.Listen(\":3000\")) }","s":"Group Handlers","u":"/guide/grouping","h":"#group-handlers","p":1703},{"i":1710,"t":"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks: OnRoute OnName OnGroup OnGroupName OnListen OnFork OnShutdown OnMount","s":"🪝 Hooks","u":"/guide/hooks","h":"","p":1709},{"i":1712,"t":"// Handlers define a function to create hooks for Fiber. type OnRouteHandler = func(Route) error type OnNameHandler = OnRouteHandler type OnGroupHandler = func(Group) error type OnGroupNameHandler = OnGroupHandler type OnListenHandler = func() error type OnForkHandler = func(int) error type OnShutdownHandler = OnListenHandler type OnMountHandler = func(*App) error","s":"Constants","u":"/guide/hooks","h":"#constants","p":1709},{"i":1714,"t":"OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by route parameter. Signature func (app *App) OnRoute(handler ...OnRouteHandler)","s":"OnRoute","u":"/guide/hooks","h":"#onroute","p":1709},{"i":1716,"t":"OnName is a hook to execute user functions on each route naming. Also you can get route properties by route parameter. caution OnName only works with naming routes, not groups. Signature func (app *App) OnName(handler ...OnNameHandler) OnName Example package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" ) func main() { app := fiber.New() app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"index\") app.Hooks().OnName(func(r fiber.Route) error { fmt.Print(\"Name: \" + r.Name + \", \") return nil }) app.Hooks().OnName(func(r fiber.Route) error { fmt.Print(\"Method: \" + r.Method + \"\\n\") return nil }) app.Get(\"/add/user\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"addUser\") app.Delete(\"/destroy/user\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"destroyUser\") app.Listen(\":5000\") } // Results: // Name: addUser, Method: GET // Name: destroyUser, Method: DELETE","s":"OnName","u":"/guide/hooks","h":"#onname","p":1709},{"i":1718,"t":"OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by group parameter. Signature func (app *App) OnGroup(handler ...OnGroupHandler)","s":"OnGroup","u":"/guide/hooks","h":"#ongroup","p":1709},{"i":1720,"t":"OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by group parameter. caution OnGroupName only works with naming groups, not routes. Signature func (app *App) OnGroupName(handler ...OnGroupNameHandler)","s":"OnGroupName","u":"/guide/hooks","h":"#ongroupname","p":1709},{"i":1722,"t":"OnListen is a hook to execute user functions on Listen, ListenTLS, Listener. Signature func (app *App) OnListen(handler ...OnListenHandler)","s":"OnListen","u":"/guide/hooks","h":"#onlisten","p":1709},{"i":1724,"t":"OnFork is a hook to execute user functions on Fork. Signature func (app *App) OnFork(handler ...OnForkHandler)","s":"OnFork","u":"/guide/hooks","h":"#onfork","p":1709},{"i":1726,"t":"OnShutdown is a hook to execute user functions after Shutdown. Signature func (app *App) OnShutdown(handler ...OnShutdownHandler)","s":"OnShutdown","u":"/guide/hooks","h":"#onshutdown","p":1709},{"i":1728,"t":"OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting. Signature func (h *Hooks) OnMount(handler ...OnMountHandler) OnMount Example package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" ) func main() { app := New() app.Get(\"/\", testSimpleHandler).Name(\"x\") subApp := New() subApp.Get(\"/test\", testSimpleHandler) subApp.Hooks().OnMount(func(parent *fiber.App) error { fmt.Print(\"Mount path of parent app: \"+parent.MountPath()) // ... return nil }) app.Mount(\"/sub\", subApp) } // Result: // Mount path of parent app: caution OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.","s":"OnMount","u":"/guide/hooks","h":"#onmount","p":1709},{"i":1731,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Handlers","u":"/guide/routing","h":"#handlers","p":1729},{"i":1733,"t":"Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be strings or string patterns. Examples of route paths based on strings // This route path will match requests to the root route, \"/\": app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"root\") }) // This route path will match requests to \"/about\": app.Get(\"/about\", func(c *fiber.Ctx) error { return c.SendString(\"about\") }) // This route path will match requests to \"/random.txt\": app.Get(\"/random.txt\", func(c *fiber.Ctx) error { return c.SendString(\"random.txt\") }) As with the expressJs framework, the order of the route declaration plays a role. When a request is received, the routes are checked in the order in which they are declared. info So please be careful to write routes with variable parameters after the routes that contain fixed parts, so that these variable parts do not match instead and unexpected behavior occurs.","s":"Paths","u":"/guide/routing","h":"#paths","p":1729},{"i":1735,"t":"Route parameters are dynamic elements in the route, which are named or not named segments. This segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the Params function, with the name of the route parameter specified in the path as their respective keys or for unnamed parameters the character(*, +) and the counter of this. The characters :, +, and * are characters that introduce a parameter. Greedy parameters are indicated by wildcard(*) or plus(+) signs. The routing also offers the possibility to use optional parameters, for the named parameters these are marked with a final \"?\", unlike the plus sign which is not optional, you can use the wildcard character for a parameter range which is optional and greedy. Example of define routes with route parameters // Parameters app.Get(\"/user/:name/books/:title\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s\\n\", c.Params(\"name\")) fmt.Fprintf(c, \"%s\\n\", c.Params(\"title\")) return nil }) // Plus - greedy - not optional app.Get(\"/user/+\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"+\")) }) // Optional parameter app.Get(\"/user/:name?\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"name\")) }) // Wildcard - greedy - optional app.Get(\"/user/*\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"*\")) }) // This route path will match requests to \"/v1/some/resource/name:customVerb\", since the parameter character is escaped app.Get(\"/v1/some/resource/name\\\\:customVerb\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, Community\") }) info Since the hyphen (-) and the dot (.) are interpreted literally, they can be used along with route parameters for useful purposes. info All special parameter characters can also be escaped with \"\\\\\" and lose their value, so you can use them in the route if you want, like in the custom methods of the google api design guide. // http://localhost:3000/plantae/prunus.persica app.Get(\"/plantae/:genus.:species\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s.%s\\n\", c.Params(\"genus\"), c.Params(\"species\")) return nil // prunus.persica }) // http://localhost:3000/flights/LAX-SFO app.Get(\"/flights/:from-:to\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s-%s\\n\", c.Params(\"from\"), c.Params(\"to\")) return nil // LAX-SFO }) Our intelligent router recognizes that the introductory parameter characters should be part of the request route in this case and can process them as such. // http://localhost:3000/shop/product/color:blue/size:xs app.Get(\"/shop/product/color::color/size::size\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s:%s\\n\", c.Params(\"color\"), c.Params(\"size\")) return nil // blue:xs }) In addition, several parameters in a row and several unnamed parameter characters in the route, such as the wildcard or plus character, are possible, which greatly expands the possibilities of the router for the user. // GET /@v1 // Params: \"sign\" -> \"@\", \"param\" -> \"v1\" app.Get(\"/:sign:param\", handler) // GET /api-v1 // Params: \"name\" -> \"v1\" app.Get(\"/api-:name\", handler) // GET /customer/v1/cart/proxy // Params: \"*1\" -> \"customer/\", \"*2\" -> \"/cart\" app.Get(\"/*v1*/proxy\", handler) // GET /v1/brand/4/shop/blue/xs // Params: \"*1\" -> \"brand/4\", \"*2\" -> \"blue/xs\" app.Get(\"/v1/*/shop/*\", handler) We have adapted the routing strongly to the express routing, but currently without the possibility of the regular expressions, because they are quite slow. The possibilities can be tested with version 0.1.7 (express 4) in the online Express route tester.","s":"Parameters","u":"/guide/routing","h":"#parameters","p":1729},{"i":1737,"t":"Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values by parameters. The feature was intorduced in v2.37.0 and inspired by .NET Core. caution Constraints aren't validation for parameters. If constraint aren't valid for parameter value, Fiber returns 404 handler. Constraint Example Example matches int :id 123456789, -123456789 bool :active true,false guid :id CD2C1638-1638-72D5-1638-DEADBEEF1638 float :weight 1.234, -1,001.01e8 minLen(value) :username Test (must be at least 4 characters) maxLen(value) :filename MyFile (must be no more than 8 characters len(length) :filename somefile.txt (exactly 12 characters) min(value) :age 19 (Integer value must be at least 18) max(value) :age 91 (Integer value must be no more than 120) range(min,max) :age 91 (Integer value must be at least 18 but no more than 120) alpha :name Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive) datetime :dob 2005-11-01 regex(expression) :date 2022-08-27 (Must match regular expression) Examples Single Constraint Multiple Constraints Regex Constraint app.Get(\"/:test\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/12 // 12 // curl -X GET http://localhost:3000/1 // Cannot GET /1 You can use ; for multiple constraints. app.Get(\"/:test\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/120000 // Cannot GET /120000 // curl -X GET http://localhost:3000/1 // Cannot GET /1 // curl -X GET http://localhost:3000/250 // 250 Fiber precompiles regex query when to register routes. So there're no performance overhead for regex constraint. app.Get(\"/:date\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"date\")) }) // curl -X GET http://localhost:3000/125 // Cannot GET /125 // curl -X GET http://localhost:3000/test // Cannot GET /test // curl -X GET http://localhost:3000/2022-08-27 // 2022-08-27 caution You should use \\\\ before routing-specific characters when to use datetime constraint (*, +, ?, :, /, <, >, ;, (, )), to avoid wrong parsing. Optional Parameter Example You can impose constraints on optional parameters as well. app.Get(\"/:test?\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/42 // 42 // curl -X GET http://localhost:3000/ // // curl -X GET http://localhost:3000/7.0 // Cannot GET /7.0","s":"Constraints","u":"/guide/routing","h":"#constraints","p":1729},{"i":1739,"t":"Functions that are designed to make changes to the request or response are called middleware functions. The Next is a Fiber router function, when called, executes the next function that matches the current route. Example of a middleware function app.Use(func(c *fiber.Ctx) error { // Set a custom header on all responses: c.Set(\"X-Custom-Header\", \"Hello, World\") // Go to next middleware: return c.Next() }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) Use method path is a mount, or prefix path, and limits middleware to only apply to any paths requested that begin with it.","s":"Middleware","u":"/guide/routing","h":"#middleware","p":1729},{"i":1741,"t":"If you have many endpoints, you can organize your routes using Group. func main() { app := fiber.New() api := app.Group(\"/api\", middleware) // /api v1 := api.Group(\"/v1\", middleware) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", middleware) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } More information about this in our Grouping Guide","s":"Grouping","u":"/guide/routing","h":"#grouping","p":1729},{"i":1744,"t":"Fiber provides a Views interface to provide your own template engine: Views type Views interface { Load() error Render(io.Writer, string, interface{}, ...string) error } Views interface contains a Load and Render method, Load is executed by Fiber on app initialization to load/parse the templates. // Pass engine to Fiber's Views Engine app := fiber.New(fiber.Config{ Views: engine, // Views Layout is the global layout for all template render until override on Render function. ViewsLayout: \"layouts/main\" }) The Render method is linked to the ctx.Render() function that accepts a template name and binding data. It will use global layout if layout is not being defined in Render function. If the Fiber config option PassLocalsToViews is enabled, then all locals set using ctx.Locals(key, value) will be passed to the template. app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"hello\": \"world\", }); })","s":"Template interfaces","u":"/guide/templates","h":"#template-interfaces","p":1742},{"i":1746,"t":"Fiber team maintains templates package that provides wrappers for multiple template engines: html ace amber django handlebars jet mustache pug Example views/index.html package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html/v2\" ) func main() { // Initialize standard Go html template engine engine := html.New(\"./views\", \".html\") // If you want other engine, just replace with following // Create a new engine with django // engine := django.New(\"./views\", \".django\") app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index template return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) }

{{.Title}}

","s":"Engines","u":"/guide/templates","h":"#engines","p":1742},{"i":1749,"t":"Fiber can make great use of the validator package to ensure correct validation of data to store. Official validator Github page (Installation, use, examples..). You can find the detailed descriptions of the validations used in the fields contained on the structs below: Detailed docs Validation Example type Job struct{ Type string `validate:\"required,min=3,max=32\"` Salary int `validate:\"required,number\"` } type User struct{ Name string `validate:\"required,min=3,max=32\"` // use `*bool` here otherwise the validation will fail for `false` values // Ref: https://github.com/go-playground/validator/issues/319#issuecomment-339222389 IsActive *bool `validate:\"required\"` Email string `validate:\"required,email,min=6,max=32\"` Job Job `validate:\"dive\"` } type ErrorResponse struct { FailedField string Tag string Value string } var validate = validator.New() func ValidateStruct(user User) []*ErrorResponse { var errors []*ErrorResponse err := validate.Struct(user) if err != nil { for _, err := range err.(validator.ValidationErrors) { var element ErrorResponse element.FailedField = err.StructNamespace() element.Tag = err.Tag() element.Value = err.Param() errors = append(errors, &element) } } return errors } func AddUser(c *fiber.Ctx) error { //Connect to database user := new(User) if err := c.BodyParser(user); err != nil { return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{ \"message\": err.Error(), }) } errors := ValidateStruct(*user) if errors != nil { return c.Status(fiber.StatusBadRequest).JSON(errors) } //Do something else here //Return user return c.JSON(user) } // Running a test with the following curl commands // curl -X POST -H \"Content-Type: application/json\" --data \"{\\\"name\\\":\\\"john\\\",\\\"isactive\\\":\\\"True\\\"}\" http://localhost:8080/register/user // Results in // [{\"FailedField\":\"User.Email\",\"Tag\":\"required\",\"Value\":\"\"},{\"FailedField\":\"User.Job.Salary\",\"Tag\":\"required\",\"Value\":\"\"},{\"FailedField\":\"User.Job.Type\",\"Tag\":\"required\",\"Value\":\"\"}]⏎","s":"Validator package","u":"/guide/validation","h":"#validator-package","p":1747},{"i":1751,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Route Handlers","u":"/partials/routing/route-handlers","h":"","p":1750},{"i":1754,"t":"Checks, if the specified extensions or content types are acceptable. info Based on the request’s Accept HTTP header. Signature func (c *Ctx) Accepts(offers ...string) string func (c *Ctx) AcceptsCharsets(offers ...string) string func (c *Ctx) AcceptsEncodings(offers ...string) string func (c *Ctx) AcceptsLanguages(offers ...string) string Example // Accept: text/html, application/json; q=0.8, text/plain; q=0.5; charset=\"utf-8\" app.Get(\"/\", func(c *fiber.Ctx) error { c.Accepts(\"html\") // \"html\" c.Accepts(\"text/html\") // \"text/html\" c.Accepts(\"json\", \"text\") // \"json\" c.Accepts(\"application/json\") // \"application/json\" c.Accepts(\"text/plain\", \"application/json\") // \"application/json\", due to quality c.Accepts(\"image/png\") // \"\" c.Accepts(\"png\") // \"\" // ... }) Example 2 // Accept: text/html, text/*, application/json, */*; q=0 app.Get(\"/\", func(c *fiber.Ctx) error { c.Accepts(\"text/plain\", \"application/json\") // \"application/json\", due to specificity c.Accepts(\"application/json\", \"text/html\") // \"text/html\", due to first match c.Accepts(\"image/png\") // \"\", due to */* without q factor 0 is Not Acceptable // ... }) Fiber provides similar functions for the other accept headers. // Accept-Charset: utf-8, iso-8859-1;q=0.2 // Accept-Encoding: gzip, compress;q=0.2 // Accept-Language: en;q=0.8, nl, ru app.Get(\"/\", func(c *fiber.Ctx) error { c.AcceptsCharsets(\"utf-16\", \"iso-8859-1\") // \"iso-8859-1\" c.AcceptsEncodings(\"compress\", \"br\") // \"compress\" c.AcceptsLanguages(\"pt\", \"nl\", \"ru\") // \"nl\" // ... })","s":"Accepts","u":"/api/ctx","h":"#accepts","p":1752},{"i":1756,"t":"Params is used to get all route parameters. Using Params method to get params. Signature func (c *Ctx) AllParams() map[string]string Example // GET http://example.com/user/fenny app.Get(\"/user/:name\", func(c *fiber.Ctx) error { c.AllParams() // \"{\"name\": \"fenny\"}\" // ... }) // GET http://example.com/user/fenny/123 app.Get(\"/user/*\", func(c *fiber.Ctx) error { c.AllParams() // \"{\"*1\": \"fenny/123\"}\" // ... })","s":"AllParams","u":"/api/ctx","h":"#allparams","p":1752},{"i":1758,"t":"Returns the *App reference so you could easily access all application settings. Signature func (c *Ctx) App() *App Example app.Get(\"/stack\", func(c *fiber.Ctx) error { return c.JSON(c.App().Stack()) })","s":"App","u":"/api/ctx","h":"#app","p":1752},{"i":1760,"t":"Appends the specified value to the HTTP response header field. caution If the header is not already set, it creates the header with the specified value. Signature func (c *Ctx) Append(field string, values ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Append(\"Link\", \"http://google.com\", \"http://localhost\") // => Link: http://localhost, http://google.com c.Append(\"Link\", \"Test\") // => Link: http://localhost, http://google.com, Test // ... })","s":"Append","u":"/api/ctx","h":"#append","p":1752},{"i":1762,"t":"Sets the HTTP response Content-Disposition header field to attachment. Signature func (c *Ctx) Attachment(filename ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Attachment() // => Content-Disposition: attachment c.Attachment(\"./upload/images/logo.png\") // => Content-Disposition: attachment; filename=\"logo.png\" // => Content-Type: image/png // ... })","s":"Attachment","u":"/api/ctx","h":"#attachment","p":1752},{"i":1764,"t":"Returns the base URL (protocol + host) as a string. Signature func (c *Ctx) BaseURL() string Example // GET https://example.com/page#chapter-1 app.Get(\"/\", func(c *fiber.Ctx) error { c.BaseURL() // https://example.com // ... })","s":"BaseURL","u":"/api/ctx","h":"#baseurl","p":1752},{"i":1766,"t":"Add vars to default view var map binding to template engine. Variables are read by the Render method and may be overwritten. Signature func (c *Ctx) Bind(vars Map) error Example app.Use(func(c *fiber.Ctx) error { c.Bind(fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"xxx.tmpl\", fiber.Map{}) // Render will use Title variable })","s":"Bind","u":"/api/ctx","h":"#bind","p":1752},{"i":1768,"t":"Returns the raw request body. Signature func (c *Ctx) Body() []byte Example // curl -X POST http://localhost:8080 -d user=john app.Post(\"/\", func(c *fiber.Ctx) error { // Get raw body from POST request: return c.Send(c.Body()) // []byte(\"user=john\") }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Body","u":"/api/ctx","h":"#body","p":1752},{"i":1770,"t":"Binds the request body to a struct. It is important to specify the correct struct tag based on the content type to be parsed. For example, if you want to parse a JSON body with a field called Pass, you would use a struct field of json:\"pass\". content-type struct tag application/x-www-form-urlencoded form multipart/form-data form application/json json application/xml xml text/xml xml Signature func (c *Ctx) BodyParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `json:\"name\" xml:\"name\" form:\"name\"` Pass string `json:\"pass\" xml:\"pass\" form:\"pass\"` } app.Post(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.BodyParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe // ... }) // Run tests with the following curl commands // curl -X POST -H \"Content-Type: application/json\" --data \"{\\\"name\\\":\\\"john\\\",\\\"pass\\\":\\\"doe\\\"}\" localhost:3000 // curl -X POST -H \"Content-Type: application/xml\" --data \"johndoe\" localhost:3000 // curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" --data \"name=john&pass=doe\" localhost:3000 // curl -X POST -F name=john -F pass=doe http://localhost:3000 // curl -X POST \"http://localhost:3000/?name=john&pass=doe\" Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"BodyParser","u":"/api/ctx","h":"#bodyparser","p":1752},{"i":1772,"t":"Expire a client cookie (or all cookies if left empty) Signature func (c *Ctx) ClearCookie(key ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { // Clears all cookies: c.ClearCookie() // Expire specific cookie by name: c.ClearCookie(\"user\") // Expire multiple cookies by names: c.ClearCookie(\"token\", \"session\", \"track_id\", \"version\") // ... }) caution Web browsers and other compliant clients will only clear the cookie if the given options are identical to those when creating the cookie, excluding expires and maxAge. ClearCookie will not set these values for you - a technique similar to the one shown below should be used to ensure your cookie is deleted. Example app.Get(\"/set\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"token\", Value: \"randomvalue\", Expires: time.Now().Add(24 * time.Hour), HTTPOnly: true, SameSite: \"lax\", }) // ... }) app.Get(\"/delete\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"token\", // Set expiry date to the past Expires: time.Now().Add(-(time.Hour * 2)), HTTPOnly: true, SameSite: \"lax\", }) // ... })","s":"ClearCookie","u":"/api/ctx","h":"#clearcookie","p":1752},{"i":1774,"t":"ClientHelloInfo contains information from a ClientHello message in order to guide application logic in the GetCertificate and GetConfigForClient callbacks. You can refer to the ClientHelloInfo struct documentation for more information on the returned struct. Signature func (c *Ctx) ClientHelloInfo() *tls.ClientHelloInfo Example // GET http://example.com/hello app.Get(\"/hello\", func(c *fiber.Ctx) error { chi := c.ClientHelloInfo() // ... })","s":"ClientHelloInfo","u":"/api/ctx","h":"#clienthelloinfo","p":1752},{"i":1776,"t":"Returns *fasthttp.RequestCtx that is compatible with the context.Context interface that requires a deadline, a cancellation signal, and other values across API boundaries. Signature func (c *Ctx) Context() *fasthttp.RequestCtx info Please read the Fasthttp Documentation for more information.","s":"Context","u":"/api/ctx","h":"#context","p":1752},{"i":1778,"t":"Set cookie Signature func (c *Ctx) Cookie(cookie *Cookie) type Cookie struct { Name string `json:\"name\"` Value string `json:\"value\"` Path string `json:\"path\"` Domain string `json:\"domain\"` MaxAge int `json:\"max_age\"` Expires time.Time `json:\"expires\"` Secure bool `json:\"secure\"` HTTPOnly bool `json:\"http_only\"` SameSite string `json:\"same_site\"` SessionOnly bool `json:\"session_only\"` } Example app.Get(\"/\", func(c *fiber.Ctx) error { // Create cookie cookie := new(fiber.Cookie) cookie.Name = \"john\" cookie.Value = \"doe\" cookie.Expires = time.Now().Add(24 * time.Hour) // Set cookie c.Cookie(cookie) // ... })","s":"Cookie","u":"/api/ctx","h":"#cookie","p":1752},{"i":1780,"t":"Get cookie value by key, you could pass an optional default value that will be returned if the cookie key does not exist. Signature func (c *Ctx) Cookies(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { // Get cookie by key: c.Cookies(\"name\") // \"john\" c.Cookies(\"empty\", \"doe\") // \"doe\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Cookies","u":"/api/ctx","h":"#cookies","p":1752},{"i":1782,"t":"Transfers the file from path as an attachment. Typically, browsers will prompt the user to download. By default, the Content-Disposition header filename= parameter is the file path (this typically appears in the browser dialog). Override this default with the filename parameter. Signature func (c *Ctx) Download(file string, filename ...string) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.Download(\"./files/report-12345.pdf\"); // => Download report-12345.pdf return c.Download(\"./files/report-12345.pdf\", \"report.pdf\"); // => Download report.pdf })","s":"Download","u":"/api/ctx","h":"#download","p":1752},{"i":1784,"t":"Performs content-negotiation on the Accept HTTP header. It uses Accepts to select a proper format. info If the header is not specified or there is no proper format, text/plain is used. Signature func (c *Ctx) Format(body interface{}) error Example app.Get(\"/\", func(c *fiber.Ctx) error { // Accept: text/plain c.Format(\"Hello, World!\") // => Hello, World! // Accept: text/html c.Format(\"Hello, World!\") // =>

Hello, World!

// Accept: application/json c.Format(\"Hello, World!\") // => \"Hello, World!\" // .. })","s":"Format","u":"/api/ctx","h":"#format","p":1752},{"i":1786,"t":"MultipartForm files can be retrieved by name, the first file from the given key is returned. Signature func (c *Ctx) FormFile(key string) (*multipart.FileHeader, error) Example app.Post(\"/\", func(c *fiber.Ctx) error { // Get first file from form field \"document\": file, err := c.FormFile(\"document\") // Save file to root directory: return c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)) })","s":"FormFile","u":"/api/ctx","h":"#formfile","p":1752},{"i":1788,"t":"Any form values can be retrieved by name, the first value from the given key is returned. Signature func (c *Ctx) FormValue(key string, defaultValue ...string) string Example app.Post(\"/\", func(c *fiber.Ctx) error { // Get first value from form field \"name\": c.FormValue(\"name\") // => \"john\" or \"\" if not exist // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"FormValue","u":"/api/ctx","h":"#formvalue","p":1752},{"i":1790,"t":"https://expressjs.com/en/4x/api.html#req.fresh Signature func (c *Ctx) Fresh() bool","s":"Fresh","u":"/api/ctx","h":"#fresh","p":1752},{"i":1792,"t":"Returns the HTTP request header specified by the field. tip The match is case-insensitive. Signature func (c *Ctx) Get(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Get(\"Content-Type\") // \"text/plain\" c.Get(\"CoNtEnT-TypE\") // \"text/plain\" c.Get(\"something\", \"john\") // \"john\" // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Get","u":"/api/ctx","h":"#get","p":1752},{"i":1794,"t":"Returns the HTTP request headers. Signature func (c *Ctx) GetReqHeaders() map[string]string","s":"GetReqHeaders","u":"/api/ctx","h":"#getreqheaders","p":1752},{"i":1796,"t":"Returns the HTTP response header specified by the field. tip The match is case-insensitive. Signature func (c *Ctx) GetRespHeader(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.GetRespHeader(\"X-Request-Id\") // \"8d7ad5e3-aaf3-450b-a241-2beb887efd54\" c.GetRespHeader(\"Content-Type\") // \"text/plain\" c.GetRespHeader(\"something\", \"john\") // \"john\" // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"GetRespHeader","u":"/api/ctx","h":"#getrespheader","p":1752},{"i":1798,"t":"Returns the HTTP response headers. Signature func (c *Ctx) GetRespHeaders() map[string]string","s":"GetRespHeaders","u":"/api/ctx","h":"#getrespheaders","p":1752},{"i":1800,"t":"Generates URLs to named routes, with parameters. URLs are relative, for example: \"/user/1831\" Signature func (c *Ctx) GetRouteURL(routeName string, params Map) (string, error) Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Home page\") }).Name(\"home\") app.Get(\"/user/:id\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"id\")) }).Name(\"user.show\") app.Get(\"/test\", func(c *fiber.Ctx) error { location, _ := c.GetRouteURL(\"user.show\", fiber.Map{\"id\": 1}) return c.SendString(location) }) // /test returns \"/user/1\"","s":"GetRouteURL","u":"/api/ctx","h":"#getrouteurl","p":1752},{"i":1802,"t":"Returns the hostname derived from the Host HTTP header. Signature func (c *Ctx) Hostname() string Example // GET http://google.com/search app.Get(\"/\", func(c *fiber.Ctx) error { c.Hostname() // \"google.com\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Hostname","u":"/api/ctx","h":"#hostname","p":1752},{"i":1804,"t":"Returns the remote IP address of the request. Signature func (c *Ctx) IP() string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.IP() // \"127.0.0.1\" // ... }) When registering the proxy request header in the fiber app, the ip address of the header is returned (Fiber configuration) app := fiber.New(fiber.Config{ ProxyHeader: fiber.HeaderXForwardedFor, })","s":"IP","u":"/api/ctx","h":"#ip","p":1752},{"i":1806,"t":"Returns an array of IP addresses specified in the X-Forwarded-For request header. Signature func (c *Ctx) IPs() []string Example // X-Forwarded-For: proxy1, 127.0.0.1, proxy3 app.Get(\"/\", func(c *fiber.Ctx) error { c.IPs() // [\"proxy1\", \"127.0.0.1\", \"proxy3\"] // ... })","s":"IPs","u":"/api/ctx","h":"#ips","p":1752},{"i":1808,"t":"Returns the matching content type, if the incoming request’s Content-Type HTTP header field matches the MIME type specified by the type parameter. info If the request has no body, it returns false. Signature func (c *Ctx) Is(extension string) bool Example // Content-Type: text/html; charset=utf-8 app.Get(\"/\", func(c *fiber.Ctx) error { c.Is(\"html\") // true c.Is(\".html\") // true c.Is(\"json\") // false // ... })","s":"Is","u":"/api/ctx","h":"#is","p":1752},{"i":1810,"t":"Returns true if request came from localhost Signature func (c *Ctx) IsFromLocal() bool { Example app.Get(\"/\", func(c *fiber.Ctx) error { // If request came from localhost, return true else return false c.IsFromLocal() // ... })","s":"IsFromLocal","u":"/api/ctx","h":"#isfromlocal","p":1752},{"i":1812,"t":"Converts any interface or string to JSON using the goccy/go-json package. info JSON also sets the content header to application/json. Signature func (c *Ctx) JSON(data interface{}) error Example type SomeStruct struct { Name string Age uint8 } app.Get(\"/json\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ Name: \"Grame\", Age: 20, } return c.JSON(data) // => Content-Type: application/json // => \"{\"Name\": \"Grame\", \"Age\": 20}\" return c.JSON(fiber.Map{ \"name\": \"Grame\", \"age\": 20, }) // => Content-Type: application/json // => \"{\"name\": \"Grame\", \"age\": 20}\" })","s":"JSON","u":"/api/ctx","h":"#json","p":1752},{"i":1814,"t":"Sends a JSON response with JSONP support. This method is identical to JSON, except that it opts-in to JSONP callback support. By default, the callback name is simply callback. Override this by passing a named string in the method. Signature func (c *Ctx) JSONP(data interface{}, callback ...string) error Example type SomeStruct struct { name string age uint8 } app.Get(\"/\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ name: \"Grame\", age: 20, } return c.JSONP(data) // => callback({\"name\": \"Grame\", \"age\": 20}) return c.JSONP(data, \"customFunc\") // => customFunc({\"name\": \"Grame\", \"age\": 20}) })","s":"JSONP","u":"/api/ctx","h":"#jsonp","p":1752},{"i":1816,"t":"Joins the links followed by the property to populate the response’s Link HTTP header field. Signature func (c *Ctx) Links(link ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Links( \"http://api.example.com/users?page=2\", \"next\", \"http://api.example.com/users?page=5\", \"last\", ) // Link: ; rel=\"next\", // ; rel=\"last\" // ... })","s":"Links","u":"/api/ctx","h":"#links","p":1752},{"i":1818,"t":"A method that stores variables scoped to the request and, therefore, are available only to the routes that match the request. tip This is useful if you want to pass some specific data to the next middleware. Signature func (c *Ctx) Locals(key interface{}, value ...interface{}) interface{} Example app.Use(func(c *fiber.Ctx) error { c.Locals(\"user\", \"admin\") return c.Next() }) app.Get(\"/admin\", func(c *fiber.Ctx) error { if c.Locals(\"user\") == \"admin\" { return c.Status(fiber.StatusOK).SendString(\"Welcome, admin!\") } return c.SendStatus(fiber.StatusForbidden) })","s":"Locals","u":"/api/ctx","h":"#locals","p":1752},{"i":1820,"t":"Sets the response Location HTTP header to the specified path parameter. Signature func (c *Ctx) Location(path string) Example app.Post(\"/\", func(c *fiber.Ctx) error { c.Location(\"http://example.com\") c.Location(\"/foo/bar\") return nil })","s":"Location","u":"/api/ctx","h":"#location","p":1752},{"i":1822,"t":"Returns a string corresponding to the HTTP method of the request: GET, POST, PUT, and so on. Optionally, you could override the method by passing a string. Signature func (c *Ctx) Method(override ...string) string Example app.Post(\"/\", func(c *fiber.Ctx) error { c.Method() // \"POST\" c.Method(\"GET\") c.Method() // GET // ... })","s":"Method","u":"/api/ctx","h":"#method","p":1752},{"i":1824,"t":"To access multipart form entries, you can parse the binary with MultipartForm(). This returns a map[string][]string, so given a key, the value will be a string slice. Signature func (c *Ctx) MultipartForm() (*multipart.Form, error) Example app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form if token := form.Value[\"token\"]; len(token) > 0 { // Get key value: fmt.Println(token[0]) } // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to disk: if err := c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)); err != nil { return err } } } return err })","s":"MultipartForm","u":"/api/ctx","h":"#multipartform","p":1752},{"i":1826,"t":"When Next is called, it executes the next method in the stack that matches the current route. You can pass an error struct within the method that will end the chaining and call the error handler. Signature func (c *Ctx) Next() error Example app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(\"1st route!\") return c.Next() }) app.Get(\"*\", func(c *fiber.Ctx) error { fmt.Println(\"2nd route!\") return c.Next() }) app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(\"3rd route!\") return c.SendString(\"Hello, World!\") })","s":"Next","u":"/api/ctx","h":"#next","p":1752},{"i":1828,"t":"Returns the original request URL. Signature func (c *Ctx) OriginalURL() string Example // GET http://example.com/search?q=something app.Get(\"/\", func(c *fiber.Ctx) error { c.OriginalURL() // \"/search?q=something\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"OriginalURL","u":"/api/ctx","h":"#originalurl","p":1752},{"i":1830,"t":"Method can be used to get the route parameters, you could pass an optional default value that will be returned if the param key does not exist. info Defaults to empty string (\"\"), if the param doesn't exist. Signature func (c *Ctx) Params(key string, defaultValue ...string) string Example // GET http://example.com/user/fenny app.Get(\"/user/:name\", func(c *fiber.Ctx) error { c.Params(\"name\") // \"fenny\" // ... }) // GET http://example.com/user/fenny/123 app.Get(\"/user/*\", func(c *fiber.Ctx) error { c.Params(\"*\") // \"fenny/123\" c.Params(\"*1\") // \"fenny/123\" // ... }) Unnamed route parameters(*, +) can be fetched by the character and the counter in the route. Example // ROUTE: /v1/*/shop/* // GET: /v1/brand/4/shop/blue/xs c.Params(\"*1\") // \"brand/4\" c.Params(\"*2\") // \"blue/xs\" For reasons of downward compatibility, the first parameter segment for the parameter character can also be accessed without the counter. Example app.Get(\"/v1/*/shop/*\", func(c *fiber.Ctx) error { c.Params(\"*\") // outputs the values of the first wildcard segment }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Params","u":"/api/ctx","h":"#params","p":1752},{"i":1832,"t":"Method can be used to get an integer from the route parameters. Please note if that parameter is not in the request, zero will be returned. If the parameter is NOT a number, zero and an error will be returned info Defaults to the integer zero (0), if the param doesn't exist. Signature func (c *Ctx) ParamsInt(key string) (int, error) Example // GET http://example.com/user/123 app.Get(\"/user/:id\", func(c *fiber.Ctx) error { id, err := c.ParamsInt(\"id\") // int 123 and no error // ... }) This method is equivalent of using atoi with ctx.Params","s":"ParamsInt","u":"/api/ctx","h":"#paramsint","p":1752},{"i":1834,"t":"This method is similar to BodyParser, but for path parameters. It is important to use the struct tag \"params\". For example, if you want to parse a path parameter with a field called Pass, you would use a struct field of params:\"pass\" Signature func (c *Ctx) ParamsParser(out interface{}) error Example // GET http://example.com/user/111 app.Get(\"/user/:id\", func(c *fiber.Ctx) error { param := struct {ID uint `params:\"id\"`}{} c.ParamsParser(¶m) // \"{\"id\": 111}\" // ... })","s":"ParamsParser","u":"/api/ctx","h":"#paramsparser","p":1752},{"i":1836,"t":"Contains the path part of the request URL. Optionally, you could override the path by passing a string. For internal redirects, you might want to call RestartRouting instead of Next. Signature func (c *Ctx) Path(override ...string) string Example // GET http://example.com/users?sort=desc app.Get(\"/users\", func(c *fiber.Ctx) error { c.Path() // \"/users\" c.Path(\"/john\") c.Path() // \"/john\" // ... })","s":"Path","u":"/api/ctx","h":"#path","p":1752},{"i":1838,"t":"Contains the request protocol string: http or https for TLS requests. Signature func (c *Ctx) Protocol() string Example // GET http://example.com app.Get(\"/\", func(c *fiber.Ctx) error { c.Protocol() // \"http\" // ... })","s":"Protocol","u":"/api/ctx","h":"#protocol","p":1752},{"i":1840,"t":"Queries is a function that returns an object containing a property for each query string parameter in the route. Signature func (c *Ctx) Queries() (map[string]string, error) Example // GET http://example.com/?name=alex&want_pizza=false&id= app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"name\"] // \"alex\" m[\"want_pizza\"] // \"false\" m[\"id\"] // \"\" // ... }) Example // GET http://example.com/?field1=value1&field1=value2&field2=value3 app.Get(\"/\", func (c *fiber.Ctx) error { m := c.Queries() m[\"field1\"] // \"value2\" m[\"field2\"] // value3 }) Example // GET http://example.com/?list_a=1&list_a=2&list_a=3&list_b[]=1&list_b[]=2&list_b[]=3&list_c=1,2,3 app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"list_a\"] // \"3\" m[\"list_b[]\"] // \"3\" m[\"list_c\"] // \"1,2,3\" }) Example // GET /api/posts?filters.author.name=John&filters.category.name=Technology app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"filters.author.name\"] // John m[\"filters.category.name\"] // Technology }) Example // GET /api/posts?tags=apple,orange,banana&filters[tags]=apple,orange,banana&filters[category][name]=fruits&filters.tags=apple,orange,banana&filters.category.name=fruits app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"tags\"] // apple,orange,banana m[\"filters[tags]\"] // apple,orange,banana m[\"filters[category][name]\"] // fruits m[\"filters.tags\"] // apple,orange,banana m[\"filters.category.name\"] // fruits })","s":"Queries","u":"/api/ctx","h":"#queries","p":1752},{"i":1842,"t":"This property is an object containing a property for each query string parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. info If there is no query string, it returns an empty string. Signature func (c *Ctx) Query(key string, defaultValue ...string) string Example // GET http://example.com/?order=desc&brand=nike app.Get(\"/\", func(c *fiber.Ctx) error { c.Query(\"order\") // \"desc\" c.Query(\"brand\") // \"nike\" c.Query(\"empty\", \"nike\") // \"nike\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Query","u":"/api/ctx","h":"#query","p":1752},{"i":1844,"t":"This property is an object containing a property for each query boolean parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, false will be returned. If the parameter is not a boolean, it is still tried to be converted and usually returned as false. Signature func (c *Ctx) QueryBool(key string, defaultValue ...bool) bool Example // GET http://example.com/?name=alex&want_pizza=false&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryBool(\"want_pizza\") // false c.QueryBool(\"want_pizza\", true) // false c.QueryBool(\"name\") // false c.QueryBool(\"name\", true) // true c.QueryBool(\"id\") // false c.QueryBool(\"id\", true) // true // ... })","s":"QueryBool","u":"/api/ctx","h":"#querybool","p":1752},{"i":1846,"t":"This property is an object containing a property for each query float64 parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, zero will be returned. If the parameter is not a number, it is still tried to be converted and usually returned as 1. info Defaults to the float64 zero (0), if the param doesn't exist. Signature func (c *Ctx) QueryFloat(key string, defaultValue ...float64) float64 Example // GET http://example.com/?name=alex&amount=32.23&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryFloat(\"amount\") // 32.23 c.QueryFloat(\"amount\", 3) // 32.23 c.QueryFloat(\"name\", 1) // 1 c.QueryFloat(\"name\") // 0 c.QueryFloat(\"id\", 3) // 3 // ... })","s":"QueryFloat","u":"/api/ctx","h":"#queryfloat","p":1752},{"i":1848,"t":"This property is an object containing a property for each query integer parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, zero will be returned. If the parameter is not a number, it is still tried to be converted and usually returned as 1. info Defaults to the integer zero (0), if the param doesn't exist. Signature func (c *Ctx) QueryInt(key string, defaultValue ...int) int Example // GET http://example.com/?name=alex&wanna_cake=2&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryInt(\"wanna_cake\", 1) // 2 c.QueryInt(\"name\", 1) // 1 c.QueryInt(\"id\", 1) // 1 c.QueryInt(\"id\") // 0 // ... })","s":"QueryInt","u":"/api/ctx","h":"#queryint","p":1752},{"i":1850,"t":"This method is similar to BodyParser, but for query parameters. It is important to use the struct tag \"query\". For example, if you want to parse a query parameter with a field called Pass, you would use a struct field of query:\"pass\". Signature func (c *Ctx) QueryParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `query:\"name\"` Pass string `query:\"pass\"` Products []string `query:\"products\"` } app.Get(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.QueryParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe log.Println(p.Products) // [shoe, hat] // ... }) // Run tests with the following curl command // curl \"http://localhost:3000/?name=john&pass=doe&products=shoe,hat\"","s":"QueryParser","u":"/api/ctx","h":"#queryparser","p":1752},{"i":1852,"t":"A struct containing the type and a slice of ranges will be returned. Signature func (c *Ctx) Range(size int) (Range, error) Example // Range: bytes=500-700, 700-900 app.Get(\"/\", func(c *fiber.Ctx) error { b := c.Range(1000) if b.Type == \"bytes\" { for r := range r.Ranges { fmt.Println(r) // [500, 700] } } })","s":"Range","u":"/api/ctx","h":"#range","p":1752},{"i":1854,"t":"Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. Signature func (c *Ctx) Redirect(location string, status ...int) error Example app.Get(\"/coffee\", func(c *fiber.Ctx) error { return c.Redirect(\"/teapot\") }) app.Get(\"/teapot\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusTeapot).Send(\"🍵 short and stout 🍵\") }) More examples app.Get(\"/\", func(c *fiber.Ctx) error { return c.Redirect(\"/foo/bar\") return c.Redirect(\"../login\") return c.Redirect(\"http://example.com\") return c.Redirect(\"http://example.com\", 301) })","s":"Redirect","u":"/api/ctx","h":"#redirect","p":1752},{"i":1856,"t":"Redirects to the specific route along with the parameters and with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. info If you want to send queries to route, you must add \"queries\" key typed as map[string]string to params. Signature func (c *Ctx) RedirectToRoute(routeName string, params fiber.Map, status ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { // /user/fiber return c.RedirectToRoute(\"user\", fiber.Map{ \"name\": \"fiber\" }) }) app.Get(\"/with-queries\", func(c *fiber.Ctx) error { // /user/fiber?data[0][name]=john&data[0][age]=10&test=doe return c.RedirectToRoute(\"user\", fiber.Map{ \"name\": \"fiber\", \"queries\": map[string]string{\"data[0][name]\": \"john\", \"data[0][age]\": \"10\", \"test\": \"doe\"}, }) }) app.Get(\"/user/:name\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"name\")) }).Name(\"user\")","s":"RedirectToRoute","u":"/api/ctx","h":"#redirecttoroute","p":1752},{"i":1858,"t":"Redirects back to refer URL. It redirects to fallback URL if refer header doesn't exists, with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. Signature func (c *Ctx) RedirectBack(fallback string, status ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Home page\") }) app.Get(\"/test\", func(c *fiber.Ctx) error { c.Set(\"Content-Type\", \"text/html\") return c.SendString(`Back`) }) app.Get(\"/back\", func(c *fiber.Ctx) error { return c.RedirectBack(\"/\") })","s":"RedirectBack","u":"/api/ctx","h":"#redirectback","p":1752},{"i":1860,"t":"Renders a view with data and sends a text/html response. By default Render uses the default Go Template engine. If you want to use another View engine, please take a look at our Template middleware. Signature func (c *Ctx) Render(name string, bind interface{}, layouts ...string) error","s":"Render","u":"/api/ctx","h":"#render","p":1752},{"i":1862,"t":"Request return the *fasthttp.Request pointer Signature func (c *Ctx) Request() *fasthttp.Request Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Request().Header.Method() // => []byte(\"GET\") })","s":"Request","u":"/api/ctx","h":"#request","p":1752},{"i":1864,"t":"This method is similar to BodyParser, but for request headers. It is important to use the struct tag \"reqHeader\". For example, if you want to parse a request header with a field called Pass, you would use a struct field of reqHeader:\"pass\". Signature func (c *Ctx) ReqHeaderParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `reqHeader:\"name\"` Pass string `reqHeader:\"pass\"` Products []string `reqHeader:\"products\"` } app.Get(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.ReqHeaderParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe log.Println(p.Products) // [shoe, hat] // ... }) // Run tests with the following curl command // curl \"http://localhost:3000/\" -H \"name: john\" -H \"pass: doe\" -H \"products: shoe,hat\"","s":"ReqHeaderParser","u":"/api/ctx","h":"#reqheaderparser","p":1752},{"i":1866,"t":"Response return the *fasthttp.Response pointer Signature func (c *Ctx) Response() *fasthttp.Response Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Response().BodyWriter().Write([]byte(\"Hello, World!\")) // => \"Hello, World!\" return nil })","s":"Response","u":"/api/ctx","h":"#response","p":1752},{"i":1868,"t":"Instead of executing the next method when calling Next, RestartRouting restarts execution from the first method that matches the current route. This may be helpful after overriding the path, i. e. an internal redirect. Note that handlers might be executed again which could result in an infinite loop. Signature func (c *Ctx) RestartRouting() error Example app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"From /new\") }) app.Get(\"/old\", func(c *fiber.Ctx) error { c.Path(\"/new\") return c.RestartRouting() })","s":"RestartRouting","u":"/api/ctx","h":"#restartrouting","p":1752},{"i":1870,"t":"Returns the matched Route struct. Signature func (c *Ctx) Route() *Route Example // http://localhost:8080/hello app.Get(\"/hello/:name\", func(c *fiber.Ctx) error { r := c.Route() fmt.Println(r.Method, r.Path, r.Params, r.Handlers) // GET /hello/:name handler [name] // ... }) caution Do not rely on c.Route() in middlewares before calling c.Next() - c.Route() returns the last executed route. Example func MyMiddleware() fiber.Handler { return func(c *fiber.Ctx) error { beforeNext := c.Route().Path // Will be '/' err := c.Next() afterNext := c.Route().Path // Will be '/hello/:name' return err } }","s":"Route","u":"/api/ctx","h":"#route","p":1752},{"i":1872,"t":"Method is used to save any multipart file to disk. Signature func (c *Ctx) SaveFile(fh *multipart.FileHeader, path string) error Example app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to disk: if err := c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)); err != nil { return err } } return err } })","s":"SaveFile","u":"/api/ctx","h":"#savefile","p":1752},{"i":1874,"t":"Method is used to save any multipart file to an external storage system. Signature func (c *Ctx) SaveFileToStorage(fileheader *multipart.FileHeader, path string, storage Storage) error Example storage := memory.New() app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to storage: if err := c.SaveFileToStorage(file, fmt.Sprintf(\"./%s\", file.Filename), storage); err != nil { return err } } return err } })","s":"SaveFileToStorage","u":"/api/ctx","h":"#savefiletostorage","p":1752},{"i":1876,"t":"A boolean property that is true , if a TLS connection is established. Signature func (c *Ctx) Secure() bool Example // Secure() method is equivalent to: c.Protocol() == \"https\"","s":"Secure","u":"/api/ctx","h":"#secure","p":1752},{"i":1878,"t":"Sets the HTTP response body. Signature func (c *Ctx) Send(body []byte) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.Send([]byte(\"Hello, World!\")) // => \"Hello, World!\" }) Fiber also provides SendString and SendStream methods for raw inputs. tip Use this if you don't need type assertion, recommended for faster performance. Signature func (c *Ctx) SendString(body string) error func (c *Ctx) SendStream(stream io.Reader, size ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") // => \"Hello, World!\" return c.SendStream(bytes.NewReader([]byte(\"Hello, World!\"))) // => \"Hello, World!\" })","s":"Send","u":"/api/ctx","h":"#send","p":1752},{"i":1880,"t":"Transfers the file from the given path. Sets the Content-Type response HTTP header field based on the filenames extension. caution Method doesn´t use gzipping by default, set it to true to enable. Signature func (c *Ctx) SendFile(file string, compress ...bool) error Example app.Get(\"/not-found\", func(c *fiber.Ctx) error { return c.SendFile(\"./public/404.html\"); // Disable compression return c.SendFile(\"./static/index.html\", false); }) info If the file contains an url specific character you have to escape it before passing the file path into the sendFile function. Example app.Get(\"/file-with-url-chars\", func(c *fiber.Ctx) error { return c.SendFile(url.PathEscape(\"hash_sign_#.txt\")) })","s":"SendFile","u":"/api/ctx","h":"#sendfile","p":1752},{"i":1882,"t":"Sets the status code and the correct status message in the body, if the response body is empty. tip You can find all used status codes and messages here. Signature func (c *Ctx) SendStatus(status int) error Example app.Get(\"/not-found\", func(c *fiber.Ctx) error { return c.SendStatus(415) // => 415 \"Unsupported Media Type\" c.SendString(\"Hello, World!\") return c.SendStatus(415) // => 415 \"Hello, World!\" })","s":"SendStatus","u":"/api/ctx","h":"#sendstatus","p":1752},{"i":1884,"t":"Sets the response’s HTTP header field to the specified key, value. Signature func (c *Ctx) Set(key string, val string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Set(\"Content-Type\", \"text/plain\") // => \"Content-type: text/plain\" // ... })","s":"Set","u":"/api/ctx","h":"#set","p":1752},{"i":1886,"t":"Allow you to config BodyParser/QueryParser decoder, base on schema's options, providing possibility to add custom type for pausing. Signature func SetParserDecoder(parserConfig fiber.ParserConfig{ IgnoreUnknownKeys bool, ParserType []fiber.ParserType{ Customtype interface{}, Converter func(string) reflect.Value, }, ZeroEmpty bool, SetAliasTag string, }) Example type CustomTime time.Time // String() returns the time in string func (ct *CustomTime) String() string { t := time.Time(*ct).String() return t } // Register the converter for CustomTime type format as 2006-01-02 var timeConverter = func(value string) reflect.Value { fmt.Println(\"timeConverter\", value) if v, err := time.Parse(\"2006-01-02\", value); err == nil { return reflect.ValueOf(v) } return reflect.Value{} } customTime := fiber.ParserType{ Customtype: CustomTime{}, Converter: timeConverter, } // Add setting to the Decoder fiber.SetParserDecoder(fiber.ParserConfig{ IgnoreUnknownKeys: true, ParserType: []fiber.ParserType{customTime}, ZeroEmpty: true, }) // Example to use CustomType, you pause custom time format not in RFC3339 type Demo struct { Date CustomTime `form:\"date\" query:\"date\"` Title string `form:\"title\" query:\"title\"` Body string `form:\"body\" query:\"body\"` } app.Post(\"/body\", func(c *fiber.Ctx) error { var d Demo c.BodyParser(&d) fmt.Println(\"d.Date\", d.Date.String()) return c.JSON(d) }) app.Get(\"/query\", func(c *fiber.Ctx) error { var d Demo c.QueryParser(&d) fmt.Println(\"d.Date\", d.Date.String()) return c.JSON(d) }) // curl -X POST -F title=title -F body=body -F date=2021-10-20 http://localhost:3000/body // curl -X GET \"http://localhost:3000/query?title=title&body=body&date=2021-10-20\"","s":"SetParserDecoder","u":"/api/ctx","h":"#setparserdecoder","p":1752},{"i":1888,"t":"Sets the user specified implementation for context interface. Signature func (c *Ctx) SetUserContext(ctx context.Context) Example app.Get(\"/\", func(c *fiber.Ctx) error { ctx := context.Background() c.SetUserContext(ctx) // Here ctx could be any context implementation // ... })","s":"SetUserContext","u":"/api/ctx","h":"#setusercontext","p":1752},{"i":1890,"t":"https://expressjs.com/en/4x/api.html#req.stale Signature func (c *Ctx) Stale() bool","s":"Stale","u":"/api/ctx","h":"#stale","p":1752},{"i":1892,"t":"Sets the HTTP status for the response. info Method is a chainable. Signature func (c *Ctx) Status(status int) *Ctx Example app.Get(\"/fiber\", func(c *fiber.Ctx) error { c.Status(fiber.StatusOK) return nil } app.Get(\"/hello\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusBadRequest).SendString(\"Bad Request\") } app.Get(\"/world\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusNotFound).SendFile(\"./public/gopher.png\") })","s":"Status","u":"/api/ctx","h":"#status","p":1752},{"i":1894,"t":"Returns a string slice of subdomains in the domain name of the request. The application property subdomain offset, which defaults to 2, is used for determining the beginning of the subdomain segments. Signature func (c *Ctx) Subdomains(offset ...int) []string Example // Host: \"tobi.ferrets.example.com\" app.Get(\"/\", func(c *fiber.Ctx) error { c.Subdomains() // [\"ferrets\", \"tobi\"] c.Subdomains(1) // [\"tobi\"] // ... })","s":"Subdomains","u":"/api/ctx","h":"#subdomains","p":1752},{"i":1896,"t":"Sets the Content-Type HTTP header to the MIME type listed here specified by the file extension. Signature func (c *Ctx) Type(ext string, charset ...string) *Ctx Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Type(\".html\") // => \"text/html\" c.Type(\"html\") // => \"text/html\" c.Type(\"png\") // => \"image/png\" c.Type(\"json\", \"utf-8\") // => \"application/json; charset=utf-8\" // ... })","s":"Type","u":"/api/ctx","h":"#type","p":1752},{"i":1898,"t":"UserContext returns a context implementation that was set by user earlier or returns a non-nil, empty context, if it was not set earlier. Signature func (c *Ctx) UserContext() context.Context Example app.Get(\"/\", func(c *fiber.Ctx) error { ctx := c.UserContext() // ctx is context implementation set by user // ... })","s":"UserContext","u":"/api/ctx","h":"#usercontext","p":1752},{"i":1900,"t":"Adds the given header field to the Vary response header. This will append the header, if not already listed, otherwise leaves it listed in the current location. info Multiple fields are allowed. Signature func (c *Ctx) Vary(fields ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Vary(\"Origin\") // => Vary: Origin c.Vary(\"User-Agent\") // => Vary: Origin, User-Agent // No duplicates c.Vary(\"Origin\") // => Vary: Origin, User-Agent c.Vary(\"Accept-Encoding\", \"Accept\") // => Vary: Origin, User-Agent, Accept-Encoding, Accept // ... })","s":"Vary","u":"/api/ctx","h":"#vary","p":1752},{"i":1902,"t":"Write adopts the Writer interface Signature func (c *Ctx) Write(p []byte) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Write([]byte(\"Hello, World!\")) // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"Write","u":"/api/ctx","h":"#write","p":1752},{"i":1904,"t":"Writef adopts the string with variables Signature func (c *Ctx) Writef(f string, a ...interface{}) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { world := \"World!\" c.Writef(\"Hello, %s\", world) // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"Writef","u":"/api/ctx","h":"#writef","p":1752},{"i":1906,"t":"WriteString adopts the string Signature func (c *Ctx) WriteString(s string) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.WriteString(\"Hello, World!\") // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"WriteString","u":"/api/ctx","h":"#writestring","p":1752},{"i":1908,"t":"A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery). Signature func (c *Ctx) XHR() bool Example // X-Requested-With: XMLHttpRequest app.Get(\"/\", func(c *fiber.Ctx) error { c.XHR() // true // ... })","s":"XHR","u":"/api/ctx","h":"#xhr","p":1752},{"i":1910,"t":"Converts any interface or string to XML using the standard encoding/xml package. info XML also sets the content header to application/xml. Signature func (c *Ctx) XML(data interface{}) error Example type SomeStruct struct { XMLName xml.Name `xml:\"Fiber\"` Name string `xml:\"Name\"` Age uint8 `xml:\"Age\"` } app.Get(\"/\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ Name: \"Grame\", Age: 20, } return c.XML(data) // // Grame // 20 // })","s":"XML","u":"/api/ctx","h":"#xml","p":1752}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/723",[0,7.753,1,9.501,2,8.153,3,2.485,4,7.434]],["t/725",[5,7.278,6,8.481,7,7.756,8,8.481,9,8.481,10,6.196,11,7.278,12,6.018,13,6.196,14,3.873,15,7.756,16,7.756,17,6.921,18,7.278,19,6.637]],["t/727",[3,2.546,5,8.354,20,2.469]],["t/729",[21,4.094,22,7.087,23,2.734,24,7.073,25,7.926,26,8.524,27,4.804,28,7.073]],["t/731",[29,9.735,30,9.735,31,9.735]],["t/733",[3,1.588,5,5.21,13,4.436,26,4.955,32,3.115,33,1.797,34,3.765,35,1.421,36,6.778,37,1.577,38,6.071,39,2.855,40,2.401,41,6.071,42,6.778,43,6.071,44,2.855,45,6.071,46,9.467,47,6.071,48,2.062,49,3.365,50,1.111,51,0.648,52,4.955,53,5.984,54,4.751,55,4.436,56,4.001,57,4.751,58,6.541,59,1.354,60,4.056,61,3.867,62,8.124]],["t/735",[26,9.063,39,4.522,63,8.794]],["t/737",[23,1.754,24,4.537,28,4.537,36,4.537,37,1.055,42,4.537,51,0.954,52,4.537,57,4.35,59,1.273,64,1.508,65,2.777,66,1.609,67,2.998,68,4.771,69,4.35,70,4.537,71,4.771,72,0.749,73,1.424,74,2.233,75,4.771,76,4.771,77,4.771,78,4.771,79,4.771,80,1.893,81,1.723,82,4.537,83,3.273,84,2.614,85,5.084,86,7.813,87,5.559,88,3.021,89,5.559,90,5.559,91,5.559,92,4.061]],["t/739",[23,1.858,24,4.807,28,4.807,36,4.807,37,1.118,40,2.329,42,4.807,51,0.948,52,4.807,57,4.609,59,0.96,64,1.598,65,2.891,66,1.705,67,3.177,68,5.055,69,4.609,70,4.807,71,5.055,72,0.793,73,1.509,74,2.366,75,5.055,76,5.055,77,5.055,78,5.055,79,5.055,80,1.704,81,1.552,82,4.807,83,3.468,84,2.77,85,5.387,88,2.278,92,4.303,93,3.8,94,5.055,95,2.136,96,5.891]],["t/741",[23,1.93,24,4.993,28,4.993,36,4.993,37,1.162,42,4.993,51,0.948,52,4.993,57,4.788,59,0.997,64,1.66,65,2.967,66,1.771,67,3.3,68,5.251,69,4.788,70,4.993,71,5.251,72,0.824,73,1.568,74,2.457,75,5.251,76,5.251,77,5.251,78,5.251,79,5.251,80,1.749,81,1.593,82,4.993,83,3.602,84,2.877,88,2.366,92,4.47,97,6.118,98,6.118]],["t/743",[20,2.439,21,3.512,99,8.794,100,3.955]],["t/745",[3,2.344,20,2.273,21,3.892,22,6.736,23,2.827,100,3.686,101,5.364,102,8.196]],["t/747",[103,9.735,104,1.732,105,4.173]],["t/749",[3,1.291,32,2.532,33,2.503,34,3.06,35,1.68,37,1.762,39,3.976,40,1.951,50,1.313,80,1.034,81,1.613,99,4.513,106,1.867,107,1.655,108,2.533,109,2.254,110,1.319,111,1.84,112,1.437,113,4.513,114,3.976,115,4.235,116,4.513,117,4.513,118,7.175,119,3.327,120,7.575,121,3.252,122,4.513,123,6.561,124,4.935,125,4.935,126,4.513,127,8.454,128,2.446,129,2.153,130,2.029,131,2.627,132,2.192,133,3.861,134,4.935,135,4.935,136,4.935,137,4.935,138,4.935,139,3.723,140,4.935,141,4.935,142,3.41,143,7.175,144,4.935,145,2.816,146,3.41,147,1.521,148,1.676,149,3.252,150,2.905,151,2.446,152,4.935]],["t/751",[23,1.901,51,0.94,59,1.347,64,1.635,65,2.936,66,1.744,72,0.811,73,1.544,74,2.42,80,1.262,81,1.576,102,5.51,110,1.518,113,5.51,116,5.51,117,5.51,122,5.51,123,5.51,126,5.51,142,4.163,153,6.025,154,6.025,155,6.025,156,4.402,157,6.025,158,6.025,159,1.846,160,6.025,161,5.51,162,6.025,163,6.025,164,6.025,165,6.025,166,3.809,167,2.113,168,6.025,169,6.025]],["t/753",[11,8.354,20,2.469,100,4.004]],["t/755",[21,3.999,22,6.923,23,2.961,170,8.056]],["t/757",[105,4.173,171,9.735,172,8.354]],["t/759",[11,5.21,20,1.54,32,3.115,33,1.797,34,3.765,35,1.421,37,1.797,50,1.111,51,0.474,59,0.99,73,1.556,80,1.272,81,1.158,107,2.036,112,1.768,167,2.129,173,7.595,174,3.319,175,4.604,176,10.178,177,2.129,178,5.21,179,5.573,180,3.275,181,3.464,182,6.071,183,2.102,184,6.071,185,3.505,186,4.955,187,3.01,188,6.071,189,2.696,190,2.438,191,3.192,192,3.916,193,3.152,194,3.152,195,6.071]],["t/761",[23,2.222,51,0.936,59,1.148,64,1.912,65,3.26,66,2.04,72,0.949,73,1.805,74,2.829,81,1.344,92,5.147,110,1.295,111,2.627,142,4.868,159,2.158,170,6.046,172,6.046,173,6.443,178,6.046,181,4.02,196,6.046,197,5.513,198,7.045,199,7.045,200,6.443]],["t/763",[23,2.11,51,0.943,59,1.09,64,1.814,65,3.15,66,1.936,72,0.901,73,1.713,74,2.686,81,1.276,92,4.886,110,1.229,142,4.621,159,2.049,170,5.739,172,5.739,179,3.937,189,2.97,196,5.739,197,5.233,200,6.116,201,6.688,202,6.688,203,8.864,204,6.688,205,6.688,206,6.688,207,6.688]],["t/765",[20,2.469,100,4.004,208,8.902]],["t/767",[3,2.242,20,2.174,21,4.235,22,7.054,23,2.705,100,3.526,101,5.132,209,7.84,210,7.84]],["t/769",[104,1.732,105,4.173,211,9.735]],["t/771",[3,2.207,32,3.188,33,1.84,34,3.854,35,1.455,50,1.544,51,0.485,60,2.477,107,2.829,109,2.838,111,2.318,147,2.6,183,3.317,191,3.267,208,5.683,212,8.762,213,5.443,214,5.831,215,6.215,216,2.631,217,6.886,218,7.717,219,5.333,220,3.188,221,6.215,222,4.41,223,4.294,224,4.41,225,2.151,226,4.889,227,2.598,228,4.863,229,6.215,230,3.014,231,2.894]],["t/773",[3,1.363,7,4.766,21,1.187,23,1.025,37,0.617,50,0.953,51,0.944,59,1.063,64,0.882,65,1.852,66,0.941,67,1.753,72,0.438,73,0.833,74,1.305,80,1.367,81,1.244,95,1.179,110,1.199,111,2.783,112,1.899,132,1.444,147,1.002,150,1.914,209,2.973,210,2.973,212,2.973,217,2.653,218,2.973,220,1.668,228,2.544,232,3.932,233,1.98,234,5.212,235,3.251,236,3.251,237,5.212,238,3.905,239,1.418,240,3.601,241,2.789,242,2.973,243,2.544,244,2.889,245,3.251,246,3.251,247,3.251,248,1.316,249,1.855,250,2.246,251,3.251,252,3.251,253,1.611,254,3.808,255,2.973,256,1.431,257,2.653,258,2.973,259,2.789,260,2.544,261,1.529,262,3.251,263,2.973,264,2.973,265,2.973,266,2.973,267,4.766,268,2.973,269,2.973,270,2.973,271,1.038,272,4.253,273,2.973,274,1.777,275,2.973,276,3.251,277,3.251,278,2.544,279,3.251,280,3.251,281,5.212,282,7.464,283,5.212,284,3.251,285,3.251,286,2.097,287,3.251,288,3.251,289,3.251,290,3.251,291,3.251,292,3.251,293,3.251,294,3.251,295,3.251,296,3.251,297,3.251,298,2.789,299,1.544]],["t/775",[51,0.946,110,1.307,112,2.07,228,5.562,238,4.255,244,3.94,263,6.501,264,8.437,265,6.501,266,6.501,267,8.437,268,6.501,269,6.501,270,6.501,271,2.269,272,7.529,273,6.501,274,3.886,275,6.501,300,4.494,301,7.109]],["t/777",[20,2.439,100,3.955,261,4.522,302,8.794]],["t/779",[3,2.267,20,2.198,21,4.094,22,7.087,23,2.734,100,3.565,101,5.188,303,7.926,304,7.926]],["t/781",[104,1.732,105,4.173,305,9.735]],["t/783",[3,1.911,32,2.596,33,1.498,34,3.139,35,1.185,37,1.783,48,2.912,50,0.926,59,1.191,60,3.418,61,2.356,72,0.682,80,1.06,81,0.965,95,1.836,106,1.914,107,1.697,108,2.58,109,3.337,110,1.343,111,1.887,112,2.497,130,3.005,191,2.66,193,2.628,216,1.578,261,2.38,302,4.628,306,4.343,307,5.049,308,5.061,309,3.941,310,5.061,311,3.749,312,2.356,313,4.628,314,2.334,315,5.049,316,4.628,317,2.628,318,4.628,319,5.338,320,5.061,321,5.061,322,5.061,323,5.061,324,4.628,325,3.697,326,6.683,327,2.133,328,3.96,329,4.13,330,3.497,331,6.271,332,4.628,333,4.628]],["t/785",[23,2.203,51,0.934,59,1.138,64,1.895,65,3.241,66,2.022,67,3.766,72,1.228,73,1.789,74,2.804,81,1.332,110,1.283,159,2.139,261,3.284,271,2.229,299,3.317,303,6.386,304,6.386,307,7.017,334,6.983,335,6.983,336,4.18,337,3.251]],["t/787",[20,2.439,100,3.955,261,4.522,338,8.794]],["t/789",[3,2.267,20,2.198,21,4.094,22,7.087,23,2.734,100,3.565,101,5.188,339,7.926,340,8.667]],["t/791",[104,1.732,105,4.173,341,9.735]],["t/793",[3,1.787,32,2.369,33,1.367,34,2.864,35,1.081,37,1.707,48,3.053,50,0.845,53,2.919,59,1.326,60,3.242,61,2.15,72,0.622,80,0.968,81,0.881,95,1.675,106,1.747,107,1.548,108,2.413,109,3.121,110,1.495,111,1.722,112,2.618,130,3.346,191,2.427,193,2.398,216,1.44,223,3.191,261,2.171,306,3.963,307,6.632,309,3.686,311,3.506,312,2.15,313,4.223,314,2.129,315,4.722,316,4.223,317,2.398,318,4.223,319,4.992,324,4.223,325,3.373,326,6.249,327,1.946,328,3.613,329,3.768,330,3.191,331,5.864,332,4.223,333,4.223,338,6.249,342,6.834,343,4.223,344,4.618,345,3.613,346,1.609,347,4.618,348,4.618,349,4.618,350,4.618]],["t/795",[23,2.057,51,0.952,59,1.421,64,1.77,65,3.098,66,1.888,72,1.174,73,2.234,74,2.619,81,1.244,110,1.199,112,1.899,159,1.998,189,3.872,271,2.082,307,6.785,336,3.904,337,3.037,339,5.964,343,5.964,351,6.522,352,6.522,353,3.904,354,6.522]],["t/797",[3,1.859,10,6.74,58,4.912,59,1.504,84,3.343,88,2.749,106,2.689,110,1.883,147,2.19,216,2.216,253,3.524,355,4.119,356,3.31,357,6.281,358,5.364,359,3.563,360,6.501,361,5.044,362,5.044,363,5.364,364,5.364,365,6.501,366,5.044,367,5.562,368,7.109,369,6.501]],["t/799",[3,2.149,20,2.084,21,4,22,6.924,23,2.592,51,0.641,100,3.379,101,4.918,370,5.678,371,3.649,372,7.514,373,6.706,374,6.706,375,6.706]],["t/801",[53,6.079,59,1.567,376,9.616,377,9.616]],["t/803",[3,0.993,10,4.304,32,1.948,33,1.124,34,2.355,35,1.69,37,1.672,50,1.611,53,4.563,59,1.177,72,0.511,84,3.395,107,1.273,108,2.872,109,1.734,112,2.564,129,1.656,130,3.832,148,1.289,177,3.089,216,1.184,238,3.526,256,1.671,300,2.4,311,1.948,314,1.751,346,2.053,355,2.2,356,1.768,357,5.633,359,4.078,361,4.181,362,2.694,378,2.971,379,4.808,380,2.92,381,3.972,382,1.862,383,5.891,384,4.181,385,3.472,386,3.099,387,1.862,388,2.971,389,2.694,390,3.797,391,3.258,392,2.694,393,1.562,394,2.4,395,6.195,396,3.797,397,2.166,398,1.882,399,3.258,400,6.602,401,2.2,402,3.258,403,3.472,404,5.056,405,2.694,406,4.61,407,3.797,408,5.388,409,3.472,410,3.099,411,3.797,412,3.472,413,2.624,414,3.099,415,3.472,416,2.235]],["t/805",[3,0.948,10,2.647,23,1.143,49,2.008,51,0.963,58,2.503,59,1.293,60,1.444,64,0.983,65,2.019,66,1.049,72,1.068,73,0.928,74,1.455,81,1.336,84,3.295,110,1.583,111,1.351,112,1.055,159,1.11,167,2.457,189,2.523,244,2.008,248,2.836,353,2.169,357,4.059,373,2.957,374,2.957,375,2.957,383,2.957,395,6.806,399,3.109,417,1.837,418,3.109,419,4.874,420,3.313,421,3.313,422,3.109,423,3.623,424,3.623,425,4.444,426,3.313,427,3.313,428,3.313,429,2.317,430,3.313,431,3.313,432,3.148,433,3.664,434,3.313,435,1.916,436,2.734,437,2.008,438,3.313,439,3.313,440,3.623,441,2.29,442,2.133,443,4.635,444,3.623,445,3.313,446,3.313,447,3.313,448,3.313,449,3.313,450,3.313,451,3.313,452,3.313,453,2.835]],["t/807",[50,1.668,51,0.712,60,3.634,146,4.825,147,2.81,148,2.371,256,3.074,357,5.884,405,6.471,406,5.464,419,5.993,425,5.464,432,3.87,433,4.504,454,4.111,455,4.046,456,5.369,457,6.983,458,6.983,459,9.12,460,9.12,461,5.102,462,6.983,463,5.102,464,5.993]],["t/809",[3,0.725,10,2.025,23,0.874,49,3.241,51,0.957,58,1.915,59,1.225,60,1.105,64,0.752,65,1.627,66,0.803,72,0.914,73,0.71,74,1.113,81,1.116,84,2.75,110,1.382,111,1.034,112,1.333,159,0.849,167,2.051,175,1.254,177,2.636,189,3.804,244,1.536,248,2.367,261,1.304,300,1.752,309,1.495,312,1.291,353,1.659,357,3.388,373,2.262,374,2.262,375,2.262,383,2.262,395,5.827,399,2.379,417,1.405,418,2.379,419,3.929,420,2.535,421,2.535,422,2.379,425,3.582,426,2.535,427,2.535,428,2.535,429,1.868,430,2.535,431,2.535,432,2.537,433,2.953,434,2.535,435,1.545,436,2.091,437,1.536,438,2.535,439,2.535,441,1.752,442,1.632,443,3.736,445,2.535,446,2.535,447,2.535,448,2.535,449,2.535,450,2.535,451,2.535,452,2.535,453,2.169,465,2.772,466,2.772,467,1.672,468,2.772,469,1.199,470,0.491,471,3.345,472,4.578,473,4.578,474,2.772,475,2.535,476,2.262,477,2.772,478,3.929,479,2.772,480,2.535,481,2.772,482,1.515,483,1.582,484,1.359,485,2.091,486,2.772,487,2.772,488,2.772,489,2.772,490,2.772,491,3.087,492,2.772,493,2.772,494,2.772,495,2.772,496,2.772,497,2.772,498,2.772]],["t/811",[469,4.06,485,7.083,499,9.388,500,7.661,501,7.083,502,9.388]],["t/813",[10,5.763,119,5.319,177,3.458,216,2.459,300,4.987,312,3.673,355,4.571,356,3.673,359,3.955,410,6.438,412,7.214,415,7.214,469,4.263,485,5.952,501,5.952,503,6.438,504,6.173,505,5.319,506,6.77,507,7.889]],["t/815",[2,3.167,10,2.696,23,1.164,35,0.864,44,1.736,48,1.253,50,0.675,51,0.898,59,0.939,64,1.001,65,2.048,66,1.068,72,0.776,73,0.946,74,1.482,80,0.773,81,0.704,84,3.768,93,2.381,95,1.339,108,2.035,110,1.473,112,1.678,128,2.857,129,1.61,130,3.574,132,3.149,174,2.017,177,3.048,225,1.278,260,2.888,300,2.333,357,4.108,359,2.889,373,3.012,374,3.012,375,3.012,383,7.852,384,6.167,408,7.947,409,3.375,410,3.012,418,3.167,422,3.167,508,3.691,509,2.432,510,3.375,511,4.945,512,5.27,513,4.703,514,4.945,515,2.785,516,3.375,517,3.691,518,2.619,519,1.829,520,3.375,521,2.619,522,3.691,523,3.012,524,5.763,525,3.691,526,3.691,527,3.691,528,3.691,529,3.375,530,3.691,531,3.691,532,3.691,533,3.691,534,3.691,535,3.691,536,2.696,537,2.619,538,3.691]],["t/817",[12,6.36,13,6.547,14,4.093,20,2.273,21,3.273,100,3.686,174,4.899,484,4.394,485,6.762,539,8.196]],["t/819",[21,3.999,22,6.923,23,2.961,540,8.585]],["t/821",[105,4.173,541,9.735,542,8.902]],["t/823",[13,7.562,32,2.872,33,1.657,34,3.472,35,1.311,37,1.866,50,1.024,51,0.437,59,0.912,60,2.231,61,2.607,72,0.754,81,1.068,107,1.877,108,1.977,110,1.443,132,2.486,147,2.419,148,1.901,150,4.622,174,4.292,183,1.938,185,2.907,190,2.248,193,2.907,194,2.907,364,4.224,388,4.381,543,5.12,544,8.989,545,5.12,546,4.804,547,5.12,548,4.869,549,7.4,550,5.12,551,6.738,552,5.12,553,4.804,554,5.12,555,5.12,556,5.12,557,5.12,558,5.599]],["t/825",[33,2.779,59,1.53,80,1.967,81,1.791,388,7.346,556,8.585]],["t/827",[3,1.154,13,3.223,20,1.119,23,1.392,33,1.306,35,1.033,40,2.612,51,0.951,59,1.077,62,3.786,64,1.792,65,2.348,66,1.277,72,0.89,73,1.13,74,1.772,81,1.26,92,3.223,95,2.396,110,1.214,111,1.645,112,1.284,142,3.048,148,1.498,149,2.907,150,2.597,159,1.351,167,1.547,183,1.527,193,2.291,196,3.786,197,3.452,256,1.942,388,5.169,398,2.187,432,2.445,433,2.845,442,2.597,470,0.781,540,4.034,542,4.034,543,4.034,545,4.034,547,4.034,549,3.6,550,4.034,552,4.034,554,4.034,555,4.034,557,4.034,559,1.578,560,2.075,561,4.411,562,4.453,563,2.48,564,4.411,565,3.389,566,4.411,567,4.411,568,4.411,569,4.411,570,4.411,571,1.47,572,4.034,573,4.411,574,4.411]],["t/829",[16,10.015,20,2.381,100,3.861,575,6.329,576,9.388]],["t/831",[3,2.427,20,2.353,21,3.388,22,5.865,100,3.816,101,5.553,577,8.484]],["t/833",[105,4.173,225,3.37,578,9.735]],["t/835",[3,1.187,32,2.328,33,1.343,34,2.814,35,1.885,37,1.529,50,1.943,53,4.265,106,1.717,107,1.522,108,2.382,109,2.072,110,1.48,112,2.344,130,1.866,132,3.96,147,2.079,167,1.592,174,2.481,185,2.982,190,1.822,216,2.103,248,1.837,250,5.564,253,2.249,346,2.351,394,2.869,435,1.531,509,2.99,519,2.249,544,4.15,579,4.538,580,4.538,581,4.538,582,4.538,583,5.005,584,6.91,585,4.538,586,4.538,587,6.746,588,3.551,589,2.328,590,4.538,591,5.505,592,6.746,593,4.538,594,4.538,595,6.746,596,4.538,597,3.551,598,3.703,599,4.538,600,4.538,601,4.538,602,3.894,603,3.551,604,4.538,605,4.538]],["t/837",[470,1.724,606,5.25,607,5.321]],["t/839",[15,3.254,23,1.122,37,1.063,51,0.951,59,1.129,64,0.965,65,1.99,66,1.03,67,1.919,72,1.058,73,0.912,74,1.429,80,0.745,81,1.068,110,1.57,112,1.63,132,1.58,142,2.458,167,2.428,189,3.793,238,2.129,261,1.673,299,1.69,467,1.299,491,2.399,577,3.254,584,4.805,603,2.784,608,3.558,609,3.558,610,3.558,611,3.254,612,3.558,613,3.558,614,3.558,615,3.558,616,3.558,617,3.558,618,3.558,619,3.558,620,3.558,621,3.558,622,1.625,623,6.924,624,5.6,625,5.121,626,3.558,627,3.558,628,3.053,629,3.053,630,3.558,631,3.558,632,3.558,633,3.558,634,5.976,635,3.558,636,3.558,637,3.558,638,3.558,639,3.254,640,3.558,641,3.558,642,3.558,643,3.558,644,3.558,645,3.558,646,3.558,647,3.558,648,3.558,649,2.784,650,3.558,651,3.558,652,3.558,653,3.558,654,2.525,655,3.558,656,3.558,657,3.558,658,3.558,659,3.053,660,3.254,661,3.558]],["t/841",[20,2.889,49,4.309,50,1.01,55,5.68,147,1.701,185,2.879,261,3.656,317,4.673,371,2.452,394,3.49,442,3.25,470,1.377,483,3.15,519,2.736,603,6.083,611,5.048,622,5.118,628,4.737,629,6.672,649,7.042,662,5.52,663,5.52,664,5.52,665,3.25,666,5.52,667,4.505,668,8.383,669,9.769,670,5.52,671,5.52,672,5.52,673,2.902,674,5.048]],["t/843",[3,1.947,17,7.756,58,5.143,59,1.549,88,2.878,106,2.816,110,1.924,216,2.321,253,3.69,256,3.276,356,3.466,357,6.391,358,5.616,359,3.731,360,6.807,361,5.282,362,5.282,363,5.616,364,5.616,675,6.388,676,7.443]],["t/845",[3,2.267,20,2.198,21,4.094,22,7.087,23,2.734,100,3.565,101,5.188,677,8.667,678,8.667]],["t/847",[53,6.079,59,1.567,679,9.616,680,9.616]],["t/849",[3,2.173,17,3.222,32,2.026,33,1.169,34,2.449,35,0.924,37,1.153,49,4.101,50,1.52,53,3.839,59,1.206,84,1.857,106,1.494,107,1.324,108,3.481,109,1.803,112,2.61,130,3.416,132,1.754,147,1.217,177,2.913,225,1.367,231,1.839,238,3.635,286,2.547,300,4.677,306,3.389,327,1.664,357,6.377,358,2.979,359,4.164,361,4.309,362,2.802,379,4.956,380,3.01,381,4.094,382,1.936,384,2.802,392,2.802,393,1.624,394,2.496,400,5.553,413,2.728,435,2.049,478,5.211,511,3.389,537,4.309,597,3.09,675,5.211,681,3.949,682,2.405,683,3.949,684,3.222,685,3.611,686,3.09,687,7.399,688,2.547,689,3.949,690,4.956,691,5.553,692,3.949,693,3.949,694,2.979,695,3.949]],["t/851",[3,1.692,17,5.279,50,1.789,59,1.054,83,3.808,104,1.151,108,3.061,110,1.593,132,2.873,191,3.4,256,3.816,300,4.089,357,6.497,359,3.243,384,6.152,393,2.66,429,3.537,435,2.925,478,5.551,682,3.94,685,5.916,686,6.784,688,4.173,691,5.916,696,6.469,697,4.557,698,4.881,699,3.691,700,6.469]],["t/853",[3,2.845,18,9.333,20,2.353,145,5.294,701,8.484]],["t/855",[470,1.746,702,2.065]],["t/857",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/859",[3,2.023,20,2.703,23,2.44,50,1.415,51,0.832,64,2.099,66,2.819,73,2.731,74,3.106,356,3.601,435,2.61,559,2.767,704,3.877,705,3.792,706,7.735,707,2.825,708,3.181]],["t/861",[709,9.127]],["t/863",[18,7.438,40,3.428,51,0.875,197,6.782,701,7.926,709,7.926,710,8.667,711,8.667,712,5.375,713,7.926,714,8.667]],["t/865",[19,6.934,20,2.247,81,1.69,95,3.214,150,5.217,240,6.123,688,5.716,712,5.496,715,6.686,716,5.397,717,4.982]],["t/867",[21,3.999,22,6.923,23,2.961,718,8.585]],["t/869",[19,4.922,23,1.304,51,0.964,59,1.025,64,1.122,65,2.236,66,1.197,72,0.557,73,1.059,74,1.66,80,0.866,81,0.789,110,1.399,111,2.839,112,1.831,147,1.274,189,4.451,190,1.66,244,2.292,261,1.944,286,2.667,299,1.964,317,2.147,327,1.743,467,1.51,622,1.888,659,3.548,718,3.781,719,4.135,720,4.135,721,3.548,722,3.12,723,4.135,724,4.135,725,4.135,726,3.781,727,3.781,728,6.962,729,4.135,730,2.857,731,4.135,732,4.135,733,4.135,734,4.135,735,4.135,736,3.235,737,4.135,738,2.173,739,6.29,740,8.508,741,4.135,742,4.135,743,6.29,744,4.135,745,2.26,746,4.135,747,4.135,748,4.135,749,4.135]],["t/871",[3,1.893,19,7.305,40,2.863,50,1.708,51,0.882,59,1.18,73,1.855,74,2.907,80,1.517,81,1.381,106,2.738,107,2.427,109,3.306,110,1.33,365,6.62,606,3.904,726,6.62,727,6.62,728,6.62,750,7.239,751,4.489,752,7.239,753,6.62,754,7.239,755,7.239]],["t/874",[3,1.11,12,3.013,20,1.077,33,1.257,37,1.469,50,0.777,51,0.892,59,1.648,110,1.18,112,1.868,128,2.104,129,3.375,132,1.886,177,3.547,187,2.104,216,1.324,227,1.775,327,2.705,346,3.394,382,3.146,387,2.082,393,1.746,437,2.353,483,2.422,518,3.013,690,3.465,756,4.246,757,3.478,758,2.499,759,3.102,760,3.013,761,3.643,762,3.013,763,4.246,764,3.643,765,4.246,766,2.038,767,2.26,768,3.322,769,4.848,770,2.353,771,3.102,772,2.798,773,3.102,774,2.353,775,2.353,776,4.798,777,2.26,778,2.387,779,3.014,780,4.229,781,3.883,782,4.246,783,4.246,784,2.387]],["t/876",[785,7.125,786,8.303,787,7.125,788,6.776,789,6.497,790,6.497,791,6.776,792,7.593,793,5.249,794,7.125,795,7.125,796,6.497,797,7.593,798,6.776,799,6.497,800,6.497,801,7.125]],["t/878",[50,1.678,757,3.154,758,6.76,785,7.869,802,10.802]],["t/880",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/882",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,804,6.577]],["t/884",[21,3.892,100,3.181,128,3.834,231,3.601,239,3.374,371,3.435,469,3.345,519,3.834,563,4.348,707,2.825,785,6.637,796,6.052,805,4.118,806,7.735,807,4.228,808,4.118,809,3.752,810,4.481,811,4.481,812,4.413,813,4.481,814,7.073]],["t/886",[20,1.711,35,1.579,44,3.172,48,2.29,50,1.234,51,0.886,64,1.83,66,2.581,104,1.586,119,4.547,183,2.335,230,3.272,393,3.666,435,2.276,559,2.413,589,3.46,707,3.255,708,2.774,757,3.066,779,2.627,814,6.168,815,6.745,816,6.745,817,3.343,818,5.788,819,5.788,820,3.638,821,3.738,822,3.381]],["t/888",[20,1.144,33,1.336,35,2.483,37,1.805,44,3.159,51,0.962,104,0.803,107,1.513,119,5.411,167,2.815,177,2.356,183,1.562,187,3.33,190,1.812,220,2.315,225,3.671,227,1.886,230,2.189,382,2.212,417,2.288,454,3.955,455,3.892,589,3.446,622,3.068,776,2.798,779,2.617,817,3.978,818,3.872,819,3.872,820,2.434,821,2.501,822,2.262,823,1.648,824,4.091,825,2.537,826,2.748]],["t/890",[20,2.001,44,3.71,50,1.443,51,0.84,104,1.404,119,5.319,183,2.731,225,2.731,230,3.827,311,4.047,467,2.881,589,4.047,779,3.073,817,3.91,818,6.77,819,6.77,820,4.255,821,4.372,822,3.955,827,3.504]],["t/892",[21,3.097,174,4.636,484,4.158,539,7.756,757,3.546,828,7.756,829,7.278,830,8.481,831,5.471,832,7.756,833,7.756,834,7.756,835,6.399,836,6.018]],["t/894",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/896",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,837,6.577]],["t/898",[21,3.84,100,3.09,128,3.725,231,3.499,239,3.278,371,3.337,469,3.249,519,3.725,563,4.224,707,2.744,757,2.584,758,4.424,805,4,807,4.107,808,4,809,3.645,810,4.354,811,4.354,812,4.287,813,4.354,828,8.743,829,8.205,838,6.872]],["t/900",[35,1.62,48,2.35,50,1.266,51,0.892,64,1.878,66,2.625,104,1.613,177,2.428,393,3.729,435,2.336,469,4.373,559,2.477,707,3.311,708,2.847,757,3.119,777,3.685,838,6.33,839,6.922,840,6.922,841,7.4,842,5.732,843,6.922]],["t/902",[33,1.479,35,2.32,37,1.617,51,0.919,104,0.889,107,1.675,147,2.231,167,2.539,177,2.986,183,1.73,187,3.589,190,2.007,225,3.431,226,4.195,227,2.089,244,4.013,387,2.45,417,2.534,537,3.546,665,4.262,757,2.49,777,4.533,779,2.82,823,1.825,826,3.043,841,5.909,842,5.902,844,4.997,845,4.078,846,2.991,847,6.213,848,3.453,849,3.369,850,2.991,851,4.288,852,4.288,853,4.288,854,4.078,855,3.099,856,3.77]],["t/904",[51,0.919,104,1.477,183,2.874,387,4.071,467,3.032,665,4.888,777,4.42,779,3.234,827,3.688,841,6.776,845,6.776,855,5.15,856,6.265]],["t/906",[50,1.697,177,3.254,346,3.233,824,5.65,857,7.26,858,8.484,859,9.278]],["t/908",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/910",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,860,6.014]],["t/912",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,787,8.408,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,861,7.143]],["t/914",[35,1.664,44,3.343,48,2.414,50,1.3,51,0.899,64,1.929,66,2.671,104,1.642,183,2.461,230,3.448,393,3.794,435,2.399,559,2.543,707,3.369,708,2.924,757,3.173,779,2.769,821,3.94,822,3.563,861,6.501,862,7.109,863,7.109,864,6.1]],["t/916",[33,1.461,35,2.486,37,0.937,44,3.374,50,1.313,51,0.951,104,0.878,107,2.406,112,1.437,130,2.029,167,1.731,177,2.516,183,2.484,187,3.556,216,1.538,220,2.532,225,3.676,227,2.063,230,2.394,307,6.413,382,2.419,417,2.502,776,3.06,779,2.795,787,6.157,821,2.735,822,2.474,823,1.802,826,3.005,864,4.235,865,2.905,866,6.561,867,4.027,868,4.935,869,4.935,870,4.935,871,6.561]],["t/918",[44,3.824,51,0.851,104,1.447,112,2.368,183,3.478,230,3.945,307,5.619,467,2.97,779,3.168,821,4.507,822,4.077,827,3.612,864,6.979,866,7.437,871,7.437,872,8.133]],["t/920",[21,2.62,44,4.364,50,1.312,132,3.186,174,3.921,393,2.95,622,3.276,757,2.467,758,4.223,788,5.854,791,5.854,796,5.613,798,5.854,857,5.613,873,7.173,874,7.173,875,7.173,876,6.56,877,5.412,878,7.173,879,7.173,880,7.173,881,8.828,882,7.173,883,5.09,884,7.173,885,5.613,886,6.156,887,4.449]],["t/922",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/924",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,888,6.577]],["t/926",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,788,6.374,800,6.112,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,889,7.143]],["t/928",[35,1.695,44,3.404,48,2.458,50,1.324,51,0.882,64,1.964,66,2.703,104,1.661,183,2.506,393,3.839,435,2.442,559,2.59,707,3.409,708,2.977,757,3.211,779,2.82,889,6.62,890,7.239,891,7.239,892,7.239,893,6.294]],["t/930",[12,3.591,33,1.498,35,2.332,37,1.387,39,2.38,40,2.001,44,4.033,51,0.95,104,1.526,107,2.45,130,2.081,131,2.694,167,1.775,177,1.775,183,2.53,187,3.622,225,3.448,226,4.234,227,2.116,230,2.455,240,3.497,417,2.566,757,1.741,779,2.846,788,4.13,820,2.73,823,1.848,826,3.082,893,5.782,894,4.628,895,3.819,896,3.96,897,3.697,898,4.343,899,5.061,900,4.628,901,4.628,902,3.96,903,4.628]],["t/932",[35,1.865,44,3.747,51,0.883,104,1.765,183,3.434,226,4.617,230,3.865,467,2.91,779,3.104,820,4.298,827,4.406,893,5.373,894,7.287,901,7.287,903,7.287]],["t/934",[50,1.738,757,3.268,758,5.593,789,7.434,904,9.501]],["t/936",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/938",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,905,6.577]],["t/940",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,789,7.667,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,906,7.143]],["t/942",[35,1.552,48,2.252,50,1.213,51,0.9,64,1.799,66,2.552,104,1.568,230,4.276,387,3.251,393,3.625,435,2.238,454,3.904,455,3.842,559,2.373,707,3.219,708,2.727,757,3.405,789,5.189,817,3.287,855,4.113,893,4.471,906,6.065,907,6.632,908,6.632,909,6.065,910,5.691,911,5.691,912,2.945]],["t/944",[33,1.84,37,2.04,51,0.9,104,1.106,167,2.18,179,4.968,226,4.889,227,3.528,454,4.968,455,4.889,784,6.041,789,8.408,817,3.081,823,2.269,893,5.689,910,5.333,911,5.333,913,8.769,914,3.659,915,4.689]],["t/946",[35,1.793,51,0.897,104,1.722,230,4.694,436,5.779,454,4.509,455,4.438,467,2.797,817,3.797,820,4.131,827,4.298,855,4.75,893,5.164,909,7.005,910,6.573,911,6.573,912,3.402,916,7.005]],["t/948",[21,2.62,50,1.882,51,0.56,54,5.613,101,4.293,104,1.83,233,4.369,311,4.761,484,3.517,583,3.596,757,2.467,758,4.223,769,5.217,790,5.613,842,7.122,917,6.56,918,6.56,919,4.957,920,4.033,921,6.56,922,6.56,923,5.854]],["t/950",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/952",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,924,6.577]],["t/954",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,790,7.667,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,925,7.143]],["t/956",[50,1.519,51,0.859,64,2.253,66,2.946,393,3.415,435,2.802,559,2.971,707,3.032,708,3.415,757,3.5,790,6.497,925,7.593,926,8.303]],["t/958",[33,1.093,35,2.034,37,1.233,39,1.01,48,0.729,50,0.675,51,0.921,59,0.602,104,0.657,107,1.238,110,0.678,111,1.376,131,1.965,147,0.662,167,0.753,174,2.018,177,1.703,183,1.278,187,3.514,190,0.862,191,1.129,216,1.151,219,1.843,220,1.102,223,1.484,225,2.899,226,1.244,231,1,239,0.937,244,2.046,312,3.023,317,1.115,346,2.008,356,1.719,359,1.076,417,1.089,435,2.561,469,0.928,470,0.654,483,1.225,537,1.524,548,2.289,565,1.102,649,2.888,665,2.173,668,3.167,682,1.308,688,3.131,699,1.225,777,1.965,779,1.438,790,6.27,808,1.143,820,1.158,823,1.348,826,1.308,842,4.104,846,1.285,847,3.167,848,1.484,849,1.448,850,1.285,851,1.843,852,1.843,853,1.843,854,1.752,855,1.332,856,1.62,865,5.664,885,1.68,893,1.448,919,2.55,920,2.075,927,3.012,928,2.147,929,1.68,930,2.147,931,1.752,932,2.147,933,2.147,934,2.147,935,1.752,936,1.752,937,1.963,938,2.147,939,4.44,940,4.348,941,6.492,942,2.785,943,2.248,944,3.691,945,3.691,946,3.691,947,3.375,948,3.691,949,3.691,950,5.763,951,4.21,952,3.691,953,2.619,954,3.691,955,3.375,956,3.691,957,3.691,958,3.691,959,3.375,960,1.963,961,4.44,962,1.68,963,3.691,964,2.173,965,1.484,966,2.147,967,2.147,968,1.62,969,1.569,970,2.147,971,1.963,972,1.963]],["t/960",[51,0.784,104,1.447,183,2.815,467,2.97,779,3.168,820,4.386,827,3.612,842,6.351,855,5.044,856,6.136,865,4.788,939,7.437,942,7.581,960,7.437,961,7.437,973,8.133]],["t/962",[50,1.717,757,3.229,758,5.527,791,8.937,974,9.388]],["t/964",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/966",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,975,6.577]],["t/968",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,791,7.996,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,976,7.143]],["t/970",[35,1.759,48,2.551,50,1.375,51,0.892,64,2.039,66,2.768,104,1.701,393,3.932,435,2.535,559,2.689,665,4.424,707,3.492,708,3.09,757,3.288,976,6.872,977,7.514,978,7.514,979,6.872]],["t/972",[33,1.997,37,1.896,51,0.903,83,5.248,104,1.2,226,3.908,227,2.82,314,3.11,317,3.502,454,5.878,455,5.785,665,5.248,784,3.792,823,2.463,842,4.264,980,4.108,981,8.152,982,5.504,983,6.168,984,5.635,985,6.168,986,4.927,987,4.547]],["t/974",[51,0.919,104,1.477,112,2.417,230,4.028,231,3.866,454,4.888,455,4.811,467,3.032,665,4.888,827,3.688,979,7.593,981,7.593,984,5.249]],["t/976",[50,1.738,757,3.268,758,5.593,792,8.688,988,9.501]],["t/978",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/980",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,989,6.577]],["t/982",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,793,6.194,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,990,6.703]],["t/984",[35,1.759,48,2.551,50,1.375,51,0.892,64,2.039,66,2.768,104,1.701,393,3.932,435,2.535,559,2.689,622,3.432,707,3.492,708,3.09,757,3.288,991,7.514,992,7.514,993,7.514,994,7.514]],["t/986",[33,2.067,35,2.135,37,1.326,51,0.943,104,1.243,107,2.341,177,2.449,183,2.417,187,4.521,225,3.157,622,4.165,779,3.552,823,2.55,826,4.253,865,4.111,980,4.253,995,6.983,996,5.269,997,6.983,998,6.983,999,6.386]],["t/988",[51,0.849,104,1.651,467,3.388,622,4.237,827,4.12,999,8.484]],["t/990",[757,3.348,758,5.731,793,6.154]],["t/992",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/994",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,1000,6.577]],["t/996",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,793,6.194,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,990,6.703]],["t/998",[35,1.726,48,2.504,50,1.349,51,0.908,64,2.001,66,2.735,104,1.681,230,3.577,393,3.885,435,2.488,559,2.638,707,3.45,708,3.033,757,3.249,821,4.087,822,3.696,990,6.328,1001,6.018,1002,7.374]],["t/1000",[33,2.408,35,1.904,51,0.93,104,1.447,177,2.852,220,4.172,227,3.4,230,3.945,382,3.987,417,4.123,776,5.044,821,4.507,822,4.077,823,2.97]],["t/1002",[51,0.892,104,1.613,230,4.397,467,3.31,821,5.024,822,4.544,827,4.026]],["t/1004",[21,3.388,50,1.697,757,3.191,758,6.403,794,7.962,1003,9.278]],["t/1006",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/1008",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,1004,6.577]],["t/1010",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,794,8.408,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,1005,7.143]],["t/1012",[20,2.084,35,1.4,37,1.135,44,3.865,48,2.791,50,1.504,51,0.892,64,1.622,66,2.38,104,1.671,119,5.541,183,2.845,393,3.862,435,2.018,559,2.139,589,3.068,707,3.43,708,2.459,757,2.827,779,3.202,784,3.362,817,2.964,820,4.433,1005,5.468,1006,5.98,1007,8.219,1008,3.52,1009,5.131,1010,3.94,1011,5.98]],["t/1014",[20,1.138,33,1.328,35,2.479,37,1.956,44,3.146,50,1.224,51,0.962,83,2.641,104,0.798,107,1.504,119,4.51,167,2.805,177,1.574,183,1.553,187,3.316,190,1.802,225,3.665,346,1.563,454,3.938,455,3.876,589,3.432,622,3.055,779,2.606,784,2.522,817,3.965,820,2.42,823,1.638,824,4.871,825,2.522,826,2.732,846,2.685,865,2.641,1008,2.641,1009,3.85,1010,2.957]],["t/1016",[20,2.106,44,3.905,51,0.859,104,1.477,119,5.598,183,2.874,467,3.032,589,4.26,779,3.234,817,4.116,820,4.478,827,3.688,1008,4.888,1009,7.125,1010,5.472]],["t/1018",[50,1.717,757,3.229,758,5.527,795,8.056,1012,9.388,1013,9.388]],["t/1020",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/1022",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,1014,5.367]],["t/1024",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,795,8.408,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,1015,7.143]],["t/1026",[20,1.451,35,1.339,37,1.086,44,2.69,48,2.706,50,1.458,51,0.908,64,1.552,66,2.308,104,1.632,183,2.759,230,3.866,393,3.773,435,1.93,559,2.047,589,2.934,707,3.35,708,2.352,757,2.741,779,3.105,784,3.216,817,2.835,820,3.085,821,4.417,822,3.995,865,3.367,1008,3.367,1010,3.769,1015,5.231,1016,5.72,1017,7.971,1018,4.909,1019,4.476,1020,3.69,1021,5.72]],["t/1028",[20,0.923,33,1.078,35,2.486,37,1.934,44,2.681,50,1.043,51,0.964,83,2.143,104,1.25,107,1.22,130,1.497,167,2.789,177,1.999,183,1.26,187,2.826,190,1.462,220,1.867,225,3.676,227,1.521,230,1.765,233,3.472,346,1.268,382,1.784,417,1.845,454,3.356,455,3.303,589,2.924,622,2.603,757,1.252,776,2.257,779,2.22,784,3.205,817,3.483,820,1.963,821,2.017,822,1.824,823,1.329,824,4.279,825,2.046,826,2.217,846,2.179,865,4.136,902,2.848,1008,2.143,1010,2.398,1018,3.123,1019,2.848,1020,2.348,1022,2.97]],["t/1030",[20,1.981,44,3.673,51,0.876,104,1.39,183,2.704,230,3.789,467,2.852,589,4.007,779,3.043,817,3.872,820,4.213,821,4.329,822,3.915,827,3.469,865,4.598,1008,4.598,1010,5.147,1018,6.703,1019,6.112,1020,5.038]],["t/1032",[21,3.349,50,1.678,69,7.175,70,7.483,757,3.154,758,5.398,796,7.175,1023,9.17]],["t/1034",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/1036",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,1014,5.367]],["t/1038",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,796,7.667,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,1024,7.143]],["t/1040",[20,1.244,35,1.148,37,0.931,44,2.306,48,2.86,50,1.541,51,0.923,64,1.331,66,2.068,67,2.645,69,3.837,104,1.647,183,2.916,230,4.086,393,3.806,435,1.655,559,1.755,589,2.516,707,3.38,708,2.017,757,2.457,779,3.281,784,4.015,817,2.431,820,2.645,821,4.669,822,4.223,824,5.636,865,2.887,1008,2.887,1010,3.232,1024,4.485,1025,4.904,1026,8.424,1027,4.208,1028,7.142,1029,4.904]],["t/1042",[20,0.977,33,1.141,35,2.479,37,1.856,44,2.802,50,1.333,51,0.961,83,3.508,104,0.685,107,1.292,112,1.122,167,2.555,177,2.09,183,1.334,187,2.953,190,1.547,220,1.976,225,3.665,227,1.61,230,1.869,346,2.076,382,1.889,417,1.953,454,3.508,455,3.452,589,3.057,622,2.721,776,2.389,779,2.321,784,2.166,817,3.611,820,2.078,821,2.135,822,1.931,823,1.407,824,5.399,825,2.166,826,2.346,846,3.566,865,4.289,1008,2.268,1010,3.926,1014,3.144,1027,3.306]],["t/1044",[20,2.021,44,3.747,51,0.883,104,1.418,183,2.758,230,3.865,467,2.91,589,4.088,779,3.104,817,3.95,820,4.298,821,4.416,822,3.994,827,3.539,865,4.691,1008,4.691,1010,5.251,1027,6.838]],["t/1046",[50,1.717,177,3.293,346,3.271,824,5.717,857,7.346,1030,9.388]],["t/1048",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/1050",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,860,6.014]],["t/1052",[21,3.806,100,3.033,128,3.655,174,4.031,187,3.655,231,3.433,239,3.217,371,3.275,469,3.189,484,3.615,519,3.655,563,5.311,707,2.693,797,8.639,805,3.926,807,4.031,808,3.926,809,3.577,810,4.272,811,4.272,812,4.207,813,4.272,885,5.77,1031,6.743,1032,6.743]],["t/1054",[35,1.726,40,2.916,48,2.504,50,1.349,51,0.887,64,2.001,66,2.735,104,1.681,393,3.885,435,2.488,559,2.638,707,3.45,708,3.033,757,3.249,824,4.491,1032,6.743,1033,7.374,1034,7.374,1035,6.328,1036,6.328]],["t/1056",[33,2.183,35,2.211,37,1.4,40,2.916,44,3.468,51,0.934,104,1.312,112,2.147,167,2.586,225,3.608,429,3.008,823,2.693,824,4.491,915,5.564,968,7.128,1035,6.328,1036,6.328,1037,6.328]],["t/1058",[40,3.585,51,0.838,104,1.613,467,3.31,824,5.521,827,4.026,1035,7.779,1036,7.779]],["t/1060",[50,1.738,757,3.268,758,5.593,798,7.753,1038,9.501]],["t/1062",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/1064",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,1039,6.014]],["t/1066",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,798,7.996,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,1040,7.143]],["t/1068",[35,1.635,48,2.371,50,1.277,51,0.894,64,1.895,66,2.64,104,1.623,183,2.417,230,3.387,393,3.751,435,2.356,559,2.499,707,3.33,708,2.872,757,3.137,779,2.72,820,3.766,821,3.87,822,3.5,824,4.253,865,4.111,1040,6.386,1041,6.983,1042,6.983,1043,6.983]],["t/1070",[20,0.898,33,1.049,35,2.468,37,1.864,44,2.624,50,1.021,51,0.961,83,2.085,104,1.228,107,1.188,112,1.031,130,1.457,167,2.421,177,1.957,183,1.226,187,2.766,190,1.422,220,1.817,225,3.65,227,1.481,230,1.718,311,1.817,325,2.587,346,1.234,382,1.737,417,1.796,454,3.285,455,3.233,589,2.863,622,2.548,757,1.218,776,2.197,779,2.173,784,4.404,817,3.422,820,1.91,821,1.963,822,1.775,823,1.293,824,5.19,825,1.991,826,2.157,831,2.285,846,3.34,865,4.064,902,2.771,1008,2.085,1010,2.334,1019,2.771,1020,2.285,1022,2.89,1039,5.103,1044,3.239]],["t/1072",[20,1.906,35,1.759,44,3.534,51,0.892,104,1.701,183,2.601,230,3.645,467,2.744,589,3.855,779,2.927,817,3.725,820,4.053,821,4.165,822,3.767,827,4.246,865,4.424,1008,4.424,1010,4.952,1019,5.88,1020,4.847,1044,6.872]],["t/1074",[21,3.428,50,1.717,757,3.229,758,5.527,799,7.346,1045,9.388]],["t/1076",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/1078",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,1046,6.577]],["t/1080",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,799,7.667,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,1047,7.143]],["t/1082",[35,0.924,44,1.857,48,1.341,50,0.722,51,0.942,64,1.071,66,1.758,100,1.624,104,1.08,110,0.726,111,1.473,112,1.768,167,1.385,183,2.561,189,2.697,225,1.367,314,3.412,317,4.313,387,1.936,393,3.894,394,2.496,435,2.497,454,2.325,455,2.288,519,1.957,559,1.413,589,2.026,707,3.033,757,2.089,779,2.882,799,6.5,817,1.957,822,1.979,913,3.222,984,2.496,987,2.662,1008,2.325,1047,3.611,1048,3.949,1049,8.966,1050,3.389,1051,4.752,1052,3.389,1053,3.611,1054,3.949,1055,3.389,1056,3.949,1057,4.956,1058,6.073,1059,3.949,1060,3.389,1061,3.949,1062,3.949,1063,3.949,1064,6.073,1065,3.09,1066,3.09,1067,3.389,1068,2.802,1069,3.389,1070,6.073]],["t/1084",[33,0.86,35,2.457,37,1.845,44,2.841,50,0.531,51,0.961,104,1.075,107,0.974,112,0.846,119,1.958,167,1.668,177,1.019,181,1.657,183,1.005,187,2.358,190,2.427,216,1.483,225,3.683,240,2.007,314,2.786,317,1.508,380,1.44,387,1.424,454,3.557,455,3.501,470,0.514,482,1.588,505,1.958,513,2.37,588,2.273,589,3.1,622,2.759,779,1.853,784,3.397,799,2.273,803,1.657,817,3.463,822,1.456,823,1.061,824,2.897,825,1.633,826,1.769,849,1.958,850,1.738,980,1.769,984,3.007,987,1.958,1008,1.71,1050,2.492,1051,2.273,1052,2.492,1055,4.082,1057,2.37,1071,2.122,1072,2.273,1073,2.904,1074,1.958,1075,3.376,1076,2.904,1077,2.904,1078,2.904,1079,2.904,1080,2.904,1081,2.904,1082,5.525,1083,2.904,1084,2.122,1085,4.35,1086,4.35,1087,2.656,1088,2.656,1089,1.958,1090,2.37,1091,2.904]],["t/1086",[37,1.326,44,3.284,51,0.943,104,1.243,112,2.033,183,2.417,314,3.22,387,3.424,454,4.111,455,4.046,467,2.55,589,3.582,779,2.72,817,3.461,822,3.5,827,3.101,1008,4.111,1050,5.993,1051,5.464,1052,5.993,1053,6.386,1055,5.993,1057,5.699,1082,6.386,1085,6.386,1086,6.386]],["t/1088",[50,1.697,757,3.191,758,5.462,793,5.865,858,8.484,1092,7.571,1093,9.278]],["t/1090",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/1092",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,1094,6.577]],["t/1094",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,1095,9.798,1096,7.143]],["t/1096",[35,1.455,48,2.11,50,1.137,51,0.913,64,1.686,66,2.443,104,1.501,177,2.96,393,3.47,435,2.097,559,2.224,707,3.082,708,2.556,751,3.854,757,2.902,849,4.19,850,5.051,912,2.76,1089,4.19,1096,5.683,1097,6.215,1098,6.215,1099,5.333,1100,5.683,1101,5.683,1102,5.683,1103,5.683,1104,5.333,1105,4.41,1106,5.072,1107,5.683,1108,5.333,1109,5.683,1110,4.863]],["t/1098",[33,2.163,51,0.885,104,1.3,177,3.293,751,4.531,823,2.668,849,4.926,850,5.621,959,9.49,1089,4.926,1099,8.059,1101,6.681,1102,6.681,1103,6.681,1104,8.059,1106,5.962,1107,6.681,1108,8.059,1110,5.717]],["t/1100",[51,0.867,104,1.509,467,3.097,827,3.767,912,4.578,1099,7.278,1100,7.756,1104,7.278,1105,6.018,1108,7.278,1109,7.756,1111,8.481]],["t/1102",[21,2.644,50,1.89,54,5.664,101,4.333,104,1.838,233,4.409,311,4.789,484,3.549,583,3.629,757,2.49,758,4.261,769,5.248,800,5.664,842,7.142,917,6.62,918,6.62,919,5.002,920,4.07,921,6.62,922,6.62,923,5.907]],["t/1104",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/1106",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,1112,6.577]],["t/1108",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,800,7.667,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,1113,7.143]],["t/1110",[35,1.649,48,2.392,50,1.289,51,0.874,64,1.912,66,2.656,104,1.632,183,2.439,314,3.249,393,3.772,435,2.377,559,2.521,665,5.4,707,3.35,708,2.898,757,3.155,779,2.744,893,6.184,927,7.486,1113,6.443,1114,7.045,1115,7.045]],["t/1112",[33,2.014,35,2.099,37,1.818,51,0.938,104,1.443,107,1.539,130,1.888,147,2.097,167,1.61,177,2.843,183,1.589,187,3.373,190,1.844,225,3.104,226,3.942,227,1.919,244,3.771,387,2.251,417,2.328,537,3.258,665,4.006,757,1.579,779,2.65,800,3.592,823,2.485,826,2.796,842,6.052,845,3.746,846,2.748,847,7.694,848,3.172,849,3.095,850,2.748,851,3.94,852,3.94,853,3.94,854,3.746,855,2.847,856,3.464,893,5.466,927,5.553,971,4.198,972,4.198]],["t/1114",[35,2.185,51,0.903,104,1.661,174,3.957,183,2.506,213,4.669,387,3.549,467,2.644,665,5.496,779,2.82,827,4.146,842,5.901,845,5.907,855,4.489,856,5.462,893,6.294,927,7.618,1116,7.239,1117,6.62]],["t/1116",[50,1.717,757,3.229,758,5.527,801,9.398,1118,9.388]],["t/1118",[35,2.198,104,1.949,371,4.169,470,1.663,702,1.967]],["t/1120",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,703,2.921,745,6.158,757,3.955,770,3.645,774,3.645,775,3.645,778,3.697,779,2.562,780,3.595,803,3.752,1014,5.367]],["t/1122",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,707,2.852,801,8.408,805,4.158,807,4.27,808,4.158,809,3.789,810,4.526,811,4.526,812,4.457,813,4.526,1119,6.112]],["t/1124",[35,1.527,44,3.067,48,2.215,50,1.193,51,0.896,64,1.77,66,2.524,104,1.551,183,2.258,230,4.228,393,3.585,435,2.201,559,2.334,707,3.184,708,2.682,757,2.998,779,2.541,820,3.518,821,3.615,822,3.269,865,3.84,912,2.897,1119,5.104,1120,5.323,1121,6.522,1122,5.964,1123,5.597,1124,6.821,1125,5.597,1126,5.597]],["t/1126",[12,2.965,20,1.06,33,1.237,35,2.355,37,1.204,44,3.603,51,0.957,104,1.128,107,1.401,167,2.224,177,2.224,183,1.446,187,3.143,190,2.546,216,2.389,220,2.144,225,3.587,227,2.651,230,2.027,382,2.049,417,3.215,776,2.591,779,2.47,784,4.809,820,2.254,821,2.316,822,2.094,823,1.526,826,2.545,849,5.166,850,3.795,865,4.511,895,3.153,912,1.856,964,2.46,1123,5.441,1124,4.961,1125,5.441,1126,5.441,1127,4.178,1128,4.178,1129,3.821,1130,4.178,1131,3.821]],["t/1128",[44,3.673,51,0.876,104,1.39,183,2.704,230,4.753,467,2.852,779,3.043,820,4.213,821,4.329,822,3.915,827,3.469,865,4.598,912,3.469,1122,7.143,1123,6.703,1124,7.667,1125,6.703,1126,6.703]],["t/1130",[20,1.74,50,1.649,51,0.704,64,1.862,95,2.489,100,2.822,114,4.24,129,2.993,132,3.048,175,3.104,240,4.741,356,3.195,366,4.869,367,5.369,560,4.24,673,3.607,705,3.364,1132,6.862,1133,3.858,1134,6.862,1135,6.862,1136,6.275,1137,5.6,1138,6.862,1139,5.177,1140,5.177,1141,4.869,1142,5.369,1143,3.52,1144,5.177,1145,5.013,1146,5.177,1147,5.6]],["t/1132",[21,4.133,22,6.691,23,2.795,174,4.844,807,4.844,1148,8.104,1149,8.104,1150,8.862]],["t/1134",[23,0.9,35,1.617,37,1.558,39,1.341,50,1.264,51,0.946,59,0.764,64,0.774,65,1.666,66,1.357,72,0.384,73,0.731,80,0.982,81,0.894,100,1.173,108,2.106,110,1.097,114,4.411,115,2.447,129,2.045,130,1.173,159,0.874,167,1.644,175,1.29,183,1.622,216,0.889,225,2.392,250,1.971,253,1.414,261,1.341,278,3.667,299,1.355,309,1.538,312,1.328,337,2.182,346,0.994,389,2.024,416,1.679,429,1.912,435,1.581,470,1.057,482,2.562,536,2.083,560,4.411,583,1.43,673,2.464,920,1.603,951,2.083,1143,3.061,1151,1.603,1152,2.447,1153,2.963,1154,2.852,1155,2.852,1156,2.152,1157,2.447,1158,2.152,1159,2.852,1160,2.852,1161,2.447,1162,2.327,1163,1.803,1164,2.152,1165,2.852,1166,3.354,1167,4.022,1168,2.852,1169,2.447,1170,2.852,1171,5.213,1172,2.852,1173,1.398,1174,2.852,1175,1.679,1176,2.852,1177,2.152,1178,4.687,1179,2.852,1180,2.852,1181,2.852,1182,2.852,1183,2.852,1184,2.957,1185,2.327,1186,1.559,1187,2.608,1188,2.852,1189,2.963,1190,2.715,1191,2.715,1192,1.923,1193,1.879]],["t/1136",[115,6.979,470,1.44,482,4.445,560,3.824,673,4.275,764,6.979,766,4.822,1139,6.136,1140,6.136,1141,5.771,1142,6.363,1143,4.172,1144,6.136,1145,5.941,1146,6.136,1147,6.637,1151,4.572,1194,6.979]],["t/1138",[21,2.846,23,2.459,49,1.946,50,1.014,51,0.953,64,2.302,65,3.478,66,2.257,72,1.05,73,1.997,100,1.444,114,1.651,129,1.531,131,4.517,261,3.666,483,3.916,536,2.565,560,4.602,673,4.46,762,2.491,1143,3.999,1162,2.865,1163,2.219,1175,2.067,1186,4.261,1195,2.649,1196,2.865,1197,5.541,1198,4.916,1199,3.21,1200,6.689,1201,3.21,1202,3.51,1203,5.371,1204,5.541,1205,3.21,1206,3.21,1207,3.51,1208,3.51,1209,3.21,1210,3.21,1211,3.51,1212,3.51,1213,5.541,1214,3.21,1215,3.51,1216,3.51]],["t/1140",[39,3.747,397,5.661,417,4.04,482,4.356,560,3.747,697,4.189,883,5.654,1074,5.373,1145,5.821,1217,9.879,1218,7.287,1219,7.969,1220,7.969,1221,7.969,1222,5.821,1223,6.012,1224,7.969,1225,6.012]],["t/1142",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,606,4.726,1139,6.612,1198,5.077,1226,8.764,1227,5.653,1228,6.055]],["t/1144",[23,1.361,51,0.951,59,1.059,61,2.009,64,1.171,65,2.777,66,1.249,72,0.581,73,1.106,80,1.361,81,1.239,110,1.194,148,1.465,159,1.322,175,1.952,261,2.029,299,2.05,312,2.009,337,3.025,429,1.76,435,1.456,470,0.764,548,4.029,560,4.386,673,3.415,738,3.415,1139,4.902,1143,3.333,1163,2.728,1164,3.256,1166,3.653,1173,2.116,1175,2.54,1184,3.22,1186,2.359,1189,4.107,1190,3.764,1191,5.038,1192,2.909,1193,4.281,1229,4.315,1230,3.521,1231,5.544,1232,3.521,1233,4.315,1234,4.315,1235,3.376,1236,4.315,1237,2.783,1238,2.5,1239,4.315,1240,4.315,1241,2.628,1242,3.062]],["t/1146",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,606,4.726,1140,6.612,1198,5.077,1227,5.653,1228,6.055,1243,8.764]],["t/1148",[23,1.399,51,0.938,59,1.081,61,2.066,64,1.204,65,2.824,66,2.3,72,0.597,73,1.137,80,1.39,81,1.265,110,1.219,148,1.506,159,1.359,175,2.007,261,2.086,299,2.107,312,2.066,337,3.088,429,1.81,435,1.497,470,0.786,560,4.438,673,3.487,738,3.487,1140,5.005,1143,3.403,1163,2.804,1164,3.347,1166,3.729,1173,2.175,1175,2.612,1184,3.288,1186,2.425,1189,4.193,1190,3.843,1191,5.108,1192,2.991,1193,4.371,1230,3.62,1231,5.637,1232,3.62,1235,3.471,1237,2.861,1238,2.57,1241,2.702,1242,3.148,1244,4.436,1245,4.436,1246,4.436,1247,4.436,1248,4.436,1249,4.436]],["t/1150",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,606,4.726,1141,6.219,1198,5.077,1227,5.653,1228,6.055,1250,8.764]],["t/1152",[23,1.361,51,0.948,59,1.059,61,3.025,64,1.171,65,2.309,66,1.249,72,0.581,73,1.106,80,1.361,81,1.239,110,1.194,159,1.322,175,1.952,261,2.029,299,2.05,312,2.009,337,3.025,429,1.76,435,1.456,470,0.764,548,4.029,560,4.386,673,3.415,738,3.415,1141,4.61,1143,4.009,1163,2.728,1164,3.256,1166,3.653,1173,2.116,1175,2.54,1184,3.22,1186,2.359,1189,4.107,1190,3.764,1191,4.527,1192,2.909,1193,4.281,1231,4.61,1237,2.783,1238,3.764,1241,2.628,1242,3.062,1251,3.946,1252,4.315,1253,4.315,1254,4.315,1255,3.376,1256,4.315,1257,3.376,1258,4.315,1259,3.521,1260,3.946,1261,3.703]],["t/1154",[23,1.465,39,2.184,50,1.493,51,0.926,59,0.757,64,1.26,65,2.439,66,1.345,72,0.625,73,1.19,80,0.973,81,0.886,108,2.423,110,0.854,114,4.24,132,2.063,159,1.423,175,2.101,213,2.996,261,2.184,299,2.206,337,2.163,397,2.65,429,1.895,435,1.567,467,1.696,514,3.986,559,1.662,560,4.736,673,4.74,682,2.829,982,3.79,1141,3.296,1166,2.611,1175,2.734,1186,2.539,1190,2.691,1260,4.247,1262,5.601,1263,3.79,1264,4.645,1265,6.863,1266,4.645,1267,3.79,1268,6.863,1269,4.645,1270,4.645,1271,4.645,1272,4.645,1273,4.645,1274,4.645,1275,2.936,1276,4.645,1277,3.634,1278,4.645,1279,4.645,1280,4.645,1281,3.986]],["t/1156",[20,2.121,37,0.92,48,1.645,51,0.927,61,4.284,72,0.652,73,1.241,88,1.873,108,2.499,110,1.301,129,2.113,175,2.191,272,5.777,429,1.976,435,1.634,560,4.327,673,2.546,912,2.151,1141,3.437,1143,5.244,1184,3.509,1189,3.062,1190,2.806,1237,4.566,1251,4.43,1261,4.157,1281,4.157,1282,4.844,1283,4.844,1284,4.844,1285,4.844,1286,3.79,1287,6.473,1288,3.004,1289,4.844,1290,4.844,1291,4.43,1292,4.844,1293,6.074,1294,6.473,1295,7.079,1296,6.473,1297,7.079,1298,4.844,1299,3.539,1300,4.844]],["t/1158",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,606,4.726,1142,6.857,1198,5.077,1227,5.653,1228,6.055,1301,8.764]],["t/1160",[23,1.392,51,0.951,59,1.077,61,3.076,64,1.197,65,2.348,66,1.277,72,0.594,73,1.13,80,1.384,81,1.26,110,1.214,159,1.351,175,1.996,261,2.075,299,2.096,312,2.054,337,3.076,429,1.8,435,1.488,470,0.781,560,4.427,673,3.472,738,3.472,1143,4.062,1163,2.789,1164,3.328,1166,3.714,1173,2.163,1175,2.597,1184,3.274,1186,2.411,1189,4.176,1190,3.827,1191,3.827,1192,2.974,1193,4.353,1237,2.845,1238,3.827,1241,2.687,1242,3.13,1255,3.452,1257,3.452,1259,3.6,1302,4.411,1303,3.786,1304,4.034,1305,3.786,1306,4.411,1307,4.411,1308,4.411,1309,4.411,1310,4.411,1311,6.605]],["t/1162",[21,2.484,27,3.77,50,1.64,114,4.715,167,2.386,187,3.372,274,3.719,312,3.168,482,3.719,484,3.335,560,3.199,583,3.41,606,3.669,673,3.576,767,3.622,914,4.005,943,4.143,969,4.97,1143,3.49,1173,3.335,1175,4.005,1198,3.942,1227,4.388,1228,4.701,1312,6.221,1313,5.133,1314,4.388,1315,6.803,1316,6.803,1317,4.97,1318,5.838,1319,6.803,1320,5.838,1321,6.803,1322,4.701]],["t/1164",[23,1.392,51,0.945,59,1.077,61,3.076,64,1.197,65,2.348,66,1.277,72,0.594,73,1.13,80,1.384,81,1.26,110,1.214,114,3.106,159,1.351,175,1.996,261,2.075,299,2.096,312,2.054,337,3.076,429,1.8,435,1.488,470,0.781,560,4.427,673,3.472,738,3.472,1143,4.83,1157,3.786,1161,3.786,1163,2.789,1164,3.328,1166,3.714,1173,2.163,1175,2.597,1184,3.274,1186,2.411,1189,4.176,1190,3.827,1191,3.827,1192,2.974,1193,4.353,1237,2.845,1238,3.827,1241,2.687,1242,3.13,1255,3.452,1257,3.452,1259,3.6,1303,3.786,1305,3.786,1323,3.6,1324,3.786,1325,4.411,1326,4.411,1327,4.411]],["t/1166",[23,1.729,51,0.933,59,0.893,64,1.487,65,2.75,66,1.587,72,0.738,73,1.405,80,1.149,81,1.046,110,1.008,114,3.638,159,1.679,192,3.536,261,2.578,299,2.604,337,2.553,429,2.237,467,2.002,560,4.216,673,5.399,738,2.882,1143,2.812,1166,3.082,1175,3.227,1184,2.717,1186,2.997,1190,3.176,1191,3.176,1200,4.704,1230,4.474,1232,4.474,1262,4.474,1275,3.465,1277,4.29,1314,4.99,1323,4.474,1324,4.704,1328,5.013,1329,5.013,1330,4.798,1331,5.013,1332,4.704]],["t/1168",[23,1.617,37,0.973,51,0.929,59,0.836,64,1.391,65,2.621,66,1.484,72,0.69,73,1.313,80,1.074,81,0.978,108,1.81,110,1.356,159,1.571,192,3.307,261,2.411,299,2.435,309,2.765,429,2.092,467,1.872,560,4.063,673,4.541,738,2.695,1143,3.784,1166,2.882,1175,3.018,1184,2.541,1190,2.97,1191,2.97,1200,4.399,1262,4.184,1275,3.241,1277,4.011,1291,4.688,1299,3.745,1313,3.868,1314,3.307,1323,4.184,1328,4.688,1329,4.688,1330,3.179,1331,4.688,1332,4.399,1333,5.127,1334,8.639,1335,5.127,1336,4.688,1337,5.127,1338,5.127,1339,4.184,1340,5.127,1341,4.688,1342,5.127]],["t/1170",[21,2.463,49,5.534,50,1.234,64,2.882,114,4.192,128,4.419,129,2.942,132,2.996,133,5.278,179,3.971,216,2.103,224,4.786,470,1.195,553,5.788,559,2.413,943,4.108,1071,4.927,1143,4.573,1195,5.089,1263,5.504,1299,7.294,1313,5.089,1343,6.168,1344,5.788,1345,6.168,1346,6.745,1347,5.504,1348,4.927,1349,6.745]],["t/1172",[108,3.78,114,5.744,253,3.872,380,3.872,416,4.598,435,2.636,441,4.938,920,4.391,1143,4.007,1171,5.894,1177,5.894,1350,6.374,1351,7.143]],["t/1174",[21,3.201,39,2.475,50,0.963,51,0.411,66,1.524,100,3.091,114,5.298,130,2.165,133,4.118,167,1.846,189,2.337,380,2.609,393,3.605,416,3.098,435,1.776,509,3.468,519,2.609,881,4.517,951,3.845,965,3.637,980,3.205,1133,2.959,1158,6.615,1167,4.517,1173,2.58,1227,3.395,1343,4.813,1352,5.263,1353,4.813,1354,5.263,1355,5.263,1356,5.263,1357,4.813,1358,5.263,1359,5.263,1360,5.263,1361,5.263,1362,4.517,1363,5.263,1364,4.118,1365,5.263,1366,6.133,1367,7.482,1368,4.813,1369,5.263,1370,5.263,1371,6.133,1372,4.517,1373,5.263,1374,4.813,1375,3.003,1376,4.118]],["t/1176",[37,1.259,50,1.213,84,3.119,114,5.42,129,2.893,167,3.473,225,2.296,256,4.358,380,5.598,398,3.287,416,3.904,429,2.706,565,3.402,943,4.039,1074,5.943,1367,6.897,1377,6.632,1378,5.004,1379,6.632,1380,5.691,1381,5.412,1382,6.632,1383,6.632,1384,4.192]],["t/1178",[21,2.507,27,1.564,33,2.032,35,0.66,37,1.55,48,0.958,50,1.494,51,0.895,64,1.607,84,2.185,95,1.023,108,2.882,109,1.288,110,0.854,114,3.839,130,1.16,151,1.399,167,0.99,179,1.661,185,1.045,189,1.253,190,1.133,194,2.412,224,4.871,238,1.689,250,1.949,346,1.619,355,1.635,389,2.002,398,1.399,435,0.952,441,5.456,467,1.696,470,0.5,509,1.859,515,2.129,549,2.302,591,3.791,697,1.483,699,1.61,712,2.881,730,1.949,762,2.002,823,1.696,831,1.82,887,1.75,920,1.586,1143,3.038,1166,1.586,1173,1.383,1313,5.179,1336,4.248,1385,2.821,1386,2.821,1387,1.82,1388,2.821,1389,4.645,1390,2.821,1391,2.821,1392,2.821,1393,2.421,1394,2.821,1395,4.248,1396,2.821,1397,2.58,1398,2.821,1399,2.58,1400,3.986,1401,2.58,1402,2.821,1403,5.921,1404,3.505,1405,4.645,1406,2.821,1407,4.248,1408,4.248,1409,2.821,1410,6.94,1411,2.421,1412,2.421,1413,2.58,1414,2.58,1415,4.645,1416,4.645,1417,5.921,1418,2.421,1419,2.58,1420,5.921,1421,4.645,1422,6.864,1423,2.58,1424,2.58,1425,2.58,1426,2.821,1427,2.821,1428,2.58,1429,2.58,1430,2.821,1431,4.248,1432,2.821,1433,2.821,1434,2.821,1435,2.821]],["t/1180",[21,1.576,33,1.277,37,0.819,50,1.793,51,0.895,114,5.035,167,1.513,189,1.916,241,3.703,244,3.601,253,2.139,256,3.827,311,3.333,346,1.504,393,1.775,429,3.547,435,1.456,467,1.576,470,0.764,698,3.256,707,1.576,777,2.297,850,6.087,920,5.51,1133,2.426,1227,2.783,1231,4.61,1332,3.703,1367,5.084,1387,4.191,1436,7.951,1437,3.376,1438,3.062,1439,3.946,1440,4.315,1441,7.145,1442,4.315,1443,3.946,1444,3.946,1445,3.376,1446,4.315,1447,4.315,1448,2.676,1449,4.315,1450,4.315,1451,3.946,1452,4.315,1453,4.315,1454,3.946,1455,6.497,1456,3.703]],["t/1182",[21,2.241,27,1.646,32,1.524,33,1.434,37,1.165,50,1.295,51,0.718,93,1.916,100,1.221,112,0.865,114,4.603,120,2.424,129,1.296,131,1.581,132,1.319,145,1.694,167,3.648,183,1.028,187,2.401,190,1.193,192,1.916,219,2.548,225,1.028,257,2.424,309,1.602,345,2.324,346,2.915,384,2.107,386,2.424,387,1.456,389,2.107,413,2.052,435,1.002,470,0.526,471,2.17,482,3.354,518,2.107,559,1.063,565,1.524,602,4.157,603,2.324,698,5.341,730,2.052,760,2.107,762,2.107,772,1.957,777,1.581,823,1.769,831,1.916,895,2.241,920,1.67,943,1.809,969,2.17,1072,2.324,1143,1.524,1169,4.157,1173,3.008,1184,2.401,1267,3.954,1393,2.548,1411,5.265,1457,4.845,1458,6.136,1459,2.324,1460,2.97,1461,2.716,1462,2.548,1463,2.424,1464,2.241,1465,4.845,1466,6.136,1467,4.845,1468,2.97,1469,2.716,1470,2.716,1471,6.136,1472,2.424,1473,2.241,1474,2.97,1475,2.241,1476,2.716,1477,2.97,1478,2.548,1479,2.716,1480,3.539,1481,2.97,1482,4.93,1483,2.716,1484,2.97,1485,2.97,1486,9.164,1487,7.079,1488,5.265,1489,2.548,1490,2.548,1491,4.157,1492,2.716,1493,2.97,1494,2.97,1495,2.716,1496,2.716,1497,2.548]],["t/1184",[21,1.101,33,1.835,37,0.572,50,0.897,51,0.815,61,2.284,64,0.818,65,1.072,72,0.406,83,1.775,84,4.176,107,1.011,108,3.268,110,1.139,111,1.829,114,3.697,132,1.339,167,2.174,183,1.044,190,1.211,194,2.547,216,1.529,231,2.887,244,3.436,250,2.083,256,2.729,309,1.626,346,1.051,389,2.139,413,3.389,429,2.529,436,5.931,470,0.534,475,2.757,548,1.87,551,5.321,559,1.755,697,2.578,698,3.701,738,4.865,766,1.447,768,2.359,772,3.232,781,2.757,805,1.605,809,2.379,823,2.264,831,1.945,850,3.711,855,1.87,915,2.275,980,1.836,1153,1.906,1231,2.139,1267,2.461,1367,2.359,1437,3.838,1438,3.48,1463,2.461,1470,2.757,1480,3.583,1488,5.321,1490,2.587,1498,3.015,1499,5.46,1500,5.06,1501,3.015,1502,3.015,1503,2.359,1504,3.015,1505,3.015,1506,6.2,1507,4.003,1508,3.015,1509,3.015,1510,3.015,1511,3.015,1512,2.757,1513,3.015,1514,2.757,1515,3.015,1516,5.589,1517,7.861,1518,2.757,1519,2.359,1520,3.015,1521,2.757,1522,3.015]],["t/1186",[33,2.433,50,0.86,51,0.882,64,1.275,108,2.902,110,1.859,114,2.21,132,2.087,167,1.648,257,3.835,366,3.335,401,2.723,484,2.304,503,5.65,509,3.097,559,1.682,697,5.497,766,2.256,809,2.28,887,2.915,915,5.224,1313,3.546,1350,5.65,1378,3.546,1516,5.417,1519,3.678,1523,4.7,1524,4.7,1525,4.7,1526,4.7,1527,10.731,1528,10.731,1529,8.22,1530,4.7,1531,4.7,1532,4.7,1533,4.7,1534,4.7,1535,4.033,1536,4.7,1537,4.7,1538,3.032,1539,4.7,1540,4.7,1541,4.7]],["t/1188",[33,1.132,35,0.524,37,0.951,39,3.13,50,1.617,51,0.825,59,0.365,61,1.781,64,0.607,65,1.359,66,0.648,72,0.515,88,1.479,108,1.35,112,1.938,114,5.264,130,3.359,148,2.26,151,1.896,167,3.099,189,2.224,194,1.162,216,0.698,220,1.148,248,0.906,253,1.896,255,2.047,256,1.684,257,1.827,309,1.207,346,0.78,380,2.483,398,1.109,416,2.252,417,1.135,429,2.716,435,0.755,443,1.827,467,1.829,470,1.049,482,2.091,548,1.388,559,0.801,565,1.148,583,1.122,603,1.751,682,1.363,704,1.122,712,2.372,771,1.635,831,1.444,836,1.588,883,1.588,887,1.388,920,1.258,943,1.363,964,1.318,980,1.363,1143,2.569,1151,1.258,1171,1.689,1173,1.097,1177,1.689,1235,6.063,1237,1.444,1238,2.216,1294,2.047,1351,6.632,1357,3.498,1362,1.921,1371,1.827,1374,2.047,1375,1.277,1376,2.993,1381,1.827,1387,1.444,1395,2.047,1408,5.419,1451,2.047,1454,3.498,1480,4.329,1482,2.418,1486,3.498,1491,5.085,1492,2.047,1495,2.047,1516,1.751,1542,2.047,1543,1.921,1544,2.238,1545,2.238,1546,2.238,1547,1.751,1548,1.588,1549,2.238,1550,1.827,1551,2.238,1552,2.238,1553,2.047,1554,2.238,1555,2.238,1556,2.238,1557,3.121,1558,2.238,1559,2.238,1560,2.238,1561,2.238,1562,7.253,1563,2.238,1564,1.827,1565,2.238,1566,2.238,1567,2.047,1568,1.689,1569,1.689,1570,2.238,1571,2.047,1572,2.238,1573,2.238,1574,2.238,1575,2.238,1576,2.238,1577,2.238,1578,2.238,1579,2.238,1580,2.238,1581,2.238,1582,2.047,1583,2.047,1584,2.238,1585,2.238]],["t/1190",[4,1.031,21,0.874,22,0.833,27,0.73,33,1.833,35,0.771,37,1.315,48,1.788,50,1.324,51,0.888,59,0.215,64,0.357,65,0.468,72,0.322,84,4.594,88,1.566,93,1.544,94,1.13,95,2.511,106,0.498,107,1.93,108,3.571,110,1.429,111,1.511,112,0.383,114,4.044,128,2.008,130,0.985,133,1.031,167,0.462,174,0.72,179,1.41,181,1.366,183,1.822,189,2.088,190,0.962,191,0.692,192,2.613,220,0.676,231,0.613,240,2.274,241,1.13,249,1.366,250,1.654,253,3.432,256,1.449,346,0.834,380,1.187,388,1.031,389,3.336,393,0.542,394,0.833,410,1.075,417,0.668,429,2.526,435,2.536,470,0.424,484,0.646,559,0.857,591,1.075,602,1.13,606,1.291,634,3.098,682,0.802,684,1.075,697,1.259,699,0.752,721,2.055,730,0.91,759,0.962,773,2.405,809,0.639,823,1.923,831,2.123,867,1.075,912,1.799,920,2.277,964,0.775,1020,1.544,1074,0.888,1166,0.741,1173,0.646,1267,1.075,1313,0.994,1348,6.52,1364,1.031,1378,1.807,1384,1.514,1393,1.13,1418,1.13,1423,2.19,1424,2.19,1425,2.19,1428,2.19,1459,2.576,1461,1.205,1480,1.749,1488,4.518,1490,1.13,1491,5.314,1516,1.031,1553,1.205,1557,1.075,1567,1.205,1568,0.994,1569,0.994,1586,4.034,1587,1.317,1588,2.394,1589,4.051,1590,4.051,1591,2.394,1592,2.394,1593,2.394,1594,2.394,1595,2.394,1596,2.394,1597,8.768,1598,1.317,1599,1.954,1600,1.13,1601,1.317,1602,4.051,1603,2.394,1604,3.292,1605,3.01,1606,1.317,1607,2.19,1608,2.394,1609,1.317,1610,1.317,1611,1.205,1612,3.292,1613,1.317,1614,1.205,1615,2.19,1616,1.205,1617,1.205,1618,0.994,1619,1.205,1620,1.317,1621,1.317,1622,1.031,1623,1.317,1624,3.292,1625,2.394,1626,1.317,1627,0.935,1628,1.317,1629,1.317,1630,1.317,1631,1.205,1632,1.317]],["t/1192",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,606,4.726,1144,6.612,1198,5.077,1227,5.653,1228,6.055,1633,8.764]],["t/1194",[23,1.376,51,0.943,59,1.068,61,3.05,64,1.184,65,2.328,66,1.263,72,0.588,73,1.118,80,1.373,81,1.25,110,1.204,159,1.337,175,1.974,261,2.052,299,2.073,312,2.031,337,3.05,429,1.78,435,1.472,470,0.773,548,4.063,560,4.406,673,3.443,738,3.443,1143,4.035,1144,4.942,1163,2.758,1166,3.683,1173,2.139,1175,2.568,1184,3.247,1186,2.385,1189,4.141,1190,3.795,1191,4.557,1192,2.941,1193,4.317,1231,4.648,1237,2.814,1238,3.795,1241,2.657,1242,3.096,1255,3.414,1257,3.414,1303,3.744,1305,3.744,1634,4.363,1635,4.363,1636,4.363,1637,4.363,1638,4.363,1639,4.363,1640,4.363,1641,4.363]],["t/1196",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,606,4.726,1145,6.402,1198,5.077,1227,5.653,1228,6.055,1642,8.764]],["t/1198",[23,1.297,39,1.934,51,0.946,56,2.71,59,1.021,61,2.917,64,1.116,65,2.227,66,1.191,72,0.554,73,1.054,80,1.313,81,1.195,110,1.151,114,1.934,159,1.26,175,1.861,261,1.934,299,1.954,337,2.917,429,1.678,435,1.388,484,2.017,548,2.551,560,4.294,583,2.062,673,3.293,738,3.293,1143,3.893,1145,5.544,1163,3.96,1166,3.522,1173,2.017,1175,2.421,1184,3.106,1186,2.248,1189,3.96,1190,3.63,1191,3.63,1192,2.773,1193,4.129,1230,3.357,1232,3.357,1237,2.653,1238,3.63,1241,3.816,1255,3.218,1257,3.218,1259,3.357,1304,3.761,1314,2.653,1384,2.6,1643,4.113,1644,4.113,1645,4.113,1646,4.113,1647,4.113,1648,4.113,1649,4.113,1650,3.53,1651,4.113,1652,2.462,1653,4.113]],["t/1200",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,606,4.726,1146,6.612,1198,5.077,1227,5.653,1228,6.055,1654,8.764]],["t/1202",[23,1.339,51,0.943,59,1.046,61,1.977,64,1.152,65,2.75,66,1.229,72,0.572,73,1.088,80,1.345,81,1.224,110,1.18,148,1.442,159,1.301,175,1.921,261,1.997,299,2.017,312,1.977,337,2.988,429,1.732,435,1.433,470,0.752,548,4.798,560,4.355,673,3.374,738,3.374,1143,3.292,1146,4.842,1163,4.057,1166,3.608,1173,2.082,1175,2.499,1184,3.181,1186,2.321,1189,4.057,1190,3.718,1191,4.996,1192,2.862,1193,4.229,1231,3.013,1235,3.322,1237,2.739,1238,2.46,1241,3.908,1242,3.013,1275,2.684,1655,4.246,1656,4.246,1657,4.246,1658,4.246,1659,5.869,1660,4.246,1661,4.246,1662,4.246,1663,4.246,1664,4.246,1665,4.246]],["t/1204",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,606,4.726,1147,7.152,1198,5.077,1227,5.653,1228,6.055,1666,8.764]],["t/1206",[23,1.318,51,0.955,59,1.033,61,1.945,64,1.134,65,2.723,66,1.21,72,0.563,73,1.071,80,1.328,81,1.209,110,1.165,148,1.419,159,1.28,175,1.89,261,1.965,299,1.985,312,1.945,337,2.952,429,1.705,435,1.41,470,0.74,548,2.591,560,4.324,673,3.333,738,3.333,1143,3.253,1147,5.174,1163,4.008,1166,3.565,1173,2.049,1175,2.46,1184,3.143,1186,2.284,1189,4.008,1190,3.674,1191,4.956,1192,2.817,1193,4.178,1231,2.965,1235,3.269,1237,2.695,1238,2.421,1241,3.861,1242,2.965,1275,2.641,1659,5.798,1667,4.178,1668,4.178,1669,4.178,1670,4.178,1671,4.178,1672,4.178,1673,4.178,1674,4.178,1675,4.178,1676,4.178]],["t/1208",[20,2.511,21,2.422,55,4.845,73,1.699,101,3.969,180,3.577,185,2.456,258,6.065,356,4.104,470,1.175,560,3.119,705,3.251,715,5.004,759,4.845,793,4.192,857,5.189,877,5.004,914,3.904,951,4.845,1198,3.842,1203,5.189,1330,4.113,1464,5.004,1538,4.278,1677,6.065,1678,6.632,1679,6.632,1680,5.691,1681,5.691,1682,6.632,1683,6.632,1684,6.632,1685,5.189,1686,5.691,1687,5.004,1688,6.632,1689,6.632,1690,6.632]],["t/1210",[21,4.075,23,2.705,50,1.568,174,4.686,371,4.609,809,4.159,1084,6.263,1148,7.84,1149,7.84,1691,6.469,1692,6.263]],["t/1212",[20,0.849,27,2.957,35,1.249,37,0.635,48,1.136,50,1.516,51,0.914,59,1.084,72,0.718,73,0.858,80,0.701,81,1.581,88,3.205,93,2.159,108,1.182,110,1.395,111,1.248,147,1.644,192,2.159,216,1.043,238,3.982,239,2.902,240,2.313,254,2.445,346,3.078,359,3.334,394,2.116,435,1.129,470,0.945,485,2.525,565,1.717,606,1.805,607,1.829,697,3.989,699,1.91,766,1.606,887,2.076,897,2.445,914,3.141,920,4.267,1106,2.731,1110,4.175,1153,2.116,1173,3.261,1186,1.829,1456,2.872,1478,2.872,1693,5.697,1694,3.347,1695,3.061,1696,5.335,1697,2.619,1698,3.347,1699,3.347,1700,3.061,1701,3.347,1702,5.335,1703,5.335,1704,6.652,1705,3.347,1706,4.291,1707,2.872,1708,3.347,1709,3.347,1710,3.347,1711,3.347,1712,3.347,1713,3.347,1714,4.578,1715,3.347,1716,3.347,1717,2.872,1718,3.347,1719,3.347,1720,3.347,1721,3.061,1722,3.347,1723,3.061,1724,3.061]],["t/1214",[20,1.74,21,2.506,23,2.165,51,0.867,59,1.118,64,1.862,65,3.204,66,1.987,72,0.924,73,2.31,74,2.756,80,1.438,81,1.309,110,1.261,159,2.102,312,3.195,336,4.107,337,4.198,353,4.107,435,2.315,483,3.915,1153,4.338,1163,4.338,1184,3.401,1725,6.275,1726,6.862,1727,6.862,1728,5.177,1729,4.626,1730,4.741]],["t/1216",[20,0.894,37,0.669,40,3.573,51,0.94,53,3.515,59,1.473,73,0.903,80,1.637,81,1.49,88,1.363,95,2.497,108,2.43,110,1.563,147,2.408,151,2.756,159,1.08,161,3.225,179,2.076,180,1.902,185,2.059,225,1.221,233,2.147,238,2.11,248,3.657,317,1.831,325,2.576,336,3.328,337,3.205,346,1.229,380,2.756,432,3.082,482,1.927,509,2.324,559,1.262,607,1.927,622,1.61,665,2.076,698,2.66,702,0.739,777,1.877,883,2.502,1133,1.982,1151,1.982,1156,4.195,1184,3.412,1320,3.026,1375,3.172,1550,2.878,1652,2.11,1731,2.878,1732,5.56,1733,3.225,1734,4.771,1735,3.515,1736,3.526,1737,3.026,1738,2.878,1739,3.526,1740,3.526,1741,3.225,1742,3.526,1743,3.526,1744,4.771,1745,3.526,1746,3.526,1747,3.225,1748,3.225,1749,2.878,1750,3.526]],["t/1218",[37,1.655,39,5.137,50,1.193,51,0.509,73,1.671,74,2.619,88,2.522,104,1.161,108,3.078,167,2.288,194,3.387,300,6.207,345,5.104,353,3.904,536,4.765,559,2.334,702,1.367,887,4.045,1314,6.334,1400,5.597,1652,3.904,1714,5.597,1751,5.623,1752,7.114,1753,5.964,1754,5.964,1755,6.522,1756,5.964,1757,6.522,1758,6.522,1759,6.522]],["t/1220",[20,2.581,21,3.716,93,5.356,180,5.488,394,5.249,606,4.478,766,3.985,1203,7.963,1475,6.265,1538,5.356,1760,8.303,1761,8.303,1762,8.303]],["t/1223",[3,0.937,33,0.614,35,2.006,37,0.68,39,4.474,40,1.87,48,0.704,50,1.163,51,0.919,60,1.884,72,0.279,73,0.918,80,0.435,88,1.385,95,1.299,104,0.637,106,1.355,107,2.131,108,1.265,109,0.947,110,0.381,111,2.94,112,1.043,130,2.614,147,1.104,148,0.704,167,1.256,181,3.212,183,1.949,185,0.768,187,1.028,190,0.833,191,1.09,194,1.077,213,1.338,216,2.325,225,2.966,227,1.498,230,1.738,300,4.018,327,0.874,330,3.268,346,2.747,382,1.017,387,1.017,391,1.78,470,0.838,500,1.692,559,0.742,565,1.064,571,0.691,583,1.04,622,0.947,702,0.435,738,2.486,751,2.222,762,1.472,766,0.995,767,1.104,822,1.796,823,1.308,887,1.286,964,1.221,1020,1.338,1090,1.692,1133,1.166,1151,1.166,1152,1.78,1153,1.311,1241,1.263,1263,1.692,1314,4.81,1384,1.311,1400,1.78,1473,1.565,1482,1.311,1652,1.241,1691,2.703,1728,3.568,1737,1.78,1751,5.084,1752,6.992,1753,1.897,1754,1.897,1756,5.148,1763,2.803,1764,2.074,1765,1.338,1766,2.074,1767,2.074,1768,2.074,1769,2.265,1770,2.074,1771,2.074,1772,2.074,1773,2.074,1774,2.074,1775,1.897,1776,2.311,1777,1.897,1778,4.729,1779,1.78,1780,1.623,1781,2.074,1782,2.074,1783,3.582,1784,2.074,1785,1.897,1786,2.074,1787,1.897,1788,1.472,1789,2.074,1790,2.074,1791,3.582,1792,2.074,1793,3.356,1794,1.78,1795,2.923,1796,1.897,1797,2.074,1798,1.897]],["t/1225",[3,0.669,37,1.813,40,1.693,48,0.868,50,0.783,51,0.875,59,1.346,64,0.694,72,1.316,73,2.871,80,1.629,81,1.575,88,4.359,95,2.342,100,1.052,110,1.518,129,1.115,147,2.215,148,0.868,156,1.868,180,2.309,185,2.045,232,1.929,248,2.235,286,4.637,309,1.379,346,0.891,432,1.417,470,0.758,482,1.398,565,1.312,702,0.897,883,3.038,943,1.557,996,1.929,1092,3.493,1133,2.407,1151,1.437,1156,1.929,1288,2.655,1317,1.868,1330,2.655,1375,4.102,1735,2.706,1765,6.302,1769,3.49,1799,2.194,1800,2.194,1801,2.194,1802,2.194,1803,2.194,1804,2.194,1805,2.194,1806,2.194,1807,2.194,1808,2.194,1809,2.194,1810,2.194,1811,2.194,1812,3.673,1813,2.194,1814,2.194,1815,2.087,1816,2.194,1817,2.194,1818,1.814,1819,3.673,1820,3.493,1821,2.194,1822,2.087,1823,2.194]],["t/1227",[20,1.696,37,1.27,51,0.915,59,1.09,65,2.377,72,1.194,73,2.712,74,3.56,80,1.401,81,1.276,110,1.229,233,4.073,272,5.458,298,5.739,299,3.177,435,2.257,470,1.184,702,1.401,1765,4.314,1815,5.458,1824,6.936,1825,6.688,1826,8.864,1827,6.688,1828,5.739,1829,6.688]],["t/1229",[32,2.852,37,1.055,40,3.09,51,0.913,65,1.976,66,1.609,72,1.052,73,2.645,74,3.935,191,2.922,470,0.985,519,4.857,520,7.145,521,3.945,702,1.165,766,2.668,777,2.959,1330,3.448,1376,4.35,1378,5.895,1824,7.668,1830,9.034,1831,5.084,1832,5.559,1833,5.559,1834,5.559,1835,5.559,1836,5.559,1837,5.559,1838,5.559,1839,5.559,1840,5.559,1841,3.273,1842,5.559,1843,5.559]],["t/1231",[37,1.11,51,0.936,65,2.078,72,1.09,73,2.378,74,2.348,88,4.462,101,3.5,180,4.365,248,2.367,299,2.778,370,4.04,435,1.973,470,1.036,702,1.225,823,2.135,1765,3.771,1844,5.592,1845,5.847,1846,4.772,1847,4.772,1848,4.772,1849,4.772,1850,4.772,1851,4.772,1852,4.772,1853,5.018,1854,5.018,1855,5.018,1856,5.018,1857,5.018,1858,5.018]],["t/1233",[37,1.628,51,0.89,65,2.262,72,1.155,73,2.485,74,2.556,108,2.247,130,2.618,167,3.402,248,2.576,299,3.024,469,2.752,470,1.127,702,1.334,1765,5.532,1769,4.023,1859,7.842,1860,6.365,1861,6.365,1862,6.365,1863,5.82,1864,6.365,1865,6.365,1866,5.82,1867,6.365,1868,6.365,1869,6.365,1870,6.365,1871,6.365,1872,6.365,1873,6.365,1874,6.365]],["t/1235",[51,0.919,65,2.749,72,1.311,73,2.731,74,3.106,110,1.422,470,1.37,622,4.867,702,1.621,715,5.836,912,3.435,1707,6.637,1875,7.735,1876,7.735]],["t/1237",[12,4.18,59,1.519,72,1.255,73,2.794,110,1.083,220,3.022,226,3.413,227,2.462,382,2.888,548,3.653,622,3.715,628,7.996,629,7.996,654,4.18,773,4.303,780,4.446,784,5.238,809,2.857,825,3.312,896,4.609,1129,5.387,1384,3.724,1877,8.521,1878,5.891,1879,5.891,1880,8.135,1881,5.891,1882,5.891,1883,5.891,1884,5.891,1885,5.891,1886,5.891,1887,5.055,1888,5.891,1889,5.891,1890,5.891]],["t/1239",[72,1.193,73,2.712,88,3.426,95,3.214,110,1.629,702,1.857,895,6.686,1288,5.496,1891,8.862,1892,8.862]],["t/1241",[40,3.392,51,0.97,59,0.825,65,1.799,67,2.73,72,0.984,73,2.197,74,2.032,80,1.06,81,0.965,88,3.316,95,3.406,110,1.343,112,1.473,248,2.048,256,2.228,274,2.766,353,3.029,467,1.848,470,0.896,697,2.66,702,1.06,716,5.223,1238,2.932,1288,3.139,1404,5.514,1735,3.199,1765,3.264,1893,5.514,1894,5.061,1895,5.061,1896,4.628,1897,5.061,1898,7.307,1899,4.13]],["t/1243",[37,0.666,40,3.87,51,0.963,59,0.572,65,1.248,67,1.893,72,0.746,73,1.759,74,1.41,80,0.736,81,0.67,88,2.142,95,3.653,110,0.645,112,1.022,159,1.075,167,3.532,248,1.421,256,1.545,353,2.101,433,3.574,435,1.184,467,1.282,470,0.622,584,3.012,697,1.845,702,0.736,716,5.959,738,1.845,776,4.257,1238,3.977,1600,3.012,1765,2.264,1820,2.865,1896,3.21,1899,8.855,1900,3.51,1901,3.51,1902,3.51,1903,3.51,1904,3.51,1905,3.51,1906,3.51,1907,3.51,1908,3.51,1909,3.51,1910,3.51,1911,3.51,1912,3.51,1913,3.012,1914,3.51,1915,5.541,1916,2.747,1917,3.51]],["t/1245",[37,1.171,40,2.438,51,0.944,59,1.005,65,2.191,67,3.326,72,1.13,73,2.445,74,2.476,80,1.292,81,1.176,88,2.384,95,3.044,110,1.133,112,1.795,159,1.889,167,2.944,248,3.397,256,2.714,353,3.691,467,2.252,470,1.092,697,3.241,702,1.292,716,3.755,738,3.241,768,4.825,1899,5.032,1913,5.291,1918,6.166,1919,6.166,1920,6.166]],["t/1247",[3,1.541,40,2.329,51,0.937,59,0.96,65,2.094,67,3.177,72,1.255,73,2.387,74,2.366,81,1.124,95,2.95,107,1.975,110,1.083,111,2.197,167,2.066,248,3.771,256,2.593,271,1.88,336,3.526,337,2.743,378,4.609,470,1.043,697,3.096,702,1.234,716,3.587,738,3.096,768,4.609,1288,3.653,1735,3.724,1899,4.807,1913,5.055,1921,5.891,1922,5.891,1923,5.055,1924,3.882,1925,5.387,1926,5.891]],["t/1249",[51,0.81,72,1.155,73,2.859,104,2.063,110,1.576,131,4.564,346,2.987,702,1.796]],["t/1251",[48,2.88,50,1.552,72,1.142,73,2.641,88,4.294,110,1.559,147,2.613,622,3.873,702,1.777,1751,5.471,1927,7.278,1928,8.481]],["t/1253",[37,1.483,48,2.652,51,0.765,59,1.273,72,1.052,73,2.51,92,5.706,147,2.407,185,2.892,470,1.383,589,4.007,702,1.637,769,4.391,817,3.872,825,5.508,1075,5.543,1751,5.038,1929,7.811,1930,7.811,1931,7.811]],["t/1255",[35,1.986,37,1.189,39,2.946,40,2.477,50,1.76,51,0.805,59,1.021,72,0.844,73,2.174,104,1.509,132,2.782,147,1.93,177,2.197,185,2.319,470,1.109,559,2.241,702,1.312,769,3.522,825,3.522,984,3.96,987,5.72,1065,4.901,1066,4.901,1068,6.02,1075,4.445,1751,4.04,1932,7.758,1933,7.28,1934,7.28,1935,5.728,1936,6.264,1937,5.728,1938,5.728,1939,5.112,1940,5.112]],["t/1257",[35,2.16,37,1.35,50,1.688,51,0.846,59,1.159,72,0.957,73,2.364,104,1.642,132,3.157,470,1.259,559,2.543,702,1.489,825,3.997,987,6.22,1065,5.562,1066,5.562,1068,5.044,1935,6.501,1939,7.529,1940,8.359,1941,7.109,1942,7.109]],["t/1259",[35,1.895,37,1.11,39,2.75,40,2.312,50,1.698,51,0.782,59,0.953,72,0.787,73,2.073,104,1.44,132,2.597,147,1.802,177,2.051,185,2.165,470,1.036,559,2.092,702,1.225,769,3.287,825,3.287,984,3.696,987,5.456,1065,4.575,1066,4.575,1068,5.743,1075,4.149,1445,4.575,1751,3.771,1933,6.945,1934,6.945,1937,7.401,1938,5.347,1939,4.772,1940,4.772,1943,8.093,1944,7.401,1945,5.847,1946,5.847,1947,5.847,1948,5.347,1949,5.347,1950,5.347,1951,5.347]],["t/1261",[35,1.914,37,1.127,39,2.791,40,2.347,50,1.711,51,0.787,59,0.967,72,0.799,73,2.095,104,1.455,132,2.636,147,1.829,177,2.081,185,2.198,470,1.051,559,2.123,702,1.243,769,3.337,825,3.337,984,3.752,987,5.513,1065,4.644,1066,4.644,1068,5.802,1075,4.211,1751,3.828,1933,5.093,1934,5.093,1939,6.673,1940,7.634,1944,5.427,1948,5.427,1949,5.427,1950,5.427,1951,8.555,1952,8.177,1953,5.935,1954,5.935,1955,5.935]],["t/1263",[48,2.392,50,1.678,51,0.716,59,1.148,67,4.947,72,0.949,73,2.35,95,3.327,181,4.02,429,2.874,470,1.248,702,1.476,825,3.961,987,4.75,1060,6.046,1069,6.046,1956,9.173,1957,7.045,1958,7.045,1959,9.173,1960,7.045,1961,5.316,1962,7.045,1963,7.045,1964,7.045,1965,7.045,1966,7.045]],["t/1265",[35,1.075,39,2.159,48,2.31,50,0.84,51,0.93,59,1.109,61,2.138,67,3.67,72,0.618,73,1.743,80,0.962,81,0.876,95,2.94,110,0.844,112,1.336,148,2.31,159,1.406,179,2.703,190,1.844,191,2.413,226,3.942,248,2.754,278,3.592,336,2.748,337,3.168,429,1.873,435,2.296,469,3.506,470,0.813,697,2.413,699,2.619,702,0.962,912,2.039,964,2.703,1020,2.961,1184,2.276,1516,3.592,1519,3.592,1569,5.134,1692,3.354,1967,4.591,1968,4.591,1969,4.591,1970,4.591,1971,4.591,1972,6.804,1973,4.591,1974,5.839,1975,4.591,1976,6.804,1977,3.746,1978,4.591,1979,4.591,1980,4.198,1981,4.591,1982,3.94,1983,4.591,1984,4.198,1985,4.591,1986,4.591]],["t/1267",[32,4.546,72,1.193,73,2.712,95,3.214,110,1.629,702,1.857,1987,7.727]],["t/1270",[14,5.085,37,2.114,51,0.493,72,1.499,95,3.094,147,1.946,185,3.577,271,3.554,314,2.911,317,5.91,702,1.323,1330,3.916,1988,6.314,1989,6.314,1990,6.314,1991,6.314,1992,6.314,1993,6.314]],["t/1272",[14,3.915,95,4.047,147,2.642,887,5.317,1680,7.357,1681,7.357,1994,8.573,1995,7.84,1996,8.573,1997,8.573,1998,8.573,1999,7.357]],["t/1274",[51,0.947,61,3.499,112,2.188,189,4.67,194,3.901,416,5.628,707,2.744,1564,6.132,1977,6.132,1995,6.872,2000,7.514,2001,7.514,2002,7.514,2003,7.514,2004,7.514,2005,7.514]],["t/1276",[14,5.306,37,1.849,51,0.673,72,1.402,148,2.179,177,2.25,216,2.688,327,4.389,346,2.236,370,5.958,470,1.136,491,7.02,702,1.344,769,3.607,2006,6.416,2007,6.416,2008,6.416,2009,6.416,2010,6.416,2011,6.416,2012,6.416,2013,5.868,2014,6.416,2015,5.868]],["t/1278",[14,5.136,37,1.722,51,0.808,72,1.324,101,3.351,108,1.977,148,3.079,177,2.754,309,4.235,327,4.143,346,1.951,370,7.153,470,0.992,491,6.627,702,1.173,730,3.868,769,3.148,943,3.41,1133,3.148,2013,5.12,2015,5.12,2016,5.599,2017,5.599,2018,5.599,2019,5.599,2020,5.599,2021,5.599,2022,5.599,2023,5.599,2024,9.068,2025,5.12]],["t/1280",[14,4.739,51,0.81,72,1.155,148,2.911,309,4.624,470,1.518,702,1.796,780,4.686,784,4.82,2026,10.377,2027,8.573]],["t/1282",[14,5.312,37,1.513,51,0.774,72,1.336,84,3.747,148,2.706,216,2.484,327,3.359,346,2.776,470,1.411,702,1.67,2028,7.969,2029,7.969,2030,7.969,2031,7.969]],["t/1284",[14,5.391,37,1.812,50,1.128,51,0.655,72,1.443,101,3.691,177,2.163,216,2.617,327,4.022,346,3.569,370,4.261,401,3.573,470,1.092,491,4.157,702,1.292,717,5.759,1133,3.467,2025,5.639,2032,6.166,2033,6.166,2034,6.166,2035,6.166,2036,6.166,2037,6.166,2038,6.166]],["t/1286",[14,5.182,37,1.528,51,0.779,72,1.344,148,2.733,216,2.51,327,3.393,346,2.805,470,1.426,607,5.457,702,1.687,2039,8.05,2040,8.05,2041,8.05]],["t/1288",[14,5.145,33,2.919,37,1.498,51,0.77,72,1.328,148,2.679,216,2.459,327,3.325,346,2.749,398,3.91,470,1.397,702,1.653,2042,7.889,2043,7.889,2044,7.889,2045,7.889]],["t/1290",[14,5.2,37,1.544,51,0.784,72,1.353,148,2.761,216,2.535,327,3.428,470,1.44,702,1.704,817,4.98,2046,8.133,2047,8.133,2048,8.133]],["t/1292",[14,5.182,37,1.896,51,0.779,72,1.344,150,4.739,216,2.51,325,5.881,327,3.393,470,1.426,702,1.687,2049,8.05,2050,8.05,2051,8.05,2052,8.05]],["t/1294",[14,5.055,37,1.427,50,1.375,51,0.746,72,1.288,185,2.782,216,2.343,325,5.489,327,3.167,358,5.669,454,4.424,455,6.093,470,1.331,503,6.132,702,1.574,2053,6.872,2054,7.514,2055,7.514,2056,7.514,2057,6.448]],["t/1296",[14,4.73,37,0.955,51,0.926,61,4.626,72,1.151,110,0.924,128,2.493,131,3.872,132,2.233,147,2.633,190,2.02,216,2.268,220,2.58,225,1.741,253,2.493,256,2.213,327,3.066,387,3.566,470,0.891,484,2.466,546,4.315,674,4.599,694,3.794,702,1.054,867,4.104,912,2.233,962,3.935,1238,2.914,2058,4.315,2059,5.029,2060,5.029,2061,8.546,2062,4.315,2063,9.364,2064,4.599,2065,7.274,2066,5.029,2067,5.029,2068,5.029,2069,5.029,2070,5.029,2071,5.029]],["t/1298",[14,4.559,33,2.383,51,0.779,72,1.084,111,3.002,129,3.512,147,2.48,148,2.733,216,2.51,355,5.784,398,3.99,442,4.739,470,1.426,562,5.427,702,1.687,2072,8.05,2073,8.05]],["t/1300",[14,4.559,33,2.383,51,0.779,72,1.084,111,3.002,129,3.512,147,2.48,148,2.733,216,2.51,398,3.99,442,4.739,470,1.426,702,1.687,2074,8.147,2075,6.569,2076,8.05,2077,8.05]],["t/1302",[14,3.833,33,1.825,51,0.883,61,2.871,72,0.83,112,1.795,147,2.586,148,2.094,194,3.202,216,1.922,328,4.825,398,3.056,401,6.209,442,4.941,470,1.092,702,1.292,848,4.261,897,4.505,914,3.63,1687,4.652,2057,5.291,2078,5.291,2079,5.032,2080,5.291,2081,9.368,2082,4.063,2083,7.676,2084,5.032,2085,5.291,2086,6.166,2087,5.639,2088,6.166,2089,5.639]],["t/1304",[14,4.383,20,0.71,33,1.367,37,1.545,39,4.229,50,0.512,51,0.894,72,1.018,95,1.016,131,1.491,132,1.244,147,2.651,148,0.951,167,2.651,177,0.983,194,2.398,216,1.44,220,1.437,253,1.389,256,2.033,311,3.878,327,1.181,398,3.388,401,5.561,442,3.469,470,1.21,484,1.373,491,1.889,548,1.737,702,1.432,823,1.023,848,3.191,897,3.374,914,2.719,1133,1.575,1444,5.388,1469,2.562,1687,3.484,2057,2.404,2058,2.404,2081,5.388,2082,3.043,2083,4.223,2084,3.769,2085,3.963,2087,2.562,2089,2.562,2090,5.056,2091,6.732,2092,2.404,2093,2.801,2094,2.801,2095,2.801,2096,2.801,2097,5.388,2098,2.801,2099,2.801,2100,5.892,2101,2.801,2102,3.963,2103,5.865,2104,2.801,2105,2.801,2106,2.801,2107,2.801,2108,4.618,2109,2.801,2110,5.892,2111,6.834,2112,2.801,2113,5.892,2114,2.801,2115,2.801,2116,2.801,2117,2.801,2118,4.618,2119,4.618,2120,2.801,2121,2.801]],["t/1306",[14,4.588,51,0.784,60,3.241,72,1.095,147,2.506,181,4.64,261,3.824,278,6.363,470,1.44,702,1.704,902,6.363,1381,6.637,2122,6.136,2123,8.133,2124,6.979,2125,8.133,2126,8.133]],["t/1308",[14,4.708,51,0.805,72,1.142,147,2.613,216,2.644,226,5.973,227,3.545,470,1.502,702,1.777,1788,6.018,2127,8.481,2128,8.481]],["t/1310",[14,5.127,50,1.792,51,0.765,72,1.052,147,2.407,181,4.457,233,4.757,470,1.383,519,3.872,702,1.637,1131,8.96,1687,5.894,2084,6.374,2129,7.143,2130,7.811,2131,7.143,2132,7.811]],["t/1312",[14,4.979,51,0.784,72,1.095,167,2.852,214,5.619,470,1.44,511,6.979,622,3.714,702,1.704,817,4.031,1067,8.622,1068,5.771,1445,6.363,1776,5.246,2133,8.133]],["t/1314",[14,4.314,51,0.908,67,3.977,72,0.993,104,1.681,177,2.586,216,2.299,435,2.488,470,1.306,702,1.545,984,5.972,987,6.369,1051,5.77,1060,6.328,1068,6.703,1069,6.328,2134,7.374,2135,7.374,2136,7.374]],["t/1316",[14,4.678,51,0.8,72,1.13,190,3.37,216,2.616,470,1.486,702,1.758,1238,4.862,2137,7.674,2138,5.798,2139,5.658,2140,7.201,2141,8.391,2142,8.391]],["t/1318",[14,4.708,48,2.88,51,0.805,72,1.142,216,2.644,355,4.914,441,5.361,470,1.502,702,1.777,2143,7.278,2144,8.481,2145,7.756,2146,8.481]],["t/1320",[14,4.708,48,2.88,51,0.805,72,1.142,139,6.399,216,2.644,355,4.914,470,1.502,702,1.777,2147,7.278,2148,8.481,2149,7.756,2150,8.481]],["t/1322",[14,4.678,51,0.863,72,1.13,110,1.542,147,3.547,233,5.11,470,1.486,702,1.758,1977,6.848,2151,8.391]],["t/1324",[14,4.719,48,3.17,51,0.807,60,4.118,72,0.975,194,3.759,216,2.257,233,4.409,470,1.282,702,1.517,848,5.002,897,5.288,914,4.261,1687,5.462,1980,6.62,2082,4.77,2084,5.907,2085,6.212,2152,7.239,2153,9.335,2154,7.239,2155,7.239,2156,7.239]],["t/1326",[14,4.42,48,2.601,51,0.828,60,3.052,61,3.567,72,1.032,175,3.465,216,2.388,327,3.229,345,5.994,398,3.797,413,5.293,470,1.357,702,1.605,1685,5.994,2157,11.147,2158,6.573,2159,7.66,2160,7.66]],["t/1328",[14,3.465,51,0.825,59,1.568,61,4.918,72,1.022,110,1.394,189,4.272,190,3.047,193,3.939,194,5.484,314,3.498,327,4.682,470,1.344,702,1.59,2161,7.586]],["t/1330",[14,3.567,37,2.131,51,0.836,59,1.597,61,4.562,72,1.052,110,1.436,189,3.469,190,3.137,193,4.056,194,5.087,314,3.602,470,1.383,702,1.637,2162,7.811]],["t/1332",[14,3.189,51,0.793,59,1.486,61,5.013,72,0.94,110,1.283,129,3.046,189,4.05,190,2.804,193,3.626,194,5.273,256,3.074,314,3.22,327,4.281,467,2.55,470,1.237,491,4.708,702,1.463,769,3.926,823,2.55,2163,6.983,2164,6.983,2165,5.269,2166,6.983]],["t/1334",[14,4.289,35,1.71,50,1.337,51,0.885,59,1.191,72,0.984,107,2.45,108,2.579,110,1.343,214,5.048,470,1.294,702,1.531,715,5.512,854,5.962,1776,4.712,1977,5.962,2167,7.306,2168,6.681,2169,7.306,2170,7.306,2171,7.306,2172,7.306,2173,7.306,2174,7.306,2175,6.681]],["t/1336",[13,2.47,14,0.249,19,1.83,33,0.447,50,0.192,51,0.966,59,0.089,83,0.617,84,0.257,95,0.548,120,0.855,147,0.721,148,0.794,149,2.794,177,0.53,185,0.56,193,0.283,194,0.283,216,0.17,222,2.169,225,0.672,228,0.427,243,0.427,244,1.874,254,0.399,256,0.854,274,1.061,300,0.662,314,0.252,362,0.387,364,0.412,382,0.267,384,0.387,386,0.445,398,2.102,401,0.316,405,0.743,417,0.531,441,0.955,461,0.399,467,0.199,506,9.335,562,0.706,565,1.391,588,1.182,598,0.445,607,0.298,622,0.478,634,0.69,667,0.855,702,0.219,717,0.589,721,0.899,722,0.79,738,0.287,751,0.338,776,0.338,784,0.589,805,0.558,807,0.298,817,0.519,826,0.332,836,0.387,842,0.345,855,1.451,942,0.79,986,1.104,1022,0.445,1124,0.427,1158,0.412,1238,0.316,1275,0.955,1322,0.377,1348,0.399,1364,0.427,1375,0.598,1404,0.79,1431,0.958,1448,0.338,1482,1.227,1499,3.285,1503,0.82,1627,0.743,1685,0.427,1691,0.412,1706,0.975,1723,0.499,1734,0.468,1735,0.345,1776,2.562,1828,0.468,1916,0.427,2062,0.468,2075,0.855,2078,0.468,2079,0.855,2080,0.468,2082,0.359,2092,0.468,2138,0.724,2168,0.499,2176,1.418,2177,0.546,2178,9.657,2179,0.546,2180,0.546,2181,0.546,2182,0.546,2183,0.546,2184,0.546,2185,0.546,2186,0.546,2187,1.048,2188,0.546,2189,0.546,2190,0.546,2191,0.546,2192,0.546,2193,0.546,2194,0.546,2195,0.546,2196,0.546,2197,0.546,2198,0.468,2199,0.546,2200,0.546,2201,0.958,2202,0.546,2203,0.546,2204,0.765,2205,0.546,2206,0.546,2207,0.546,2208,1.048,2209,0.546,2210,0.546,2211,0.546,2212,0.546,2213,0.546,2214,2.212,2215,1.923,2216,0.546,2217,0.546,2218,0.546,2219,0.546,2220,0.546,2221,0.546,2222,0.546,2223,0.546,2224,0.546,2225,0.546,2226,0.546,2227,0.546,2228,0.546,2229,0.546,2230,0.546,2231,0.546,2232,0.546,2233,0.546,2234,0.546,2235,0.546,2236,0.546,2237,0.546,2238,0.546,2239,0.546,2240,0.546,2241,0.546,2242,0.546,2243,0.546,2244,0.546,2245,0.546,2246,0.546,2247,0.546,2248,0.546,2249,0.546,2250,0.546,2251,0.546,2252,1.511,2253,1.048,2254,0.546,2255,0.546,2256,3.686,2257,0.546,2258,0.546,2259,0.546,2260,1.511,2261,0.546,2262,0.546,2263,0.546,2264,0.546,2265,0.546,2266,0.546,2267,0.546,2268,0.546,2269,0.546,2270,0.468,2271,0.546,2272,0.546,2273,0.427,2274,0.546,2275,0.546,2276,0.546,2277,0.546,2278,0.546,2279,0.546,2280,1.511,2281,0.546,2282,0.546,2283,0.546,2284,0.546,2285,0.546,2286,0.546,2287,0.546,2288,0.546,2289,0.546,2290,0.546,2291,1.048,2292,0.546,2293,1.94,2294,1.048,2295,0.546,2296,0.546,2297,1.048,2298,0.546,2299,0.546,2300,1.048,2301,0.546,2302,0.427,2303,1.048,2304,0.546,2305,0.546,2306,1.048,2307,0.546,2308,0.546,2309,1.048,2310,0.546,2311,0.546,2312,1.048,2313,0.546,2314,0.499,2315,1.048,2316,0.546,2317,0.546,2318,1.048,2319,0.546,2320,0.546,2321,1.048,2322,0.546,2323,0.546,2324,1.048,2325,0.546,2326,0.546,2327,1.048,2328,0.546,2329,0.499,2330,1.048,2331,0.546,2332,0.546,2333,1.048,2334,0.546,2335,0.499,2336,1.048,2337,0.546,2338,0.546,2339,0.958,2340,0.546,2341,0.546,2342,1.048,2343,0.546,2344,0.546,2345,1.048,2346,1.048,2347,0.546,2348,0.546,2349,1.048,2350,1.048,2351,0.546,2352,0.546,2353,1.048,2354,0.546,2355,0.546,2356,1.048,2357,0.546,2358,0.546,2359,1.048,2360,0.546,2361,0.546,2362,1.048,2363,1.048,2364,0.546,2365,1.048,2366,0.546,2367,0.546,2368,3.382,2369,0.546,2370,0.499,2371,0.546,2372,0.546,2373,0.546,2374,0.546,2375,1.048,2376,0.546,2377,0.399,2378,1.048,2379,0.546,2380,0.546,2381,1.048,2382,0.546,2383,0.546,2384,1.048,2385,0.546,2386,0.499,2387,1.048,2388,0.546,2389,0.546,2390,1.048,2391,0.546,2392,0.546,2393,1.048,2394,0.546,2395,0.546,2396,1.048,2397,1.048,2398,0.546,2399,0.546,2400,1.048,2401,0.546,2402,0.546,2403,1.048,2404,0.546,2405,0.546,2406,1.048,2407,1.048,2408,0.546,2409,0.546,2410,0.546,2411,0.546,2412,0.546,2413,0.546,2414,0.546,2415,0.546,2416,0.546,2417,0.546,2418,0.546,2419,0.546,2420,0.546,2421,0.546,2422,0.546,2423,0.546,2424,0.546,2425,0.546,2426,0.546,2427,0.546,2428,0.546,2429,0.546,2430,0.546,2431,0.546,2432,0.546,2433,0.546,2434,0.546,2435,0.546,2436,0.546,2437,0.546,2438,0.546,2439,0.546,2440,0.546,2441,0.546,2442,0.546,2443,0.546,2444,0.546,2445,0.546,2446,0.546,2447,0.546,2448,0.546,2449,0.546,2450,0.546,2451,0.546,2452,0.546,2453,0.546,2454,0.546,2455,0.546,2456,0.546,2457,0.546,2458,0.546,2459,0.546,2460,0.546,2461,0.546,2462,0.546,2463,0.546,2464,0.546,2465,0.546,2466,0.546,2467,0.546,2468,0.546,2469,0.546,2470,0.546,2471,0.546,2472,0.546,2473,0.546,2474,0.546,2475,0.546,2476,0.546,2477,0.546,2478,0.546,2479,0.546,2480,0.546,2481,0.546,2482,0.546,2483,0.546,2484,0.546,2485,0.546,2486,0.546,2487,0.546,2488,0.546,2489,0.546,2490,0.546,2491,0.546,2492,0.765,2493,0.546,2494,0.546,2495,0.546,2496,0.546,2497,0.546,2498,0.445,2499,0.546,2500,0.546,2501,0.546,2502,0.546,2503,0.499,2504,0.546,2505,1.048,2506,0.546,2507,0.546,2508,1.048,2509,0.546,2510,0.546,2511,0.445,2512,0.546,2513,0.546,2514,0.546,2515,1.048,2516,0.546,2517,0.546,2518,0.427,2519,0.546,2520,0.546,2521,0.958,2522,0.546,2523,0.546,2524,0.546,2525,0.546,2526,0.546,2527,0.499,2528,0.546,2529,0.546,2530,0.499,2531,0.546,2532,0.546,2533,0.468,2534,0.546,2535,0.546,2536,0.546,2537,0.546,2538,0.546,2539,0.546,2540,0.546,2541,0.546,2542,0.546,2543,0.546,2544,0.546,2545,0.399,2546,0.546,2547,0.546,2548,0.546,2549,0.546,2550,0.546,2551,0.546,2552,0.499,2553,0.855,2554,0.387,2555,0.546,2556,0.546,2557,0.546,2558,0.546,2559,0.546,2560,0.468,2561,0.546,2562,0.546,2563,0.546,2564,0.546,2565,0.82,2566,0.546,2567,0.546,2568,0.546,2569,0.546,2570,0.546,2571,0.546,2572,0.499,2573,0.546,2574,0.546,2575,0.546,2576,0.499,2577,0.546,2578,0.546,2579,0.546,2580,0.546,2581,0.546,2582,0.499,2583,0.546,2584,0.546,2585,0.546,2586,0.546,2587,0.546,2588,0.546,2589,0.546,2590,0.546,2591,0.546,2592,0.546,2593,0.546,2594,0.499,2595,0.546,2596,0.546,2597,1.048,2598,0.546,2599,0.546,2600,0.546,2601,0.546,2602,0.546,2603,0.546,2604,0.546,2605,0.546,2606,0.546,2607,0.546,2608,0.546,2609,0.546,2610,0.546,2611,0.546,2612,0.468,2613,0.546,2614,0.546,2615,0.546,2616,0.546,2617,1.048,2618,0.546,2619,0.546,2620,0.546,2621,0.546,2622,0.546,2623,0.546,2624,0.546,2625,0.468,2626,0.546,2627,2.339,2628,0.546,2629,0.546,2630,0.546,2631,0.546,2632,0.546,2633,0.546,2634,1.048,2635,0.546,2636,0.546,2637,0.546,2638,0.546,2639,0.546,2640,0.412,2641,0.546,2642,0.546,2643,0.546,2644,0.546,2645,0.546,2646,0.546,2647,0.546,2648,0.546,2649,0.546,2650,0.546,2651,0.546,2652,0.546,2653,0.499,2654,0.499,2655,0.546,2656,0.546,2657,0.546,2658,0.546,2659,0.546,2660,0.546,2661,0.546,2662,0.499,2663,0.445]],["t/1339",[35,1.776,51,0.867,72,1.022,73,2.706,74,3.047,95,2.751,104,1.879,167,2.661,175,4.352,225,2.626,233,5.858,429,3.095,435,3.246,470,1.344,702,1.59,703,3.369]],["t/1341",[3,0.823,20,0.798,21,0.35,25,0.877,32,0.917,33,0.932,34,0.595,35,1.355,37,1.035,39,1.181,40,0.707,48,0.607,49,0.991,50,1.168,51,0.556,54,0.751,56,0.632,59,0.291,60,1.68,61,1.466,73,1.396,81,0.183,88,1.217,93,0.619,95,1.346,100,1.033,104,0.447,105,0.411,106,0.363,107,2.583,108,0.631,110,1.064,111,2.381,112,0.916,114,1.746,121,0.632,129,0.418,130,0.394,131,0.952,132,0.426,133,0.751,139,0.724,145,0.547,147,1.784,148,2.257,149,0.632,167,1.302,175,0.809,177,0.336,178,1.534,179,1.053,181,3.793,183,2.667,185,1.166,190,1.264,213,0.619,214,0.663,216,2.072,220,1.288,222,2.634,225,1.09,226,1.036,227,1.05,233,0.584,238,1.503,239,0.418,248,1.503,250,0.663,253,0.475,254,1.834,256,1.105,271,0.306,274,0.524,278,0.751,309,0.517,311,0.492,312,1.728,314,0.824,315,0.663,317,0.928,319,0.701,328,0.751,330,0.663,346,1.77,355,1.036,359,1.861,366,0.681,380,0.475,381,1.693,394,0.606,398,1.245,401,1.036,416,1.053,417,1.273,429,0.729,435,0.324,441,1.99,442,1.478,469,0.415,470,0.317,484,0.47,509,0.632,515,1.349,536,0.701,548,0.595,560,1.48,565,2.163,589,0.492,622,1.437,668,0.823,673,1.655,682,0.584,684,2.049,688,0.619,694,3.181,697,0.504,699,0.547,708,0.394,715,0.724,717,0.539,722,0.724,762,1.269,766,0.858,767,0.511,768,0.751,769,1.412,777,0.511,780,0.524,784,2.625,808,0.511,809,0.867,817,0.475,825,0.539,829,0.823,846,0.574,849,2.503,850,0.574,886,0.823,895,1.349,896,0.751,902,0.751,914,0.565,919,0.663,920,0.539,929,0.751,935,0.783,943,2.261,953,2.233,962,1.399,968,1.349,969,1.306,980,2.261,984,0.606,1020,2.394,1022,0.783,1075,1.782,1088,0.877,1089,1.205,1106,0.783,1110,1.965,1133,0.539,1166,1.412,1169,1.534,1171,1.349,1186,0.524,1194,0.823,1195,1.895,1196,0.783,1218,1.635,1225,1.349,1318,0.823,1364,0.751,1384,0.606,1387,1.153,1410,0.877,1412,1.534,1448,0.595,1464,0.724,1475,1.349,1479,1.635,1482,1.13,1483,0.877,1499,2.406,1503,0.751,1548,0.681,1681,0.823,1686,0.823,1693,1.153,1717,0.823,1724,0.877,1765,1.153,1769,0.606,1780,0.751,1788,0.681,1824,0.751,2062,0.823,2074,0.783,2091,1.399,2143,0.823,2145,0.877,2147,0.823,2149,0.877,2158,0.823,2329,0.877,2492,1.834,2503,1.635,2518,2.463,2530,1.635,2572,0.877,2576,1.635,2612,0.823,2640,0.724,2664,2.878,2665,1.788,2666,1.788,2667,1.788,2668,0.959,2669,0.959,2670,0.959,2671,0.959,2672,0.959,2673,2.511,2674,4.669,2675,0.959,2676,3.148,2677,0.959,2678,1.459,2679,0.959,2680,0.959,2681,0.959,2682,0.959,2683,0.959,2684,0.959,2685,1.635,2686,0.959,2687,0.959,2688,0.959,2689,0.959,2690,0.877,2691,0.959,2692,0.823,2693,0.959,2694,0.959,2695,0.959,2696,0.959,2697,1.459,2698,0.877,2699,0.959,2700,0.959,2701,0.783,2702,0.959,2703,3.411,2704,3.181,2705,0.823,2706,0.959,2707,0.959,2708,0.877,2709,0.959,2710,1.788,2711,2.296,2712,0.823,2713,1.788,2714,2.878,2715,2.511,2716,2.155,2717,1.635,2718,2.296,2719,2.511,2720,0.959,2721,0.959,2722,0.959,2723,0.959,2724,0.823,2725,0.959,2726,0.823,2727,1.788,2728,0.823,2729,0.959,2730,1.635,2731,1.788,2732,1.788,2733,2.296,2734,0.877,2735,0.877,2736,1.534,2737,0.959,2738,1.788,2739,1.788,2740,0.959,2741,1.788,2742,0.959,2743,0.959,2744,0.959,2745,1.635,2746,0.959,2747,0.877,2748,0.959,2749,0.959,2750,1.635,2751,0.959,2752,0.959,2753,0.823,2754,0.823,2755,1.635,2756,1.635,2757,0.877,2758,0.823,2759,0.877,2760,1.788,2761,1.788,2762,1.788,2763,0.959,2764,0.959,2765,0.823,2766,0.959,2767,1.788,2768,0.959,2769,0.959,2770,0.959,2771,0.959,2772,0.877,2773,0.681,2774,0.877,2775,0.823,2776,0.877,2777,0.877,2778,0.959,2779,0.959,2780,0.959,2781,0.959]],["t/1343",[37,1.44,48,2.576,51,0.751,59,1.722,72,1.022,80,1.59,81,1.447,110,1.394,159,2.324,175,3.432,190,3.047,225,2.626,233,4.62,315,7.298,435,2.56,470,1.344,702,1.59,2782,7.586,2783,7.586,2784,7.586,2785,7.586]],["t/1345",[51,0.934,56,4.602,72,0.94,73,1.789,107,2.341,111,2.604,121,7.095,470,1.237,697,3.671,702,1.463,1186,3.817,1731,5.699,2664,9.287,2747,6.386,2786,9.12,2787,9.12,2788,6.983,2789,9.12,2790,6.386]],["t/1347",[20,2.273,88,4.12,147,2.762,366,6.36,367,7.013,1136,8.196,1275,5.665,2773,6.36,2791,8.962]],["t/1349",[20,1.39,34,3.4,51,0.873,59,0.893,73,1.405,81,1.476,105,4.943,107,1.838,129,2.392,167,1.923,654,3.89,702,1.149,1569,5.837,1927,6.639,2792,5.482,2793,5.482,2794,8.698,2795,5.482,2796,5.482,2797,9.147,2798,5.482,2799,5.482,2800,7.737,2801,5.482,2802,5.482,2803,5.482,2804,5.482,2805,5.482,2806,5.482,2807,4.704,2808,5.482,2809,5.482,2810,5.482,2811,5.482,2812,5.482,2813,5.482]],["t/1352",[20,1.505,23,1.872,51,0.949,64,1.61,65,2.906,66,1.718,72,1.26,73,2.095,74,2.383,105,3.505,110,1.091,159,1.818,175,2.685,260,4.644,337,2.763,353,3.552,589,3.045,825,3.337,1184,2.942,1275,3.752,1557,4.843,1568,4.478,1569,4.478,1961,4.478,2794,6.673,2797,7.017,2814,4.644,2815,5.935,2816,5.935,2817,5.935,2818,5.935,2819,5.935,2820,5.935,2821,5.935]],["t/1354",[3,2.219,20,1.589,23,1.976,51,0.946,64,1.699,65,3.015,66,1.813,72,1.142,73,2.174,74,2.516,105,2.685,110,1.151,175,2.834,185,2.319,261,2.946,353,3.749,589,3.214,825,3.522,1275,3.96,1557,5.112,1568,6.401,1569,4.726,1961,4.726,2794,6.923,2814,4.901,2822,6.264,2823,6.264,2824,6.264,2825,6.264,2826,6.264]],["t/1356",[23,2.128,51,0.944,59,1.099,64,1.83,65,3.168,66,1.953,72,1.2,81,1.287,105,3.822,110,1.24,112,1.964,336,4.037,337,3.141,589,3.46,825,3.792,1275,4.264,1961,5.089,2794,5.504,2797,5.788,2814,5.278,2827,6.745,2828,6.745,2829,6.745,2830,6.745,2831,5.788,2832,6.168]],["t/1358",[23,2.263,51,0.929,59,1.169,64,1.946,65,3.298,66,2.077,72,1.25,73,1.838,74,2.881,81,1.368,110,1.318,336,4.293,337,3.34,589,3.68,825,4.033,1275,4.534,1281,6.156,1961,5.412,2814,5.613,2831,6.156,2832,6.56,2833,6.56,2834,6.56]],["t/1360",[23,1.992,51,0.952,59,1.029,64,1.713,65,3.031,66,1.828,72,1.149,73,1.618,74,2.536,81,1.204,110,1.568,112,1.838,183,2.186,189,4.29,314,2.911,589,3.239,825,3.55,1275,3.991,1961,4.764,2814,4.94,2831,5.418,2833,5.774,2834,5.774,2835,6.314,2836,6.314,2837,6.314,2838,6.314,2839,6.314,2840,6.314]],["t/1362",[3,2.105,20,2.041,48,2.733,58,5.562,60,3.208,83,5.877,88,3.112,106,3.045,132,3.575,185,2.981,253,3.99,359,4.035,361,5.712,362,5.712,363,6.074,503,8.147,842,6.311]],["t/1364",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1366",[3,1.237,20,1.764,23,1.491,37,0.898,48,1.605,50,0.865,51,0.949,58,3.267,59,0.771,62,4.057,64,1.283,66,2.013,73,1.211,80,0.991,81,0.902,84,4.277,104,1.237,107,1.585,110,1.672,111,2.593,132,2.1,166,4.396,183,1.637,356,2.201,397,2.698,405,3.355,429,3.365,432,4.571,433,5.32,436,6.223,559,1.692,704,2.37,705,2.318,707,1.727,708,1.944,916,7.543,1473,3.567,1611,4.324,2841,4.728,2842,6.954,2843,4.057,2844,4.728,2845,4.057,2846,4.728,2847,4.057,2848,4.728]],["t/1368",[3,1.465,33,1.053,35,2.301,37,1.621,50,0.651,51,0.944,58,5.426,60,2.231,61,1.657,80,0.745,81,0.679,83,2.094,84,2.633,93,2.295,104,1.232,105,1.525,106,2.118,107,1.877,108,1.977,109,1.625,110,1.273,111,2.088,112,2.016,130,3.73,148,1.208,166,3.54,174,1.945,177,1.964,183,1.232,191,1.87,225,3.139,253,1.764,317,1.847,358,2.684,362,2.525,393,2.303,405,3.973,425,2.784,429,1.452,454,4.076,455,4.012,565,1.825,591,2.903,667,2.903,688,3.612,823,1.299,842,4.964,1241,2.167,1344,3.053,1448,2.206,1599,2.903,2053,3.254,2079,2.903,2843,6.739,2845,3.053,2847,3.053,2849,3.053,2850,2.525,2851,3.558,2852,2.684,2853,3.558,2854,3.558]],["t/1370",[51,0.784,58,5.619,84,3.824,104,1.447,106,3.076,112,3.174,166,5.141,405,5.771,425,6.363,454,4.788,455,4.712,467,2.97,827,3.612,2843,6.979,2845,6.979,2847,6.979]],["t/1372",[3,2.516,20,2.151,33,1.854,50,1.146,55,6.198,60,3.834,61,2.917,110,1.151,147,1.93,193,3.252,363,4.726,366,4.445,367,4.901,393,2.576,398,3.105,414,5.112,435,2.113,529,7.758,751,7.263,759,4.576,965,4.328,1263,5.112,1347,5.112,1776,5.472,2640,6.401,2849,5.375,2855,6.264,2856,4.901,2857,5.112,2858,6.264,2859,6.264]],["t/1374",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1376",[3,1.244,20,1.771,23,1.5,35,1.113,37,0.903,48,2.372,50,0.87,51,0.934,59,0.775,64,1.29,66,2.022,67,2.565,73,1.219,80,1.911,81,1.74,104,1.243,106,1.799,107,1.595,110,1.676,111,2.605,159,1.457,177,1.668,197,3.722,227,1.988,230,2.307,356,2.215,382,3.424,397,2.714,417,4.197,559,1.702,704,2.384,705,2.332,707,2.551,708,1.956,753,6.387,1105,3.375,2860,4.756,2861,4.756,2862,4.756,2863,3.375,2864,3.722,2865,4.082,2866,4.756,2867,4.756,2868,4.756,2869,4.756,2870,4.756,2871,3.134,2872,4.082,2873,4.756,2874,4.756,2875,4.756]],["t/1378",[3,1.989,33,0.838,35,2.36,37,1.306,48,1.582,49,3.29,50,0.852,51,0.947,53,2.945,60,2.366,61,1.318,80,0.976,81,0.889,88,1.095,95,2.153,104,1.224,106,2.245,107,1.99,108,1,109,1.293,110,1.091,111,1.737,112,1.356,121,1.866,130,1.916,148,2.016,175,1.281,177,2.413,181,1.616,183,1.613,185,1.048,193,1.47,216,0.883,225,2.632,227,1.948,239,1.235,248,1.146,317,1.47,327,1.194,346,0.987,363,2.136,382,3.728,387,2.284,393,3.127,413,1.956,417,1.436,559,1.013,565,3.045,583,1.419,708,1.164,751,5.361,757,0.974,771,2.069,776,1.756,793,1.79,823,1.034,850,1.695,912,1.258,953,3.306,1499,1.616,1571,2.589,2138,1.956,2850,2.009,2857,2.311,2863,2.009,2864,3.646,2865,2.43,2871,1.866,2872,2.43,2876,2.589,2877,4.261,2878,2.589,2879,2.831,2880,2.216,2881,2.216,2882,2.216,2883,2.43,2884,2.589,2885,2.831,2886,2.589,2887,2.831,2888,2.589,2889,2.589,2890,2.589,2891,2.589,2892,2.43]],["t/1380",[37,1.326,51,0.872,80,1.463,81,1.332,95,2.533,104,1.243,106,2.642,110,1.283,112,2.957,183,3.157,382,3.424,387,3.424,467,2.55,751,4.331,757,2.402,827,3.101,912,3.101,1499,3.984,2863,4.955,2864,5.464,2865,5.993,2871,4.602,2872,5.993,2877,6.386,2884,6.386,2889,6.386,2891,6.386,2892,5.993]],["t/1382",[3,2.242,4,6.709,20,2.174,50,1.568,60,3.417,148,2.911,149,5.65,330,7.711,441,5.42,2893,7.357,2894,8.573,2895,8.573]],["t/1384",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1386",[3,2.15,20,2.084,23,1.886,35,1.4,48,2.03,50,1.094,51,0.933,64,1.622,66,2.38,73,1.532,80,1.253,81,1.141,104,1.462,106,2.262,107,2.005,109,2.731,110,1.099,248,2.42,319,6.004,356,2.784,397,3.412,559,2.139,704,2.997,705,2.932,707,3.001,708,2.459,912,3.65,1151,3.362,2857,4.88,2896,5.98,2897,5.98,2898,8.219,2899,8.219,2900,5.98]],["t/1388",[3,2.184,33,1.811,35,1.955,51,0.943,80,1.282,81,1.167,104,1.691,106,3.158,107,2.051,108,2.16,109,2.794,110,1.125,111,2.282,112,1.781,130,3.434,190,2.457,225,2.89,231,2.849,319,6.1,330,4.228,387,3,823,2.234,912,3.708,1731,4.993,2901,6.118,2902,7.165,2903,5.595,2904,5.595,2905,5.595]],["t/1390",[51,0.838,104,1.613,106,3.429,112,2.639,319,6.622,467,3.31,827,4.026,2902,7.779]],["t/1392",[51,0.945,231,3.826,319,6.003,330,5.678,387,4.029,912,4.491,2176,6.003,2902,7.051,2903,7.514,2904,7.514,2905,7.514]],["t/1394",[3,2.318,20,2.247,50,1.621,181,5.056,225,3.068,274,4.844,461,6.474,760,6.288,931,7.232,2553,7.232,2906,7.605]],["t/1396",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1398",[3,1.252,20,1.779,23,1.51,33,1.417,35,1.12,37,0.909,48,1.625,50,1.52,51,0.859,60,1.907,64,1.298,66,2.031,73,1.226,104,1.248,107,1.604,108,1.689,110,0.879,147,1.474,148,1.625,149,4.623,216,2.187,223,3.306,244,2.652,274,5,356,2.228,397,2.73,398,2.372,442,2.817,470,1.243,471,3.496,483,2.73,484,2.346,559,1.712,565,3.599,704,2.399,705,2.346,707,2.562,708,1.968,951,3.496,1348,3.496,1729,4.73,1776,3.087,2082,4.623,2906,6.02,2907,4.785,2908,7.016,2909,7.016,2910,6.02,2911,4.785,2912,4.785,2913,4.106,2914,6.02,2915,3.744,2916,4.376,2917,4.376,2918,4.376,2919,3.905,2920,4.376,2921,4.785]],["t/1400",[3,1.237,33,0.854,35,2.129,37,1.458,50,1.405,51,0.944,60,3.06,80,0.604,81,0.55,95,1.046,104,1.07,106,1.789,107,2.016,108,1.669,109,1.317,110,0.869,111,2.242,112,1.377,130,3.583,147,2.902,148,2.362,183,0.998,190,1.158,214,3.267,216,1.474,223,1.992,225,3.149,239,1.258,244,3.854,274,3.802,317,1.497,346,2.874,387,1.414,461,3.455,471,2.106,484,1.414,500,3.859,565,3.084,697,1.516,704,1.445,751,1.788,823,1.053,842,2.989,964,1.697,980,3.661,1348,2.106,1776,1.86,1793,3.355,2082,1.9,2545,2.106,2850,4.266,2906,2.474,2910,5.159,2913,4.058,2914,4.058,2916,2.637,2917,2.637,2918,2.637,2919,2.353,2920,2.637,2922,4.324,2923,6.955,2924,2.883,2925,4.324,2926,2.883,2927,2.474,2928,4.324,2929,2.883,2930,2.256]],["t/1402",[51,0.923,104,1.312,106,2.789,112,2.75,183,2.553,387,3.615,467,2.693,827,3.275,1793,5.233,2892,6.328,2910,6.328,2913,6.328,2914,6.328,2922,6.743,2925,6.743,2928,6.743,2931,7.374,2932,6.743,2933,7.374,2934,7.374,2935,7.374,2936,7.374]],["t/1404",[3,2.406,20,1.228,35,1.134,37,0.92,44,3.329,48,1.645,49,3.923,50,1.295,59,0.789,64,1.314,100,1.992,104,1.259,110,0.89,129,2.113,130,1.992,132,2.151,146,3.347,147,2.577,175,2.191,213,3.124,216,2.608,224,3.437,225,1.677,256,2.132,312,3.296,317,2.515,346,1.688,357,6.117,361,3.437,382,2.375,392,3.437,429,1.976,470,0.858,484,2.375,717,5.173,757,1.666,760,3.437,793,3.062,1074,3.266,1153,4.475,1238,2.806,1344,4.157,1448,3.004,1535,4.157,1548,3.437,1916,3.79,2082,3.192,2498,3.953,2553,3.953,2612,4.157,2937,7.713,2938,4.844,2939,4.43,2940,4.844,2941,4.844,2942,4.844,2943,5.341]],["t/1406",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1408",[3,1.529,20,2.052,23,1.844,35,1.369,37,1.11,48,1.985,50,1.07,51,0.901,59,0.953,64,1.586,66,2.343,73,1.498,80,1.225,81,1.115,104,1.44,216,1.823,356,2.722,357,3.388,382,2.867,397,3.336,484,2.867,518,4.149,559,2.092,704,2.931,705,2.867,707,2.955,708,2.405,912,2.597,2871,3.853,2919,4.772,2937,4.412,2943,4.412,2944,5.847,2945,5.847,2946,5.018,2947,5.456,2948,5.347,2949,4.575,2950,4.772,2951,4.412,2952,4.271,2953,4.575,2954,6.945]],["t/1410",[3,1.399,33,0.724,35,2.302,37,1.679,40,0.967,49,1.356,50,0.978,51,0.949,59,0.399,72,0.329,80,0.864,81,0.787,104,0.951,106,1.56,107,2.105,108,0.864,109,1.117,110,0.758,111,1.538,112,0.712,130,1.696,147,1.271,167,0.858,175,1.107,177,1.446,183,1.428,185,0.906,214,1.69,216,1.667,220,1.255,225,3.404,227,1.023,238,3.201,346,2.818,357,4.686,382,3.078,392,1.736,393,2.883,401,1.417,435,1.804,518,2.927,597,1.914,708,1.006,712,2.558,717,4.777,757,0.841,772,1.612,805,1.302,823,0.893,912,1.086,986,1.787,1001,1.996,1418,2.099,1788,1.736,2554,1.736,2850,3.794,2871,2.718,2881,1.914,2882,1.914,2915,1.914,2919,1.996,2937,6.898,2943,1.846,2947,4.233,2948,2.237,2949,1.914,2950,1.996,2951,1.846,2952,1.787,2953,1.914,2954,6.523,2955,2.446,2956,2.099,2957,2.099,2958,2.237,2959,2.237,2960,2.099,2961,3.112,2962,2.237,2963,2.237,2964,2.237,2965,2.099,2966,1.996,2967,2.237,2968,2.237,2969,2.237,2970,2.099]],["t/1412",[51,0.876,104,1.39,148,2.652,381,5.266,382,3.83,467,2.852,827,3.469,912,3.469,2726,6.703,2871,5.147,2943,5.894,2947,5.266,2949,6.112,2950,6.374,2951,5.894,2952,5.706,2953,6.112,2954,6.703,2971,7.143,2972,7.811]],["t/1414",[51,0.896,357,5.313,1499,5.232,2176,6.699,2937,6.919,2971,8.386]],["t/1416",[50,1.586,51,0.875,64,2.352,757,4.097,1119,6.782,1120,7.073,2946,7.438]],["t/1418",[3,1.917,20,0.987,35,0.911,50,0.712,51,0.469,55,2.842,88,1.504,95,2.177,100,2.469,104,1.068,147,3.203,148,1.321,179,2.29,181,3.425,185,2.715,220,3.761,224,4.26,225,2.538,239,2.619,256,4.317,309,2.098,317,3.806,380,1.928,387,2.943,442,2.29,506,3.339,521,2.761,559,1.392,565,3.08,607,2.127,622,2.742,699,2.22,808,2.071,809,1.887,883,2.761,912,1.728,929,3.044,931,3.175,951,2.842,969,2.842,984,4.634,996,2.935,1072,3.044,1185,3.175,1198,2.254,1238,2.254,1348,2.842,1399,3.558,1692,2.842,1776,2.509,1916,3.044,2215,2.761,2492,2.842,2511,7.68,2521,3.558,2708,3.558,2711,3.558,2714,3.558,2728,3.339,2881,3.044,2973,3.89,2974,7.331,2975,3.89,2976,3.89,2977,3.89,2978,3.89,2979,3.89,2980,3.89,2981,3.339,2982,3.89,2983,3.89,2984,3.89,2985,3.89,2986,3.89,2987,3.558,2988,3.89,2989,3.89,2990,3.89,2991,3.89,2992,3.89,2993,3.339,2994,3.339]],["t/1420",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1422",[3,1.859,20,2.34,23,2.242,35,1.664,48,2.414,50,1.3,51,0.915,59,1.159,64,1.929,66,2.671,73,1.821,104,1.642,356,3.31,397,4.056,559,2.543,704,3.563,705,3.485,707,3.369,708,2.924,2995,7.109,2996,7.109,2997,7.109,2998,6.1]],["t/1424",[3,1.787,33,1.367,35,2.105,51,0.913,59,1.326,80,1.705,81,1.552,93,2.978,95,1.675,104,1.447,106,2.585,107,2.728,108,2.872,109,2.109,110,1.653,111,1.722,112,1.344,130,2.81,147,3.29,148,1.568,185,1.71,214,4.722,224,3.277,225,3.113,256,3.957,565,3.506,682,2.812,823,1.686,912,2.051,1923,3.963,2511,7.338,2728,6.981,2994,5.864,2998,3.963,2999,6.249,3000,4.618]],["t/1426",[51,0.931,59,1.248,80,2.028,81,1.846,104,1.363,107,3.245,110,1.779,467,2.797,827,3.402,2994,6.573,2998,6.573,2999,7.005,3001,7.66,3002,7.005,3003,7.005]],["t/1428",[51,0.919,256,3.945,912,3.98,2176,6.547,2511,7.314,3002,8.196,3004,8.962]],["t/1430",[3,2.768,20,2.247,167,3.108,346,3.088,484,4.345,686,8.857,717,5.951]],["t/1432",[3,2.172,37,1.932,51,0.794,72,1.37,104,1.477,105,3.56,110,1.526,703,3.688,1387,5.356,2701,6.776,2930,6.497,3005,8.303,3006,7.125,3007,8.303]],["t/1434",[3,1.154,20,1.675,23,1.392,37,1.254,50,1.208,51,0.919,59,1.077,64,1.197,66,1.912,73,1.13,80,1.384,81,1.26,104,0.785,110,1.214,112,1.284,131,2.348,132,1.959,159,1.351,167,1.547,175,1.996,177,3.302,216,1.375,223,3.048,231,2.054,239,2.882,253,2.187,254,3.223,346,2.301,356,2.054,435,2.672,469,1.908,483,3.769,537,4.687,559,1.578,686,6.196,704,2.211,705,2.163,707,1.611,708,1.814,717,3.714,808,3.516,1387,4.261,1473,3.328,1475,3.328,1735,2.789,1741,4.034,1924,2.907,1982,3.786,2701,5.39,3006,5.668,3008,4.411,3009,4.034,3010,4.034,3011,4.034,3012,6.04,3013,4.034,3014,4.034,3015,4.411,3016,4.034]],["t/1436",[3,1.706,33,1.284,35,2.041,37,1.864,48,2.215,49,2.405,50,0.794,51,0.931,59,1.063,80,0.909,81,0.828,104,1.395,106,2.468,107,1.455,108,2.768,109,1.981,110,0.797,111,1.618,112,1.263,130,2.683,139,3.274,174,2.372,175,1.963,177,3.573,225,3.018,256,1.91,327,1.829,401,2.514,414,3.541,441,4.956,483,2.476,504,3.395,686,5.105,717,4.902,823,1.584,1463,3.541,2701,5.324,2943,3.274,3006,3.723,3009,3.968,3010,3.968,3011,7.169,3012,3.968,3017,3.723,3018,3.968,3019,4.339,3020,4.339,3021,3.968,3022,3.968,3023,4.339]],["t/1438",[51,0.867,104,1.509,106,3.208,112,2.469,177,2.975,467,3.097,504,6.637,827,3.767,3017,7.278,3018,7.756,3021,7.756,3022,7.756,3024,8.481]],["t/1440",[3,1.734,37,1.259,48,2.252,50,1.213,51,0.773,104,1.18,109,3.029,111,2.473,167,2.326,177,2.326,231,3.088,259,5.691,470,1.175,504,6.897,537,4.706,717,5.566,1225,5.004,1384,4.192,1387,4.278,1543,5.691,2690,6.065,2937,6.651,2943,5.004,2946,5.691,2947,4.471,2949,5.189,2965,5.691,3013,6.065,3014,6.065,3017,5.691,3025,6.065,3026,6.632,3027,6.632,3028,6.632,3029,6.632]],["t/1442",[3,2.371,20,2.299,50,1.658,225,3.138,760,6.432,919,6.264,920,5.096,2545,6.622,3030,8.29]],["t/1444",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1446",[3,2.219,20,2.151,23,1.976,35,1.466,40,2.477,48,2.127,50,1.552,51,0.902,64,1.699,66,2.456,73,1.605,104,1.509,132,2.782,356,2.917,397,3.574,484,3.071,559,2.241,699,3.574,704,3.14,705,3.071,707,3.098,708,2.576,3030,5.728,3031,6.264,3032,8.484,3033,8.484,3034,6.264,3035,5.728,3036,6.264,3037,6.264,3038,6.264,3039,5.728,3040,6.264]],["t/1448",[51,0.912,60,3.492,185,3.245,467,3.2,3041,8.764,3042,8.764,3043,8.764,3044,8.764,3045,8.764]],["t/1450",[3,1.984,33,2.246,51,0.895,104,1.879,130,3.12,166,6.081,583,4.822,639,8.797,823,2.77,919,6.647,920,5.408,3035,8.797,3039,8.797]],["t/1452",[104,1.776]],["t/1454",[3,2.172,20,2.106,60,3.309,192,5.356,356,3.866,398,4.116,622,3.792,699,4.738,751,5.15,766,3.985,886,7.125,1448,5.15,2518,6.497,3046,8.303,3047,7.125,3048,8.303,3049,8.303]],["t/1456",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1458",[3,1.444,20,1.972,23,1.741,35,1.292,48,1.874,50,1.01,51,0.927,59,1.267,60,3.098,64,1.498,66,2.251,73,1.414,80,1.629,81,1.483,104,1.383,110,1.429,111,2.059,148,2.64,159,2.382,336,4.653,337,3.62,356,2.57,397,3.15,559,1.975,704,2.767,705,2.707,707,2.839,708,2.27,2518,6.083,2697,4.505,3050,5.52,3051,5.52,3052,7.11,3053,5.52,3054,7.775,3055,5.52,3056,5.52]],["t/1460",[3,1.843,33,1.425,35,1.127,49,3.906,50,1.525,51,0.913,80,1.009,81,0.918,104,1.483,106,2.666,107,2.363,108,1.7,109,2.199,110,0.885,111,1.795,112,1.402,130,2.898,147,2.171,225,1.667,327,3.513,346,1.677,359,3.532,461,3.517,501,3.632,751,4.37,771,5.148,823,1.758,943,2.932,965,3.327,1350,5.751,1378,3.632,1482,4.455,1500,3.929,1616,4.403,2518,7.178,2697,8.324,2698,6.444,2850,3.416,3047,4.131,3057,4.814,3058,4.814,3059,4.814,3060,4.814,3061,4.403,3062,4.814,3063,4.814,3064,4.814]],["t/1462",[51,0.838,104,1.613,106,3.429,112,2.639,183,3.138,467,3.31,827,4.026,2697,7.398]],["t/1464",[3,2.043,20,1.981,40,3.089,64,2.119,66,2.261,88,3.02,145,4.457,185,3.628,355,4.526,505,5.266,622,3.567,936,6.374,1072,6.112,1288,4.844,1751,5.038,2082,5.147,2545,5.706,2880,6.112,3065,7.143,3066,7.143,3067,7.811,3068,7.143]],["t/1466",[72,1.311,105,4.173,175,4.404]],["t/1468",[3,1.341,20,1.87,23,1.617,40,2.027,50,1.349,51,0.887,59,0.836,64,1.391,66,2.135,73,1.313,80,1.074,81,0.978,110,0.942,150,3.018,159,1.571,312,2.387,356,2.387,378,4.011,387,2.513,456,5.086,467,2.693,559,1.834,704,2.57,705,2.513,707,1.872,708,2.108,764,4.399,912,3.837,920,2.882,1184,2.541,2140,8.591,2165,3.868,2545,3.745,3065,6.745,3068,4.688,3069,5.127,3070,5.127,3071,5.127,3072,5.127,3073,5.127,3074,5.127,3075,5.127,3076,5.127,3077,5.127,3078,5.127,3079,7.376,3080,7.376,3081,5.127,3082,5.127,3083,5.127,3084,5.127,3085,5.127]],["t/1470",[3,2.501,33,2.225,35,1.759,51,0.912,80,1.574,81,1.433,104,1.871,106,3.617,107,2.519,108,2.653,109,3.432,110,1.381,111,2.802,112,2.188,130,3.932,225,2.601,823,2.744]],["t/1472",[51,0.849,104,1.651,106,3.509,112,2.701,467,3.388,827,4.12]],["t/1474",[3,2.76,14,3.029,20,1.682,35,1.552,48,2.252,50,1.213,84,3.119,109,3.029,132,2.945,147,3.051,220,3.402,244,3.675,261,3.119,307,4.582,314,3.058,484,3.251,518,4.706,751,4.113,793,4.192,914,3.904,1225,5.004,1542,6.065,1751,4.278,2765,5.691,3086,9.649,3087,6.632,3088,6.632,3089,5.691,3090,7.564,3091,6.632,3092,6.632,3093,6.632]],["t/1476",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1478",[3,1.859,20,2.34,23,2.242,35,1.664,39,3.343,48,2.414,50,1.3,51,0.877,64,1.929,66,2.671,73,1.821,104,1.642,314,3.278,356,3.31,397,4.056,559,2.543,704,3.563,705,3.485,707,3.369,708,2.924,3090,7.917,3094,7.109,3095,7.109,3096,7.109]],["t/1480",[3,1.827,33,1.408,35,2.274,37,1.572,39,3.285,40,1.881,51,0.943,60,1.895,80,0.997,81,0.907,88,1.839,104,1.473,106,2.642,107,1.595,108,1.679,109,2.172,110,0.874,111,1.774,112,2.033,130,3.404,148,1.615,216,1.483,225,3.516,300,3.007,314,3.221,470,0.842,500,3.882,751,4.332,823,1.737,985,4.35,1162,3.882,1163,3.007,1721,4.35,1776,3.068,2138,3.287,2736,4.082,2864,5.465,3086,7.569,3090,4.082,3097,7.827,3098,4.756,3099,4.35]],["t/1482",[39,3.989,51,0.867,104,1.509,106,3.208,112,2.469,300,5.361,314,3.911,467,3.097,827,3.767,2138,5.86,2864,6.637,3099,7.756,3100,8.481]],["t/1484",[3,1.947,20,1.888,39,3.5,40,3.758,51,0.742,100,3.061,111,2.776,145,4.247,181,4.247,216,2.321,225,2.577,239,3.247,314,3.432,346,2.593,441,4.705,716,4.533,808,3.963,1173,3.649,1314,4.801,1476,6.807,1751,4.801,1769,4.705,1841,4.382,2772,6.807,3097,6.388,3101,7.443]],["t/1486",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1488",[3,1.518,20,2.042,21,3.376,23,1.831,48,1.971,50,1.691,51,0.847,64,1.575,66,2.331,73,1.487,100,2.387,104,1.433,111,2.164,132,2.578,249,3.312,356,2.702,397,3.312,519,2.877,559,2.077,704,2.909,705,2.846,707,2.12,708,2.387,738,3.051,832,5.308,848,4.01,919,4.01,980,3.535,1175,3.417,1473,4.379,1652,4.819,1728,4.379,1763,4.542,1793,4.119,1798,5.308,3102,4.24,3103,8.052,3104,8.052,3105,5.308,3106,5.804,3107,4.981,3108,5.308,3109,5.804]],["t/1490",[21,1.848,23,1.596,39,4.033,51,0.905,64,1.373,65,2.597,66,1.465,72,0.682,73,1.297,74,2.032,95,1.836,111,1.887,156,3.697,244,4.05,261,2.38,299,2.404,314,3.369,467,2.669,773,3.697,1074,3.412,1175,5.864,1262,5.963,1275,3.199,1277,5.718,1314,4.714,1652,4.374,1717,4.343,1728,3.819,1752,6.999,1763,3.96,2082,4.816,3102,3.697,3107,4.343,3108,4.628,3110,5.061,3111,5.061,3112,4.628,3113,5.061,3114,4.343,3115,5.061,3116,5.514,3117,5.061,3118,5.061,3119,5.061,3120,6.271,3121,5.061,3122,5.061,3123,5.061]],["t/1492",[23,2.489,51,0.923,64,2.14,65,3.504,66,2.284,72,1.062,73,2.021,74,3.168,299,3.748,1199,7.214,1201,7.214,1652,4.722,3102,5.763,3116,5.952,3124,6.438,3125,7.889]],["t/1494",[23,2.44,51,0.919,64,2.099,65,3.461,66,2.239,72,1.042,73,1.982,74,3.106,299,3.674,1205,7.073,1206,7.073,1652,4.63,1779,6.637,3102,5.651,3116,5.836,3124,6.312,3126,7.735,3127,7.735]],["t/1496",[23,2.489,51,0.923,64,2.14,65,3.504,66,2.284,72,1.062,73,2.021,74,3.168,299,3.748,1209,7.214,1210,7.214,1652,4.722,3102,5.763,3116,5.952,3124,6.438,3128,7.889]],["t/1498",[21,2.852,23,2.464,51,0.921,64,2.119,65,3.482,66,2.261,72,1.052,73,2.001,74,3.137,299,3.711,1214,7.143,1652,4.675,3102,5.706,3116,5.894,3124,6.374,3129,7.811,3130,7.811]],["t/1500",[21,2.362,23,2.041,50,1.183,51,0.938,64,1.755,65,3.081,66,1.873,67,3.489,72,0.871,73,1.657,74,2.598,108,2.284,112,1.883,156,4.726,189,3.85,256,2.847,299,3.073,812,3.691,1288,4.012,1564,5.279,1652,3.872,3102,4.726,3116,4.881,3131,6.469,3132,6.469,3133,6.469,3134,6.469,3135,6.469,3136,6.469,3137,8.67,3138,6.469]],["t/1502",[3,1.434,21,1.265,33,1.623,35,2.28,37,1.469,39,4.217,40,1.37,50,1.245,51,0.954,60,2.185,80,0.726,81,0.661,104,1.211,106,2.074,107,1.838,108,1.223,109,1.582,110,1.008,111,1.292,112,1.596,119,2.336,130,3.182,131,1.844,132,1.539,148,1.862,174,1.894,181,1.977,183,1.199,185,2.03,190,1.391,216,1.709,225,3.251,244,1.92,346,2.371,355,2.007,387,1.698,398,1.717,575,2.336,713,3.168,730,2.394,738,2.882,751,2.148,823,1.265,964,2.039,1162,2.827,1277,2.711,1314,4.389,1652,3.282,1728,4.137,1751,2.235,1763,2.711,1769,2.19,1776,2.235,1785,3.168,1787,3.168,1793,3.891,1794,2.973,3097,4.705,3105,3.168,3107,2.973,3120,4.705,3139,3.464,3140,3.464,3141,3.464,3142,3.168,3143,3.464]],["t/1504",[51,0.889,104,1.447,106,3.076,112,2.925,183,2.815,387,3.987,467,2.97,738,4.275,827,3.612,1652,4.868,1728,6.136,1763,6.363,1793,5.771,3120,6.979,3142,7.437]],["t/1506",[3,2.371,73,2.323,148,3.078,185,3.357,216,2.826,760,6.432,986,6.622,1137,7.398,3144,9.065]],["t/1508",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1510",[23,2.37,51,0.927,59,1.225,64,2.039,65,3.398,66,2.175,72,1.012,73,1.925,74,3.018,80,1.574,81,1.433,110,1.381,159,2.302,353,4.498,453,5.88,456,4.424,469,3.249,1729,5.066,3145,7.514,3146,7.514]],["t/1512",[3,1.201,12,1.974,13,5.502,14,1.27,33,0.824,35,2.549,37,1.939,51,0.942,53,1.758,94,2.387,104,1.043,106,1.737,107,2.282,108,0.982,109,1.27,112,0.81,130,1.888,174,1.521,183,2.03,190,1.117,225,3.803,274,4.432,325,2.032,346,3.794,387,2.251,461,2.032,551,2.387,565,1.427,598,2.27,708,1.144,823,1.016,912,1.235,913,2.27,943,2.796,1499,3.345,1691,2.099,1776,1.794,2552,2.544,2553,5.553,2554,1.974,2653,2.544,2654,2.544,3147,4.199,3148,4.199,3149,2.544,3150,4.199,3151,4.199,3152,4.591,3153,4.591,3154,4.591,3155,4.591,3156,4.591,3157,5.361,3158,2.782,3159,2.782,3160,2.544,3161,2.544,3162,2.544,3163,2.544,3164,2.544,3165,2.544,3166,2.544,3167,2.544,3168,2.544]],["t/1514",[51,0.737,104,1.312,174,4.031,274,5.164,387,3.615,467,2.693,598,6.018,827,3.275,912,3.275,943,5.753,2582,6.743,3147,6.743,3148,6.743,3149,6.743,3150,6.743,3151,6.743,3157,6.743,3160,6.743,3161,6.743,3162,6.743,3163,6.743,3164,6.743,3165,6.743,3166,6.743,3167,6.743,3168,6.743]],["t/1516",[3,1.81,20,1.755,51,0.708,147,2.133,148,2.35,177,2.428,180,3.733,317,3.594,417,3.51,470,1.226,515,5.223,565,3.551,607,3.784,622,3.161,914,4.075,943,4.216,1133,3.892,1177,5.223,1412,5.94,1472,5.649,2736,5.94,2880,7.095,3169,7.781,3170,6.922,3171,6.922,3172,6.33,3173,5.94,3174,6.922,3175,6.922,3176,6.922,3177,6.922,3178,5.649,3179,6.922]],["t/1518",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1520",[3,2.149,20,2.564,23,2.592,50,1.503,51,0.789,64,2.229,66,2.927,73,2.105,356,3.826,559,2.94,704,4.119,705,4.029,707,3.001,708,3.379,3180,8.217]],["t/1522",[3181,9.98]],["t/1524",[51,0.926,243,7.175,2863,6.507,3182,9.17,3183,8.386]],["t/1526",[3,1.871,33,1.108,35,2.264,37,1.106,51,0.932,59,0.61,60,2.322,80,0.784,81,0.714,95,1.358,104,1.273,106,2.204,107,1.255,108,2.85,109,2.661,110,0.688,111,1.396,112,1.09,121,3.84,130,2.942,147,1.153,148,2.97,167,1.313,177,3.068,185,1.386,224,2.656,225,3.348,227,1.565,243,5.598,254,2.734,256,1.647,274,2.046,359,1.876,393,1.539,694,2.824,757,2.46,777,1.993,793,3.683,823,1.367,849,2.524,898,6.139,980,2.28,1105,2.656,1227,2.414,1387,2.414,1499,2.136,1599,3.055,1622,2.929,2863,2.656,2882,2.929,2930,2.929,3169,7.95,3184,5.328,3185,5.328,3186,3.423,3187,3.212,3188,5.328,3189,3.743,3190,5.826]],["t/1528",[3,1.283,27,3.959,37,0.931,50,0.897,51,0.928,59,0.799,80,1.028,81,0.935,95,1.779,104,0.873,106,1.855,107,1.644,109,2.24,110,1.548,112,2.694,147,1.511,177,1.72,185,1.816,216,2.227,224,3.48,243,3.837,256,3.144,361,3.48,386,5.829,467,1.791,757,1.687,827,3.741,885,5.589,898,4.208,1105,3.48,1499,2.798,1685,5.589,1692,3.583,2165,5.389,2863,3.48,3003,4.485,3169,4.208,3184,4.485,3185,4.485,3186,6.532,3187,4.208,3188,4.485,3191,4.904,3192,8.424,3193,8.424,3194,4.904,3195,4.485,3196,4.485,3197,4.904]],["t/1530",[3,2.427,83,5.462,132,4.12,177,3.815,358,7,712,5.754]],["t/1532",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1534",[0,4.862,3,1.008,20,0.977,23,1.215,37,0.731,51,0.932,59,0.971,64,1.045,65,2.118,66,1.115,72,0.802,73,0.987,74,1.547,80,0.807,81,1.137,83,3.508,107,1.292,110,1.339,111,1.437,112,1.122,130,2.45,159,1.18,177,3.109,180,3.929,183,1.334,194,2,220,1.976,248,1.559,312,1.794,353,2.306,359,1.931,363,5.497,364,2.907,456,4.289,467,1.407,469,1.666,470,1.055,484,1.889,583,1.931,699,2.198,717,3.35,766,1.849,912,1.711,1151,2.166,1729,4.912,2122,2.907,2852,2.907,2947,2.597,3198,3.306,3199,3.306,3200,3.306,3201,3.306,3202,5.449,3203,5.449,3204,5.449,3205,3.523,3206,3.306,3207,3.306,3208,5.113,3209,3.306,3210,3.306,3211,3.306,3212,5.449,3213,3.523,3214,3.523,3215,3.523,3216,3.306,3217,5.958,3218,3.523,3219,3.306,3220,3.853,3221,3.523,3222,3.853,3223,3.853,3224,3.853]],["t/1536",[23,1.009,37,0.977,50,0.585,51,0.95,59,1.205,64,0.868,65,1.828,66,0.926,67,1.725,72,0.869,73,0.819,74,1.284,80,1.352,81,1.546,83,5.75,104,0.569,106,1.21,107,1.725,108,1.129,110,1.672,111,1.918,112,0.931,159,0.98,177,1.122,183,1.781,191,1.681,231,2.395,329,2.61,353,1.914,359,1.603,378,2.502,453,2.502,456,3.799,464,2.744,467,1.168,665,1.883,697,1.681,699,3.682,717,2.892,912,1.42,1345,2.925,1376,2.502,1482,2.022,1729,2.156,2724,2.744,2852,2.413,2947,2.156,3198,2.744,3199,2.744,3200,2.744,3201,2.744,3202,5.901,3203,5.901,3204,5.901,3205,2.925,3206,2.744,3207,2.744,3208,4.414,3209,2.744,3210,2.744,3211,2.744,3212,2.925,3213,2.925,3214,2.925,3215,2.925,3216,4.414,3218,4.704,3219,4.414,3225,5.144,3226,3.198,3227,5.144,3228,3.198,3229,3.198,3230,3.198,3231,3.198,3232,2.925,3233,3.198,3234,3.198,3235,3.198,3236,3.198,3237,3.198,3238,3.198,3239,3.198]],["t/1538",[23,1.415,37,0.852,51,0.955,59,1.304,64,1.217,65,2.377,66,1.299,72,0.604,73,1.149,74,1.802,80,1.676,81,1.526,83,5.219,107,1.504,110,1.629,111,1.673,112,1.306,148,1.523,159,1.374,177,2.805,183,1.553,353,2.685,359,2.249,405,3.184,406,3.511,453,3.511,456,3.938,464,3.85,537,4.747,565,2.302,697,2.358,699,3.817,912,1.993,1729,3.025,2176,3.278,3198,3.85,3199,3.85,3200,3.85,3201,3.85,3206,3.85,3207,3.85,3208,5.74,3209,3.85,3210,3.85,3211,3.85,3216,3.85,3219,3.85,3240,6.689,3241,6.689,3242,4.487,3243,4.487,3244,4.487]],["t/1540",[3,1.588,33,1.169,35,2.216,37,1.702,48,1.341,50,1.354,51,0.935,53,3.839,59,0.99,104,1.317,105,1.693,106,2.297,107,2.036,108,2.933,109,1.803,112,1.768,130,3.687,147,1.217,148,1.341,177,3.32,225,3.277,238,3.635,346,2.578,357,3.518,359,4.164,361,4.309,362,2.802,379,4.956,380,3.01,381,4.094,382,1.936,392,2.802,393,1.624,401,2.288,402,3.389,403,3.611,404,5.211,405,2.802,406,3.09,597,3.09,708,1.624,823,1.442,2947,4.094,2956,3.389,2957,3.389,2958,3.611,2959,3.611,2960,3.389,3245,3.949,3246,3.949]],["t/1542",[51,0.934,59,1.614,80,1.847,81,1.681,104,1.18,110,1.82,148,2.252,177,2.326,180,3.577,189,3.915,286,4.278,357,3.842,379,5.412,381,4.471,382,3.251,392,4.706,404,5.691,406,5.189,467,2.422,827,2.945,2947,4.471,3247,6.632,3248,6.632,3249,6.632,3250,6.632]],["t/1544",[3,2.506,20,1.576,35,1.975,44,3.968,50,1.753,64,1.686,100,2.556,129,2.711,147,1.915,180,4.551,213,4.009,256,2.735,300,3.929,312,2.894,317,3.227,356,2.894,455,3.601,470,1.101,484,4.137,563,3.494,665,3.659,699,3.546,757,2.137,760,4.41,779,2.421,793,3.929,887,3.854,931,5.072,953,5.988,1074,4.19,1153,3.929,1448,3.854,1548,4.41,2758,5.333,2881,4.863,3251,6.215,3252,6.215,3253,5.683,3254,6.215,3255,6.215]],["t/1546",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1548",[3,1.454,20,1.981,23,1.754,35,1.301,37,1.055,48,1.888,50,1.017,51,0.928,59,0.906,64,1.508,66,2.262,73,1.424,80,1.893,81,1.723,104,1.39,106,2.103,107,1.864,110,1.66,222,3.945,230,2.696,356,2.588,382,2.726,397,3.172,559,1.989,704,2.787,705,2.726,707,2.853,708,2.286,757,1.912,1008,3.273,1105,3.945,1222,4.061,2138,3.841,2703,4.061,2871,3.663,3256,5.559,3257,5.559,3258,4.771,3259,5.559,3260,4.771,3261,5.559,3262,5.559]],["t/1550",[50,1.128,51,0.883,56,4.063,147,2.586,181,3.518,213,3.977,230,2.991,249,3.518,382,4.115,470,1.092,509,4.063,512,7.676,769,3.467,771,4.505,841,5.032,887,3.824,895,6.333,1071,4.505,1105,4.375,1222,4.505,1607,7.676,2138,4.261,3258,5.291,3263,5.291,3264,8.727,3265,6.166,3266,5.291,3267,6.166,3268,6.166,3269,6.166,3270,7.676,3271,8.394,3272,8.394,3273,6.166]],["t/1552",[3,1.898,33,0.917,35,2.323,37,0.952,48,1.702,49,1.717,50,1.155,51,0.951,53,1.958,59,0.505,60,1.234,80,1.323,81,1.205,104,1.124,105,1.328,106,1.896,107,2.118,108,1.094,109,1.415,110,1.161,111,2.355,112,0.902,121,2.041,128,2.485,129,1.351,130,2.062,147,2.236,175,1.401,177,1.086,183,1.736,190,1.244,216,1.563,220,1.589,225,1.072,227,1.295,253,1.536,254,2.263,259,4.302,364,3.783,382,2.458,393,2.985,417,1.571,442,1.824,470,0.549,484,1.519,565,1.589,575,2.089,757,1.724,766,1.487,784,1.742,793,3.169,823,1.831,850,1.854,912,1.376,942,2.337,953,4.481,964,1.824,1037,2.658,1788,2.198,2122,2.337,2138,3.464,2140,4.302,2370,2.833,2703,3.663,2856,3.923,2863,2.198,2871,3.304,2878,2.833,2881,2.424,2882,2.424,2930,2.424,3260,4.302,3263,2.658,3264,2.833,3266,4.302,3270,2.833,3274,3.098,3275,3.098,3276,2.833,3277,2.833,3278,2.833,3279,3.098,3280,3.098]],["t/1554",[37,1.35,51,0.915,59,1.159,80,1.933,81,1.76,104,1.265,110,1.696,183,3.194,382,3.485,467,2.596,827,3.157,912,3.157,942,5.364,2138,4.912,2703,5.193,2863,5.044,2871,4.685,3260,6.1,3266,6.1,3276,6.501,3277,6.501,3278,6.501,3281,7.109]],["t/1556",[50,1.586,51,0.875,64,2.352,757,4.097,1119,6.782,1120,7.073,3258,7.438]],["t/1558",[3,2.427,20,2.353,185,3.436,261,4.363,307,6.411,2122,7,3282,9.278]],["t/1560",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1562",[3,1.32,12,2.216,20,1.28,23,0.985,35,1.181,37,0.593,39,3.429,48,2.476,50,0.571,51,0.932,59,0.509,64,0.847,66,1.461,73,0.8,80,0.654,81,0.962,95,2.303,104,1.13,110,0.574,111,1.164,112,0.909,147,0.962,189,2.82,190,1.254,192,2.014,193,3.297,225,1.081,248,1.264,256,1.374,261,3.429,271,0.997,309,1.684,312,1.454,327,1.316,356,1.454,397,1.781,491,2.105,505,4.916,519,2.501,521,2.216,559,1.117,589,1.602,625,2.855,634,2.057,704,1.565,705,1.531,707,1.843,708,1.284,766,1.499,809,1.514,923,2.548,1020,2.014,1288,3.129,1299,3.686,1322,3.486,1380,2.679,1497,2.679,1619,2.855,1692,2.281,1738,2.548,1984,2.855,2678,2.548,2704,2.356,2753,2.679,3178,2.548,3283,2.855,3284,2.281,3285,3.122,3286,2.855,3287,3.122,3288,9.01,3289,2.855,3290,4.118,3291,2.855,3292,4.33,3293,3.122,3294,3.122,3295,5.449,3296,5.449,3297,3.122,3298,2.855,3299,2.855,3300,2.679,3301,3.122,3302,3.122,3303,3.122,3304,3.122,3305,3.122,3306,2.855,3307,3.122,3308,3.122,3309,3.122,3310,2.855,3311,2.855,3312,2.855,3313,3.122,3314,3.122,3315,3.122,3316,2.855,3317,3.122,3318,3.122,3319,2.679]],["t/1564",[3,1.359,33,1.538,35,2.296,37,1.736,48,1.099,51,0.936,59,0.528,80,1.088,81,1.241,95,1.174,104,1.158,106,1.965,107,2.497,108,1.834,109,1.478,110,0.595,111,1.207,112,1.512,130,3.353,147,0.998,151,1.605,183,1.121,190,1.3,193,1.681,220,1.661,225,3.165,227,1.353,253,1.605,256,1.425,261,3.834,271,1.033,327,1.365,416,1.906,417,2.634,429,1.321,505,3.502,583,1.623,688,2.088,823,1.182,887,2.008,1156,2.443,1177,2.443,1299,5.44,1322,3.589,1380,4.458,1381,2.642,1543,2.778,1692,3.795,2124,2.778,2377,2.365,2640,2.443,2678,2.642,3290,2.642,3295,4.458,3296,4.458,3299,2.96,3300,2.778,3306,2.96,3310,2.96,3311,2.96,3312,2.96,3316,2.96,3319,4.458,3320,3.237,3321,5.195,3322,2.237,3323,3.237,3324,3.237,3325,2.96,3326,3.237,3327,3.237,3328,4.751,3329,2.96,3330,3.237,3331,2.96,3332,3.237,3333,3.237,3334,3.237,3335,3.237,3336,3.237,3337,3.237]],["t/1566",[51,0.821,95,2.725,104,1.337,106,2.842,111,2.802,112,2.783,193,3.901,417,3.81,467,2.744,505,5.066,688,4.847,827,3.337,1299,5.489,1692,5.489,2124,6.448,2377,5.489,3290,6.132,3295,6.448,3296,6.448,3319,6.448,3322,5.192,3325,6.872,3328,6.872,3331,6.872]],["t/1568",[40,1.324,50,0.612,51,0.972,59,0.545,60,2.651,61,3.097,95,1.214,147,2.855,148,2.577,150,3.916,151,1.659,186,2.731,193,2.77,248,1.355,249,1.91,307,2.313,314,1.543,331,2.872,401,3.091,417,1.697,589,1.717,607,1.829,688,2.159,717,2.999,722,2.525,779,1.304,817,1.659,920,1.882,2176,2.445,2662,3.061,2678,2.731,2704,4.025,3292,2.872,3322,2.313,3338,3.347,3339,3.347,3340,3.347,3341,3.347,3342,3.347,3343,5.335,3344,3.347,3345,3.347,3346,3.347,3347,3.347,3348,3.347,3349,3.347,3350,3.347,3351,3.347,3352,6.652,3353,4.879,3354,3.347,3355,3.347,3356,3.347,3357,3.347,3358,3.347,3359,3.347,3360,3.347,3361,3.347,3362,3.347,3363,3.347,3364,3.347,3365,3.347,3366,3.347,3367,3.347,3368,3.347,3369,3.347,3370,3.347,3371,3.347,3372,3.347,3373,3.347,3374,3.347,3375,3.347,3376,3.347,3377,3.347,3378,3.347,3379,3.347,3380,3.347,3381,3.347,3382,3.347,3383,3.347,3384,3.347,3385,3.347,3386,3.347]],["t/1570",[3,2.172,20,2.106,180,4.478,192,5.356,193,4.311,588,6.497,622,3.792,877,6.265,965,5.737,1538,5.356,1700,7.593,1841,4.888,3387,10.063,3388,7.125,3389,8.303]],["t/1572",[72,1.311,105,4.173,175,4.404]],["t/1574",[3,2.319,20,1.934,23,1.694,35,1.257,48,1.824,50,0.982,51,0.884,64,1.457,66,2.207,73,1.376,104,1.357,110,0.987,149,3.539,180,2.896,192,3.464,244,2.976,356,2.501,397,3.064,456,3.161,463,3.923,559,1.921,562,3.621,665,3.161,704,2.692,705,2.633,707,2.784,708,2.209,1191,3.112,1499,3.064,1600,6.543,1730,5.268,3292,4.609,3388,8.281,3390,5.37,3391,7.625,3392,5.37,3393,7.625,3394,5.37,3395,5.37,3396,5.37,3397,5.37,3398,5.37,3399,4.911,3400,5.37,3401,5.37,3402,5.37,3403,5.37,3404,5.37]],["t/1576",[3,1.632,20,1.038,33,1.211,35,2.338,37,1.73,40,3.346,48,1.389,50,1.142,51,0.945,80,0.857,81,0.781,104,1.346,106,2.361,107,2.092,108,1.445,109,1.869,110,0.752,111,1.526,112,1.191,130,2.566,180,2.207,183,1.416,194,2.125,214,2.827,225,3.457,227,1.71,314,2.877,461,2.989,583,3.128,649,3.202,738,2.151,772,2.696,823,1.494,855,2.538,964,2.409,1143,2.099,1191,3.616,1195,3.087,1238,2.371,1480,2.989,1650,5.355,1730,2.827,2545,2.989,3387,5.707,3388,3.511,3405,5.707,3406,4.092,3407,3.742,3408,4.092,3409,3.742,3410,5.707,3411,4.092,3412,4.092,3413,5.707,3414,4.092,3415,4.092]],["t/1578",[51,0.821,104,1.337,106,2.842,112,2.188,183,2.601,467,2.744,738,3.95,827,3.337,1191,4.354,3405,6.872,3407,6.872,3409,6.872,3410,6.872,3413,6.872,3416,9.561,3417,9.561,3418,9.561,3419,9.561,3420,9.561,3421,7.514]],["t/1580",[3,1.965,20,1.906,40,2.972,64,2.039,66,2.175,88,2.905,145,4.287,185,3.54,256,3.307,505,5.066,622,3.432,667,6.132,936,6.132,1072,5.88,1288,4.66,1317,5.489,1751,4.847,2082,4.952,2880,5.88,3066,6.872,3422,9.561,3423,7.514,3424,7.514,3425,6.872,3426,6.448]],["t/1582",[72,1.311,105,4.173,175,4.404]],["t/1584",[3,1.613,20,2.129,23,1.945,35,1.965,40,2.438,48,2.094,50,1.128,51,0.863,64,1.673,66,2.43,73,1.58,104,1.493,309,3.326,314,3.87,356,2.871,397,3.518,470,1.092,559,2.206,665,5.618,697,3.241,704,3.091,705,3.023,707,3.065,708,2.536,730,4.261,1133,3.467,1241,3.755,1769,6.032,1859,5.639,3426,5.291,3427,6.166,3428,6.166,3429,6.166,3430,6.166,3431,6.166]],["t/1586",[3,2.184,20,1.552,33,1.811,35,1.955,37,1.162,51,0.936,80,1.282,81,1.167,104,1.691,106,3.158,107,2.051,108,2.16,109,2.794,110,1.125,111,2.282,112,1.781,130,3.909,220,3.139,225,2.89,314,2.821,470,1.084,484,3,730,4.228,823,2.234,1330,3.795,1480,4.47,1769,6.008,3426,5.251,3432,6.118,3433,6.118]],["t/1588",[51,0.849,104,1.651,106,3.509,112,2.701,467,3.388,827,4.12]],["t/1590",[3,2.398,20,2.326,147,2.826,565,4.704,622,4.188,1133,5.155,2492,7.891]],["t/1592",[37,1.849,51,0.76,55,2.531,59,1.261,60,3.743,72,1.312,81,1.476,104,0.616,105,3.317,147,2.894,185,3.803,190,1.391,222,2.458,226,3.177,227,1.448,317,4.877,435,1.169,536,2.531,559,1.239,622,1.582,712,3.4,769,6.228,896,4.29,914,5.278,962,2.711,1037,2.973,1057,6.88,1133,1.948,1788,2.458,1887,4.705,2137,5.014,2139,2.336,2554,2.458,2754,5.84,3434,3.464,3435,3.464,3436,8.431,3437,3.464,3438,8.589,3439,3.464,3440,3.464,3441,3.464,3442,3.464,3443,3.464,3444,2.973,3445,3.464,3446,3.464,3447,3.464,3448,3.464,3449,3.464,3450,2.973,3451,2.973,3452,3.464]],["t/1594",[3,0.584,20,0.968,23,0.704,37,0.724,48,1.697,50,1.416,51,0.945,55,1.631,59,1.18,60,2.357,64,0.606,66,1.105,73,0.572,80,1.517,81,1.381,88,0.863,110,1.622,111,2.478,112,2.57,147,1.822,148,2.008,185,1.851,189,4.147,191,1.173,220,1.958,222,4.197,226,1.293,230,1.083,239,2.58,250,1.542,253,1.106,314,2.727,317,1.981,356,1.039,384,1.584,397,1.273,417,1.132,559,1.365,622,3.534,688,1.44,699,1.273,704,1.119,705,1.094,707,0.815,708,0.918,855,1.384,867,1.821,896,1.746,937,2.041,942,2.879,964,1.314,1067,1.915,1068,1.584,1151,1.255,1173,1.094,1411,5.075,1419,2.041,1473,1.684,1475,1.684,1714,1.915,1729,1.505,1795,1.821,1974,1.915,2139,1.505,2492,3.651,2498,1.821,2554,1.584,2703,1.631,2704,1.684,2754,4.289,3438,2.041,3450,1.915,3451,1.915,3453,2.232,3454,3.816,3455,2.232,3456,2.232,3457,2.232,3458,2.232,3459,3.816,3460,3.816,3461,3.816,3462,3.816,3463,2.232,3464,2.232,3465,2.232,3466,2.232,3467,2.232,3468,2.232,3469,6.645,3470,4.998,3471,2.232,3472,2.232,3473,2.232,3474,2.232,3475,2.041,3476,2.232,3477,3.816,3478,4.998,3479,4.998,3480,4.998,3481,1.915,3482,2.232,3483,2.041,3484,2.232,3485,2.232]],["t/1596",[3,1.41,33,1.004,35,1.789,37,0.644,48,1.151,50,1.227,51,0.936,60,2.148,80,0.71,81,0.647,104,1.484,105,2.311,106,2.039,107,1.137,108,1.197,109,1.548,110,0.623,111,1.264,112,1.953,130,2.759,131,1.805,147,2.067,148,1.83,174,1.853,185,1.996,190,2.164,216,1.057,225,2.646,226,4.429,227,1.417,253,1.68,317,5.018,442,1.996,470,0.6,484,1.662,565,2.765,622,3.491,694,5.062,717,1.906,784,3.03,823,1.238,849,2.286,912,1.506,953,2.406,964,1.996,968,2.558,980,2.065,984,2.143,987,2.286,996,2.558,1051,4.217,1089,3.634,1110,5.249,1318,2.909,1441,3.1,1795,4.398,1796,4.929,2492,2.477,2730,4.929,2755,4.929,2756,4.929,2757,3.1,2758,2.909,2759,3.1,2777,4.929,3450,2.909,3451,2.909,3481,4.625,3486,3.39,3487,3.39,3488,3.39,3489,3.39,3490,3.39]],["t/1598",[51,0.815,104,1.542,106,3.279,112,3.264,226,5.022,467,3.165,827,3.849,1795,7.073,3481,7.438,3491,8.667]],["t/1600",[3,2.292,20,2.222,145,5,217,8.581,381,5.908,1445,6.857,1456,7.52,1776,5.653,1893,6.612,3492,7.52,3493,7.52]],["t/1602",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1604",[3,2.385,20,2.313,23,2.203,35,1.635,50,1.277,51,0.894,59,1.486,64,1.895,66,2.64,73,1.789,80,1.463,81,1.332,104,1.243,159,2.139,356,3.251,559,2.499,704,3.5,705,3.424,707,3.33,708,2.872,3492,5.993,3494,6.386,3495,6.386,3496,6.386,3497,6.983]],["t/1606",[3,2.117,33,1.731,35,2.173,51,0.929,80,1.696,81,1.544,104,1.651,106,3.061,107,2.713,108,2.857,109,2.67,110,1.075,111,2.18,112,1.702,129,2.551,130,3.817,145,4.618,181,3.336,183,2.024,225,3.213,823,2.135,1893,6.106,1916,6.332,3498,7.401,3499,7.401,3500,5.347,3501,4.772]],["t/1608",[51,0.826,104,1.577,106,3.352,112,2.58,183,3.068,467,3.236,827,3.936,3498,8.104,3499,8.104,3500,8.104]],["t/1610",[3,2.546,20,2.469,2139,6.563]],["t/1612",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1614",[23,1.93,51,0.943,59,1.361,64,1.66,65,2.967,66,1.771,72,0.824,73,1.568,74,2.457,80,1.749,81,1.593,110,1.535,166,3.868,175,2.768,336,3.662,337,2.849,353,3.662,456,4.915,469,2.646,1697,4.788,1749,4.993,2270,5.251,2856,4.788,3502,6.118,3503,6.118,3504,7.165,3505,5.595,3506,7.165,3507,5.595,3508,5.595,3509,5.595]],["t/1616",[3,1.956,33,1.548,35,1.751,40,2.068,51,0.932,53,3.305,104,1.554,106,1.978,107,1.753,108,1.846,109,2.388,112,1.522,130,3.592,146,3.613,166,3.305,174,2.858,175,2.365,180,2.82,190,2.1,193,2.715,194,2.715,225,2.589,231,2.434,314,2.411,346,1.822,378,4.091,470,0.926,518,3.71,738,2.748,823,1.909,912,3.322,929,4.091,1020,3.372,1583,4.781,1697,6.834,2139,5.043,2273,4.091,2856,4.091,3504,4.487,3510,4.781,3511,4.091,3512,5.228,3513,5.228,3514,5.228,3515,5.228,3516,4.781,3517,5.228,3518,5.228]],["t/1618",[51,0.849,104,1.651,467,3.388,827,4.12,2856,7.26,3516,8.484]],["t/1620",[3,2.455,20,2.381,60,3.741,309,5.063,3519,8.056,3520,9.388]],["t/1622",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1624",[3,1.734,20,2.235,23,2.092,35,1.552,37,1.259,48,2.993,49,3.675,50,1.213,51,0.9,64,1.799,66,2.552,72,0.893,73,1.699,104,1.568,110,1.219,148,2.993,356,3.088,397,3.784,559,2.373,634,4.37,704,3.324,705,3.251,707,3.219,708,2.727,1499,3.784,1752,5.412,3291,6.065,3521,6.632,3522,6.632]],["t/1626",[3,1.911,33,1.498,35,2.199,37,1.387,49,4.753,50,0.926,51,0.933,72,0.682,80,1.06,81,0.965,104,1.526,106,2.764,107,1.697,108,2.58,109,2.311,110,0.93,111,1.887,112,1.473,129,2.208,130,3.863,147,2.894,148,2.912,177,2.563,225,3.251,392,5.185,393,2.081,414,5.963,634,5.652,688,3.264,823,1.848,1151,2.845,1499,2.888,2849,4.343,2953,3.96,3519,4.343,3523,5.061]],["t/1628",[35,1.695,49,5.727,50,1.708,51,0.729,104,1.661,106,2.738,112,2.107,147,2.231,148,2.458,346,2.522,392,5.137,467,2.644,622,3.306,827,3.215,850,4.333,857,5.664,1472,5.907,2545,5.288,2927,6.212,2953,5.664,3187,6.212,3519,6.212,3524,7.239,3525,7.239,3526,6.212,3527,7.239]],["t/1630",[3,2.195,34,5.204,40,3.318,132,3.727,314,3.869,435,2.831,712,5.204,766,4.028,836,5.955,1137,6.848,1697,6.566,2663,6.848,3510,9.366,3528,8.391,3529,8.391]],["t/1632",[72,1.295,104,1.711,105,4.123,703,4.271]],["t/1634",[23,1.96,51,0.945,59,1.375,64,1.686,65,2.999,66,1.799,72,0.837,73,1.592,74,2.496,80,1.768,81,1.61,110,1.551,166,3.929,175,2.811,336,3.72,337,2.894,353,3.72,456,4.968,469,2.687,1697,4.863,1749,5.072,3504,7.241,3505,5.683,3506,7.241,3507,5.683,3508,5.683,3509,5.683,3530,6.215,3531,6.215]],["t/1636",[3,2.787,20,1.962,35,1.811,44,4.579,50,1.415,64,2.099,100,3.181,129,3.374,213,4.989,256,3.404,312,3.601,470,1.37,484,3.792,757,2.66,760,5.488,793,4.889,1074,5.215,1153,4.889,1448,4.797,1548,5.488,2961,5.836]],["t/1638",[21,1.848,33,1.498,37,1.891,59,1.623,72,1.576,81,0.965,104,0.9,107,1.697,129,4.097,177,1.775,346,1.763,393,4.096,634,3.335,703,2.248,745,6.339,770,2.805,774,2.805,775,2.805,778,2.845,779,1.971,953,3.591,1448,3.139,1680,4.343,1841,2.979,2961,8.55,3532,5.061,3533,5.061,3534,4.628,3535,5.061,3536,4.628,3537,5.061]],["t/1640",[3,1.141,20,1.661,23,1.376,35,1.021,50,0.798,51,0.961,59,0.711,64,1.184,66,1.896,73,1.118,80,0.914,81,0.832,104,0.776,110,0.802,112,2.29,159,1.337,167,2.297,177,2.759,189,4.37,216,2.042,231,2.031,346,1.52,356,2.031,382,2.139,393,2.694,432,2.418,491,2.941,559,1.561,704,2.187,705,2.139,707,2.392,708,1.794,757,1.5,776,2.706,876,3.99,1151,2.453,1448,2.706,1564,6.419,2961,7.07,3534,3.99,3538,4.363,3539,4.363,3540,4.363,3541,4.363,3542,4.363,3543,4.363,3544,4.363,3545,4.363,3546,4.363,3547,4.363,3548,4.363,3549,4.363,3550,4.363]],["t/1642",[3,0.836,33,0.947,35,2.347,37,1.797,40,1.265,49,1.772,50,0.941,51,0.935,72,0.431,104,1.148,107,2.164,111,1.193,129,1.395,130,2.116,147,0.985,167,1.122,177,1.122,183,2.234,185,1.184,186,2.61,214,2.21,216,0.997,225,3.47,227,1.337,256,1.408,346,3.636,382,2.522,393,1.315,401,1.853,402,2.744,518,2.269,565,1.641,597,2.502,606,1.725,634,3.39,708,1.315,717,4.866,757,1.769,805,1.702,823,1.168,835,4.869,897,2.336,986,2.336,1001,2.61,1788,2.269,2554,2.269,2850,3.65,2871,3.39,2882,2.502,2915,2.502,2937,5.579,2947,4.351,2949,2.502,2950,2.61,2951,2.413,2952,2.336,2956,2.744,2957,2.744,2960,2.744,2961,6.531,2962,2.925,2963,2.925,2964,2.925,2965,2.744,2966,2.61,2967,2.925,2968,2.925,2969,2.925,3526,2.744,3551,2.925,3552,2.925,3553,2.925]],["t/1644",[51,0.859,104,1.477,382,4.071,467,3.032,717,4.668,827,3.688,835,6.265,2871,5.472,2947,5.598,2952,6.066,3526,7.125,3551,7.593,3552,7.593,3553,7.593,3554,8.303]],["t/1646",[51,0.924,148,2.88,150,4.993,717,4.768,835,8.38,2176,6.196,3555,8.481,3556,8.481,3557,8.481]],["t/1648",[50,1.838,51,0.889,64,2.206,312,3.787,393,4.132,470,1.44,757,4.024,1119,6.363,1120,6.637,3558,8.133]],["t/1650",[3,2.398,20,2.326,88,3.546,109,4.933,111,3.42,2775,7.869,3559,9.17]],["t/1652",[72,1.235,80,1.921,81,1.749,105,4.631,107,3.075,1225,6.919,3560,8.386]],["t/1654",[3,1.454,20,1.981,23,1.754,50,1.017,51,0.921,59,1.273,64,1.508,65,1.976,66,2.262,72,1.052,73,2.002,74,2.233,81,1.723,95,2.834,107,1.864,109,2.539,110,1.66,142,5.399,145,3.172,147,2.784,156,4.061,159,1.703,248,2.25,299,2.641,356,2.588,470,0.985,485,4.194,559,1.989,572,5.084,704,2.787,705,2.726,707,2.03,708,2.286,2932,5.084,3284,4.061,3561,5.559,3562,5.559,3563,7.813,3564,5.559]],["t/1656",[3,1.434,20,1.39,50,1.003,59,1.261,88,2.12,105,3.317,110,1.422,128,2.717,145,3.128,151,2.717,175,2.48,185,2.03,186,4.474,187,2.717,216,2.412,222,5.49,226,5.951,238,4.631,253,2.717,329,4.474,380,4.444,381,5.216,429,3.156,435,1.85,483,3.128,509,5.098,654,3.89,769,4.349,824,3.339,1378,4.136,1707,4.704,1788,5.49,1841,3.227,2131,7.075,2775,4.704,2930,4.29,3493,6.639,3565,5.482,3566,5.482,3567,5.482,3568,5.482,3569,5.482,3570,5.013,3571,5.482,3572,5.013,3573,5.482,3574,4.704]],["t/1658",[59,1.669,72,1.379,105,4.935,226,5.934,227,4.282,3560,7.674,3575,10.242,3576,8.391]],["t/1660",[3,0.66,20,1.074,23,0.796,48,0.857,50,0.775,51,0.962,59,1.404,64,0.685,65,1.944,66,1.226,67,2.951,72,0.961,73,1.641,74,2.197,80,0.887,81,1.044,88,0.976,110,1.747,112,2.607,142,1.744,147,1.305,185,1.568,189,3.431,227,1.77,238,1.511,253,1.251,299,2.599,356,1.175,380,2.099,391,2.166,456,3.771,463,3.094,467,0.922,469,1.831,513,3.456,559,0.903,654,3.005,682,3.901,704,1.265,705,1.238,707,0.922,708,1.038,824,2.579,1828,2.166,2165,3.195,2314,2.308,2565,3.314,3196,3.873,3574,2.166,3577,2.524,3578,6.405,3579,4.235,3580,3.005,3581,2.524,3582,4.235,3583,2.524,3584,4.235,3585,2.524,3586,4.235,3587,4.235,3588,4.235,3589,4.235,3590,6.405,3591,2.524,3592,2.524,3593,2.524,3594,5.471,3595,2.524,3596,2.524,3597,2.524,3598,2.524,3599,2.308,3600,2.524,3601,2.524,3602,5.471,3603,2.524,3604,2.524,3605,2.524,3606,6.405,3607,2.524,3608,2.524,3609,2.524,3610,2.524]],["t/1663",[0,4.474,20,1.39,44,2.578,49,3.038,51,0.428,114,2.578,128,2.717,132,2.435,179,3.227,213,3.536,233,3.339,240,3.788,244,3.038,355,3.176,356,2.553,380,2.717,469,2.371,471,4.005,476,4.474,482,2.997,622,2.504,697,2.882,705,3.793,761,4.704,822,2.748,833,5.013,835,4.136,887,3.4,914,3.227,915,4.136,1090,4.474,1347,4.474,1350,4.474,1364,4.29,1459,4.29,1999,4.704,2880,4.29,3253,5.013,3511,4.29,3611,5.482,3612,5.013,3613,5.482,3614,5.482,3615,5.482,3616,5.482,3617,5.482,3618,5.482,3619,5.482,3620,5.482,3621,5.482,3622,5.013,3623,5.013,3624,5.013,3625,5.482,3626,5.482,3627,5.482,3628,5.482,3629,5.482,3630,5.482,3631,5.482,3632,5.482,3633,5.482,3634,5.482,3635,5.013,3636,5.482]],["t/1665",[20,1.516,50,1.094,60,3.743,147,2.533,174,3.269,185,2.214,248,2.42,312,2.784,469,3.554,521,4.243,675,5.131,759,4.368,771,4.368,914,4.839,919,4.132,964,4.839,965,5.679,1089,5.541,1167,5.131,1223,6.201,1413,5.468,1489,5.131,1538,3.857,1695,5.468,1733,5.468,2158,5.131,3322,5.679,3580,5.832,3612,5.468,3635,5.468,3637,8.219,3638,5.98,3639,5.468,3640,5.98,3641,5.98,3642,5.468,3643,5.98,3644,5.98,3645,5.98,3646,5.98,3647,5.98,3648,5.98]],["t/1667",[20,2.041,60,3.978,145,5.696,964,5.877,1089,6.731,1223,7.533,1538,5.192,3322,6.898,3580,7.084,3649,8.05,3650,8.05,3651,8.05,3652,8.05]],["t/1669",[20,2.041,60,3.978,145,5.696,964,5.877,1089,6.731,1223,7.533,1538,5.192,3322,6.898,3580,7.084,3653,8.05,3654,8.05,3655,8.05,3656,8.05]],["t/1671",[20,2.041,60,3.978,145,5.696,964,5.877,1089,6.731,1223,7.533,1538,5.192,2339,7.361,3322,6.898,3580,7.084,3657,8.05,3658,8.05,3659,8.05]],["t/1673",[20,2.041,60,3.978,145,5.696,964,5.877,1089,6.731,1223,7.533,1538,5.192,3322,6.898,3580,7.084,3660,8.05,3661,8.05,3662,8.05,3663,8.05]],["t/1675",[4,3.79,21,1.769,51,0.553,88,1.873,121,5.512,181,4.039,185,2.621,317,3.675,356,3.895,387,2.375,417,4.665,469,4.421,483,2.764,622,3.233,682,2.95,697,4.397,705,2.375,809,2.35,822,2.428,900,4.43,955,4.43,1090,5.777,1105,3.437,1124,5.539,1153,4.475,1217,4.43,1472,5.777,1685,5.539,2377,3.539,2685,6.473,3322,3.347,3399,4.43,3483,4.43,3580,6.945,3622,4.43,3623,4.43,3624,4.43,3642,6.473,3664,4.844,3665,4.844,3666,4.844,3667,4.844,3668,4.844,3669,4.844,3670,4.844,3671,4.844,3672,7.079,3673,7.079,3674,4.844,3675,4.844,3676,4.43,3677,4.844,3678,4.844]],["t/1678",[4,5.146,20,2.223,39,3.093,50,1.203,63,6.014,179,5.16,180,3.547,239,2.869,242,6.014,248,2.662,470,1.165,559,2.353,673,3.457,698,6.614,708,2.705,877,4.962,1151,3.697,1203,5.146,1293,5.644,1314,4.242,1320,5.644,1459,5.146,1519,5.146,2733,6.014,2765,5.644,2876,6.014,3679,8.766,3680,6.014,3681,6.577,3682,6.577,3683,6.577,3684,6.577,3685,6.577,3686,6.577,3687,6.577,3688,6.577,3689,6.577,3690,6.577]],["t/1680",[3,1.625,48,2.11,50,1.544,51,0.659,59,1.751,60,2.477,81,1.185,88,3.263,108,2.979,110,1.142,128,3.081,145,4.815,249,3.546,309,3.352,312,3.929,470,1.101,699,4.815,766,2.983,834,5.683,935,6.886,1153,5.334,1366,5.072,1818,4.41,1893,4.689,2122,4.689,2302,6.603,3061,5.683,3511,4.863,3691,5.683,3692,6.215,3693,6.215,3694,5.683,3695,6.215,3696,6.215,3697,6.215]],["t/1682",[0,3.069,20,2.354,21,2.62,39,3.374,50,1.481,51,0.849,121,2.478,167,1.319,179,4.224,192,3.772,194,3.036,213,4.628,239,2.551,371,1.67,435,1.973,470,1.271,476,3.069,483,2.146,559,2.092,575,2.536,766,1.805,835,5.414,881,6.158,915,2.838,919,2.599,951,4.272,1031,3.439,1084,2.748,1143,1.929,1196,3.069,1203,5.615,1241,2.29,1314,2.426,1330,2.332,1353,3.439,1367,2.943,1372,3.227,1384,2.377,1414,3.439,1496,5.348,1652,2.251,1687,2.838,1691,2.838,1730,2.599,1779,3.227,2750,3.439,3047,5.018,3329,3.439,3425,5.348,3580,2.669,3599,3.439,3639,3.439,3676,3.439,3698,10.289,3699,3.439,3700,5.348,3701,3.761,3702,3.439,3703,3.761,3704,3.761,3705,5.848,3706,3.761,3707,3.761,3708,3.761,3709,5.848,3710,3.761,3711,5.848,3712,3.761,3713,3.761,3714,3.761,3715,3.761,3716,3.761,3717,3.761,3718,3.761,3719,3.761,3720,3.761]],["t/1684",[20,2.286,35,2.111,51,0.835,59,1.81,73,1.758,80,1.438,81,1.309,88,2.653,104,1.221,110,1.261,132,3.048,145,5.144,175,3.104,189,3.048,233,4.179,312,3.195,381,4.626,470,1.215,707,2.506,846,5.396,1186,3.751,1384,4.338,1730,4.741,1999,5.889,3721,6.862,3722,6.862]],["t/1686",[3,2.043,20,2.485,50,1.429,56,5.147,100,3.212,114,5.035,312,3.637,560,3.673,766,3.749,1139,5.894,1140,5.894,1141,5.543,1142,6.112,1143,4.007,1144,5.894,1145,5.706,1146,5.894,1194,6.703,2215,5.543,3723,7.811]],["t/1688",[51,0.784,57,6.363,191,4.275,622,3.714,762,5.771,836,5.771,947,7.437,1475,6.136,2082,5.359,2888,7.437,3680,7.437,3724,7.437,3725,8.133,3726,8.133,3727,8.133,3728,8.133,3729,7.437,3730,8.133]],["t/1690",[20,0.927,23,1.153,27,2.027,33,1.082,51,0.966,59,1.299,64,0.992,65,2.033,66,1.059,72,0.492,73,0.937,74,3.201,80,1.477,81,1.521,95,2.556,101,2.189,110,1.59,112,1.666,180,3.086,193,3.659,261,1.72,299,1.737,394,2.311,470,1.013,505,4.751,515,2.759,606,1.972,607,1.999,622,1.67,699,2.086,766,1.755,817,4.289,823,1.335,1384,2.311,1748,3.344,1818,2.595,2498,2.984,2807,3.138,3283,3.344,3289,6.445,3290,5.751,3724,3.344,3731,3.657,3732,3.657,3733,3.657,3734,3.657,3735,3.657,3736,5.721,3737,3.657,3738,3.657,3739,3.657,3740,3.657,3741,3.657,3742,3.657,3743,3.657,3744,3.657,3745,3.657,3746,3.657,3747,3.657,3748,3.657,3749,3.657,3750,3.657,3751,3.657]],["t/1693",[3,1.626,20,2.305,23,1.284,35,1.455,48,1.382,50,1.137,51,0.885,59,1.562,64,1.104,65,2.209,66,1.179,72,0.548,73,1.043,74,1.635,80,1.58,81,1.438,88,2.915,108,1.437,110,1.551,121,2.683,145,2.323,159,2.31,187,2.018,193,3.227,194,3.227,217,5.073,223,2.813,225,1.409,248,1.648,261,1.914,299,1.934,315,4.295,429,3.076,470,1.335,483,2.323,548,2.525,575,2.745,649,3.185,699,2.323,772,2.683,823,1.487,1153,2.573,1185,3.322,1443,3.723,1622,3.185,1725,3.723,1893,3.071,1923,3.493,2302,3.185,2386,5.684,2883,3.493,2970,3.493,3492,6.471,3494,3.723,3495,3.723,3496,3.723,3752,6.216,3753,3.493,3754,4.071,3755,4.071,3756,4.071,3757,4.071,3758,4.071,3759,4.071,3760,6.216,3761,4.071]],["t/1695",[20,1.275,33,2.153,35,2.001,48,1.708,51,0.904,59,1.782,60,2.899,80,1.054,81,0.959,88,2.812,110,1.337,132,3.231,146,3.475,189,2.233,193,4.862,194,5.377,216,1.568,223,3.475,315,5.026,398,2.493,467,2.656,470,0.891,523,4.104,622,2.297,1071,3.674,1489,6.242,2204,3.674,2214,4.104,2215,3.568,2377,5.314,2726,4.315,3501,5.936,3762,7.815,3763,4.599,3764,4.599,3765,4.599,3766,5.029,3767,5.029,3768,5.029]],["t/1697",[20,1.43,33,1.67,35,1.63,48,3.091,50,0.657,51,0.915,59,1.8,60,2.247,73,0.92,81,0.685,88,3.316,104,1.003,110,1.28,112,1.642,142,2.481,145,2.048,146,2.481,175,1.624,189,3.093,191,1.887,193,2.928,194,4.453,216,1.119,223,2.481,233,3.434,261,1.688,317,1.864,355,2.08,366,2.548,367,2.809,369,3.283,372,3.283,381,2.42,435,1.211,442,4.1,467,1.311,470,0.999,509,2.366,559,1.285,622,1.64,682,3.434,705,1.76,707,1.311,762,4.002,846,2.149,877,2.709,929,4.413,982,2.93,1177,2.709,1186,1.962,1241,2.186,1372,3.081,1478,3.081,1538,2.316,1586,3.081,1730,4.812,1777,3.283,2102,3.081,2377,2.623,3493,3.081,3501,4.602,3511,2.809,3699,3.283,3762,5.157,3763,3.283,3764,3.283,3765,3.283,3769,3.59,3770,3.59,3771,3.59,3772,3.59,3773,3.59]],["t/1700",[2,5.093,20,1.505,21,2.167,23,1.872,35,1.389,50,1.496,51,0.853,64,1.61,65,2.906,66,2.367,72,0.799,73,1.521,355,5.42,470,1.051,848,4.101,914,3.494,935,4.843,1071,4.336,1186,3.244,1195,7.606,1429,5.427,1514,5.427,1535,5.093,1775,5.427,2143,5.093,2147,5.093,2734,5.427,2735,5.427,3173,5.093,3691,5.427,3774,8.177,3775,5.935,3776,5.427,3777,5.935,3778,5.427,3779,5.935,3780,5.935,3781,5.935,3782,5.935,3783,5.935,3784,5.935]],["t/1702",[48,3.853,139,7.533,179,5.877,216,3.537,317,5.184,355,6.574,441,6.311]],["t/1704",[20,2.396,49,4.087,93,4.756,108,2.603,248,2.985,501,5.564,521,5.233,705,3.615,767,3.926,771,5.387,980,4.491,1074,4.972,1173,3.615,1518,6.743,1521,6.743,1737,6.328,1769,4.661,1844,7.595,2993,6.328,3785,8.639,3786,9.532,3787,7.374]],["t/1706",[3,2.064,40,2.601,51,0.953,59,1.072,65,2.338,72,0.886,73,1.685,74,2.642,88,4.159,101,4.723,180,5.066,216,1.368,225,1.519,239,1.914,248,1.776,299,3.125,370,5.453,483,2.503,697,2.306,808,2.335,913,3.58,1841,2.583,1844,4.545,1846,5.368,1847,5.368,1848,5.368,1849,5.368,1850,5.368,1851,5.368,1852,5.368,1853,5.645,1854,5.645,1855,5.645,1856,5.645,1857,5.645,1858,5.645,2302,3.433,3788,4.387]],["t/1708",[3,1.564,40,2.365,50,1.094,51,0.945,59,1.34,65,2.125,72,0.805,73,1.532,74,2.401,80,1.722,81,1.568,88,3.91,106,2.262,110,1.511,180,4.433,248,2.42,286,3.857,298,5.131,299,2.841,370,5.679,730,4.132,1844,4.132,1846,4.88,1847,4.88,1848,4.88,1849,4.88,1850,4.88,1851,4.88,1852,4.88,2987,5.468,3789,5.98,3790,5.98]],["t/1710",[20,2.062,27,4.507,48,2.761,84,3.824,95,2.95,108,2.871,380,4.031,483,4.64,980,4.953,1987,5.359,3791,8.133,3792,7.437,3793,7.437,3794,7.437,3795,7.437,3796,7.437,3797,7.437,3798,7.437,3799,7.437]],["t/1712",[20,1.641,33,3.446,51,0.92,59,1.775,72,0.871,88,2.501,108,2.284,130,2.66,435,2.183,1863,5.916,1987,4.263,3800,7.928,3801,5.916,3802,7.928,3803,6.469,3804,5.916,3805,7.928,3806,5.916,3807,6.469,3808,5.916,3809,5.916,3810,6.469]],["t/1714",[32,4.215,72,1.107,73,2.591,84,3.864,108,2.901,151,4.073,248,4.433,380,4.073,482,4.492,702,1.722,1987,5.415,3792,7.514,3800,7.514,3811,7.514,3812,8.217]],["t/1716",[23,1.376,32,2.238,51,0.943,59,1.527,64,1.184,65,2.328,66,1.263,72,0.882,73,2.015,74,1.752,80,1.648,81,1.5,84,2.052,95,2.376,108,1.54,110,1.722,112,1.907,151,2.163,159,1.337,167,3.066,248,3.539,260,3.414,380,2.163,470,0.773,482,2.385,697,2.293,702,0.914,776,2.706,1286,3.414,1384,2.758,1841,2.568,1844,3.015,1866,5.99,1925,3.99,1987,2.875,3793,7.193,3801,3.99,3813,4.363,3814,7.865,3815,6.551,3816,4.363,3817,4.363,3818,4.363,3819,4.363,3820,4.363,3821,4.363,3822,4.363,3823,4.363,3824,4.363,3825,4.363,3826,4.363]],["t/1718",[32,4.215,72,1.107,73,2.591,84,3.864,108,2.901,151,4.073,380,4.073,482,4.492,702,1.722,1844,7.568,1987,5.415,3794,7.514,3802,7.514,3811,7.514,3827,8.217]],["t/1720",[32,3.968,72,1.042,73,2.495,84,3.637,108,2.731,151,3.834,167,3.415,248,3.131,380,3.834,482,4.228,702,1.621,1384,4.889,1841,4.553,1844,7.729,1987,5.097,3795,8.905,3804,7.073,3828,7.735]],["t/1722",[72,1.155,73,2.659,84,4.032,108,3.027,380,4.25,702,1.796,825,5.834,1932,7.84,1987,5.65,3796,7.84,3805,7.84,3829,8.573]],["t/1724",[72,1.18,73,2.694,84,4.121,108,3.094,380,4.344,702,1.836,1987,5.775,3797,8.014,3806,8.014,3830,8.764,3831,8.764]],["t/1726",[72,1.18,73,2.694,84,4.121,108,3.094,380,4.344,702,1.836,1877,8.014,1987,5.775,3798,8.014,3808,8.014,3832,8.764]],["t/1728",[23,1.465,40,3.228,50,0.85,51,0.89,59,0.757,64,1.26,65,2.439,66,1.345,72,0.924,73,2.74,84,2.184,108,1.64,110,0.854,112,1.352,121,3.061,151,2.302,159,1.423,175,3.105,228,3.634,248,2.778,260,3.634,380,2.302,429,1.895,463,3.393,470,0.823,519,2.302,697,2.442,702,0.973,1330,2.881,1384,2.936,1769,2.936,1824,8.369,1831,6.276,1841,2.734,1844,4.742,1987,5.379,2790,8.246,2807,3.986,3799,6.276,3809,4.247,3833,4.645,3834,4.645,3835,4.645,3836,6.863,3837,4.645,3838,4.645,3839,4.645,3840,4.645,3841,4.645,3842,4.645,3843,4.645,3844,4.645]],["t/1731",[3,0.669,37,1.813,40,1.693,48,0.868,50,0.783,51,0.875,59,1.346,64,0.694,72,1.316,73,2.871,80,1.629,81,1.575,88,4.359,95,2.342,100,1.052,110,1.518,129,1.115,147,2.215,148,0.868,156,1.868,180,2.309,185,2.045,232,1.929,248,2.235,286,4.637,309,1.379,346,0.891,432,1.417,470,0.758,482,1.398,565,1.312,702,0.897,883,3.038,943,1.557,996,1.929,1092,3.493,1133,2.407,1151,1.437,1156,1.929,1288,2.655,1317,1.868,1330,2.655,1375,4.102,1735,2.706,1765,6.302,1769,3.49,1799,2.194,1800,2.194,1801,2.194,1802,2.194,1803,2.194,1804,2.194,1805,2.194,1806,2.194,1807,2.194,1808,2.194,1809,2.194,1810,2.194,1811,2.194,1812,3.673,1813,2.194,1814,2.194,1815,2.087,1816,2.194,1817,2.194,1818,1.814,1819,3.673,1820,3.493,1821,2.194,1822,2.087,1823,2.194]],["t/1733",[37,1.545,40,3.974,51,0.866,59,1.326,80,1.705,81,1.552,93,2.978,95,1.675,110,1.495,130,1.899,147,3.096,151,2.289,159,1.415,248,4.555,249,2.635,470,0.818,510,4.223,521,4.849,606,2.49,665,2.718,704,3.426,705,2.264,712,2.864,767,2.458,777,2.458,920,3.842,923,3.768,968,3.484,1375,5.13,1376,3.613,1652,2.764,2927,3.963,2993,3.963,3052,4.223,3263,3.963,3286,4.223,3753,3.963,3785,4.223,3786,6.249,3845,4.618,3846,4.618,3847,4.618,3848,4.618,3849,4.618,3850,4.618,3851,4.618,3852,4.618]],["t/1735",[26,1.604,40,1.352,48,1.161,50,1.327,51,0.925,56,1.295,59,1.252,80,1.609,81,1.465,84,0.924,88,2.098,95,0.713,108,0.694,110,1.412,112,1.58,121,1.295,130,0.808,146,1.358,147,1.054,151,4.881,167,2.366,177,0.689,180,1.844,191,1.033,225,2.336,231,1.592,248,3.783,314,0.906,336,1.176,346,1.581,366,1.395,370,3.75,384,3.221,469,0.85,470,0.348,583,1.714,660,1.797,682,1.197,690,1.604,704,0.985,708,2.529,716,4.109,745,1.074,759,1.436,761,1.687,767,1.82,773,1.436,807,1.074,887,2.121,897,1.436,912,1.519,1362,1.687,1375,1.122,1387,5.195,1401,1.797,1436,1.797,1482,1.243,1503,1.538,1538,3.501,1550,4.429,1677,1.797,1744,1.687,1747,1.797,1765,2.206,2058,2.935,2850,1.395,2883,1.687,2951,1.483,2981,1.687,3112,1.797,3511,1.538,3776,1.797,3853,1.966,3854,1.797,3855,2.935,3856,1.604,3857,1.966,3858,3.127,3859,1.797,3860,5.427,3861,5.427,3862,1.966,3863,1.966,3864,1.966,3865,1.966,3866,5.018,3867,3.704,3868,1.966,3869,2.791,3870,3.42,3871,1.604,3872,1.797,3873,1.966,3874,3.127,3875,1.966,3876,1.966,3877,1.966,3878,1.966,3879,1.966,3880,1.966,3881,1.966,3882,1.604,3883,1.966,3884,1.966,3885,1.966,3886,1.966,3887,1.966,3888,1.966,3889,1.966,3890,3.42,3891,1.966,3892,1.966,3893,1.966,3894,1.966,3895,1.966,3896,1.966,3897,1.966,3898,1.966,3899,1.966,3900,1.966,3901,1.966,3902,1.966,3903,1.966,3904,1.966,3905,1.966,3906,1.966,3907,1.966,3908,1.966,3909,1.797,3910,1.797,3911,1.797,3912,1.797,3913,1.966,3914,1.966,3915,1.966]],["t/1737",[20,0.963,37,0.421,40,0.878,50,0.91,51,0.918,59,0.96,80,1.235,81,1.124,88,0.858,107,0.744,110,1.217,150,1.307,151,3.283,190,0.891,220,1.139,225,1.315,248,2.385,314,1.751,346,2.308,357,1.286,359,1.904,380,1.1,416,1.307,456,5.345,469,1.642,470,1.044,519,1.1,682,1.352,766,2.828,877,1.675,912,1.687,914,1.307,1074,1.496,1133,2.135,1151,1.248,1288,1.376,1347,1.811,1348,1.621,1368,2.03,1375,2.84,1387,4.272,1407,3.473,1438,3.532,1439,2.03,1499,5.18,1503,1.737,1512,2.03,1538,1.432,1729,1.496,1841,2.236,2064,2.03,2215,1.575,2302,1.737,2692,1.905,2981,1.905,3025,2.03,3178,1.811,3183,2.03,3221,2.03,3753,1.905,3882,1.811,3916,9.079,3917,2.219,3918,2.219,3919,2.219,3920,3.797,3921,2.219,3922,3.797,3923,2.219,3924,2.219,3925,2.219,3926,2.219,3927,3.797,3928,2.219,3929,2.219,3930,2.219,3931,2.219,3932,2.219,3933,2.219,3934,2.219,3935,2.219,3936,2.219,3937,2.219,3938,2.219,3939,2.219,3940,2.219,3941,2.219,3942,2.219,3943,2.219,3944,3.797,3945,2.219,3946,2.219,3947,3.797,3948,3.797,3949,2.219,3950,2.219,3951,2.219,3952,2.219,3953,2.219,3954,2.219,3955,2.219,3956,1.905,3957,3.797,3958,2.219,3959,3.473,3960,2.219,3961,2.219,3962,2.219,3963,5.892,3964,3.797,3965,4.977,3966,4.977,3967,4.977,3968,2.219,3969,4.977,3970,2.219,3971,3.797,3972,2.219,3973,2.219,3974,2.219,3975,2.219,3976,2.219,3977,2.219,3978,2.219,3979,2.219,3980,2.219,3981,2.219,3982,2.219,3983,2.219,3984,2.219,3985,2.219,3986,2.219,3987,2.219,3988,2.219,3989,2.219,3990,2.219,3991,2.219]],["t/1739",[3,2.555,20,1.4,21,2.016,40,3.559,48,2.64,50,1.01,51,0.834,56,3.638,59,1.267,60,3.098,80,1.157,81,1.483,95,2.002,106,3.404,108,3.636,110,1.429,147,2.396,148,2.64,159,1.691,192,3.561,216,1.721,239,2.408,248,2.234,253,3.854,286,3.561,336,3.304,337,3.62,380,2.736,470,0.978,759,4.033,953,3.917,1184,2.736,1317,4.033,1375,3.15,1765,3.561,1769,3.49,1818,3.917,1822,4.505,1824,4.32,2724,4.737]],["t/1741",[3,2.476,50,1.111,51,0.941,65,2.158,72,0.818,73,1.556,74,2.438,88,3.935,101,3.634,180,4.479,248,2.457,299,2.884,370,4.195,394,3.838,665,3.574,766,2.914,1459,4.751,1844,5.739,1846,4.955,1847,4.955,1848,4.955,1849,4.955,1850,4.955,1851,4.955,1852,4.955,1853,5.21,1854,5.21,1855,5.21,1856,5.21,1857,5.21,1858,5.21,3882,4.955,3992,6.071]],["t/1744",[20,2.015,33,1.313,37,1.259,50,1.213,51,0.842,59,1.295,73,1.699,80,0.929,81,0.846,95,2.406,104,0.789,108,2.805,110,0.815,114,4.438,129,3.846,130,1.824,132,2.946,149,2.923,159,1.359,167,1.556,181,2.531,216,1.383,225,1.536,250,4.583,256,1.953,337,2.066,346,1.546,380,2.199,429,2.706,536,5.804,560,4.146,673,5.395,688,2.861,707,1.62,736,3.471,777,2.362,836,3.148,846,2.655,962,3.471,1166,5.306,1171,6.652,1184,2.199,1185,3.62,1186,2.425,1187,4.057,1189,2.804,1190,2.57,1193,2.923,1615,4.057,2745,4.057,2776,4.057,3993,4.436,3994,4.436,3995,4.436]],["t/1746",[20,1.206,21,1.737,23,1.5,51,0.924,59,0.775,61,3.252,64,1.895,65,2.482,66,1.377,72,0.641,73,1.219,80,0.997,81,0.907,110,0.874,114,4.289,132,2.112,159,1.457,175,2.152,191,2.5,261,2.237,299,2.26,337,2.215,345,3.722,435,1.605,470,0.842,559,1.702,560,4.937,673,2.5,707,1.737,738,2.5,1071,3.475,1133,2.674,1139,3.589,1140,3.589,1141,5.873,1142,3.722,1143,4.984,1144,3.589,1145,3.475,1146,3.589,1157,4.082,1161,4.082,1166,2.674,1184,2.358,1186,2.6,1189,3.007,1190,2.756,1191,2.756,1237,3.068,1261,4.082,1293,4.082,1323,3.882,1324,4.082,1617,4.35,3570,4.35]],["t/1749",[20,0.75,27,2.677,33,2.304,34,1.835,37,1.585,44,1.391,50,1.292,51,0.936,59,1.361,64,0.803,67,1.596,72,0.65,81,0.564,84,3.322,107,1.619,110,1.43,112,1.782,167,1.038,183,1.024,189,3.457,190,1.188,239,1.291,256,2.126,311,1.518,315,2.044,346,1.683,359,4.416,371,1.314,393,1.217,398,1.467,456,2.843,463,2.161,467,2.235,469,1.279,470,0.855,476,2.414,483,1.688,559,1.059,562,1.995,697,1.555,777,1.575,784,1.663,823,2.579,969,2.161,982,2.414,1084,2.161,1153,1.87,1312,2.706,1322,2.044,1366,2.414,1482,1.87,1499,1.688,1586,2.539,1622,2.315,1631,2.706,1686,2.539,1730,2.044,1735,1.87,1982,2.539,2122,3.644,2852,2.232,3854,4.417,3996,2.959,3997,6.12,3998,4.83,3999,2.959,4000,2.959,4001,2.959,4002,2.959,4003,2.959,4004,2.959,4005,2.959,4006,2.959,4007,2.959,4008,2.959,4009,7.063,4010,2.959,4011,2.959,4012,2.959,4013,2.959,4014,2.959,4015,2.959,4016,2.959,4017,2.959,4018,2.959,4019,2.959,4020,2.959,4021,2.959,4022,2.959,4023,2.959,4024,2.959,4025,2.959,4026,2.959,4027,2.959,4028,2.959,4029,2.959,4030,2.959,4031,2.959]],["t/1751",[3,0.669,37,1.813,40,1.693,48,0.868,50,0.783,51,0.875,59,1.346,64,0.694,72,1.316,73,2.871,80,1.629,81,1.575,88,4.359,95,2.342,100,1.052,110,1.518,129,1.115,147,2.215,148,0.868,156,1.868,180,2.309,185,2.045,232,1.929,248,2.235,286,4.637,309,1.379,346,0.891,432,1.417,470,0.758,482,1.398,565,1.312,702,0.897,883,3.038,943,1.557,996,1.929,1092,3.493,1133,2.407,1151,1.437,1156,1.929,1288,2.655,1317,1.868,1330,2.655,1375,4.102,1735,2.706,1765,6.302,1769,3.49,1799,2.194,1800,2.194,1801,2.194,1802,2.194,1803,2.194,1804,2.194,1805,2.194,1806,2.194,1807,2.194,1808,2.194,1809,2.194,1810,2.194,1811,2.194,1812,3.673,1813,2.194,1814,2.194,1815,2.087,1816,2.194,1817,2.194,1818,1.814,1819,3.673,1820,3.493,1821,2.194,1822,2.087,1823,2.194]],["t/1754",[20,0.805,33,0.939,37,1.791,51,0.941,59,1.046,72,0.991,80,1.345,81,1.224,93,2.046,108,1.12,120,2.589,132,1.409,148,1.735,149,6.418,159,1.966,185,1.175,231,1.477,271,2.349,330,2.192,355,1.838,387,1.555,398,1.572,441,2.005,470,0.905,553,4.386,562,6.115,571,2.452,583,1.59,702,0.665,712,1.967,767,1.689,773,2.318,809,1.539,912,2.27,1143,1.627,1151,1.783,1158,2.394,1287,2.901,1296,2.901,1375,1.81,1618,2.394,1627,5.726,2204,2.318,2215,3.627,2533,2.722,2893,2.722,3173,6.315,4032,2.722,4033,3.172,4034,3.172,4035,3.172,4036,3.172,4037,3.172,4038,3.172,4039,3.172,4040,3.172,4041,3.172,4042,5.111,4043,5.111,4044,3.172,4045,5.111,4046,3.172,4047,3.172,4048,3.172,4049,3.172,4050,2.901,4051,6.418,4052,6.418,4053,3.172,4054,3.172,4055,3.172,4056,6.418,4057,5.111,4058,3.172,4059,3.172,4060,3.172,4061,3.172]],["t/1756",[50,1.595,51,0.946,59,1.421,72,0.878,80,1.827,81,1.663,95,2.366,151,3.233,166,4.123,167,2.288,248,2.64,271,2.082,470,1.155,571,2.173,702,1.367,716,5.98,912,2.897,3869,5.323,3871,5.323,4062,6.522,4063,5.964,4064,8.718,4065,5.964,4066,5.964,4067,5.964]],["t/1758",[51,0.77,59,1.286,72,1.062,73,2.755,80,1.653,81,1.505,110,1.812,179,4.644,216,2.459,244,4.372,271,2.518,470,1.397,571,2.629,607,4.312,702,1.653,4068,7.889,4069,7.889,4070,7.889]],["t/1760",[37,1.611,51,0.902,59,1.021,60,2.496,72,0.844,80,1.312,81,1.195,148,3.267,159,1.919,185,2.319,216,1.953,271,2,311,3.214,346,3.352,435,2.113,469,3.669,470,1.109,571,2.087,583,4.253,702,1.312,836,6.02,1841,3.688,1974,8.255,2103,5.375,2712,5.375,3475,8.797,4071,6.264,4072,8.484]],["t/1762",[33,1.963,37,1.259,51,0.934,59,1.081,60,2.643,72,0.893,80,1.39,81,1.265,148,2.252,159,2.032,185,2.456,216,2.067,232,7.471,271,2.117,311,3.402,398,5.23,470,1.175,571,2.21,702,1.39,2560,8.497,4073,6.632,4074,6.632,4075,6.632,4076,6.632,4077,6.065]],["t/1764",[37,1.804,51,0.925,59,1.213,72,1.002,80,1.56,81,1.42,110,1.368,159,2.28,271,2.376,314,3.432,470,1.318,571,2.48,702,1.56,712,4.616,722,5.616,817,3.69,912,3.306,2175,6.807,4078,7.443,4079,7.443,4080,7.443]],["t/1766",[35,1.49,50,1.164,51,0.871,59,1.581,72,0.857,80,1.334,81,1.636,95,2.308,110,1.17,114,2.993,131,3.388,159,1.95,271,2.032,309,3.433,337,2.964,389,6.085,467,3.132,470,1.127,560,2.993,571,2.121,673,3.346,702,1.334,736,4.98,920,4.821,1117,5.82,1166,4.821,1184,3.155,1190,3.688,1191,4.969,1818,4.516,4081,6.365,4082,6.365,4083,6.365]],["t/1768",[50,1.146,51,0.841,59,1.021,61,4.479,72,0.844,80,1.312,81,1.195,88,2.422,110,1.768,131,3.335,147,2.614,216,1.953,239,2.733,249,3.574,271,2,327,2.64,346,2.183,359,3.14,393,2.576,456,3.688,470,1.109,571,2.087,607,3.424,702,1.312,766,3.007,1173,3.071,1499,3.574,1693,4.04,1706,4.04,1735,5.363,1924,4.128,2165,4.726,2705,7.28,4084,6.264,4085,6.264,4086,6.264,4087,6.264]],["t/1770",[33,2.558,37,0.974,50,0.938,51,0.887,59,0.836,61,2.387,66,0.922,72,0.429,80,0.667,81,0.608,88,1.232,110,0.942,112,0.927,129,1.389,131,1.696,147,0.981,167,1.798,189,2.858,191,1.674,216,0.993,239,1.389,249,1.817,253,1.579,256,3.247,271,1.017,311,3.302,346,1.11,355,2.971,359,1.597,393,1.31,398,4.008,401,4.274,416,3.018,429,2.092,432,1.765,433,2.054,456,5.086,463,4.701,469,1.377,470,0.908,483,1.817,559,1.14,562,3.457,571,1.061,583,1.597,607,1.741,702,0.667,712,1.975,736,2.492,766,1.529,823,2.953,1084,2.327,1173,1.562,1322,3.543,1330,1.975,1339,2.599,1499,4.614,1507,2.599,1693,2.054,1706,2.054,1729,2.147,1735,5.111,1924,2.099,2074,4.184,2075,4.184,2078,4.4,2079,4.184,2080,4.4,2092,2.733,2201,2.913,2852,2.403,3114,4.4,4088,5.127,4089,3.185,4090,2.733,4091,2.733,4092,2.913,4093,2.913,4094,3.185,4095,3.185,4096,3.185,4097,2.733,4098,3.185,4099,2.733,4100,2.733,4101,3.185,4102,6.436,4103,3.185,4104,3.185,4105,3.185,4106,3.185,4107,3.185]],["t/1772",[37,0.769,50,0.741,51,0.922,59,1.225,72,0.545,80,1.575,81,1.434,111,2.309,159,1.241,167,2.952,216,1.93,225,1.402,231,1.886,271,1.293,317,3.215,346,2.157,356,1.886,357,3.587,382,4.689,435,1.366,470,1.097,501,3.056,519,2.007,571,1.349,702,0.849,717,5.769,769,2.277,772,2.669,776,2.512,807,2.214,826,3.771,1133,2.277,1151,2.277,1152,3.475,1153,2.56,1225,3.056,1618,3.056,1622,3.169,1793,2.874,1841,2.384,2640,3.056,2915,3.169,2939,3.704,2951,4.672,2952,4.523,2961,3.056,2966,5.053,2970,3.475,3016,5.662,4108,4.05,4109,4.05,4110,4.05,4111,4.05,4112,4.05,4113,4.05,4114,4.05,4115,4.05,4116,4.05,4117,4.05,4118,3.704,4119,5.662,4120,4.05,4121,4.05,4122,4.05,4123,4.05]],["t/1774",[51,0.884,59,1.09,72,0.901,80,1.401,81,1.276,110,1.229,179,3.937,271,2.135,315,4.621,394,5.603,470,1.184,521,4.746,571,2.228,607,3.656,702,1.401,766,3.21,777,3.56,823,3.237,1198,3.875,1519,5.233,1738,5.458,3882,5.458,4124,9.943,4125,6.688,4126,6.688,4127,6.688,4128,6.688,4129,6.688,4130,6.116,4131,6.688,4132,6.688]],["t/1776",[72,1.032,110,1.408,129,3.342,131,4.078,174,4.187,180,4.131,238,4.585,271,2.445,346,2.669,394,4.842,571,2.552,606,4.131,654,5.435,702,1.605,715,5.779,766,3.676,767,4.078,1198,4.438,1887,6.573,1927,8.305,2097,7.005,2663,6.251,3574,6.573,4133,7.66]],["t/1778",[33,1.548,37,1.915,40,2.068,51,0.919,59,0.852,72,0.704,80,1.095,81,0.997,107,2.929,159,1.602,167,1.834,190,2.1,216,2.332,271,1.669,346,1.822,382,2.563,432,2.898,433,3.372,435,1.764,470,0.926,571,1.742,702,1.095,717,5.9,823,1.909,986,3.82,1793,3.71,1794,4.487,2554,3.71,2952,3.82,2966,4.267,3444,4.487,4092,4.781,4118,4.781,4119,4.781,4134,5.228,4135,5.228,4136,5.228,4137,5.228,4138,5.228,4139,5.228,4140,5.228,4141,5.228,4142,5.228,4143,5.228,4144,5.228,4145,5.228,4146,5.228,4147,5.228,4148,5.228]],["t/1780",[35,1.4,37,1.783,50,1.094,51,0.876,59,0.975,72,0.805,80,1.253,81,1.141,88,2.312,110,1.511,131,3.183,159,1.832,177,3.294,187,2.964,216,1.864,225,2.07,239,2.609,249,3.412,271,1.909,346,3.272,359,2.997,393,2.459,429,2.44,432,3.314,433,5.302,470,1.059,571,1.992,607,3.269,702,1.253,717,5.28,766,2.87,1173,2.932,1693,3.857,1706,3.857,4149,5.98,4150,4.132,4151,5.98,4152,5.98]],["t/1782",[35,1.895,37,1.537,39,3.806,40,3.2,51,0.849,59,1.319,72,0.787,80,1.225,81,1.115,84,2.75,110,1.487,148,1.985,151,4.012,159,1.791,232,4.412,271,1.867,398,2.898,470,1.036,571,1.948,588,4.575,702,1.225,846,3.5,936,6.604,1371,7.574,1691,7.003,2560,5.018,2625,5.018,2915,6.332,4153,5.847,4154,5.847,4155,5.847,4156,5.847,4157,8.093,4158,9.281,4159,8.093]],["t/1784",[50,1.451,51,0.932,59,1.293,72,0.765,80,1.19,81,1.083,129,2.477,148,2.693,149,6.857,159,1.74,185,2.103,271,1.813,337,4.845,398,2.815,470,1.006,505,5.347,513,4.634,514,6.806,562,3.829,571,1.892,583,2.847,702,1.19,767,3.023,914,3.343,1087,5.193,1184,3.931,1341,5.193,1627,4.03,2204,5.794,4160,5.679,4161,9.138,4162,5.679]],["t/1786",[37,1.238,39,5.137,51,0.853,59,1.421,72,0.878,80,1.367,81,1.244,110,1.602,146,4.507,167,2.288,177,2.288,189,2.897,271,2.082,311,3.346,401,3.779,470,1.155,571,2.173,702,1.367,769,3.667,809,4.228,1198,3.779,1314,4.207,1448,4.045,1652,3.904,1924,4.298,2090,5.597,4163,6.522,4164,5.323,4165,6.522,4166,5.597,4167,5.323,4168,5.323]],["t/1788",[37,1.783,50,1.094,51,0.892,59,0.975,72,0.805,80,1.253,81,1.141,88,2.312,110,1.511,131,3.183,146,4.132,167,2.883,177,2.097,187,2.964,216,1.864,239,2.609,249,3.412,271,1.909,311,3.068,346,3.524,359,2.997,393,2.459,401,4.762,432,3.314,470,1.059,571,1.992,607,3.269,702,1.253,766,2.87,769,3.362,809,3.987,1173,2.932,1693,3.857,1706,3.857,1924,3.94,4150,4.132,4169,5.98,4170,5.98]],["t/1790",[72,1.249,107,3.111,271,2.962,571,3.091,702,1.944,3536,8.484,4171,9.278]],["t/1792",[33,2.421,37,1.776,50,1.086,51,0.874,59,0.967,72,0.799,80,1.243,81,1.132,88,2.295,110,1.503,131,3.159,147,1.829,148,2.015,159,1.818,185,2.198,216,1.85,239,2.589,249,3.386,271,1.895,311,3.045,346,2.068,359,2.975,393,2.441,432,4.532,470,1.051,571,1.977,583,2.975,607,3.244,682,3.614,702,1.243,766,2.849,770,3.289,1173,2.91,1375,3.386,1693,3.828,1706,3.828,2204,5.973,3284,4.336,3956,5.093,4150,4.101,4172,8.177,4173,5.935]],["t/1794",[72,1.207,110,1.647,147,2.762,148,3.043,166,5.665,185,3.319,271,2.861,571,2.986,702,1.878,4174,8.962]],["t/1796",[33,1.693,37,1.742,50,1.046,51,0.865,59,0.932,60,2.279,72,0.77,80,1.199,81,1.091,88,2.212,110,1.465,131,3.045,147,1.763,148,1.942,159,1.752,185,2.118,216,1.783,239,2.495,249,3.264,271,1.826,311,2.934,346,1.993,359,2.867,393,2.352,432,4.417,470,1.013,571,1.906,583,2.867,607,3.127,634,3.769,682,3.484,702,1.199,766,2.745,1173,2.804,1375,3.264,1693,3.69,1706,3.69,2204,4.179,3284,4.179,3956,4.909,4150,3.952,4175,5.72,4176,5.72,4177,5.72,4178,5.72,4179,5.72,4180,5.72,4181,5.72,4182,5.72,4183,5.72]],["t/1798",[60,3.571,72,1.207,110,1.647,148,3.043,166,5.665,185,3.319,271,2.861,571,2.986,702,1.878,4184,8.962]],["t/1800",[37,1.552,49,3.289,51,0.853,59,1.643,67,3.201,72,0.799,80,1.96,81,1.784,110,1.853,151,2.942,159,1.818,167,2.081,248,2.402,271,1.895,314,3.77,389,4.211,469,2.566,470,1.448,571,1.977,702,1.243,716,3.614,912,2.636,1650,5.093,1730,4.101,2565,4.644,4185,5.935,4186,5.935,4187,5.427,4188,5.935,4189,5.093,4190,5.935,4191,5.935,4192,5.427,4193,5.935,4194,5.935,4195,5.935,4196,5.935]],["t/1802",[37,1.259,50,1.213,51,0.882,59,1.081,72,0.893,80,1.39,81,1.265,88,2.564,110,1.62,131,3.53,148,2.252,159,2.032,185,2.456,216,2.067,239,2.893,249,3.784,271,2.117,346,2.311,359,3.324,393,2.727,470,1.175,571,2.21,607,3.625,702,1.39,766,3.183,817,3.287,1173,3.251,1693,4.278,1706,4.278,2718,6.065,4197,8.815,4198,6.065,4199,6.632,4200,6.632]],["t/1804",[20,2.235,37,1.259,51,0.9,59,1.081,72,0.893,73,2.258,80,1.39,81,1.265,110,1.62,147,2.716,148,2.993,159,2.032,213,4.278,271,2.117,470,1.175,571,2.21,702,1.39,1008,3.904,1075,6.255,1186,3.625,1288,4.113,2492,4.845,2703,4.845,2704,7.471,2717,6.065,2753,5.691,4201,6.632]],["t/1806",[37,1.326,51,0.894,59,1.138,72,0.94,80,1.463,81,1.332,110,1.283,147,2.152,148,2.371,159,2.139,222,6.471,271,2.229,470,1.237,571,2.327,583,3.5,702,1.463,1008,5.369,1075,4.955,1463,5.699,1499,5.204,2703,5.102,2704,6.881,4202,9.12,4203,9.12]],["t/1808",[33,3.147,37,1.144,51,0.894,59,0.982,61,2.805,72,0.811,80,1.262,81,1.149,107,2.02,110,1.518,111,3.081,147,1.857,148,2.046,151,2.987,159,1.846,183,2.86,185,2.231,271,1.923,311,3.091,398,4.674,470,1.067,571,2.008,583,3.02,702,1.262,767,3.208,1375,4.714,1627,4.275,2198,5.171,2214,4.917,2215,4.275,2692,5.171,4032,5.171,4204,6.025,4205,6.025,4206,6.025,4207,6.025]],["t/1810",[51,0.905,59,1.191,72,0.984,80,1.531,81,1.394,107,2.45,110,1.907,111,3.502,147,2.894,159,2.238,183,2.529,271,2.332,470,1.294,571,2.434,702,1.531,4208,9.391,4209,9.391,4210,7.306,4211,7.306]],["t/1812",[33,2.521,37,1.375,50,0.914,51,0.931,59,1.18,64,1.356,72,0.673,80,1.047,81,0.953,110,1.331,129,3.159,148,1.697,167,3.476,216,1.558,256,3.187,271,1.595,355,4.933,398,4.221,435,1.686,470,0.885,562,5.741,571,1.665,702,1.047,767,2.66,823,2.644,1222,6.821,1404,7.477,2773,3.546,3778,4.57,4212,4.997,4213,6.213,4214,4.288,4215,4.997,4216,8.012,4217,4.997,4218,4.997]],["t/1814",[33,1.508,35,1.192,37,1.634,51,0.897,59,1.197,60,2.03,72,0.686,80,1.067,81,0.972,95,2.663,100,3.019,110,1.349,129,2.222,159,1.56,167,3.304,256,3.231,271,1.626,355,4.254,429,2.078,435,1.719,442,2.999,470,0.902,501,3.843,504,3.986,571,1.697,702,1.067,823,2.681,846,3.049,1222,6.288,1404,7.107,1738,7.687,4213,6.3,4214,4.371,4216,7.387,4219,7.341,4220,5.094,4221,5.094,4222,5.094,4223,7.341,4224,5.094,4225,5.094,4226,5.094]],["t/1816",[32,3.49,37,1.292,51,0.905,59,1.109,72,0.916,80,1.425,81,1.298,106,2.573,148,2.31,159,2.084,185,2.519,271,2.172,311,3.49,470,1.205,559,2.434,571,2.267,702,1.425,805,3.622,836,7.115,3729,6.221,4227,6.803,4228,6.221,4229,6.803,4230,6.803,4231,8.965,4232,8.965,4233,6.803,4234,6.803]],["t/1818",[3,1.576,50,1.102,51,0.878,59,1.347,72,0.811,80,1.262,81,1.576,95,2.185,106,2.279,110,1.733,129,4.113,147,2.546,191,3.167,240,4.163,248,2.439,256,2.652,271,1.923,286,3.886,346,2.099,393,2.478,429,2.458,436,7.114,470,1.067,571,2.008,702,1.262,920,3.387,1151,3.387,1375,3.438,1497,5.171,1818,4.275,3284,4.402,4235,6.025,4236,6.025,4237,8.262,4238,6.025,4239,6.025,4240,6.025]],["t/1820",[37,1.454,40,3.029,51,0.756,59,1.248,60,3.052,72,1.032,80,1.605,81,1.461,110,1.408,112,2.23,148,2.601,151,3.797,185,2.836,216,2.388,271,2.445,470,1.357,571,2.552,583,3.84,702,1.605,1924,5.048,2565,5.994,4241,7.66,4242,7.66,4243,7.66]],["t/1822",[37,2.044,51,0.894,59,1.138,72,0.94,80,1.463,81,1.332,95,3.308,110,1.283,147,2.152,185,2.586,225,2.417,271,2.229,429,2.849,470,1.237,571,2.327,702,1.463,846,4.18,1734,5.993,1735,5.765,1924,4.602,4244,5.699,4245,6.983,4246,9.12,4247,6.983]],["t/1824",[37,0.824,39,4.618,51,0.959,59,1.063,67,2.34,72,0.584,80,0.909,81,0.828,110,1.441,112,1.899,177,2.749,189,4.361,244,2.405,271,1.385,346,2.273,357,2.514,387,2.127,401,4.542,413,2.998,416,3.84,470,0.768,571,1.446,702,0.909,769,2.439,1196,3.541,1198,2.514,1448,2.691,1482,2.743,1547,3.395,1548,3.079,1924,2.859,2090,5.598,2091,5.105,2886,3.968,3089,3.723,4164,3.541,4166,3.723,4167,3.541,4168,3.541,4248,4.339,4249,5.598,4250,3.723,4251,4.339,4252,4.339,4253,4.339,4254,3.723,4255,3.723,4256,3.723,4257,3.723,4258,3.723,4259,3.723,4260,3.723,4261,3.723]],["t/1826",[51,0.849,56,3.853,59,1.773,72,0.787,80,1.945,81,1.77,88,2.261,95,2.935,106,3.511,110,1.706,159,2.843,248,4.054,253,4.012,271,1.867,286,5.22,336,3.5,337,2.722,380,2.898,429,2.385,470,1.036,571,1.948,702,1.225,823,2.135,1173,2.867,1375,3.336,1445,4.575,1480,4.271,1893,4.412,4262,5.847,4263,5.847,4264,5.847]],["t/1828",[37,1.281,50,1.234,51,0.886,59,1.099,72,0.908,80,1.413,81,1.287,88,2.608,110,1.638,131,3.591,147,2.078,159,2.066,216,2.103,239,2.942,249,3.848,271,2.153,274,3.687,314,3.11,346,2.35,359,3.381,393,2.774,470,1.195,571,2.247,607,3.687,702,1.413,766,3.237,1173,3.307,1693,4.351,1706,4.351,3232,6.168,4265,6.745,4266,6.745,4267,6.745]],["t/1830",[35,1.438,37,1.59,50,1.124,51,0.93,59,1.217,72,0.54,80,1.565,81,1.425,82,3.271,88,1.55,95,1.454,110,1.129,131,2.134,151,4.15,177,1.406,187,3.045,216,1.25,225,1.388,239,1.749,244,2.222,248,3.389,249,2.287,271,1.28,346,2.602,359,2.009,393,1.649,429,1.636,470,1.323,571,1.336,607,2.191,702,0.84,716,3.741,766,1.924,767,2.134,772,2.642,773,2.929,809,2.98,940,3.025,1173,1.965,1299,2.929,1387,3.963,1550,3.271,1693,2.586,1706,2.586,1744,3.44,1749,5.013,2663,3.271,3855,5.272,3858,3.666,3859,5.618,3869,3.271,3871,3.271,3909,3.666,3910,3.666,3911,3.666,3912,3.666,4063,3.666,4065,3.666,4066,3.666,4067,5.618,4150,2.77,4268,4.009,4269,6.143,4270,4.009,4271,4.009,4272,4.009,4273,4.009]],["t/1832",[35,1.379,37,1.118,50,1.488,51,0.872,59,1.638,72,0.793,80,1.234,81,1.124,95,2.95,110,1.495,147,1.815,151,4.619,187,2.92,189,2.616,190,3.267,248,2.384,271,1.88,387,2.888,470,1.043,484,2.888,571,1.963,606,3.177,634,3.882,659,5.055,702,1.234,716,3.587,767,3.136,850,3.526,940,4.444,1438,5.772,1464,7.03,1500,4.807,4189,5.055,4274,5.891,4275,5.891,4276,5.891,4277,5.891,4278,5.891]],["t/1834",[40,3.319,50,1.536,51,0.883,59,1.368,66,1.785,72,0.83,80,1.292,81,1.176,95,2.236,129,2.69,151,4.161,191,3.241,253,3.056,271,1.968,311,4.306,416,3.63,429,2.516,470,1.487,571,2.055,634,5.531,702,1.292,716,5.112,823,3.485,1322,4.261,1618,4.652,2890,5.639,4189,5.291,4279,5.291,4280,6.166,4281,6.166,4282,6.166,4283,6.166,4284,6.166,4285,6.166]],["t/1836",[37,1.872,40,3.467,51,0.898,59,1.072,72,0.886,80,1.378,81,1.254,84,3.093,106,2.488,147,2.026,191,3.457,225,2.277,249,3.752,253,3.26,271,2.099,314,3.032,429,2.683,432,3.645,470,1.165,523,5.367,571,2.191,702,1.378,704,3.297,777,3.501,846,3.936,2139,4.434,2857,7.154,3869,5.367,4286,6.014,4287,6.577,4288,6.577,4289,6.577]],["t/1838",[37,1.804,51,0.91,59,1.213,72,1.002,80,1.56,81,1.42,147,2.928,159,2.28,185,3.877,271,2.376,470,1.318,571,2.48,702,1.56,722,7.17,777,3.963,984,4.705,2716,6.388,4290,7.443]],["t/1840",[32,1.986,37,0.735,51,0.965,59,1.531,72,0.805,80,1.722,81,1.695,108,1.367,110,0.712,150,4.302,151,1.919,159,2.722,166,2.447,183,1.34,248,1.567,271,1.909,432,2.146,470,1.574,482,2.116,571,1.29,702,0.811,777,2.061,831,2.497,855,3.709,4291,3.54,4292,8.886,4293,8.886,4294,3.871,4295,3.871,4296,3.871,4297,3.871,4298,3.871,4299,3.871,4300,3.871,4301,3.871,4302,3.871,4303,3.871,4304,3.871,4305,3.871,4306,3.871,4307,3.871,4308,3.871,4309,3.871,4310,5.981,4311,3.871,4312,3.871,4313,3.871,4314,7.308,4315,3.871,4316,3.871,4317,5.981,4318,3.871]],["t/1842",[32,3.931,35,1.266,37,2.015,50,0.989,51,0.87,59,0.881,72,0.728,80,1.133,81,1.031,88,2.091,110,1.635,131,2.879,150,5.238,151,2.68,159,1.656,177,1.896,187,2.68,216,1.686,225,1.872,239,2.359,248,2.189,249,3.085,271,1.726,346,2.67,359,2.71,393,2.224,429,2.206,470,0.958,482,2.956,571,1.802,607,2.956,702,1.133,766,2.595,767,2.879,772,3.563,777,2.879,831,3.488,1173,2.651,1693,3.488,1706,3.488,4150,3.736,4319,5.407,4320,5.407,4321,5.407,4322,5.407,4323,5.407,4324,8.898,4325,5.407]],["t/1844",[32,3.838,35,1.224,37,0.993,51,0.902,59,0.852,72,0.704,80,1.095,81,0.997,107,2.508,110,1.605,111,3.762,147,1.611,150,4.404,151,4.33,159,1.602,177,1.834,183,3.633,187,2.592,225,1.81,248,2.116,271,1.669,346,1.822,429,2.133,470,0.926,482,2.858,484,2.563,571,1.742,606,2.82,702,1.095,777,2.783,831,3.372,965,3.613,1437,5.853,1780,4.091,1841,3.078,2773,3.71,4150,3.613,4291,4.781,4326,4.487,4327,5.228,4328,7.48,4329,7.48,4330,7.48]],["t/1846",[32,3.749,35,1.711,37,0.961,51,0.885,59,0.825,72,0.682,80,1.06,81,0.965,110,1.576,147,1.559,150,4.302,151,4.251,159,1.55,177,1.775,187,3.622,225,1.752,248,2.048,271,1.616,346,1.763,387,3.583,429,2.065,470,0.896,482,2.766,484,2.481,571,1.686,606,2.73,702,1.06,716,3.082,767,2.694,777,2.694,831,3.264,850,3.029,855,5.319,912,3.809,940,3.819,965,3.497,1464,5.514,1780,3.96,1841,2.979,2773,3.591,4150,3.497,4326,4.343,4331,9.392,4332,5.061,4333,5.061,4334,7.307,4335,7.307,4336,7.307,4337,5.061]],["t/1848",[32,3.802,35,1.735,37,0.98,51,0.875,59,0.841,72,0.695,80,1.081,81,0.984,110,1.594,147,1.59,150,4.362,151,4.298,159,1.581,177,1.81,187,3.673,190,2.976,225,1.786,231,2.403,248,2.089,271,1.647,346,1.798,387,3.633,429,2.105,470,0.914,482,2.821,484,2.53,571,1.719,606,2.783,702,1.081,716,3.143,767,2.747,777,2.747,831,3.328,850,3.089,912,4.64,940,3.893,965,3.565,1438,5.258,1464,5.591,1780,4.038,1841,3.038,2773,3.662,4150,3.565,4326,4.428,4338,5.16,4339,5.16,4340,5.16,4341,5.16,4342,7.41]],["t/1850",[33,1.391,37,1.561,50,1.267,51,0.928,59,1.128,66,1.361,72,0.633,80,0.985,81,0.896,95,1.705,110,0.864,112,1.368,129,2.05,150,4.839,151,3.432,159,1.44,167,2.428,189,3.651,191,2.471,253,2.33,271,1.5,311,4.217,416,2.767,429,2.825,432,2.605,433,3.032,456,4.076,469,2.032,470,1.226,471,3.434,483,2.682,559,1.682,571,1.566,702,0.985,823,3.002,1084,3.434,1322,3.248,1330,2.915,1339,3.835,1507,3.835,1618,3.546,4090,4.033,4091,4.033,4097,4.033,4099,4.033,4100,4.033,4279,4.033,4343,6.924,4344,4.7,4345,4.7,4346,4.7,4347,4.7,4348,4.298,4349,4.298,4350,4.298,4351,4.7]],["t/1852",[33,1.9,51,0.937,59,1.405,72,0.864,80,1.344,81,1.224,110,1.179,159,1.966,190,2.577,271,2.048,327,2.705,413,4.434,470,1.136,571,2.138,702,1.344,777,3.416,823,2.343,1482,6.582,1568,4.841,1605,5.868,2377,4.687,4352,6.416,4353,6.416,4354,9.739,4355,6.416,4356,6.416,4357,6.416,4358,6.416,4359,6.416]],["t/1854",[35,1.292,37,1.048,40,2.183,51,0.857,59,1.592,72,0.743,80,1.886,81,1.717,110,1.963,159,1.691,185,2.044,190,2.217,193,5.072,194,2.866,271,1.762,314,2.545,470,1.377,571,1.839,575,3.722,583,4.511,702,1.157,766,2.65,767,2.939,1438,3.917,2139,3.722,2270,4.737,2273,4.32,3856,4.505,4198,5.048,4244,4.505,4360,5.52,4361,5.52,4362,5.52,4363,5.52,4364,5.52,4365,5.52,4366,5.52,4367,5.52,4368,5.52,4369,7.775]],["t/1856",[20,1.787,33,1.425,35,1.127,37,0.914,51,0.86,59,1.495,72,0.648,80,1.746,81,1.59,110,1.532,150,5.401,151,2.386,159,1.475,166,3.043,167,2.472,177,1.689,185,1.783,190,1.933,191,2.531,193,4.763,194,2.5,248,2.852,271,1.537,309,2.597,432,2.668,433,3.105,442,2.834,469,2.082,470,0.853,571,1.604,575,3.246,583,3.532,690,3.929,702,1.009,716,4.292,767,3.752,822,2.413,1151,2.707,1190,4.829,1438,3.416,2139,3.246,2273,3.767,3856,3.929,3871,3.929,3872,4.403,4244,3.929,4370,4.814,4371,4.814,4372,7.047,4373,4.814,4374,4.814,4375,4.814,4376,4.814,4377,4.814]],["t/1858",[33,1.646,35,1.301,37,1.055,51,0.836,59,1.597,72,0.749,80,1.893,81,1.723,110,1.66,148,1.888,159,1.703,185,2.059,187,2.756,190,2.233,193,5.088,194,2.886,271,1.775,314,3.603,385,5.084,470,0.985,571,1.852,575,3.748,583,3.916,607,4.271,702,1.165,767,2.959,940,4.194,1438,3.945,1627,3.945,1730,3.841,2139,5.268,2273,4.35,2774,5.084,3856,4.537,4187,5.084,4192,5.084,4244,4.537,4378,5.559,4379,5.084,4380,5.559,4381,5.559,4382,5.559,4383,5.559]],["t/1860",[3,1.843,21,2.573,35,2.147,37,1.742,50,1.678,54,5.513,59,1.148,60,2.808,72,0.949,114,4.314,129,3.074,191,3.703,256,3.101,271,2.249,442,4.148,509,4.643,560,4.314,571,2.348,606,3.8,673,4.822,684,5.75,702,1.476,736,5.513,1166,5.157,1171,5.316,1627,4.999,4384,7.045]],["t/1862",[51,0.883,59,1.299,72,1.073,80,1.67,81,1.52,110,1.465,147,3.057,159,2.441,271,2.544,470,1.411,571,2.655,702,1.67,1462,6.838,4385,9.921,4386,7.969,4387,7.969]],["t/1864",[33,1.321,37,1.513,50,1.219,51,0.92,59,1.086,66,1.292,72,0.601,80,0.935,81,0.851,95,1.618,110,0.82,112,1.299,129,1.946,147,2.052,148,2.262,159,1.367,167,2.796,189,3.54,191,2.345,253,2.211,271,1.424,311,4.089,416,2.626,429,3.252,432,3.692,433,4.297,456,3.921,463,5.823,469,1.929,470,1.18,471,4.866,483,2.545,559,1.596,571,1.486,702,0.935,823,2.911,1084,3.259,1322,3.083,1330,2.767,1339,3.641,1507,3.641,1618,3.366,1729,3.008,3353,4.08,4090,3.828,4091,3.828,4097,3.828,4099,3.828,4100,3.828,4279,3.828,4348,4.08,4349,4.08,4350,4.08,4388,6.661,4389,4.461,4390,4.461,4391,4.461,4392,4.461,4393,4.461]],["t/1866",[51,0.87,59,1.248,60,3.857,72,1.032,80,1.605,81,1.461,110,1.779,112,2.23,159,2.347,271,2.445,337,4.506,470,1.357,571,2.552,702,1.605,1184,3.797,1462,6.573,4394,9.678,4395,7.66]],["t/1868",[40,2.401,51,0.795,56,4.001,59,1.543,72,0.818,80,1.74,81,1.584,88,2.347,95,3.012,106,3.142,110,1.526,175,2.747,248,2.457,249,3.464,253,3.01,271,1.938,380,4.692,470,1.075,484,2.977,523,4.955,571,2.023,697,3.192,702,1.272,809,2.945,846,3.634,1137,4.955,1375,3.464,1547,4.751,2129,5.552,2139,4.093,3501,4.955,3506,5.21,3700,5.552,4286,7.595,4396,6.071,4397,6.071,4398,6.071,4399,6.071,4400,6.071]],["t/1870",[3,1.386,51,0.944,59,1.231,72,1.017,80,1.582,81,1.44,88,2.049,105,2.272,110,1.763,167,1.858,189,3.354,220,2.718,248,3.882,253,2.626,271,1.691,286,4.871,380,2.626,470,1.337,571,1.765,702,1.11,805,2.821,823,1.935,1375,3.023,1568,3.998,1614,4.845,1841,3.119,4401,5.298,4402,5.298,4403,8.799,4404,5.298,4405,5.298,4406,5.298,4407,5.298,4408,7.552,4409,5.298,4410,5.298,4411,7.552,4412,5.298]],["t/1872",[37,0.914,39,4.955,40,1.904,50,0.881,51,0.957,59,1.149,67,2.597,72,0.648,80,1.009,81,0.918,95,1.746,110,1.295,112,2.052,177,1.689,189,4.53,271,1.537,401,4.083,416,2.834,470,0.853,571,1.604,702,1.009,1198,2.789,1448,4.37,1482,3.043,1547,3.767,1548,3.416,1924,3.173,2091,5.514,3089,6.047,4164,5.751,4166,4.131,4167,3.929,4168,3.929,4249,4.131,4250,4.131,4254,4.131,4255,4.131,4256,4.131,4257,4.131,4258,4.131,4259,4.131,4260,4.131,4261,4.131,4413,4.814]],["t/1874",[37,0.872,39,4.881,40,1.815,50,0.84,51,0.955,59,1.109,67,2.476,72,0.618,80,0.962,81,0.876,95,1.665,110,1.251,112,1.981,177,1.61,189,4.454,271,1.466,401,3.942,416,2.703,470,0.813,516,4.198,571,1.53,702,0.962,757,3.449,1001,3.746,1198,2.66,1241,2.796,1448,4.22,1482,2.902,1547,3.592,1548,3.258,1924,3.025,2091,5.324,4164,5.553,4167,3.746,4168,3.746,4249,3.94,4250,3.94,4254,3.94,4255,3.94,4256,3.94,4257,3.94,4258,3.94,4259,3.94,4260,3.94,4261,3.94,4414,4.591,4415,4.591]],["t/1876",[32,4.088,51,0.843,72,1.073,95,2.89,107,2.672,111,2.972,185,2.951,271,2.544,470,1.411,571,2.655,702,1.67,784,4.48,983,7.287,984,5.037,986,7.248,1437,6.235,1500,6.503,2716,6.838]],["t/1878",[20,1.292,33,1.508,37,0.967,50,0.932,51,0.886,59,1.627,60,2.03,61,2.372,72,1.159,80,1.538,81,1.4,95,1.847,110,1.582,132,2.262,159,2.249,185,1.886,190,2.046,216,1.588,271,2.748,327,2.147,336,3.049,337,4.843,470,1.3,546,4.371,549,4.157,571,2.868,694,3.843,699,2.906,702,1.538,848,3.519,885,3.986,914,2.999,1184,4.267,2705,4.371,3284,3.721,3702,4.658,4416,5.094,4417,5.094,4418,5.094,4419,5.094,4420,5.094,4421,5.094,4422,5.094,4423,5.094]],["t/1880",[33,1.558,35,1.232,37,0.999,39,4.123,40,2.972,50,0.963,51,0.789,59,1.429,60,2.097,72,0.709,80,1.575,81,1.434,95,1.909,107,1.765,108,1.858,110,1.611,111,1.963,148,1.787,181,3.003,183,1.822,185,1.949,216,2.343,220,2.7,271,1.68,311,2.7,314,3.466,330,5.193,398,2.609,429,2.147,470,1.331,571,1.754,575,3.548,702,1.103,712,3.264,767,2.802,769,2.959,777,2.802,1020,3.395,1151,2.959,1158,3.971,1371,4.295,1387,3.395,1841,3.098,2102,4.517,2625,4.517,2893,4.517,3195,4.813,3874,4.813,4424,5.263,4425,5.263,4426,4.813,4427,5.263,4428,5.263,4429,5.263,4430,5.263]],["t/1882",[27,3.444,33,1.84,50,1.137,51,0.865,59,1.375,60,2.477,61,3.929,72,0.837,80,1.302,81,1.185,110,1.551,190,2.496,193,4.975,194,4.381,216,1.937,271,1.984,315,5.831,336,3.72,337,3.929,470,1.101,571,2.071,575,4.19,702,1.302,772,4.095,1184,3.081,1366,5.072,2335,7.717,2852,4.689,3284,4.54,4426,5.683,4431,6.215,4432,8.438,4433,6.215,4434,6.215]],["t/1884",[33,2.731,37,1.752,51,0.899,59,1.159,72,0.957,80,1.489,81,1.356,148,2.414,159,2.178,177,2.493,185,2.632,216,2.216,271,2.269,311,3.647,346,2.477,398,3.524,470,1.259,571,2.369,583,3.563,702,1.489,774,3.94,775,3.94,2204,6.74,4228,6.501,4379,6.501]],["t/1886",[33,2.129,37,1.765,48,1.681,50,0.558,51,0.914,59,0.807,61,1.42,72,0.667,80,1.037,81,0.944,104,0.543,107,1.66,110,1.557,111,1.846,112,0.888,129,1.331,132,1.355,139,3.735,189,2.199,216,0.951,225,1.056,309,2.67,346,1.725,417,2.51,443,4.04,456,2.914,467,2.282,470,0.877,480,5.715,491,2.056,505,3.338,565,1.565,702,0.639,708,1.254,712,1.892,822,2.482,823,1.114,1191,1.767,1222,3.617,1288,1.892,1499,2.825,1599,2.489,1735,1.928,2165,3.735,2594,2.789,2640,2.301,2773,4.434,3114,5.363,3178,4.04,3298,2.789,3444,2.617,3959,4.527,4435,3.05,4436,3.05,4437,4.951,4438,3.05,4439,3.05,4440,4.951,4441,4.951,4442,4.951,4443,6.249,4444,6.249,4445,4.951,4446,3.05,4447,8.47,4448,3.05,4449,4.951,4450,3.05,4451,3.05,4452,3.05,4453,3.05,4454,3.05,4455,3.05,4456,3.05,4457,3.05,4458,3.05,4459,3.05,4460,3.05,4461,3.05,4462,3.05,4463,3.05,4464,3.05,4465,4.951,4466,4.951,4467,4.951,4468,3.05,4469,3.05,4470,3.05,4471,3.05,4472,3.05,4473,3.05,4474,3.05]],["t/1888",[27,4.049,51,0.905,59,1.191,72,0.984,80,1.531,81,1.394,84,3.436,128,4.655,129,3.187,159,2.238,216,2.278,238,5.621,271,2.332,470,1.294,571,3.458,583,3.662,654,5.184,702,1.531,4475,7.306,4476,7.306,4477,7.306]],["t/1890",[72,1.249,107,3.111,271,2.962,571,3.091,702,1.944,4478,9.278,4479,9.278]],["t/1892",[51,0.882,59,1.614,60,2.643,72,0.893,80,2.075,81,1.889,95,2.405,110,1.82,112,1.931,147,2.043,185,2.456,190,2.663,193,3.443,216,2.067,271,2.117,470,1.175,571,2.937,702,1.39,767,3.53,4130,6.065,4480,6.632,4481,6.632,4482,6.632,4483,6.632,4484,6.632,4485,6.632,4486,6.632]],["t/1894",[32,3.319,35,1.514,37,1.646,50,1.183,51,0.894,59,1.054,72,0.871,80,1.355,81,1.234,110,1.189,147,1.993,159,1.982,167,2.269,179,3.808,190,2.598,231,3.012,271,2.065,413,4.47,470,1.146,571,2.155,702,1.355,817,3.207,1317,4.726,1731,5.279,2554,4.59,3855,5.551,4487,9.779,4488,6.469,4489,6.469,4490,6.469,4491,6.469,4492,6.469,4493,8.67,4494,6.469]],["t/1896",[27,3.417,33,2.485,37,1.594,39,2.9,51,0.937,59,1.005,72,0.83,80,1.292,81,1.176,148,2.094,159,1.889,185,2.283,216,1.922,271,1.968,398,3.056,470,1.092,562,4.157,571,2.797,583,3.091,702,1.292,980,3.755,1158,4.652,1627,5.956,2198,5.291,2214,5.032,2215,5.956,2533,5.291,4050,5.639,4077,5.639,4495,6.166,4496,6.166,4497,6.166,4498,6.166,4499,6.166]],["t/1898",[51,0.888,59,1.109,72,0.916,80,1.425,81,1.298,84,4.216,110,1.648,112,1.98,128,4.444,159,2.084,216,3.126,238,6.001,271,2.172,328,5.323,470,1.205,571,3.341,654,4.827,702,1.425,772,4.483,3572,8.198,3694,8.198,4500,6.803]],["t/1900",[14,4.407,37,1.02,51,0.923,56,3.539,59,0.875,60,2.14,72,0.723,80,1.125,81,1.024,84,4.169,148,3.01,149,5.842,159,1.645,271,1.714,274,5.275,309,2.896,311,3.912,441,4.82,470,0.951,565,2.755,571,1.789,702,1.125,767,2.859,769,3.019,969,3.923,980,4.643,1133,3.019,1397,4.911,2103,4.609,2527,9.32,2565,4.202,2712,4.609,3172,4.911,4501,5.37,4502,7.625,4503,5.37,4504,5.37]],["t/1902",[51,0.872,59,1.486,72,0.94,80,1.463,81,1.332,129,3.046,159,2.139,189,3.101,190,2.804,271,2.229,327,2.944,337,5.013,470,1.237,571,2.327,702,1.463,968,5.269,1184,5.034,1286,5.464,3300,5.993,3866,5.699,3867,5.699,4505,5.993,4506,6.983,4507,6.983,4508,5.993]],["t/1904",[37,1.683,51,0.884,59,1.445,72,0.901,80,1.401,81,1.276,129,2.918,159,2.049,189,2.97,190,2.686,271,2.135,337,5.271,470,1.184,571,2.228,702,1.401,745,3.656,920,3.76,1184,4.928,1286,5.233,3866,5.458,3867,5.458,4505,5.739,4508,5.739,4509,6.688,4510,6.688,4511,6.688]],["t/1906",[37,1.742,51,0.874,59,1.495,72,0.949,80,1.476,81,1.344,159,2.158,189,3.129,190,2.829,271,2.249,337,5.03,470,1.248,571,2.348,702,1.476,1184,5.056,1286,5.513,3866,5.75,3867,5.75,4505,6.046,4508,6.046,4512,7.045,4513,7.045,4514,7.045]],["t/1908",[32,3.49,51,0.888,59,1.109,72,0.916,80,1.425,81,1.298,107,2.281,111,3.343,147,3.09,148,2.31,159,2.084,271,2.172,311,3.49,317,3.532,470,1.205,515,5.133,571,2.267,702,1.425,887,4.219,1195,5.133,1437,5.323,1499,5.115,1582,6.221,2850,4.827,4032,5.838,4515,8.965,4516,6.803,4517,6.803]],["t/1910",[20,1.981,33,1.646,37,1.483,50,1.017,51,0.913,59,1.273,64,1.508,72,0.749,80,1.165,81,1.06,110,1.022,129,3.408,148,1.888,159,1.703,167,2.74,216,1.733,256,3.439,271,1.775,398,2.756,435,1.876,470,0.985,571,1.852,702,1.165,767,2.959,823,2.853,1071,4.061,1222,4.061,1404,5.895,2074,6.376,2075,4.537,2773,3.945,4093,5.084,4213,6.705,4214,4.771,4216,4.771,4518,5.559,4519,5.559,4520,5.559,4521,5.559,4522,5.559,4523,5.559,4524,5.559,4525,5.559,4526,5.559]]],"invertedIndex":[["",{"_index":51,"t":{"733":{"position":[[258,1],[333,2]]},"737":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[570,1],[572,2],[588,2],[591,1],[759,1],[761,2],[777,2],[780,1],[802,1]]},"739":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[427,2],[536,1],[538,2],[554,2],[557,1],[579,1]]},"741":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[513,1],[515,2],[531,2],[534,1],[556,1]]},"751":{"position":[[20,1],[160,1],[174,1],[180,2],[373,3],[377,1],[417,1],[476,2],[524,1],[686,2],[689,3],[693,2],[725,1]]},"759":{"position":[[82,2]]},"761":{"position":[[20,1],[95,1],[109,1],[115,2],[170,1],[199,2],[206,2],[323,1],[377,1]]},"763":{"position":[[20,1],[138,1],[152,1],[171,2],[336,1],[342,2],[397,1],[426,2],[433,2],[483,1],[537,1]]},"771":{"position":[[458,1]]},"773":{"position":[[626,1],[780,1],[794,1],[798,1],[839,3],[919,1],[937,2],[944,1],[955,2],[1020,1],[1022,2],[1129,1],[1131,1],[1165,2],[1205,2],[1212,2],[1309,3],[1332,2],[1360,1],[1369,2],[1410,2],[1417,1],[1473,1],[1491,1],[1554,1],[1571,2],[1612,1],[1621,2],[1662,2],[1669,1],[1711,1],[1853,2],[1856,1],[1894,2],[1928,1]]},"775":{"position":[[134,1],[152,2],[159,1],[170,2],[235,1],[237,2],[321,1],[323,1],[338,2],[341,2]]},"785":{"position":[[20,1],[114,1],[128,1],[134,2],[159,2],[236,3],[279,1],[318,2],[352,1]]},"795":{"position":[[20,1],[118,1],[132,1],[138,2],[160,2],[277,3],[320,1],[359,2],[369,2],[397,2],[404,1],[453,1],[455,1]]},"799":{"position":[[34,1]]},"805":{"position":[[20,1],[131,1],[145,1],[151,2],[166,2],[207,2],[257,2],[366,3],[370,2],[446,1],[479,1],[486,2],[514,2],[537,2],[574,2],[584,2],[592,2],[601,1],[649,1],[651,2],[679,2],[764,1],[778,1],[780,2],[802,2],[855,2],[913,2],[960,2],[967,1],[1022,1],[1061,1],[1099,1],[1135,1],[1173,1],[1180,2],[1220,2],[1256,2],[1312,1],[1314,1],[1322,1]]},"807":{"position":[[125,1],[244,1]]},"809":{"position":[[20,1],[164,1],[170,1],[172,2],[245,2],[324,2],[410,1],[424,1],[430,2],[445,2],[536,2],[581,1],[617,2],[624,1],[665,1],[667,2],[708,2],[758,2],[893,2],[896,3],[900,2],[976,1],[1009,1],[1016,2],[1044,2],[1067,2],[1104,2],[1114,2],[1122,2],[1131,1],[1179,1],[1181,2],[1209,2],[1294,1],[1308,1],[1310,2],[1332,2],[1385,2],[1443,2],[1484,2],[1491,1],[1588,1],[1627,1],[1665,1],[1701,1],[1739,1],[1746,2],[1786,2],[1822,2],[1878,1],[1880,1],[1888,1]]},"815":{"position":[[691,1],[801,1],[815,1],[821,2],[898,3],[942,1],[970,2],[973,1],[1008,1],[1057,1],[1059,2],[1112,2],[1129,1],[1207,1],[1209,2],[1294,2],[1337,1],[1339,1]]},"823":{"position":[[365,2]]},"827":{"position":[[85,1],[134,1],[157,2],[171,1],[238,1],[240,1],[262,1],[332,1],[346,1],[352,2],[374,2],[377,1],[415,2],[430,1],[445,2],[454,1],[456,1],[462,2],[792,1],[869,2],[876,2],[879,1],[948,1],[977,2],[1000,1]]},"839":{"position":[[20,1],[507,1],[520,1],[562,1],[567,2],[596,1],[605,2],[647,2],[654,1],[715,1],[717,3],[725,2],[817,1],[844,2],[894,1],[899,2],[922,2],[1001,2],[1035,1],[1080,1],[1096,2],[1143,2],[1150,1],[1167,1],[1172,2],[1397,3],[1401,1],[1560,1],[1614,1],[1624,2],[1733,2],[1742,1],[1770,1],[1789,1]]},"859":{"position":[[77,1],[146,1],[181,2]]},"863":{"position":[[4,2],[33,4],[94,1]]},"869":{"position":[[20,1],[97,1],[111,1],[117,2],[172,1],[174,2],[223,2],[306,1],[350,1],[384,2],[444,1],[446,2],[523,2],[559,2],[592,2],[633,2],[636,2],[639,2],[737,1],[767,1],[773,1],[791,1],[814,2],[821,1],[855,1],[892,1],[923,2],[930,1],[965,1],[967,1],[969,3],[1004,2],[1069,2],[1108,1]]},"871":{"position":[[130,2],[207,1],[256,2],[259,3],[320,4]]},"874":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"886":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"888":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"890":{"position":[[48,1],[173,1],[188,1]]},"900":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"902":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"904":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"914":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"916":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"918":{"position":[[18,1],[85,1],[203,1]]},"928":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"930":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"932":{"position":[[0,2],[57,1],[126,1],[172,1]]},"942":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"944":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"946":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"948":{"position":[[302,4]]},"956":{"position":[[134,2],[163,2],[196,2]]},"958":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"960":{"position":[[18,1],[193,1]]},"970":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"972":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"974":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"984":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"986":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"988":{"position":[[18,1],[56,1]]},"998":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"1000":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"1002":{"position":[[18,1],[43,1],[58,1]]},"1012":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"1014":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"1016":{"position":[[18,1],[43,3],[141,1]]},"1026":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"1028":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"1030":{"position":[[18,1],[43,3],[150,1],[185,1]]},"1040":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"1042":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"1044":{"position":[[18,1],[43,3],[150,1],[165,1]]},"1054":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"1056":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"1058":{"position":[[18,1],[78,1]]},"1068":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"1070":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"1072":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"1082":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"1084":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"1086":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]},"1096":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"1098":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"1100":{"position":[[18,1],[57,2],[97,1]]},"1110":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"1112":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"1114":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"1124":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"1126":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"1128":{"position":[[18,1],[110,1],[182,1],[197,1]]},"1130":{"position":[[155,1],[194,1]]},"1134":{"position":[[20,1],[58,2],[119,2],[156,2],[198,2],[207,2],[296,1],[310,1],[312,2],[366,2],[435,2],[467,2],[516,2],[583,2],[635,2],[716,2],[744,2],[832,2],[860,2],[966,2],[996,2],[1078,5],[1084,2],[1124,2],[1239,1],[1256,1],[1258,1],[1265,1],[1267,3],[1271,2],[1274,2],[1352,2],[1394,2],[1397,2],[1459,2],[1558,1],[1622,2],[1625,2],[1628,2],[1702,1],[1766,2],[1785,2],[1819,1]]},"1138":{"position":[[205,1],[307,1],[321,1],[330,2],[386,2],[428,2],[431,2],[444,2],[456,1],[540,1],[645,1],[659,1],[668,2],[737,2],[779,2],[782,2],[795,2],[807,1],[896,1],[1001,1],[1015,1],[1024,2],[1096,2],[1138,2],[1141,2],[1162,2],[1174,1],[1260,1],[1333,2],[1393,1],[1407,1],[1416,2],[1464,2],[1506,2],[1509,2],[1557,1]]},"1144":{"position":[[18,1],[52,1],[68,1],[102,1],[205,1],[276,1],[351,1],[365,1],[367,2],[397,2],[427,2],[457,2],[502,2],[512,2],[563,2],[599,2],[641,2],[682,1],[684,2],[762,2],[765,2],[812,1],[814,2],[912,2],[931,2],[965,1]]},"1148":{"position":[[271,1],[348,1],[362,1],[364,2],[394,2],[428,2],[458,2],[503,2],[513,2],[566,2],[602,2],[644,2],[685,1],[687,2],[765,2],[768,2],[815,1],[817,2],[915,2],[934,2],[968,1]]},"1152":{"position":[[21,2],[57,2],[81,2],[117,2],[353,1],[431,1],[445,1],[447,2],[477,2],[513,2],[543,2],[588,2],[598,2],[652,2],[688,2],[730,2],[771,1],[773,2],[851,2],[854,2],[901,1],[903,2],[1001,2],[1020,2],[1054,1]]},"1154":{"position":[[15,2],[87,2],[97,2],[100,2],[481,1],[578,1],[635,1],[637,2],[667,2],[742,2],[778,2],[820,2],[861,1],[863,2],[946,2],[949,2],[983,1]]},"1156":{"position":[[0,2],[63,1],[76,2],[98,1],[139,4],[148,1],[157,2],[160,1],[162,2],[192,2],[228,2],[285,2],[321,2],[462,2],[562,2],[578,2]]},"1160":{"position":[[18,3],[40,2],[62,3],[84,2],[311,1],[393,1],[407,1],[409,2],[439,2],[476,2],[506,2],[551,2],[561,2],[612,2],[648,2],[690,2],[731,1],[733,2],[811,2],[814,2],[861,1],[863,2],[961,2],[980,2],[1014,1]]},"1164":{"position":[[48,3],[101,3],[332,1],[408,1],[422,1],[424,2],[454,2],[486,2],[516,2],[561,2],[571,2],[623,2],[659,2],[701,2],[742,1],[744,2],[822,2],[825,2],[872,1],[874,2],[972,2],[991,2],[1025,1]]},"1166":{"position":[[20,1],[112,1],[166,1],[175,2],[224,2],[260,2],[302,2],[343,1],[345,2],[458,2],[461,2],[495,1],[604,3],[663,3]]},"1168":{"position":[[20,1],[128,1],[182,1],[191,2],[256,2],[322,1],[348,2],[351,1],[353,2],[389,2],[469,1],[471,2],[562,2],[565,2],[599,1]]},"1174":{"position":[[470,2]]},"1178":{"position":[[207,1],[213,1],[289,1],[449,1],[856,2],[878,1],[900,1],[909,2],[927,2],[956,1],[980,2],[1002,1],[1227,2],[1309,1],[1498,1],[1597,1],[1626,2],[1799,2],[1829,1],[1831,1],[1844,3],[1861,2],[1934,2],[1958,2],[1961,2]]},"1180":{"position":[[18,4],[204,2],[207,1],[209,3],[310,2],[324,3],[407,2],[434,2],[560,2],[563,3],[740,2],[743,3],[831,1],[888,2]]},"1182":{"position":[[558,2],[892,2],[913,2],[1327,1],[1351,1],[1374,1],[1401,1],[1856,5]]},"1184":{"position":[[577,1],[605,1],[619,1],[625,2],[734,1],[1022,1],[1072,1],[1085,1],[1108,1],[1116,1],[1725,2],[1767,2],[1774,2]]},"1186":{"position":[[240,2],[262,3],[296,2],[334,2],[372,1],[409,2],[447,1],[484,2],[591,2],[679,2],[693,2]]},"1188":{"position":[[674,2],[759,2],[1465,1],[1641,1],[1872,2],[1891,1],[1922,1],[1985,1],[2016,1],[2047,1],[2069,2],[2076,1],[2089,1],[2155,1],[2210,1],[2259,1],[2310,1],[2726,2],[2738,1],[2755,1]]},"1190":{"position":[[198,1],[220,1],[271,1],[284,2],[299,1],[313,1],[320,1],[335,1],[337,1],[1076,2],[1108,1],[1120,1],[1139,1],[1193,1],[1195,2],[1232,2],[1301,2],[1379,1],[1392,2],[1407,1],[1421,1],[1436,2],[1439,2],[1442,1],[1444,2],[1492,2],[2159,1],[2455,2],[2524,1],[2633,1],[2646,2],[2651,2],[2662,2],[2677,1],[2691,1],[2706,2],[3006,2],[3044,2],[3672,1],[3770,1],[3785,2],[4068,1],[4405,1],[4456,2],[4509,1],[4514,2],[4532,2],[4615,1],[4628,2],[4633,2],[4644,2],[4659,1],[4673,1],[4688,2],[4716,2],[4723,1],[4784,1],[4786,1]]},"1194":{"position":[[278,2],[289,2],[328,1],[403,1],[417,1],[419,2],[449,2],[479,2],[509,2],[554,2],[564,2],[614,2],[650,2],[692,2],[733,1],[735,2],[813,2],[816,2],[863,1],[865,2],[963,2],[982,2],[1016,1]]},"1198":{"position":[[23,3],[49,2],[71,3],[97,2],[341,1],[421,1],[435,1],[437,2],[467,2],[507,2],[537,2],[624,2],[706,2],[716,2],[789,2],[825,2],[867,2],[908,1],[910,2],[988,2],[991,2],[1038,1],[1040,2],[1138,2],[1157,2],[1191,1]]},"1202":{"position":[[256,1],[288,1],[363,2],[377,2],[396,1],[410,1],[412,2],[442,2],[472,2],[502,2],[547,2],[557,2],[607,2],[643,2],[685,2],[726,1],[728,2],[806,2],[809,2],[856,1],[858,2],[956,2],[975,2],[1009,1]]},"1206":{"position":[[19,2],[56,1],[64,2],[130,1],[171,1],[275,1],[307,1],[383,2],[397,2],[416,1],[430,1],[432,2],[462,2],[494,2],[524,2],[569,2],[579,2],[631,2],[667,2],[709,2],[750,1],[752,2],[830,2],[833,2],[880,1],[882,2],[980,2],[999,2],[1033,1]]},"1212":{"position":[[531,1],[533,2],[586,2],[605,2],[608,3],[612,1],[810,1],[812,2],[865,2],[884,2],[906,2],[967,2],[985,2],[1018,2],[1021,3],[1025,1],[1167,1],[1169,2],[1205,2],[1242,2],[1245,3],[1249,2],[1461,2],[1505,2]]},"1214":{"position":[[143,1],[149,2],[202,1],[241,2],[264,1]]},"1216":{"position":[[329,2],[639,2],[685,3],[727,1],[766,2],[780,2],[867,1],[897,1],[899,1],[920,2],[923,2],[962,2],[984,2],[1062,1],[1084,2],[1087,2],[1090,1],[1119,1],[1121,1],[1141,2],[1144,2],[1158,1],[1198,2],[1211,2],[1297,1],[1330,1],[1332,1],[1349,2],[1352,2],[1375,2]]},"1218":{"position":[[271,2]]},"1223":{"position":[[349,2],[352,2],[388,2],[391,2],[429,2],[432,2],[480,2],[549,2],[868,2],[871,2],[914,2],[917,2],[962,2],[965,2],[1188,2],[1276,1],[1278,2],[1366,2],[1444,2],[1509,2],[1559,2],[1627,2],[1676,2],[1738,2],[1784,2],[1850,2],[1905,2],[1974,2],[2025,2],[2072,2],[2075,2],[2105,1],[2172,2],[2219,2],[2286,2],[2289,2],[2347,2],[2423,2],[2426,2],[2475,2],[2546,2],[2549,2],[2598,1],[2608,2],[2752,1],[2781,2]]},"1225":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"1227":{"position":[[133,1],[139,2],[160,2],[201,2],[219,1],[271,1],[309,2],[343,1]]},"1229":{"position":[[156,1],[162,2],[181,2],[200,2],[221,2],[325,2],[351,2],[383,2],[419,2],[422,2],[425,1]]},"1231":{"position":[[146,1],[152,2],[171,2],[201,2],[212,2],[241,2],[277,2],[318,2],[337,2],[366,2],[402,2],[443,2],[490,1]]},"1233":{"position":[[186,1],[192,2],[249,1],[288,2],[355,2],[385,2],[428,1]]},"1235":{"position":[[119,1],[125,2],[167,1],[171,2],[174,3],[178,1]]},"1241":{"position":[[112,1],[139,1],[152,1],[166,1],[172,2],[257,2],[292,3],[296,1],[298,2],[347,1],[356,1],[358,1],[360,1],[411,1],[419,1],[421,1],[423,2],[426,1],[428,1],[480,1],[488,1],[490,1],[492,2],[495,1],[497,1],[553,1],[555,1],[557,1]]},"1243":{"position":[[126,1],[153,1],[166,1],[180,1],[186,2],[373,2],[451,2],[486,3],[490,1],[492,2],[539,1],[548,1],[550,1],[552,1],[596,4],[616,2],[619,1],[685,2],[688,1],[760,1],[762,2],[765,1],[767,1],[795,3],[807,4],[827,2],[830,1],[858,3],[893,2],[896,1],[924,3],[962,1],[964,2],[979,1],[981,1],[1055,1],[1057,2],[1072,1],[1074,1],[1148,1],[1150,2],[1158,1]]},"1245":{"position":[[111,1],[138,1],[151,1],[165,1],[171,2],[230,2],[275,3],[279,1],[281,2],[328,1],[337,1],[381,4],[401,1]]},"1247":{"position":[[211,1],[217,2],[272,1],[336,2],[379,3],[383,1],[385,2],[412,1],[421,1],[423,1],[468,4],[488,1],[490,1]]},"1249":{"position":[[39,1],[51,2]]},"1253":{"position":[[113,2],[157,2]]},"1255":{"position":[[307,1],[349,1],[453,2],[456,1]]},"1257":{"position":[[194,1],[236,1],[340,2],[343,1]]},"1259":{"position":[[390,1],[432,1],[607,2],[610,1]]},"1261":{"position":[[439,1],[481,1],[656,2],[659,1]]},"1263":{"position":[[205,2],[295,1]]},"1265":{"position":[[347,2],[427,1],[454,2],[457,2],[516,2],[519,2],[562,2],[565,2],[585,2],[681,2],[706,2],[723,2],[772,2],[790,1],[800,2],[855,2],[858,2],[875,1]]},"1270":{"position":[[58,2]]},"1274":{"position":[[40,2],[62,2],[156,2],[174,2],[181,1],[194,1],[213,2],[226,2],[229,3]]},"1276":{"position":[[380,2],[383,3]]},"1278":{"position":[[448,2],[460,2],[470,2],[480,2],[490,2]]},"1280":{"position":[[134,2],[137,3]]},"1282":{"position":[[190,2],[193,3]]},"1284":{"position":[[429,2],[432,3]]},"1286":{"position":[[197,2],[200,3]]},"1288":{"position":[[210,2],[213,3]]},"1290":{"position":[[158,2],[161,3]]},"1292":{"position":[[201,2],[204,3]]},"1294":{"position":[[241,2],[244,3]]},"1296":{"position":[[148,2],[214,2],[217,2],[235,2],[297,2],[325,2],[328,2],[343,1],[386,2],[389,2],[459,2],[490,2],[493,2],[737,2],[740,3]]},"1298":{"position":[[182,2],[185,3]]},"1300":{"position":[[178,2],[181,3]]},"1302":{"position":[[109,2],[166,2],[169,2],[236,2],[331,2],[388,2],[391,3]]},"1304":{"position":[[162,2],[228,2],[231,2],[298,2],[402,2],[468,2],[471,3],[772,2],[775,3],[1153,2],[1156,3],[1225,2],[1289,1],[1291,2],[1347,2],[1387,2],[1436,1],[1448,2],[1502,2],[1505,2],[1580,2],[1690,2],[1754,2],[1859,2],[1862,3]]},"1306":{"position":[[168,2],[171,3]]},"1308":{"position":[[138,2],[141,3]]},"1310":{"position":[[217,2],[220,3]]},"1312":{"position":[[188,2],[191,3]]},"1314":{"position":[[98,2],[131,2],[175,2],[229,1],[255,2],[258,3]]},"1316":{"position":[[157,2],[160,3]]},"1318":{"position":[[154,2],[157,3]]},"1320":{"position":[[158,2],[161,3]]},"1322":{"position":[[97,2],[116,2],[119,3]]},"1324":{"position":[[255,2],[300,2],[303,3]]},"1326":{"position":[[190,1],[216,2],[219,3]]},"1328":{"position":[[158,2],[175,2],[178,3]]},"1330":{"position":[[146,2],[164,2],[167,3]]},"1332":{"position":[[232,2],[252,2],[255,3]]},"1334":{"position":[[268,1],[287,2],[312,2],[315,2],[318,3]]},"1336":{"position":[[46,1],[58,1],[66,2],[96,1],[105,2],[135,1],[144,2],[173,1],[181,2],[212,1],[222,2],[247,1],[258,2],[291,1],[303,2],[336,1],[348,2],[379,1],[389,2],[418,1],[426,1],[468,1],[482,1],[508,1],[536,1],[570,1],[610,1],[657,1],[704,1],[758,1],[805,1],[852,1],[904,1],[958,1],[1018,1],[1084,1],[1157,1],[1199,1],[1252,1],[1269,1],[1275,2],[1319,1],[1325,2],[1361,1],[1367,2],[1402,1],[1408,2],[1429,1],[1435,2],[1468,1],[1474,2],[1508,1],[1514,2],[1567,1],[1573,2],[1608,1],[1614,2],[1652,1],[1658,2],[1698,1],[1704,2],[1739,1],[1745,2],[1785,1],[1791,2],[1821,1],[1827,2],[1869,1],[1875,2],[1917,1],[1923,2],[1954,1],[1960,2],[1994,1],[2000,2],[2037,1],[2043,2],[2075,1],[2081,2],[2124,1],[2130,2],[2173,1],[2179,2],[2211,1],[2217,2],[2255,1],[2261,2],[2300,1],[2306,2],[2341,1],[2347,2],[2381,1],[2387,2],[2429,1],[2435,2],[2474,1],[2480,2],[2523,1],[2529,2],[2567,1],[2573,2],[2607,1],[2613,2],[2643,1],[2649,2],[2689,1],[2695,2],[2740,1],[2746,2],[2791,1],[2797,2],[2841,1],[2847,2],[2894,1],[2900,2],[2955,1],[2961,2],[3002,1],[3008,2],[3041,1],[3047,2],[3091,1],[3097,2],[3142,1],[3148,2],[3179,1],[3185,2],[3226,1],[3232,2],[3265,1],[3271,2],[3311,1],[3317,2],[3364,1],[3370,2],[3407,1],[3413,2],[3462,1],[3468,2],[3516,1],[3522,2],[3563,1],[3569,2],[3609,1],[3615,2],[3651,1],[3657,2],[3701,1],[3707,2],[3747,1],[3753,2],[3802,1],[3808,2],[3855,1],[3861,2],[3904,1],[3910,2],[3947,1],[3953,2],[3988,1],[3994,2],[4045,1],[4051,2],[4066,1],[4079,1],[4095,1],[4124,2],[4159,1],[4190,2],[4226,1],[4260,2],[4292,1],[4320,2],[4351,1],[4378,2],[4417,1],[4452,2],[4488,1],[4520,2],[4560,1],[4596,2],[4631,1],[4664,2],[4695,1],[4722,2],[4749,1],[4772,2],[4809,1],[4842,2],[4884,1],[4921,2],[4963,1],[5003,2],[5044,1],[5080,2],[5124,1],[5163,2],[5215,1],[5262,2],[5300,1],[5336,2],[5366,1],[5391,2],[5432,1],[5469,2],[5511,1],[5549,2],[5577,1],[5602,2],[5640,1],[5675,2],[5705,1],[5732,2],[5769,1],[5803,2],[5847,1],[5886,2],[5920,1],[5954,2],[6000,1],[6046,2],[6091,1],[6136,2],[6174,1],[6212,2],[6249,1],[6282,2],[6315,1],[6344,2],[6385,1],[6422,2],[6459,1],[6492,2],[6538,1],[6580,2],[6624,1],[6664,2],[6704,1],[6742,2],[6776,1],[6807,2],[6839,1],[6869,2],[6917,1],[6965,2],[6980,1],[7028,1],[7050,1],[7092,1],[7140,1],[7186,1],[7217,1],[7244,1],[7282,1],[7316,1],[7341,1],[7366,1],[7393,1],[7430,1],[7470,1],[7496,1],[7520,1],[7550,1],[7584,1],[7615,1],[7636,1],[7659,1],[7694,1],[7734,1],[7776,1],[7819,1],[7848,1],[7874,1],[7905,1],[7933,1],[7964,1],[8004,1],[8045,1],[8078,1],[8102,1],[8131,1],[8164,1],[8215,1],[8284,1],[8349,1],[8413,1],[8478,1],[8538,1],[8599,1],[8667,1],[8714,1],[8749,1],[8809,1],[8857,1],[8874,1],[8906,1],[8952,1],[8995,1],[9036,1],[9077,1],[9116,1],[9149,1],[9173,1],[9201,1],[9242,1],[9285,1],[9332,1],[9377,1],[9414,1],[9446,1],[9470,1],[9490,1],[9513,1],[9546,1],[9582,1],[9609,1],[9632,1],[9662,1],[9699,1],[9731,1],[9756,1],[9794,1],[9860,1],[9932,1],[9980,1],[10014,1],[10053,1],[10103,1],[10165,1],[10225,1],[10281,1],[10331,1],[10374,1],[10411,1],[10449,1],[10488,1],[10516,1],[10539,1],[10566,1],[10593,1],[10616,1],[10637,1],[10672,1],[10719,1],[10773,1],[10824,1],[10873,1],[10926,1],[10970,1],[11010,1],[11055,1],[11089,1],[11112,1],[11133,1],[11165,1],[11197,1],[11223,1],[11256,1],[11291,1],[11325,1],[11359,1],[11394,1],[11422,1],[11460,1],[11503,1],[11535,1],[11573,1],[11611,1],[11648,1],[11668,1]]},"1339":{"position":[[155,2],[177,2],[192,2],[195,3]]},"1341":{"position":[[76,2],[97,2],[231,2],[234,2],[237,3],[346,2],[507,1],[514,1],[999,1],[1334,1],[5037,1],[5332,2],[5335,2],[5916,2],[6900,2]]},"1343":{"position":[[174,1],[227,2]]},"1345":{"position":[[104,2],[146,2],[188,2],[211,1],[251,1],[258,1],[295,1],[297,2],[300,3]]},"1349":{"position":[[95,1],[195,1],[325,1],[412,1],[510,1],[591,1],[704,1],[846,1]]},"1352":{"position":[[20,1],[118,1],[132,1],[134,2],[155,2],[170,2],[187,1],[253,2],[274,1],[339,2],[382,1],[430,1],[459,1],[512,1],[544,1]]},"1354":{"position":[[20,1],[118,1],[132,1],[134,2],[155,2],[170,2],[190,1],[253,2],[296,1],[349,1],[420,1],[473,2],[476,1]]},"1356":{"position":[[20,1],[112,1],[126,1],[128,2],[146,1],[207,2],[225,1],[302,2],[359,1],[392,1],[430,1]]},"1358":{"position":[[20,1],[112,1],[126,1],[132,2],[172,2],[247,1],[280,1],[318,1]]},"1360":{"position":[[20,1],[112,1],[126,1],[132,2],[183,2],[258,1],[302,1],[317,2],[360,2],[367,1],[380,1],[416,1],[418,1],[442,1]]},"1366":{"position":[[77,1],[160,1],[238,2],[366,2],[369,3],[373,2],[516,2],[580,1],[590,2],[600,2],[608,2],[617,1],[631,1],[641,2],[652,2],[660,2],[672,1],[686,1],[701,2],[743,1],[786,2],[841,3]]},"1368":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[236,2],[239,2],[305,2],[366,2],[425,2],[475,2],[478,2],[527,2],[573,2],[619,2],[669,2],[724,2],[770,2],[773,2],[837,2],[907,2],[992,2],[995,2],[1048,2],[1106,2],[1109,2],[1165,2],[1223,2],[1226,2],[1282,1]]},"1370":{"position":[[18,1],[182,1]]},"1376":{"position":[[77,1],[156,1],[234,2],[284,2],[389,1],[417,2],[427,2],[445,1],[480,3],[638,1],[656,2],[729,1],[759,2],[802,1],[838,2],[841,3],[883,1],[957,2]]},"1378":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[255,2],[258,2],[282,1],[321,2],[427,2],[430,2],[456,2],[459,2],[508,2],[567,2],[570,2],[616,2],[687,2],[690,2],[728,1],[730,2],[767,2],[770,1],[809,2],[898,2],[901,2],[977,2],[1031,2],[1034,2],[1109,2],[1181,1],[1191,2],[1194,2],[1238,2],[1335,2],[1408,2],[1428,2],[1431,2],[1459,2],[1501,2],[1572,2],[1575,2],[1648,1]]},"1380":{"position":[[18,1],[53,1],[153,1],[189,2],[328,1]]},"1386":{"position":[[77,1],[159,1],[237,2],[290,2],[403,2],[408,3],[412,2],[519,1],[537,2],[557,2],[592,2],[597,3]]},"1388":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[240,2],[243,2],[278,2],[299,2],[318,2],[339,2],[376,1]]},"1390":{"position":[[18,1],[60,1]]},"1392":{"position":[[0,2],[28,1],[44,1],[62,1],[81,1],[106,1],[110,1]]},"1398":{"position":[[77,1],[155,1],[233,2],[282,2],[458,3],[959,1],[993,2],[1010,2],[1013,3]]},"1400":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[282,2],[352,2],[355,2],[449,2],[488,2],[491,2],[559,2],[630,2],[633,2],[660,3],[684,2],[760,2],[812,2],[815,2],[895,2],[967,2],[1041,2],[1044,2],[1071,3],[1095,2],[1168,2],[1242,2],[1314,2],[1363,2],[1366,2],[1422,2],[1495,2],[1506,2],[1509,2],[1536,3],[1561,2],[1638,2],[1656,2],[1659,2],[1700,1]]},"1402":{"position":[[18,1],[76,4],[227,2],[230,5],[250,3],[294,3],[309,1]]},"1408":{"position":[[77,1],[155,1],[233,2],[282,2],[447,1],[532,1],[534,3],[538,2],[541,3]]},"1410":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[265,2],[333,2],[353,2],[374,2],[394,2],[414,2],[433,2],[454,2],[457,2],[503,2],[506,2],[567,2],[634,2],[688,2],[718,2],[745,3],[769,2],[797,2],[824,3],[846,2],[885,2],[937,2],[979,2],[1033,2],[1087,2],[1143,2],[1211,2],[1271,2],[1331,2],[1334,2],[1358,1],[1395,2],[1449,2],[1452,2],[1509,2],[1568,2],[1623,2],[1626,2],[1648,2],[1669,2],[1710,2],[1713,2],[1773,2],[1809,2],[1812,2],[1885,2],[1888,2],[1999,1]]},"1412":{"position":[[18,1],[49,1],[121,1],[234,1]]},"1414":{"position":[[6,1],[19,1],[36,1]]},"1416":{"position":[[58,2],[75,2],[166,3]]},"1418":{"position":[[1107,1],[1138,1]]},"1422":{"position":[[77,1],[160,1],[238,2],[292,2],[401,2],[404,3],[408,3]]},"1424":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[264,2],[267,2],[396,2],[484,2],[487,2],[648,2],[712,2],[715,2],[768,1]]},"1426":{"position":[[18,1],[65,1],[99,2],[125,2],[168,1],[208,2],[237,1]]},"1428":{"position":[[6,1],[26,1],[64,1],[70,1]]},"1432":{"position":[[0,2],[72,2]]},"1434":{"position":[[77,1],[164,1],[242,2],[270,2],[389,2],[500,2],[698,3],[702,2],[709,1],[782,1],[813,1],[834,2],[837,2],[845,1],[914,1],[974,2],[988,2]]},"1436":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[249,2],[252,2],[300,2],[339,1],[357,2],[360,2],[439,2],[551,2],[590,2],[593,2],[689,2],[728,2],[731,2],[827,1]]},"1438":{"position":[[18,1],[71,3],[127,1]]},"1440":{"position":[[307,2],[330,3],[432,3]]},"1446":{"position":[[77,1],[157,1],[235,2],[305,2],[443,3],[529,4],[534,3],[538,1]]},"1448":{"position":[[24,1],[34,1],[106,1],[108,1]]},"1450":{"position":[[0,2],[64,1],[66,2],[164,2],[268,1]]},"1458":{"position":[[77,1],[155,1],[233,2],[282,2],[289,1],[379,1],[418,2],[421,2],[506,3],[510,2],[517,1],[610,1],[649,2]]},"1460":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[264,2],[328,2],[394,2],[462,2],[529,2],[595,2],[661,2],[704,1]]},"1462":{"position":[[18,1],[52,1]]},"1468":{"position":[[77,1],[166,1],[254,1],[341,1],[429,2],[592,1],[689,5],[695,1],[732,1],[765,1]]},"1470":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,1]]},"1472":{"position":[[18,1],[39,1]]},"1478":{"position":[[77,1],[158,1],[236,2],[288,2],[411,3]]},"1480":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[259,2],[262,2],[284,2],[299,2],[326,2],[329,2],[377,2],[457,2],[522,2],[525,2],[578,2],[661,2],[664,2],[733,1]]},"1482":{"position":[[18,1],[45,3],[103,1]]},"1484":{"position":[[98,1],[262,1]]},"1488":{"position":[[77,1],[161,1],[239,2],[337,3],[341,2],[529,3]]},"1490":{"position":[[110,1],[227,1],[229,2],[289,2],[370,1],[376,2],[456,3],[460,2],[558,2],[614,2],[780,3],[815,1]]},"1492":{"position":[[55,1],[168,1],[182,1],[188,2],[284,3],[319,1]]},"1494":{"position":[[55,1],[171,1],[185,1],[191,2],[301,3],[336,1]]},"1496":{"position":[[58,1],[174,1],[188,1],[194,2],[306,3],[341,1]]},"1498":{"position":[[55,1],[174,1],[188,1],[194,2],[290,3],[325,1]]},"1500":{"position":[[53,1],[137,2],[260,1],[274,1],[290,2],[309,2],[316,1],[329,1],[335,2],[413,3],[448,1]]},"1502":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[240,2],[285,2],[288,2],[343,2],[346,2],[408,2],[447,2],[450,2],[485,2],[488,2],[509,2],[551,2],[581,2],[584,2],[640,2],[679,2],[682,2],[745,2],[792,2],[859,2],[862,2],[920,2],[978,2],[981,2],[1003,2],[1050,2],[1096,2],[1132,2],[1135,2],[1157,2],[1216,1]]},"1504":{"position":[[18,1],[62,3],[134,3],[138,1]]},"1510":{"position":[[20,1],[100,1],[114,1],[120,2],[195,1],[229,2],[252,1]]},"1512":{"position":[[0,2],[64,1],[66,2],[113,2],[166,2],[183,2],[236,2],[258,2],[322,2],[339,2],[380,2],[460,2],[474,2],[519,2],[544,2],[605,2],[630,2],[657,3],[690,2],[707,2],[760,2],[782,2],[840,2],[858,2],[925,2],[947,2],[974,3],[1002,2],[1034,2],[1110,2],[1140,2],[1213,2],[1245,2],[1320,2],[1344,2],[1403,2],[1429,2],[1490,2],[1512,2],[1573,2],[1610,2],[1674,1]]},"1514":{"position":[[18,1],[377,1]]},"1516":{"position":[[89,1],[147,1]]},"1520":{"position":[[77,1],[162,1]]},"1524":{"position":[[57,1],[72,2],[75,3],[79,3]]},"1526":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[258,2],[317,2],[320,2],[345,1],[382,2],[456,2],[459,2],[516,2],[606,2],[609,2],[749,2],[841,2],[844,2],[921,2],[955,2],[958,2],[1035,2],[1087,2],[1090,2],[1178,1]]},"1528":{"position":[[18,1],[58,1],[60,2],[166,2],[182,1],[269,1],[280,2],[297,2],[303,1],[305,2],[374,2],[415,1],[428,2],[468,2],[538,2],[594,1]]},"1534":{"position":[[20,1],[133,1],[139,1],[148,1],[181,1],[243,1],[258,2],[301,2],[392,2],[397,1],[416,1],[468,1],[482,1],[488,2],[503,2],[687,3],[729,1],[782,2],[805,1],[813,1],[837,1],[878,2],[990,2],[1092,2]]},"1536":{"position":[[159,1],[291,1],[297,1],[306,1],[353,1],[445,1],[447,1],[509,1],[524,2],[567,2],[658,2],[663,1],[682,1],[734,1],[771,1],[785,2],[836,2],[859,1],[897,1],[912,1],[914,1],[928,1],[942,1],[948,2],[1078,3],[1120,1],[1153,2],[1207,1],[1260,2],[1306,1],[1361,2],[1384,1],[1408,1],[1410,1],[1473,2],[1484,1],[1621,2],[1652,1],[1777,2]]},"1538":{"position":[[20,1],[133,1],[141,1],[150,1],[174,1],[188,1],[194,2],[224,2],[311,1],[326,2],[369,2],[460,2],[465,1],[484,1],[536,2],[539,2],[580,1],[613,2],[677,1],[730,2],[753,1],[777,1],[779,1],[842,2],[853,1],[982,2]]},"1540":{"position":[[0,2],[64,1],[66,2],[113,2],[166,2],[238,2],[293,2],[366,2],[410,2],[491,2],[562,2],[598,2],[649,2],[669,2],[690,2],[710,2],[729,2],[749,2],[787,2],[841,2],[896,2],[989,2],[1058,2],[1107,1]]},"1542":{"position":[[18,1],[69,1],[87,2],[140,1],[149,2],[180,1],[248,1],[333,2],[357,1],[429,1]]},"1548":{"position":[[77,1],[158,1],[236,2],[288,2],[397,1],[413,2],[428,2],[455,1],[510,1],[544,2],[586,1],[624,2],[655,3]]},"1550":{"position":[[195,1],[254,3],[407,1],[442,1],[459,1],[478,1],[503,1]]},"1552":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[287,2],[290,2],[312,2],[390,2],[393,2],[431,1],[433,2],[450,2],[453,1],[492,2],[568,2],[571,2],[585,1],[624,2],[680,2],[683,2],[720,1],[722,2],[774,2],[777,1],[806,2],[852,2],[877,2],[880,2],[922,2],[968,1],[992,2],[995,2],[1041,2],[1095,2],[1098,2],[1173,2],[1244,2],[1247,2],[1324,1]]},"1554":{"position":[[18,1],[50,1],[105,1],[121,2],[163,1],[214,2],[309,1]]},"1556":{"position":[[58,2],[75,2],[172,3]]},"1562":{"position":[[77,1],[157,1],[416,2],[467,2],[510,2],[633,3],[637,2],[718,2],[833,3],[837,2],[858,1],[1012,3],[1016,2],[1048,2],[1124,2],[1131,1],[1175,1],[1244,3],[1248,2],[1446,1],[1496,2],[1499,2],[1502,3],[1506,2],[1673,1],[1704,2],[1722,1],[1756,1],[1758,2],[1761,3],[1765,2],[1872,3]]},"1564":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[289,2],[330,2],[333,2],[401,2],[447,2],[450,2],[521,2],[556,2],[559,2],[648,2],[734,2],[737,2],[786,2],[879,2],[882,2],[928,2],[989,2],[992,2],[1018,1],[1064,2],[1109,2],[1112,2],[1151,2],[1215,2],[1218,2],[1324,1]]},"1566":{"position":[[18,1],[175,1],[235,1]]},"1568":{"position":[[0,2],[26,1],[35,1],[51,1],[71,1],[95,1],[116,1],[131,1],[145,1],[161,1],[180,1],[199,1],[215,1],[229,1],[247,1],[269,1],[280,2],[310,1],[322,2],[353,1],[389,1],[405,2],[441,1],[450,2],[479,1],[510,1],[537,1],[556,1],[566,2],[616,1],[628,2],[659,1],[674,2],[706,1],[722,2],[750,1],[761,2],[786,1],[796,2],[822,1],[834,2],[862,1],[874,2],[893,1],[910,1],[927,1],[947,1],[966,1],[986,1],[1006,1],[1024,1],[1043,1],[1053,1]]},"1574":{"position":[[77,1],[158,1],[236,2],[336,2],[379,2],[416,2],[740,2],[749,1],[846,2]]},"1576":{"position":[[0,2],[64,1],[66,2],[88,2],[91,2],[142,2],[160,2],[163,2],[217,2],[279,2],[282,2],[323,2],[394,2],[397,2],[452,2],[500,2],[503,2],[549,2],[598,1],[631,2],[634,2],[745,2],[799,1],[832,2],[835,2],[955,1]]},"1578":{"position":[[18,1],[297,3],[301,1]]},"1584":{"position":[[77,1],[156,1],[234,2],[284,2],[327,2],[501,2]]},"1586":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[255,2],[317,2],[348,2],[351,2],[373,2],[390,1]]},"1588":{"position":[[18,1],[39,1]]},"1592":{"position":[[0,2],[110,2],[257,2],[400,2],[634,2],[822,2],[1020,2],[1212,2]]},"1594":{"position":[[77,1],[156,1],[234,2],[301,2],[404,2],[407,2],[586,2],[589,2],[673,2],[846,2],[1034,3],[1038,2],[1110,1],[1116,2],[1171,2],[1196,2],[1203,1],[1216,1],[1218,2],[1311,2],[1314,2],[1406,1],[1415,2],[1468,2],[1475,1],[1488,1],[1490,2],[1583,2],[1586,2],[1695,1],[1704,2],[1763,1],[1773,2],[1780,1],[1793,1],[1795,2],[1888,2],[1891,2],[1984,1],[1993,2],[2070,2],[2077,1],[2090,1],[2092,2],[2185,2],[2188,2],[2351,2],[2354,3],[2358,2],[2534,2],[2577,1],[2634,2],[2678,1],[2735,2],[2738,3],[2742,2],[2950,3]]},"1596":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[256,2],[259,2],[302,2],[355,2],[358,2],[387,2],[436,2],[439,2],[493,2],[544,2],[547,2],[602,2],[671,2],[674,2],[727,2],[780,2],[825,2],[891,2],[965,2],[1039,2],[1096,2],[1154,2],[1231,2],[1300,1]]},"1598":{"position":[[18,1],[122,1]]},"1604":{"position":[[77,1],[158,1],[236,2],[288,2],[373,1],[397,2]]},"1606":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[244,2],[247,2],[297,2],[359,2],[362,2],[461,1]]},"1608":{"position":[[18,1],[109,1]]},"1614":{"position":[[20,1],[102,1],[116,1],[122,2],[238,2],[258,3],[303,1],[342,2],[388,1],[421,1],[423,1],[440,2],[463,1]]},"1616":{"position":[[0,2],[64,1],[66,2],[115,2],[168,2],[252,2],[297,2],[319,2],[338,2],[358,2],[396,2],[465,2],[501,2],[544,2],[642,1]]},"1618":{"position":[[18,1],[59,1]]},"1624":{"position":[[77,1],[160,1],[238,2],[292,2],[427,1],[448,2],[451,3]]},"1626":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[262,2],[265,2],[316,2],[383,2],[386,2],[443,2],[509,2],[547,2],[550,2],[605,1]]},"1628":{"position":[[199,1],[300,1]]},"1634":{"position":[[20,1],[101,1],[115,1],[121,2],[235,2],[238,3],[283,1],[322,2],[368,1],[401,1],[403,1],[420,2],[443,1]]},"1640":{"position":[[77,1],[158,1],[236,2],[265,2],[313,2],[368,1],[370,2],[408,2],[431,2],[438,1],[451,1],[453,2],[471,2],[491,2],[533,2],[554,2],[569,2],[603,2],[629,2],[652,2],[659,1],[672,1],[674,2],[748,1],[753,2],[776,2],[796,2],[803,1],[816,1],[871,2]]},"1642":{"position":[[0,2],[64,1],[66,2],[94,2],[124,1],[161,2],[208,2],[270,2],[341,2],[384,2],[455,2],[520,2],[550,2],[577,3],[601,2],[629,2],[656,3],[678,2],[717,2],[769,2],[811,2],[865,2],[894,2],[950,2],[1018,2],[1055,2],[1112,2],[1155,2],[1222,2],[1276,2],[1339,2],[1378,1]]},"1644":{"position":[[18,1],[43,1],[161,1]]},"1646":{"position":[[6,1],[28,1],[59,1],[92,1],[102,1]]},"1648":{"position":[[58,2],[75,2],[124,2],[173,2]]},"1654":{"position":[[77,1],[155,1],[245,1],[251,2],[323,1],[345,2],[364,3],[408,1],[457,2],[491,1],[533,1],[586,1]]},"1660":{"position":[[77,1],[158,1],[248,1],[254,2],[271,2],[299,1],[314,2],[358,1],[373,2],[426,2],[433,1],[481,1],[494,1],[585,1],[653,1],[661,2],[688,1],[695,1],[726,1],[728,1],[738,1],[777,1],[788,1],[801,1],[1026,1],[1075,1],[1081,2],[1098,2],[1126,1],[1141,2],[1185,1],[1200,2],[1268,2],[1275,1],[1323,1],[1336,1],[1453,1],[1536,1],[1544,2],[1571,1],[1578,1],[1609,1],[1611,1],[1621,1],[1649,1],[1660,1],[1673,1],[1716,1],[1722,2],[1743,2],[1825,2],[1855,1],[1862,2],[1915,1],[1962,2],[1969,1],[1989,1],[1999,1],[2027,2],[2034,1],[2054,1],[2067,1],[2165,1]]},"1663":{"position":[[497,1]]},"1675":{"position":[[0,2],[94,1]]},"1680":{"position":[[415,1],[492,2]]},"1682":{"position":[[545,1],[562,1],[564,3],[576,1],[596,1],[622,2],[629,1],[650,1],[657,1],[674,1],[716,1],[762,1]]},"1684":{"position":[[142,2],[219,1],[294,2],[297,2]]},"1688":{"position":[[180,1],[194,2]]},"1690":{"position":[[77,1],[163,1],[182,1],[201,1],[215,1],[217,2],[232,2],[254,2],[262,2],[269,2],[281,2],[389,3],[421,1],[472,1],[501,2],[504,2],[513,2],[521,2],[535,2],[644,3],[677,1],[730,1],[760,2],[763,2],[775,2],[786,2],[803,2],[912,3],[940,1],[993,1],[1026,2],[1029,2],[1043,2],[1091,1],[1098,2],[1129,2],[1136,1],[1180,1],[1187,1],[1234,1],[1236,2],[1270,1]]},"1693":{"position":[[244,1],[246,2],[310,2],[492,1],[579,1],[593,1],[599,2],[675,1],[716,2],[750,1],[1021,1],[1023,2],[1085,2],[1175,2]]},"1695":{"position":[[226,2],[275,1],[313,1],[315,2],[351,2],[386,2],[485,1],[492,1],[501,1],[503,2],[613,2],[700,1]]},"1697":{"position":[[539,2],[593,2],[620,2],[706,1],[708,2],[744,2],[779,2],[878,1],[885,1],[894,1],[896,2],[926,1],[993,2],[1000,1],[1002,2],[1119,1],[1121,2],[1155,2],[1158,2],[1161,2],[1164,3],[1195,1]]},"1700":{"position":[[480,1],[486,2],[569,2],[572,1],[574,3],[578,1]]},"1706":{"position":[[79,1],[85,2],[104,2],[137,2],[148,2],[180,2],[216,2],[257,2],[276,2],[308,2],[344,2],[385,2],[432,1],[493,1],[499,2],[518,2],[539,2],[550,2],[570,2],[606,2],[647,2],[666,2],[686,2],[722,2],[763,2],[810,1]]},"1708":{"position":[[131,1],[137,2],[160,2],[188,1],[226,1],[232,2],[253,2],[264,2],[309,1],[311,2],[376,2],[404,2],[445,2],[492,1]]},"1712":{"position":[[0,2],[77,1],[116,1],[153,1],[197,1],[235,1],[269,1],[310,1],[348,1]]},"1716":{"position":[[271,1],[309,1],[323,1],[329,2],[382,1],[482,1],[501,1],[503,1],[512,1],[514,2],[517,2],[531,2],[579,1],[600,1],[602,1],[613,1],[632,2],[681,1],[791,1],[872,1],[874,2],[886,2],[916,2]]},"1728":{"position":[[308,1],[346,1],[360,1],[366,2],[424,2],[525,1],[586,2],[589,3],[604,2],[633,1],[635,2],[646,2]]},"1731":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"1733":{"position":[[185,2],[243,4],[286,1],[316,2],[319,2],[414,1],[445,2],[448,2],[553,1],[589,2]]},"1735":{"position":[[372,2],[415,2],[418,2],[425,1],[658,4],[841,2],[916,1],[1012,2],[1015,2],[1091,1],[1128,2],[1131,2],[1202,1],[1242,2],[1245,2],[1321,1],[1358,2],[1361,2],[1553,1],[1595,2],[1620,1],[1622,1],[1636,3],[1796,4],[1928,2],[2037,1],[2116,2],[2134,2],[2137,2],[2233,1],[2306,2],[2317,2],[2476,2],[2607,1],[2683,2],[2694,2],[2915,2],[2927,2],[2946,1],[2948,4],[2962,1],[3002,2],[3017,2],[3036,1],[3074,2],[3105,2],[3122,1],[3143,1],[3185,2],[3217,2],[3234,1],[3253,1]]},"1737":{"position":[[1339,1],[1379,2],[1382,2],[1422,2],[1428,2],[1467,2],[1496,1],[1587,1],[1627,2],[1630,2],[1674,2],[1696,2],[1735,2],[1752,2],[1793,2],[1986,1],[2026,2],[2029,2],[2070,2],[2089,2],[2131,2],[2151,2],[2199,2],[2236,2],[2306,3],[2310,2],[2313,2],[2316,2],[2319,2],[2322,2],[2325,2],[2328,2],[2331,2],[2334,3],[2497,1],[2537,2],[2540,2],[2580,2],[2586,2],[2624,2],[2627,2],[2668,2]]},"1739":{"position":[[279,1],[281,2],[363,2],[405,2],[446,1],[485,2]]},"1741":{"position":[[82,1],[88,2],[107,2],[140,2],[151,2],[183,2],[219,2],[260,2],[279,2],[311,2],[347,2],[388,2],[435,1]]},"1744":{"position":[[97,1],[168,1],[298,2],[341,2],[383,2],[507,2],[867,1],[923,3],[927,2]]},"1746":{"position":[[188,1],[264,1],[278,1],[280,2],[334,2],[366,2],[423,2],[458,2],[468,2],[508,2],[550,2],[591,1],[593,2],[680,2],[683,2],[717,1]]},"1749":{"position":[[407,1],[474,2],[548,2],[750,1],[778,1],[823,1],[838,1],[904,1],[938,2],[970,2],[977,1],[990,2],[1032,1],[1080,1],[1116,1],[1142,1],[1163,1],[1190,1],[1192,1],[1208,1],[1243,1],[1272,2],[1292,2],[1319,2],[1326,1],[1417,2],[1420,1],[1429,2],[1464,2],[1471,1],[1526,1],[1587,1],[1589,2],[1640,2],[1779,2],[1793,2]]},"1751":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"1754":{"position":[[349,2],[469,1],[489,2],[522,2],[563,2],[603,2],[669,2],[730,2],[733,2],[753,2],[756,2],[759,2],[762,3],[766,2],[779,2],[827,4],[874,1],[920,2],[1005,2],[1063,2],[1066,3],[1077,3],[1118,2],[1121,3],[1125,2],[1191,2],[1234,2],[1275,2],[1350,1],[1394,2],[1447,2],[1498,2],[1506,2],[1509,3],[1513,2]]},"1756":{"position":[[141,2],[226,1],[242,2],[265,2],[268,3],[272,2],[275,2],[360,1],[376,2],[401,2],[404,3],[408,2]]},"1758":{"position":[[166,1],[199,2]]},"1760":{"position":[[262,1],[322,2],[325,2],[395,2],[398,2],[449,2],[452,3],[456,2]]},"1762":{"position":[[172,1],[189,2],[192,2],[268,2],[271,2],[327,2],[330,2],[357,2],[360,3],[364,2]]},"1764":{"position":[[31,1],[101,2],[181,1],[195,2],[218,2],[221,3],[225,2]]},"1766":{"position":[[211,1],[257,2],[260,2],[301,1],[344,2],[378,2]]},"1768":{"position":[[76,2],[166,1],[168,2],[227,2],[250,2]]},"1770":{"position":[[452,2],[524,1],[624,1],[665,1],[669,2],[691,2],[715,2],[722,1],[735,1],[757,2],[785,2],[792,2],[795,3],[799,2],[802,2],[848,2],[961,2],[1085,2],[1197,2],[1260,2]]},"1772":{"position":[[151,1],[153,2],[192,2],[249,2],[343,2],[346,3],[350,2],[718,1],[808,1],[855,2],[858,2],[861,3],[865,2],[912,1],[953,2],[1020,1],[1060,2],[1063,2],[1066,3],[1070,2]]},"1774":{"position":[[330,2],[405,1],[411,2],[434,2],[437,3],[441,2]]},"1778":{"position":[[77,1],[387,1],[435,1],[437,2],[461,2],[494,1],[516,1],[539,1],[559,1],[572,2],[603,2],[606,3],[610,2]]},"1780":{"position":[[243,1],[245,2],[285,2],[321,2],[330,2],[333,3],[337,2]]},"1782":{"position":[[398,1],[447,2],[450,2],[540,2],[543,2],[566,2]]},"1784":{"position":[[286,1],[288,2],[336,2],[339,2],[356,2],[403,2],[406,2],[430,2],[484,2],[487,2],[506,2],[509,2],[512,2]]},"1786":{"position":[[216,1],[218,2],[274,2],[300,2],[392,2]]},"1788":{"position":[[214,1],[216,2],[279,2],[282,2],[295,2],[311,2],[314,2],[317,2]]},"1792":{"position":[[208,1],[232,2],[270,2],[313,2],[323,2],[326,2],[329,2]]},"1796":{"position":[[219,1],[253,2],[327,2],[380,2],[390,2],[393,2],[396,2]]},"1800":{"position":[[222,1],[319,1],[420,1],[434,2],[514,2],[517,2]]},"1802":{"position":[[106,2],[176,1],[191,2],[207,2],[210,3],[214,2]]},"1804":{"position":[[128,1],[137,2],[152,2],[155,3],[159,2],[289,2],[356,2]]},"1806":{"position":[[129,2],[213,1],[223,2],[260,2],[263,3],[267,2]]},"1808":{"position":[[256,2],[336,1],[351,2],[373,2],[394,2],[403,2],[406,3],[410,2]]},"1810":{"position":[[87,1],[135,1],[137,2],[218,2],[221,3],[225,2]]},"1812":{"position":[[218,1],[242,1],[286,1],[288,2],[316,2],[355,1],[377,2],[380,2],[414,2],[417,2],[504,2],[507,2],[510,2],[544,2],[547,2],[581,2]]},"1814":{"position":[[336,1],[360,1],[400,1],[402,2],[430,2],[469,1],[492,2],[495,2],[572,2],[575,2],[619,2]]},"1816":{"position":[[184,1],[289,1],[291,2],[351,2],[404,2],[407,3],[411,2]]},"1818":{"position":[[331,1],[375,2],[421,1],[443,2],[454,1],[518,1],[563,2]]},"1820":{"position":[[165,1],[234,2]]},"1822":{"position":[[261,1],[274,2],[311,2],[318,2],[321,3],[325,2]]},"1824":{"position":[[279,1],[281,2],[323,2],[349,2],[356,1],[358,2],[361,2],[389,2],[424,1],[428,1],[430,2],[470,1],[472,2],[517,2],[543,2],[546,2],[573,2],[608,2],[623,1],[695,2],[698,2],[741,2],[775,2],[836,2],[843,1],[856,1],[858,1],[860,1],[873,2]]},"1826":{"position":[[279,1],[323,2],[364,1],[408,2],[449,1],[514,2]]},"1828":{"position":[[87,2],[170,1],[188,2],[213,2],[216,3],[220,2]]},"1830":{"position":[[174,5],[290,2],[375,1],[394,2],[405,2],[408,3],[412,2],[415,2],[500,1],[516,2],[546,2],[561,2],[564,3],[568,2],[599,2],[672,2],[695,2],[743,2],[771,2],[978,1],[994,2],[1046,2]]},"1832":{"position":[[343,2],[424,1],[434,2],[455,2],[479,2],[482,3],[486,2]]},"1834":{"position":[[302,2],[383,1],[391,2],[450,2],[467,2],[470,3],[474,2]]},"1836":{"position":[[247,2],[332,1],[343,2],[380,2],[391,2],[394,3],[398,2]]},"1838":{"position":[[120,2],[184,1],[199,2],[209,2],[212,3],[216,2]]},"1840":{"position":[[182,2],[278,1],[282,2],[307,2],[333,2],[352,2],[355,2],[358,2],[361,3],[365,2],[376,2],[484,1],[488,2],[515,2],[539,2],[549,2],[560,2],[698,1],[702,2],[729,2],[750,2],[769,2],[780,2],[791,2],[905,1],[909,2],[949,2],[984,2],[998,2],[1009,2],[1217,1],[1221,2],[1246,2],[1288,2],[1340,2],[1368,2],[1418,2],[1428,2]]},"1842":{"position":[[334,2],[421,1],[440,2],[467,2],[502,2],[512,2],[515,3],[519,2]]},"1844":{"position":[[458,2],[554,1],[582,2],[623,2],[652,2],[687,2],[713,2],[746,2],[754,2],[757,3],[761,2]]},"1846":{"position":[[526,2],[618,1],[643,2],[678,2],[711,2],[737,2],[764,2],[769,2],[772,3],[776,2]]},"1848":{"position":[[516,2],[608,1],[638,2],[665,2],[690,2],[712,2],[717,2],[720,3],[724,2]]},"1850":{"position":[[302,2],[374,1],[467,1],[507,1],[511,2],[533,2],[558,2],[565,1],[578,1],[600,2],[628,2],[659,2],[674,2],[677,3],[681,2],[684,2],[729,2]]},"1852":{"position":[[132,2],[203,1],[207,2],[234,2],[245,1],[253,2],[271,1],[288,2],[302,1],[304,1],[306,2]]},"1854":{"position":[[313,1],[344,2],[391,1],[454,4],[459,2],[514,1],[661,2]]},"1856":{"position":[[449,1],[451,2],[526,2],[529,2],[582,1],[584,2],[796,2],[799,2],[850,1]]},"1858":{"position":[[347,1],[382,2],[427,1],[512,2],[557,1],[586,2]]},"1862":{"position":[[143,1],[173,2],[176,2],[193,2]]},"1864":{"position":[[312,2],[384,1],[489,1],[529,1],[533,2],[555,2],[584,2],[591,1],[604,1],[626,2],[654,2],[685,2],[700,2],[703,3],[707,2],[710,2],[755,2]]},"1866":{"position":[[147,1],[206,2],[209,2],[239,2]]},"1868":{"position":[[398,1],[433,2],[477,1],[520,2]]},"1870":{"position":[[81,2],[161,1],[165,2],[230,2],[265,2],[268,3],[272,2],[434,1],[468,1],[481,2],[499,2],[510,3],[518,2],[540,2],[558,2],[595,1],[597,1]]},"1872":{"position":[[176,1],[178,2],[220,2],[246,2],[253,1],[255,2],[258,2],[277,2],[322,2],[348,2],[351,2],[378,2],[413,2],[428,1],[500,2],[503,2],[546,2],[580,2],[641,2],[648,1],[661,1],[663,1],[676,1],[678,2]]},"1874":{"position":[[201,2],[256,1],[258,2],[300,2],[326,2],[333,1],[335,2],[338,2],[357,2],[402,2],[428,2],[431,2],[458,2],[493,2],[508,1],[580,2],[583,2],[626,2],[663,2],[742,2],[749,1],[762,1],[764,1],[777,1],[779,2]]},"1876":{"position":[[32,1],[116,2],[166,2]]},"1878":{"position":[[123,1],[164,2],[167,2],[186,2],[504,1],[543,2],[546,2],[627,2],[630,2],[649,2]]},"1880":{"position":[[322,1],[364,2],[436,2],[635,1],[690,2]]},"1882":{"position":[[262,1],[289,2],[292,2],[379,2],[382,2],[405,2]]},"1884":{"position":[[165,1],[203,2],[206,2],[236,2],[239,3],[243,2]]},"1886":{"position":[[314,2],[353,2],[390,2],[467,1],[471,2],[507,1],[509,2],[594,1],[629,1],[677,2],[717,2],[724,1],[752,1],[777,1],[790,2],[863,1],[865,2],[1024,2],[1027,2],[1118,1],[1244,1],[1289,1],[1375,2],[1421,1],[1508,2],[1511,2],[1601,2]]},"1888":{"position":[[168,1],[174,2],[220,2],[268,2],[271,3],[275,2]]},"1892":{"position":[[166,1],[204,1],[249,1],[317,1],[362,1],[434,2]]},"1894":{"position":[[268,2],[342,1],[359,2],[398,2],[410,2],[413,3],[417,2]]},"1896":{"position":[[207,1],[225,2],[228,2],[258,2],[261,2],[290,2],[293,2],[332,2],[335,2],[372,2],[375,3],[379,2]]},"1898":{"position":[[238,1],[244,2],[263,2],[308,2],[311,3],[315,2]]},"1900":{"position":[[288,1],[307,2],[310,2],[347,2],[350,2],[378,2],[412,2],[415,2],[479,2],[482,2],[535,2],[538,3],[542,2]]},"1902":{"position":[[139,1],[174,2],[177,2],[236,2],[268,2]]},"1904":{"position":[[164,1],[172,2],[213,2],[216,2],[275,2],[307,2]]},"1906":{"position":[[141,1],[174,2],[177,2],[236,2],[268,2]]},"1908":{"position":[[220,2],[294,1],[304,2],[312,2],[315,3],[319,2]]},"1910":{"position":[[222,1],[302,1],[342,1],[344,2],[372,2],[411,1],[432,2],[443,2],[465,2],[482,2],[494,2]]}}}],["0",{"_index":387,"t":{"803":{"position":[[457,2]]},"874":{"position":[[492,1]]},"902":{"position":[[251,1]]},"904":{"position":[[86,2]]},"942":{"position":[[341,2]]},"1082":{"position":[[325,2]]},"1084":{"position":[[402,1]]},"1086":{"position":[[106,2]]},"1112":{"position":[[201,1]]},"1114":{"position":[[274,2]]},"1182":{"position":[[216,2]]},"1223":{"position":[[2316,2]]},"1296":{"position":[[238,2],[345,2]]},"1378":{"position":[[1411,1],[1443,1]]},"1380":{"position":[[271,2]]},"1388":{"position":[[316,1]]},"1392":{"position":[[64,1]]},"1400":{"position":[[1686,2]]},"1402":{"position":[[306,2]]},"1418":{"position":[[74,3],[296,1]]},"1468":{"position":[[674,2]]},"1502":{"position":[[889,2]]},"1504":{"position":[[111,2]]},"1512":{"position":[[210,4],[501,2]]},"1514":{"position":[[43,4]]},"1675":{"position":[[176,1]]},"1754":{"position":[[1098,1]]},"1824":{"position":[[426,1]]},"1832":{"position":[[243,4]]},"1846":{"position":[[405,4],[740,1]]},"1848":{"position":[[405,4],[715,1]]}}}],["0.1.7",{"_index":3915,"t":{"1735":{"position":[[3499,5]]}}}],["0.4",{"_index":3661,"t":{"1673":{"position":[[72,3]]}}}],["0.7",{"_index":3658,"t":{"1671":{"position":[[70,3]]}}}],["01",{"_index":3959,"t":{"1737":{"position":[[1108,4],[1126,2]]},"1886":{"position":[[570,2],[697,2]]}}}],["02",{"_index":3178,"t":{"1516":{"position":[[324,2]]},"1562":{"position":[[967,3]]},"1737":{"position":[[1113,4]]},"1886":{"position":[[573,2],[700,4]]}}}],["0666",{"_index":3303,"t":{"1562":{"position":[[1111,5]]}}}],["08",{"_index":3965,"t":{"1737":{"position":[[1185,2],[2193,2],[2207,2]]}}}],["0rtt",{"_index":2991,"t":{"1418":{"position":[[835,5]]}}}],["1",{"_index":912,"t":{"942":{"position":[[390,2]]},"946":{"position":[[202,1]]},"1096":{"position":[[332,1]]},"1100":{"position":[[55,1],[94,2]]},"1124":{"position":[[402,1]]},"1126":{"position":[[839,1]]},"1128":{"position":[[180,1]]},"1156":{"position":[[145,2]]},"1190":{"position":[[1261,2],[2649,1],[4469,2],[4631,1]]},"1235":{"position":[[169,1]]},"1265":{"position":[[222,1]]},"1296":{"position":[[734,2]]},"1378":{"position":[[280,1]]},"1380":{"position":[[51,1]]},"1386":{"position":[[406,1],[595,1]]},"1388":{"position":[[297,1],[337,1]]},"1392":{"position":[[47,1],[83,1]]},"1408":{"position":[[445,1]]},"1410":{"position":[[1356,1]]},"1412":{"position":[[119,1]]},"1418":{"position":[[277,1]]},"1424":{"position":[[355,4]]},"1428":{"position":[[66,3]]},"1468":{"position":[[559,1],[623,2],[763,1]]},"1512":{"position":[[1371,5]]},"1514":{"position":[[284,5]]},"1534":{"position":[[395,1]]},"1536":{"position":[[661,1]]},"1538":{"position":[[463,1]]},"1552":{"position":[[583,1]]},"1554":{"position":[[48,1]]},"1596":{"position":[[696,1]]},"1616":{"position":[[279,3],[351,6]]},"1735":{"position":[[3116,4],[3228,4]]},"1737":{"position":[[1481,2],[1749,2]]},"1754":{"position":[[1390,3],[1407,2]]},"1756":{"position":[[379,7]]},"1764":{"position":[[141,1]]},"1800":{"position":[[480,3]]},"1846":{"position":[[368,2],[708,2],[714,1]]},"1848":{"position":[[368,2],[635,2],[662,2],[668,1],[687,2],[693,1]]}}}],["1,001.01e8",{"_index":3932,"t":{"1737":{"position":[[510,10]]}}}],["1,146,667",{"_index":3660,"t":{"1673":{"position":[[14,9]]}}}],["1,2,3",{"_index":4307,"t":{"1840":{"position":[[772,7]]}}}],["1.0",{"_index":734,"t":{"869":{"position":[[595,3]]}}}],["1.1",{"_index":3663,"t":{"1673":{"position":[[152,3]]}}}],["1.14/1.15",{"_index":806,"t":{"884":{"position":[[33,11]]}}}],["1.16",{"_index":3107,"t":{"1488":{"position":[[557,6]]},"1490":{"position":[[84,5]]},"1502":{"position":[[471,4]]}}}],["1.17",{"_index":1148,"t":{"1132":{"position":[[11,4]]},"1210":{"position":[[39,4]]}}}],["1.18",{"_index":539,"t":{"817":{"position":[[55,4]]},"892":{"position":[[82,4]]}}}],["1.234",{"_index":3931,"t":{"1737":{"position":[[502,6]]}}}],["1.3",{"_index":2978,"t":{"1418":{"position":[[152,3]]}}}],["1.3'",{"_index":2973,"t":{"1418":{"position":[[57,5]]}}}],["10",{"_index":822,"t":{"886":{"position":[[366,2]]},"888":{"position":[[636,2]]},"890":{"position":[[170,2]]},"914":{"position":[[300,2]]},"916":{"position":[[258,2]]},"918":{"position":[[82,2]]},"998":{"position":[[258,2]]},"1000":{"position":[[75,2]]},"1002":{"position":[[40,2]]},"1026":{"position":[[342,2],[567,2]]},"1028":{"position":[[860,2]]},"1030":{"position":[[147,2]]},"1040":{"position":[[342,2],[535,2],[749,2]]},"1042":{"position":[[875,2]]},"1044":{"position":[[147,2]]},"1068":{"position":[[319,2]]},"1070":{"position":[[1015,2]]},"1072":{"position":[[206,2]]},"1082":{"position":[[368,2]]},"1084":{"position":[[1456,2]]},"1086":{"position":[[149,2]]},"1124":{"position":[[329,2]]},"1126":{"position":[[319,2]]},"1128":{"position":[[107,2]]},"1223":{"position":[[2102,2],[2749,2]]},"1663":{"position":[[565,2]]},"1675":{"position":[[182,2]]},"1856":{"position":[[774,5]]},"1886":{"position":[[1568,2],[1677,2]]}}}],["10*time.second",{"_index":3610,"t":{"1660":{"position":[[2117,16]]}}}],["10.1",{"_index":2229,"t":{"1336":{"position":[[1380,4]]}}}],["10.4.1",{"_index":2265,"t":{"1336":{"position":[[1840,6]]}}}],["100",{"_index":1124,"t":{"1124":{"position":[[361,4],[380,4]]},"1126":{"position":[[585,4],[711,4]]},"1128":{"position":[[139,4],[158,4]]},"1336":{"position":[[1271,3]]},"1675":{"position":[[189,3],[580,4]]}}}],["1000",{"_index":3676,"t":{"1675":{"position":[[585,5]]},"1682":{"position":[[652,4]]}}}],["101",{"_index":2224,"t":{"1336":{"position":[[1321,3]]}}}],["102",{"_index":2227,"t":{"1336":{"position":[[1363,3]]}}}],["1024",{"_index":2673,"t":{"1341":{"position":[[509,4],[516,4],[1001,4]]}}}],["103",{"_index":2231,"t":{"1336":{"position":[[1404,3]]}}}],["10m",{"_index":1103,"t":{"1096":{"position":[[316,6]]},"1098":{"position":[[73,6]]}}}],["11",{"_index":1512,"t":{"1184":{"position":[[724,3]]},"1737":{"position":[[1123,2]]}}}],["11,846",{"_index":3649,"t":{"1667":{"position":[[14,6]]}}}],["11.1",{"_index":2257,"t":{"1336":{"position":[[1758,4]]}}}],["11.2",{"_index":2353,"t":{"1336":{"position":[[3161,4],[5562,4]]}}}],["11.3",{"_index":2356,"t":{"1336":{"position":[[3198,4],[5615,4]]}}}],["11.4",{"_index":2359,"t":{"1336":{"position":[[3245,4],[5688,4]]}}}],["11.5",{"_index":2400,"t":{"1336":{"position":[[3923,4],[6755,4]]}}}],["111",{"_index":4285,"t":{"1834":{"position":[[461,5]]}}}],["117.2",{"_index":3656,"t":{"1669":{"position":[[148,5]]}}}],["12",{"_index":1407,"t":{"1178":{"position":[[923,3],[1025,3]]},"1737":{"position":[[723,2],[1425,2]]}}}],["120",{"_index":3948,"t":{"1737":{"position":[[867,4],[962,4]]}}}],["120000",{"_index":3974,"t":{"1737":{"position":[[1688,7]]}}}],["123",{"_index":659,"t":{"839":{"position":[[1736,5]]},"869":{"position":[[562,3]]},"1832":{"position":[[462,3]]}}}],["12345.pdf",{"_index":4158,"t":{"1782":{"position":[[434,12],[469,9],[513,11]]}}}],["123456",{"_index":916,"t":{"946":{"position":[[120,9]]},"1366":{"position":[[356,9],[506,9],[663,8]]}}}],["123456789",{"_index":3922,"t":{"1737":{"position":[[377,10],[389,9]]}}}],["125",{"_index":3983,"t":{"1737":{"position":[[2084,4]]}}}],["127.0.0.1",{"_index":1008,"t":{"1012":{"position":[[256,12]]},"1014":{"position":[[225,11]]},"1016":{"position":[[53,12]]},"1026":{"position":[[248,12]]},"1028":{"position":[[267,11]]},"1030":{"position":[[53,12]]},"1040":{"position":[[248,12]]},"1042":{"position":[[345,11]]},"1044":{"position":[[53,12]]},"1070":{"position":[[398,11]]},"1072":{"position":[[92,12]]},"1082":{"position":[[262,12]]},"1084":{"position":[[84,11]]},"1086":{"position":[[34,12]]},"1548":{"position":[[416,11]]},"1804":{"position":[[140,11]]},"1806":{"position":[[157,10],[237,12]]}}}],["127.0.0.1:11211",{"_index":999,"t":{"986":{"position":[[113,17]]},"988":{"position":[[37,18]]}}}],["127.0.0.1:3000",{"_index":3077,"t":{"1468":{"position":[[525,14]]}}}],["127.0.0.1:3000/debug/var",{"_index":3078,"t":{"1468":{"position":[[566,25]]}}}],["127.0.0.1:3000/debug/vars?r=c",{"_index":3085,"t":{"1468":{"position":[[702,29]]}}}],["127.0.0.1:8091",{"_index":909,"t":{"942":{"position":[[287,17]]},"946":{"position":[[73,17]]}}}],["13",{"_index":3053,"t":{"1458":{"position":[[306,3]]}}}],["1433",{"_index":1018,"t":{"1026":{"position":[[267,5]]},"1028":{"position":[[355,4]]},"1030":{"position":[[72,5]]}}}],["15",{"_index":963,"t":{"958":{"position":[[2668,2],[2722,2]]}}}],["15:04:05",{"_index":3325,"t":{"1564":{"position":[[759,8]]},"1566":{"position":[[126,11]]}}}],["15th",{"_index":1689,"t":{"1208":{"position":[[363,5]]}}}],["16",{"_index":4059,"t":{"1754":{"position":[[1375,4]]}}}],["1638",{"_index":3927,"t":{"1737":{"position":[[453,4],[463,4]]}}}],["18",{"_index":3944,"t":{"1737":{"position":[[798,3],[942,2]]}}}],["18.04.3",{"_index":3630,"t":{"1663":{"position":[[523,7]]}}}],["1831710635",{"_index":3054,"t":{"1458":{"position":[[310,11],[541,11]]}}}],["185",{"_index":1724,"t":{"1212":{"position":[[1552,5]]},"1341":{"position":[[4103,5]]}}}],["19",{"_index":3943,"t":{"1737":{"position":[[763,2]]}}}],["19,664",{"_index":3653,"t":{"1669":{"position":[[14,6]]}}}],["1;q=0.2",{"_index":4053,"t":{"1754":{"position":[[1226,7]]}}}],["1e7",{"_index":1100,"t":{"1096":{"position":[[271,4]]},"1100":{"position":[[41,4]]}}}],["1gb",{"_index":1107,"t":{"1096":{"position":[[366,6]]},"1098":{"position":[[131,6]]}}}],["1s",{"_index":1968,"t":{"1265":{"position":[[168,2]]}}}],["2",{"_index":231,"t":{"771":{"position":[[460,1]]},"849":{"position":[[1145,2]]},"884":{"position":[[26,1]]},"898":{"position":[[43,1]]},"912":{"position":[[24,1]]},"926":{"position":[[23,1]]},"940":{"position":[[27,1]]},"954":{"position":[[26,1]]},"958":{"position":[[175,3]]},"968":{"position":[[22,1]]},"974":{"position":[[80,1]]},"982":{"position":[[24,1]]},"996":{"position":[[24,1]]},"1010":{"position":[[25,1]]},"1024":{"position":[[23,1]]},"1038":{"position":[[23,1]]},"1052":{"position":[[24,1]]},"1066":{"position":[[26,1]]},"1080":{"position":[[23,1]]},"1094":{"position":[[27,1]]},"1108":{"position":[[20,1]]},"1122":{"position":[[25,1]]},"1184":{"position":[[371,3],[471,1],[540,1]]},"1190":{"position":[[3533,1]]},"1388":{"position":[[364,1]]},"1392":{"position":[[108,1]]},"1434":{"position":[[677,1]]},"1440":{"position":[[258,1]]},"1536":{"position":[[1356,4],[1807,2]]},"1616":{"position":[[283,2]]},"1640":{"position":[[750,2]]},"1735":{"position":[[3137,4],[3247,4]]},"1754":{"position":[[777,1]]},"1772":{"position":[[1022,4]]},"1848":{"position":[[641,1]]},"1894":{"position":[[133,2]]}}}],["2*time.second",{"_index":3584,"t":{"1660":{"position":[[538,15],[1391,14]]}}}],["2,066",{"_index":3651,"t":{"1667":{"position":[[94,5]]}}}],["2.0",{"_index":3646,"t":{"1665":{"position":[[444,3]]}}}],["2.20ghz",{"_index":3626,"t":{"1663":{"position":[[499,7]]}}}],["2.3.3",{"_index":2346,"t":{"1336":{"position":[[3060,5],[5404,5]]}}}],["2.30ghz",{"_index":3666,"t":{"1675":{"position":[[96,7]]}}}],["20",{"_index":1222,"t":{"1140":{"position":[[87,2]]},"1548":{"position":[[436,3]]},"1550":{"position":[[176,3]]},"1812":{"position":[[351,3],[446,4],[500,3],[576,4]]},"1814":{"position":[[465,3],[532,4],[614,4]]},"1886":{"position":[[1571,2],[1680,3]]},"1910":{"position":[[407,3]]}}}],["200",{"_index":1828,"t":{"1227":{"position":[[221,3]]},"1336":{"position":[[1431,3]]},"1660":{"position":[[813,3]]}}}],["2005",{"_index":3960,"t":{"1737":{"position":[[1118,4]]}}}],["2006",{"_index":3298,"t":{"1562":{"position":[[975,6]]},"1886":{"position":[[565,4]]}}}],["201",{"_index":2236,"t":{"1336":{"position":[[1470,3]]}}}],["202",{"_index":2239,"t":{"1336":{"position":[[1510,3]]}}}],["2020",{"_index":1690,"t":{"1208":{"position":[[369,5]]}}}],["2022",{"_index":3964,"t":{"1737":{"position":[[1180,4],[2202,4]]}}}],["203",{"_index":2242,"t":{"1336":{"position":[[1569,3]]}}}],["204",{"_index":2245,"t":{"1336":{"position":[[1610,3]]}}}],["2048",{"_index":489,"t":{"809":{"position":[[604,5]]}}}],["205",{"_index":2248,"t":{"1336":{"position":[[1654,3]]}}}],["206",{"_index":2251,"t":{"1336":{"position":[[1700,3]]}}}],["207",{"_index":2255,"t":{"1336":{"position":[[1741,3]]}}}],["208",{"_index":2259,"t":{"1336":{"position":[[1787,3]]}}}],["226",{"_index":2263,"t":{"1336":{"position":[[1823,3]]}}}],["2295",{"_index":2396,"t":{"1336":{"position":[[3868,5],[6671,5]]}}}],["23",{"_index":1455,"t":{"1180":{"position":[[938,3],[966,2]]}}}],["24",{"_index":3551,"t":{"1642":{"position":[[121,2]]},"1644":{"position":[[40,2]]}}}],["244,847",{"_index":3662,"t":{"1673":{"position":[[96,7]]}}}],["25",{"_index":945,"t":{"958":{"position":[[1341,2],[2037,2]]}}}],["25.7",{"_index":3654,"t":{"1669":{"position":[[69,4]]}}}],["250",{"_index":3976,"t":{"1737":{"position":[[1796,3]]}}}],["2518",{"_index":2228,"t":{"1336":{"position":[[1374,5]]}}}],["256",{"_index":2686,"t":{"1341":{"position":[[995,3]]}}}],["27",{"_index":3966,"t":{"1737":{"position":[[1188,2],[2196,2],[2210,2]]}}}],["27017",{"_index":1009,"t":{"1012":{"position":[[275,6]]},"1014":{"position":[[313,5]]},"1016":{"position":[[72,6]]}}}],["2774",{"_index":2406,"t":{"1336":{"position":[[4001,5],[6876,5]]}}}],["28",{"_index":3620,"t":{"1663":{"position":[[454,2]]}}}],["2]string",{"_index":693,"t":{"849":{"position":[[1095,9]]}}}],["2beb887efd54",{"_index":4181,"t":{"1796":{"position":[[281,13]]}}}],["3",{"_index":855,"t":{"902":{"position":[[658,1]]},"904":{"position":[[116,2]]},"942":{"position":[[363,2]]},"946":{"position":[[174,1]]},"958":{"position":[[1010,1]]},"960":{"position":[[93,2]]},"1112":{"position":[[613,1]]},"1114":{"position":[[255,2]]},"1184":{"position":[[473,1]]},"1336":{"position":[[2192,1],[3383,1],[3535,1],[5899,1],[6149,1]]},"1576":{"position":[[185,1]]},"1594":{"position":[[1460,3]]},"1840":{"position":[[732,3],[753,3]]},"1846":{"position":[[675,2],[761,2],[767,1]]}}}],["3.1",{"_index":2294,"t":{"1336":{"position":[[2274,3],[4203,3]]}}}],["3.2",{"_index":2312,"t":{"1336":{"position":[[2542,3],[4609,3]]}}}],["30",{"_index":1105,"t":{"1096":{"position":[[337,3]]},"1100":{"position":[[60,3]]},"1376":{"position":[[442,2]]},"1526":{"position":[[342,2]]},"1528":{"position":[[179,2]]},"1548":{"position":[[452,2]]},"1550":{"position":[[192,2]]},"1675":{"position":[[537,2]]}}}],["300",{"_index":2267,"t":{"1336":{"position":[[1871,3]]}}}],["3000",{"_index":1961,"t":{"1263":{"position":[[226,8]]},"1352":{"position":[[357,4]]},"1354":{"position":[[271,4]]},"1356":{"position":[[320,4]]},"1358":{"position":[[190,4]]},"1360":{"position":[[201,4]]}}}],["301",{"_index":2270,"t":{"1336":{"position":[[1919,3]]},"1614":{"position":[[253,4]]},"1854":{"position":[[656,4]]}}}],["302",{"_index":2273,"t":{"1336":{"position":[[1956,3]]},"1616":{"position":[[566,3]]},"1854":{"position":[[179,3]]},"1856":{"position":[[187,3]]},"1858":{"position":[[215,3]]}}}],["303",{"_index":2276,"t":{"1336":{"position":[[1996,3]]}}}],["304",{"_index":2279,"t":{"1336":{"position":[[2039,3]]}}}],["305",{"_index":2282,"t":{"1336":{"position":[[2077,3]]}}}],["307",{"_index":2285,"t":{"1336":{"position":[[2126,3]]}}}],["308",{"_index":2288,"t":{"1336":{"position":[[2175,3]]}}}],["32",{"_index":2701,"t":{"1341":{"position":[[1952,4]]},"1432":{"position":[[92,2]]},"1434":{"position":[[289,2],[426,3]]},"1436":{"position":[[391,2],[476,3]]}}}],["32.23",{"_index":4335,"t":{"1846":{"position":[[646,5],[681,5]]}}}],["3229",{"_index":2264,"t":{"1336":{"position":[[1834,5]]}}}],["32gb",{"_index":3627,"t":{"1663":{"position":[[507,4]]}}}],["33",{"_index":3082,"t":{"1468":{"position":[[648,3]]}}}],["3306",{"_index":1027,"t":{"1040":{"position":[[267,5]]},"1042":{"position":[[433,4]]},"1044":{"position":[[72,5]]}}}],["339222389",{"_index":4004,"t":{"1749":{"position":[[623,9]]}}}],["354.1",{"_index":3648,"t":{"1665":{"position":[[518,5]]}}}],["36",{"_index":3186,"t":{"1526":{"position":[[670,2]]},"1528":{"position":[[291,3],[323,2]]}}}],["3600",{"_index":1798,"t":{"1223":{"position":[[2775,5]]},"1488":{"position":[[523,5]]}}}],["360641",{"_index":4260,"t":{"1824":{"position":[[716,6]]},"1872":{"position":[[521,6]]},"1874":{"position":[[601,6]]}}}],["367,069",{"_index":3647,"t":{"1665":{"position":[[462,7]]}}}],["368,647",{"_index":3657,"t":{"1671":{"position":[[14,7]]}}}],["390.44",{"_index":3652,"t":{"1667":{"position":[[148,6]]}}}],["3rd",{"_index":1514,"t":{"1184":{"position":[[793,3]]},"1700":{"position":[[158,3]]}}}],["4",{"_index":1503,"t":{"1184":{"position":[[475,3]]},"1336":{"position":[[3426,1],[5967,1]]},"1341":{"position":[[505,1]]},"1735":{"position":[[3514,2]]},"1737":{"position":[[579,1]]}}}],["4,302",{"_index":3655,"t":{"1669":{"position":[[94,5]]}}}],["4.1",{"_index":2253,"t":{"1336":{"position":[[1717,3],[2056,3]]}}}],["4.15.0",{"_index":3631,"t":{"1663":{"position":[[531,6]]}}}],["4.2",{"_index":2327,"t":{"1336":{"position":[[2759,3],[4934,3]]}}}],["4.3.1",{"_index":2179,"t":{"1336":{"position":[[79,5]]}}}],["4.3.2",{"_index":2181,"t":{"1336":{"position":[[118,5]]}}}],["4.3.3",{"_index":2183,"t":{"1336":{"position":[[157,5]]}}}],["4.3.4",{"_index":2185,"t":{"1336":{"position":[[194,5]]}}}],["4.3.5",{"_index":2190,"t":{"1336":{"position":[[271,5]]}}}],["4.3.6",{"_index":2192,"t":{"1336":{"position":[[316,5]]}}}],["4.3.7",{"_index":2194,"t":{"1336":{"position":[[361,5]]}}}],["4.3.8",{"_index":2196,"t":{"1336":{"position":[[402,5]]}}}],["4.4",{"_index":2339,"t":{"1336":{"position":[[2974,3],[5275,3]]},"1671":{"position":[[149,3]]}}}],["400",{"_index":364,"t":{"797":{"position":[[212,4]]},"823":{"position":[[271,3]]},"843":{"position":[[221,4]]},"1336":{"position":[[2213,3]]},"1534":{"position":[[839,3]]},"1552":{"position":[[855,3],[970,3]]}}}],["401",{"_index":362,"t":{"797":{"position":[[154,4]]},"803":{"position":[[333,3]]},"843":{"position":[[163,4]]},"849":{"position":[[330,3]]},"1336":{"position":[[2257,3]]},"1362":{"position":[[138,3]]},"1368":{"position":[[943,3]]},"1540":{"position":[[432,3]]}}}],["402",{"_index":2296,"t":{"1336":{"position":[[2302,3]]}}}],["403",{"_index":2299,"t":{"1336":{"position":[[2343,3]]}}}],["404",{"_index":2302,"t":{"1336":{"position":[[2383,3]]},"1680":{"position":[[229,3],[360,3]]},"1693":{"position":[[951,4]]},"1706":{"position":[[860,3]]},"1737":{"position":[[316,3]]}}}],["404.html",{"_index":3106,"t":{"1488":{"position":[[503,11]]}}}],["405",{"_index":2305,"t":{"1336":{"position":[[2431,3]]}}}],["406",{"_index":2308,"t":{"1336":{"position":[[2476,3]]}}}],["407",{"_index":2311,"t":{"1336":{"position":[[2525,3]]}}}],["408",{"_index":2314,"t":{"1336":{"position":[[2569,3]]},"1660":{"position":[[904,3]]}}}],["409",{"_index":2317,"t":{"1336":{"position":[[2609,3]]}}}],["4096",{"_index":2760,"t":{"1341":{"position":[[5564,4],[6974,4]]}}}],["410",{"_index":2320,"t":{"1336":{"position":[[2645,3]]}}}],["411",{"_index":2323,"t":{"1336":{"position":[[2691,3]]}}}],["412",{"_index":2326,"t":{"1336":{"position":[[2742,3]]}}}],["413",{"_index":2329,"t":{"1336":{"position":[[2793,3]]},"1341":{"position":[[464,3]]}}}],["414",{"_index":2332,"t":{"1336":{"position":[[2843,3]]}}}],["415",{"_index":2335,"t":{"1336":{"position":[[2896,3]]},"1882":{"position":[[295,3],[385,3]]}}}],["416",{"_index":2338,"t":{"1336":{"position":[[2957,3]]}}}],["417",{"_index":2341,"t":{"1336":{"position":[[3004,3]]}}}],["418",{"_index":2344,"t":{"1336":{"position":[[3043,3]]}}}],["42",{"_index":3183,"t":{"1524":{"position":[[54,2]]},"1737":{"position":[[2583,2]]}}}],["42.8",{"_index":3650,"t":{"1667":{"position":[[69,4]]}}}],["421",{"_index":2348,"t":{"1336":{"position":[[3093,3]]}}}],["422",{"_index":2352,"t":{"1336":{"position":[[3144,3]]}}}],["423",{"_index":2355,"t":{"1336":{"position":[[3181,3]]}}}],["424",{"_index":2358,"t":{"1336":{"position":[[3228,3]]}}}],["425",{"_index":2361,"t":{"1336":{"position":[[3267,3]]}}}],["426",{"_index":1723,"t":{"1212":{"position":[[1543,4]]},"1336":{"position":[[3313,3]]}}}],["428",{"_index":2367,"t":{"1336":{"position":[[3366,3]]}}}],["429",{"_index":2370,"t":{"1336":{"position":[[3409,3]]},"1552":{"position":[[274,3]]}}}],["431",{"_index":2372,"t":{"1336":{"position":[[3464,3]]}}}],["443",{"_index":594,"t":{"835":{"position":[[545,3]]}}}],["450b",{"_index":4179,"t":{"1796":{"position":[[271,4]]}}}],["451",{"_index":2374,"t":{"1336":{"position":[[3518,3]]}}}],["4918",{"_index":2256,"t":{"1336":{"position":[[1752,5],[3155,5],[3192,5],[3239,5],[3917,5],[5556,5],[5609,5],[5682,5],[6749,5]]}}}],["4gb",{"_index":3668,"t":{"1675":{"position":[[108,3]]}}}],["5",{"_index":942,"t":{"958":{"position":[[1246,2],[1942,2]]},"960":{"position":[[129,2],[152,2]]},"1336":{"position":[[3481,1],[6059,1]]},"1552":{"position":[[302,1]]},"1554":{"position":[[33,2]]},"1594":{"position":[[1624,1],[1765,3]]}}}],["5.2",{"_index":2363,"t":{"1336":{"position":[[3284,4],[5745,4]]}}}],["500",{"_index":2377,"t":{"1336":{"position":[[3565,3]]},"1564":{"position":[[1014,3]]},"1566":{"position":[[171,3]]},"1675":{"position":[[197,3]]},"1695":{"position":[[90,3],[342,3]]},"1697":{"position":[[735,3]]},"1852":{"position":[[291,5]]}}}],["5000",{"_index":3672,"t":{"1675":{"position":[[261,5],[591,4]]}}}],["501",{"_index":2380,"t":{"1336":{"position":[[3611,3]]}}}],["502",{"_index":2383,"t":{"1336":{"position":[[3653,3]]}}}],["503",{"_index":2386,"t":{"1336":{"position":[[3703,3]]},"1693":{"position":[[1026,3],[1088,3]]}}}],["504",{"_index":2389,"t":{"1336":{"position":[[3749,3]]}}}],["505",{"_index":2392,"t":{"1336":{"position":[[3804,3]]}}}],["506",{"_index":2395,"t":{"1336":{"position":[[3857,3]]}}}],["507",{"_index":2399,"t":{"1336":{"position":[[3906,3]]}}}],["508",{"_index":2402,"t":{"1336":{"position":[[3949,3]]}}}],["510",{"_index":2405,"t":{"1336":{"position":[[3990,3]]}}}],["511",{"_index":2409,"t":{"1336":{"position":[[4047,3]]}}}],["5120",{"_index":3625,"t":{"1663":{"position":[[488,4]]}}}],["5432",{"_index":1044,"t":{"1070":{"position":[[486,4]]},"1072":{"position":[[111,5]]}}}],["57,880",{"_index":3659,"t":{"1671":{"position":[[94,6]]}}}],["5789",{"_index":2188,"t":{"1336":{"position":[[229,4]]}}}],["5842",{"_index":2260,"t":{"1336":{"position":[[1798,5],[3960,5],[6814,5]]}}}],["6",{"_index":1431,"t":{"1178":{"position":[[1810,3],[1856,4]]},"1336":{"position":[[4064,1],[6978,1]]}}}],["6,162,556",{"_index":3645,"t":{"1665":{"position":[[386,9]]}}}],["6.2.1",{"_index":2222,"t":{"1336":{"position":[[1288,5]]}}}],["6.2.2",{"_index":2225,"t":{"1336":{"position":[[1338,5]]}}}],["6.3.1",{"_index":2234,"t":{"1336":{"position":[[1448,5]]}}}],["6.3.2",{"_index":2237,"t":{"1336":{"position":[[1487,5]]}}}],["6.3.3",{"_index":2240,"t":{"1336":{"position":[[1527,5]]}}}],["6.3.4",{"_index":2243,"t":{"1336":{"position":[[1586,5]]}}}],["6.3.5",{"_index":2246,"t":{"1336":{"position":[[1627,5]]}}}],["6.3.6",{"_index":2249,"t":{"1336":{"position":[[1671,5]]}}}],["6.4.1",{"_index":2268,"t":{"1336":{"position":[[1888,5]]}}}],["6.4.2",{"_index":2271,"t":{"1336":{"position":[[1936,5]]}}}],["6.4.3",{"_index":2274,"t":{"1336":{"position":[[1973,5]]}}}],["6.4.4",{"_index":2277,"t":{"1336":{"position":[[2013,5]]}}}],["6.4.5",{"_index":2283,"t":{"1336":{"position":[[2094,5]]}}}],["6.4.7",{"_index":2286,"t":{"1336":{"position":[[2143,5]]}}}],["6.5.1",{"_index":2291,"t":{"1336":{"position":[[2230,5],[4137,5]]}}}],["6.5.10",{"_index":2324,"t":{"1336":{"position":[[2708,6],[4855,6]]}}}],["6.5.11",{"_index":2330,"t":{"1336":{"position":[[2810,6],[5016,6]]}}}],["6.5.12",{"_index":2333,"t":{"1336":{"position":[[2860,6],[5093,6]]}}}],["6.5.13",{"_index":2336,"t":{"1336":{"position":[[2913,6],[5176,6]]}}}],["6.5.14",{"_index":2342,"t":{"1336":{"position":[[3021,6],[5349,6]]}}}],["6.5.15",{"_index":2365,"t":{"1336":{"position":[[3330,6],[5816,6]]}}}],["6.5.2",{"_index":2297,"t":{"1336":{"position":[[2319,5],[4273,5]]}}}],["6.5.3",{"_index":2300,"t":{"1336":{"position":[[2360,5],[4333,5]]}}}],["6.5.4",{"_index":2303,"t":{"1336":{"position":[[2400,5],[4391,5]]}}}],["6.5.5",{"_index":2306,"t":{"1336":{"position":[[2448,5],[4465,5]]}}}],["6.5.6",{"_index":2309,"t":{"1336":{"position":[[2493,5],[4533,5]]}}}],["6.5.7",{"_index":2315,"t":{"1336":{"position":[[2586,5],[4677,5]]}}}],["6.5.8",{"_index":2318,"t":{"1336":{"position":[[2626,5],[4735,5]]}}}],["6.5.9",{"_index":2321,"t":{"1336":{"position":[[2662,5],[4785,5]]}}}],["6.6.1",{"_index":2378,"t":{"1336":{"position":[[3582,5],[6225,5]]}}}],["6.6.2",{"_index":2381,"t":{"1336":{"position":[[3628,5],[6295,5]]}}}],["6.6.3",{"_index":2384,"t":{"1336":{"position":[[3670,5],[6357,5]]}}}],["6.6.4",{"_index":2387,"t":{"1336":{"position":[[3720,5],[6435,5]]}}}],["6.6.5",{"_index":2390,"t":{"1336":{"position":[[3766,5],[6505,5]]}}}],["6.6.6",{"_index":2393,"t":{"1336":{"position":[[3821,5],[6593,5]]}}}],["60",{"_index":901,"t":{"930":{"position":[[342,2]]},"932":{"position":[[123,2]]}}}],["600",{"_index":2869,"t":{"1376":{"position":[[702,7]]}}}],["6000",{"_index":2874,"t":{"1376":{"position":[[923,7]]}}}],["6140",{"_index":3665,"t":{"1675":{"position":[[85,4]]}}}],["6379",{"_index":1050,"t":{"1082":{"position":[[281,5]]},"1084":{"position":[[172,4]]},"1086":{"position":[[53,5]]}}}],["6380",{"_index":1059,"t":{"1082":{"position":[[617,9]]}}}],["64",{"_index":1109,"t":{"1096":{"position":[[386,3]]},"1100":{"position":[[77,3]]}}}],["6585",{"_index":2368,"t":{"1336":{"position":[[3377,5],[3420,5],[3475,5],[4058,5],[5893,5],[5961,5],[6053,5],[6972,5]]}}}],["7",{"_index":2407,"t":{"1336":{"position":[[4007,1],[6882,1]]}}}],["7.0",{"_index":3991,"t":{"1737":{"position":[[2682,4]]}}}],["7.1",{"_index":2261,"t":{"1336":{"position":[[1804,3]]}}}],["7.2",{"_index":2403,"t":{"1336":{"position":[[3966,3],[6820,3]]}}}],["700",{"_index":4354,"t":{"1852":{"position":[[152,4],[157,3],[297,4]]}}}],["7168",{"_index":2345,"t":{"1336":{"position":[[3054,5],[5398,5]]}}}],["72).unix",{"_index":439,"t":{"805":{"position":[[766,11]]},"809":{"position":[[1296,11]]}}}],["7231",{"_index":2178,"t":{"1336":{"position":[[73,5],[112,5],[151,5],[188,5],[265,5],[310,5],[355,5],[396,5],[1282,5],[1332,5],[1442,5],[1481,5],[1521,5],[1580,5],[1621,5],[1665,5],[1882,5],[1930,5],[1967,5],[2007,5],[2088,5],[2137,5],[2224,5],[2313,5],[2354,5],[2394,5],[2442,5],[2487,5],[2580,5],[2620,5],[2656,5],[2702,5],[2804,5],[2854,5],[2907,5],[3015,5],[3324,5],[3576,5],[3622,5],[3664,5],[3714,5],[3760,5],[3815,5],[4131,5],[4267,5],[4327,5],[4385,5],[4459,5],[4527,5],[4671,5],[4729,5],[4779,5],[4849,5],[5010,5],[5087,5],[5170,5],[5343,5],[5810,5],[6219,5],[6289,5],[6351,5],[6429,5],[6499,5],[6587,5]]}}}],["7232",{"_index":2280,"t":{"1336":{"position":[[2050,5],[2753,5],[4928,5]]}}}],["7233",{"_index":2252,"t":{"1336":{"position":[[1711,5],[2968,5],[5269,5]]}}}],["7235",{"_index":2293,"t":{"1336":{"position":[[2268,5],[2536,5],[4197,5],[4603,5]]}}}],["72d5",{"_index":3928,"t":{"1737":{"position":[[458,4]]}}}],["750",{"_index":3751,"t":{"1690":{"position":[[1330,4]]}}}],["7517",{"_index":507,"t":{"813":{"position":[[174,5]]}}}],["7538",{"_index":2289,"t":{"1336":{"position":[[2186,5]]}}}],["7540",{"_index":2349,"t":{"1336":{"position":[[3104,5],[5476,5]]}}}],["7725",{"_index":2375,"t":{"1336":{"position":[[3529,5],[6143,5]]}}}],["8",{"_index":2215,"t":{"1336":{"position":[[877,2],[930,2],[985,2],[1050,2],[1117,2],[1196,2]]},"1418":{"position":[[731,1]]},"1686":{"position":[[25,1]]},"1695":{"position":[[548,1]]},"1737":{"position":[[657,1]]},"1754":{"position":[[428,2],[1214,2]]},"1808":{"position":[[296,1]]},"1896":{"position":[[328,3],[369,2]]}}}],["8\">20worldworld!{{.name}}${{.price}}.new(dir",{"_index":1159,"t":{"1134":{"position":[[398,17]]}}}],["enhancesentryev",{"_index":281,"t":{"773":{"position":[[1313,18],[1509,19]]}}}],["ensur",{"_index":1622,"t":{"1190":{"position":[[3876,7]]},"1526":{"position":[[648,7]]},"1693":{"position":[[18,6]]},"1749":{"position":[[53,6]]},"1772":{"position":[[638,6]]}}}],["entir",{"_index":1610,"t":{"1190":{"position":[[2228,6]]}}}],["entiti",{"_index":2672,"t":{"1341":{"position":[[478,6]]}}}],["entri",{"_index":2886,"t":{"1378":{"position":[[1338,7]]},"1824":{"position":[[25,8]]}}}],["environ",{"_index":919,"t":{"948":{"position":[[131,11]]},"958":{"position":[[224,11],[261,11]]},"1102":{"position":[[125,11]]},"1341":{"position":[[4936,11]]},"1442":{"position":[[55,11]]},"1450":{"position":[[94,11],[193,11]]},"1488":{"position":[[541,11]]},"1665":{"position":[[338,12]]},"1682":{"position":[[1184,12]]}}}],["envoy",{"_index":3223,"t":{"1534":{"position":[[1231,5]]}}}],["envvar",{"_index":3030,"t":{"1442":{"position":[[0,6]]},"1446":{"position":[[588,6]]}}}],["envvar.config",{"_index":3034,"t":{"1446":{"position":[[387,14]]}}}],["envvar.new",{"_index":3033,"t":{"1446":{"position":[[291,13],[375,11]]}}}],["eq",{"_index":1529,"t":{"1186":{"position":[[266,2],[508,2],[594,2]]}}}],["equal",{"_index":1923,"t":{"1247":{"position":[[119,5]]},"1424":{"position":[[348,6]]},"1693":{"position":[[956,6]]}}}],["equiv=\"cont",{"_index":1433,"t":{"1178":{"position":[[1875,14]]}}}],["equival",{"_index":1500,"t":{"1184":{"position":[[381,10],[482,10],[1563,10]]},"1460":{"position":[[509,11]]},"1832":{"position":[[504,10]]},"1876":{"position":[[138,10]]}}}],["err",{"_index":189,"t":{"759":{"position":[[336,3]]},"763":{"position":[[167,3]]},"795":{"position":[[365,3],[393,3]]},"805":{"position":[[909,3],[956,3]]},"809":{"position":[[555,3],[577,3],[613,3],[660,4],[1439,3],[1480,3],[1530,4]]},"839":{"position":[[601,3],[643,3],[710,4],[1092,3],[1139,3]]},"869":{"position":[[757,3],[787,3],[810,3],[844,4],[888,3],[919,3],[954,4]]},"1082":{"position":[[675,3],[737,3]]},"1174":{"position":[[466,3]]},"1178":{"position":[[1494,3]]},"1180":{"position":[[884,3]]},"1188":{"position":[[1991,3],[2012,3],[2065,3]]},"1190":{"position":[[1488,3],[2520,3],[3668,3],[4528,3],[4712,3]]},"1274":{"position":[[152,3],[170,3],[208,4]]},"1328":{"position":[[119,4],[153,4]]},"1330":{"position":[[141,4]]},"1332":{"position":[[182,4],[227,4]]},"1360":{"position":[[313,3],[356,3],[376,3]]},"1500":{"position":[[286,3],[305,3]]},"1542":{"position":[[123,3],[145,3]]},"1562":{"position":[[1044,3],[1120,3],[1170,4]]},"1594":{"position":[[1167,3],[1192,3],[1212,3],[1411,3],[1464,3],[1484,3],[1700,3],[1769,3],[1789,3],[1989,3],[2066,3],[2086,3]]},"1640":{"position":[[404,3],[427,3],[625,3],[648,3],[772,3],[792,3]]},"1660":{"position":[[369,3],[422,3],[476,4],[1196,3],[1264,3],[1318,4]]},"1684":{"position":[[202,3]]},"1695":{"position":[[296,3]]},"1697":{"position":[[689,3],[922,3],[989,3]]},"1749":{"position":[[934,3],[966,3],[986,3],[1288,3],[1315,3]]},"1770":{"position":[[687,3],[711,3],[731,3]]},"1786":{"position":[[270,3]]},"1824":{"position":[[319,3],[345,3],[771,3],[832,3],[852,3],[869,3]]},"1832":{"position":[[430,3]]},"1850":{"position":[[529,3],[554,3],[574,3]]},"1864":{"position":[[551,3],[580,3],[600,3]]},"1870":{"position":[[514,3],[591,3]]},"1872":{"position":[[216,3],[242,3],[576,3],[637,3],[657,3],[672,3]]},"1874":{"position":[[296,3],[322,3],[659,3],[738,3],[758,3],[773,3]]},"1886":{"position":[[673,3],[713,3]]},"1902":{"position":[[82,3]]},"1904":{"position":[[107,3]]},"1906":{"position":[[84,3]]}}}],["err.(validator.validationerror",{"_index":4014,"t":{"1749":{"position":[[999,32]]}}}],["err.error",{"_index":1631,"t":{"1190":{"position":[[4739,12]]},"1749":{"position":[[1404,12]]}}}],["err.param",{"_index":4020,"t":{"1749":{"position":[[1144,11]]}}}],["err.structnamespac",{"_index":4016,"t":{"1749":{"position":[[1082,21]]}}}],["err.tag",{"_index":4018,"t":{"1749":{"position":[[1118,9]]}}}],["errbadgateway",{"_index":2472,"t":{"1336":{"position":[[6301,13]]}}}],["errbadrequest",{"_index":2410,"t":{"1336":{"position":[[4081,13]]}}}],["errconflict",{"_index":2428,"t":{"1336":{"position":[[4683,11]]}}}],["errexpectationfail",{"_index":2444,"t":{"1336":{"position":[[5279,20]]}}}],["errfaileddepend",{"_index":2454,"t":{"1336":{"position":[[5620,19]]}}}],["errfootimeout",{"_index":3594,"t":{"1660":{"position":[[1012,13],[1406,15],[1630,13]]}}}],["errforbidden",{"_index":2416,"t":{"1336":{"position":[[4279,12]]}}}],["errgatewaytimeout",{"_index":2476,"t":{"1336":{"position":[[6441,17]]}}}],["errgon",{"_index":2430,"t":{"1336":{"position":[[4741,7]]}}}],["errhttpversionnotsupport",{"_index":2478,"t":{"1336":{"position":[[6511,26]]}}}],["errinsufficientstorag",{"_index":2482,"t":{"1336":{"position":[[6681,22]]}}}],["errinternalservererror",{"_index":2468,"t":{"1336":{"position":[[6151,22]]}}}],["errinvalididempotencykey",{"_index":3197,"t":{"1528":{"position":[[382,25]]}}}],["errlengthrequir",{"_index":2432,"t":{"1336":{"position":[[4791,17]]}}}],["errlock",{"_index":2452,"t":{"1336":{"position":[[5567,9]]}}}],["errloopdetect",{"_index":2484,"t":{"1336":{"position":[[6760,15]]}}}],["errmethodnotallow",{"_index":2420,"t":{"1336":{"position":[[4397,19]]}}}],["errmisdirectedrequest",{"_index":2448,"t":{"1336":{"position":[[5410,21]]}}}],["errmissingormalformedapikey",{"_index":3247,"t":{"1542":{"position":[[152,27]]}}}],["errnetworkauthenticationrequir",{"_index":2488,"t":{"1336":{"position":[[6884,32]]}}}],["errnotaccept",{"_index":2422,"t":{"1336":{"position":[[4471,16]]}}}],["errnotextend",{"_index":2486,"t":{"1336":{"position":[[6824,14]]}}}],["errnotfound",{"_index":2418,"t":{"1336":{"position":[[4339,11]]}}}],["errnotimpl",{"_index":2470,"t":{"1336":{"position":[[6231,17]]}}}],["erron",{"_index":3174,"t":{"1516":{"position":[[156,11]]}}}],["error",{"_index":59,"t":{"733":{"position":[[366,5],[453,5]]},"737":{"position":[[564,5],[753,5]]},"739":{"position":[[530,5]]},"741":{"position":[[507,5]]},"751":{"position":[[411,5],[518,5]]},"759":{"position":[[340,6]]},"761":{"position":[[164,5]]},"763":{"position":[[391,5]]},"773":{"position":[[1354,5],[1548,5],[1606,5]]},"783":{"position":[[337,7],[353,7]]},"785":{"position":[[273,5]]},"793":{"position":[[454,8],[524,7],[540,7]]},"795":{"position":[[314,5],[445,7]]},"797":{"position":[[175,6],[232,6]]},"801":{"position":[[55,5]]},"803":{"position":[[137,5],[248,6],[255,5]]},"805":{"position":[[473,5],[560,5],[1093,5],[1167,5]]},"809":{"position":[[559,5],[1003,5],[1090,5],[1659,5],[1733,5]]},"815":{"position":[[936,5],[1050,6]]},"823":{"position":[[578,6]]},"825":{"position":[[67,6]]},"827":{"position":[[785,6],[942,5]]},"839":{"position":[[32,8],[811,5],[888,5]]},"843":{"position":[[184,6],[240,6]]},"847":{"position":[[61,5]]},"849":{"position":[[129,5],[245,6],[252,5]]},"851":{"position":[[510,6]]},"869":{"position":[[166,5],[761,5]]},"871":{"position":[[15,5]]},"874":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"882":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"896":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"910":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"924":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"938":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"952":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"958":{"position":[[2737,5],[3002,7]]},"966":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"980":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"994":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1008":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1022":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1036":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1050":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1064":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1078":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1092":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1106":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1120":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1134":{"position":[[1552,5],[1696,5]]},"1144":{"position":[[676,5],[806,5]]},"1148":{"position":[[679,5],[809,5]]},"1152":{"position":[[765,5],[895,5]]},"1154":{"position":[[855,5]]},"1160":{"position":[[725,5],[855,5]]},"1164":{"position":[[736,5],[866,5]]},"1166":{"position":[[337,5]]},"1168":{"position":[[463,5]]},"1188":{"position":[[1995,5]]},"1190":{"position":[[2448,6]]},"1194":{"position":[[727,5],[857,5]]},"1198":{"position":[[902,5],[1032,5]]},"1202":{"position":[[720,5],[850,5]]},"1206":{"position":[[744,5],[874,5]]},"1212":{"position":[[525,5],[804,5],[1161,5]]},"1214":{"position":[[196,5]]},"1216":{"position":[[395,6],[539,5],[721,5],[861,5],[1056,5],[1291,5]]},"1225":{"position":[[1000,5],[1121,5],[1454,5],[1552,5],[1705,5],[1795,5],[1885,5]]},"1227":{"position":[[265,5]]},"1237":{"position":[[445,5],[510,5],[573,5]]},"1241":{"position":[[133,5]]},"1243":{"position":[[147,5]]},"1245":{"position":[[132,5]]},"1247":{"position":[[266,5]]},"1253":{"position":[[98,5]]},"1255":{"position":[[192,5]]},"1257":{"position":[[71,5]]},"1259":{"position":[[240,5]]},"1261":{"position":[[288,5]]},"1263":{"position":[[184,5]]},"1265":{"position":[[331,6],[421,5]]},"1328":{"position":[[46,6],[124,8]]},"1330":{"position":[[48,6],[112,8]]},"1332":{"position":[[47,6],[187,8]]},"1334":{"position":[[62,6]]},"1336":{"position":[[4068,6]]},"1341":{"position":[[3397,5],[3449,5]]},"1343":{"position":[[121,6],[168,5],[211,5]]},"1349":{"position":[[686,6]]},"1356":{"position":[[386,5]]},"1358":{"position":[[274,5]]},"1360":{"position":[[296,5]]},"1366":{"position":[[737,5]]},"1376":{"position":[[877,5]]},"1404":{"position":[[361,6]]},"1408":{"position":[[525,6]]},"1410":{"position":[[1992,6]]},"1422":{"position":[[375,6]]},"1424":{"position":[[651,5],[756,5],[762,5]]},"1426":{"position":[[211,6]]},"1434":{"position":[[776,5],[908,5]]},"1436":{"position":[[682,6],[820,6]]},"1458":{"position":[[373,5],[604,5]]},"1468":{"position":[[335,5]]},"1510":{"position":[[189,5]]},"1526":{"position":[[743,5]]},"1528":{"position":[[263,5]]},"1534":{"position":[[236,6],[723,5]]},"1536":{"position":[[502,6],[1114,5],[1201,5],[1300,5]]},"1538":{"position":[[304,6],[574,5],[671,5]]},"1540":{"position":[[403,6],[982,6]]},"1542":{"position":[[63,5],[127,6],[134,5]]},"1548":{"position":[[580,5]]},"1552":{"position":[[714,5]]},"1554":{"position":[[157,5]]},"1562":{"position":[[1439,6]]},"1564":{"position":[[1421,6]]},"1568":{"position":[[558,7]]},"1592":{"position":[[394,5],[628,5],[816,5],[1014,5]]},"1594":{"position":[[1104,5],[1400,5],[1689,5],[1978,5],[2571,5],[2672,5]]},"1604":{"position":[[367,5],[389,7]]},"1614":{"position":[[297,5],[382,5]]},"1634":{"position":[[277,5],[362,5]]},"1638":{"position":[[123,6],[154,5],[322,5],[359,5],[390,5]]},"1640":{"position":[[362,5]]},"1654":{"position":[[402,5],[527,5]]},"1656":{"position":[[187,5],[548,5]]},"1658":{"position":[[69,9],[173,9]]},"1660":{"position":[[293,5],[468,7],[647,5],[1001,6],[1120,5],[1310,7],[1530,5],[1849,5]]},"1680":{"position":[[78,5],[142,5],[198,5],[233,7],[409,5]]},"1684":{"position":[[24,5],[206,6],[213,5],[340,5],[375,5]]},"1690":{"position":[[466,5],[724,5],[987,5],[1085,5]]},"1693":{"position":[[48,6],[238,5],[254,5],[669,5],[781,5],[1015,5]]},"1695":{"position":[[18,5],[59,6],[110,6],[124,5],[237,5],[300,6],[307,5],[640,5]]},"1697":{"position":[[9,5],[112,5],[166,5],[240,6],[317,5],[409,5],[488,5],[523,7],[640,5],[693,6],[700,5],[911,5],[1111,7],[1241,5]]},"1706":{"position":[[864,6],[894,6]]},"1708":{"position":[[182,5],[303,5]]},"1712":{"position":[[91,5],[167,5],[244,5],[281,5],[361,5]]},"1716":{"position":[[376,5],[476,5],[573,5],[675,5],[785,5]]},"1728":{"position":[[519,5]]},"1731":{"position":[[1000,5],[1121,5],[1454,5],[1552,5],[1705,5],[1795,5],[1885,5]]},"1733":{"position":[[280,5],[408,5],[547,5]]},"1735":{"position":[[910,5],[1085,5],[1196,5],[1315,5],[1547,5],[2031,5],[2227,5],[2601,5]]},"1737":{"position":[[1333,5],[1581,5],[1980,5],[2491,5]]},"1739":{"position":[[273,5],[440,5]]},"1744":{"position":[[106,5],[162,5],[861,5]]},"1746":{"position":[[585,5]]},"1749":{"position":[[910,6],[1156,6],[1201,6],[1237,5],[1422,6],[1457,6]]},"1751":{"position":[[1000,5],[1121,5],[1454,5],[1552,5],[1705,5],[1795,5],[1885,5]]},"1754":{"position":[[463,5],[868,5],[1344,5]]},"1756":{"position":[[220,5],[354,5]]},"1758":{"position":[[160,5]]},"1760":{"position":[[256,5]]},"1762":{"position":[[166,5]]},"1764":{"position":[[175,5]]},"1766":{"position":[[164,5],[205,5],[295,5]]},"1768":{"position":[[160,5]]},"1770":{"position":[[438,5],[659,5]]},"1772":{"position":[[145,5],[712,5],[906,5]]},"1774":{"position":[[399,5]]},"1778":{"position":[[429,5]]},"1780":{"position":[[237,5]]},"1782":{"position":[[346,5],[392,5]]},"1784":{"position":[[234,5],[280,5]]},"1786":{"position":[[162,6],[210,5]]},"1788":{"position":[[208,5]]},"1792":{"position":[[202,5]]},"1796":{"position":[[213,5]]},"1800":{"position":[[169,6],[216,5],[313,5],[414,5]]},"1802":{"position":[[170,5]]},"1804":{"position":[[122,5]]},"1806":{"position":[[207,5]]},"1808":{"position":[[330,5]]},"1810":{"position":[[129,5]]},"1812":{"position":[[181,5],[280,5]]},"1814":{"position":[[299,5],[394,5]]},"1816":{"position":[[178,5]]},"1818":{"position":[[325,5],[415,5]]},"1820":{"position":[[159,5]]},"1822":{"position":[[255,5]]},"1824":{"position":[[225,6],[273,5]]},"1826":{"position":[[110,5],[181,5],[227,5],[273,5],[358,5],[443,5]]},"1828":{"position":[[164,5]]},"1830":{"position":[[369,5],[494,5],[972,5]]},"1832":{"position":[[186,5],[328,6],[418,5],[473,5]]},"1834":{"position":[[288,5],[377,5]]},"1836":{"position":[[326,5]]},"1838":{"position":[[178,5]]},"1840":{"position":[[167,6],[272,5],[478,5],[692,5],[899,5],[1211,5]]},"1842":{"position":[[415,5]]},"1844":{"position":[[548,5]]},"1846":{"position":[[612,5]]},"1848":{"position":[[602,5]]},"1850":{"position":[[288,5],[501,5]]},"1852":{"position":[[117,6],[197,5]]},"1854":{"position":[[255,5],[307,5],[385,5],[508,5]]},"1856":{"position":[[397,5],[443,5],[576,5],[844,5]]},"1858":{"position":[[295,5],[341,5],[421,5],[551,5]]},"1860":{"position":[[280,5]]},"1862":{"position":[[137,5]]},"1864":{"position":[[298,5],[523,5]]},"1866":{"position":[[141,5]]},"1868":{"position":[[343,5],[392,5],[471,5]]},"1870":{"position":[[155,5],[462,5]]},"1872":{"position":[[123,5],[170,5]]},"1874":{"position":[[179,5],[250,5]]},"1878":{"position":[[71,5],[117,5],[390,5],[452,5],[498,5]]},"1880":{"position":[[261,5],[316,5],[629,5]]},"1882":{"position":[[201,5],[256,5]]},"1884":{"position":[[159,5]]},"1886":{"position":[[1283,5],[1415,5]]},"1888":{"position":[[162,5]]},"1892":{"position":[[160,5],[243,5],[356,5]]},"1894":{"position":[[336,5]]},"1896":{"position":[[201,5]]},"1898":{"position":[[232,5]]},"1900":{"position":[[282,5]]},"1902":{"position":[[86,6],[133,5]]},"1904":{"position":[[111,6],[158,5]]},"1906":{"position":[[88,6],[135,5]]},"1908":{"position":[[288,5]]},"1910":{"position":[[185,5],[336,5]]}}}],["errorhandl",{"_index":381,"t":{"803":{"position":[[218,12],[261,12]]},"849":{"position":[[215,12],[258,12]]},"1341":{"position":[[3338,12],[3351,12],[3364,12]]},"1412":{"position":[[160,13]]},"1540":{"position":[[296,12],[459,12]]},"1542":{"position":[[90,13]]},"1600":{"position":[[126,13]]},"1656":{"position":[[233,13],[594,13]]},"1684":{"position":[[169,13]]},"1697":{"position":[[654,13]]}}}],["errorrespons",{"_index":4009,"t":{"1749":{"position":[[757,13],[887,16],[917,16],[1046,13]]}}}],["errors.as(err",{"_index":3764,"t":{"1695":{"position":[[466,14]]},"1697":{"position":[[859,14]]}}}],["errors.new(\"abc",{"_index":632,"t":{"839":{"position":[[826,17]]}}}],["errors.new(\"foo",{"_index":3595,"t":{"1660":{"position":[[1028,15]]}}}],["errorstatuscodehandl",{"_index":188,"t":{"759":{"position":[[294,22]]}}}],["errpaymentrequir",{"_index":2414,"t":{"1336":{"position":[[4207,18]]}}}],["errpreconditionfail",{"_index":2434,"t":{"1336":{"position":[[4862,21]]}}}],["errpreconditionrequir",{"_index":2460,"t":{"1336":{"position":[[5823,23]]}}}],["errproxyauthrequir",{"_index":2424,"t":{"1336":{"position":[[4539,20]]}}}],["errrequestedrangenotsatisfi",{"_index":2442,"t":{"1336":{"position":[[5183,31]]}}}],["errrequestentitytoolarg",{"_index":2436,"t":{"1336":{"position":[[4938,24]]}}}],["errrequestheaderfieldstoolarg",{"_index":2464,"t":{"1336":{"position":[[5969,30]]}}}],["errrequesttimeout",{"_index":2426,"t":{"1336":{"position":[[4613,17]]}}}],["errrequesturitoolong",{"_index":2438,"t":{"1336":{"position":[[5023,20]]}}}],["errserviceunavail",{"_index":2474,"t":{"1336":{"position":[[6363,21]]}}}],["errteapot",{"_index":2446,"t":{"1336":{"position":[[5356,9]]}}}],["errtooearli",{"_index":2456,"t":{"1336":{"position":[[5693,11]]}}}],["errtoomanyrequest",{"_index":2462,"t":{"1336":{"position":[[5901,18]]}}}],["errunauthor",{"_index":2412,"t":{"1336":{"position":[[4143,15]]}}}],["errunavailableforlegalreason",{"_index":2466,"t":{"1336":{"position":[[6061,29]]}}}],["errunprocessableent",{"_index":2450,"t":{"1336":{"position":[[5488,22]]}}}],["errunsupportedmediatyp",{"_index":2440,"t":{"1336":{"position":[[5100,23]]}}}],["errupgraderequir",{"_index":2458,"t":{"1336":{"position":[[5750,18]]}}}],["errvariantalsonegoti",{"_index":2480,"t":{"1336":{"position":[[6599,24]]}}}],["escap",{"_index":3874,"t":{"1735":{"position":[[1473,7],[1783,7]]},"1880":{"position":[[503,6]]}}}],["especi",{"_index":934,"t":{"958":{"position":[[480,10]]}}}],["essenti",{"_index":1725,"t":{"1214":{"position":[[18,11]]},"1693":{"position":[[5,9]]}}}],["establish",{"_index":983,"t":{"972":{"position":[[117,9]]},"1876":{"position":[[57,12]]}}}],["etag",{"_index":2518,"t":{"1336":{"position":[[7638,6]]},"1341":{"position":[[1818,4],[1846,4],[1897,5],[1962,5]]},"1454":{"position":[[0,4]]},"1458":{"position":[[300,5],[528,5]]},"1460":{"position":[[249,5],[427,4],[573,5],[644,5]]}}}],["etc",{"_index":1156,"t":{"1134":{"position":[[201,5]]},"1216":{"position":[[181,6],[480,4]]},"1225":{"position":[[1335,3]]},"1564":{"position":[[875,3]]},"1731":{"position":[[1335,3]]},"1751":{"position":[[1335,3]]}}}],["etcd",{"_index":791,"t":{"876":{"position":[[51,4]]},"920":{"position":[[29,4]]},"962":{"position":[[2,4],[28,4]]},"968":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":977,"t":{"970":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":978,"t":{"970":{"position":[[216,16]]}}}],["ethernet",{"_index":3635,"t":{"1663":{"position":[[573,8]]},"1665":{"position":[[317,8]]}}}],["evalu",{"_index":1470,"t":{"1182":{"position":[[582,8]]},"1184":{"position":[[1615,9]]}}}],["event",{"_index":228,"t":{"771":{"position":[[421,5]]},"773":{"position":[[1159,5]]},"775":{"position":[[332,5]]},"1336":{"position":[[10496,5]]},"1728":{"position":[[77,5]]}}}],["exactli",{"_index":2064,"t":{"1296":{"position":[[274,7]]},"1737":{"position":[[714,8]]}}}],["exampl",{"_index":470,"t":{"809":{"position":[[206,8]]},"827":{"position":[[41,7]]},"837":{"position":[[16,7]]},"841":{"position":[[267,8],[554,8]]},"855":{"position":[[11,8]]},"880":{"position":[[24,8]]},"894":{"position":[[24,8]]},"908":{"position":[[24,8]]},"922":{"position":[[24,8]]},"936":{"position":[[24,8]]},"950":{"position":[[24,8]]},"958":{"position":[[1407,7],[2103,7]]},"964":{"position":[[24,8]]},"978":{"position":[[24,8]]},"992":{"position":[[24,8]]},"1006":{"position":[[24,8]]},"1020":{"position":[[24,8]]},"1034":{"position":[[24,8]]},"1048":{"position":[[24,8]]},"1062":{"position":[[24,8]]},"1076":{"position":[[24,8]]},"1084":{"position":[[555,8]]},"1090":{"position":[[24,8]]},"1104":{"position":[[24,8]]},"1118":{"position":[[24,8]]},"1134":{"position":[[218,7],[523,8],[1650,7]]},"1136":{"position":[[22,9]]},"1144":{"position":[[493,8]]},"1148":{"position":[[494,8]]},"1152":{"position":[[579,8]]},"1160":{"position":[[542,8]]},"1164":{"position":[[552,8]]},"1170":{"position":[[319,8]]},"1178":{"position":[[195,7]]},"1180":{"position":[[950,7]]},"1182":{"position":[[1935,8]]},"1184":{"position":[[746,7]]},"1188":{"position":[[123,8],[1043,8],[1851,7],[2397,7]]},"1190":{"position":[[1198,7],[3512,7]]},"1194":{"position":[[545,8]]},"1202":{"position":[[538,8]]},"1206":{"position":[[560,8]]},"1208":{"position":[[33,8]]},"1212":{"position":[[489,8],[744,7]]},"1223":{"position":[[471,8],[825,8],[2600,7]]},"1225":{"position":[[929,8],[1397,8]]},"1227":{"position":[[112,8]]},"1229":{"position":[[135,8]]},"1231":{"position":[[125,8]]},"1233":{"position":[[165,8]]},"1235":{"position":[[98,8]]},"1241":{"position":[[91,8]]},"1243":{"position":[[105,8]]},"1245":{"position":[[90,8]]},"1247":{"position":[[190,8]]},"1253":{"position":[[104,8]]},"1255":{"position":[[198,8]]},"1257":{"position":[[77,8]]},"1259":{"position":[[246,8]]},"1261":{"position":[[294,8]]},"1263":{"position":[[190,8]]},"1265":{"position":[[338,8]]},"1276":{"position":[[248,7]]},"1278":{"position":[[316,7]]},"1280":{"position":[[102,7]]},"1282":{"position":[[157,7]]},"1284":{"position":[[360,7]]},"1286":{"position":[[148,7]]},"1288":{"position":[[169,7]]},"1290":{"position":[[124,7]]},"1292":{"position":[[164,7]]},"1294":{"position":[[203,7]]},"1296":{"position":[[616,7]]},"1298":{"position":[[135,7]]},"1300":{"position":[[132,7]]},"1302":{"position":[[318,7]]},"1304":{"position":[[389,7],[715,7],[1052,7],[1678,7]]},"1306":{"position":[[146,7]]},"1308":{"position":[[103,7]]},"1310":{"position":[[195,7]]},"1312":{"position":[[153,7]]},"1314":{"position":[[90,7]]},"1316":{"position":[[122,7]]},"1318":{"position":[[114,7]]},"1320":{"position":[[116,7]]},"1322":{"position":[[85,7]]},"1324":{"position":[[242,7]]},"1326":{"position":[[192,7]]},"1328":{"position":[[133,7]]},"1330":{"position":[[121,7]]},"1332":{"position":[[196,7]]},"1334":{"position":[[188,7]]},"1339":{"position":[[147,7]]},"1341":{"position":[[68,7],[5541,8]]},"1343":{"position":[[128,7]]},"1345":{"position":[[96,7]]},"1398":{"position":[[507,7],[556,8]]},"1404":{"position":[[836,8]]},"1440":{"position":[[181,8]]},"1480":{"position":[[463,7]]},"1516":{"position":[[95,7]]},"1534":{"position":[[1144,8],[1273,7]]},"1544":{"position":[[393,8]]},"1550":{"position":[[101,7]]},"1552":{"position":[[1419,7]]},"1584":{"position":[[334,8]]},"1586":{"position":[[320,8]]},"1596":{"position":[[923,8]]},"1616":{"position":[[310,8]]},"1636":{"position":[[209,8]]},"1648":{"position":[[202,9]]},"1654":{"position":[[660,7]]},"1678":{"position":[[353,8]]},"1680":{"position":[[374,7]]},"1682":{"position":[[455,8],[988,7],[1087,7]]},"1684":{"position":[[130,7]]},"1690":{"position":[[25,9],[40,7]]},"1693":{"position":[[198,7],[464,7],[975,7]]},"1695":{"position":[[218,7]]},"1697":{"position":[[459,7],[531,7]]},"1700":{"position":[[376,7]]},"1716":{"position":[[243,7]]},"1728":{"position":[[280,7]]},"1731":{"position":[[929,8],[1397,8]]},"1733":{"position":[[144,8]]},"1735":{"position":[[794,7]]},"1737":{"position":[[340,7],[348,7],[1223,8],[2381,7]]},"1739":{"position":[[213,7]]},"1746":{"position":[[143,7]]},"1749":{"position":[[148,12],[295,7]]},"1751":{"position":[[929,8],[1397,8]]},"1754":{"position":[[341,7],[769,7]]},"1756":{"position":[[133,7]]},"1758":{"position":[[115,7]]},"1760":{"position":[[216,7]]},"1762":{"position":[[126,7]]},"1764":{"position":[[93,7]]},"1766":{"position":[[170,7]]},"1768":{"position":[[68,7]]},"1770":{"position":[[130,8],[444,7]]},"1772":{"position":[[105,7],[669,7]]},"1774":{"position":[[322,7]]},"1778":{"position":[[389,7]]},"1780":{"position":[[197,7]]},"1782":{"position":[[352,7]]},"1784":{"position":[[240,7]]},"1786":{"position":[[169,7]]},"1788":{"position":[[167,7]]},"1792":{"position":[[162,7]]},"1796":{"position":[[173,7]]},"1800":{"position":[[72,8],[176,7]]},"1802":{"position":[[98,7]]},"1804":{"position":[[82,7]]},"1806":{"position":[[121,7]]},"1808":{"position":[[248,7]]},"1810":{"position":[[89,7]]},"1812":{"position":[[187,7]]},"1814":{"position":[[305,7]]},"1816":{"position":[[138,7]]},"1818":{"position":[[290,7]]},"1820":{"position":[[118,7]]},"1822":{"position":[[214,7]]},"1824":{"position":[[232,7]]},"1826":{"position":[[233,7]]},"1828":{"position":[[79,7]]},"1830":{"position":[[282,7],[664,7],[921,7]]},"1832":{"position":[[335,7]]},"1834":{"position":[[115,8],[294,7]]},"1836":{"position":[[239,7]]},"1838":{"position":[[112,7]]},"1840":{"position":[[174,7],[368,7],[552,7],[783,7],[1001,7]]},"1842":{"position":[[326,7]]},"1844":{"position":[[450,7]]},"1846":{"position":[[518,7]]},"1848":{"position":[[508,7]]},"1850":{"position":[[115,8],[294,7]]},"1852":{"position":[[124,7]]},"1854":{"position":[[261,7],[467,8]]},"1856":{"position":[[403,7]]},"1858":{"position":[[301,7]]},"1862":{"position":[[97,7]]},"1864":{"position":[[118,8],[304,7]]},"1866":{"position":[[101,7]]},"1868":{"position":[[349,7]]},"1870":{"position":[[73,7],[392,7]]},"1872":{"position":[[129,7]]},"1874":{"position":[[185,7]]},"1876":{"position":[[108,7]]},"1878":{"position":[[77,7],[458,7]]},"1880":{"position":[[267,7],[570,7]]},"1882":{"position":[[207,7]]},"1884":{"position":[[119,7]]},"1886":{"position":[[356,7],[1030,7]]},"1888":{"position":[[122,7]]},"1892":{"position":[[115,7]]},"1894":{"position":[[260,7]]},"1896":{"position":[[161,7]]},"1898":{"position":[[192,7]]},"1900":{"position":[[242,7]]},"1902":{"position":[[93,7]]},"1904":{"position":[[118,7]]},"1906":{"position":[[95,7]]},"1908":{"position":[[212,7]]},"1910":{"position":[[191,7]]}}}],["example.authz",{"_index":564,"t":{"827":{"position":[[387,13]]}}}],["example.html",{"_index":3324,"t":{"1564":{"position":[[721,12]]}}}],["example/loc",{"_index":116,"t":{"749":{"position":[[169,20]]},"751":{"position":[[247,21]]}}}],["exce",{"_index":2671,"t":{"1341":{"position":[[425,7]]}}}],["excecut",{"_index":3111,"t":{"1490":{"position":[[54,12]]}}}],["exceed",{"_index":1888,"t":{"1237":{"position":[[408,9]]}}}],["excel",{"_index":1760,"t":{"1220":{"position":[[82,9]]}}}],["except",{"_index":504,"t":{"813":{"position":[[55,9]]},"1436":{"position":[[284,6]]},"1438":{"position":[[39,7]]},"1440":{"position":[[140,6],[279,7]]},"1814":{"position":[[76,6]]}}}],["exclud",{"_index":1225,"t":{"1140":{"position":[[159,8]]},"1341":{"position":[[1100,8],[1212,8]]},"1440":{"position":[[310,7]]},"1474":{"position":[[227,7]]},"1652":{"position":[[32,7]]},"1772":{"position":[[499,9]]}}}],["exclude_dir",{"_index":3713,"t":{"1682":{"position":[[662,11]]}}}],["exclude_regex",{"_index":3716,"t":{"1682":{"position":[[748,13]]}}}],["excludevar",{"_index":3039,"t":{"1446":{"position":[[484,12]]},"1450":{"position":[[167,11],[238,11]]}}}],["exclus",{"_index":3092,"t":{"1474":{"position":[[345,11]]}}}],["execut",{"_index":380,"t":{"803":{"position":[[186,8],[302,8]]},"849":{"position":[[178,8],[299,8]]},"1084":{"position":[[920,7]]},"1172":{"position":[[31,9]]},"1174":{"position":[[569,8]]},"1176":{"position":[[0,7],[84,7],[127,8],[307,9],[396,7],[467,8]]},"1188":{"position":[[1584,8],[1770,8],[2360,8]]},"1190":{"position":[[1447,9],[2969,8]]},"1216":{"position":[[244,8],[591,8]]},"1341":{"position":[[3380,8]]},"1418":{"position":[[996,9]]},"1540":{"position":[[212,8],[337,8]]},"1656":{"position":[[452,10],[640,11],[663,10]]},"1660":{"position":[[458,9],[1300,9]]},"1663":{"position":[[81,9]]},"1710":{"position":[[28,7]]},"1714":{"position":[[21,7]]},"1716":{"position":[[20,7]]},"1718":{"position":[[21,7]]},"1720":{"position":[[25,7]]},"1722":{"position":[[22,7]]},"1724":{"position":[[20,7]]},"1726":{"position":[[24,7]]},"1728":{"position":[[21,7]]},"1737":{"position":[[18,7]]},"1739":{"position":[[154,8]]},"1744":{"position":[[229,8]]},"1826":{"position":[[24,8]]},"1868":{"position":[[11,9],[80,9],[247,8]]},"1870":{"position":[[376,8]]}}}],["execute(w",{"_index":1629,"t":{"1190":{"position":[[4691,13]]}}}],["exercis",{"_index":3638,"t":{"1665":{"position":[[25,8]]}}}],["exist",{"_index":187,"t":{"759":{"position":[[267,8]]},"874":{"position":[[371,5]]},"888":{"position":[[491,8],[508,8]]},"902":{"position":[[315,8],[332,8]]},"916":{"position":[[118,8],[135,8]]},"930":{"position":[[485,8],[502,8]]},"958":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"986":{"position":[[166,8],[183,8]]},"1014":{"position":[[626,8],[643,8]]},"1028":{"position":[[720,8],[737,8]]},"1042":{"position":[[735,8],[752,8]]},"1052":{"position":[[224,8]]},"1070":{"position":[[875,8],[892,8]]},"1084":{"position":[[1199,8],[1216,8]]},"1112":{"position":[[265,8],[282,8]]},"1126":{"position":[[179,8],[196,8]]},"1162":{"position":[[327,6]]},"1182":{"position":[[156,5],[384,6]]},"1223":{"position":[[687,5]]},"1656":{"position":[[6,5]]},"1693":{"position":[[302,7]]},"1780":{"position":[[115,6]]},"1788":{"position":[[305,5]]},"1830":{"position":[[137,6],[201,6]]},"1832":{"position":[[269,6]]},"1842":{"position":[[184,6]]},"1844":{"position":[[185,6]]},"1846":{"position":[[185,6],[431,6]]},"1848":{"position":[[185,6],[431,6]]},"1858":{"position":[[82,7]]}}}],["exit",{"_index":672,"t":{"841":{"position":[[407,6]]}}}],["exp",{"_index":437,"t":{"805":{"position":[[732,6]]},"809":{"position":[[1262,6]]},"874":{"position":[[599,3]]},"882":{"position":[[131,3]]},"896":{"position":[[131,3]]},"910":{"position":[[131,3]]},"924":{"position":[[131,3]]},"938":{"position":[[131,3]]},"952":{"position":[[128,3]]},"966":{"position":[[132,3]]},"980":{"position":[[131,3]]},"994":{"position":[[131,3]]},"1008":{"position":[[131,3]]},"1022":{"position":[[131,3]]},"1036":{"position":[[131,3]]},"1050":{"position":[[131,3]]},"1064":{"position":[[131,3]]},"1078":{"position":[[131,3]]},"1092":{"position":[[131,3]]},"1106":{"position":[[131,3]]},"1120":{"position":[[131,3]]}}}],["expand",{"_index":1401,"t":{"1178":{"position":[[738,8]]},"1735":{"position":[[2861,7]]}}}],["expect",{"_index":667,"t":{"841":{"position":[[162,6]]},"1336":{"position":[[8104,8],[9982,7]]},"1368":{"position":[[679,8]]},"1580":{"position":[[96,8]]}}}],["expir",{"_index":382,"t":{"803":{"position":[[348,7]]},"849":{"position":[[345,7]]},"874":{"position":[[474,10],[503,11]]},"888":{"position":[[596,7]]},"916":{"position":[[218,7]]},"1000":{"position":[[45,7]]},"1028":{"position":[[820,7]]},"1042":{"position":[[835,7]]},"1070":{"position":[[975,7]]},"1126":{"position":[[279,7]]},"1223":{"position":[[1977,10]]},"1237":{"position":[[309,8]]},"1336":{"position":[[7318,9]]},"1376":{"position":[[430,11],[510,6]]},"1378":{"position":[[198,10],[296,10],[842,10],[876,10],[1363,10]]},"1380":{"position":[[39,11]]},"1404":{"position":[[596,8]]},"1408":{"position":[[433,11]]},"1410":{"position":[[1222,10],[1274,10],[1324,6],[1370,10]]},"1412":{"position":[[107,11]]},"1540":{"position":[[447,7]]},"1542":{"position":[[315,7]]},"1548":{"position":[[440,11]]},"1550":{"position":[[180,11],[461,11]]},"1552":{"position":[[495,10],[599,10]]},"1554":{"position":[[36,11]]},"1640":{"position":[[693,10]]},"1642":{"position":[[136,10],[1029,10]]},"1644":{"position":[[28,11]]},"1772":{"position":[[0,6],[195,6],[252,6],[509,7],[781,8],[984,8]]},"1778":{"position":[[217,7]]}}}],["expirationgener",{"_index":2865,"t":{"1376":{"position":[[565,20]]},"1378":{"position":[[917,19]]},"1380":{"position":[[192,20]]}}}],["expiri",{"_index":4121,"t":{"1772":{"position":[[960,6]]}}}],["explain",{"_index":3722,"t":{"1684":{"position":[[325,10]]}}}],["explan",{"_index":3692,"t":{"1680":{"position":[[127,11]]}}}],["explicitli",{"_index":2919,"t":{"1398":{"position":[[820,10]]},"1400":{"position":[[438,10]]},"1408":{"position":[[592,10]]},"1410":{"position":[[487,10]]}}}],["explor",{"_index":1416,"t":{"1178":{"position":[[1217,9],[1282,8]]}}}],["export",{"_index":639,"t":{"839":{"position":[[1082,9]]},"1450":{"position":[[128,6],[231,6]]}}}],["exportvar",{"_index":3035,"t":{"1446":{"position":[[402,11]]},"1450":{"position":[[69,10],[135,10]]}}}],["expos",{"_index":2545,"t":{"1336":{"position":[[8496,6]]},"1400":{"position":[[1178,7]]},"1442":{"position":[[48,6]]},"1464":{"position":[[68,7]]},"1468":{"position":[[501,7]]},"1576":{"position":[[247,6]]},"1628":{"position":[[57,6]]}}}],["exposehead",{"_index":2928,"t":{"1400":{"position":[[1425,13],[1540,13]]},"1402":{"position":[[279,14]]}}}],["express",{"_index":1538,"t":{"1186":{"position":[[656,11]]},"1208":{"position":[[112,7]]},"1220":{"position":[[115,7]]},"1570":{"position":[[70,7]]},"1665":{"position":[[452,7]]},"1667":{"position":[[78,7]]},"1669":{"position":[[78,7]]},"1671":{"position":[[78,7]]},"1673":{"position":[[80,7]]},"1697":{"position":[[1197,7]]},"1735":{"position":[[3342,7],[3412,12],[3505,8],[3531,7]]},"1737":{"position":[[1211,11]]}}}],["expressj",{"_index":3785,"t":{"1704":{"position":[[71,10],[341,10]]},"1733":{"position":[[604,9]]}}}],["expvar",{"_index":3065,"t":{"1464":{"position":[[0,6]]},"1468":{"position":[[395,6],[546,6]]}}}],["expvar.newint(\"count",{"_index":3071,"t":{"1468":{"position":[[256,22]]}}}],["expvarhandlercal",{"_index":3081,"t":{"1468":{"position":[[626,21]]}}}],["expvarmw",{"_index":3069,"t":{"1468":{"position":[[109,8]]}}}],["expvarregexperror",{"_index":3083,"t":{"1468":{"position":[[652,21]]}}}],["ext",{"_index":1160,"t":{"1134":{"position":[[416,3]]}}}],["extauthz",{"_index":3224,"t":{"1534":{"position":[[1237,8]]}}}],["extend",{"_index":397,"t":{"803":{"position":[[683,10]]},"1140":{"position":[[8,9],[177,8]]},"1154":{"position":[[90,6]]},"1366":{"position":[[379,6]]},"1376":{"position":[[290,6]]},"1386":{"position":[[296,6]]},"1398":{"position":[[288,6]]},"1408":{"position":[[288,6]]},"1422":{"position":[[298,6]]},"1446":{"position":[[311,6]]},"1458":{"position":[[427,6]]},"1478":{"position":[[294,6]]},"1488":{"position":[[347,6]]},"1548":{"position":[[294,6]]},"1562":{"position":[[473,6]]},"1574":{"position":[[342,6]]},"1584":{"position":[[290,6]]},"1594":{"position":[[2364,6]]},"1624":{"position":[[298,6]]}}}],["extens",{"_index":1158,"t":{"1134":{"position":[[382,9]]},"1174":{"position":[[43,9],[172,9],[349,9]]},"1336":{"position":[[10790,11]]},"1754":{"position":[[25,10]]},"1880":{"position":[[112,10]]},"1896":{"position":[[85,10]]}}}],["extern",{"_index":516,"t":{"815":{"position":[[251,8]]},"1874":{"position":[[48,8]]}}}],["extract",{"_index":597,"t":{"835":{"position":[[635,10]]},"849":{"position":[[1164,7]]},"1410":{"position":[[296,8]]},"1540":{"position":[[568,7]]},"1642":{"position":[[347,7]]}}}],["extractor",{"_index":2954,"t":{"1408":{"position":[[486,10],[579,9]]},"1410":{"position":[[281,9],[474,9],[1776,9],[1855,9],[1924,9],[1954,9]]},"1412":{"position":[[195,10]]}}}],["extraparam",{"_index":3312,"t":{"1562":{"position":[[1414,10]]},"1564":{"position":[[1396,10]]}}}],["eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyjlehaioje0nje5ntcxmzz9.rb3arc4",{"_index":459,"t":{"807":{"position":[[136,70],[382,69]]}}}],["f",{"_index":3114,"t":{"1490":{"position":[[278,1]]},"1770":{"position":[[1214,1],[1227,1]]},"1886":{"position":[[1528,1],[1543,1],[1556,1]]}}}],["f2",{"_index":2109,"t":{"1304":{"position":[[1126,6]]}}}],["factor",{"_index":4049,"t":{"1754":{"position":[[1091,6]]}}}],["fail",{"_index":982,"t":{"972":{"position":[[106,7]]},"1154":{"position":[[111,5]]},"1697":{"position":[[1026,5]]},"1749":{"position":[[524,4]]}}}],["failedfield",{"_index":4010,"t":{"1749":{"position":[[780,11]]}}}],["failedfield\":\"user.email\",\"tag\":\"required\",\"value\":\"\"},{\"failedfield\":\"user.job.salary\",\"tag\":\"required\",\"value\":\"\"},{\"failedfield\":\"user.job.type\",\"tag\":\"required\",\"valu",{"_index":4031,"t":{"1749":{"position":[[1796,181]]}}}],["failov",{"_index":1054,"t":{"1082":{"position":[[419,8]]}}}],["failovercli",{"_index":1078,"t":{"1084":{"position":[[723,14]]}}}],["failur",{"_index":853,"t":{"902":{"position":[[604,8]]},"958":{"position":[[953,8]]},"1112":{"position":[[556,8]]}}}],["fallback",{"_index":385,"t":{"803":{"position":[[422,8]]},"1858":{"position":[[45,8]]}}}],["fals",{"_index":183,"t":{"759":{"position":[[175,5]]},"771":{"position":[[156,5],[370,6],[377,5]]},"823":{"position":[[190,5]]},"827":{"position":[[418,5]]},"886":{"position":[[347,6]]},"888":{"position":[[555,5]]},"890":{"position":[[151,6]]},"902":{"position":[[376,5]]},"904":{"position":[[96,6]]},"914":{"position":[[281,6]]},"916":{"position":[[177,5],[620,5]]},"918":{"position":[[63,6],[196,6]]},"928":{"position":[[298,6]]},"930":{"position":[[445,5],[545,5]]},"932":{"position":[[151,6],[165,6]]},"958":{"position":[[1108,5],[2786,6]]},"960":{"position":[[103,6]]},"986":{"position":[[225,5]]},"1012":{"position":[[337,6],[549,6]]},"1014":{"position":[[685,5]]},"1016":{"position":[[134,6]]},"1026":{"position":[[323,6],[548,6]]},"1028":{"position":[[779,5]]},"1030":{"position":[[128,6]]},"1040":{"position":[[323,6],[516,6],[730,6]]},"1042":{"position":[[794,5]]},"1044":{"position":[[128,6]]},"1068":{"position":[[300,6]]},"1070":{"position":[[934,5]]},"1072":{"position":[[187,6]]},"1082":{"position":[[335,6],[1003,6],[1160,6]]},"1084":{"position":[[1263,5]]},"1086":{"position":[[116,6]]},"1110":{"position":[[308,6]]},"1112":{"position":[[325,5]]},"1114":{"position":[[284,6]]},"1124":{"position":[[310,6]]},"1126":{"position":[[238,5]]},"1128":{"position":[[88,6]]},"1134":{"position":[[738,5],[854,5]]},"1182":{"position":[[209,6]]},"1184":{"position":[[1398,5]]},"1190":{"position":[[329,5],[1430,5],[2700,5],[3779,5],[3989,5],[4682,5]]},"1223":{"position":[[1471,5],[1586,5],[1703,6],[1811,6]]},"1341":{"position":[[640,5],[1128,5],[1240,5],[1349,5],[1499,5],[1721,5],[1812,5],[1998,5],[2434,5],[2550,5],[3332,5],[3770,5],[4109,5],[4676,5],[5091,5],[6071,5],[6214,5],[6609,5]]},"1360":{"position":[[346,6]]},"1366":{"position":[[695,5]]},"1368":{"position":[[706,5]]},"1378":{"position":[[592,5],[1206,5]]},"1380":{"position":[[106,6],[240,6]]},"1400":{"position":[[1393,6]]},"1402":{"position":[[272,6]]},"1410":{"position":[[912,6],[1006,6]]},"1462":{"position":[[45,6]]},"1502":{"position":[[606,5]]},"1504":{"position":[[74,6]]},"1512":{"position":[[571,6],[734,6],[809,6]]},"1534":{"position":[[425,6]]},"1536":{"position":[[691,6],[906,5]]},"1538":{"position":[[493,6]]},"1552":{"position":[[892,5],[1007,5]]},"1554":{"position":[[237,6],[268,6]]},"1564":{"position":[[1230,5]]},"1576":{"position":[[304,5]]},"1578":{"position":[[170,6]]},"1606":{"position":[[269,5]]},"1608":{"position":[[57,6]]},"1642":{"position":[[744,6],[838,6],[1082,6]]},"1749":{"position":[[533,7]]},"1808":{"position":[[191,6],[397,5]]},"1810":{"position":[[196,5]]},"1840":{"position":[[336,7]]},"1844":{"position":[[253,5],[370,6],[585,5],[626,5],[655,5],[716,5]]},"1880":{"position":[[428,7]]}}}],["far",{"_index":3058,"t":{"1460":{"position":[[288,3]]}}}],["fast",{"_index":857,"t":{"906":{"position":[[2,4]]},"920":{"position":[[165,5]]},"1046":{"position":[[2,4]]},"1208":{"position":[[232,4]]},"1628":{"position":[[26,4]]}}}],["faster",{"_index":3702,"t":{"1682":{"position":[[135,6]]},"1878":{"position":[[322,6]]}}}],["fastest",{"_index":1682,"t":{"1208":{"position":[[173,7]]}}}],["fasthttp",{"_index":715,"t":{"865":{"position":[[9,8]]},"1208":{"position":[[159,9]]},"1235":{"position":[[30,8]]},"1334":{"position":[[117,8]]},"1341":{"position":[[3259,8]]},"1776":{"position":[[248,8]]}}}],["fasthttp'",{"_index":1994,"t":{"1272":{"position":[[25,10]]}}}],["fasthttp.client",{"_index":3438,"t":{"1592":{"position":[[222,20],[373,20],[607,20],[795,20],[993,20],[1177,20],[1371,20]]},"1594":{"position":[[954,17]]}}}],["fasthttp.defaultlbclienttimeout",{"_index":3491,"t":{"1598":{"position":[[89,32]]}}}],["fasthttp.lbclient",{"_index":3490,"t":{"1596":{"position":[[1281,18]]}}}],["fasthttp.request",{"_index":4385,"t":{"1862":{"position":[[19,17],[79,17]]}}}],["fasthttp.request.uri().host",{"_index":2722,"t":{"1341":{"position":[[3302,29]]}}}],["fasthttp.requestctx",{"_index":1927,"t":{"1251":{"position":[[68,20]]},"1349":{"position":[[807,21],[848,19]]},"1776":{"position":[[8,20],[206,20]]}}}],["fasthttp.requesthandl",{"_index":1928,"t":{"1251":{"position":[[135,23]]}}}],["fasthttp.respons",{"_index":4394,"t":{"1866":{"position":[[20,18],[82,18]]}}}],["fasthttp.serv",{"_index":1875,"t":{"1235":{"position":[[81,16]]}}}],["fault",{"_index":3170,"t":{"1516":{"position":[[44,5]]}}}],["favicon",{"_index":3086,"t":{"1474":{"position":[[0,7],[42,7],[391,8],[436,7]]},"1480":{"position":[[231,7],[310,7],[445,7]]}}}],["favicon.ico",{"_index":3090,"t":{"1474":{"position":[[163,11],[413,12]]},"1478":{"position":[[373,16],[395,15]]},"1480":{"position":[[351,14]]}}}],["favnum",{"_index":1506,"t":{"1184":{"position":[[531,8],[591,7],[823,7]]}}}],["favourit",{"_index":1515,"t":{"1184":{"position":[[797,9]]}}}],["fd.test",{"_index":1914,"t":{"1243":{"position":[[715,10]]}}}],["featur",{"_index":1348,"t":{"1170":{"position":[[340,8]]},"1190":{"position":[[276,7],[287,8],[461,8],[627,7],[735,7],[1384,7],[1395,8],[1838,8],[2005,7],[2612,7],[2654,7],[2665,8],[2797,7],[3032,8],[3068,8],[3504,7],[4636,7],[4647,8],[5022,8]]},"1336":{"position":[[10016,8]]},"1398":{"position":[[757,7]]},"1400":{"position":[[375,7]]},"1418":{"position":[[84,8]]},"1737":{"position":[[139,7]]}}}],["feder",{"_index":3433,"t":{"1586":{"position":[[329,11]]}}}],["feel",{"_index":3728,"t":{"1688":{"position":[[150,4]]}}}],["feet",{"_index":1701,"t":{"1212":{"position":[[472,5]]}}}],["fenni",{"_index":4065,"t":{"1756":{"position":[[255,9]]},"1830":{"position":[[397,7]]}}}],["fenny/123",{"_index":4067,"t":{"1756":{"position":[[387,13]]},"1830":{"position":[[519,11],[549,11]]}}}],["ferret",{"_index":4492,"t":{"1894":{"position":[[362,11]]}}}],["fetch",{"_index":82,"t":{"737":{"position":[[388,5]]},"739":{"position":[[388,5]]},"741":{"position":[[388,5]]},"1830":{"position":[[609,7]]}}}],["ff1",{"_index":2116,"t":{"1304":{"position":[[1686,3]]}}}],["ff2",{"_index":2119,"t":{"1304":{"position":[[1750,3],[1834,5]]}}}],["ffffffffffffffffffffffffffffffffffffffff",{"_index":198,"t":{"761":{"position":[[240,43]]}}}],["fiber",{"_index":20,"t":{"727":{"position":[[22,6]]},"743":{"position":[[20,6]]},"745":{"position":[[25,5]]},"753":{"position":[[21,6]]},"759":{"position":[[127,5]]},"765":{"position":[[19,6]]},"767":{"position":[[25,5]]},"777":{"position":[[24,6]]},"779":{"position":[[25,5]]},"787":{"position":[[28,6]]},"789":{"position":[[25,5]]},"799":{"position":[[25,5]]},"817":{"position":[[30,6]]},"827":{"position":[[4,5]]},"829":{"position":[[26,6]]},"831":{"position":[[25,5]]},"841":{"position":[[29,5],[217,5],[234,5],[303,5],[316,5],[333,5],[385,5],[441,5],[487,5]]},"845":{"position":[[25,5]]},"853":{"position":[[23,6]]},"859":{"position":[[50,5],[162,5],[221,5]]},"865":{"position":[[32,5]]},"874":{"position":[[95,5]]},"886":{"position":[[302,8]]},"888":{"position":[[367,7]]},"890":{"position":[[106,8]]},"1012":{"position":[[292,8],[504,8]]},"1014":{"position":[[502,7]]},"1016":{"position":[[89,8]]},"1026":{"position":[[283,8]]},"1028":{"position":[[606,7]]},"1030":{"position":[[88,8]]},"1040":{"position":[[283,8]]},"1042":{"position":[[621,7]]},"1044":{"position":[[88,8]]},"1070":{"position":[[674,7]]},"1072":{"position":[[127,8]]},"1126":{"position":[[65,7]]},"1130":{"position":[[82,5]]},"1156":{"position":[[407,8],[449,5],[721,5]]},"1208":{"position":[[82,5],[100,5],[321,5]]},"1212":{"position":[[75,5]]},"1214":{"position":[[55,5]]},"1216":{"position":[[424,5]]},"1220":{"position":[[53,6],[144,6]]},"1227":{"position":[[14,5]]},"1304":{"position":[[493,5]]},"1341":{"position":[[52,5],[195,8],[2603,5],[3443,5]]},"1347":{"position":[[40,5]]},"1349":{"position":[[580,5]]},"1352":{"position":[[141,5]]},"1354":{"position":[[141,5]]},"1362":{"position":[[36,5]]},"1366":{"position":[[50,5],[186,5]]},"1372":{"position":[[21,5],[243,5]]},"1376":{"position":[[50,5],[182,5]]},"1382":{"position":[[27,5]]},"1386":{"position":[[50,5],[185,5]]},"1394":{"position":[[20,5]]},"1398":{"position":[[50,5],[181,5]]},"1404":{"position":[[20,5]]},"1408":{"position":[[50,5],[181,5]]},"1418":{"position":[[30,5]]},"1422":{"position":[[50,5],[186,5]]},"1430":{"position":[[23,5]]},"1434":{"position":[[50,5],[190,5]]},"1442":{"position":[[22,5]]},"1446":{"position":[[50,5],[183,5]]},"1454":{"position":[[20,5]]},"1458":{"position":[[50,5],[181,5]]},"1464":{"position":[[22,5]]},"1468":{"position":[[50,5],[192,5]]},"1474":{"position":[[23,5]]},"1478":{"position":[[50,5],[184,5]]},"1484":{"position":[[26,5]]},"1488":{"position":[[50,5],[187,5]]},"1516":{"position":[[27,5]]},"1520":{"position":[[50,5],[188,5]]},"1534":{"position":[[1225,5]]},"1544":{"position":[[23,5]]},"1548":{"position":[[50,5],[184,5]]},"1558":{"position":[[22,5]]},"1562":{"position":[[50,5],[364,5]]},"1570":{"position":[[23,5]]},"1574":{"position":[[50,5],[184,5]]},"1576":{"position":[[113,6]]},"1580":{"position":[[21,5]]},"1584":{"position":[[50,5],[182,5]]},"1586":{"position":[[341,6]]},"1590":{"position":[[21,5]]},"1594":{"position":[[50,5],[182,5]]},"1600":{"position":[[23,5]]},"1604":{"position":[[50,5],[184,5]]},"1610":{"position":[[27,6]]},"1620":{"position":[[25,5]]},"1624":{"position":[[50,5],[186,5]]},"1636":{"position":[[23,6]]},"1640":{"position":[[50,5],[184,5]]},"1650":{"position":[[20,5]]},"1654":{"position":[[50,5],[181,5]]},"1656":{"position":[[63,6]]},"1660":{"position":[[50,5],[184,5]]},"1663":{"position":[[440,5]]},"1665":{"position":[[378,5]]},"1667":{"position":[[0,5]]},"1669":{"position":[[0,5]]},"1671":{"position":[[0,5]]},"1673":{"position":[[0,5]]},"1678":{"position":[[162,5],[474,5]]},"1682":{"position":[[178,5],[538,6],[790,5],[1030,5],[1056,5],[1135,5]]},"1684":{"position":[[114,5],[364,6]]},"1686":{"position":[[0,5],[169,6]]},"1690":{"position":[[184,5]]},"1693":{"position":[[30,5],[163,5],[263,5],[313,5],[708,7]]},"1695":{"position":[[0,5]]},"1697":{"position":[[69,5],[555,5]]},"1700":{"position":[[6,5]]},"1704":{"position":[[44,5],[311,5]]},"1710":{"position":[[5,5]]},"1712":{"position":[[50,6]]},"1737":{"position":[[302,5],[1800,5]]},"1739":{"position":[[118,5]]},"1744":{"position":[[0,5],[241,5],[698,5]]},"1746":{"position":[[0,5]]},"1749":{"position":[[0,5]]},"1754":{"position":[[1128,5]]},"1804":{"position":[[211,5],[263,6]]},"1856":{"position":[[518,7],[695,8]]},"1878":{"position":[[189,5]]},"1910":{"position":[[435,7],[485,8]]}}}],["fiber'",{"_index":1185,"t":{"1134":{"position":[[1327,7]]},"1418":{"position":[[331,7]]},"1693":{"position":[[766,7]]},"1744":{"position":[[316,7]]}}}],["fiber.app",{"_index":2807,"t":{"1349":{"position":[[551,11]]},"1690":{"position":[[190,10]]},"1728":{"position":[[507,11]]}}}],["fiber.badg",{"_index":864,"t":{"914":{"position":[[256,17]]},"916":{"position":[[65,16]]},"918":{"position":[[38,17]]}}}],["fiber.config",{"_index":3101,"t":{"1484":{"position":[[229,13]]}}}],["fiber.ctx",{"_index":81,"t":{"737":{"position":[[364,11],[552,11],[741,11]]},"739":{"position":[[364,11],[518,11]]},"741":{"position":[[364,11],[495,11]]},"749":{"position":[[46,11],[750,11],[833,10]]},"751":{"position":[[399,11],[506,11]]},"759":{"position":[[324,11]]},"761":{"position":[[152,11]]},"763":{"position":[[379,11]]},"773":{"position":[[1342,11],[1536,11],[1594,11]]},"783":{"position":[[564,11]]},"785":{"position":[[261,11]]},"793":{"position":[[751,11]]},"795":{"position":[[302,11]]},"805":{"position":[[461,11],[1081,11],[1155,11]]},"809":{"position":[[991,11],[1647,11],[1721,11]]},"815":{"position":[[924,11]]},"823":{"position":[[541,11]]},"825":{"position":[[30,11]]},"827":{"position":[[748,11],[930,11]]},"839":{"position":[[799,11],[876,11]]},"865":{"position":[[53,10]]},"869":{"position":[[154,11]]},"871":{"position":[[190,11]]},"1134":{"position":[[1540,11],[1684,11]]},"1144":{"position":[[664,11],[794,11]]},"1148":{"position":[[667,11],[797,11]]},"1152":{"position":[[753,11],[883,11]]},"1154":{"position":[[843,11]]},"1160":{"position":[[713,11],[843,11]]},"1164":{"position":[[724,11],[854,11]]},"1166":{"position":[[325,11]]},"1168":{"position":[[451,11]]},"1194":{"position":[[715,11],[845,11]]},"1198":{"position":[[890,11],[1020,11]]},"1202":{"position":[[708,11],[838,11]]},"1206":{"position":[[732,11],[862,11]]},"1212":{"position":[[26,10],[137,9],[513,11],[792,11],[1149,11]]},"1214":{"position":[[184,11]]},"1216":{"position":[[709,11],[849,11],[1044,11],[1279,11]]},"1225":{"position":[[988,11],[1109,11],[1442,11],[1540,11],[1693,11],[1783,11],[1873,11]]},"1227":{"position":[[253,11]]},"1241":{"position":[[121,11]]},"1243":{"position":[[135,11]]},"1245":{"position":[[120,11]]},"1247":{"position":[[254,11]]},"1265":{"position":[[409,11]]},"1341":{"position":[[4591,9]]},"1343":{"position":[[156,11]]},"1349":{"position":[[642,11],[693,9]]},"1356":{"position":[[374,11]]},"1358":{"position":[[262,11]]},"1360":{"position":[[284,11]]},"1366":{"position":[[725,11]]},"1368":{"position":[[178,11]]},"1376":{"position":[[372,11],[593,11],[783,11],[865,11]]},"1378":{"position":[[178,11],[709,11]]},"1380":{"position":[[134,11]]},"1386":{"position":[[502,11]]},"1388":{"position":[[178,11]]},"1400":{"position":[[178,11]]},"1408":{"position":[[504,11]]},"1410":{"position":[[178,11],[1971,11]]},"1424":{"position":[[178,11],[379,11],[631,11]]},"1426":{"position":[[48,11],[151,11]]},"1434":{"position":[[764,11],[896,11]]},"1436":{"position":[[178,11]]},"1458":{"position":[[361,11],[592,11]]},"1460":{"position":[[178,11]]},"1468":{"position":[[323,11]]},"1470":{"position":[[178,11]]},"1480":{"position":[[178,11]]},"1502":{"position":[[178,11]]},"1510":{"position":[[177,11]]},"1526":{"position":[[241,11]]},"1528":{"position":[[41,11]]},"1534":{"position":[[205,11],[711,11]]},"1536":{"position":[[471,11],[754,11],[1102,11],[1189,11],[1288,11]]},"1538":{"position":[[273,11],[562,11],[659,11]]},"1542":{"position":[[51,11],[111,11]]},"1548":{"position":[[380,11],[491,11],[568,11]]},"1552":{"position":[[178,11],[412,11],[702,11]]},"1554":{"position":[[86,11],[145,11]]},"1562":{"position":[[1383,11],[1643,11]]},"1564":{"position":[[178,11],[371,11],[1365,11]]},"1576":{"position":[[435,11]]},"1586":{"position":[[178,11]]},"1592":{"position":[[340,11],[551,11],[742,11],[937,11]]},"1594":{"position":[[1092,11],[1388,11],[1677,11],[1966,11],[2559,11],[2660,11]]},"1596":{"position":[[178,11]]},"1604":{"position":[[355,11]]},"1606":{"position":[[178,11],[434,11]]},"1614":{"position":[[285,11],[370,11]]},"1626":{"position":[[178,11]]},"1634":{"position":[[265,11],[350,11]]},"1638":{"position":[[100,11]]},"1640":{"position":[[350,11]]},"1652":{"position":[[47,11]]},"1654":{"position":[[306,11],[390,11],[515,11]]},"1660":{"position":[[281,11],[1108,11],[1837,11]]},"1680":{"position":[[397,11]]},"1684":{"position":[[190,11]]},"1690":{"position":[[454,11],[712,11],[975,11],[1073,11]]},"1693":{"position":[[226,11],[657,11],[1003,11]]},"1695":{"position":[[284,11]]},"1697":{"position":[[677,11]]},"1708":{"position":[[170,11],[291,11]]},"1716":{"position":[[364,11],[663,11],[773,11]]},"1731":{"position":[[988,11],[1109,11],[1442,11],[1540,11],[1693,11],[1783,11],[1873,11]]},"1733":{"position":[[268,11],[396,11],[535,11]]},"1735":{"position":[[898,11],[1073,11],[1184,11],[1303,11],[1535,11],[2019,11],[2215,11],[2589,11]]},"1737":{"position":[[1321,11],[1569,11],[1968,11],[2479,11]]},"1739":{"position":[[261,11],[428,11]]},"1744":{"position":[[849,11]]},"1746":{"position":[[573,11]]},"1749":{"position":[[1225,11]]},"1751":{"position":[[988,11],[1109,11],[1442,11],[1540,11],[1693,11],[1783,11],[1873,11]]},"1754":{"position":[[451,11],[856,11],[1332,11]]},"1756":{"position":[[208,11],[342,11]]},"1758":{"position":[[148,11]]},"1760":{"position":[[244,11]]},"1762":{"position":[[154,11]]},"1764":{"position":[[163,11]]},"1766":{"position":[[193,11],[283,11]]},"1768":{"position":[[148,11]]},"1770":{"position":[[647,11]]},"1772":{"position":[[133,11],[700,11],[894,11]]},"1774":{"position":[[387,11]]},"1778":{"position":[[417,11]]},"1780":{"position":[[225,11]]},"1782":{"position":[[380,11]]},"1784":{"position":[[268,11]]},"1786":{"position":[[198,11]]},"1788":{"position":[[196,11]]},"1792":{"position":[[190,11]]},"1796":{"position":[[201,11]]},"1800":{"position":[[204,11],[301,11],[402,11]]},"1802":{"position":[[158,11]]},"1804":{"position":[[110,11]]},"1806":{"position":[[195,11]]},"1808":{"position":[[318,11]]},"1810":{"position":[[117,11]]},"1812":{"position":[[268,11]]},"1814":{"position":[[382,11]]},"1816":{"position":[[166,11]]},"1818":{"position":[[313,11],[403,11]]},"1820":{"position":[[147,11]]},"1822":{"position":[[243,11]]},"1824":{"position":[[261,11]]},"1826":{"position":[[261,11],[346,11],[431,11]]},"1828":{"position":[[152,11]]},"1830":{"position":[[357,11],[482,11],[960,11]]},"1832":{"position":[[406,11]]},"1834":{"position":[[365,11]]},"1836":{"position":[[314,11]]},"1838":{"position":[[166,11]]},"1840":{"position":[[260,11],[466,11],[680,11],[887,11],[1199,11]]},"1842":{"position":[[403,11]]},"1844":{"position":[[536,11]]},"1846":{"position":[[600,11]]},"1848":{"position":[[590,11]]},"1850":{"position":[[489,11]]},"1852":{"position":[[185,11]]},"1854":{"position":[[295,11],[373,11],[496,11]]},"1856":{"position":[[431,11],[564,11],[832,11]]},"1858":{"position":[[329,11],[409,11],[539,11]]},"1862":{"position":[[125,11]]},"1864":{"position":[[511,11]]},"1866":{"position":[[129,11]]},"1868":{"position":[[380,11],[459,11]]},"1870":{"position":[[143,11],[450,11]]},"1872":{"position":[[158,11]]},"1874":{"position":[[238,11]]},"1878":{"position":[[105,11],[486,11]]},"1880":{"position":[[304,11],[617,11]]},"1882":{"position":[[244,11]]},"1884":{"position":[[147,11]]},"1886":{"position":[[1271,11],[1403,11]]},"1888":{"position":[[150,11]]},"1892":{"position":[[148,11],[231,11],[344,11]]},"1894":{"position":[[324,11]]},"1896":{"position":[[189,11]]},"1898":{"position":[[220,11]]},"1900":{"position":[[270,11]]},"1902":{"position":[[121,11]]},"1904":{"position":[[146,11]]},"1906":{"position":[[123,11]]},"1908":{"position":[[276,11]]},"1910":{"position":[[324,11]]}}}],["fiber.db",{"_index":894,"t":{"930":{"position":[[107,10]]},"932":{"position":[[77,11]]}}}],["fiber.errforbidden",{"_index":2941,"t":{"1404":{"position":[[342,18]]}}}],["fiber.error",{"_index":3762,"t":{"1695":{"position":[[141,12],[431,12],[450,12]]},"1697":{"position":[[824,12],[843,12]]}}}],["fiber.errorhandl",{"_index":3245,"t":{"1540":{"position":[[472,18]]}}}],["fiber.errserviceunavail",{"_index":3759,"t":{"1693":{"position":[[1057,27]]}}}],["fiber.errtooearli",{"_index":2998,"t":{"1422":{"position":[[382,18]]},"1424":{"position":[[737,18]]},"1426":{"position":[[218,18]]}}}],["fiber.errupgraderequir",{"_index":725,"t":{"869":{"position":[[359,24]]}}}],["fiber.gz",{"_index":2684,"t":{"1341":{"position":[[925,11]]}}}],["fiber.handl",{"_index":105,"t":{"747":{"position":[[33,13]]},"757":{"position":[[47,13]]},"769":{"position":[[34,13]]},"781":{"position":[[31,13]]},"791":{"position":[[35,13]]},"821":{"position":[[37,13]]},"833":{"position":[[37,13]]},"857":{"position":[[27,13]]},"1341":{"position":[[3420,14]]},"1349":{"position":[[67,13],[97,13],[163,13],[197,13],[278,13],[327,13],[369,14],[397,13],[463,14],[495,13]]},"1352":{"position":[[189,13],[276,13]]},"1354":{"position":[[192,13]]},"1356":{"position":[[131,13],[210,13]]},"1364":{"position":[[24,13]]},"1368":{"position":[[1034,13]]},"1374":{"position":[[27,13]]},"1384":{"position":[[27,13]]},"1396":{"position":[[27,13]]},"1406":{"position":[[27,13]]},"1420":{"position":[[27,13]]},"1432":{"position":[[58,13]]},"1444":{"position":[[27,13]]},"1456":{"position":[[27,13]]},"1466":{"position":[[11,13]]},"1476":{"position":[[27,13]]},"1486":{"position":[[24,13]]},"1508":{"position":[[27,13]]},"1518":{"position":[[27,13]]},"1532":{"position":[[27,13]]},"1540":{"position":[[279,13]]},"1546":{"position":[[27,13]]},"1552":{"position":[[792,13]]},"1560":{"position":[[27,13]]},"1572":{"position":[[11,13]]},"1582":{"position":[[11,13]]},"1592":{"position":[[96,13],[243,13],[1198,13],[1392,13]]},"1596":{"position":[[479,13],[588,13]]},"1602":{"position":[[27,13]]},"1612":{"position":[[27,13]]},"1622":{"position":[[27,13]]},"1632":{"position":[[27,13]]},"1652":{"position":[[17,14],[65,13]]},"1656":{"position":[[82,13],[333,13]]},"1658":{"position":[[17,14],[79,13],[121,14],[183,13]]},"1870":{"position":[[420,13]]}}}],["fiber.headerauthor",{"_index":3250,"t":{"1542":{"position":[[359,26]]}}}],["fiber.headerxforwardedfor",{"_index":4201,"t":{"1804":{"position":[[329,26]]}}}],["fiber.headerxrequestid",{"_index":3527,"t":{"1628":{"position":[[228,23]]}}}],["fiber.ischild",{"_index":2788,"t":{"1345":{"position":[[194,16]]}}}],["fiber.ismethodsafe(c.method",{"_index":3003,"t":{"1426":{"position":[[177,30]]},"1528":{"position":[[135,30]]}}}],["fiber.map",{"_index":1190,"t":{"1134":{"position":[[1585,10],[1729,10]]},"1144":{"position":[[725,10],[875,10]]},"1148":{"position":[[728,10],[878,10]]},"1152":{"position":[[814,10],[964,10]]},"1154":{"position":[[914,10]]},"1156":{"position":[[396,10]]},"1160":{"position":[[774,10],[924,10]]},"1164":{"position":[[785,10],[935,10]]},"1166":{"position":[[421,10]]},"1168":{"position":[[518,10]]},"1194":{"position":[[776,10],[926,10]]},"1198":{"position":[[951,10],[1101,10]]},"1202":{"position":[[769,10],[919,10]]},"1206":{"position":[[793,10],[943,10]]},"1744":{"position":[[894,10]]},"1746":{"position":[[643,10]]},"1766":{"position":[[331,12]]},"1856":{"position":[[371,10],[499,10],[676,10]]}}}],["fiber.map{\"id",{"_index":4194,"t":{"1800":{"position":[[464,15]]}}}],["fiber.methoddelet",{"_index":2935,"t":{"1402":{"position":[[188,19]]}}}],["fiber.methodget",{"_index":2932,"t":{"1402":{"position":[[118,16]]},"1654":{"position":[[348,15]]}}}],["fiber.methodhead",{"_index":2892,"t":{"1378":{"position":[[1613,17]]},"1380":{"position":[[309,18]]},"1402":{"position":[[153,17]]}}}],["fiber.methodpatch",{"_index":2936,"t":{"1402":{"position":[[208,18]]}}}],["fiber.methodpost",{"_index":2933,"t":{"1402":{"position":[[135,17]]}}}],["fiber.methodput",{"_index":2934,"t":{"1402":{"position":[[171,16]]}}}],["fiber.mimetextplaincharsetutf8",{"_index":3767,"t":{"1695":{"position":[[581,31]]}}}],["fiber.new",{"_index":74,"t":{"737":{"position":[[182,11]]},"739":{"position":[[182,11]]},"741":{"position":[[182,11]]},"751":{"position":[[183,11]]},"761":{"position":[[118,11]]},"763":{"position":[[345,11]]},"773":{"position":[[1215,11]]},"785":{"position":[[137,11]]},"795":{"position":[[141,11]]},"805":{"position":[[154,11]]},"809":{"position":[[433,11]]},"815":{"position":[[824,11]]},"827":{"position":[[355,11]]},"839":{"position":[[728,11]]},"859":{"position":[[184,12]]},"869":{"position":[[120,11]]},"871":{"position":[[133,11]]},"1214":{"position":[[152,11]]},"1218":{"position":[[274,11]]},"1227":{"position":[[142,11],[163,11]]},"1229":{"position":[[165,11],[184,11],[203,11],[224,11]]},"1231":{"position":[[155,11]]},"1233":{"position":[[195,11]]},"1235":{"position":[[128,11]]},"1241":{"position":[[175,11]]},"1243":{"position":[[189,11]]},"1245":{"position":[[174,11]]},"1247":{"position":[[220,11]]},"1339":{"position":[[180,11]]},"1352":{"position":[[158,11]]},"1354":{"position":[[158,11]]},"1358":{"position":[[135,11]]},"1360":{"position":[[135,11]]},"1490":{"position":[[379,11]]},"1492":{"position":[[191,11]]},"1494":{"position":[[194,11]]},"1496":{"position":[[197,11]]},"1498":{"position":[[197,11]]},"1500":{"position":[[338,11]]},"1510":{"position":[[123,11]]},"1534":{"position":[[491,11]]},"1536":{"position":[[951,11]]},"1538":{"position":[[197,11]]},"1614":{"position":[[125,11]]},"1634":{"position":[[124,11]]},"1654":{"position":[[254,11]]},"1660":{"position":[[257,11],[1084,11],[1725,11]]},"1690":{"position":[[284,11],[538,11],[806,11],[1046,11]]},"1693":{"position":[[602,11]]},"1706":{"position":[[88,11],[502,11]]},"1708":{"position":[[140,11]]},"1716":{"position":[[332,11]]},"1741":{"position":[[91,11]]}}}],["fiber.new(fiber.config",{"_index":1186,"t":{"1134":{"position":[[1355,23]]},"1138":{"position":[[389,23],[740,23],[1099,23],[1467,23]]},"1144":{"position":[[602,23]]},"1148":{"position":[[605,23]]},"1152":{"position":[[691,23]]},"1154":{"position":[[781,23]]},"1160":{"position":[[651,23]]},"1164":{"position":[[662,23]]},"1166":{"position":[[263,23]]},"1194":{"position":[[653,23]]},"1198":{"position":[[828,23]]},"1202":{"position":[[646,23]]},"1206":{"position":[[670,23]]},"1212":{"position":[[1464,23]]},"1341":{"position":[[100,23]]},"1345":{"position":[[149,23]]},"1684":{"position":[[145,23]]},"1697":{"position":[[596,23]]},"1700":{"position":[[489,23]]},"1744":{"position":[[344,23]]},"1746":{"position":[[511,23]]},"1804":{"position":[[292,23]]}}}],["fiber.new(fiber.config{view",{"_index":1291,"t":{"1156":{"position":[[324,29]]},"1168":{"position":[[392,29]]}}}],["fiber.newerror",{"_index":3757,"t":{"1693":{"position":[[834,17]]}}}],["fiber.newerror(782",{"_index":2785,"t":{"1343":{"position":[[183,19]]}}}],["fiber.newerror(fiber.statusserviceunavail",{"_index":3761,"t":{"1693":{"position":[[1112,46]]}}}],["fiber.parserconfig",{"_index":4439,"t":{"1886":{"position":[[177,19]]}}}],["fiber.parsertyp",{"_index":4442,"t":{"1886":{"position":[[232,19],[793,17]]}}}],["fiber.parsertype{customtim",{"_index":4455,"t":{"1886":{"position":[[975,31]]}}}],["fiber.request",{"_index":2173,"t":{"1334":{"position":[[247,15]]}}}],["fiber.rout",{"_index":1866,"t":{"1233":{"position":[[235,13]]},"1716":{"position":[[463,12],[560,12]]}}}],["fiber.setparserdecoder(fiber.parserconfig",{"_index":4454,"t":{"1886":{"position":[[895,42]]}}}],["fiber.sqlite3",{"_index":1122,"t":{"1124":{"position":[[260,18]]},"1128":{"position":[[38,18]]}}}],["fiber.stat",{"_index":1778,"t":{"1223":{"position":[[1124,12],[1173,14],[2653,13]]}}}],["fiber.statusforbidden",{"_index":569,"t":{"827":{"position":[[608,22]]}}}],["fiber.statusfound",{"_index":3516,"t":{"1616":{"position":[[570,19]]},"1618":{"position":[[40,18]]}}}],["fiber.statusinternalservererror",{"_index":3763,"t":{"1695":{"position":[[354,31]]},"1697":{"position":[[747,31]]}}}],["fiber.statusok",{"_index":1984,"t":{"1265":{"position":[[775,14]]},"1562":{"position":[[1707,14]]}}}],["fiber.storag",{"_index":2882,"t":{"1378":{"position":[[1095,13]]},"1410":{"position":[[1495,13]]},"1526":{"position":[[1164,13]]},"1552":{"position":[[1159,13]]},"1642":{"position":[[256,13]]}}}],["fiber_storag",{"_index":820,"t":{"886":{"position":[[323,16]]},"888":{"position":[[437,15]]},"890":{"position":[[127,16]]},"930":{"position":[[182,15]]},"932":{"position":[[97,16]]},"946":{"position":[[138,16]]},"958":{"position":[[354,16]]},"960":{"position":[[35,16]]},"1012":{"position":[[313,16],[525,16]]},"1014":{"position":[[572,15]]},"1016":{"position":[[110,16]]},"1026":{"position":[[299,16]]},"1028":{"position":[[671,15]]},"1030":{"position":[[104,16]]},"1040":{"position":[[299,16]]},"1042":{"position":[[686,15]]},"1044":{"position":[[104,16]]},"1068":{"position":[[276,16]]},"1070":{"position":[[739,15]]},"1072":{"position":[[143,16]]},"1124":{"position":[[286,16]]},"1126":{"position":[[130,15]]},"1128":{"position":[[64,16]]}}}],["fiberapp",{"_index":2805,"t":{"1349":{"position":[[529,8]]}}}],["fiberapp(app",{"_index":2806,"t":{"1349":{"position":[[538,12]]}}}],["fiberhandl",{"_index":2801,"t":{"1349":{"position":[[341,12]]}}}],["fiberhandler(h",{"_index":2802,"t":{"1349":{"position":[[354,14]]}}}],["fiberhandlerfunc",{"_index":2803,"t":{"1349":{"position":[[427,16]]}}}],["fiberhandlerfunc(h",{"_index":2804,"t":{"1349":{"position":[[444,18]]}}}],["fiberi18n",{"_index":6,"t":{"725":{"position":[[7,9]]}}}],["fiberi18n.new(&fiberi18n.config",{"_index":157,"t":{"751":{"position":[[204,32]]}}}],["fiberi18n.new(config",{"_index":103,"t":{"747":{"position":[[0,20]]}}}],["fibernewrelic.config",{"_index":172,"t":{"757":{"position":[[25,21]]},"761":{"position":[[209,21]]},"763":{"position":[[436,21]]}}}],["fibernewrelic.new(config",{"_index":171,"t":{"757":{"position":[[0,24]]}}}],["fibersentri",{"_index":7,"t":{"725":{"position":[[17,11]]},"773":{"position":[[0,11],[593,12]]}}}],["fibersentry.gethubfromcontext",{"_index":245,"t":{"773":{"position":[[232,31]]}}}],["fibersentry.gethubfromcontext(c",{"_index":283,"t":{"773":{"position":[[1372,33],[1624,33]]}}}],["fibersentry.new(config",{"_index":211,"t":{"769":{"position":[[0,22]]}}}],["fiberzap",{"_index":8,"t":{"725":{"position":[[29,8]]}}}],["fiberzap.new(config",{"_index":305,"t":{"781":{"position":[[0,19]]}}}],["fiberzerolog",{"_index":9,"t":{"725":{"position":[[38,12]]}}}],["fiberzerolog.new(config",{"_index":341,"t":{"791":{"position":[[0,23]]}}}],["field",{"_index":311,"t":{"783":{"position":[[183,6],[203,6]]},"793":{"position":[[361,6],[381,6]]},"803":{"position":[[546,5]]},"890":{"position":[[23,6]]},"948":{"position":[[67,6],[206,6]]},"1070":{"position":[[139,6]]},"1102":{"position":[[61,6],[200,6]]},"1180":{"position":[[253,6],[299,5]]},"1304":{"position":[[1080,6],[1111,6],[1319,5],[1716,6],[1780,6]]},"1341":{"position":[[248,6]]},"1749":{"position":[[231,6]]},"1760":{"position":[[56,6]]},"1762":{"position":[[50,5]]},"1770":{"position":[[179,5],[221,5],[455,5]]},"1786":{"position":[[246,5]]},"1788":{"position":[[245,5]]},"1792":{"position":[[49,6]]},"1796":{"position":[[50,6]]},"1808":{"position":[[86,5]]},"1816":{"position":[[85,6]]},"1834":{"position":[[169,5],[211,5]]},"1850":{"position":[[170,5],[212,5],[305,5]]},"1864":{"position":[[172,5],[214,5],[315,5]]},"1880":{"position":[[83,5]]},"1884":{"position":[[32,5]]},"1900":{"position":[[22,5],[175,6]]},"1908":{"position":[[75,5]]}}}],["fieldnam",{"_index":1444,"t":{"1180":{"position":[[313,10]]},"1304":{"position":[[957,9],[1294,9],[1330,9]]}}}],["file",{"_index":39,"t":{"733":{"position":[[61,4]]},"735":{"position":[[13,4]]},"749":{"position":[[370,5],[553,5],[707,6]]},"930":{"position":[[265,4]]},"958":{"position":[[216,4]]},"1134":{"position":[[570,5]]},"1140":{"position":[[140,5]]},"1154":{"position":[[402,6]]},"1174":{"position":[[38,4]]},"1188":{"position":[[1302,4],[1389,6],[1867,4],[2273,5],[2436,4]]},"1198":{"position":[[610,5]]},"1218":{"position":[[16,5],[58,6],[102,4],[230,5],[356,5]]},"1223":{"position":[[38,5],[127,5],[285,5],[489,5],[558,5],[569,9],[606,10],[700,4],[717,5],[1099,6],[1359,6],[1875,4],[2010,4],[2241,4]]},"1255":{"position":[[118,5]]},"1259":{"position":[[145,4]]},"1261":{"position":[[160,4]]},"1265":{"position":[[93,5]]},"1304":{"position":[[145,6],[221,6],[536,6],[808,4],[898,6],[1187,4],[1263,4],[1468,5]]},"1341":{"position":[[843,4],[895,4],[914,4]]},"1478":{"position":[[367,5]]},"1480":{"position":[[198,4],[287,4]]},"1482":{"position":[[39,5]]},"1484":{"position":[[58,5]]},"1490":{"position":[[36,5],[247,4],[470,4]]},"1502":{"position":[[262,5],[421,4],[649,4],[814,4],[923,4],[1118,4]]},"1562":{"position":[[1026,4],[1038,5],[1159,5],[1238,5]]},"1678":{"position":[[276,5]]},"1682":{"position":[[387,4],[432,4],[517,4]]},"1782":{"position":[[14,4],[171,4]]},"1786":{"position":[[14,5],[56,4],[231,4],[264,5],[308,4]]},"1824":{"position":[[483,5],[511,5],[589,6],[603,4],[617,5],[753,5]]},"1872":{"position":[[37,4],[288,5],[316,5],[394,6],[408,4],[422,5],[558,5]]},"1874":{"position":[[37,4],[368,5],[396,5],[474,6],[488,4],[502,5],[638,5]]},"1880":{"position":[[14,4],[451,4],[532,4]]},"1896":{"position":[[80,4]]}}}],["file'",{"_index":2113,"t":{"1304":{"position":[[1312,6],[1363,6],[1406,6]]}}}],["file.clos",{"_index":3305,"t":{"1562":{"position":[[1183,12]]}}}],["file.filenam",{"_index":4168,"t":{"1786":{"position":[[376,15]]},"1824":{"position":[[815,16]]},"1872":{"position":[[620,16]]},"1874":{"position":[[712,15]]}}}],["file.header[\"cont",{"_index":4257,"t":{"1824":{"position":[[663,20]]},"1872":{"position":[[468,20]]},"1874":{"position":[[548,20]]}}}],["file.s",{"_index":4256,"t":{"1824":{"position":[[652,10]]},"1872":{"position":[[457,10]]},"1874":{"position":[[537,10]]}}}],["fileb0x",{"_index":1213,"t":{"1138":{"position":[[1176,8],[1549,7]]}}}],["filedata",{"_index":2110,"t":{"1304":{"position":[[1160,9],[1170,8],[1451,8]]}}}],["filedata(formfil",{"_index":2115,"t":{"1304":{"position":[[1638,18]]}}}],["filenam",{"_index":1371,"t":{"1174":{"position":[[523,8],[675,9]]},"1188":{"position":[[1100,9]]},"1782":{"position":[[144,9],[260,8],[326,8]]},"1880":{"position":[[102,9]]}}}],["filename///stat",{"_index":1215,"t":{"1138":{"position":[[1359,33]]}}}],["github.com/casbin/xorm",{"_index":28,"t":{"729":{"position":[[120,22]]},"737":{"position":[[123,23]]},"739":{"position":[[123,23]]},"741":{"position":[[123,23]]}}}],["github.com/geertjohan/go.ric",{"_index":1210,"t":{"1138":{"position":[[969,31]]},"1496":{"position":[[142,31]]}}}],["github.com/getsentry/sentri",{"_index":210,"t":{"767":{"position":[[132,27]]},"773":{"position":[[640,28]]}}}],["github.com/go",{"_index":68,"t":{"737":{"position":[[90,14]]},"739":{"position":[[90,14]]},"741":{"position":[[90,14]]}}}],["github.com/gobuffalo/packr/v2",{"_index":1206,"t":{"1138":{"position":[[613,31]]},"1494":{"position":[[139,31]]}}}],["github.com/goccy/go",{"_index":3784,"t":{"1700":{"position":[[441,20]]}}}],["github.com/gofiber/compress",{"_index":1781,"t":{"1223":{"position":[[1401,30]]}}}],["github.com/gofiber/contrib/casbin",{"_index":24,"t":{"729":{"position":[[48,33]]},"737":{"position":[[52,35]]},"739":{"position":[[52,35]]},"741":{"position":[[52,35]]}}}],["github.com/gofiber/contrib/fiberi18n",{"_index":102,"t":{"745":{"position":[[83,36]]},"751":{"position":[[22,38]]}}}],["github.com/gofiber/contrib/fibernewrel",{"_index":170,"t":{"755":{"position":[[48,40]]},"761":{"position":[[52,42]]},"763":{"position":[[52,42]]}}}],["github.com/gofiber/contrib/fibersentri",{"_index":209,"t":{"767":{"position":[[83,38]]},"773":{"position":[[673,40]]}}}],["github.com/gofiber/contrib/fiberzap",{"_index":303,"t":{"779":{"position":[[83,35]]},"785":{"position":[[58,37]]}}}],["github.com/gofiber/contrib/fiberzerolog",{"_index":339,"t":{"789":{"position":[[83,39]]},"795":{"position":[[52,41]]}}}],["github.com/gofiber/contrib/jwt",{"_index":373,"t":{"799":{"position":[[109,30]]},"805":{"position":[[67,32]]},"809":{"position":[[131,32]]},"815":{"position":[[737,32]]}}}],["github.com/gofiber/contrib/opafib",{"_index":540,"t":{"819":{"position":[[48,35]]},"827":{"position":[[294,37]]}}}],["github.com/gofiber/contrib/otelfib",{"_index":577,"t":{"831":{"position":[[45,36]]},"839":{"position":[[117,38]]}}}],["github.com/gofiber/contrib/paseto",{"_index":677,"t":{"845":{"position":[[83,33]]}}}],["github.com/gofiber/contrib/swagg",{"_index":706,"t":{"859":{"position":[[109,36]]}}}],["github.com/gofiber/contrib/websocket",{"_index":718,"t":{"867":{"position":[[48,36]]},"869":{"position":[[58,38]]}}}],["github.com/gofiber/emb",{"_index":1242,"t":{"1144":{"position":[[464,24]]},"1148":{"position":[[465,24]]},"1152":{"position":[[550,24]]},"1160":{"position":[[513,24]]},"1164":{"position":[[523,24]]},"1194":{"position":[[516,24]]},"1202":{"position":[[509,24]]},"1206":{"position":[[531,24]]}}}],["github.com/gofiber/fiber/v2",{"_index":23,"t":{"729":{"position":[[10,27]]},"737":{"position":[[22,29]]},"739":{"position":[[22,29]]},"741":{"position":[[22,29]]},"745":{"position":[[45,27]]},"751":{"position":[[61,29]]},"755":{"position":[[10,27]]},"761":{"position":[[22,29]]},"763":{"position":[[22,29]]},"767":{"position":[[45,27]]},"773":{"position":[[714,29]]},"779":{"position":[[45,27]]},"785":{"position":[[28,29]]},"789":{"position":[[45,27]]},"795":{"position":[[22,29]]},"799":{"position":[[71,27]]},"805":{"position":[[29,29]]},"809":{"position":[[62,29]]},"815":{"position":[[699,29]]},"819":{"position":[[10,27]]},"827":{"position":[[264,29]]},"839":{"position":[[87,29]]},"845":{"position":[[45,27]]},"859":{"position":[[79,29]]},"867":{"position":[[10,27]]},"869":{"position":[[28,29]]},"1132":{"position":[[49,27]]},"1134":{"position":[[28,29]]},"1138":{"position":[[213,29],[548,29],[904,29],[1268,29]]},"1144":{"position":[[284,29]]},"1148":{"position":[[279,29]]},"1152":{"position":[[361,29]]},"1154":{"position":[[508,29]]},"1160":{"position":[[319,29]]},"1164":{"position":[[340,29]]},"1166":{"position":[[47,29]]},"1168":{"position":[[63,29]]},"1194":{"position":[[336,29]]},"1198":{"position":[[349,29]]},"1202":{"position":[[296,29]]},"1206":{"position":[[315,29]]},"1210":{"position":[[121,27]]},"1214":{"position":[[101,29]]},"1352":{"position":[[39,29]]},"1354":{"position":[[39,29]]},"1356":{"position":[[33,29]]},"1358":{"position":[[33,29]]},"1360":{"position":[[33,29]]},"1366":{"position":[[79,29]]},"1376":{"position":[[79,29]]},"1386":{"position":[[79,29]]},"1398":{"position":[[79,29]]},"1408":{"position":[[79,29]]},"1422":{"position":[[79,29]]},"1434":{"position":[[79,29]]},"1446":{"position":[[79,29]]},"1458":{"position":[[79,29]]},"1468":{"position":[[79,29]]},"1478":{"position":[[79,29]]},"1488":{"position":[[79,29]]},"1490":{"position":[[145,29]]},"1492":{"position":[[57,29]]},"1494":{"position":[[57,29]]},"1496":{"position":[[60,29]]},"1498":{"position":[[57,29]]},"1500":{"position":[[55,29]]},"1510":{"position":[[22,29]]},"1520":{"position":[[79,29]]},"1534":{"position":[[54,29]]},"1536":{"position":[[193,29]]},"1538":{"position":[[54,29]]},"1548":{"position":[[79,29]]},"1562":{"position":[[79,29]]},"1574":{"position":[[79,29]]},"1584":{"position":[[79,29]]},"1594":{"position":[[79,29]]},"1604":{"position":[[79,29]]},"1614":{"position":[[22,29]]},"1624":{"position":[[79,29]]},"1634":{"position":[[22,29]]},"1640":{"position":[[79,29]]},"1654":{"position":[[79,29]]},"1660":{"position":[[79,29]]},"1690":{"position":[[85,29]]},"1693":{"position":[[500,29]]},"1700":{"position":[[404,29]]},"1716":{"position":[[279,29]]},"1728":{"position":[[316,29]]},"1746":{"position":[[196,29]]}}}],["github.com/gofiber/fiber/v2/middleware/adaptor",{"_index":2814,"t":{"1352":{"position":[[69,48]]},"1354":{"position":[[69,48]]},"1356":{"position":[[63,48]]},"1358":{"position":[[63,48]]},"1360":{"position":[[63,48]]}}}],["github.com/gofiber/fiber/v2/middleware/basicauth",{"_index":2841,"t":{"1366":{"position":[[109,50]]}}}],["github.com/gofiber/fiber/v2/middleware/cach",{"_index":2860,"t":{"1376":{"position":[[109,46]]}}}],["github.com/gofiber/fiber/v2/middleware/compress",{"_index":2896,"t":{"1386":{"position":[[109,49]]}}}],["github.com/gofiber/fiber/v2/middleware/cor",{"_index":2907,"t":{"1398":{"position":[[109,45]]}}}],["github.com/gofiber/fiber/v2/middleware/csrf",{"_index":2944,"t":{"1408":{"position":[[109,45]]}}}],["github.com/gofiber/fiber/v2/middleware/earlydata",{"_index":2995,"t":{"1422":{"position":[[109,50]]}}}],["github.com/gofiber/fiber/v2/middleware/encryptcooki",{"_index":3008,"t":{"1434":{"position":[[109,54]]}}}],["github.com/gofiber/fiber/v2/middleware/envvar",{"_index":3031,"t":{"1446":{"position":[[109,47]]}}}],["github.com/gofiber/fiber/v2/middleware/etag",{"_index":3050,"t":{"1458":{"position":[[109,45]]}}}],["github.com/gofiber/fiber/v2/middleware/expvar",{"_index":3070,"t":{"1468":{"position":[[118,47]]}}}],["github.com/gofiber/fiber/v2/middleware/favicon",{"_index":3094,"t":{"1478":{"position":[[109,48]]}}}],["github.com/gofiber/fiber/v2/middleware/filesystem",{"_index":3102,"t":{"1488":{"position":[[109,51]]},"1490":{"position":[[175,51]]},"1492":{"position":[[87,51]]},"1494":{"position":[[87,51]]},"1496":{"position":[[90,51]]},"1498":{"position":[[87,51]]},"1500":{"position":[[85,51]]}}}],["github.com/gofiber/fiber/v2/middleware/helmet",{"_index":3145,"t":{"1510":{"position":[[52,47]]}}}],["github.com/gofiber/fiber/v2/middleware/idempot",{"_index":3180,"t":{"1520":{"position":[[109,52]]}}}],["github.com/gofiber/fiber/v2/middleware/keyauth",{"_index":3200,"t":{"1534":{"position":[[84,48]]},"1536":{"position":[[223,48]]},"1538":{"position":[[84,48]]}}}],["github.com/gofiber/fiber/v2/middleware/limit",{"_index":3256,"t":{"1548":{"position":[[109,48]]}}}],["github.com/gofiber/fiber/v2/middleware/logg",{"_index":3283,"t":{"1562":{"position":[[109,47]]},"1690":{"position":[[115,47]]}}}],["github.com/gofiber/fiber/v2/middleware/monitor",{"_index":3390,"t":{"1574":{"position":[[109,48]]}}}],["github.com/gofiber/fiber/v2/middleware/pprof",{"_index":3427,"t":{"1584":{"position":[[109,46]]}}}],["github.com/gofiber/fiber/v2/middleware/proxi",{"_index":3453,"t":{"1594":{"position":[[109,46]]}}}],["github.com/gofiber/fiber/v2/middleware/recov",{"_index":3494,"t":{"1604":{"position":[[109,48]]},"1693":{"position":[[530,48]]}}}],["github.com/gofiber/fiber/v2/middleware/redirect",{"_index":3502,"t":{"1614":{"position":[[52,49]]}}}],["github.com/gofiber/fiber/v2/middleware/requestid",{"_index":3521,"t":{"1624":{"position":[[109,50]]}}}],["github.com/gofiber/fiber/v2/middleware/rewrit",{"_index":3530,"t":{"1634":{"position":[[52,48]]}}}],["github.com/gofiber/fiber/v2/middleware/sess",{"_index":3538,"t":{"1640":{"position":[[109,48]]}}}],["github.com/gofiber/fiber/v2/middleware/skip",{"_index":3561,"t":{"1654":{"position":[[109,45]]}}}],["github.com/gofiber/fiber/v2/middleware/timeout",{"_index":3577,"t":{"1660":{"position":[[109,48]]}}}],["github.com/gofiber/fiber/v2/util",{"_index":262,"t":{"773":{"position":[[744,35]]}}}],["github.com/gofiber/recip",{"_index":3222,"t":{"1534":{"position":[[1166,26]]}}}],["github.com/gofiber/storage/arangodb",{"_index":814,"t":{"884":{"position":[[234,35]]},"886":{"position":[[35,37]]}}}],["github.com/gofiber/storage/azureblob",{"_index":838,"t":{"898":{"position":[[244,36]]},"900":{"position":[[35,38]]}}}],["github.com/gofiber/storage/badg",{"_index":861,"t":{"912":{"position":[[221,33]]},"914":{"position":[[35,35]]}}}],["github.com/gofiber/storage/bbolt",{"_index":889,"t":{"926":{"position":[[216,32]]},"928":{"position":[[35,34]]}}}],["github.com/gofiber/storage/couchbas",{"_index":906,"t":{"940":{"position":[[227,36]]},"942":{"position":[[35,38]]}}}],["github.com/gofiber/storage/dynamodb",{"_index":925,"t":{"954":{"position":[[225,35]]},"956":{"position":[[35,37]]}}}],["github.com/gofiber/storage/etcd",{"_index":976,"t":{"968":{"position":[[217,31]]},"970":{"position":[[35,33]]}}}],["github.com/gofiber/storage/memcach",{"_index":991,"t":{"984":{"position":[[35,37]]}}}],["github.com/gofiber/storage/memori",{"_index":990,"t":{"982":{"position":[[221,33]]},"996":{"position":[[221,33]]},"998":{"position":[[35,35]]}}}],["github.com/gofiber/storage/mongodb",{"_index":1005,"t":{"1010":{"position":[[223,34]]},"1012":{"position":[[35,36]]}}}],["github.com/gofiber/storage/mssql",{"_index":1015,"t":{"1024":{"position":[[219,32]]},"1026":{"position":[[35,34]]}}}],["github.com/gofiber/storage/mysql",{"_index":1024,"t":{"1038":{"position":[[219,32]]},"1040":{"position":[[35,34]]}}}],["github.com/gofiber/storage/pebbl",{"_index":1032,"t":{"1052":{"position":[[292,33]]},"1054":{"position":[[35,35]]}}}],["github.com/gofiber/storage/postgres/v2",{"_index":1040,"t":{"1066":{"position":[[225,38]]},"1068":{"position":[[35,40]]}}}],["github.com/gofiber/storage/redis/v2",{"_index":1047,"t":{"1080":{"position":[[219,35]]},"1082":{"position":[[35,37]]}}}],["github.com/gofiber/storage/ristretto",{"_index":1096,"t":{"1094":{"position":[[227,36]]},"1096":{"position":[[35,38]]}}}],["github.com/gofiber/storage/s3",{"_index":1113,"t":{"1108":{"position":[[213,29]]},"1110":{"position":[[35,31]]}}}],["github.com/gofiber/storage/sqlite3",{"_index":1119,"t":{"1122":{"position":[[223,34]]},"1124":{"position":[[35,36]]},"1416":{"position":[[83,34]]},"1556":{"position":[[83,34]]},"1648":{"position":[[83,34]]}}}],["github.com/gofiber/template/ace/v2",{"_index":1239,"t":{"1144":{"position":[[314,36]]}}}],["github.com/gofiber/template/amber/v2",{"_index":1248,"t":{"1148":{"position":[[309,38]]}}}],["github.com/gofiber/template/any_template_engine/vx",{"_index":1150,"t":{"1132":{"position":[[87,50]]}}}],["github.com/gofiber/template/django/v3",{"_index":1260,"t":{"1152":{"position":[[391,39]]},"1154":{"position":[[538,39]]}}}],["github.com/gofiber/template/handlebars/v2",{"_index":1309,"t":{"1160":{"position":[[349,43]]}}}],["github.com/gofiber/template/html",{"_index":1200,"t":{"1138":{"position":[[243,34],[578,34],[934,34],[1298,34]]},"1166":{"position":[[77,34]]},"1168":{"position":[[93,34]]}}}],["github.com/gofiber/template/html/v2",{"_index":1157,"t":{"1134":{"position":[[258,37]]},"1164":{"position":[[370,37]]},"1746":{"position":[[226,37]]}}}],["github.com/gofiber/template/jet/v2",{"_index":1639,"t":{"1194":{"position":[[366,36]]}}}],["github.com/gofiber/template/mustach",{"_index":1155,"t":{"1134":{"position":[[159,38]]}}}],["github.com/gofiber/template/mustache/v2",{"_index":1647,"t":{"1198":{"position":[[379,41]]}}}],["github.com/gofiber/template/pug",{"_index":1154,"t":{"1134":{"position":[[122,33]]}}}],["github.com/gofiber/template/pug/v2",{"_index":1663,"t":{"1202":{"position":[[326,36]]}}}],["github.com/gofiber/template/slim/v2",{"_index":1674,"t":{"1206":{"position":[[345,37]]}}}],["github.com/golang",{"_index":374,"t":{"799":{"position":[[150,17]]},"805":{"position":[[100,18]]},"809":{"position":[[92,18]]},"815":{"position":[[770,18]]}}}],["github.com/markbates/pkg",{"_index":1201,"t":{"1138":{"position":[[278,28]]},"1492":{"position":[[139,28]]}}}],["github.com/newrelic/go",{"_index":201,"t":{"763":{"position":[[95,23]]}}}],["github.com/nicksnyder/go",{"_index":153,"t":{"751":{"position":[[91,25]]}}}],["github.com/o1egl/paseto",{"_index":678,"t":{"845":{"position":[[127,23]]}}}],["github.com/rakyll/statik/f",{"_index":3136,"t":{"1500":{"position":[[230,29]]}}}],["github.com/rs/zerolog",{"_index":351,"t":{"795":{"position":[[94,23]]}}}],["github.com/rs/zerolog/log",{"_index":340,"t":{"789":{"position":[[133,25]]}}}],["given",{"_index":769,"t":{"874":{"position":[[312,5],[427,5],[447,5],[660,5]]},"948":{"position":[[93,6],[228,6]]},"1102":{"position":[[87,6],[222,6]]},"1253":{"position":[[37,5]]},"1255":{"position":[[41,5]]},"1259":{"position":[[47,5]]},"1261":{"position":[[62,5]]},"1276":{"position":[[13,5]]},"1278":{"position":[[13,5]]},"1332":{"position":[[101,5]]},"1341":{"position":[[5167,5],[5903,5],[6026,5]]},"1550":{"position":[[353,5]]},"1592":{"position":[[134,5],[167,5],[276,5],[309,5],[428,5],[461,5],[661,5],[708,5],[848,5],[896,5],[1041,5],[1073,5],[1100,5],[1244,5],[1304,5]]},"1656":{"position":[[149,5],[510,5]]},"1772":{"position":[[436,5]]},"1786":{"position":[[70,5]]},"1788":{"position":[[67,5]]},"1824":{"position":[[120,5]]},"1880":{"position":[[28,5]]},"1900":{"position":[[9,5]]}}}],["glob",{"_index":1549,"t":{"1188":{"position":[[1070,4]]}}}],["global",{"_index":250,"t":{"773":{"position":[[379,6]]},"835":{"position":[[253,6],[381,6],[704,6]]},"1134":{"position":[[1169,6]]},"1178":{"position":[[1350,10]]},"1184":{"position":[[51,6]]},"1190":{"position":[[2181,6],[3144,11]]},"1341":{"position":[[6776,6]]},"1594":{"position":[[429,6]]},"1744":{"position":[[406,6],[626,6]]}}}],["go",{"_index":21,"t":{"729":{"position":[[0,2],[38,2],[110,2]]},"743":{"position":[[0,2]]},"745":{"position":[[35,2],[73,2]]},"755":{"position":[[0,2],[38,2]]},"767":{"position":[[35,2],[73,2],[122,2],[160,2]]},"773":{"position":[[669,3]]},"779":{"position":[[35,2],[73,2],[119,2]]},"789":{"position":[[35,2],[73,2],[123,2]]},"799":{"position":[[61,2],[99,2],[140,2]]},"817":{"position":[[52,2]]},"819":{"position":[[0,2],[38,2]]},"831":{"position":[[35,2]]},"845":{"position":[[35,2],[73,2],[117,2]]},"867":{"position":[[0,2],[38,2]]},"884":{"position":[[45,2],[147,2],[227,2]]},"892":{"position":[[79,2]]},"898":{"position":[[50,2],[152,2],[237,2]]},"912":{"position":[[31,2],[133,2],[214,2]]},"920":{"position":[[59,2]]},"926":{"position":[[30,2],[132,2],[209,2]]},"940":{"position":[[34,2],[136,2],[220,2]]},"948":{"position":[[44,2]]},"954":{"position":[[33,2],[135,2],[218,2]]},"968":{"position":[[29,2],[131,2],[210,2]]},"982":{"position":[[31,2],[133,2],[214,2]]},"996":{"position":[[31,2],[133,2],[214,2]]},"1004":{"position":[[45,2]]},"1010":{"position":[[32,2],[134,2],[216,2]]},"1024":{"position":[[30,2],[132,2],[212,2]]},"1032":{"position":[[46,2]]},"1038":{"position":[[30,2],[132,2],[212,2]]},"1052":{"position":[[31,2],[133,2],[285,2]]},"1066":{"position":[[33,2],[135,2],[218,2]]},"1074":{"position":[[29,2]]},"1080":{"position":[[30,2],[132,2],[212,2]]},"1094":{"position":[[34,2],[136,2],[220,2]]},"1102":{"position":[[38,2]]},"1108":{"position":[[27,2],[129,2],[206,2]]},"1122":{"position":[[32,2],[134,2],[216,2]]},"1132":{"position":[[0,2],[39,2],[77,2]]},"1138":{"position":[[447,2],[798,2],[1159,2],[1165,2]]},"1162":{"position":[[21,2]]},"1170":{"position":[[4,2]]},"1174":{"position":[[57,2],[121,2],[281,2]]},"1178":{"position":[[350,2],[539,2],[666,2],[859,2]]},"1180":{"position":[[139,2]]},"1182":{"position":[[20,2],[1198,2],[1295,2]]},"1184":{"position":[[1047,2]]},"1190":{"position":[[1543,2],[1726,2]]},"1208":{"position":[[197,3]]},"1210":{"position":[[35,3],[98,2],[114,2]]},"1214":{"position":[[266,2]]},"1220":{"position":[[45,2],[136,2]]},"1341":{"position":[[4765,2]]},"1488":{"position":[[553,3],[596,2],[668,2]]},"1490":{"position":[[81,2]]},"1498":{"position":[[146,2]]},"1500":{"position":[[211,2]]},"1502":{"position":[[468,2]]},"1638":{"position":[[551,2]]},"1675":{"position":[[112,2]]},"1682":{"position":[[53,2],[598,3],[718,6]]},"1700":{"position":[[359,2]]},"1739":{"position":[[366,2]]},"1746":{"position":[[303,2]]},"1860":{"position":[[92,2]]}}}],["go#hub",{"_index":236,"t":{"773":{"position":[[95,7]]}}}],["go.opentelemetry.io/otel",{"_index":609,"t":{"839":{"position":[[156,26]]}}}],["go.opentelemetry.io/otel/attribut",{"_index":610,"t":{"839":{"position":[[183,36]]}}}],["go.opentelemetry.io/otel/exporters/jaeg",{"_index":613,"t":{"839":{"position":[[283,45]]}}}],["go.opentelemetry.io/otel/exporters/stdout/stdouttrac",{"_index":612,"t":{"839":{"position":[[227,55]]}}}],["go.opentelemetry.io/otel/propag",{"_index":614,"t":{"839":{"position":[[329,38]]}}}],["go.opentelemetry.io/otel/sdk/resourc",{"_index":608,"t":{"839":{"position":[[47,39]]}}}],["go.opentelemetry.io/otel/sdk/trac",{"_index":616,"t":{"839":{"position":[[377,36]]}}}],["go.opentelemetry.io/otel/semconv/v1.4.0",{"_index":618,"t":{"839":{"position":[[422,41]]}}}],["go.opentelemetry.io/otel/trac",{"_index":620,"t":{"839":{"position":[[474,32]]}}}],["go.ric",{"_index":1208,"t":{"1138":{"position":[[809,8]]}}}],["go.uber.org/zap",{"_index":304,"t":{"779":{"position":[[129,15]]},"785":{"position":[[96,17]]}}}],["go1.13.6",{"_index":3669,"t":{"1675":{"position":[[115,8]]}}}],["go:emb",{"_index":1262,"t":{"1154":{"position":[[18,8],[580,10]]},"1166":{"position":[[114,10]]},"1168":{"position":[[130,10]]},"1490":{"position":[[252,10],[310,10]]}}}],["goal",{"_index":882,"t":{"920":{"position":[[121,4]]}}}],["gocb.clust",{"_index":905,"t":{"938":{"position":[[288,13]]}}}],["goccy/go",{"_index":3778,"t":{"1700":{"position":[[279,8]]},"1812":{"position":[[51,8]]}}}],["godoc",{"_index":1356,"t":{"1174":{"position":[[160,7]]}}}],["gofib",{"_index":662,"t":{"841":{"position":[[21,7]]}}}],["gofiber/boilerpl",{"_index":3686,"t":{"1678":{"position":[[379,19]]}}}],["gofiber/templ",{"_index":3723,"t":{"1686":{"position":[[51,16]]}}}],["gofiber/util",{"_index":1718,"t":{"1212":{"position":[[1110,14]]}}}],["gohtml",{"_index":1357,"t":{"1174":{"position":[[182,7]]},"1188":{"position":[[2049,12],[2265,7]]}}}],["gokv",{"_index":941,"t":{"958":{"position":[[1228,5],[1924,5],[2553,4],[2606,4],[2793,4]]}}}],["golang",{"_index":3110,"t":{"1490":{"position":[[47,6]]}}}],["golang.org/x/text/languag",{"_index":155,"t":{"751":{"position":[[131,28]]}}}],["gold",{"_index":3624,"t":{"1663":{"position":[[483,4]]},"1675":{"position":[[80,4]]}}}],["good",{"_index":1167,"t":{"1134":{"position":[[675,4],[794,4]]},"1174":{"position":[[388,4]]},"1665":{"position":[[248,4]]}}}],["googl",{"_index":3881,"t":{"1735":{"position":[[1903,6]]}}}],["google.com",{"_index":4200,"t":{"1802":{"position":[[194,12]]}}}],["gorm",{"_index":63,"t":{"735":{"position":[[0,4]]},"1678":{"position":[[465,4]]}}}],["gorm.config",{"_index":3601,"t":{"1660":{"position":[[1801,15]]}}}],["gorm.open(postgres.open(\"postgres://localhost/foodb",{"_index":3600,"t":{"1660":{"position":[[1746,54]]}}}],["gosublim",{"_index":1360,"t":{"1174":{"position":[[236,9]]}}}],["go’",{"_index":1386,"t":{"1178":{"position":[[21,4]]}}}],["gracefulli",{"_index":1878,"t":{"1237":{"position":[[9,10]]}}}],["grame",{"_index":4216,"t":{"1812":{"position":[[337,8],[430,8],[484,8],[560,8]]},"1814":{"position":[[451,8],[516,8],[598,8]]},"1910":{"position":[[393,8]]}}}],["graph",{"_index":3677,"t":{"1675":{"position":[[671,5]]}}}],["great",{"_index":3996,"t":{"1749":{"position":[[15,5]]}}}],["greatli",{"_index":3904,"t":{"1735":{"position":[[2853,7]]}}}],["greedi",{"_index":3860,"t":{"1735":{"position":[[470,6],[786,7],[1025,6],[1259,6]]}}}],["green",{"_index":3375,"t":{"1568":{"position":[[929,7]]}}}],["greet",{"_index":1281,"t":{"1154":{"position":[[925,11]]},"1156":{"position":[[704,11]]},"1358":{"position":[[165,6]]}}}],["greet(c",{"_index":2832,"t":{"1356":{"position":[[366,7]]},"1358":{"position":[[254,7]]}}}],["greet(w",{"_index":2820,"t":{"1352":{"position":[[466,7]]}}}],["greetwithhttpreq",{"_index":2835,"t":{"1360":{"position":[[165,17]]}}}],["greetwithhttpreq(c",{"_index":2836,"t":{"1360":{"position":[[265,18]]}}}],["group",{"_index":1844,"t":{"1231":{"position":[[8,5],[35,6]]},"1704":{"position":[[21,5],[82,6],[147,5],[302,5]]},"1706":{"position":[[14,6],[436,5]]},"1708":{"position":[[0,5]]},"1716":{"position":[[169,7]]},"1718":{"position":[[52,5],[90,5],[110,5]]},"1720":{"position":[[56,5],[87,5],[107,5],[167,7]]},"1728":{"position":[[195,5],[825,6]]},"1741":{"position":[[63,6],[472,8]]}}}],["group(prefix",{"_index":1845,"t":{"1231":{"position":[[76,12]]}}}],["gt",{"_index":1533,"t":{"1186":{"position":[[417,2]]}}}],["guid",{"_index":3882,"t":{"1735":{"position":[[1921,6]]},"1737":{"position":[[429,4]]},"1741":{"position":[[481,5]]},"1774":{"position":[[76,5]]}}}],["guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/howitworks.provisionedthroughput",{"_index":952,"t":{"958":{"position":[[1486,96],[2182,96]]}}}],["guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/limits.md#capac",{"_index":954,"t":{"958":{"position":[[1655,81],[2351,81]]}}}],["gzip",{"_index":2893,"t":{"1382":{"position":[[71,5]]},"1754":{"position":[[1254,5]]},"1880":{"position":[[150,8]]}}}],["h",{"_index":463,"t":{"807":{"position":[[357,1]]},"1574":{"position":[[605,1]]},"1660":{"position":[[269,1],[1096,1]]},"1728":{"position":[[226,2]]},"1749":{"position":[[1657,1]]},"1770":{"position":[[865,1],[978,1],[1102,1]]},"1864":{"position":[[789,1],[805,1],[820,1]]}}}],["h1",{"_index":1231,"t":{"1144":{"position":[[54,2],[132,2],[170,2]]},"1148":{"position":[[51,2],[124,2],[164,2]]},"1152":{"position":[[60,6],[73,7]]},"1180":{"position":[[747,4],[794,5]]},"1184":{"position":[[542,7]]},"1194":{"position":[[48,6],[61,7]]},"1202":{"position":[[46,2]]},"1206":{"position":[[53,2]]}}}],["h1>a",{"_index":1389,"t":{"1178":{"position":[[218,6],[426,5]]}}}],["h1>filler",{"_index":1579,"t":{"1188":{"position":[[2672,10]]}}}],["h1>hello",{"_index":1465,"t":{"1182":{"position":[[308,10],[858,10]]}}}],["h1>{{.title}}{{.}}{{index",{"_index":1505,"t":{"1184":{"position":[[519,11]]}}}],["h1>{{title}}footerheaderfeatur",{"_index":1590,"t":{"1190":{"position":[[497,11],[595,11],[1875,11],[1973,11]]}}}],["handi",{"_index":3699,"t":{"1682":{"position":[[9,5]]},"1697":{"position":[[192,5]]}}}],["handl",{"_index":145,"t":{"749":{"position":[[822,7]]},"853":{"position":[[45,7]]},"1182":{"position":[[760,6]]},"1341":{"position":[[3185,7]]},"1464":{"position":[[202,7]]},"1484":{"position":[[157,6]]},"1580":{"position":[[235,7]]},"1600":{"position":[[87,7]]},"1606":{"position":[[223,8],[340,6]]},"1654":{"position":[[605,6]]},"1656":{"position":[[679,6]]},"1667":{"position":[[6,7],[86,7]]},"1669":{"position":[[6,7],[86,7]]},"1671":{"position":[[6,7],[86,7]]},"1673":{"position":[[6,7],[88,7]]},"1680":{"position":[[148,9],[351,6]]},"1684":{"position":[[346,8],[381,9]]},"1693":{"position":[[328,6]]},"1697":{"position":[[1247,9]]}}}],["handlebar",{"_index":1142,"t":{"1130":{"position":[[267,10]]},"1136":{"position":[[98,10]]},"1158":{"position":[[0,10]]},"1686":{"position":[[97,10]]},"1746":{"position":[[115,10]]}}}],["handlebars.new(\"./view",{"_index":1310,"t":{"1160":{"position":[[442,25]]}}}],["handler",{"_index":88,"t":{"737":{"position":[[580,7],[769,7]]},"739":{"position":[[546,7]]},"741":{"position":[[523,7]]},"797":{"position":[[115,8]]},"843":{"position":[[124,8]]},"1156":{"position":[[370,7]]},"1188":{"position":[[2112,8],[2379,7]]},"1190":{"position":[[4200,7],[4262,7],[4796,7],[5134,7]]},"1212":{"position":[[277,8],[355,8],[571,7],[661,8],[850,7]]},"1216":{"position":[[217,7]]},"1218":{"position":[[87,7]]},"1223":{"position":[[2015,9],[2467,7]]},"1225":{"position":[[111,8],[120,11],[173,8],[182,11],[235,8],[244,11],[296,8],[305,11],[360,8],[369,11],[425,8],[434,11],[490,8],[499,11],[553,8],[562,11],[616,8],[625,11],[733,8],[742,11],[901,8],[910,11],[952,7],[1068,7],[1751,8]]},"1231":{"position":[[97,8],[106,11],[192,8],[232,8],[268,8],[309,8],[357,8],[393,8],[434,8]]},"1239":{"position":[[45,9]]},"1241":{"position":[[104,7],[209,8],[240,8]]},"1243":{"position":[[118,7],[214,8]]},"1245":{"position":[[103,7]]},"1251":{"position":[[0,7],[27,7],[125,9]]},"1341":{"position":[[2540,9],[3455,8],[4084,8],[6006,7]]},"1347":{"position":[[23,8],[54,9]]},"1362":{"position":[[104,7]]},"1378":{"position":[[1183,7]]},"1418":{"position":[[1011,8]]},"1464":{"position":[[188,9]]},"1480":{"position":[[318,7]]},"1580":{"position":[[221,9]]},"1594":{"position":[[1061,7]]},"1650":{"position":[[47,7]]},"1656":{"position":[[119,7]]},"1660":{"position":[[1817,7]]},"1675":{"position":[[223,9]]},"1680":{"position":[[84,8],[204,7]]},"1684":{"position":[[30,8]]},"1693":{"position":[[86,8],[139,7],[392,7]]},"1695":{"position":[[24,7],[243,7]]},"1697":{"position":[[15,7],[118,7],[172,7],[646,7],[1136,7]]},"1706":{"position":[[207,8],[248,8],[335,8],[376,8],[472,8],[597,8],[638,8],[713,8],[754,8]]},"1708":{"position":[[6,8],[152,7],[395,8],[436,8]]},"1712":{"position":[[3,8]]},"1731":{"position":[[111,8],[120,11],[173,8],[182,11],[235,8],[244,11],[296,8],[305,11],[360,8],[369,11],[425,8],[434,11],[490,8],[499,11],[553,8],[562,11],[616,8],[625,11],[733,8],[742,11],[901,8],[910,11],[952,7],[1068,7],[1751,8]]},"1735":{"position":[[2993,8],[3065,8],[3176,8],[3289,8]]},"1737":{"position":[[320,8]]},"1741":{"position":[[210,8],[251,8],[338,8],[379,8]]},"1751":{"position":[[111,8],[120,11],[173,8],[182,11],[235,8],[244,11],[296,8],[305,11],[360,8],[369,11],[425,8],[434,11],[490,8],[499,11],[553,8],[562,11],[616,8],[625,11],[733,8],[742,11],[901,8],[910,11],[952,7],[1068,7],[1751,8]]},"1768":{"position":[[293,8]]},"1770":{"position":[[1360,8]]},"1780":{"position":[[380,8]]},"1788":{"position":[[360,8]]},"1792":{"position":[[372,8]]},"1796":{"position":[[439,8]]},"1802":{"position":[[257,8]]},"1826":{"position":[[187,8]]},"1828":{"position":[[263,8]]},"1830":{"position":[[1089,8]]},"1842":{"position":[[562,8]]},"1868":{"position":[[229,8]]},"1870":{"position":[[250,7]]}}}],["handler(c",{"_index":1702,"t":{"1212":{"position":[[503,9],[782,9]]}}}],["handler(f",{"_index":2818,"t":{"1352":{"position":[[389,9]]}}}],["handler(w",{"_index":1567,"t":{"1188":{"position":[[2162,9]]},"1190":{"position":[[4357,9]]}}}],["handler).name(\"bar",{"_index":1872,"t":{"1233":{"position":[[334,20]]}}}],["handler).name(\"delet",{"_index":1908,"t":{"1243":{"position":[[347,23]]}}}],["handler).name(\"foo",{"_index":1868,"t":{"1233":{"position":[[267,20]]}}}],["handler).name(\"hom",{"_index":1904,"t":{"1243":{"position":[[257,21]]}}}],["handler).name(\"index",{"_index":1919,"t":{"1245":{"position":[[199,22]]}}}],["handler).name(\"test",{"_index":1912,"t":{"1243":{"position":[[421,21]]}}}],["handler).name(\"tracert",{"_index":1906,"t":{"1243":{"position":[[300,24]]}}}],["handlerscount",{"_index":1891,"t":{"1239":{"position":[[81,15]]}}}],["handshak",{"_index":750,"t":{"871":{"position":[[36,9]]}}}],["hang",{"_index":3726,"t":{"1688":{"position":[[46,4]]}}}],["happi",{"_index":3777,"t":{"1700":{"position":[[193,5]]}}}],["hardwar",{"_index":3617,"t":{"1663":{"position":[[317,9]]}}}],["hash",{"_index":2699,"t":{"1341":{"position":[[1932,7]]}}}],["hashedapikey",{"_index":3206,"t":{"1534":{"position":[[245,12]]},"1536":{"position":[[511,12]]},"1538":{"position":[[313,12]]}}}],["hashedkey",{"_index":3208,"t":{"1534":{"position":[[291,9],[378,13]]},"1536":{"position":[[557,9],[644,13]]},"1538":{"position":[[359,9],[446,13]]}}}],["haspermiss",{"_index":1597,"t":{"1190":{"position":[[713,13],[821,13],[945,13],[1161,13],[1315,13],[1338,14],[2492,13],[2579,16],[2829,15],[3012,13],[3099,13],[3585,13],[3727,16],[3896,13],[4115,13],[4572,16],[4904,13],[5008,13]]}}}],["haspermission(featur",{"_index":1587,"t":{"1190":{"position":[[236,21]]}}}],["hat",{"_index":4350,"t":{"1850":{"position":[[669,4]]},"1864":{"position":[[695,4]]}}}],["have",{"_index":1625,"t":{"1190":{"position":[[4220,6],[5070,6]]}}}],["hb",{"_index":1311,"t":{"1160":{"position":[[468,7],[603,8]]}}}],["head",{"_index":1238,"t":{"1144":{"position":[[225,4]]},"1148":{"position":[[219,4]]},"1152":{"position":[[265,6],[292,7]]},"1160":{"position":[[223,6],[250,7]]},"1164":{"position":[[244,6],[271,7]]},"1188":{"position":[[2497,6],[2627,7]]},"1194":{"position":[[235,6],[263,7]]},"1198":{"position":[[251,6],[278,7]]},"1202":{"position":[[206,4]]},"1206":{"position":[[224,4]]},"1241":{"position":[[440,7]]},"1243":{"position":[[779,7],[842,7],[908,7]]},"1296":{"position":[[514,4]]},"1316":{"position":[[54,5]]},"1336":{"position":[[98,6]]},"1404":{"position":[[252,5]]},"1418":{"position":[[1114,5]]},"1576":{"position":[[475,4]]}}}],["head(path",{"_index":1800,"t":{"1225":{"position":[[155,9]]},"1731":{"position":[[155,9]]},"1751":{"position":[[155,9]]}}}],["head(url",{"_index":1989,"t":{"1270":{"position":[[138,8]]}}}],["head>back/static/image.png",{"_index":3119,"t":{"1490":{"position":[[522,35]]}}}],["http:///static/static/image.png",{"_index":3121,"t":{"1490":{"position":[[617,42]]}}}],["http://api.example.com/users?page=2",{"_index":4231,"t":{"1816":{"position":[[195,38],[300,38]]}}}],["http://api.example.com/users?page=5",{"_index":4232,"t":{"1816":{"position":[[242,38],[354,38]]}}}],["http://example.com",{"_index":4290,"t":{"1838":{"position":[[127,18]]}}}],["http://example.com/?field1=value1&field1=value2&field2=value3",{"_index":4298,"t":{"1840":{"position":[[383,61]]}}}],["http://example.com/?list_a=1&list_a=2&list_a=3&list_b[]=1&list_b[]=2&list_b[]=3&list_c=1,2,3",{"_index":4303,"t":{"1840":{"position":[[567,92]]}}}],["http://example.com/?name=alex&amount=32.23&id",{"_index":4333,"t":{"1846":{"position":[[533,46]]}}}],["http://example.com/?name=alex&wanna_cake=2&id",{"_index":4339,"t":{"1848":{"position":[[523,46]]}}}],["http://example.com/?name=alex&want_pizza=false&id",{"_index":4291,"t":{"1840":{"position":[[189,50]]},"1844":{"position":[[465,50]]}}}],["http://example.com/?order=desc&brand=nik",{"_index":4320,"t":{"1842":{"position":[[341,41]]}}}],["http://example.com/hello",{"_index":4129,"t":{"1774":{"position":[[337,24]]}}}],["http://example.com/search?q=someth",{"_index":4265,"t":{"1828":{"position":[[94,37]]}}}],["http://example.com/user/111",{"_index":4282,"t":{"1834":{"position":[[309,27]]}}}],["http://example.com/user/123",{"_index":4275,"t":{"1832":{"position":[[350,27]]}}}],["http://example.com/user/fenni",{"_index":4063,"t":{"1756":{"position":[[148,29]]},"1830":{"position":[[297,29]]}}}],["http://example.com/user/fenny/123",{"_index":4066,"t":{"1756":{"position":[[282,33]]},"1830":{"position":[[422,33]]}}}],["http://example.com/users?sort=desc",{"_index":4288,"t":{"1836":{"position":[[254,34]]}}}],["http://google.com",{"_index":1974,"t":{"1265":{"position":[[460,17],[615,20]]},"1594":{"position":[[1439,20]]},"1760":{"position":[[281,20],[352,17],[425,18]]}}}],["http://google.com/search",{"_index":4199,"t":{"1802":{"position":[[113,24]]}}}],["http://localhost",{"_index":3475,"t":{"1594":{"position":[[2016,19]]},"1760":{"position":[[302,19],[334,17],[407,17]]}}}],["http://localhost:3000",{"_index":1729,"t":{"1214":{"position":[[293,21]]},"1398":{"position":[[589,21],[717,22]]},"1510":{"position":[[268,21]]},"1534":{"position":[[856,21],[968,21],[1070,21]]},"1536":{"position":[[1451,21]]},"1538":{"position":[[820,21]]},"1594":{"position":[[1726,24]]},"1737":{"position":[[2601,22]]},"1770":{"position":[[1238,21]]},"1864":{"position":[[763,24]]}}}],["http://localhost:3000/1",{"_index":3971,"t":{"1737":{"position":[[1443,23],[1711,23]]}}}],["http://localhost:3000/12",{"_index":3970,"t":{"1737":{"position":[[1397,24]]}}}],["http://localhost:3000/120000",{"_index":3973,"t":{"1737":{"position":[[1645,28]]}}}],["http://localhost:3000/125",{"_index":3982,"t":{"1737":{"position":[[2044,25]]}}}],["http://localhost:3000/2022",{"_index":3985,"t":{"1737":{"position":[[2166,26]]}}}],["http://localhost:3000/250",{"_index":3975,"t":{"1737":{"position":[[1767,25]]}}}],["http://localhost:3000/42",{"_index":3989,"t":{"1737":{"position":[[2555,24]]}}}],["http://localhost:3000/7.0",{"_index":3990,"t":{"1737":{"position":[[2642,25]]}}}],["http://localhost:3000/?name=john&pass=do",{"_index":4107,"t":{"1770":{"position":[[1276,43]]}}}],["http://localhost:3000/?name=john&pass=doe&products=shoe,hat",{"_index":4351,"t":{"1850":{"position":[[737,61]]}}}],["http://localhost:3000/allow",{"_index":3244,"t":{"1538":{"position":[[952,29]]}}}],["http://localhost:3000/api/user/john",{"_index":1746,"t":{"1216":{"position":[[1218,35]]}}}],["http://localhost:3000/auth2",{"_index":3239,"t":{"1536":{"position":[[1749,27]]}}}],["http://localhost:3000/authent",{"_index":3237,"t":{"1536":{"position":[[1585,35]]}}}],["http://localhost:3000/bodi",{"_index":4473,"t":{"1886":{"position":[[1574,26]]}}}],["http://localhost:3000/css/style.css",{"_index":1768,"t":{"1223":{"position":[[435,35]]}}}],["http://localhost:3000/flights/lax",{"_index":3889,"t":{"1735":{"position":[[2140,33]]}}}],["http://localhost:3000/foo/1000",{"_index":3592,"t":{"1660":{"position":[[861,32]]}}}],["http://localhost:3000/foo/3000",{"_index":3593,"t":{"1660":{"position":[[952,32]]}}}],["http://localhost:3000/hello.html",{"_index":1766,"t":{"1223":{"position":[[355,32]]}}}],["http://localhost:3000/john",{"_index":1743,"t":{"1216":{"position":[[991,26]]}}}],["http://localhost:3000/js/jquery.j",{"_index":1767,"t":{"1223":{"position":[[394,34]]}}}],["http://localhost:3000/login",{"_index":458,"t":{"807":{"position":[[88,27]]}}}],["http://localhost:3000/metr",{"_index":3395,"t":{"1574":{"position":[[634,29]]}}}],["http://localhost:3000/old",{"_index":3508,"t":{"1614":{"position":[[476,25]]},"1634":{"position":[[456,25]]}}}],["http://localhost:3000/old/hello",{"_index":3509,"t":{"1614":{"position":[[507,31]]},"1634":{"position":[[487,31]]}}}],["http://localhost:3000/plantae/prunus.persica",{"_index":3883,"t":{"1735":{"position":[[1931,44]]}}}],["http://localhost:3000/query?title=title&body=body&date=2021",{"_index":4474,"t":{"1886":{"position":[[1616,60]]}}}],["http://localhost:3000/shop/product/color:blue/size:x",{"_index":3897,"t":{"1735":{"position":[[2479,53]]}}}],["http://localhost:3000/static/css/style.css",{"_index":1773,"t":{"1223":{"position":[[968,42]]}}}],["http://localhost:3000/static/hello.html",{"_index":1771,"t":{"1223":{"position":[[874,39]]}}}],["http://localhost:3000/static/js/jquery.j",{"_index":1772,"t":{"1223":{"position":[[920,41]]}}}],["http://localhost:3000/test",{"_index":3984,"t":{"1737":{"position":[[2104,26]]}}}],["http://localhost:3001",{"_index":3478,"t":{"1594":{"position":[[2276,24],[2459,24],[2875,24]]}}}],["http://localhost:3002",{"_index":3479,"t":{"1594":{"position":[[2301,24],[2484,24],[2900,24]]}}}],["http://localhost:3003",{"_index":3480,"t":{"1594":{"position":[[2326,24],[2509,24],[2925,24]]}}}],["http://localhost:8000",{"_index":937,"t":{"958":{"position":[[614,24]]},"1594":{"position":[[820,25]]}}}],["http://localhost:8080",{"_index":4084,"t":{"1768":{"position":[[92,21]]}}}],["http://localhost:8080/css/style.css",{"_index":1759,"t":{"1218":{"position":[[466,35]]}}}],["http://localhost:8080/hello",{"_index":4401,"t":{"1870":{"position":[[84,27]]}}}],["http://localhost:8080/hello%20world",{"_index":1739,"t":{"1216":{"position":[[787,35]]}}}],["http://localhost:8080/hello.html",{"_index":1757,"t":{"1218":{"position":[[398,32]]}}}],["http://localhost:8080/js/jquery.j",{"_index":1758,"t":{"1218":{"position":[[431,34]]}}}],["http://localhost:8080/register/us",{"_index":4030,"t":{"1749":{"position":[[1743,35]]}}}],["http://www.foobar.com",{"_index":3489,"t":{"1596":{"position":[[332,22]]}}}],["httpapi",{"_index":3177,"t":{"1516":{"position":[[293,7]]}}}],["httperror",{"_index":2783,"t":{"1343":{"position":[[23,9]]}}}],["httphandler",{"_index":2792,"t":{"1349":{"position":[[27,11]]}}}],["httphandler(h",{"_index":2793,"t":{"1349":{"position":[[39,13]]}}}],["httphandlerfunc",{"_index":2795,"t":{"1349":{"position":[[111,15]]}}}],["httphandlerfunc(h",{"_index":2796,"t":{"1349":{"position":[[127,17]]}}}],["httphandlerfunc(mw",{"_index":2799,"t":{"1349":{"position":[[226,18]]}}}],["httpmiddlewar",{"_index":2798,"t":{"1349":{"position":[[211,14]]}}}],["httponli",{"_index":4119,"t":{"1772":{"position":[[822,9],[1027,9]]},"1778":{"position":[[280,8]]}}}],["httpreq",{"_index":2837,"t":{"1360":{"position":[[304,8]]}}}],["httpreq.url.str",{"_index":2840,"t":{"1360":{"position":[[420,21]]}}}],["https://blog.trailofbits.com/2019/03/25/what",{"_index":2989,"t":{"1418":{"position":[[733,44]]}}}],["https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/chart.bundle.min.j",{"_index":3415,"t":{"1576":{"position":[[857,66]]}}}],["https://datatracker.ietf.org/doc/html/draft",{"_index":3175,"t":{"1516":{"position":[[244,43]]}}}],["https://datatracker.ietf.org/doc/html/rfc8446#sect",{"_index":2988,"t":{"1418":{"position":[[677,53]]}}}],["https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region",{"_index":928,"t":{"958":{"position":[[89,68]]}}}],["https://example.com",{"_index":2175,"t":{"1334":{"position":[[290,21]]},"1764":{"position":[[198,19]]}}}],["https://example.com/page#chapt",{"_index":4079,"t":{"1764":{"position":[[108,32]]}}}],["https://expressjs.com/en/4x/api.html#req.fresh",{"_index":4171,"t":{"1790":{"position":[[0,46]]}}}],["https://expressjs.com/en/4x/api.html#req.stal",{"_index":4478,"t":{"1890":{"position":[[0,46]]}}}],["https://fonts.googleapis.com/css2?family=roboto:wght@400;900&display=swap",{"_index":3412,"t":{"1576":{"position":[[656,73]]}}}],["https://foobar.com",{"_index":3488,"t":{"1596":{"position":[[311,20]]}}}],["https://github.com/awsdocs/amazon",{"_index":950,"t":{"958":{"position":[[1433,33],[1602,33],[2129,33],[2298,33]]}}}],["https://github.com/geertjohan/go.ric",{"_index":1209,"t":{"1138":{"position":[[838,37]]},"1496":{"position":[[0,37]]}}}],["https://github.com/go",{"_index":4002,"t":{"1749":{"position":[[556,21]]}}}],["https://github.com/gobuffalo/packr",{"_index":1205,"t":{"1138":{"position":[[485,34]]},"1494":{"position":[[0,34]]}}}],["https://github.com/gofiber/storag",{"_index":765,"t":{"874":{"position":[[207,34]]}}}],["https://github.com/markbates/pkg",{"_index":1199,"t":{"1138":{"position":[[150,34]]},"1492":{"position":[[0,34]]}}}],["https://github.com/rakyll/statik",{"_index":3131,"t":{"1500":{"position":[[0,32]]}}}],["https://github.com/smallnest/go",{"_index":3664,"t":{"1675":{"position":[[3,31]]}}}],["https://github.com/unnoted/fileb0x",{"_index":1214,"t":{"1138":{"position":[[1205,34]]},"1498":{"position":[[0,34]]}}}],["https://godoc.org/github.com/getsentry/sentri",{"_index":235,"t":{"773":{"position":[[48,46]]}}}],["https://gofiber.io",{"_index":2911,"t":{"1398":{"position":[[369,20]]}}}],["https://gofiber.net",{"_index":2912,"t":{"1398":{"position":[[390,21]]}}}],["https://hub.docker.com/r/amazon/dynamodb",{"_index":938,"t":{"958":{"position":[[646,40]]}}}],["https://i.imgur.com/\"+c.params(\"id\")+\".gif",{"_index":3467,"t":{"1594":{"position":[[1119,44]]}}}],["https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg",{"_index":737,"t":{"869":{"position":[[666,60]]}}}],["https://programming.guide/go/format",{"_index":3323,"t":{"1564":{"position":[[662,35]]}}}],["https://storageaccountname.blob.core.windows.net",{"_index":844,"t":{"902":{"position":[[140,50]]}}}],["https://www.websocket.org/echo.html",{"_index":749,"t":{"869":{"position":[[1072,35]]}}}],["httptest.newrequest(\"get",{"_index":1978,"t":{"1265":{"position":[[588,26]]}}}],["hub",{"_index":282,"t":{"773":{"position":[[1365,3],[1406,3],[1617,3],[1658,3]]}}}],["hub.capturemessage(\"us",{"_index":295,"t":{"773":{"position":[[1767,24]]}}}],["hub.scope().settag(\"somerandomtag",{"_index":284,"t":{"773":{"position":[[1419,35]]}}}],["hub.withscope(func(scop",{"_index":291,"t":{"773":{"position":[[1671,24]]}}}],["hyphen",{"_index":3876,"t":{"1735":{"position":[[1613,6]]}}}],["i.",{"_index":996,"t":{"986":{"position":[[52,4]]},"1225":{"position":[[1292,4]]},"1418":{"position":[[965,4]]},"1596":{"position":[[305,5]]},"1731":{"position":[[1292,4]]},"1751":{"position":[[1292,4]]}}}],["i18n",{"_index":99,"t":{"743":{"position":[[3,4]]},"749":{"position":[[142,4]]}}}],["i18n.unmarshalfunc",{"_index":138,"t":{"749":{"position":[[648,18]]}}}],["i18n/v2/i18n",{"_index":154,"t":{"751":{"position":[[117,13]]}}}],["icon",{"_index":3087,"t":{"1474":{"position":[[80,4]]}}}],["id",{"_index":634,"t":{"839":{"position":[[896,2],[950,3],[984,3],[1596,2],[1704,5],[1730,2]]},"1190":{"position":[[200,2],[1141,2],[1257,3],[4465,3],[4827,2]]},"1336":{"position":[[10502,3],[11548,3]]},"1562":{"position":[[656,2]]},"1624":{"position":[[444,3]]},"1626":{"position":[[259,2],[298,3],[503,2]]},"1638":{"position":[[445,4]]},"1642":{"position":[[363,2],[1322,2]]},"1796":{"position":[[248,4]]},"1832":{"position":[[426,3]]},"1834":{"position":[[401,3],[453,7]]}}}],["idjohndoe/myembeddedfil",{"_index":3129,"t":{"1498":{"position":[[149,24]]}}}],["module>/statik",{"_index":3135,"t":{"1500":{"position":[[214,15]]}}}],["mongo.databas",{"_index":1004,"t":{"1008":{"position":[[288,15]]}}}],["mongodb",{"_index":794,"t":{"876":{"position":[[72,7]]},"1004":{"position":[[2,7]]},"1010":{"position":[[0,7],[192,7]]}}}],["mongodb.new",{"_index":1006,"t":{"1012":{"position":[[171,13]]}}}],["mongodb.new(mongodb.config",{"_index":1007,"t":{"1012":{"position":[[222,27],[408,27]]}}}],["mongodb/mongo",{"_index":1003,"t":{"1004":{"position":[[31,13]]}}}],["mongodb://user:password@127.0.0.1:27017",{"_index":1011,"t":{"1012":{"position":[[451,42]]}}}],["monitor",{"_index":3387,"t":{"1570":{"position":[[0,7],[85,7],[101,7]]},"1576":{"position":[[120,8],[263,10]]}}}],["monitor.new",{"_index":3392,"t":{"1574":{"position":[[321,14]]}}}],["monitor.new(monitor.config{titl",{"_index":3394,"t":{"1574":{"position":[[488,33]]}}}],["month",{"_index":1450,"t":{"1180":{"position":[[788,5]]}}}],["more",{"_index":766,"t":{"874":{"position":[[246,4]]},"1136":{"position":[[8,4],[76,4]]},"1184":{"position":[[416,4]]},"1186":{"position":[[535,4]]},"1212":{"position":[[1512,4]]},"1220":{"position":[[4,4]]},"1223":{"position":[[1044,4]]},"1229":{"position":[[39,4]]},"1341":{"position":[[4812,4],[5056,4]]},"1454":{"position":[[46,4]]},"1534":{"position":[[1130,4]]},"1552":{"position":[[1399,4]]},"1562":{"position":[[725,4]]},"1630":{"position":[[140,4]]},"1680":{"position":[[113,4]]},"1682":{"position":[[146,4]]},"1686":{"position":[[139,4]]},"1690":{"position":[[1275,4]]},"1737":{"position":[[647,4],[857,4],[952,4],[1022,4]]},"1741":{"position":[[437,4]]},"1768":{"position":[[386,7]]},"1770":{"position":[[1453,7]]},"1774":{"position":[[218,4]]},"1776":{"position":[[275,4]]},"1780":{"position":[[473,7]]},"1788":{"position":[[453,7]]},"1792":{"position":[[465,7]]},"1796":{"position":[[532,7]]},"1802":{"position":[[350,7]]},"1828":{"position":[[356,7]]},"1830":{"position":[[1182,7]]},"1842":{"position":[[655,7]]},"1854":{"position":[[462,4]]}}}],["mount",{"_index":1824,"t":{"1227":{"position":[[8,5],[43,6]]},"1229":{"position":[[81,8],[435,8],[497,5],[536,8]]},"1341":{"position":[[3435,7]]},"1728":{"position":[[49,8],[71,5],[108,7],[201,9],[649,5],[728,5],[795,5],[848,5]]},"1739":{"position":[[509,6]]}}}],["mount(prefix",{"_index":1825,"t":{"1227":{"position":[[74,12]]}}}],["mountpath",{"_index":1830,"t":{"1229":{"position":[[4,9],[116,11],[467,10]]}}}],["move",{"_index":221,"t":{"771":{"position":[[255,6]]}}}],["ms",{"_index":3580,"t":{"1660":{"position":[[360,5],[1187,5]]},"1665":{"position":[[448,3],[524,3]]},"1667":{"position":[[74,3],[155,3]]},"1669":{"position":[[74,3],[154,3]]},"1671":{"position":[[74,3],[153,3]]},"1673":{"position":[[76,3],[156,3]]},"1675":{"position":[[178,3],[185,3],[193,3],[201,2],[540,2]]},"1682":{"position":[[659,2]]}}}],["msg",{"_index":740,"t":{"869":{"position":[[746,3],[782,4],[880,4],[913,5]]}}}],["mssql",{"_index":795,"t":{"876":{"position":[[80,5]]},"1018":{"position":[[2,5]]},"1024":{"position":[[0,5],[190,5]]}}}],["mssql.new",{"_index":1016,"t":{"1026":{"position":[[169,11]]}}}],["mssql.new(mssql.config",{"_index":1017,"t":{"1026":{"position":[[218,23],[444,23]]}}}],["mssqldb",{"_index":1013,"t":{"1018":{"position":[[42,8]]}}}],["mstimeout",{"_index":1971,"t":{"1265":{"position":[[296,9]]}}}],["mt",{"_index":739,"t":{"869":{"position":[[739,2],[778,3]]}}}],["multi",{"_index":2755,"t":{"1341":{"position":[[5491,5],[5519,5]]},"1596":{"position":[[870,5],[901,5]]}}}],["multipart",{"_index":2091,"t":{"1304":{"position":[[20,9],[185,9],[632,9],[833,9],[1201,9],[1248,9],[1478,9]]},"1341":{"position":[[1558,9],[1649,9]]},"1824":{"position":[[10,9],[294,9]]},"1872":{"position":[[27,9],[191,9]]},"1874":{"position":[[27,9],[271,9]]}}}],["multipart.filehead",{"_index":4164,"t":{"1786":{"position":[[138,23]]},"1824":{"position":[[549,23]]},"1872":{"position":[[87,22],[354,23]]},"1874":{"position":[[126,22],[434,23]]}}}],["multipart.form",{"_index":4249,"t":{"1824":{"position":[[207,17],[364,15]]},"1872":{"position":[[261,15]]},"1874":{"position":[[341,15]]}}}],["multipart/form",{"_index":2092,"t":{"1304":{"position":[[81,14]]},"1336":{"position":[[807,15]]},"1770":{"position":[[306,14]]}}}],["multipartform",{"_index":2090,"t":{"1304":{"position":[[0,13],[165,13],[580,14]]},"1786":{"position":[[0,13]]},"1824":{"position":[[64,16],[191,15]]}}}],["multipartform(arg",{"_index":2095,"t":{"1304":{"position":[[356,18]]}}}],["multipartform(nil",{"_index":2100,"t":{"1304":{"position":[[752,19],[1133,19],[1840,18]]}}}],["multipl",{"_index":1133,"t":{"1130":{"position":[[47,8]]},"1174":{"position":[[608,8]]},"1180":{"position":[[378,8]]},"1216":{"position":[[208,8]]},"1223":{"position":[[500,8]]},"1225":{"position":[[1625,9],[1742,8]]},"1278":{"position":[[38,8]]},"1284":{"position":[[68,8]]},"1304":{"position":[[889,8]]},"1341":{"position":[[4756,8]]},"1516":{"position":[[200,8]]},"1584":{"position":[[369,8]]},"1590":{"position":[[64,8]]},"1592":{"position":[[41,8]]},"1731":{"position":[[1625,9],[1742,8]]},"1737":{"position":[[1250,8],[1502,8]]},"1746":{"position":[[66,8]]},"1751":{"position":[[1625,9],[1742,8]]},"1772":{"position":[[259,8]]},"1900":{"position":[[166,8]]}}}],["mustach",{"_index":1145,"t":{"1130":{"position":[[287,8]]},"1136":{"position":[[118,8]]},"1140":{"position":[[146,8]]},"1196":{"position":[[0,8]]},"1198":{"position":[[494,12],[762,13],[776,12]]},"1686":{"position":[[117,8]]},"1746":{"position":[[130,8]]}}}],["mustache.new(\"./view",{"_index":1648,"t":{"1198":{"position":[[470,23]]}}}],["mustache.newfilesystem(http.dir(\"./view",{"_index":1653,"t":{"1198":{"position":[[719,42]]}}}],["my_database.db",{"_index":892,"t":{"928":{"position":[[252,17]]}}}],["mycustomapi",{"_index":199,"t":{"761":{"position":[[293,14]]}}}],["mycustomstorag",{"_index":3262,"t":{"1548":{"position":[[636,18]]}}}],["myembeddedfiles.http",{"_index":3130,"t":{"1498":{"position":[[268,21]]}}}],["myfil",{"_index":3937,"t":{"1737":{"position":[[628,6]]}}}],["mymiddlewar",{"_index":4409,"t":{"1870":{"position":[[405,14]]}}}],["myservic",{"_index":3393,"t":{"1574":{"position":[[443,10],[522,10]]}}}],["mysql",{"_index":796,"t":{"876":{"position":[[86,5]]},"884":{"position":[[205,5]]},"920":{"position":[[268,6]]},"1032":{"position":[[2,5]]},"1038":{"position":[[0,5],[190,5]]}}}],["mysql.new",{"_index":1025,"t":{"1040":{"position":[[169,11]]}}}],["mysql.new(mysql.config",{"_index":1026,"t":{"1040":{"position":[[218,23],[424,23],[691,23]]}}}],["n",{"_index":1286,"t":{"1156":{"position":[[128,5]]},"1716":{"position":[[615,5]]},"1902":{"position":[[74,2]]},"1904":{"position":[[99,2]]},"1906":{"position":[[76,2]]}}}],["name",{"_index":167,"t":{"751":{"position":[[658,7]]},"759":{"position":[[122,4]]},"805":{"position":[[697,7],[1251,4],[1316,5]]},"809":{"position":[[1227,7],[1817,4],[1882,5]]},"827":{"position":[[136,7]]},"835":{"position":[[979,4]]},"839":{"position":[[917,4],[988,5],[994,6]]},"888":{"position":[[29,4],[335,4],[405,4]]},"902":{"position":[[40,5],[74,5]]},"916":{"position":[[33,4]]},"930":{"position":[[150,4]]},"944":{"position":[[251,4]]},"958":{"position":[[314,4]]},"1014":{"position":[[170,4],[470,4],[540,4]]},"1028":{"position":[[212,4],[511,4],[574,4],[639,4]]},"1042":{"position":[[290,4],[589,4],[654,4]]},"1056":{"position":[[33,4]]},"1070":{"position":[[343,4],[642,4],[707,4]]},"1082":{"position":[[488,6]]},"1084":{"position":[[29,4],[848,4]]},"1112":{"position":[[76,4]]},"1126":{"position":[[33,4],[98,4]]},"1134":{"position":[[891,4],[1260,4]]},"1162":{"position":[[315,4]]},"1174":{"position":[[0,6]]},"1176":{"position":[[319,5],[366,5],[428,4]]},"1178":{"position":[[880,4]]},"1180":{"position":[[305,4]]},"1182":{"position":[[324,7],[332,9],[378,5],[403,4],[443,4],[874,7],[882,9],[995,4],[1329,4],[1376,4],[1427,4],[1746,4],[1903,9]]},"1184":{"position":[[365,5],[465,5],[579,4]]},"1186":{"position":[[149,5]]},"1188":{"position":[[363,5],[787,4],[858,7],[990,4],[1307,6],[1332,5],[1367,5],[1447,4],[1536,4],[1746,4]]},"1190":{"position":[[2319,5]]},"1218":{"position":[[251,5]]},"1223":{"position":[[306,5],[1857,4]]},"1233":{"position":[[142,4],[301,6],[368,6]]},"1243":{"position":[[24,4],[571,7],[638,7],[707,7],[787,7],[850,7],[916,7],[1003,7],[1095,7]]},"1245":{"position":[[30,5],[356,7]]},"1247":{"position":[[443,7]]},"1304":{"position":[[1087,6],[1325,4],[1350,4],[1370,4],[1375,4]]},"1312":{"position":[[93,5]]},"1339":{"position":[[30,5]]},"1341":{"position":[[329,4],[848,4],[919,5],[1298,5],[2531,4]]},"1349":{"position":[[0,4]]},"1410":{"position":[[570,4]]},"1430":{"position":[[105,6]]},"1434":{"position":[[940,5]]},"1440":{"position":[[106,5]]},"1526":{"position":[[402,4]]},"1640":{"position":[[466,4],[864,6]]},"1642":{"position":[[1354,4]]},"1682":{"position":[[444,6]]},"1716":{"position":[[57,7],[150,6],[889,5],[919,5]]},"1720":{"position":[[62,7],[160,6]]},"1735":{"position":[[62,5],[75,5],[254,4],[611,5],[3028,6],[3057,7]]},"1744":{"position":[[591,4]]},"1749":{"position":[[427,4]]},"1756":{"position":[[245,9]]},"1770":{"position":[[461,5],[526,4]]},"1772":{"position":[[221,5],[279,6],[744,5],[938,5]]},"1778":{"position":[[79,4]]},"1786":{"position":[[40,5]]},"1788":{"position":[[36,5],[251,7]]},"1800":{"position":[[18,5]]},"1812":{"position":[[220,4],[331,5],[420,9],[476,7],[550,9]]},"1814":{"position":[[151,4],[203,5],[338,4],[445,5]]},"1850":{"position":[[311,5],[376,4]]},"1856":{"position":[[510,7],[687,7]]},"1864":{"position":[[321,5],[386,4],[791,6]]},"1870":{"position":[[258,6]]},"1894":{"position":[[51,4]]},"1910":{"position":[[255,4],[387,5]]}}}],["name\":\"sam",{"_index":1409,"t":{"1178":{"position":[[1004,14]]}}}],["name(\"addus",{"_index":3821,"t":{"1716":{"position":[[719,18]]}}}],["name(\"destroyus",{"_index":3823,"t":{"1716":{"position":[[829,22]]}}}],["name(\"hom",{"_index":4188,"t":{"1800":{"position":[[257,15]]}}}],["name(\"index",{"_index":1925,"t":{"1247":{"position":[[311,16]]},"1716":{"position":[[420,16]]}}}],["name(\"us",{"_index":4377,"t":{"1856":{"position":[[890,15]]}}}],["name(\"user.show",{"_index":4191,"t":{"1800":{"position":[[357,20]]}}}],["name(nam",{"_index":1901,"t":{"1243":{"position":[[80,9]]}}}],["name1",{"_index":2108,"t":{"1304":{"position":[[1118,7],[1723,7]]}}}],["name2",{"_index":1469,"t":{"1182":{"position":[[551,6]]},"1304":{"position":[[1787,7]]}}}],["namegramefiller",{"_index":1580,"t":{"1188":{"position":[[2695,9]]}}}],["p>hello",{"_index":1341,"t":{"1168":{"position":[[713,9]]},"1784":{"position":[[409,9]]}}}],["p>here",{"_index":1544,"t":{"1188":{"position":[[308,7]]}}}],["p>some",{"_index":1592,"t":{"1190":{"position":[[516,7],[1894,7]]}}}],["p>to",{"_index":1595,"t":{"1190":{"position":[[614,5],[1992,5]]}}}],["packag",{"_index":64,"t":{"737":{"position":[[0,7]]},"739":{"position":[[0,7]]},"741":{"position":[[0,7]]},"751":{"position":[[0,7]]},"761":{"position":[[0,7]]},"763":{"position":[[0,7]]},"773":{"position":[[606,7]]},"785":{"position":[[0,7]]},"795":{"position":[[0,7]]},"805":{"position":[[0,7]]},"809":{"position":[[0,7]]},"815":{"position":[[671,7]]},"827":{"position":[[242,7],[379,7]]},"839":{"position":[[0,7]]},"859":{"position":[[22,7]]},"869":{"position":[[0,7]]},"886":{"position":[[19,8]]},"900":{"position":[[19,8]]},"914":{"position":[[19,8]]},"928":{"position":[[19,8]]},"942":{"position":[[19,8]]},"956":{"position":[[19,8]]},"970":{"position":[[19,8]]},"984":{"position":[[19,8]]},"998":{"position":[[19,8]]},"1012":{"position":[[19,8]]},"1026":{"position":[[19,8]]},"1040":{"position":[[19,8]]},"1054":{"position":[[19,8]]},"1068":{"position":[[19,8]]},"1082":{"position":[[19,8]]},"1096":{"position":[[19,8]]},"1110":{"position":[[19,8]]},"1124":{"position":[[19,8]]},"1130":{"position":[[5,7]]},"1134":{"position":[[0,7]]},"1138":{"position":[[185,7],[520,7],[876,7],[1240,7],[1351,7]]},"1144":{"position":[[256,7]]},"1148":{"position":[[251,7]]},"1152":{"position":[[333,7]]},"1154":{"position":[[461,7]]},"1160":{"position":[[291,7]]},"1164":{"position":[[312,7]]},"1166":{"position":[[0,7]]},"1168":{"position":[[0,7]]},"1170":{"position":[[42,8],[89,7],[170,7],[269,8]]},"1178":{"position":[[40,7],[556,7],[1079,7]]},"1184":{"position":[[13,7]]},"1186":{"position":[[31,7]]},"1188":{"position":[[1893,7]]},"1190":{"position":[[1743,8]]},"1194":{"position":[[308,7]]},"1198":{"position":[[321,7]]},"1202":{"position":[[268,7]]},"1206":{"position":[[287,7]]},"1214":{"position":[[81,7]]},"1225":{"position":[[1206,8]]},"1352":{"position":[[0,7]]},"1354":{"position":[[0,7]]},"1356":{"position":[[0,7]]},"1358":{"position":[[0,7]]},"1360":{"position":[[0,7]]},"1366":{"position":[[22,7]]},"1376":{"position":[[22,7]]},"1386":{"position":[[22,7]]},"1398":{"position":[[22,7]]},"1404":{"position":[[695,7]]},"1408":{"position":[[22,7]]},"1416":{"position":[[41,8]]},"1422":{"position":[[22,7]]},"1434":{"position":[[22,7]]},"1446":{"position":[[22,7]]},"1458":{"position":[[22,7]]},"1464":{"position":[[109,7]]},"1468":{"position":[[22,7]]},"1478":{"position":[[22,7]]},"1488":{"position":[[22,7]]},"1490":{"position":[[90,7]]},"1492":{"position":[[35,7]]},"1494":{"position":[[35,7]]},"1496":{"position":[[38,7]]},"1498":{"position":[[35,7]]},"1500":{"position":[[33,7]]},"1510":{"position":[[0,7]]},"1520":{"position":[[22,7]]},"1534":{"position":[[0,7]]},"1536":{"position":[[139,7]]},"1538":{"position":[[0,7]]},"1544":{"position":[[252,7]]},"1548":{"position":[[22,7]]},"1556":{"position":[[41,8]]},"1562":{"position":[[22,7]]},"1574":{"position":[[22,7]]},"1580":{"position":[[142,7]]},"1584":{"position":[[22,7]]},"1594":{"position":[[22,7]]},"1604":{"position":[[22,7]]},"1614":{"position":[[0,7]]},"1624":{"position":[[22,7]]},"1634":{"position":[[0,7]]},"1636":{"position":[[68,7]]},"1640":{"position":[[22,7]]},"1648":{"position":[[41,8]]},"1654":{"position":[[22,7]]},"1660":{"position":[[22,7]]},"1690":{"position":[[57,7]]},"1693":{"position":[[472,7]]},"1700":{"position":[[384,7]]},"1716":{"position":[[251,7]]},"1728":{"position":[[288,7]]},"1731":{"position":[[1206,8]]},"1746":{"position":[[31,7],[168,7]]},"1749":{"position":[[42,7]]},"1751":{"position":[[1206,8]]},"1812":{"position":[[65,8]]},"1910":{"position":[[72,8]]}}}],["packr",{"_index":1204,"t":{"1138":{"position":[[458,6],[789,5]]}}}],["packr.new(\"asset",{"_index":3126,"t":{"1494":{"position":[[265,17]]}}}],["page",{"_index":1730,"t":{"1214":{"position":[[355,5]]},"1574":{"position":[[462,5],[541,8]]},"1576":{"position":[[77,4]]},"1682":{"position":[[313,4]]},"1684":{"position":[[320,4]]},"1697":{"position":[[415,4],[494,5],[917,4]]},"1749":{"position":[[123,4]]},"1800":{"position":[[250,6]]},"1858":{"position":[[375,6]]}}}],["pair",{"_index":473,"t":{"809":{"position":[[309,4],[498,4]]}}}],["panic",{"_index":3492,"t":{"1600":{"position":[[48,6]]},"1604":{"position":[[296,5]]},"1693":{"position":[[335,6],[372,5],[689,5]]}}}],["panic(\"i",{"_index":288,"t":{"773":{"position":[[1556,8]]}}}],["panic(\"i'm",{"_index":3497,"t":{"1604":{"position":[[375,10]]}}}],["panic(\"thi",{"_index":3756,"t":{"1693":{"position":[[677,11]]}}}],["panic(err",{"_index":1564,"t":{"1188":{"position":[[2078,10]]},"1274":{"position":[[183,10]]},"1500":{"position":[[318,10]]},"1640":{"position":[[440,10],[661,10],[805,10]]}}}],["panick",{"_index":275,"t":{"773":{"position":[[1071,8]]},"775":{"position":[[286,8]]}}}],["paragraph:@127.0.0.1:6379/:@localhost:6379/://::a",{"_index":1394,"t":{"1178":{"position":[[373,20]]}}}],["template.html(html",{"_index":1427,"t":{"1178":{"position":[[1606,19]]}}}],["template.must(template.parsefiles(\"templatenam",{"_index":1452,"t":{"1180":{"position":[[833,50]]}}}],["template.must(template.parseglob(\"*.gohtml",{"_index":1508,"t":{"1184":{"position":[[628,45]]}}}],["template.new(\"hello.gohtml\").funcs(template.funcmap",{"_index":1425,"t":{"1178":{"position":[[1500,52]]},"1190":{"position":[[2526,52],[3674,52]]}}}],["template.parse(filenam",{"_index":1370,"t":{"1174":{"position":[[473,24]]}}}],["template.parsefiles(fil",{"_index":1551,"t":{"1188":{"position":[[1240,29]]}}}],["template.parsefiles(filenam",{"_index":1373,"t":{"1174":{"position":[[628,30]]}}}],["template.parseglob(layoutdir",{"_index":1563,"t":{"1188":{"position":[[2018,28]]}}}],["template.parseglob(pattern",{"_index":1374,"t":{"1174":{"position":[[711,27]]},"1188":{"position":[[1140,26]]}}}],["template.templ",{"_index":1451,"t":{"1180":{"position":[[808,18]]},"1188":{"position":[[1954,18]]}}}],["templatedata",{"_index":165,"t":{"751":{"position":[[625,13]]}}}],["templatenam",{"_index":1454,"t":{"1180":{"position":[[922,15]]},"1188":{"position":[[1499,16],[1620,15]]}}}],["templatesgo",{"_index":1573,"t":{"1188":{"position":[[2504,9]]}}}],["title>maintitle:@tcp(:)/: that is used \"header:Authorization\" AuthScheme string AuthScheme to be used in the Authorization header. The default value (\"Bearer\") will only be used in conjuction with the default TokenLookup value. \"Bearer\" KeyFunc func() jwt.Keyfunc KeyFunc defines a user-defined function that supplies the public key for a token validation. jwtKeyFunc JWKSetURLs []string A slice of unique JSON Web Key (JWK) Set URLs to used to parse JWTs. nil","s":"Config","u":"/contrib/jwt/","h":"#config","p":796},{"i":805,"t":"package main import ( \"time\" \"github.com/gofiber/fiber/v2\" jwtware \"github.com/gofiber/contrib/jwt\" \"github.com/golang-jwt/jwt/v5\" ) func main() { app := fiber.New() // Login route app.Post(\"/login\", login) // Unauthenticated route app.Get(\"/\", accessible) // JWT Middleware app.Use(jwtware.New(jwtware.Config{ SigningKey: jwtware.SigningKey{Key: []byte(\"secret\")}, })) // Restricted Routes app.Get(\"/restricted\", restricted) app.Listen(\":3000\") } func login(c *fiber.Ctx) error { user := c.FormValue(\"user\") pass := c.FormValue(\"pass\") // Throws Unauthorized error if user != \"john\" || pass != \"doe\" { return c.SendStatus(fiber.StatusUnauthorized) } // Create the Claims claims := jwt.MapClaims{ \"name\": \"John Doe\", \"admin\": true, \"exp\": time.Now().Add(time.Hour * 72).Unix(), } // Create token token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) // Generate encoded token and send it as response. t, err := token.SignedString([]byte(\"secret\")) if err != nil { return c.SendStatus(fiber.StatusInternalServerError) } return c.JSON(fiber.Map{\"token\": t}) } func accessible(c *fiber.Ctx) error { return c.SendString(\"Accessible\") } func restricted(c *fiber.Ctx) error { user := c.Locals(\"user\").(*jwt.Token) claims := user.Claims.(jwt.MapClaims) name := claims[\"name\"].(string) return c.SendString(\"Welcome \" + name) }","s":"HS256 Example","u":"/contrib/jwt/","h":"#hs256-example","p":796},{"i":807,"t":"Login using username and password to retrieve a token. curl --data \"user=john&pass=doe\" http://localhost:3000/login Response { \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY\" } Request a restricted resource using the token in Authorization request header. curl localhost:3000/restricted -H \"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjE5NTcxMzZ9.RB3arc4-OyzASAaUhC2W3ReWaXAt_z2Fd3BN4aWTgEY\" Response Welcome John Doe","s":"HS256 Test","u":"/contrib/jwt/","h":"#hs256-test","p":796},{"i":809,"t":"package main import ( \"crypto/rand\" \"crypto/rsa\" \"log\" \"time\" \"github.com/gofiber/fiber/v2\" \"github.com/golang-jwt/jwt/v5\" jwtware \"github.com/gofiber/contrib/jwt\" ) var ( // Obviously, this is just a test example. Do not do this in production. // In production, you would have the private key and public key pair generated // in advance. NEVER add a private key to any GitHub repo. privateKey *rsa.PrivateKey ) func main() { app := fiber.New() // Just as a demo, generate a new private/public key pair on each run. See note above. rng := rand.Reader var err error privateKey, err = rsa.GenerateKey(rng, 2048) if err != nil { log.Fatalf(\"rsa.GenerateKey: %v\", err) } // Login route app.Post(\"/login\", login) // Unauthenticated route app.Get(\"/\", accessible) // JWT Middleware app.Use(jwtware.New(jwtware.Config{ SigningKey: jwtware.SigningKey{ JWTAlg: jwtware.RS256, Key: privateKey.Public(), }, })) // Restricted Routes app.Get(\"/restricted\", restricted) app.Listen(\":3000\") } func login(c *fiber.Ctx) error { user := c.FormValue(\"user\") pass := c.FormValue(\"pass\") // Throws Unauthorized error if user != \"john\" || pass != \"doe\" { return c.SendStatus(fiber.StatusUnauthorized) } // Create the Claims claims := jwt.MapClaims{ \"name\": \"John Doe\", \"admin\": true, \"exp\": time.Now().Add(time.Hour * 72).Unix(), } // Create token token := jwt.NewWithClaims(jwt.SigningMethodRS256, claims) // Generate encoded token and send it as response. t, err := token.SignedString(privateKey) if err != nil { log.Printf(\"token.SignedString: %v\", err) return c.SendStatus(fiber.StatusInternalServerError) } return c.JSON(fiber.Map{\"token\": t}) } func accessible(c *fiber.Ctx) error { return c.SendString(\"Accessible\") } func restricted(c *fiber.Ctx) error { user := c.Locals(\"user\").(*jwt.Token) claims := user.Claims.(jwt.MapClaims) name := claims[\"name\"].(string) return c.SendString(\"Welcome \" + name) }","s":"RS256 Example","u":"/contrib/jwt/","h":"#rs256-example","p":796},{"i":811,"t":"The RS256 is actually identical to the HS256 test above.","s":"RS256 Test","u":"/contrib/jwt/","h":"#rs256-test","p":796},{"i":813,"t":"The tests are identical to basic JWT tests above, with exception that JWKSetURLs to valid public keys collection in JSON Web Key (JWK) Set format should be supplied. See RFC 7517.","s":"JWK Set Test","u":"/contrib/jwt/","h":"#jwk-set-test","p":796},{"i":815,"t":"KeyFunc defines a user-defined function that supplies the public key for a token validation. The function shall take care of verifying the signing algorithm and selecting the proper key. A user-defined KeyFunc can be useful if tokens are issued by an external party. When a user-defined KeyFunc is provided, SigningKey, SigningKeys, and SigningMethod are ignored. This is one of the three options to provide a token validation key. The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey. Required if neither SigningKeys nor SigningKey is provided. Default to an internal implementation verifying the signing algorithm and selecting the proper key. package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" jwtware \"github.com/gofiber/contrib/jwt\" \"github.com/golang-jwt/jwt/v5\" ) func main() { app := fiber.New() app.Use(jwtware.New(jwtware.Config{ KeyFunc: customKeyFunc(), })) app.Get(\"/ok\", func(c *fiber.Ctx) error { return c.SendString(\"OK\") }) } func customKeyFunc() jwt.Keyfunc { return func(t *jwt.Token) (interface{}, error) { // Always check the signing method if t.Method.Alg() != jwtware.HS256 { return nil, fmt.Errorf(\"Unexpected jwt signing method=%v\", t.Header[\"alg\"]) } // TODO custom implementation of loading signing key like from a database signingKey := \"secret\" return []byte(signingKey), nil } }","s":"Custom KeyFunc example","u":"/contrib/jwt/","h":"#custom-keyfunc-example","p":796},{"i":817,"t":"Open Policy Agent support for Fiber. Note: Requires Go 1.18 and above","s":"Opafiber","u":"/contrib/opafiber/","h":"","p":816},{"i":819,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/opafiber","s":"Install","u":"/contrib/opafiber/","h":"#install","p":816},{"i":821,"t":"opafiber.New(config opafiber.Config) fiber.Handler","s":"Signature","u":"/contrib/opafiber/","h":"#signature","p":816},{"i":823,"t":"Property Type Description Default RegoQuery string Required - Rego query - RegoPolicy io.Reader Required - Rego policy - IncludeQueryString bool Include query string as input to rego policy false DeniedStatusCode int Http status code to return when policy denies request 400 DeniedResponseMessage string Http response body text to return when policy denies request \"\" IncludeHeaders []string Include headers as input to rego policy - InputCreationMethod InputCreationFunc Use your own function to provide input for OPA func defaultInput(ctx *fiber.Ctx) (map[string]interface{}, error)","s":"Config","u":"/contrib/opafiber/","h":"#config","p":816},{"i":825,"t":"type InputCreationFunc func(c *fiber.Ctx) (map[string]interface{}, error)","s":"Types","u":"/contrib/opafiber/","h":"#types","p":816},{"i":827,"t":"OPA Fiber middleware sends the following example data to the policy engine as input: { \"method\": \"GET\", \"path\": \"/somePath\", \"query\": { \"name\": [\"John Doe\"] }, \"headers\": { \"Accept\": \"application/json\", \"Content-Type\": \"application/json\" } } package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/opafiber\" ) func main() { app := fiber.New() module := ` package example.authz default allow := false allow { input.method == \"GET\" } ` cfg := opafiber.Config{ RegoQuery: \"data.example.authz.allow\", RegoPolicy: bytes.NewBufferString(module), IncludeQueryString: true, DeniedStatusCode: fiber.StatusForbidden, DeniedResponseMessage: \"status forbidden\", IncludeHeaders: []string{\"Authorization\"}, InputCreationMethod: func (ctx *fiber.Ctx) (map[string]interface{}, error) { return map[string]interface{}{ \"method\": ctx.Method(), \"path\": ctx.Path(), }, nil }, } app.Use(opafiber.New(cfg)) app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendStatus(200) }) app.Listen(\":8080\") }","s":"Usage","u":"/contrib/opafiber/","h":"#usage","p":816},{"i":829,"t":"An HTTP server using gofiber fiber and instrumentation. The server has a /users/:id endpoint. The server generates span information to stdout. These instructions expect you have docker-compose installed. Bring up the fiber-server and fiber-client services to run the example: docker-compose up --detach fiber-server fiber-client The fiber-client service sends just one HTTP request to fiber-server and then exits. View the span generated by fiber-server in the logs: docker-compose logs fiber-server Shut down the services when you are finished with the example: docker-compose down","s":"Example","u":"/contrib/otelfiber/example/","h":"","p":828},{"i":831,"t":"PASETO returns a Web Token (PASETO) auth middleware. For valid token, it sets the payload data in Ctx.Locals and calls next handler. For invalid token, it returns \"401 - Unauthorized\" error. For missing token, it returns \"400 - BadRequest\" error.","s":"Paseto","u":"/contrib/paseto/","h":"","p":830},{"i":833,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/paseto go get -u github.com/o1egl/paseto","s":"Install","u":"/contrib/paseto/","h":"#install","p":830},{"i":835,"t":"pasetoware.New(config ...pasetoware.Config) func(*fiber.Ctx) error","s":"Signature","u":"/contrib/paseto/","h":"#signature","p":830},{"i":837,"t":"Property Type Description Default Next func(*Ctx) bool Defines a function to skip middleware nil SuccessHandler func(*fiber.Ctx) error SuccessHandler defines a function which is executed for a valid token. c.Next() ErrorHandler func(*fiber.Ctx, error) error ErrorHandler defines a function which is executed for an invalid token. 401 Invalid or expired PASETO Validate PayloadValidator Defines a function to validate if payload is valid. Optional. In case payload used is created using CreateToken function. If token is created using another function, this function must be provided. nil SymmetricKey []byte Secret key to encrypt token. If present the middleware will generate local tokens. nil PrivateKey ed25519.PrivateKey Secret key to sign the tokens. If present (along with its PublicKey) the middleware will generate public tokens. nil PublicKey crypto.PublicKey Public key to verify the tokens. If present (along with PrivateKey) the middleware will generate public tokens. nil ContextKey string Context key to store user information from the token into context. \"auth-token\" TokenLookup [2]string TokenLookup is a string slice with size 2, that is used to extract token from the request [\"header\",\"Authorization\"]","s":"Config","u":"/contrib/paseto/","h":"#config","p":830},{"i":839,"t":"When using this middleware, and creating a token for authentication, you can use the function pasetoware.CreateToken, that will create a token, encrypt or sign it and returns the PASETO token. Passing a SymmetricKey in the Config results in a local (encrypted) token, while passing a PublicKey and PrivateKey results in a public (signed) token. In case you want to use your own data structure, is needed to provide the Validate function in paseware.Config, that will return the data stored in the token, and a error.","s":"Instructions","u":"/contrib/paseto/","h":"#instructions","p":830},{"i":841,"t":"Swagger middleware for Fiber. The middleware handles Swagger UI.","s":"Swagger","u":"/contrib/swagger/","h":"","p":840},{"i":843,"t":"Signatures Examples","s":"Table of Contents","u":"/contrib/swagger/","h":"#table-of-contents","p":840},{"i":845,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/contrib/swagger/","h":"#signatures","p":840},{"i":847,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/swagger\" ) Then create a Fiber app with app := fiber.New(). After you initiate your Fiber app, you can use the following possibilities:","s":"Examples","u":"/contrib/swagger/","h":"#examples","p":840},{"i":849,"t":"app.Use(swagger.New(cfg))","s":"Default Config","u":"/contrib/swagger/","h":"#default-config","p":840},{"i":851,"t":"cfg := swagger.Config{ BasePath: \"/\", //swagger ui base path FilePath: \"./docs/swagger.json\", } app.Use(swagger.New(cfg))","s":"Custom Config","u":"/contrib/swagger/","h":"#custom-config","p":840},{"i":853,"t":"Based on Fasthttp WebSocket for Fiber with available *fiber.Ctx methods like Locals, Params, Query and Cookies.","s":"Websocket","u":"/contrib/websocket/","h":"","p":852},{"i":855,"t":"go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/contrib/websocket","s":"Install","u":"/contrib/websocket/","h":"#install","p":852},{"i":857,"t":"package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/websocket\" ) func main() { app := fiber.New() app.Use(\"/ws\", func(c *fiber.Ctx) error { // IsWebSocketUpgrade returns true if the client // requested upgrade to the WebSocket protocol. if websocket.IsWebSocketUpgrade(c) { c.Locals(\"allowed\", true) return c.Next() } return fiber.ErrUpgradeRequired }) app.Get(\"/ws/:id\", websocket.New(func(c *websocket.Conn) { // c.Locals is added to the *websocket.Conn log.Println(c.Locals(\"allowed\")) // true log.Println(c.Params(\"id\")) // 123 log.Println(c.Query(\"v\")) // 1.0 log.Println(c.Cookies(\"session\")) // \"\" // websocket.Conn bindings https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg-index var ( mt int msg []byte err error ) for { if mt, msg, err = c.ReadMessage(); err != nil { log.Println(\"read:\", err) break } log.Printf(\"recv: %s\", msg) if err = c.WriteMessage(mt, msg); err != nil { log.Println(\"write:\", err) break } } })) log.Fatal(app.Listen(\":3000\")) // Access the websocket server: ws://localhost:3000/ws/123?v=1.0 // https://www.websocket.org/echo.html }","s":"Example","u":"/contrib/websocket/","h":"#example","p":852},{"i":859,"t":"If you get the error websocket: bad handshake when using the cache middleware, please use config.Next to skip websocket path. app := fiber.New() app.Use(cache.New(cache.Config{ Next: func(c *fiber.Ctx) bool { return strings.Contains(c.Route().Path, \"/ws\") }, })) app.Get(\"/ws/:id\", websocket.New(func(c *websocket.Conn) {}))","s":"Note with cache middleware","u":"/contrib/websocket/","h":"#note-with-cache-middleware","p":852},{"i":862,"t":"Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares. // Storage interface for communicating with different database/key-value // providers. Visit https://github.com/gofiber/storage for more info. type Storage interface { // Get gets the value for the given key. // `nil, nil` is returned when the key does not exist Get(key string) ([]byte, error) // Set stores the given value for the given key along // with an expiration value, 0 means no expiration. // Empty key or value will be ignored without an error. Set(key string, val []byte, exp time.Duration) error // Delete deletes the value for the given key. // It returns no error if the storage does not contain the key, Delete(key string) error // Reset resets the storage and delete all keys. Reset() error // Close closes the storage and will stop any running garbage // collectors and open connections. Close() error }","s":"📦 Storage","u":"/storage/","h":"","p":860},{"i":864,"t":"ArangoDB AzureBlob Badger Bbolt Couchbase DynamoDB Etcd Memcache Memory MongoDB MSSQL MySQL Pebble Postgres Redis S3 SQLite3","s":"📑 Storage Implementations","u":"/storage/","h":"#-storage-implementations","p":860},{"i":866,"t":"A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.","s":"ArangoDB","u":"/storage/arangodb/","h":"","p":865},{"i":868,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/arangodb/","h":"#table-of-contents","p":865},{"i":870,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() driver.Client","s":"Signatures","u":"/storage/arangodb/","h":"#signatures","p":865},{"i":872,"t":"ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/arangodb/","h":"#installation","p":865},{"i":874,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/arangodb/","h":"#examples","p":865},{"i":876,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/arangodb/","h":"#config","p":865},{"i":878,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/arangodb/","h":"#default-config","p":865},{"i":880,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/azureblob/","h":"","p":879},{"i":882,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/azureblob/","h":"#table-of-contents","p":879},{"i":884,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/azureblob/","h":"#signatures","p":879},{"i":886,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/azureblob/","h":"#installation","p":879},{"i":888,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/azureblob/","h":"#examples","p":879},{"i":890,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/azureblob/","h":"#config","p":879},{"i":892,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/azureblob/","h":"#default-config","p":879},{"i":894,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/badger/","h":"","p":893},{"i":896,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/badger/","h":"#table-of-contents","p":893},{"i":898,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/badger/","h":"#signatures","p":893},{"i":900,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/badger/","h":"#installation","p":893},{"i":902,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/badger/","h":"#examples","p":893},{"i":904,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/badger/","h":"#config","p":893},{"i":906,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/badger/","h":"#default-config","p":893},{"i":908,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/bbolt/","h":"","p":907},{"i":910,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/bbolt/","h":"#table-of-contents","p":907},{"i":912,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/bbolt/","h":"#signatures","p":907},{"i":914,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/bbolt/","h":"#installation","p":907},{"i":916,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/bbolt/","h":"#examples","p":907},{"i":918,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/bbolt/","h":"#config","p":907},{"i":920,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/bbolt/","h":"#default-config","p":907},{"i":922,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/couchbase/","h":"","p":921},{"i":924,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/couchbase/","h":"#table-of-contents","p":921},{"i":926,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/couchbase/","h":"#signatures","p":921},{"i":928,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/couchbase/","h":"#installation","p":921},{"i":930,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/couchbase/","h":"#examples","p":921},{"i":932,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/couchbase/","h":"#config","p":921},{"i":934,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/couchbase/","h":"#default-config","p":921},{"i":936,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/dynamodb/","h":"","p":935},{"i":938,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/dynamodb/","h":"#table-of-contents","p":935},{"i":940,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/dynamodb/","h":"#signatures","p":935},{"i":942,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/dynamodb/","h":"#installation","p":935},{"i":944,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/dynamodb/","h":"#examples","p":935},{"i":946,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/dynamodb/","h":"#config","p":935},{"i":948,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/dynamodb/","h":"#default-config","p":935},{"i":950,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/etcd/","h":"","p":949},{"i":952,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd/","h":"#table-of-contents","p":949},{"i":954,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/etcd/","h":"#signatures","p":949},{"i":956,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/etcd/","h":"#installation","p":949},{"i":958,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/etcd/","h":"#examples","p":949},{"i":960,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/etcd/","h":"#config","p":949},{"i":962,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/etcd/","h":"#default-config","p":949},{"i":964,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/memcache/","h":"","p":963},{"i":966,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache/","h":"#table-of-contents","p":963},{"i":968,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/memcache/","h":"#signatures","p":963},{"i":970,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/memcache/","h":"#installation","p":963},{"i":972,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/memcache/","h":"#examples","p":963},{"i":974,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/memcache/","h":"#config","p":963},{"i":976,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/memcache/","h":"#default-config","p":963},{"i":978,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/memory/","h":"","p":977},{"i":980,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memory/","h":"#table-of-contents","p":977},{"i":982,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/memory/","h":"#signatures","p":977},{"i":984,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/memory/","h":"#installation","p":977},{"i":986,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/memory/","h":"#examples","p":977},{"i":988,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/memory/","h":"#config","p":977},{"i":990,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/memory/","h":"#default-config","p":977},{"i":992,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/mongodb/","h":"","p":991},{"i":994,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mongodb/","h":"#table-of-contents","p":991},{"i":996,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/mongodb/","h":"#signatures","p":991},{"i":998,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/mongodb/","h":"#installation","p":991},{"i":1000,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/mongodb/","h":"#examples","p":991},{"i":1002,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/mongodb/","h":"#config","p":991},{"i":1004,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/mongodb/","h":"#default-config","p":991},{"i":1006,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/mssql/","h":"","p":1005},{"i":1008,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mssql/","h":"#table-of-contents","p":1005},{"i":1010,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/mssql/","h":"#signatures","p":1005},{"i":1012,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/mssql/","h":"#installation","p":1005},{"i":1014,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mssql/","h":"#examples","p":1005},{"i":1016,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/mssql/","h":"#config","p":1005},{"i":1018,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/mssql/","h":"#default-config","p":1005},{"i":1020,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/mysql/","h":"","p":1019},{"i":1022,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql/","h":"#table-of-contents","p":1019},{"i":1024,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/mysql/","h":"#signatures","p":1019},{"i":1026,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/mysql/","h":"#installation","p":1019},{"i":1028,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql/","h":"#examples","p":1019},{"i":1030,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/mysql/","h":"#config","p":1019},{"i":1032,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/mysql/","h":"#default-config","p":1019},{"i":1034,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/pebble/","h":"","p":1033},{"i":1036,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/pebble/","h":"#table-of-contents","p":1033},{"i":1038,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/pebble/","h":"#signatures","p":1033},{"i":1040,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/pebble/","h":"#installation","p":1033},{"i":1042,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/pebble/","h":"#examples","p":1033},{"i":1044,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/pebble/","h":"#config","p":1033},{"i":1046,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/pebble/","h":"#default-config","p":1033},{"i":1048,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/postgres/","h":"","p":1047},{"i":1050,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/postgres/","h":"#table-of-contents","p":1047},{"i":1052,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/postgres/","h":"#signatures","p":1047},{"i":1054,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/postgres/","h":"#installation","p":1047},{"i":1056,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/postgres/","h":"#examples","p":1047},{"i":1058,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/postgres/","h":"#config","p":1047},{"i":1060,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/postgres/","h":"#default-config","p":1047},{"i":1062,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/redis/","h":"","p":1061},{"i":1064,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/redis/","h":"#table-of-contents","p":1061},{"i":1066,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/redis/","h":"#signatures","p":1061},{"i":1068,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/redis/","h":"#installation","p":1061},{"i":1070,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/redis/","h":"#examples","p":1061},{"i":1072,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/redis/","h":"#config","p":1061},{"i":1074,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/redis/","h":"#default-config","p":1061},{"i":1076,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/ristretto/","h":"","p":1075},{"i":1078,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto/","h":"#table-of-contents","p":1075},{"i":1080,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/ristretto/","h":"#signatures","p":1075},{"i":1082,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/ristretto/","h":"#installation","p":1075},{"i":1084,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/ristretto/","h":"#examples","p":1075},{"i":1086,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/ristretto/","h":"#config","p":1075},{"i":1088,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/ristretto/","h":"#default-config","p":1075},{"i":1090,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/s3/","h":"","p":1089},{"i":1092,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/s3/","h":"#table-of-contents","p":1089},{"i":1094,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/s3/","h":"#signatures","p":1089},{"i":1096,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/s3/","h":"#installation","p":1089},{"i":1098,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/s3/","h":"#examples","p":1089},{"i":1100,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/s3/","h":"#config","p":1089},{"i":1102,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/s3/","h":"#default-config","p":1089},{"i":1104,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/sqlite3/","h":"","p":1103},{"i":1106,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3/","h":"#table-of-contents","p":1103},{"i":1108,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/sqlite3/","h":"#signatures","p":1103},{"i":1110,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/sqlite3/","h":"#installation","p":1103},{"i":1112,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/sqlite3/","h":"#examples","p":1103},{"i":1114,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/sqlite3/","h":"#config","p":1103},{"i":1116,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/sqlite3/","h":"#default-config","p":1103},{"i":1118,"t":"This package provides universal methods to use multiple template engines with the Fiber web framework using the new Views interface that is available from > v1.11.1. Special thanks to @bdtomlin & @arsmn for helping! 9 template engines are supported: ace amber django handlebars html jet mustache pug slim","s":"👋 Welcome","u":"/template/","h":"","p":1117},{"i":1120,"t":"Go version 1.17 or higher is required. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/template/any_template_engine/vX","s":"Installation","u":"/template/","h":"#installation","p":1117},{"i":1122,"t":"package main import ( \"log\" \"github.com/gofiber/fiber/v2\" // To use a specific template engine, import as shown below: // \"github.com/gofiber/template/pug\" // \"github.com/gofiber/template/mustache\" // etc.. // In this example we use the html template engine \"github.com/gofiber/template/html/v2\" ) func main() { // Create a new engine by passing the template folder // and template extension using .New(dir, ext string) engine := html.New(\"./views\", \".html\") // We also support the http.FileSystem interface // See examples below to load templates from embedded files engine := html.NewFileSystem(http.Dir(\"./views\"), \".html\") // Reload the templates on each render, good for development engine.Reload(true) // Optional. Default: false // Debug will print each template that is parsed, good for debugging engine.Debug(true) // Optional. Default: false // Layout defines the variable name that is used to yield templates within layouts engine.Layout(\"embed\") // Optional. Default: \"embed\" // Delims sets the action delimiters to the specified strings engine.Delims(\"{{\", \"}}\") // Optional. Default: engine delimiters // AddFunc adds a function to the template's global function map. engine.AddFunc(\"greet\", func(name string) string { return \"Hello, \" + name + \"!\" }) // After you created your engine, you can pass it to Fiber's Views Engine app := fiber.New(fiber.Config{ Views: engine, }) // To render a template, you can call the ctx.Render function // Render(tmpl string, values interface{}, layout ...string) app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) // Render with layout example app.Get(\"/layout\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Example","u":"/template/","h":"#example","p":1117},{"i":1124,"t":"To view more specific examples, you could visit each engine folder to learn more ace amber django handlebars html jet mustache pug slim","s":"More Examples","u":"/template/","h":"#more-examples","p":1117},{"i":1126,"t":"We support the http.FileSystem interface, so you can use different libraries to load the templates from embedded binaries. pkger​ Read documentation: https://github.com/markbates/pkger package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/markbates/pkger\" ) func main() { engine := html.NewFileSystem(pkger.Dir(\"/views\"), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run pkger && go build } packr​ Read documentation: https://github.com/gobuffalo/packr package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/gobuffalo/packr/v2\" ) func main() { engine := html.NewFileSystem(packr.New(\"Templates\", \"/views\"), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run packr && go build } go.rice​ Read documentation: https://github.com/GeertJohan/go.rice package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/GeertJohan/go.rice\" ) func main() { engine := html.NewFileSystem(rice.MustFindBox(\"views\").HTTPBox(), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run rice embed-go && go build } fileb0x​ Read documentation: https://github.com/UnnoTed/fileb0x package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" // your generated package \"github.com///static\" ) func main() { engine := html.NewFileSystem(static.HTTP, \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // Read the documentation on how to use fileb0x }","s":"embedded Systems","u":"/template/","h":"#embedded-systems","p":1117},{"i":1128,"t":"Simple​ Extended​ Benchmarks were ran on Apple Macbook M1. Each engine was benchmarked 20 times and the results averaged into a single xlsx file. Mustache was excluded from the extended benchmark","s":"Benchmarks","u":"/template/","h":"#benchmarks","p":1117},{"i":1130,"t":"Ace is a template engine create by yossi, to see the original syntax documentation please click here","s":"Ace","u":"/template/ace/","h":"","p":1129},{"i":1132,"t":"./views/index.ace = include ./views/partials/header . h1 {{.Title}} = include ./views/partials/footer . ./views/partials/header.ace h1 Header ./views/partials/footer.ace h1 Footer ./views/layouts/main.ace = doctype html html head title Main body {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/ace/v2\" ) func main() { // Create a new engine engine := ace.New(\"./views\", \".ace\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".ace\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/ace/","h":"#basic-example","p":1129},{"i":1134,"t":"Amber is a template engine create by eknkc, to see the original syntax documentation please click here","s":"Amber","u":"/template/amber/","h":"","p":1133},{"i":1136,"t":"./views/index.amber import ./views/partials/header h1 #{Title} import ./views/partials/footer ./views/partials/header.amber h1 Header ./views/partials/footer.amber h1 Footer ./views/layouts/main.amber doctype html html head title Main body #{embed()} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/amber/v2\" ) func main() { // Create a new engine engine := amber.New(\"./views\", \".amber\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".amber\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/amber/","h":"#basic-example","p":1133},{"i":1138,"t":"Django is a template engine create by flosch, to see the original syntax documentation please click here","s":"Django","u":"/template/django/","h":"","p":1137},{"i":1140,"t":"./views/index.django {% include \"partials/header.django\" %}

{{ Title }}

{% include \"partials/footer.django\" %} ./views/partials/header.django

Header

./views/partials/footer.django

Footer

./views/layouts/main.django Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/django/v3\" ) func main() { // Create a new engine engine := django.New(\"./views\", \".django\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".django\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/django/","h":"#basic-example","p":1137},{"i":1142,"t":"When using the // go:embed directive, resolution of inherited templates using django's {% extend '' %} keyword fails when instantiating the template engine with django.NewFileSystem(). In that case, use the django.NewPathForwardingFileSystem() function to instantiate the template engine. This function provides the proper configuration for resolving inherited templates. Assume you have the following files: views/ancenstor.django views/descendant.djando then package main import ( \"log\" \"embed\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/django/v3\" ) //go:embed views var viewsAsssets embed.FS func main() { // Create a new engine engine := NewPathForwardingFileSystem(http.FS(viewsAsssets), \"/views\", \".django\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render descendant return c.Render(\"descendant\", fiber.Map{ \"greeting\": \"World\", }) }) log.Fatal(app.Listen(\":3000\")) }","s":"Using embedded file system (1.16+ only)","u":"/template/django/","h":"#using-embedded-file-system-116-only","p":1137},{"i":1144,"t":"// My custom function func Nl2brHtml(value interface{}) string { if str, ok := value.(string); ok { return strings.Replace(str, \"\\n\", \"
\", -1) } return \"\" } // Create a new engine engine := django.New(\"./views\", \".django\") // register functions engine.AddFunc(\"nl2br\", Nl2brHtml) // Pass the engine to the Views app := fiber.New(fiber.Config{Views: engine}) in the handler c.Render(\"index\", fiber.Map{ \"Fiber\": \"Hello, World!\\n\\nGreetings from Fiber Team\", }) ./views/index.django {{ nl2br(Fiber) }} Output: Hello, World!

Greetings from Fiber Team ","s":"Register and use custom functions","u":"/template/django/","h":"#register-and-use-custom-functions","p":1137},{"i":1146,"t":"Handlebars is a template engine create by aymerick, to see the original syntax documentation please click here","s":"Handlebars","u":"/template/handlebars/","h":"","p":1145},{"i":1148,"t":"./views/index.hbs {{> 'partials/header' }}

{{Title}}

{{> 'partials/footer' }} ./views/partials/header.hbs

Header

./views/partials/footer.hbs

Footer

./views/layouts/main.hbs Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/handlebars/v2\" ) func main() { // Create a new engine engine := handlebars.New(\"./views\", \".hbs\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".hbs\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/handlebars/","h":"#basic-example","p":1145},{"i":1150,"t":"HTML is the official Go template engine html/template, to see the original syntax documentation please click here Info: All templates within the specified view directory are analyzed and compiled at the beginning to increase the performance when using them. Thus it should be noted that no definition with the same name should exist, otherwise they will overwrite each other. For templating the {{embed}} tag should be used","s":"HTML","u":"/template/html/","h":"","p":1149},{"i":1152,"t":"./views/index.html {{template \"partials/header\" .}}

{{.Title}}

{{template \"partials/footer\" .}} ./views/partials/header.html

Header

./views/partials/footer.html

Footer

./views/layouts/main.html Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html/v2\" ) func main() { // Create a new engine engine := html.New(\"./views\", \".html\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".html\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/html/","h":"#basic-example","p":1149},{"i":1154,"t":"package main import ( \"log\" \"net/http\" \"embed\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" ) //go:embed views/* var viewsfs embed.FS func main() { engine := html.NewFileSystem(http.FS(viewsfs), \".html\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index - start with views directory return c.Render(\"views/index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) } and change the starting point to the views directory ./views/index.html {{template \"views/partials/header\" .}}

{{.Title}}

{{template \"views/partials/footer\" .}}","s":"Example with embed.FS","u":"/template/html/","h":"#example-with-embedfs","p":1149},{"i":1156,"t":"package main import ( \"embed\" \"html/template\" \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" ) //go:embed views/* var viewsfs embed.FS func main() { engine := html.NewFileSystem(http.FS(viewsfs), \".html\") engine.AddFunc( // add unescape function \"unescape\", func(s string) template.HTML { return template.HTML(s) }, ) // Pass the engine to the Views app := fiber.New(fiber.Config{Views: engine}) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"views/index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) } and change the starting point to the views directory ./views/index.html

{{ unescape .Title}}

html output

Hello, World!

","s":"Example with innerHTML","u":"/template/html/","h":"#example-with-innerhtml","p":1149},{"i":1158,"t":"The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.","s":"Golang Templates Cheatsheet","u":"/template/html/TEMPLATES_CHEATSHEET","h":"","p":1157},{"i":1160,"t":"Parsing and Creating Templates Executing Templates Template Encoding and HTML Template Variables Template Actions Template Functions Template Comparison Functions Nested Templates and Layouts Templates Calling Functions","s":"Table of Contents","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#table-of-contents","p":1157},{"i":1162,"t":"Naming Templates​ There is no defined file extension for Go templates. One of the most popular is .tmpl supported by vim-go and referenced in the text/template godocs. The extension .gohtml supports syntax highlighting in both Atom and GoSublime editors. Finally analysis of large Go codebases finds that .tpl is often used by developers. While the extension is not important it is still good to be consistent within a project for clarity. Creating a Template​ tpl, err := template.Parse(filename) will get the template at filename and store it in tpl. tpl can then be executed to show the template. Parsing Multiple Templates​ template.ParseFiles(filenames) takes a list of filenames and stores all templates. template.ParseGlob(pattern) will find all templates matching the pattern and store the templates.","s":"Parsing and Creating Templates","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#parsing-and-creating-templates","p":1157},{"i":1164,"t":"Execute a Single Template​ Once a template has been parsed there are two options to execute them. A single template tpl can be executed using tpl.Execute(io.Writer, data). The content of tpl will be written to the io.Writer. Data is an interface passed to the template that will be useable in the template. Executing a Named Template​ tpl.ExecuteTemplate(io.Writer, name, data) works the same as execute but allows for a string name of the template the user wants to execute.","s":"Executing Templates","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#executing-templates","p":1157},{"i":1166,"t":"Contextual Encoding​ Go’s html/template package does encoding based on the context of the code. As a result, html/template encodes any characters that need encoding to be rendered correctly. For example the < and > in \"

A header!

\" will be encoded as <h1>A header!</h1> . Type template.HTML can be used to skip encoding by telling Go the string is safe. template.HTML(\"

A Safe header

\") will then be

A Safe header

. Using this type with user input is dangerous and leaves the application vulnerable. The go html/template package is aware of attributes within the template and will encode values differently based on the attribute. Go templates can also be used with javascript. Structs and maps will be expanded into JSON objects and quotes will be added to strings for use in function parameters and as variable values. // Go type Cat struct { Name string Age int } kitten := Cat{\"Sam\", 12} // Template // Javascript var cat = {\"Name\":\"Sam\", \"Age\" 12} Safe Strings and HTML Comments​ The html/template package will remove any comments from a template by default. This can cause issues when comments are necessary such as detecting internet explorer. We can use the Custom Functions method (Globally) to create a function that returns html preserving comments. Define a function htmlSafe in the FuncMap of the template. testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"htmlSafe\": func(html string) template.HTML { return template.HTML(html) }, }).ParseFiles(\"hello.gohtml\") This function takes a string and produces the unaltered HTML code. This function can be used in a template like so to preserve the comments : {{htmlSafe \"\" }}","s":"Template Encoding and HTML","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-encoding-and-html","p":1157},{"i":1168,"t":"The dot character (.)​ A template variable can be a boolean, string, character, integer, floating-point, imaginary, or complex constant in Go syntax. Data passed to the template can be accessed using dot {{ . }}. If the data is a complex type then it’s fields can be accessed using the dot with the field name {{ .FieldName }}. Dots can be chained together if the data contains multiple complex structures. {{ .Struct.StructTwo.Field }} Variables in Templates​ Data passed to the template can be saved in a variable and used throughout the template. {{$number := .}} We use the $number to create a variable then initialize it with the value passed to the template. To use the variable we call it in the template with {{$number}}. {{$number := .}}

It is day number {{$number}} of the month

var tpl *template.Template tpl = template.Must(template.ParseFiles(\"templateName\")) err := tpl.ExecuteTemplate(os.Stdout, \"templateName\", 23) In this example we pass 23 to the template and stored in the $number variable which can be used anywhere in the template","s":"Template Variables","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-variables","p":1157},{"i":1170,"t":"If/Else Statements​ Go templates support if/else statements like many programming languages. We can use the if statement to check for values, if it doesn’t exist we can use an else value. The empty values are false, 0, any nil pointer or interface value, and any array, slice, map, or string of length zero.

Hello, {{if .Name}} {{.Name}} {{else}} Anonymous {{end}}!

If .Name exists then Hello, Name will be printed (replaced with the name value) otherwise it will print Hello, Anonymous. Templates also provide the else if statment {{else if .Name2 }} which can be used to evaluate other options after an if. Removing Whitespace​ Adding different values to a template can add various amounts of whitespace. We can either change our template to better handle it, by ignoring or minimizing effects, or we can use the minus sign - within out template.

Hello, {{if .Name}} {{.Name}} {{- else}} Anonymous {{- end}}!

Here we are telling the template to remove all spaces between the Name variable and whatever comes after it. We are doing the same with the end keyword. This allows us to have whitespace within the template for easier reading but remove it in production. Range Blocks​ Go templates have a range keyword to iterate over all objects in a structure. Suppose we had the Go structures: type Item struct { Name string Price int } type ViewData struct { Name string Items []Item } We have an Item, with a name and price, then a ViewData which is the structure sent to the template. Consider the template containing the following: {{range .Items}}

{{.Name}}

${{.Price}}
{{end}} For each Item in the range of Items (in the ViewData structure) get the Name and Price of that item and create html for each Item automatically. Within a range each Item becomes the {{.}} and the item properties therefore become {{.Name}} or {{.Price}} in this example.","s":"Template Actions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-actions","p":1157},{"i":1172,"t":"The template package provides a list of predefined global functions. Below are some of the most used. Indexing structures in Templates​ If the data passed to the template is a map, slice, or array it can be indexed from the template. We use {{index x number}} where index is the keyword, x is the data and number is a integer for the index value. If we had {{index names 2}} it is equivalent to names[2]. We can add more integers to index deeper into data. {{index names 2 3 4}} is equivalent to names[2][3][4].

{{index .FavNums 2 }}

type person struct { Name string FavNums []int } func main() { tpl := template.Must(template.ParseGlob(\"*.gohtml\")) tpl.Execute(os.Stdout, &person{\"Curtis\", []int{7, 11, 94}}) } This code example passes a person structure and gets the 3rd favourite number from the FavNums slice. The and Function​ The and function returns the boolean AND of its arguments by returning the first empty argument or the last argument. and x y behaves logically as if x then y else x . Consider the following go code type User struct { Admin bool } type ViewData struct { *User } Pass a ViewData with a User that has Admin set true to the following template {{if and .User .User.Admin}} You are an admin user! {{else}} Access denied! {{end}} The result will be You are an admin user!. However if the ViewData did not include a *User object or Admin was set as false then the result will be Access denied!. The or Function​ The or function operates similarly to the and function however will stop at the first true. or x y is equivalent to if x then x else y so y will never be evaluated if x is not empty. The not Function​ The not function returns the boolean negation of the argument. {{ if not .Authenticated}} Access Denied! {{ end }}","s":"Template Functions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-functions","p":1157},{"i":1174,"t":"Comparisons​ The html/template package provides a variety of functions to do comparisons between operators. The operators may only be basic types or named basic types such as type Temp float32 Remember that template functions take the form {{ function arg1 arg2 }}. eq Returns the result of arg1 == arg2 ne Returns the result of arg1 != arg2 lt Returns the result of arg1 < arg2 le Returns the result of arg1 <= arg2 gt Returns the result of arg1 > arg2 ge Returns the result of arg1 >= arg2 Of special note eq can be used with two or more arguments by comparing all arguments to the first. {{ eq arg1 arg2 arg3 arg4}} will result in the following logical expression: arg1==arg2 || arg1==arg3 || arg1==arg4","s":"Template Comparison Functions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#template-comparison-functions","p":1157},{"i":1176,"t":"Nesting Templates​ Nested templates can be used for parts of code frequently used across templates, a footer or header for example. Rather than updating each template separately we can use a nested template that all other templates can use. You can define a template as follows: {{define \"footer\"}}

Here is the footer

{{end}} A template named “footer” is defined which can be used in other templates like so to add the footer template content into the other template: {{template \"footer\"}} Passing Variables between Templates​ The template action used to include nested templates also allows a second parameter to pass data to the nested template. // Define a nested template called header {{define \"header\"}}

{{.}}

{{end}} // Call template and pass a name parameter {{range .Items}}
{{template \"header\" .Name}} ${{.Price}}
{{end}} We use the same range to loop through Items as before but we pass the name to the header template each time in this simple example. Creating Layouts​ Glob patterns specify sets of filenames with wildcard characters. The template.ParseGlob(pattern string) function will parse all templates that match the string pattern. template.ParseFiles(files...) can also be used with a list of file names. The templates are named by default based on the base names of the argument files. This mean views/layouts/hello.gohtml will have the name hello.gohtml . If the template has a `{{define “templateName”}} within it then that name will be usable. A specific template can be executed using t.ExecuteTemplate(w, \"templateName\", nil) . t is an object of type Template, w is type io.Writer such as an http.ResponseWriter, Then there is the name of the template to execute, and finally passing any data to the template, in this case a nil value. Example main.go file // Omitted imports & package var LayoutDir string = \"views/layouts\" var bootstrap *template.Template func main() { var err error bootstrap, err = template.ParseGlob(LayoutDir + \"/*.gohtml\") if err != nil { panic(err) } http.HandleFunc(\"/\", handler) http.ListenAndServe(\":8080\", nil) } func handler(w http.ResponseWriter, r *http.Request) { bootstrap.ExecuteTemplate(w, \"bootstrap\", nil) } All .gohtml files are parsed in main. When route / is reached the template defined as bootstrap is executed using the handler function. Example views/layouts/bootstrap.gohtml file {{define \"bootstrap\"}} Go Templates

Filler header

Filler paragraph

{{end}}","s":"Nested Templates and Layouts","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#nested-templates-and-layouts","p":1157},{"i":1178,"t":"Function Variables (calling struct methods)​ We can use templates to call the methods of objects in the template to return data. Consider the User struct with the following method. type User struct { ID int Email string } func (u User) HasPermission(feature string) bool { if feature == \"feature-a\" { return true } else { return false } } When a type User has been passed to the template we can then call this method from the template. {{if .User.HasPermission \"feature-a\"}}

Feature A

Some other stuff here...

{{else}}

Feature A

To enable Feature A please upgrade your plan

{{end}} The template checks if the User HasPermission for the feature and renders depending on the result. Function Variables (call)​ If the Method HasPermission has to change at times then the Function Variables (Methods) implementation may not fit the design. Instead a HasPermission func(string) bool attribute can be added on the User type. This can then have a function assigned to it at creation. // Structs type ViewData struct { User User } type User struct { ID int Email string HasPermission func(string) bool } // Example of creating a ViewData vd := ViewData{ User: User{ ID: 1, Email: \"curtis.vermeeren@gmail.com\", // Create the HasPermission function HasPermission: func(feature string) bool { if feature == \"feature-b\" { return true } return false }, }, } // Executing the ViewData with the template err := testTemplate.Execute(w, vd) We need to tell the Go template that we want to call this function so we must change the template from the Function Variables (Methods) implementation to do this. We use the call keyword supplied by the go html/template package. Changing the previous template to use call results in: {{if (call .User.HasPermission \"feature-b\")}}

Feature B

Some other stuff here...

{{else}}

Feature B

To enable Feature B please upgrade your plan

{{end}} Custom Functions​ Another way to call functions is to create custom functions with template.FuncMap . This method creates global methods that can be used throughout the entire application. FuncMap has type map[string]interface{} mapping a string, the function name, to a function. The mapped functions must have either a single return value, or two return values where the second has type error. // Creating a template with function hasPermission testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"hasPermission\": func(user User, feature string) bool { if user.ID == 1 && feature == \"feature-a\" { return true } return false }, }).ParseFiles(\"hello.gohtml\") Here the function to check if a user has permission for a feature is mapped to the string \"hasPermission\" and stored in the FuncMap. Note that the custom functions must be created before calling ParseFiles() The function could be executed in the template as follows: {{ if hasPermission .User \"feature-a\" }} The .User and string \"feature-a\" are both passed to hasPermission as arguments. Custom Functions (Globally)​ The previous two methods of custom functions rely on .User being passed to the template. This works in many cases but in a large application passing too many objects to a template can become difficult to maintain across many templates. We can change the implementation of the custom function to work without the .User being passed. Using a similar feature example as the other 2 sections first you would have to create a default hasPermission function and define it in the template’s function map. testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"hasPermission\": func(feature string) bool { return false }, }).ParseFiles(\"hello.gohtml\") This function could be placed in main() or somewhere that ensures the default hasPermission is created in the hello.gohtml function map. The default function just returns false but it defines the function and implementation that doesn’t require User . Next a closure could be used to redefine the hasPermission function. It would use the User data available when it is created in a handler rather than having User data passed to it. Within the handler for the template you can redefine any functions to use the information available. func handler(w http.ResponseWriter, r *http.Request) { w.Header().Set(\"Content-Type\", \"text/html\") user := User{ ID: 1, Email: \"Curtis.vermeeren@gmail.com\", } vd := ViewData{} err := testTemplate.Funcs(template.FuncMap{ \"hasPermission\": func(feature string) bool { if user.ID == 1 && feature == \"feature-a\" { return true } return false }, }).Execute(w, vd) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) } } In this handler a User is created with ID and Email, Then a ViewData is created without passing the user to it. The hasPermission function is redefined using user.ID which is available when the function is created. {{if hasPermission \"feature-a\"}} can be used in a template without having to pass a User to the template as the User object in the handler is used instead.","s":"Templates Calling Functions","u":"/template/html/TEMPLATES_CHEATSHEET","h":"#templates-calling-functions","p":1157},{"i":1180,"t":"Jet is a template engine create by cloudykit, to see the original syntax documentation please click here","s":"Jet","u":"/template/jet/","h":"","p":1179},{"i":1182,"t":"./views/index.jet {{include \"partials/header\"}}

{{ Title }}

{{include \"partials/footer\"}} ./views/partials/header.jet

Header

./views/partials/footer.jet

Footer

./views/layouts/main.jet Title {{ embed() }} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/jet/v2\" ) func main() { // Create a new engine engine := jet.New(\"./views\", \".jet\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := jet.NewFileSystem(http.Dir(\"./views\", \".jet\")) // Pass the engine to the views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/jet/","h":"#basic-example","p":1179},{"i":1184,"t":"Mustache is a template engine created by hoisie/cbroglie, to see the original syntax documentation please click here","s":"Mustache","u":"/template/mustache/","h":"","p":1183},{"i":1186,"t":"./views/index.mustache {{> views/partials/header }}

{{Title}}

{{> views/partials/footer }} ./views/partials/header.mustache

Header

./views/partials/footer.mustache

Footer

./views/layouts/main.mustache Main {{{embed}}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/mustache/v2\" ) func main() { // Create a new engine engine := mustache.New(\"./views\", \".mustache\") // Or from an embedded system // Note that with an embedded system the partials included from template files must be // specified relative to the filesystem's root, not the current working directory // engine := mustache.NewFileSystem(http.Dir(\"./views\", \".mustache\"), \".mustache\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/mustache/","h":"#basic-example","p":1183},{"i":1188,"t":"Pug is a template engine create by joker, to see the original syntax documentation please click here","s":"Pug","u":"/template/pug/","h":"","p":1187},{"i":1190,"t":"./views/index.pug include partials/header.pug h1 #{.Title} include partials/footer.pug ./views/partials/header.pug h2 Header ./views/partials/footer.pug h2 Footer ./views/layouts/main.pug doctype html html head title Main include ../partials/meta.pug body | {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/pug/v2\" // \"net/http\" // embedded system ) func main() { // Create a new engine engine := pug.New(\"./views\", \".pug\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := pug.NewFileSystem(http.Dir(\"./views\", \".pug\")) // Pass the engine to the views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/pug/","h":"#basic-example","p":1187},{"i":1192,"t":"Slim is a template engine created by mattn, to see the original syntax documentation please click here","s":"Slim","u":"/template/slim/","h":"","p":1191},{"i":1194,"t":"./views/index.slim == render(\"partials/header.slim\") h1 = Title == render(\"partials/footer.slim\") ./views/partials/header.slim h2 = Header ./views/partials/footer.slim h2 = Footer ./views/layouts/main.slim doctype html html head title Main include ../partials/meta.slim body | {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/slim/v2\" // \"net/http\" // embedded system ) func main() { // Create a new engine engine := slim.New(\"./views\", \".slim\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := slim.NewFileSystem(http.Dir(\"./views\", \".slim\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/slim/","h":"#basic-example","p":1191},{"i":1196,"t":"An online API documentation with examples so you can start building web apps with Fiber right away! Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind. These docs are for Fiber v2, which was released on September 15th, 2020.","s":"👋 Welcome","u":"/","h":"","p":1195},{"i":1198,"t":"First of all, download and install Go. 1.17 or higher is required. Installation is done using the go get command: go get github.com/gofiber/fiber/v2","s":"Installation","u":"/","h":"#installation","p":1195},{"i":1200,"t":"Some values returned from *fiber.Ctx are not immutable by default. Because fiber is optimized for high-performance, values returned from fiber.Ctx are not immutable by default and will be re-used across requests. As a rule of thumb, you must only use context values within the handler, and you must not keep any references. As soon as you return from the handler, any values you have obtained from the context will be re-used in future requests and will change below your feet. Here is an example: func handler(c *fiber.Ctx) error { // Variable is only valid within this handler result := c.Params(\"foo\") // ... } If you need to persist such values outside the handler, make copies of their underlying buffer using the copy builtin. Here is an example for persisting a string: func handler(c *fiber.Ctx) error { // Variable is only valid within this handler result := c.Params(\"foo\") // Make a copy buffer := make([]byte, len(result)) copy(buffer, result) resultCopy := string(buffer) // Variable is now valid forever // ... } We created a custom CopyString function that does the above and is available under gofiber/utils. app.Get(\"/:foo\", func(c *fiber.Ctx) error { // Variable is now immutable result := utils.CopyString(c.Params(\"foo\")) // ... }) Alternatively, you can also use the Immutable setting. It will make all values returned from the context immutable, allowing you to persist them anywhere. Of course, this comes at the cost of performance. app := fiber.New(fiber.Config{ Immutable: true, }) For more information, please check #426 and #185.","s":"Zero Allocation","u":"/","h":"#zero-allocation","p":1195},{"i":1202,"t":"Embedded below is essentially the most straightforward Fiber app you can create: package main import \"github.com/gofiber/fiber/v2\" func main() { app := fiber.New() app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Listen(\":3000\") } go run server.go Browse to http://localhost:3000 and you should see Hello, World! on the page.","s":"Hello, World!","u":"/","h":"#hello-world","p":1195},{"i":1204,"t":"Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, PUT, POST, etc.). Each route can have multiple handler functions that are executed when the route is matched. Route definition takes the following structures: // Function signature app.Method(path string, ...func(*fiber.Ctx) error) app is an instance of Fiber Method is an HTTP request method: GET, PUT, POST, etc. path is a virtual path on the server func(*fiber.Ctx) error is a callback function containing the Context executed when the route is matched Simple route // Respond with \"Hello, World!\" on root path, \"/\" app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) Parameters // GET http://localhost:8080/hello%20world app.Get(\"/:value\", func(c *fiber.Ctx) error { return c.SendString(\"value: \" + c.Params(\"value\")) // => Get request with value: hello world }) Optional parameter // GET http://localhost:3000/john app.Get(\"/:name?\", func(c *fiber.Ctx) error { if c.Params(\"name\") != \"\" { return c.SendString(\"Hello \" + c.Params(\"name\")) // => Hello john } return c.SendString(\"Where is john?\") }) Wildcards // GET http://localhost:3000/api/user/john app.Get(\"/api/*\", func(c *fiber.Ctx) error { return c.SendString(\"API path: \" + c.Params(\"*\")) // => API path: user/john })","s":"Basic routing","u":"/","h":"#basic-routing","p":1195},{"i":1206,"t":"To serve static files such as images, CSS, and JavaScript files, replace your function handler with a file or directory string. Function signature: app.Static(prefix, root string, config ...Static) Use the following code to serve files in a directory named ./public: app := fiber.New() app.Static(\"/\", \"./public\") app.Listen(\":3000\") Now, you can load the files that are in the ./public directory: http://localhost:8080/hello.html http://localhost:8080/js/jquery.js http://localhost:8080/css/style.css","s":"Static files","u":"/","h":"#static-files","p":1195},{"i":1208,"t":"For more information on how to build APIs in Go with Fiber, please check out this excellent article on building an express-style API in Go with Fiber.","s":"Note","u":"/","h":"#note","p":1195},{"i":1211,"t":"Use the Static method to serve static files such as images, CSS, and JavaScript. info By default, Static will serve index.html files in response to a request on a directory. Signature func (app *App) Static(prefix, root string, config ...Static) Router Use the following code to serve files in a directory named ./public app.Static(\"/\", \"./public\") // => http://localhost:3000/hello.html // => http://localhost:3000/js/jquery.js // => http://localhost:3000/css/style.css Examples // Serve files from multiple directories app.Static(\"/\", \"./public\") // Serve files from \"./files\" directory: app.Static(\"/\", \"./files\") You can use any virtual path prefix (where the path does not actually exist in the file system) for files that are served by the Static method, specify a prefix path for the static directory, as shown below: Examples app.Static(\"/static\", \"./public\") // => http://localhost:3000/static/hello.html // => http://localhost:3000/static/js/jquery.js // => http://localhost:3000/static/css/style.css If you want to have a little bit more control regarding the settings for serving static files. You could use the fiber.Static struct to enable specific settings. fiber.Static{} // Static defines configuration options when defining static assets. type Static struct { // When set to true, the server tries minimizing CPU usage by caching compressed files. // This works differently than the github.com/gofiber/compression middleware. // Optional. Default value false Compress bool `json:\"compress\"` // When set to true, enables byte range requests. // Optional. Default value false ByteRange bool `json:\"byte_range\"` // When set to true, enables directory browsing. // Optional. Default value false. Browse bool `json:\"browse\"` // When set to true, enables direct download. // Optional. Default value false. Download bool `json:\"download\"` // The name of the index file for serving a directory. // Optional. Default value \"index.html\". Index string `json:\"index\"` // Expiration duration for inactive file handlers. // Use a negative time.Duration to disable it. // // Optional. Default value 10 * time.Second. CacheDuration time.Duration `json:\"cache_duration\"` // The value for the Cache-Control HTTP-header // that is set on the file response. MaxAge is defined in seconds. // // Optional. Default value 0. MaxAge int `json:\"max_age\"` // ModifyResponse defines a function that allows you to alter the response. // // Optional. Default: nil ModifyResponse Handler // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *Ctx) bool } Example // Custom config app.Static(\"/\", \"./public\", fiber.Static{ Compress: true, ByteRange: true, Browse: true, Index: \"john.html\", CacheDuration: 10 * time.Second, MaxAge: 3600, })","s":"Static","u":"/api/app","h":"#static","p":1209},{"i":1213,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Route Handlers","u":"/api/app","h":"#route-handlers","p":1209},{"i":1215,"t":"You can Mount Fiber instance by creating a *Mount Signature func (a *App) Mount(prefix string, app *App) Router Examples func main() { app := fiber.New() micro := fiber.New() app.Mount(\"/john\", micro) // GET /john/doe -> 200 OK micro.Get(\"/doe\", func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusOK) }) log.Fatal(app.Listen(\":3000\")) }","s":"Mount","u":"/api/app","h":"#mount","p":1209},{"i":1217,"t":"The MountPath property contains one or more path patterns on which a sub-app was mounted. Signature func (app *App) MountPath() string Examples func main() { app := fiber.New() one := fiber.New() two := fiber.New() three := fiber.New() two.Mount(\"/three\", three) one.Mount(\"/two\", two) app.Mount(\"/one\", one) one.MountPath() // \"/one\" two.MountPath() // \"/one/two\" three.MountPath() // \"/one/two/three\" app.MountPath() // \"\" } caution Mounting order is important for MountPath. If you want to get mount paths properly, you should start mounting from the deepest app.","s":"MountPath","u":"/api/app","h":"#mountpath","p":1209},{"i":1219,"t":"You can group routes by creating a *Group struct. Signature func (app *App) Group(prefix string, handlers ...Handler) Router Examples func main() { app := fiber.New() api := app.Group(\"/api\", handler) // /api v1 := api.Group(\"/v1\", handler) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", handler) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) }","s":"Group","u":"/api/app","h":"#group","p":1209},{"i":1221,"t":"You can define routes with a common prefix inside the common function. Signature func (app *App) Route(prefix string, fn func(router Router), name ...string) Router Examples func main() { app := fiber.New() app.Route(\"/test\", func(api fiber.Router) { api.Get(\"/foo\", handler).Name(\"foo\") // /test/foo (name: test.foo) api.Get(\"/bar\", handler).Name(\"bar\") // /test/bar (name: test.bar) }, \"test.\") log.Fatal(app.Listen(\":3000\")) }","s":"Route","u":"/api/app","h":"#route","p":1209},{"i":1223,"t":"Server returns the underlying fasthttp server Signature func (app *App) Server() *fasthttp.Server Examples func main() { app := fiber.New() app.Server().MaxConnsPerIP = 1 // ... }","s":"Server","u":"/api/app","h":"#server","p":1209},{"i":1225,"t":"Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then waits indefinitely for all connections to return to idle before shutting down. ShutdownWithTimeout will forcefully close any active connections after the timeout expires. ShutdownWithContext shuts down the server including by force if the context's deadline is exceeded. func (app *App) Shutdown() error func (app *App) ShutdownWithTimeout(timeout time.Duration) error func (app *App) ShutdownWithContext(ctx context.Context) error","s":"Server Shutdown","u":"/api/app","h":"#server-shutdown","p":1209},{"i":1227,"t":"This method returns the amount of registered handlers. Signature func (app *App) HandlersCount() uint32","s":"HandlersCount","u":"/api/app","h":"#handlerscount","p":1209},{"i":1229,"t":"This method returns the original router stack Signature func (app *App) Stack() [][]*Route Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/john/:age\", handler) app.Post(\"/register\", handler) data, _ := json.MarshalIndent(app.Stack(), \"\", \" \") fmt.Println(string(data)) app.Listen(\":3000\") } Result [ [ { \"method\": \"GET\", \"path\": \"/john/:age\", \"params\": [ \"age\" ] } ], [ { \"method\": \"HEAD\", \"path\": \"/john/:age\", \"params\": [ \"age\" ] } ], [ { \"method\": \"POST\", \"path\": \"/register\", \"params\": null } ] ]","s":"Stack","u":"/api/app","h":"#stack","p":1209},{"i":1231,"t":"This method assigns the name of latest created route. Signature func (app *App) Name(name string) Router Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/\", handler) app.Name(\"index\") app.Get(\"/doe\", handler).Name(\"home\") app.Trace(\"/tracer\", handler).Name(\"tracert\") app.Delete(\"/delete\", handler).Name(\"delete\") a := app.Group(\"/a\") a.Name(\"fd.\") a.Get(\"/test\", handler).Name(\"test\") data, _ := json.MarshalIndent(app.Stack(), \"\", \" \") fmt.Print(string(data)) app.Listen(\":3000\") } Result [ [ { \"method\": \"GET\", \"name\": \"index\", \"path\": \"/\", \"params\": null }, { \"method\": \"GET\", \"name\": \"home\", \"path\": \"/doe\", \"params\": null }, { \"method\": \"GET\", \"name\": \"fd.test\", \"path\": \"/a/test\", \"params\": null } ], [ { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/\", \"params\": null }, { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/doe\", \"params\": null }, { \"method\": \"HEAD\", \"name\": \"\", \"path\": \"/a/test\", \"params\": null } ], null, null, [ { \"method\": \"DELETE\", \"name\": \"delete\", \"path\": \"/delete\", \"params\": null } ], null, null, [ { \"method\": \"TRACE\", \"name\": \"tracert\", \"path\": \"/tracer\", \"params\": null } ], null ]","s":"Name","u":"/api/app","h":"#name","p":1209},{"i":1233,"t":"This method gets the route by name. Signature func (app *App) GetRoute(name string) Route Examples var handler = func(c *fiber.Ctx) error { return nil } func main() { app := fiber.New() app.Get(\"/\", handler).Name(\"index\") data, _ := json.MarshalIndent(app.GetRoute(\"index\"), \"\", \" \") fmt.Print(string(data)) app.Listen(\":3000\") } Result { \"method\": \"GET\", \"name\": \"index\", \"path\": \"/\", \"params\": null }","s":"GetRoute","u":"/api/app","h":"#getroute","p":1209},{"i":1235,"t":"This method gets all routes. Signature func (app *App) GetRoutes(filterUseOption ...bool) []Route When filterUseOption equal to true, it will filter the routes registered by the middleware. Examples func main() { app := fiber.New() app.Post(\"/\", func (c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }).Name(\"index\") data, _ := json.MarshalIndent(app.GetRoutes(true), \"\", \" \") fmt.Print(string(data)) } Result [ { \"method\": \"POST\", \"name\": \"index\", \"path\": \"/\", \"params\": null } ]","s":"GetRoutes","u":"/api/app","h":"#getroutes","p":1209},{"i":1237,"t":"Config returns the app config as value ( read-only ). Signature func (app *App) Config() Config","s":"Config","u":"/api/app","h":"#config","p":1209},{"i":1239,"t":"Handler returns the server handler that can be used to serve custom *fasthttp.RequestCtx requests. Signature func (app *App) Handler() fasthttp.RequestHandler","s":"Handler","u":"/api/app","h":"#handler","p":1209},{"i":1241,"t":"Listen serves HTTP requests from the given address. Signature func (app *App) Listen(addr string) error Examples // Listen on port :8080 app.Listen(\":8080\") // Custom host app.Listen(\"127.0.0.1:8080\")","s":"Listen","u":"/api/app","h":"#listen","p":1209},{"i":1243,"t":"ListenTLS serves HTTPs requests from the given address using certFile and keyFile paths to as TLS certificate and key file. Signature func (app *App) ListenTLS(addr, certFile, keyFile string) error Examples app.ListenTLS(\":443\", \"./cert.pem\", \"./cert.key\"); Using ListenTLS defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{ cert, }, }","s":"ListenTLS","u":"/api/app","h":"#listentls","p":1209},{"i":1245,"t":"Signature func (app *App) ListenTLS(addr string, cert tls.Certificate) error Examples app.ListenTLSWithCertificate(\":443\", cert); Using ListenTLSWithCertificate defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{ cert, }, }","s":"ListenTLSWithCertificate","u":"/api/app","h":"#listentlswithcertificate","p":1209},{"i":1247,"t":"ListenMutualTLS serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file Signature func (app *App) ListenMutualTLS(addr, certFile, keyFile, clientCertFile string) error Examples app.ListenMutualTLS(\":443\", \"./cert.pem\", \"./cert.key\", \"./ca-chain-cert.pem\"); Using ListenMutualTLS defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, ClientAuth: tls.RequireAndVerifyClientCert, ClientCAs: clientCertPool, Certificates: []tls.Certificate{ cert, }, }","s":"ListenMutualTLS","u":"/api/app","h":"#listenmutualtls","p":1209},{"i":1249,"t":"ListenMutualTLSWithCertificate serves HTTPs requests from the given address using certFile, keyFile and clientCertFile are the paths to TLS certificate and key file Signature func (app *App) ListenMutualTLSWithCertificate(addr string, cert tls.Certificate, clientCertPool *x509.CertPool) error Examples app.ListenMutualTLSWithCertificate(\":443\", cert, clientCertPool); Using ListenMutualTLSWithCertificate defaults to the following config ( use Listener to provide your own config ) Default *tls.Config &tls.Config{ MinVersion: tls.VersionTLS12, ClientAuth: tls.RequireAndVerifyClientCert, ClientCAs: clientCertPool, Certificates: []tls.Certificate{ cert, }, }","s":"ListenMutualTLSWithCertificate","u":"/api/app","h":"#listenmutualtlswithcertificate","p":1209},{"i":1251,"t":"You can pass your own net.Listener using the Listener method. This method can be used to enable TLS/HTTPS with a custom tls.Config. Signature func (app *App) Listener(ln net.Listener) error Examples ln, _ := net.Listen(\"tcp\", \":3000\") cer, _:= tls.LoadX509KeyPair(\"server.crt\", \"server.key\") ln = tls.NewListener(ln, &tls.Config{Certificates: []tls.Certificate{cer}}) app.Listener(ln)","s":"Listener","u":"/api/app","h":"#listener","p":1209},{"i":1253,"t":"Testing your application is done with the Test method. Use this method for creating _test.go files or when you need to debug your routing logic. The default timeout is 1s if you want to disable a timeout altogether, pass -1 as a second argument. Signature func (app *App) Test(req *http.Request, msTimeout ...int) (*http.Response, error) Examples // Create route with GET method for test: app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(c.BaseURL()) // => http://google.com fmt.Println(c.Get(\"X-Custom-Header\")) // => hi return c.SendString(\"hello, World!\") }) // http.Request req := httptest.NewRequest(\"GET\", \"http://google.com\", nil) req.Header.Set(\"X-Custom-Header\", \"hi\") // http.Response resp, _ := app.Test(req) // Do something with results: if resp.StatusCode == fiber.StatusOK { body, _ := ioutil.ReadAll(resp.Body) fmt.Println(string(body)) // => Hello, World! }","s":"Test","u":"/api/app","h":"#test","p":1209},{"i":1255,"t":"Hooks is a method to return hooks property. Signature func (app *App) Hooks() *Hooks","s":"Hooks","u":"/api/app","h":"#hooks","p":1209},{"i":1258,"t":"Start a http request with http method and url. Signatures // Client http methods func (c *Client) Get(url string) *Agent func (c *Client) Head(url string) *Agent func (c *Client) Post(url string) *Agent func (c *Client) Put(url string) *Agent func (c *Client) Patch(url string) *Agent func (c *Client) Delete(url string) *Agent","s":"Start request","u":"/api/client","h":"#start-request","p":1256},{"i":1260,"t":"Agent is built on top of FastHTTP's HostClient which has lots of convenient helper methods such as dedicated methods for request methods.","s":"✨ Agent","u":"/api/client","h":"#-agent","p":1256},{"i":1262,"t":"Parse initializes a HostClient. Parse a := AcquireAgent() req := a.Request() req.Header.SetMethod(MethodGet) req.SetRequestURI(\"http://example.com\") if err := a.Parse(); err != nil { panic(err) } code, body, errs := a.Bytes() // ...","s":"Parse","u":"/api/client","h":"#parse","p":1256},{"i":1264,"t":"Set sets the given key: value header. Signature func (a *Agent) Set(k, v string) *Agent func (a *Agent) SetBytesK(k []byte, v string) *Agent func (a *Agent) SetBytesV(k string, v []byte) *Agent func (a *Agent) SetBytesKV(k []byte, v []byte) *Agent Example agent.Set(\"k1\", \"v1\"). SetBytesK([]byte(\"k1\"), \"v1\"). SetBytesV(\"k1\", []byte(\"v1\")). SetBytesKV([]byte(\"k2\"), []byte(\"v2\")) // ...","s":"Set","u":"/api/client","h":"#set","p":1256},{"i":1266,"t":"Add adds the given key: value header. Multiple headers with the same key may be added with this function. Signature func (a *Agent) Add(k, v string) *Agent func (a *Agent) AddBytesK(k []byte, v string) *Agent func (a *Agent) AddBytesV(k string, v []byte) *Agent func (a *Agent) AddBytesKV(k []byte, v []byte) *Agent Example agent.Add(\"k1\", \"v1\"). AddBytesK([]byte(\"k1\"), \"v1\"). AddBytesV(\"k1\", []byte(\"v1\")). AddBytesKV([]byte(\"k2\"), []byte(\"v2\")) // Headers: // K1: v1 // K1: v1 // K1: v1 // K2: v2","s":"Add","u":"/api/client","h":"#add","p":1256},{"i":1268,"t":"ConnectionClose adds the Connection: close header. Signature func (a *Agent) ConnectionClose() *Agent Example agent.ConnectionClose() // ...","s":"ConnectionClose","u":"/api/client","h":"#connectionclose","p":1256},{"i":1270,"t":"UserAgent sets User-Agent header value. Signature func (a *Agent) UserAgent(userAgent string) *Agent func (a *Agent) UserAgentBytes(userAgent []byte) *Agent Example agent.UserAgent(\"fiber\") // ...","s":"UserAgent","u":"/api/client","h":"#useragent","p":1256},{"i":1272,"t":"Cookie sets a cookie in key: value form. Cookies can be used to set multiple cookies. Signature func (a *Agent) Cookie(key, value string) *Agent func (a *Agent) CookieBytesK(key []byte, value string) *Agent func (a *Agent) CookieBytesKV(key, value []byte) *Agent func (a *Agent) Cookies(kv ...string) *Agent func (a *Agent) CookiesBytesKV(kv ...[]byte) *Agent Example agent.Cookie(\"k\", \"v\") agent.Cookies(\"k1\", \"v1\", \"k2\", \"v2\") // ...","s":"Cookie","u":"/api/client","h":"#cookie","p":1256},{"i":1274,"t":"Referer sets the Referer header value. Signature func (a *Agent) Referer(referer string) *Agent func (a *Agent) RefererBytes(referer []byte) *Agent Example agent.Referer(\"https://docs.gofiber.io\") // ...","s":"Referer","u":"/api/client","h":"#referer","p":1256},{"i":1276,"t":"ContentType sets Content-Type header value. Signature func (a *Agent) ContentType(contentType string) *Agent func (a *Agent) ContentTypeBytes(contentType []byte) *Agent Example agent.ContentType(\"custom-type\") // ...","s":"ContentType","u":"/api/client","h":"#contenttype","p":1256},{"i":1278,"t":"Host sets the Host header. Signature func (a *Agent) Host(host string) *Agent func (a *Agent) HostBytes(host []byte) *Agent Example agent.Host(\"example.com\") // ...","s":"Host","u":"/api/client","h":"#host","p":1256},{"i":1280,"t":"QueryString sets the URI query string. Signature func (a *Agent) QueryString(queryString string) *Agent func (a *Agent) QueryStringBytes(queryString []byte) *Agent Example agent.QueryString(\"foo=bar\") // ...","s":"QueryString","u":"/api/client","h":"#querystring","p":1256},{"i":1282,"t":"BasicAuth sets the URI username and password using HTTP Basic Auth. Signature func (a *Agent) BasicAuth(username, password string) *Agent func (a *Agent) BasicAuthBytes(username, password []byte) *Agent Example agent.BasicAuth(\"foo\", \"bar\") // ...","s":"BasicAuth","u":"/api/client","h":"#basicauth","p":1256},{"i":1284,"t":"There are several ways to set request body. Signature func (a *Agent) BodyString(bodyString string) *Agent func (a *Agent) Body(body []byte) *Agent // BodyStream sets request body stream and, optionally body size. // // If bodySize is >= 0, then the bodyStream must provide exactly bodySize bytes // before returning io.EOF. // // If bodySize < 0, then bodyStream is read until io.EOF. // // bodyStream.Close() is called after finishing reading all body data // if it implements io.Closer. // // Note that GET and HEAD requests cannot have body. func (a *Agent) BodyStream(bodyStream io.Reader, bodySize int) *Agent Example agent.BodyString(\"foo=bar\") agent.Body([]byte(\"bar=baz\")) agent.BodyStream(strings.NewReader(\"body=stream\"), -1) // ...","s":"Body","u":"/api/client","h":"#body","p":1256},{"i":1286,"t":"JSON sends a JSON request by setting the Content-Type header to application/json. Signature func (a *Agent) JSON(v interface{}) *Agent Example agent.JSON(fiber.Map{\"success\": true}) // ...","s":"JSON","u":"/api/client","h":"#json","p":1256},{"i":1288,"t":"XML sends an XML request by setting the Content-Type header to application/xml. Signature func (a *Agent) XML(v interface{}) *Agent Example agent.XML(fiber.Map{\"success\": true}) // ...","s":"XML","u":"/api/client","h":"#xml","p":1256},{"i":1290,"t":"Form sends a form request by setting the Content-Type header to application/x-www-form-urlencoded. Signature // Form sends form request with body if args is non-nil. // // It is recommended obtaining args via AcquireArgs and release it // manually in performance-critical code. func (a *Agent) Form(args *Args) *Agent Example args := AcquireArgs() args.Set(\"foo\", \"bar\") agent.Form(args) // ... ReleaseArgs(args)","s":"Form","u":"/api/client","h":"#form","p":1256},{"i":1292,"t":"MultipartForm sends multipart form request by setting the Content-Type header to multipart/form-data. These requests can include key-value's and files. Signature // MultipartForm sends multipart form request with k-v and files. // // It is recommended to obtain args via AcquireArgs and release it // manually in performance-critical code. func (a *Agent) MultipartForm(args *Args) *Agent Example args := AcquireArgs() args.Set(\"foo\", \"bar\") agent.MultipartForm(args) // ... ReleaseArgs(args) Fiber provides several methods for sending files. Note that they must be called before MultipartForm. Boundary​ Boundary sets boundary for multipart form request. Signature func (a *Agent) Boundary(boundary string) *Agent Example agent.Boundary(\"myBoundary\") .MultipartForm(nil) // ... SendFile(s)​ SendFile read a file and appends it to a multipart form request. Sendfiles can be used to append multiple files. Signature func (a *Agent) SendFile(filename string, fieldname ...string) *Agent func (a *Agent) SendFiles(filenamesAndFieldnames ...string) *Agent Example agent.SendFile(\"f\", \"field name\") .SendFiles(\"f1\", \"field name1\", \"f2\"). .MultipartForm(nil) // ... FileData​ FileData appends file data for multipart form request. // FormFile represents multipart form file type FormFile struct { // Fieldname is form file's field name Fieldname string // Name is form file's name Name string // Content is form file's content Content []byte } Signature // FileData appends files for multipart form request. // // It is recommended obtaining formFile via AcquireFormFile and release it // manually in performance-critical code. func (a *Agent) FileData(formFiles ...*FormFile) *Agent Example ff1 := &FormFile{\"filename1\", \"field name1\", []byte(\"content\")} ff2 := &FormFile{\"filename2\", \"field name2\", []byte(\"content\")} agent.FileData(ff1, ff2). MultipartForm(nil) // ...","s":"MultipartForm","u":"/api/client","h":"#multipartform","p":1256},{"i":1294,"t":"Debug mode enables logging request and response detail to io.writer(default is os.Stdout). Signature func (a *Agent) Debug(w ...io.Writer) *Agent Example agent.Debug() // ...","s":"Debug","u":"/api/client","h":"#debug","p":1256},{"i":1296,"t":"Timeout sets request timeout duration. Signature func (a *Agent) Timeout(timeout time.Duration) *Agent Example agent.Timeout(time.Second) // ...","s":"Timeout","u":"/api/client","h":"#timeout","p":1256},{"i":1298,"t":"Reuse enables the Agent instance to be used again after one request. If agent is reusable, then it should be released manually when it is no longer used. Signature func (a *Agent) Reuse() *Agent Example agent.Reuse() // ...","s":"Reuse","u":"/api/client","h":"#reuse","p":1256},{"i":1300,"t":"InsecureSkipVerify controls whether the Agent verifies the server certificate chain and host name. Signature func (a *Agent) InsecureSkipVerify() *Agent Example agent.InsecureSkipVerify() // ...","s":"InsecureSkipVerify","u":"/api/client","h":"#insecureskipverify","p":1256},{"i":1302,"t":"TLSConfig sets tls config. Signature func (a *Agent) TLSConfig(config *tls.Config) *Agent Example // Create tls certificate cer, _ := tls.LoadX509KeyPair(\"pem\", \"key\") config := &tls.Config{ Certificates: []tls.Certificate{cer}, } agent.TLSConfig(config) // ...","s":"TLSConfig","u":"/api/client","h":"#tlsconfig","p":1256},{"i":1304,"t":"MaxRedirectsCount sets max redirect count for GET and HEAD. Signature func (a *Agent) MaxRedirectsCount(count int) *Agent Example agent.MaxRedirectsCount(7) // ...","s":"MaxRedirectsCount","u":"/api/client","h":"#maxredirectscount","p":1256},{"i":1306,"t":"JSONEncoder sets custom json encoder. Signature func (a *Agent) JSONEncoder(jsonEncoder utils.JSONMarshal) *Agent Example agent.JSONEncoder(json.Marshal) // ...","s":"JSONEncoder","u":"/api/client","h":"#jsonencoder","p":1256},{"i":1308,"t":"JSONDecoder sets custom json decoder. Signature func (a *Agent) JSONDecoder(jsonDecoder utils.JSONUnmarshal) *Agent Example agent.JSONDecoder(json.Unmarshal) // ...","s":"JSONDecoder","u":"/api/client","h":"#jsondecoder","p":1256},{"i":1310,"t":"Request returns Agent request instance. Signature func (a *Agent) Request() *Request Example req := agent.Request() // ...","s":"Request","u":"/api/client","h":"#request","p":1256},{"i":1312,"t":"SetResponse sets custom response for the Agent instance. It is recommended obtaining custom response via AcquireResponse and release it manually in performance-critical code. Signature func (a *Agent) SetResponse(customResp *Response) *Agent Example resp := AcquireResponse() agent.SetResponse(resp) // ... ReleaseResponse(resp)","s":"SetResponse","u":"/api/client","h":"#setresponse","p":1256},{"i":1314,"t":"Dest sets custom dest. The contents of dest will be replaced by the response body, if the dest is too small a new slice will be allocated. Signature func (a *Agent) Dest(dest []byte) *Agent { Example agent.Dest(nil) // ...","s":"Dest","u":"/api/client","h":"#dest","p":1256},{"i":1316,"t":"Bytes returns the status code, bytes body and errors of url. Signature func (a *Agent) Bytes() (code int, body []byte, errs []error) Example code, body, errs := agent.Bytes() // ...","s":"Bytes","u":"/api/client","h":"#bytes","p":1256},{"i":1318,"t":"String returns the status code, string body and errors of url. Signature func (a *Agent) String() (int, string, []error) Example code, body, errs := agent.String() // ...","s":"String","u":"/api/client","h":"#string","p":1256},{"i":1320,"t":"Struct returns the status code, bytes body and errors of url. And bytes body will be unmarshalled to given v. Signature func (a *Agent) Struct(v interface{}) (code int, body []byte, errs []error) Example var d data code, body, errs := agent.Struct(&d) // ...","s":"Struct","u":"/api/client","h":"#struct","p":1256},{"i":1322,"t":"RetryIf controls whether a retry should be attempted after an error. By default, will use isIdempotent function from fasthttp Signature func (a *Agent) RetryIf(retryIf RetryIfFunc) *Agent Example agent.Get(\"https://example.com\").RetryIf(func (req *fiber.Request) bool { return req.URI() == \"https://example.com\" }) // ...","s":"RetryIf","u":"/api/client","h":"#retryif","p":1256},{"i":1324,"t":"HTTP methods were copied from net/http. const ( MethodGet = \"GET\" // RFC 7231, 4.3.1 MethodHead = \"HEAD\" // RFC 7231, 4.3.2 MethodPost = \"POST\" // RFC 7231, 4.3.3 MethodPut = \"PUT\" // RFC 7231, 4.3.4 MethodPatch = \"PATCH\" // RFC 5789 MethodDelete = \"DELETE\" // RFC 7231, 4.3.5 MethodConnect = \"CONNECT\" // RFC 7231, 4.3.6 MethodOptions = \"OPTIONS\" // RFC 7231, 4.3.7 MethodTrace = \"TRACE\" // RFC 7231, 4.3.8 methodUse = \"USE\" ) MIME types that are commonly used const ( MIMETextXML = \"text/xml\" MIMETextHTML = \"text/html\" MIMETextPlain = \"text/plain\" MIMEApplicationXML = \"application/xml\" MIMEApplicationJSON = \"application/json\" MIMEApplicationJavaScript = \"application/javascript\" MIMEApplicationForm = \"application/x-www-form-urlencoded\" MIMEOctetStream = \"application/octet-stream\" MIMEMultipartForm = \"multipart/form-data\" MIMETextXMLCharsetUTF8 = \"text/xml; charset=utf-8\" MIMETextHTMLCharsetUTF8 = \"text/html; charset=utf-8\" MIMETextPlainCharsetUTF8 = \"text/plain; charset=utf-8\" MIMEApplicationXMLCharsetUTF8 = \"application/xml; charset=utf-8\" MIMEApplicationJSONCharsetUTF8 = \"application/json; charset=utf-8\" MIMEApplicationJavaScriptCharsetUTF8 = \"application/javascript; charset=utf-8\" ) HTTP status codes were copied from net/http. const ( StatusContinue = 100 // RFC 7231, 6.2.1 StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2 StatusProcessing = 102 // RFC 2518, 10.1 StatusEarlyHints = 103 // RFC 8297 StatusOK = 200 // RFC 7231, 6.3.1 StatusCreated = 201 // RFC 7231, 6.3.2 StatusAccepted = 202 // RFC 7231, 6.3.3 StatusNonAuthoritativeInformation = 203 // RFC 7231, 6.3.4 StatusNoContent = 204 // RFC 7231, 6.3.5 StatusResetContent = 205 // RFC 7231, 6.3.6 StatusPartialContent = 206 // RFC 7233, 4.1 StatusMultiStatus = 207 // RFC 4918, 11.1 StatusAlreadyReported = 208 // RFC 5842, 7.1 StatusIMUsed = 226 // RFC 3229, 10.4.1 StatusMultipleChoices = 300 // RFC 7231, 6.4.1 StatusMovedPermanently = 301 // RFC 7231, 6.4.2 StatusFound = 302 // RFC 7231, 6.4.3 StatusSeeOther = 303 // RFC 7231, 6.4.4 StatusNotModified = 304 // RFC 7232, 4.1 StatusUseProxy = 305 // RFC 7231, 6.4.5 StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7 StatusPermanentRedirect = 308 // RFC 7538, 3 StatusBadRequest = 400 // RFC 7231, 6.5.1 StatusUnauthorized = 401 // RFC 7235, 3.1 StatusPaymentRequired = 402 // RFC 7231, 6.5.2 StatusForbidden = 403 // RFC 7231, 6.5.3 StatusNotFound = 404 // RFC 7231, 6.5.4 StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5 StatusNotAcceptable = 406 // RFC 7231, 6.5.6 StatusProxyAuthRequired = 407 // RFC 7235, 3.2 StatusRequestTimeout = 408 // RFC 7231, 6.5.7 StatusConflict = 409 // RFC 7231, 6.5.8 StatusGone = 410 // RFC 7231, 6.5.9 StatusLengthRequired = 411 // RFC 7231, 6.5.10 StatusPreconditionFailed = 412 // RFC 7232, 4.2 StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11 StatusRequestURITooLong = 414 // RFC 7231, 6.5.12 StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13 StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4 StatusExpectationFailed = 417 // RFC 7231, 6.5.14 StatusTeapot = 418 // RFC 7168, 2.3.3 StatusMisdirectedRequest = 421 // RFC 7540, 9.1.2 StatusUnprocessableEntity = 422 // RFC 4918, 11.2 StatusLocked = 423 // RFC 4918, 11.3 StatusFailedDependency = 424 // RFC 4918, 11.4 StatusTooEarly = 425 // RFC 8470, 5.2. StatusUpgradeRequired = 426 // RFC 7231, 6.5.15 StatusPreconditionRequired = 428 // RFC 6585, 3 StatusTooManyRequests = 429 // RFC 6585, 4 StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5 StatusUnavailableForLegalReasons = 451 // RFC 7725, 3 StatusInternalServerError = 500 // RFC 7231, 6.6.1 StatusNotImplemented = 501 // RFC 7231, 6.6.2 StatusBadGateway = 502 // RFC 7231, 6.6.3 StatusServiceUnavailable = 503 // RFC 7231, 6.6.4 StatusGatewayTimeout = 504 // RFC 7231, 6.6.5 StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6 StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1 StatusInsufficientStorage = 507 // RFC 4918, 11.5 StatusLoopDetected = 508 // RFC 5842, 7.2 StatusNotExtended = 510 // RFC 2774, 7 StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6 ) Errors var ( ErrBadRequest = NewError(StatusBadRequest) // RFC 7231, 6.5.1 ErrUnauthorized = NewError(StatusUnauthorized) // RFC 7235, 3.1 ErrPaymentRequired = NewError(StatusPaymentRequired) // RFC 7231, 6.5.2 ErrForbidden = NewError(StatusForbidden) // RFC 7231, 6.5.3 ErrNotFound = NewError(StatusNotFound) // RFC 7231, 6.5.4 ErrMethodNotAllowed = NewError(StatusMethodNotAllowed) // RFC 7231, 6.5.5 ErrNotAcceptable = NewError(StatusNotAcceptable) // RFC 7231, 6.5.6 ErrProxyAuthRequired = NewError(StatusProxyAuthRequired) // RFC 7235, 3.2 ErrRequestTimeout = NewError(StatusRequestTimeout) // RFC 7231, 6.5.7 ErrConflict = NewError(StatusConflict) // RFC 7231, 6.5.8 ErrGone = NewError(StatusGone) // RFC 7231, 6.5.9 ErrLengthRequired = NewError(StatusLengthRequired) // RFC 7231, 6.5.10 ErrPreconditionFailed = NewError(StatusPreconditionFailed) // RFC 7232, 4.2 ErrRequestEntityTooLarge = NewError(StatusRequestEntityTooLarge) // RFC 7231, 6.5.11 ErrRequestURITooLong = NewError(StatusRequestURITooLong) // RFC 7231, 6.5.12 ErrUnsupportedMediaType = NewError(StatusUnsupportedMediaType) // RFC 7231, 6.5.13 ErrRequestedRangeNotSatisfiable = NewError(StatusRequestedRangeNotSatisfiable) // RFC 7233, 4.4 ErrExpectationFailed = NewError(StatusExpectationFailed) // RFC 7231, 6.5.14 ErrTeapot = NewError(StatusTeapot) // RFC 7168, 2.3.3 ErrMisdirectedRequest = NewError(StatusMisdirectedRequest) // RFC 7540, 9.1.2 ErrUnprocessableEntity = NewError(StatusUnprocessableEntity) // RFC 4918, 11.2 ErrLocked = NewError(StatusLocked) // RFC 4918, 11.3 ErrFailedDependency = NewError(StatusFailedDependency) // RFC 4918, 11.4 ErrTooEarly = NewError(StatusTooEarly) // RFC 8470, 5.2. ErrUpgradeRequired = NewError(StatusUpgradeRequired) // RFC 7231, 6.5.15 ErrPreconditionRequired = NewError(StatusPreconditionRequired) // RFC 6585, 3 ErrTooManyRequests = NewError(StatusTooManyRequests) // RFC 6585, 4 ErrRequestHeaderFieldsTooLarge = NewError(StatusRequestHeaderFieldsTooLarge) // RFC 6585, 5 ErrUnavailableForLegalReasons = NewError(StatusUnavailableForLegalReasons) // RFC 7725, 3 ErrInternalServerError = NewError(StatusInternalServerError) // RFC 7231, 6.6.1 ErrNotImplemented = NewError(StatusNotImplemented) // RFC 7231, 6.6.2 ErrBadGateway = NewError(StatusBadGateway) // RFC 7231, 6.6.3 ErrServiceUnavailable = NewError(StatusServiceUnavailable) // RFC 7231, 6.6.4 ErrGatewayTimeout = NewError(StatusGatewayTimeout) // RFC 7231, 6.6.5 ErrHTTPVersionNotSupported = NewError(StatusHTTPVersionNotSupported) // RFC 7231, 6.6.6 ErrVariantAlsoNegotiates = NewError(StatusVariantAlsoNegotiates) // RFC 2295, 8.1 ErrInsufficientStorage = NewError(StatusInsufficientStorage) // RFC 4918, 11.5 ErrLoopDetected = NewError(StatusLoopDetected) // RFC 5842, 7.2 ErrNotExtended = NewError(StatusNotExtended) // RFC 2774, 7 ErrNetworkAuthenticationRequired = NewError(StatusNetworkAuthenticationRequired) // RFC 6585, 6 ) HTTP Headers were copied from net/http. const ( HeaderAuthorization = \"Authorization\" HeaderProxyAuthenticate = \"Proxy-Authenticate\" HeaderProxyAuthorization = \"Proxy-Authorization\" HeaderWWWAuthenticate = \"WWW-Authenticate\" HeaderAge = \"Age\" HeaderCacheControl = \"Cache-Control\" HeaderClearSiteData = \"Clear-Site-Data\" HeaderExpires = \"Expires\" HeaderPragma = \"Pragma\" HeaderWarning = \"Warning\" HeaderAcceptCH = \"Accept-CH\" HeaderAcceptCHLifetime = \"Accept-CH-Lifetime\" HeaderContentDPR = \"Content-DPR\" HeaderDPR = \"DPR\" HeaderEarlyData = \"Early-Data\" HeaderSaveData = \"Save-Data\" HeaderViewportWidth = \"Viewport-Width\" HeaderWidth = \"Width\" HeaderETag = \"ETag\" HeaderIfMatch = \"If-Match\" HeaderIfModifiedSince = \"If-Modified-Since\" HeaderIfNoneMatch = \"If-None-Match\" HeaderIfUnmodifiedSince = \"If-Unmodified-Since\" HeaderLastModified = \"Last-Modified\" HeaderVary = \"Vary\" HeaderConnection = \"Connection\" HeaderKeepAlive = \"Keep-Alive\" HeaderAccept = \"Accept\" HeaderAcceptCharset = \"Accept-Charset\" HeaderAcceptEncoding = \"Accept-Encoding\" HeaderAcceptLanguage = \"Accept-Language\" HeaderCookie = \"Cookie\" HeaderExpect = \"Expect\" HeaderMaxForwards = \"Max-Forwards\" HeaderSetCookie = \"Set-Cookie\" HeaderAccessControlAllowCredentials = \"Access-Control-Allow-Credentials\" HeaderAccessControlAllowHeaders = \"Access-Control-Allow-Headers\" HeaderAccessControlAllowMethods = \"Access-Control-Allow-Methods\" HeaderAccessControlAllowOrigin = \"Access-Control-Allow-Origin\" HeaderAccessControlExposeHeaders = \"Access-Control-Expose-Headers\" HeaderAccessControlMaxAge = \"Access-Control-Max-Age\" HeaderAccessControlRequestHeaders = \"Access-Control-Request-Headers\" HeaderAccessControlRequestMethod = \"Access-Control-Request-Method\" HeaderOrigin = \"Origin\" HeaderTimingAllowOrigin = \"Timing-Allow-Origin\" HeaderXPermittedCrossDomainPolicies = \"X-Permitted-Cross-Domain-Policies\" HeaderDNT = \"DNT\" HeaderTk = \"Tk\" HeaderContentDisposition = \"Content-Disposition\" HeaderContentEncoding = \"Content-Encoding\" HeaderContentLanguage = \"Content-Language\" HeaderContentLength = \"Content-Length\" HeaderContentLocation = \"Content-Location\" HeaderContentType = \"Content-Type\" HeaderForwarded = \"Forwarded\" HeaderVia = \"Via\" HeaderXForwardedFor = \"X-Forwarded-For\" HeaderXForwardedHost = \"X-Forwarded-Host\" HeaderXForwardedProto = \"X-Forwarded-Proto\" HeaderXForwardedProtocol = \"X-Forwarded-Protocol\" HeaderXForwardedSsl = \"X-Forwarded-Ssl\" HeaderXUrlScheme = \"X-Url-Scheme\" HeaderLocation = \"Location\" HeaderFrom = \"From\" HeaderHost = \"Host\" HeaderReferer = \"Referer\" HeaderReferrerPolicy = \"Referrer-Policy\" HeaderUserAgent = \"User-Agent\" HeaderAllow = \"Allow\" HeaderServer = \"Server\" HeaderAcceptRanges = \"Accept-Ranges\" HeaderContentRange = \"Content-Range\" HeaderIfRange = \"If-Range\" HeaderRange = \"Range\" HeaderContentSecurityPolicy = \"Content-Security-Policy\" HeaderContentSecurityPolicyReportOnly = \"Content-Security-Policy-Report-Only\" HeaderCrossOriginResourcePolicy = \"Cross-Origin-Resource-Policy\" HeaderExpectCT = \"Expect-CT\" HeaderFeaturePolicy = \"Feature-Policy\" HeaderPublicKeyPins = \"Public-Key-Pins\" HeaderPublicKeyPinsReportOnly = \"Public-Key-Pins-Report-Only\" HeaderStrictTransportSecurity = \"Strict-Transport-Security\" HeaderUpgradeInsecureRequests = \"Upgrade-Insecure-Requests\" HeaderXContentTypeOptions = \"X-Content-Type-Options\" HeaderXDownloadOptions = \"X-Download-Options\" HeaderXFrameOptions = \"X-Frame-Options\" HeaderXPoweredBy = \"X-Powered-By\" HeaderXXSSProtection = \"X-XSS-Protection\" HeaderLastEventID = \"Last-Event-ID\" HeaderNEL = \"NEL\" HeaderPingFrom = \"Ping-From\" HeaderPingTo = \"Ping-To\" HeaderReportTo = \"Report-To\" HeaderTE = \"TE\" HeaderTrailer = \"Trailer\" HeaderTransferEncoding = \"Transfer-Encoding\" HeaderSecWebSocketAccept = \"Sec-WebSocket-Accept\" HeaderSecWebSocketExtensions = \"Sec-WebSocket-Extensions\" HeaderSecWebSocketKey = \"Sec-WebSocket-Key\" HeaderSecWebSocketProtocol = \"Sec-WebSocket-Protocol\" HeaderSecWebSocketVersion = \"Sec-WebSocket-Version\" HeaderAcceptPatch = \"Accept-Patch\" HeaderAcceptPushPolicy = \"Accept-Push-Policy\" HeaderAcceptSignature = \"Accept-Signature\" HeaderAltSvc = \"Alt-Svc\" HeaderDate = \"Date\" HeaderIndex = \"Index\" HeaderLargeAllocation = \"Large-Allocation\" HeaderLink = \"Link\" HeaderPushPolicy = \"Push-Policy\" HeaderRetryAfter = \"Retry-After\" HeaderServerTiming = \"Server-Timing\" HeaderSignature = \"Signature\" HeaderSignedHeaders = \"Signed-Headers\" HeaderSourceMap = \"SourceMap\" HeaderUpgrade = \"Upgrade\" HeaderXDNSPrefetchControl = \"X-DNS-Prefetch-Control\" HeaderXPingback = \"X-Pingback\" HeaderXRequestID = \"X-Request-ID\" HeaderXRequestedWith = \"X-Requested-With\" HeaderXRobotsTag = \"X-Robots-Tag\" HeaderXUACompatible = \"X-UA-Compatible\" )","s":"📋 Constants","u":"/api/constants","h":"","p":1323},{"i":1327,"t":"This method creates a new App named instance. You can pass optional config when creating a new instance. Signature func New(config ...Config) *App Example // Default config app := fiber.New() // ...","s":"New","u":"/api/fiber","h":"#new","p":1325},{"i":1329,"t":"You can pass an optional Config when creating a new Fiber instance. Example // Custom config app := fiber.New(fiber.Config{ Prefork: true, CaseSensitive: true, StrictRouting: true, ServerHeader: \"Fiber\", AppName: \"Test App v1.0.1\" }) // ... Config fields Property Type Description Default AppName string This allows to setup app name for the app \"\" 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 CaseSensitive bool When enabled, /Foo and /foo are different routes. When disabled, /Fooand /foo are treated the same. false ColorScheme Colors You can define custom color scheme. They'll be used for startup message, route list and some middlewares. DefaultColors CompressedFileSuffix string Adds a suffix to the original file name and tries saving the resulting compressed file under the new file name. \".fiber.gz\" Concurrency int Maximum number of concurrent connections. 256 * 1024 DisableDefaultContentType bool When set to true, causes the default Content-Type header to be excluded from the Response. false DisableDefaultDate bool When set to true causes the default date header to be excluded from the response. false DisableHeaderNormalizing bool By default all header names are normalized: conteNT-tYPE -> Content-Type false DisableKeepalive bool Disable keep-alive connections, the server will close incoming connections after sending the first response to the client false DisablePreParseMultipartForm bool Will not pre parse Multipart Form data if set to true. This option is useful for servers that desire to treat multipart form data as a binary blob, or choose when to parse the data. false DisableStartupMessage bool When set to true, it will not print out debug information false ETag bool Enable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method (CRC-32). Weak ETags are the default when enabled. false EnableIPValidation bool If set to true, c.IP() and c.IPs() will validate IP addresses before returning them. Also, c.IP() will return only the first valid IP rather than just the raw header value that may be a comma seperated string. WARNING: There is a small performance cost to doing this validation. Keep disabled if speed is your only concern and your application is behind a trusted proxy that already validates this header. false EnablePrintRoutes bool EnablePrintRoutes enables print all routes with their method, path, name and handler.. false EnableTrustedProxyCheck bool When set to true, fiber will check whether proxy is trusted, using TrustedProxies list. By default c.Protocol() will get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header, c.IP() will get value from ProxyHeader header, c.Hostname() will get value from X-Forwarded-Host header. If EnableTrustedProxyCheck is true, and RemoteIP is in the list of TrustedProxies c.Protocol(), c.IP(), and c.Hostname() will have the same behaviour when EnableTrustedProxyCheck disabled, if RemoteIP isn't in the list, c.Protocol() will return https in case when tls connection is handled by the app, or http otherwise, c.IP() will return RemoteIP() from fasthttp context, c.Hostname() will return fasthttp.Request.URI().Host() false ErrorHandler ErrorHandler ErrorHandler is executed when an error is returned from fiber.Handler. Mounted fiber error handlers are retained by the top-level app and applied on prefix associated requests. DefaultErrorHandler GETOnly bool Rejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests. The request size is limited by ReadBufferSize if GETOnly is set. false 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 Immutable bool When enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see issue #185. false JSONDecoder utils.JSONUnmarshal Allowing for flexibility in using another json library for decoding. json.Unmarshal JSONEncoder utils.JSONMarshal Allowing for flexibility in using another json library for encoding. json.Marshal Network string Known networks are \"tcp\", \"tcp4\" (IPv4-only), \"tcp6\" (IPv6-only) WARNING: When prefork is set to true, only \"tcp4\" and \"tcp6\" can be chosen. NetworkTCP4 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 Prefork bool Enables use of theSO_REUSEPORTsocket option. This will spawn multiple Go processes listening on the same port. learn more about socket sharding. NOTE: if enabled, the application will need to be ran through a shell because prefork mode sets environment variables. If you're using Docker, make sure the app is ran with CMD ./app or CMD [\"sh\", \"-c\", \"/app\"]. For more info, see this issue comment. false ProxyHeader string This will enable c.IP() to return the value of the given header key. By default c.IP()will return the Remote IP from the TCP connection, this property can be useful if you are behind a load balancer e.g. X-Forwarded-*. \"\" ReadBufferSize int per-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies). 4096 ReadTimeout time.Duration The amount of time allowed to read the full request, including the body. The default timeout is unlimited. nil RequestMethods []string RequestMethods provides customizibility for HTTP methods. You can add/remove methods as you wish. DefaultMethods ServerHeader string Enables the Server HTTP header with the given value. \"\" StreamRequestBody bool StreamRequestBody enables request body streaming, and calls the handler sooner when given body is larger then the current limit. false StrictRouting bool When enabled, the router treats /foo and /foo/ as different. Otherwise, the router treats /foo and /foo/ as the same. false TrustedProxies []string Contains the list of trusted proxy IP's. Look at EnableTrustedProxyCheck doc. It can take IP or IP range addresses. If it gets IP range, it iterates all possible addresses. []string*__* UnescapePath bool Converts all encoded characters in the route back before setting the path for the context, so that the routing can also work with URL encoded special characters false 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. \"\" WriteBufferSize int Per-connection buffer size for responses' writing. 4096 WriteTimeout time.Duration The maximum duration before timing out writes of the response. The default timeout is unlimited. nil XMLEncoder utils.XMLMarshal Allowing for flexibility in using another XML library for encoding. xml.Marshal","s":"Config","u":"/api/fiber","h":"#config","p":1325},{"i":1331,"t":"NewError creates a new HTTPError instance with an optional message. Signature func NewError(code int, message ...string) *Error Example app.Get(\"/\", func(c *fiber.Ctx) error { return fiber.NewError(782, \"Custom error message\") })","s":"NewError","u":"/api/fiber","h":"#newerror","p":1325},{"i":1333,"t":"IsChild determines if the current process is a result of Prefork. Signature func IsChild() bool Example // Prefork will spawn child processes app := fiber.New(fiber.Config{ Prefork: true, }) if !fiber.IsChild() { fmt.Println(\"I'm the parent process\") } else { fmt.Println(\"I'm a child process\") } // ...","s":"IsChild","u":"/api/fiber","h":"#ischild","p":1325},{"i":1335,"t":"Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!","s":"Adaptor","u":"/api/middleware/adaptor","h":"","p":1334},{"i":1337,"t":"Name Signature Description HTTPHandler HTTPHandler(h http.Handler) fiber.Handler http.Handler -> fiber.Handler HTTPHandlerFunc HTTPHandlerFunc(h http.HandlerFunc) fiber.Handler http.HandlerFunc -> fiber.Handler HTTPMiddleware HTTPHandlerFunc(mw func(http.Handler) http.Handler) fiber.Handler func(http.Handler) http.Handler -> fiber.Handler FiberHandler FiberHandler(h fiber.Handler) http.Handler fiber.Handler -> http.Handler FiberHandlerFunc FiberHandlerFunc(h fiber.Handler) http.HandlerFunc fiber.Handler -> http.HandlerFunc FiberApp FiberApp(app *fiber.App) http.HandlerFunc Fiber app -> http.HandlerFunc ConvertRequest ConvertRequest(c *fiber.Ctx, forServer bool) (*http.Request, error) fiber.Ctx -> http.Request CopyContextToFiberContext CopyContextToFiberContext(context interface{}, requestContext *fasthttp.RequestCtx) context.Context -> fasthttp.RequestCtx","s":"Signatures","u":"/api/middleware/adaptor","h":"#signatures","p":1334},{"i":1340,"t":"package main import ( \"fmt\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // New fiber app app := fiber.New() // http.Handler -> fiber.Handler app.Get(\"/\", adaptor.HTTPHandler(handler(greet))) // http.HandlerFunc -> fiber.Handler app.Get(\"/func\", adaptor.HTTPHandlerFunc(greet)) // Listen on port 3000 app.Listen(\":3000\") } func handler(f http.HandlerFunc) http.Handler { return http.HandlerFunc(f) } func greet(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, \"Hello World!\") }","s":"net/http to Fiber","u":"/api/middleware/adaptor","h":"#nethttp-to-fiber","p":1334},{"i":1342,"t":"package main import ( \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // New fiber app app := fiber.New() // http middleware -> fiber.Handler app.Use(adaptor.HTTPMiddleware(logMiddleware)) // Listen on port 3000 app.Listen(\":3000\") } func logMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { log.Println(\"log middleware\") next.ServeHTTP(w, r) }) }","s":"net/http middleware to Fiber","u":"/api/middleware/adaptor","h":"#nethttp-middleware-to-fiber","p":1334},{"i":1344,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { // fiber.Handler -> http.Handler http.Handle(\"/\", adaptor.FiberHandler(greet)) // fiber.Handler -> http.HandlerFunc http.HandleFunc(\"/func\", adaptor.FiberHandlerFunc(greet)) // Listen on port 3000 http.ListenAndServe(\":3000\", nil) } func greet(c *fiber.Ctx) error { return c.SendString(\"Hello World!\") }","s":"Fiber Handler to net/http","u":"/api/middleware/adaptor","h":"#fiber-handler-to-nethttp","p":1334},{"i":1346,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { app := fiber.New() app.Get(\"/greet\", greet) // Listen on port 3000 http.ListenAndServe(\":3000\", adaptor.FiberApp(app)) } func greet(c *fiber.Ctx) error { return c.SendString(\"Hello World!\") }","s":"Fiber App to net/http","u":"/api/middleware/adaptor","h":"#fiber-app-to-nethttp","p":1334},{"i":1348,"t":"package main import ( \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/adaptor\" ) func main() { app := fiber.New() app.Get(\"/greet\", greetWithHTTPReq) // Listen on port 3000 http.ListenAndServe(\":3000\", adaptor.FiberApp(app)) } func greetWithHTTPReq(c *fiber.Ctx) error { httpReq, err := adaptor.ConvertRequest(c, false) if err != nil { return err } return c.SendString(\"Request URL: \" + httpReq.URL.String()) }","s":"Fiber Context to (net/http).Request","u":"/api/middleware/adaptor","h":"#fiber-context-to-nethttprequest","p":1334},{"i":1350,"t":"Basic Authentication middleware for Fiber that provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized or a custom response for missing or invalid credentials.","s":"BasicAuth","u":"/api/middleware/basicauth","h":"","p":1349},{"i":1352,"t":"func New(config Config) fiber.Handler","s":"Signatures","u":"/api/middleware/basicauth","h":"#signatures","p":1349},{"i":1354,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/basicauth\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config app.Use(basicauth.New(basicauth.Config{ Users: map[string]string{ \"john\": \"doe\", \"admin\": \"123456\", }, })) // Or extend your config for customization app.Use(basicauth.New(basicauth.Config{ Users: map[string]string{ \"john\": \"doe\", \"admin\": \"123456\", }, Realm: \"Forbidden\", Authorizer: func(user, pass string) bool { if user == \"john\" && pass == \"doe\" { return true } if user == \"admin\" && pass == \"123456\" { return true } return false }, Unauthorized: func(c *fiber.Ctx) error { return c.SendFile(\"./unauthorized.html\") }, ContextUsername: \"_user\", ContextPassword: \"_pass\", }))","s":"Examples","u":"/api/middleware/basicauth","h":"#examples","p":1349},{"i":1356,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Users defines the allowed credentials // // Required. Default: map[string]string{} Users map[string]string // Realm is a string to define realm attribute of BasicAuth. // the realm identifies the system to authenticate against // and can be used by clients to save credentials // // Optional. Default: \"Restricted\". Realm string // Authorizer defines a function you can pass // to check the credentials however you want. // It will be called with a username and password // and is expected to return true or false to indicate // that the credentials were approved or not. // // Optional. Default: nil. Authorizer func(string, string) bool // Unauthorized defines the response body for unauthorized responses. // By default it will return with a 401 Unauthorized and the correct WWW-Auth header // // Optional. Default: nil Unauthorized fiber.Handler // ContextUser is the key to store the username in Locals // // Optional. Default: \"username\" ContextUsername string // ContextPass is the key to store the password in Locals // // Optional. Default: \"password\" ContextPassword string }","s":"Config","u":"/api/middleware/basicauth","h":"#config","p":1349},{"i":1358,"t":"var ConfigDefault = Config{ Next: nil, Users: map[string]string{}, Realm: \"Restricted\", Authorizer: nil, Unauthorized: nil, ContextUsername: \"username\", ContextPassword: \"password\", }","s":"Default Config","u":"/api/middleware/basicauth","h":"#default-config","p":1349},{"i":1360,"t":"Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core! Request Directives Cache-Control: no-cache will return the up-to-date response but still caches it. You will always get a miss cache status. Cache-Control: no-store will refrain from caching. You will always get the up-to-date response.","s":"Cache","u":"/api/middleware/cache","h":"","p":1359},{"i":1362,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/cache","h":"#signatures","p":1359},{"i":1364,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/cache\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(cache.New()) // Or extend your config for customization app.Use(cache.New(cache.Config{ Next: func(c *fiber.Ctx) bool { return c.Query(\"refresh\") == \"true\" }, Expiration: 30 * time.Minute, CacheControl: true, })) Or you can custom key and expire time like this: app.Use(cache.New(cache.Config{ ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration { newCacheTime, _ := strconv.Atoi(c.GetRespHeader(\"Cache-Time\", \"600\")) return time.Second * time.Duration(newCacheTime) }, KeyGenerator: func(c *fiber.Ctx) string { return utils.CopyString(c.Path()) }, })) app.Get(\"/\", func(c *fiber.Ctx) error { c.Response().Header.Add(\"Cache-Time\", \"6000\") return c.SendString(\"hi\") })","s":"Examples","u":"/api/middleware/cache","h":"#examples","p":1359},{"i":1366,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Expiration is the time that an cached response will live // // Optional. Default: 1 * time.Minute Expiration time.Duration // CacheHeader header on response header, indicate cache status, with the following possible return value // // hit, miss, unreachable // // Optional. Default: X-Cache CacheHeader string // CacheControl enables client side caching if set to true // // Optional. Default: false CacheControl bool // Key allows you to generate custom keys, by default c.Path() is used // // Default: func(c *fiber.Ctx) string { // return utils.CopyString(c.Path()) // } 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 // Store is used to store the state of the middleware // // Default: an in memory store for this process only Storage fiber.Storage // allows you to store additional headers generated by next middlewares & handler // // Default: false StoreResponseHeaders bool // Max number of bytes of response bodies simultaneously stored in cache. When limit is reached, // entries with the nearest expiration are deleted to make room for new. // 0 means no limit // // Default: 0 MaxBytes uint // You can specify HTTP methods to cache. // The middleware just caches the routes of its methods in this slice. // // Default: []string{fiber.MethodGet, fiber.MethodHead} Methods []string }","s":"Config","u":"/api/middleware/cache","h":"#config","p":1359},{"i":1368,"t":"var ConfigDefault = Config{ Next: nil, Expiration: 1 * time.Minute, CacheHeader: \"X-Cache\", CacheControl: false, KeyGenerator: func(c *fiber.Ctx) string { return utils.CopyString(c.Path()) }, ExpirationGenerator: nil, StoreResponseHeaders: false, Storage: nil, MaxBytes: 0, Methods: []string{fiber.MethodGet, fiber.MethodHead}, }","s":"Default Config","u":"/api/middleware/cache","h":"#default-config","p":1359},{"i":1370,"t":"Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.","s":"Compress","u":"/api/middleware/compress","h":"","p":1369},{"i":1372,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/compress","h":"#signatures","p":1369},{"i":1374,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/compress\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(compress.New()) // Or extend your config for customization app.Use(compress.New(compress.Config{ Level: compress.LevelBestSpeed, // 1 })) // Skip middleware for specific routes app.Use(compress.New(compress.Config{ Next: func(c *fiber.Ctx) bool { return c.Path() == \"/dont_compress\" }, Level: compress.LevelBestSpeed, // 1 }))","s":"Examples","u":"/api/middleware/compress","h":"#examples","p":1369},{"i":1376,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Level determines the compression algoritm // // Optional. Default: LevelDefault // LevelDisabled: -1 // LevelDefault: 0 // LevelBestSpeed: 1 // LevelBestCompression: 2 Level int }","s":"Config","u":"/api/middleware/compress","h":"#config","p":1369},{"i":1378,"t":"var ConfigDefault = Config{ Next: nil, Level: LevelDefault, }","s":"Default Config","u":"/api/middleware/compress","h":"#default-config","p":1369},{"i":1380,"t":"// Compression levels const ( LevelDisabled = -1 LevelDefault = 0 LevelBestSpeed = 1 LevelBestCompression = 2 )","s":"Constants","u":"/api/middleware/compress","h":"#constants","p":1369},{"i":1382,"t":"CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.","s":"CORS","u":"/api/middleware/cors","h":"","p":1381},{"i":1384,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/cors","h":"#signatures","p":1381},{"i":1386,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/cors\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(cors.New()) // Or extend your config for customization app.Use(cors.New(cors.Config{ AllowOrigins: \"https://gofiber.io, https://gofiber.net\", AllowHeaders: \"Origin, Content-Type, Accept\", })) Using the AllowOriginsFunc function. In this example any origin will be allowed via CORS. For example, if a browser running on http://localhost:3000 sends a request, this will be accepted and the access-control-allow-origin response header will be set to http://localhost:3000. Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via AllowOrigins. app.Use(cors.New()) app.Use(cors.New(cors.Config{ AllowOriginsFunc: func(origin string) bool { return os.Getenv(\"ENVIRONMENT\") == \"development\" }, }))","s":"Examples","u":"/api/middleware/cors","h":"#examples","p":1381},{"i":1388,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // AllowOriginsFunc defines a function that will set the 'access-control-allow-origin' // response header to the 'origin' request header when returned true. // // Note: Using this feature is discouraged in production and it's best practice to explicitly // set CORS origins via 'AllowOrigins' // // Optional. Default: nil AllowOriginsFunc func(origin string) bool // AllowOrigin defines a list of origins that may access the resource. // // Optional. Default value \"*\" AllowOrigins string // AllowMethods defines a list methods allowed when accessing the resource. // This is used in response to a preflight request. // // Optional. Default value \"GET,POST,HEAD,PUT,DELETE,PATCH\" AllowMethods string // AllowHeaders defines a list of request headers that can be used when // making the actual request. This is in response to a preflight request. // // Optional. Default value \"\". AllowHeaders string // AllowCredentials indicates whether or not the response to the request // can be exposed when the credentials flag is true. When used as part of // a response to a preflight request, this indicates whether or not the // actual request can be made using credentials. // // Optional. Default value false. AllowCredentials bool // ExposeHeaders defines a whitelist headers that clients are allowed to // access. // // Optional. Default value \"\". ExposeHeaders string // MaxAge indicates how long (in seconds) the results of a preflight request // can be cached. // // Optional. Default value 0. MaxAge int }","s":"Config","u":"/api/middleware/cors","h":"#config","p":1381},{"i":1390,"t":"var ConfigDefault = Config{ Next: nil, AllowOriginsFunc: nil, AllowOrigins: \"*\", AllowMethods: strings.Join([]string{ fiber.MethodGet, fiber.MethodPost, fiber.MethodHead, fiber.MethodPut, fiber.MethodDelete, fiber.MethodPatch, }, \",\"), AllowHeaders: \"\", AllowCredentials: false, ExposeHeaders: \"\", MaxAge: 0, }","s":"Default Config","u":"/api/middleware/cors","h":"#default-config","p":1381},{"i":1392,"t":"CSRF middleware for Fiber that provides Cross-site request forgery protection by passing a csrf token via cookies. This cookie value will be used to compare against the client csrf token on requests, other than those defined as \"safe\" by RFC7231 (GET, HEAD, OPTIONS, or TRACE). When the csrf token is invalid, this middleware will return the fiber.ErrForbidden error. CSRF Tokens are generated on GET requests. You can retrieve the CSRF token with c.Locals(contextKey), where contextKey is the string you set in the config (see Custom Config below). When no csrf_ cookie is set, or the token has expired, a new token will be generated and csrf_ cookie set. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.","s":"CSRF","u":"/api/middleware/csrf","h":"","p":1391},{"i":1394,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/csrf","h":"#signatures","p":1391},{"i":1396,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/csrf\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(csrf.New()) // Or extend your config for customization app.Use(csrf.New(csrf.Config{ KeyLookup: \"header:X-Csrf-Token\", CookieName: \"csrf_\", CookieSameSite: \"Lax\", Expiration: 1 * time.Hour, KeyGenerator: utils.UUID, Extractor: func(c *fiber.Ctx) (string, error) { ... }, })) note KeyLookup will be ignored if Extractor is explicitly set.","s":"Examples","u":"/api/middleware/csrf","h":"#examples","p":1391},{"i":1398,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // KeyLookup is a string in the form of \":\" that is used // to create an Extractor that extracts the token from the request. // Possible values: // - \"header:\" // - \"query:\" // - \"param:\" // - \"form:\" // - \"cookie:\" // // Ignored if an Extractor is explicitly set. // // Optional. Default: \"header:X-CSRF-Token\" KeyLookup string // Name of the session cookie. This cookie will store session key. // Optional. Default value \"csrf_\". CookieName string // Domain of the CSRF cookie. // Optional. Default value \"\". CookieDomain string // Path of the CSRF cookie. // Optional. Default value \"\". CookiePath string // Indicates if CSRF cookie is secure. // Optional. Default value false. CookieSecure bool // Indicates if CSRF cookie is HTTP only. // Optional. Default value false. CookieHTTPOnly bool // Indicates if CSRF cookie is requested by SameSite. // Optional. Default value \"Lax\". CookieSameSite string // Decides whether cookie should last for only the browser sesison. // Ignores Expiration if set to true CookieSessionOnly bool // Expiration is the duration before csrf token will expire // // Optional. Default: 1 * time.Hour Expiration time.Duration // Store is used to store the state of the middleware // // Optional. Default: memory.New() Storage fiber.Storage // Context key to store generated CSRF token into context. // If left empty, token will not be stored in context. // // Optional. Default: \"\" ContextKey string // KeyGenerator creates a new CSRF token // // Optional. Default: utils.UUID KeyGenerator func() string // Extractor returns the csrf token // // If set this will be used in place of an Extractor based on KeyLookup. // // Optional. Default will create an Extractor based on KeyLookup. Extractor func(c *fiber.Ctx) (string, error) }","s":"Config","u":"/api/middleware/csrf","h":"#config","p":1391},{"i":1400,"t":"var ConfigDefault = Config{ KeyLookup: \"header:\" + HeaderName, CookieName: \"csrf_\", CookieSameSite: \"Lax\", Expiration: 1 * time.Hour, KeyGenerator: utils.UUID, ErrorHandler: defaultErrorHandler, Extractor: CsrfFromHeader(HeaderName), }","s":"Default Config","u":"/api/middleware/csrf","h":"#default-config","p":1391},{"i":1402,"t":"const ( HeaderName = \"X-Csrf-Token\" )","s":"Constants","u":"/api/middleware/csrf","h":"#constants","p":1391},{"i":1404,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 app.Use(csrf.New(csrf.Config{ Storage: storage, }))","s":"Custom Storage/Database","u":"/api/middleware/csrf","h":"#custom-storagedatabase","p":1391},{"i":1406,"t":"The Early Data middleware for Fiber adds support for TLS 1.3's early data (\"0-RTT\") feature. Citing RFC 8446, when a client and server share a PSK, TLS 1.3 allows clients to send data on the first flight (\"early data\") to speed up the request, effectively reducing the regular 1-RTT request to a 0-RTT request. Make sure to enable fiber's EnableTrustedProxyCheck config option before using this middleware in order to not trust bogus HTTP request headers of the client. Also be aware that enabling support for early data in your reverse proxy (e.g. nginx, as done with a simple ssl_early_data on;) makes requests replayable. Refer to the following documents before continuing: https://datatracker.ietf.org/doc/html/rfc8446#section-8 https://blog.trailofbits.com/2019/03/25/what-application-developers-need-to-know-about-tls-early-data-0rtt/ By default, this middleware allows early data requests on safe HTTP request methods only and rejects the request otherwise, i.e. aborts the request before executing your handler. This behavior can be controlled by the AllowEarlyData config option. Safe HTTP methods — GET, HEAD, OPTIONS and TRACE — should not modify a state on the server.","s":"EarlyData","u":"/api/middleware/earlydata","h":"","p":1405},{"i":1408,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/earlydata","h":"#signatures","p":1405},{"i":1410,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/earlydata\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(earlydata.New()) // Or extend your config for customization app.Use(earlydata.New(earlydata.Config{ Error: fiber.ErrTooEarly, // ... }))","s":"Examples","u":"/api/middleware/earlydata","h":"#examples","p":1405},{"i":1412,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // IsEarlyData returns whether the request is an early-data request. // // Optional. Default: a function which checks if the \"Early-Data\" request header equals \"1\". IsEarlyData func(c *fiber.Ctx) bool // AllowEarlyData returns whether the early-data request should be allowed or rejected. // // Optional. Default: a function which rejects the request on unsafe and allows the request on safe HTTP request methods. AllowEarlyData func(c *fiber.Ctx) bool // Error is returned in case an early-data request is rejected. // // Optional. Default: fiber.ErrTooEarly. Error error }","s":"Config","u":"/api/middleware/earlydata","h":"#config","p":1405},{"i":1414,"t":"var ConfigDefault = Config{ IsEarlyData: func(c *fiber.Ctx) bool { return c.Get(DefaultHeaderName) == DefaultHeaderTrueValue }, AllowEarlyData: func(c *fiber.Ctx) bool { return fiber.IsMethodSafe(c.Method()) }, Error: fiber.ErrTooEarly, }","s":"Default Config","u":"/api/middleware/earlydata","h":"#default-config","p":1405},{"i":1416,"t":"const ( DefaultHeaderName = \"Early-Data\" DefaultHeaderTrueValue = \"1\" )","s":"Constants","u":"/api/middleware/earlydata","h":"#constants","p":1405},{"i":1418,"t":"Encrypt middleware for Fiber which encrypts cookie values. Note: this middleware does not encrypt cookie names.","s":"Encrypt Cookie","u":"/api/middleware/encryptcookie","h":"","p":1417},{"i":1420,"t":"// Intitializes the middleware func New(config ...Config) fiber.Handler // Returns a random 32 character long string func GenerateKey() string","s":"Signatures","u":"/api/middleware/encryptcookie","h":"#signatures","p":1417},{"i":1422,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/encryptcookie\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config // `Key` must be a 32 character string. It's used to encrypt the values, so make sure it is random and keep it secret. // You can run `openssl rand -base64 32` or call `encryptcookie.GenerateKey()` to create a random key for you. // Make sure not to set `Key` to `encryptcookie.GenerateKey()` because that will create a new key every run. app.Use(encryptcookie.New(encryptcookie.Config{ Key: \"secret-thirty-2-character-string\", })) // Get / reading out the encrypted cookie app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"value=\" + c.Cookies(\"test\")) }) // Post / create the encrypted cookie app.Post(\"/\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"test\", Value: \"SomeThing\", }) return nil })","s":"Examples","u":"/api/middleware/encryptcookie","h":"#examples","p":1417},{"i":1424,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Array of cookie keys that should not be encrypted. // // Optional. Default: [\"csrf_\"] Except []string // Base64 encoded unique key to encode & decode cookies. // // Required. The key should be 32 bytes of random data in base64-encoded form. // You may run `openssl rand -base64 32` or use `encryptcookie.GenerateKey()` to generate a new key. Key string // Custom function to encrypt cookies. // // Optional. Default: EncryptCookie Encryptor func(decryptedString, key string) (string, error) // Custom function to decrypt cookies. // // Optional. Default: DecryptCookie Decryptor func(encryptedString, key string) (string, error) }","s":"Config","u":"/api/middleware/encryptcookie","h":"#config","p":1417},{"i":1426,"t":"var ConfigDefault = Config{ Next: nil, Except: []string{\"csrf_\"}, Key: \"\", Encryptor: EncryptCookie, Decryptor: DecryptCookie, }","s":"Default Config","u":"/api/middleware/encryptcookie","h":"#default-config","p":1417},{"i":1428,"t":"Normally, encryptcookie middleware skips csrf_ cookies. However, it won't work when you use custom cookie names for CSRF. You should update Except config to avoid this problem. For example: app.Use(encryptcookie.New(encryptcookie.Config{ Key: \"secret-thirty-2-character-string\", Except: []string{\"csrf_1\"}, // exclude CSRF cookie })) app.Use(csrf.New(csrf.Config{ KeyLookup: \"form:test\", CookieName: \"csrf_1\", CookieHTTPOnly: true, }))","s":"Usage of CSRF and Encryptcookie Middlewares with Custom Cookie Names","u":"/api/middleware/encryptcookie","h":"#usage-of-csrf-and-encryptcookie-middlewares-with-custom-cookie-names","p":1417},{"i":1430,"t":"EnvVar middleware for Fiber that can be used to expose environment variables with various options.","s":"EnvVar","u":"/api/middleware/envvar","h":"","p":1429},{"i":1432,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/envvar","h":"#signatures","p":1429},{"i":1434,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/envvar\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(\"/expose/envvars\", envvar.New()) // Or extend your config for customization app.Use(\"/expose/envvars\", envvar.New( envvar.Config{ ExportVars: map[string]string{\"testKey\": \"\", \"testDefaultKey\": \"testDefaultVal\"}, ExcludeVars: map[string]string{\"excludeKey\": \"\"}, }), ) note You will need to provide a path to use the envvar middleware.","s":"Examples","u":"/api/middleware/envvar","h":"#examples","p":1429},{"i":1436,"t":"Http response contract: { \"vars\": { \"someEnvVariable\": \"someValue\", \"anotherEnvVariable\": \"anotherValue\", } }","s":"Response","u":"/api/middleware/envvar","h":"#response","p":1429},{"i":1438,"t":"// Config defines the config for middleware. type Config struct { // ExportVars specifies the environment variables that should export ExportVars map[string]string // ExcludeVars specifies the environment variables that should not export ExcludeVars map[string]string }","s":"Config","u":"/api/middleware/envvar","h":"#config","p":1429},{"i":1440,"t":"Config{}","s":"Default Config","u":"/api/middleware/envvar","h":"#default-config","p":1429},{"i":1442,"t":"ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.","s":"ETag","u":"/api/middleware/etag","h":"","p":1441},{"i":1444,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/etag","h":"#signatures","p":1441},{"i":1446,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/etag\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(etag.New()) // Get / receives Etag: \"13-1831710635\" in response header app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) // Or extend your config for customization app.Use(etag.New(etag.Config{ Weak: true, })) // Get / receives Etag: \"W/\"13-1831710635\" in response header app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") })","s":"Examples","u":"/api/middleware/etag","h":"#examples","p":1441},{"i":1448,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Weak indicates that a weak validator is used. Weak etags are easy // to generate, but are far less useful for comparisons. Strong // validators are ideal for comparisons but can be very difficult // to generate efficiently. Weak ETag values of two representations // of the same resources might be semantically equivalent, but not // byte-for-byte identical. This means weak etags prevent caching // when byte range requests are used, but strong etags mean range // requests can still be cached. Weak bool }","s":"Config","u":"/api/middleware/etag","h":"#config","p":1441},{"i":1450,"t":"var ConfigDefault = Config{ Next: nil, Weak: false, }","s":"Default Config","u":"/api/middleware/etag","h":"#default-config","p":1441},{"i":1452,"t":"Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.","s":"ExpVar","u":"/api/middleware/expvar","h":"","p":1451},{"i":1454,"t":"func New() fiber.Handler","s":"Signatures","u":"/api/middleware/expvar","h":"#signatures","p":1451},{"i":1456,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" expvarmw \"github.com/gofiber/fiber/v2/middleware/expvar\" ) After you initiate your Fiber app, you can use the following possibilities: var count = expvar.NewInt(\"count\") app.Use(expvarmw.New()) app.Get(\"/\", func(c *fiber.Ctx) error { count.Add(1) return c.SendString(fmt.Sprintf(\"hello expvar count %d\", count.Value())) }) Visit path /debug/vars to see all vars and use query r=key to filter exposed variables. curl 127.0.0.1:3000 hello expvar count 1 curl 127.0.0.1:3000/debug/vars { \"cmdline\": [\"xxx\"], \"count\": 1, \"expvarHandlerCalls\": 33, \"expvarRegexpErrors\": 0, \"memstats\": {...} } curl 127.0.0.1:3000/debug/vars?r=c { \"cmdline\": [\"xxx\"], \"count\": 1 }","s":"Examples","u":"/api/middleware/expvar","h":"#examples","p":1451},{"i":1458,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool }","s":"Config","u":"/api/middleware/expvar","h":"#config","p":1451},{"i":1460,"t":"var ConfigDefault = Config{ Next: nil, }","s":"Default Config","u":"/api/middleware/expvar","h":"#default-config","p":1451},{"i":1462,"t":"Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware. note This middleware is exclusively for serving the default, implicit favicon, which is GET /favicon.ico or custom favicon URL.","s":"Favicon","u":"/api/middleware/favicon","h":"","p":1461},{"i":1464,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/favicon","h":"#signatures","p":1461},{"i":1466,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/favicon\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(favicon.New()) // Or extend your config for customization app.Use(favicon.New(favicon.Config{ File: \"./favicon.ico\", URL: \"/favicon.ico\", }))","s":"Examples","u":"/api/middleware/favicon","h":"#examples","p":1461},{"i":1468,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // File holds the path to an actual favicon that will be cached // // Optional. Default: \"\" File string // URL for favicon handler // // Optional. Default: \"/favicon.ico\" URL string // FileSystem is an optional alternate filesystem to search for the favicon in. // An example of this could be an embedded or network filesystem // // Optional. Default: nil FileSystem http.FileSystem // CacheControl defines how the Cache-Control header in the response should be set // // Optional. Default: \"public, max-age=31536000\" CacheControl string }","s":"Config","u":"/api/middleware/favicon","h":"#config","p":1461},{"i":1470,"t":"var ConfigDefault = Config{ Next: nil, File: \"\", URL: fPath, CacheControl: \"public, max-age=31536000\", }","s":"Default Config","u":"/api/middleware/favicon","h":"#default-config","p":1461},{"i":1472,"t":"Filesystem middleware for Fiber that enables you to serve files from a directory. caution :params & :optionals? within the prefix path are not supported! To handle paths with spaces (or other url encoded values) make sure to set fiber.Config{ UnescapePath: true }","s":"FileSystem","u":"/api/middleware/filesystem","h":"","p":1471},{"i":1474,"t":"func New(config Config) fiber.Handler","s":"Signatures","u":"/api/middleware/filesystem","h":"#signatures","p":1471},{"i":1476,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" ) After you initiate your Fiber app, you can use the following possibilities: // Provide a minimal config app.Use(filesystem.New(filesystem.Config{ Root: http.Dir(\"./assets\"), })) // Or extend your config for customization app.Use(filesystem.New(filesystem.Config{ Root: http.Dir(\"./assets\"), Browse: true, Index: \"index.html\", NotFoundFile: \"404.html\", MaxAge: 3600, })) If your environment (Go 1.16+) supports it, we recommend using Go Embed instead of the other solutions listed as this one is native to Go and the easiest to use.","s":"Examples","u":"/api/middleware/filesystem","h":"#examples","p":1471},{"i":1478,"t":"Embed is the native method to embed files in a Golang excecutable. Introduced in Go 1.16. package main import ( \"embed\" \"io/fs\" \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" ) // Embed a single file //go:embed index.html var f embed.FS // Embed a directory //go:embed static/* var embedDirStatic embed.FS func main() { app := fiber.New() app.Use(\"/\", filesystem.New(filesystem.Config{ Root: http.FS(f), })) // Access file \"image.png\" under `static/` directory via URL: `http:///static/image.png`. // Without `PathPrefix`, you have to access it via URL: // `http:///static/static/image.png`. app.Use(\"/static\", filesystem.New(filesystem.Config{ Root: http.FS(embedDirStatic), PathPrefix: \"static\", Browse: true, })) log.Fatal(app.Listen(\":3000\")) }","s":"embed","u":"/api/middleware/filesystem","h":"#embed","p":1471},{"i":1480,"t":"https://github.com/markbates/pkger package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/markbates/pkger\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: pkger.Dir(\"/assets\"), })) log.Fatal(app.Listen(\":3000\")) }","s":"pkger","u":"/api/middleware/filesystem","h":"#pkger","p":1471},{"i":1482,"t":"https://github.com/gobuffalo/packr package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/gobuffalo/packr/v2\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: packr.New(\"Assets Box\", \"/assets\"), })) log.Fatal(app.Listen(\":3000\")) }","s":"packr","u":"/api/middleware/filesystem","h":"#packr","p":1471},{"i":1484,"t":"https://github.com/GeertJohan/go.rice package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"github.com/GeertJohan/go.rice\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: rice.MustFindBox(\"assets\").HTTPBox(), })) log.Fatal(app.Listen(\":3000\")) }","s":"go.rice","u":"/api/middleware/filesystem","h":"#gorice","p":1471},{"i":1486,"t":"https://github.com/UnnoTed/fileb0x package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" \"/myEmbeddedFiles\" ) func main() { app := fiber.New() app.Use(\"/assets\", filesystem.New(filesystem.Config{ Root: myEmbeddedFiles.HTTP, })) log.Fatal(app.Listen(\":3000\")) }","s":"fileb0x","u":"/api/middleware/filesystem","h":"#fileb0x","p":1471},{"i":1488,"t":"https://github.com/rakyll/statik package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/filesystem\" // Use blank to invoke init function and register data to statik _ \"/statik\" \"github.com/rakyll/statik/fs\" ) func main() { statikFS, err := fs.New() if err != nil { panic(err) } app := fiber.New() app.Use(\"/\", filesystem.New(filesystem.Config{ Root: statikFS, })) log.Fatal(app.Listen(\":3000\")) }","s":"statik","u":"/api/middleware/filesystem","h":"#statik","p":1471},{"i":1490,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Root is a FileSystem that provides access // to a collection of files and directories. // // Required. Default: nil Root http.FileSystem `json:\"-\"` // PathPrefix defines a prefix to be added to a filepath when // reading a file from the FileSystem. // // Use when using Go 1.16 embed.FS // // Optional. Default \"\" PathPrefix string `json:\"path_prefix\"` // Enable directory browsing. // // Optional. Default: false Browse bool `json:\"browse\"` // Index file for serving a directory. // // Optional. Default: \"index.html\" Index string `json:\"index\"` // The value for the Cache-Control HTTP-header // that is set on the file response. MaxAge is defined in seconds. // // Optional. Default value 0. MaxAge int `json:\"max_age\"` // File to return if path is not found. Useful for SPA's. // // Optional. Default: \"\" NotFoundFile string `json:\"not_found_file\"` // The value for the Content-Type HTTP-header // that is set on the file response // // Optional. Default: \"\" ContentTypeCharset string `json:\"content_type_charset\"` }","s":"Config","u":"/api/middleware/filesystem","h":"#config","p":1471},{"i":1492,"t":"var ConfigDefault = Config{ Next: nil, Root: nil, PathPrefix: \"\", Browse: false, Index: \"/index.html\", MaxAge: 0, ContentTypeCharset: \"\", }","s":"Default Config","u":"/api/middleware/filesystem","h":"#default-config","p":1471},{"i":1494,"t":"Helmet middleware helps secure your apps by setting various HTTP headers.","s":"Helmet","u":"/api/middleware/helmet","h":"","p":1493},{"i":1496,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/helmet","h":"#signatures","p":1493},{"i":1498,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/helmet\" ) func main() { app := fiber.New() app.Use(helmet.New()) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome!\") }) app.Listen(\":3000\") } Test: curl -I http://localhost:3000","s":"Examples","u":"/api/middleware/helmet","h":"#examples","p":1493},{"i":1500,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // XSSProtection // Optional. Default value \"0\". XSSProtection string // ContentTypeNosniff // Optional. Default value \"nosniff\". ContentTypeNosniff string // XFrameOptions // Optional. Default value \"SAMEORIGIN\". // Possible values: \"SAMEORIGIN\", \"DENY\", \"ALLOW-FROM uri\" XFrameOptions string // HSTSMaxAge // Optional. Default value 0. HSTSMaxAge int // HSTSExcludeSubdomains // Optional. Default value false. HSTSExcludeSubdomains bool // ContentSecurityPolicy // Optional. Default value \"\". ContentSecurityPolicy string // CSPReportOnly // Optional. Default value false. CSPReportOnly bool // HSTSPreloadEnabled // Optional. Default value false. HSTSPreloadEnabled bool // ReferrerPolicy // Optional. Default value \"ReferrerPolicy\". ReferrerPolicy string // Permissions-Policy // Optional. Default value \"\". PermissionPolicy string // Cross-Origin-Embedder-Policy // Optional. Default value \"require-corp\". CrossOriginEmbedderPolicy string // Cross-Origin-Opener-Policy // Optional. Default value \"same-origin\". CrossOriginOpenerPolicy string // Cross-Origin-Resource-Policy // Optional. Default value \"same-origin\". CrossOriginResourcePolicy string // Origin-Agent-Cluster // Optional. Default value \"?1\". OriginAgentCluster string // X-DNS-Prefetch-Control // Optional. Default value \"off\". XDNSPrefetchControl string // X-Download-Options // Optional. Default value \"noopen\". XDownloadOptions string // X-Permitted-Cross-Domain-Policies // Optional. Default value \"none\". XPermittedCrossDomain string }","s":"Config","u":"/api/middleware/helmet","h":"#config","p":1493},{"i":1502,"t":"var ConfigDefault = Config{ XSSProtection: \"0\", ContentTypeNosniff: \"nosniff\", XFrameOptions: \"SAMEORIGIN\", ReferrerPolicy: \"no-referrer\", CrossOriginEmbedderPolicy: \"require-corp\", CrossOriginOpenerPolicy: \"same-origin\", CrossOriginResourcePolicy: \"same-origin\", OriginAgentCluster: \"?1\", XDNSPrefetchControl: \"off\", XDownloadOptions: \"noopen\", XPermittedCrossDomain: \"none\", }","s":"Default Config","u":"/api/middleware/helmet","h":"#default-config","p":1493},{"i":1504,"t":"Idempotency middleware for Fiber allows for fault-tolerant APIs where duplicate requests — for example due to networking issues on the client-side — do not erroneously cause the same action performed multiple times on the server-side. Refer to https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-idempotency-key-header-02 for a better understanding.","s":"Idempotency","u":"/api/middleware/idempotency","h":"","p":1503},{"i":1506,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/idempotency","h":"#signatures","p":1503},{"i":1508,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/idempotency\" ) After you initiate your Fiber app, you can use the following possibilities:","s":"Examples","u":"/api/middleware/idempotency","h":"#examples","p":1503},{"i":1510,"t":"app.Use(idempotency.New())","s":"Default Config","u":"/api/middleware/idempotency","h":"#default-config","p":1503},{"i":1512,"t":"app.Use(idempotency.New(idempotency.Config{ Lifetime: 42 * time.Minute, // ... }))","s":"Custom Config","u":"/api/middleware/idempotency","h":"#custom-config","p":1503},{"i":1514,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: a function which skips the middleware on safe HTTP request method. Next func(c *fiber.Ctx) bool // Lifetime is the maximum lifetime of an idempotency key. // // Optional. Default: 30 * time.Minute Lifetime time.Duration // KeyHeader is the name of the header that contains the idempotency key. // // Optional. Default: X-Idempotency-Key KeyHeader string // KeyHeaderValidate defines a function to validate the syntax of the idempotency header. // // Optional. Default: a function which ensures the header is 36 characters long (the size of an UUID). KeyHeaderValidate func(string) error // KeepResponseHeaders is a list of headers that should be kept from the original response. // // Optional. Default: nil (to keep all headers) KeepResponseHeaders []string // Lock locks an idempotency key. // // Optional. Default: an in-memory locker for this process only. Lock Locker // Storage stores response data by idempotency key. // // Optional. Default: an in-memory storage for this process only. Storage fiber.Storage }","s":"Config","u":"/api/middleware/idempotency","h":"#config","p":1503},{"i":1516,"t":"var ConfigDefault = Config{ Next: func(c *fiber.Ctx) bool { // Skip middleware if the request was done using a safe HTTP method return fiber.IsMethodSafe(c.Method()) }, Lifetime: 30 * time.Minute, KeyHeader: \"X-Idempotency-Key\", KeyHeaderValidate: func(k string) error { if l, wl := len(k), 36; l != wl { // UUID length is 36 chars return fmt.Errorf(\"%w: invalid length: %d != %d\", ErrInvalidIdempotencyKey, l, wl) } return nil }, KeepResponseHeaders: nil, Lock: nil, // Set in configDefault so we don't allocate data here. Storage: nil, // Set in configDefault so we don't allocate data here. }","s":"Default Config","u":"/api/middleware/idempotency","h":"#default-config-1","p":1503},{"i":1518,"t":"Key auth middleware provides a key based authentication.","s":"Keyauth","u":"/api/middleware/keyauth","h":"","p":1517},{"i":1520,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/keyauth","h":"#signatures","p":1517},{"i":1522,"t":"package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" ) var ( apiKey = \"correct horse battery staple\" ) func validateAPIKey(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey } func main() { app := fiber.New() // note that the keyauth middleware needs to be defined before the routes are defined! app.Use(keyauth.New(keyauth.Config{ KeyLookup: \"cookie:access_token\", Validator: validateAPIKey, })) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Listen(\":3000\") } Test: # No api-key specified -> 400 missing curl http://localhost:3000 #> missing or malformed API Key curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000 #> Successfully authenticated! curl --cookie \"access_token=Clearly A Wrong Key\" http://localhost:3000 #> missing or malformed API Key For a more detailed example, see also the github.com/gofiber/recipes repository and specifically the fiber-envoy-extauthz repository and the keyauth example code.","s":"Examples","u":"/api/middleware/keyauth","h":"#examples","p":1517},{"i":1524,"t":"If you want to authenticate only certain endpoints, you can use the Config of keyauth and apply a filter function (eg. authFilter) like so package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" \"regexp\" \"strings\" ) var ( apiKey = \"correct horse battery staple\" protectedURLs = []*regexp.Regexp{ regexp.MustCompile(\"^/authenticated$\"), regexp.MustCompile(\"^/auth2$\"), } ) func validateAPIKey(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey } func authFilter(c *fiber.Ctx) bool { originalURL := strings.ToLower(c.OriginalURL()) for _, pattern := range protectedURLs { if pattern.MatchString(originalURL) { return false } } return true } func main() { app := fiber.New() app.Use(keyauth.New(keyauth.Config{ Next: authFilter, KeyLookup: \"cookie:access_token\", Validator: validateAPIKey, })) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome\") }) app.Get(\"/authenticated\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Get(\"/auth2\", func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated 2!\") }) app.Listen(\":3000\") } Which results in this # / does not need to be authenticated curl http://localhost:3000 #> Welcome # /authenticated needs to be authenticated curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000/authenticated #> Successfully authenticated! # /auth2 needs to be authenticated too curl --cookie \"access_token=correct horse battery staple\" http://localhost:3000/auth2 #> Successfully authenticated 2!","s":"Authenticate only certain endpoints","u":"/api/middleware/keyauth","h":"#authenticate-only-certain-endpoints","p":1517},{"i":1526,"t":"package main import ( \"crypto/sha256\" \"crypto/subtle\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/keyauth\" ) const ( apiKey = \"my-super-secret-key\" ) func main() { app := fiber.New() authMiddleware := keyauth.New(keyauth.Config{ Validator: func(c *fiber.Ctx, key string) (bool, error) { hashedAPIKey := sha256.Sum256([]byte(apiKey)) hashedKey := sha256.Sum256([]byte(key)) if subtle.ConstantTimeCompare(hashedAPIKey[:], hashedKey[:]) == 1 { return true, nil } return false, keyauth.ErrMissingOrMalformedAPIKey }, }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Welcome\") }) app.Get(\"/allowed\", authMiddleware, func(c *fiber.Ctx) error { return c.SendString(\"Successfully authenticated!\") }) app.Listen(\":3000\") } Which results in this # / does not need to be authenticated curl http://localhost:3000 #> Welcome # /allowed needs to be authenticated too curl --header \"Authorization: Bearer my-super-secret-key\" http://localhost:3000/allowed #> Successfully authenticated!","s":"Specifying middleware in the handler","u":"/api/middleware/keyauth","h":"#specifying-middleware-in-the-handler","p":1517},{"i":1528,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // SuccessHandler defines a function which is executed for a valid key. // Optional. Default: nil SuccessHandler fiber.Handler // ErrorHandler defines a function which is executed for an invalid key. // It may be used to define a custom error. // Optional. Default: 401 Invalid or expired key ErrorHandler fiber.ErrorHandler // KeyLookup is a string in the form of \":\" that is used // to extract key from the request. // Optional. Default value \"header:Authorization\". // Possible values: // - \"header:\" // - \"query:\" // - \"form:\" // - \"param:\" // - \"cookie:\" KeyLookup string // AuthScheme to be used in the Authorization header. // Optional. Default value \"Bearer\". AuthScheme string // Validator is a function to validate key. Validator func(*fiber.Ctx, string) (bool, error) // Context key to store the bearertoken from the token into context. // Optional. Default: \"token\". ContextKey string }","s":"Config","u":"/api/middleware/keyauth","h":"#config","p":1517},{"i":1530,"t":"var ConfigDefault = Config{ SuccessHandler: func(c *fiber.Ctx) error { return c.Next() }, ErrorHandler: func(c *fiber.Ctx, err error) error { if err == ErrMissingOrMalformedAPIKey { return c.Status(fiber.StatusUnauthorized).SendString(err.Error()) } return c.Status(fiber.StatusUnauthorized).SendString(\"Invalid or expired API Key\") }, KeyLookup: \"header:\" + fiber.HeaderAuthorization, AuthScheme: \"Bearer\", ContextKey: \"token\", }","s":"Default Config","u":"/api/middleware/keyauth","h":"#default-config","p":1517},{"i":1532,"t":"Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases. note This module does not share state with other processes/servers by default.","s":"Limiter","u":"/api/middleware/limiter","h":"","p":1531},{"i":1534,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/limiter","h":"#signatures","p":1531},{"i":1536,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/limiter\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(limiter.New()) // Or extend your config for customization app.Use(limiter.New(limiter.Config{ Next: func(c *fiber.Ctx) bool { return c.IP() == \"127.0.0.1\" }, Max: 20, Expiration: 30 * time.Second, KeyGenerator: func(c *fiber.Ctx) string { return c.Get(\"x-forwarded-for\") }, LimitReached: func(c *fiber.Ctx) error { return c.SendFile(\"./toofast.html\") }, Storage: myCustomStorage{}, }))","s":"Examples","u":"/api/middleware/limiter","h":"#examples","p":1531},{"i":1538,"t":"Instead of using the standard fixed window algorithm, you can enable the sliding window algorithm. A example of such configuration is: app.Use(limiter.New(limiter.Config{ Max: 20, Expiration: 30 * time.Second, LimiterMiddleware: limiter.SlidingWindow{}, })) This means that every window will take into account the previous window(if there was any). The given formula for the rate is: weightOfPreviousWindpw = previous window's amount request * (whenNewWindow / Expiration) rate = weightOfPreviousWindpw + current window's amount request.","s":"Sliding window","u":"/api/middleware/limiter","h":"#sliding-window","p":1531},{"i":1540,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Max number of recent connections during `Duration` seconds before sending a 429 response // // Default: 5 Max int // KeyGenerator allows you to generate custom keys, by default c.IP() is used // // Default: func(c *fiber.Ctx) string { // return c.IP() // } KeyGenerator func(*fiber.Ctx) string // Expiration is the time on how long to keep records of requests in memory // // Default: 1 * time.Minute Expiration time.Duration // LimitReached is called when a request hits the limit // // Default: func(c *fiber.Ctx) error { // return c.SendStatus(fiber.StatusTooManyRequests) // } LimitReached fiber.Handler // When set to true, requests with StatusCode >= 400 won't be counted. // // Default: false SkipFailedRequests bool // When set to true, requests with StatusCode < 400 won't be counted. // // Default: false SkipSuccessfulRequests bool // Store is used to store the state of the middleware // // Default: an in memory store for this process only Storage fiber.Storage // LimiterMiddleware is the struct that implements limiter middleware. // // Default: a new Fixed Window Rate Limiter LimiterMiddleware LimiterHandler } note A custom store can be used if it implements the Storage interface - more details and an example can be found in store.go.","s":"Config","u":"/api/middleware/limiter","h":"#config","p":1531},{"i":1542,"t":"var ConfigDefault = Config{ Max: 5, Expiration: 1 * time.Minute, KeyGenerator: func(c *fiber.Ctx) string { return c.IP() }, LimitReached: func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusTooManyRequests) }, SkipFailedRequests: false, SkipSuccessfulRequests: false, LimiterMiddleware: FixedWindow{}, }","s":"Default Config","u":"/api/middleware/limiter","h":"#default-config","p":1531},{"i":1544,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 app.Use(limiter.New(limiter.Config{ Storage: storage, }))","s":"Custom Storage/Database","u":"/api/middleware/limiter","h":"#custom-storagedatabase","p":1531},{"i":1546,"t":"Logger middleware for Fiber that logs HTTP request/response details.","s":"Logger","u":"/api/middleware/logger","h":"","p":1545},{"i":1548,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/logger","h":"#signatures","p":1545},{"i":1550,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/logger\" ) tip The order of registration plays a role. Only all routes that are registered after this one will be logged. The middleware should therefore be one of the first to be registered. After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(logger.New()) // Or extend your config for customization // Logging remote IP and Port app.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) // Logging Request ID app.Use(requestid.New()) app.Use(logger.New(logger.Config{ // For more options, see the Config section Format: \"${pid} ${locals:requestid} ${status} - ${method} ${path}​\\n\", })) // Changing TimeZone & TimeFormat app.Use(logger.New(logger.Config{ Format: \"${pid} ${status} - ${method} ${path}\\n\", TimeFormat: \"02-Jan-2006\", TimeZone: \"America/New_York\", })) // Custom File Writer file, err := os.OpenFile(\"./123.log\", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) if err != nil { log.Fatalf(\"error opening file: %v\", err) } defer file.Close() app.Use(logger.New(logger.Config{ Output: file, })) // Add Custom Tags app.Use(logger.New(logger.Config{ CustomTags: map[string]logger.LogFunc{ \"custom_tag\": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) { return output.WriteString(\"it is a custom tag\") }, }, })) // Callback after log is written app.Use(logger.New(logger.Config{ TimeFormat: time.RFC3339Nano, TimeZone: \"Asia/Shanghai\", Done: func(c *fiber.Ctx, logString []byte) { if c.Response().StatusCode() != fiber.StatusOK { reporter.SendToSlack(logString) } }, })) // Disable colors when outputting to default format app.Use(logger.New(logger.Config{ DisableColors: true, }))","s":"Examples","u":"/api/middleware/logger","h":"#examples","p":1545},{"i":1552,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Done is a function that is called after the log string for a request is written to Output, // and pass the log string as parameter. // // Optional. Default: nil Done func(c *fiber.Ctx, logString []byte) // tagFunctions defines the custom tag action // // Optional. Default: map[string]LogFunc CustomTags map[string]LogFunc // Format defines the logging tags // // Optional. Default: [${time}] ${status} - ${latency} ${method} ${path}\\n Format string // TimeFormat https://programming.guide/go/format-parse-string-time-date-example.html // // Optional. Default: 15:04:05 TimeFormat string // TimeZone can be specified, such as \"UTC\" and \"America/New_York\" and \"Asia/Chongqing\", etc // // Optional. Default: \"Local\" TimeZone string // TimeInterval is the delay before the timestamp is updated // // Optional. Default: 500 * time.Millisecond TimeInterval time.Duration // Output is a writer where logs are written // // Default: os.Stdout Output io.Writer // DisableColors defines if the logs output should be colorized // // Default: false DisableColors bool enableColors bool enableLatency bool timeZoneLocation *time.Location } type LogFunc func(buf logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error)","s":"Config","u":"/api/middleware/logger","h":"#config","p":1545},{"i":1554,"t":"var ConfigDefault = Config{ Next: nil, Done: nil, Format: \"[${time}] ${status} - ${latency} ${method} ${path}\\n\", TimeFormat: \"15:04:05\", TimeZone: \"Local\", TimeInterval: 500 * time.Millisecond, Output: os.Stdout, DisableColors: true, }","s":"Default Config","u":"/api/middleware/logger","h":"#default-config","p":1545},{"i":1556,"t":"// Logger variables const ( TagPid = \"pid\" TagTime = \"time\" TagReferer = \"referer\" TagProtocol = \"protocol\" TagPort = \"port\" TagIP = \"ip\" TagIPs = \"ips\" TagHost = \"host\" TagMethod = \"method\" TagPath = \"path\" TagURL = \"url\" TagUA = \"ua\" TagLatency = \"latency\" TagStatus = \"status\" // response status TagResBody = \"resBody\" // response body TagReqHeaders = \"reqHeaders\" TagQueryStringParams = \"queryParams\" // request query parameters TagBody = \"body\" // request body TagBytesSent = \"bytesSent\" TagBytesReceived = \"bytesReceived\" TagRoute = \"route\" TagError = \"error\" // DEPRECATED: Use TagReqHeader instead TagHeader = \"header:\" // request header TagReqHeader = \"reqHeader:\" // request header TagRespHeader = \"respHeader:\" // response header TagQuery = \"query:\" // request query TagForm = \"form:\" // request form TagCookie = \"cookie:\" // request cookie TagLocals = \"locals:\" // colors TagBlack = \"black\" TagRed = \"red\" TagGreen = \"green\" TagYellow = \"yellow\" TagBlue = \"blue\" TagMagenta = \"magenta\" TagCyan = \"cyan\" TagWhite = \"white\" TagReset = \"reset\" )","s":"Constants","u":"/api/middleware/logger","h":"#constants","p":1545},{"i":1558,"t":"Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor caution Monitor is still in beta, API might change in the future!","s":"Monitor","u":"/api/middleware/monitor","h":"","p":1557},{"i":1560,"t":"func New() fiber.Handler","s":"Signatures","u":"/api/middleware/monitor","h":"#signatures","p":1557},{"i":1562,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/monitor\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config (Assign the middleware to /metrics) app.Get(\"/metrics\", monitor.New()) // Or extend your config for customization // Assign the middleware to /metrics // and change the Title to `MyService Metrics Page` app.Get(\"/metrics\", monitor.New(monitor.Config{Title: \"MyService Metrics Page\"})) You can also access the API endpoint with curl -X GET -H \"Accept: application/json\" http://localhost:3000/metrics which returns: {\"pid\":{ \"cpu\":0.4568381746582226, \"ram\":20516864, \"conns\":3 }, \"os\": { \"cpu\":8.759124087593099, \"ram\":3997155328, \"conns\":44, \"total_ram\":8245489664, \"load_avg\":0.51 }}","s":"Examples","u":"/api/middleware/monitor","h":"#examples","p":1557},{"i":1564,"t":"// Config defines the config for middleware. type Config struct { // Metrics page title // // Optional. Default: \"Fiber Monitor\" Title string // Refresh period // // Optional. Default: 3 seconds Refresh time.Duration // Whether the service should expose only the monitoring API. // // Optional. Default: false APIOnly bool // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Custom HTML Code to Head Section(Before End) // // Optional. Default: empty CustomHead string // FontURL for specify font resource path or URL . also you can use relative path // // Optional. Default: https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap FontURL string // ChartJsURL for specify ChartJS library path or URL . also you can use relative path // // Optional. Default: https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/Chart.bundle.min.js ChartJsURL string index string }","s":"Config","u":"/api/middleware/monitor","h":"#config","p":1557},{"i":1566,"t":"var ConfigDefault = Config{ Title: defaultTitle, Refresh: defaultRefresh, FontURL: defaultFontURL, ChartJsURL: defaultChartJSURL, CustomHead: defaultCustomHead, APIOnly: false, Next: nil, index: newIndex(viewBag{ defaultTitle, defaultRefresh, defaultFontURL, defaultChartJSURL, defaultCustomHead, }), }","s":"Default Config","u":"/api/middleware/monitor","h":"#default-config","p":1557},{"i":1568,"t":"Pprof middleware for Fiber that serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.","s":"Pprof","u":"/api/middleware/pprof","h":"","p":1567},{"i":1570,"t":"func New() fiber.Handler","s":"Signatures","u":"/api/middleware/pprof","h":"#signatures","p":1567},{"i":1572,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/pprof\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(pprof.New()) // Or extend your config for customization // For example, in systems where you have multiple ingress endpoints, it is common to add a URL prefix, like so: app.Use(pprof.New(pprof.Config{Prefix: \"/endpoint-prefix\"})) // This prefix will be added to the default path of \"/debug/pprof/\", for a resulting URL of: \"/endpoint-prefix/debug/pprof/\".","s":"Examples","u":"/api/middleware/pprof","h":"#examples","p":1567},{"i":1574,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Prefix defines a URL prefix added before \"/debug/pprof\". // Note that it should start with (but not end with) a slash. // Example: \"/federated-fiber\" // // Optional. Default: \"\" Prefix string }","s":"Config","u":"/api/middleware/pprof","h":"#config","p":1567},{"i":1576,"t":"var ConfigDefault = Config{ Next: nil, }","s":"Default Config","u":"/api/middleware/pprof","h":"#default-config","p":1567},{"i":1578,"t":"Proxy middleware for Fiber that allows you to proxy requests to multiple servers.","s":"Proxy","u":"/api/middleware/proxy","h":"","p":1577},{"i":1580,"t":"// Balancer create a load balancer among multiple upstrem servers. func Balancer(config Config) fiber.Handler // Forward performs the given http request and fills the given http response. func Forward(addr string, clients ...*fasthttp.Client) fiber.Handler // Do performs the given http request and fills the given http response. func Do(c *fiber.Ctx, addr string, clients ...*fasthttp.Client) error // DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects. func DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error // DoDeadline performs the given request and waits for response until the given deadline. func DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error // DoTimeout performs the given request and waits for response during the given timeout duration. func DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error // DomainForward the given http request based on the given domain and fills the given http response func DomainForward(hostname string, addr string, clients ...*fasthttp.Client) fiber.Handler // BalancerForward performs the given http request based round robin balancer and fills the given http response func BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler","s":"Signatures","u":"/api/middleware/proxy","h":"#signatures","p":1577},{"i":1582,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/proxy\" ) After you initiate your Fiber app, you can use the following possibilities: // if target https site uses a self-signed certificate, you should // call WithTlsConfig before Do and Forward proxy.WithTlsConfig(&tls.Config{ InsecureSkipVerify: true, }) // if you need to use global self-custom client, you should use proxy.WithClient. proxy.WithClient(&fasthttp.Client{ NoDefaultUserAgentHeader: true, DisablePathNormalizing: true, }) // Forward to url app.Get(\"/gif\", proxy.Forward(\"https://i.imgur.com/IWaBepg.gif\")) // If you want to forward with a specific domain. You have to use proxy.DomainForward. app.Get(\"/payments\", proxy.DomainForward(\"docs.gofiber.io\", \"http://localhost:8000\")) // Forward to url with local custom client app.Get(\"/gif\", proxy.Forward(\"https://i.imgur.com/IWaBepg.gif\", &fasthttp.Client{ NoDefaultUserAgentHeader: true, DisablePathNormalizing: true, })) // Make request within handler app.Get(\"/:id\", func(c *fiber.Ctx) error { url := \"https://i.imgur.com/\"+c.Params(\"id\")+\".gif\" if err := proxy.Do(c, url); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests while following redirects app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoRedirects(c, \"http://google.com\", 3); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests and wait up to 5 seconds before timing out app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoTimeout(c, \"http://localhost:3000\", time.Second * 5); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Make proxy requests, timeout a minute from now app.Get(\"/proxy\", func(c *fiber.Ctx) error { if err := proxy.DoDeadline(c, \"http://localhost\", time.Now().Add(time.Minute)); err != nil { return err } // Remove Server header from response c.Response().Header.Del(fiber.HeaderServer) return nil }) // Minimal round robin balancer app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }, })) // Or extend your balancer for customization app.Use(proxy.Balancer(proxy.Config{ Servers: []string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }, ModifyRequest: func(c *fiber.Ctx) error { c.Request().Header.Add(\"X-Real-IP\", c.IP()) return nil }, ModifyResponse: func(c *fiber.Ctx) error { c.Response().Header.Del(fiber.HeaderServer) return nil }, })) // Or this way if the balancer is using https and the destination server is only using http. app.Use(proxy.BalancerForward([]string{ \"http://localhost:3001\", \"http://localhost:3002\", \"http://localhost:3003\", }))","s":"Examples","u":"/api/middleware/proxy","h":"#examples","p":1577},{"i":1584,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Servers defines a list of :// HTTP servers, // // which are used in a round-robin manner. // i.e.: \"https://foobar.com, http://www.foobar.com\" // // Required Servers []string // ModifyRequest allows you to alter the request // // Optional. Default: nil ModifyRequest fiber.Handler // ModifyResponse allows you to alter the response // // Optional. Default: nil ModifyResponse fiber.Handler // Timeout is the request timeout used when calling the proxy client // // Optional. Default: 1 second Timeout time.Duration // Per-connection buffer size for requests' reading. // This also limits the maximum header size. // Increase this buffer if your clients send multi-KB RequestURIs // and/or multi-KB headers (for example, BIG cookies). ReadBufferSize int // Per-connection buffer size for responses' writing. WriteBufferSize int // tls config for the http client. TlsConfig *tls.Config // Client is custom client when client config is complex. // Note that Servers, Timeout, WriteBufferSize, ReadBufferSize and TlsConfig // will not be used if the client are set. Client *fasthttp.LBClient }","s":"Config","u":"/api/middleware/proxy","h":"#config","p":1577},{"i":1586,"t":"var ConfigDefault = Config{ Next: nil, ModifyRequest: nil, ModifyResponse: nil, Timeout: fasthttp.DefaultLBClientTimeout, }","s":"Default Config","u":"/api/middleware/proxy","h":"#default-config","p":1577},{"i":1588,"t":"Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.","s":"Recover","u":"/api/middleware/recover","h":"","p":1587},{"i":1590,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/recover","h":"#signatures","p":1587},{"i":1592,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/recover\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(recover.New()) // This panic will be caught by the middleware app.Get(\"/\", func(c *fiber.Ctx) error { panic(\"I'm an error\") })","s":"Examples","u":"/api/middleware/recover","h":"#examples","p":1587},{"i":1594,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // EnableStackTrace enables handling stack trace // // Optional. Default: false EnableStackTrace bool // StackTraceHandler defines a function to handle stack trace // // Optional. Default: defaultStackTraceHandler StackTraceHandler func(c *fiber.Ctx, e interface{}) }","s":"Config","u":"/api/middleware/recover","h":"#config","p":1587},{"i":1596,"t":"var ConfigDefault = Config{ Next: nil, EnableStackTrace: false, StackTraceHandler: defaultStackTraceHandler, }","s":"Default Config","u":"/api/middleware/recover","h":"#default-config","p":1587},{"i":1598,"t":"Redirection middleware for Fiber.","s":"Redirect","u":"/api/middleware/redirect","h":"","p":1597},{"i":1600,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/redirect","h":"#signatures","p":1597},{"i":1602,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/redirect\" ) func main() { app := fiber.New() app.Use(redirect.New(redirect.Config{ Rules: map[string]string{ \"/old\": \"/new\", \"/old/*\": \"/new/$1\", }, StatusCode: 301, })) app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Get(\"/new/*\", func(c *fiber.Ctx) error { return c.SendString(\"Wildcard: \" + c.Params(\"*\")) }) app.Listen(\":3000\") } Test: curl http://localhost:3000/old curl http://localhost:3000/old/hello","s":"Examples","u":"/api/middleware/redirect","h":"#examples","p":1597},{"i":1604,"t":"// Config defines the config for middleware. type Config struct { // Filter defines a function to skip middleware. // Optional. Default: nil Next func(*fiber.Ctx) bool // Rules defines the URL path rewrite rules. The values captured in asterisk can be // retrieved by index e.g. $1, $2 and so on. // Required. Example: // \"/old\": \"/new\", // \"/api/*\": \"/$1\", // \"/js/*\": \"/public/javascripts/$1\", // \"/users/*/orders/*\": \"/user/$1/order/$2\", Rules map[string]string // The status code when redirecting // This is ignored if Redirect is disabled // Optional. Default: 302 (fiber.StatusFound) StatusCode int rulesRegex map[*regexp.Regexp]string }","s":"Config","u":"/api/middleware/redirect","h":"#config","p":1597},{"i":1606,"t":"var ConfigDefault = Config{ StatusCode: fiber.StatusFound, }","s":"Default Config","u":"/api/middleware/redirect","h":"#default-config","p":1597},{"i":1608,"t":"RequestID middleware for Fiber that adds an indentifier to the response.","s":"RequestID","u":"/api/middleware/requestid","h":"","p":1607},{"i":1610,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/requestid","h":"#signatures","p":1607},{"i":1612,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/requestid\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config app.Use(requestid.New()) // Or extend your config for customization app.Use(requestid.New(requestid.Config{ Header: \"X-Custom-Header\", Generator: func() string { return \"static-id\" }, }))","s":"Examples","u":"/api/middleware/requestid","h":"#examples","p":1607},{"i":1614,"t":"// Config defines the config for middleware. type Config struct { // Next defines a function to skip this middleware when returned true. // // Optional. Default: nil Next func(c *fiber.Ctx) bool // Header is the header key where to get/set the unique request ID // // Optional. Default: \"X-Request-ID\" Header string // Generator defines a function to generate the unique identifier. // // Optional. Default: utils.UUID Generator func() string // ContextKey defines the key used when storing the request ID in // the locals for a specific request. // // Optional. Default: requestid ContextKey interface{} }","s":"Config","u":"/api/middleware/requestid","h":"#config","p":1607},{"i":1616,"t":"The default config uses a fast UUID generator which will expose the number of requests made to the server. To conceal this value for better privacy, use the utils.UUIDv4 generator. var ConfigDefault = Config{ Next: nil, Header: fiber.HeaderXRequestID, Generator: utils.UUID, ContextKey: \"requestid\", }","s":"Default Config","u":"/api/middleware/requestid","h":"#default-config","p":1607},{"i":1618,"t":"Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.","s":"Rewrite","u":"/api/middleware/rewrite","h":"","p":1617},{"i":1620,"t":"func New(config ...Config) fiber.Handler","s":"Signatures","u":"/api/middleware/rewrite","h":"#signatures","p":1617},{"i":1622,"t":"package main import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/rewrite\" ) func main() { app := fiber.New() app.Use(rewrite.New(rewrite.Config{ Rules: map[string]string{ \"/old\": \"/new\", \"/old/*\": \"/new/$1\", }, })) app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) app.Get(\"/new/*\", func(c *fiber.Ctx) error { return c.SendString(\"Wildcard: \" + c.Params(\"*\")) }) app.Listen(\":3000\") } Test: curl http://localhost:3000/old curl http://localhost:3000/old/hello","s":"Examples","u":"/api/middleware/rewrite","h":"#examples","p":1617},{"i":1624,"t":"Session middleware for Fiber. note This middleware uses our Storage package to support various databases through a single interface. The default configuration for this middleware saves data to memory, see the examples below for other databases.","s":"Session","u":"/api/middleware/session","h":"","p":1623},{"i":1626,"t":"func New(config ...Config) *Store func (s *Store) RegisterType(i interface{}) func (s *Store) Get(c *fiber.Ctx) (*Session, error) func (s *Store) Reset() error func (s *Session) Get(key string) interface{} func (s *Session) Set(key string, val interface{}) func (s *Session) Delete(key string) func (s *Session) Destroy() error func (s *Session) Regenerate() error func (s *Session) Save() error func (s *Session) Fresh() bool func (s *Session) ID() string func (s *Session) Keys() []string caution Storing interface{} values are limited to built-ins Go types.","s":"Signatures","u":"/api/middleware/session","h":"#signatures","p":1623},{"i":1628,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/session\" ) After you initiate your Fiber app, you can use the following possibilities: // Initialize default config // This stores all of your app's sessions store := session.New() app.Get(\"/\", func(c *fiber.Ctx) error { // Get session from storage sess, err := store.Get(c) if err != nil { panic(err) } // Get value name := sess.Get(\"name\") // Set key/value sess.Set(\"name\", \"john\") // Get all Keys keys := sess.Keys() // Delete key sess.Delete(\"name\") // Destroy session if err := sess.Destroy(); err != nil { panic(err) } // Sets a specific expiration for this session sess.SetExpiry(time.Second * 2) // Save session if err := sess.Save(); err != nil { panic(err) } return c.SendString(fmt.Sprintf(\"Welcome %v\", name)) })","s":"Examples","u":"/api/middleware/session","h":"#examples","p":1623},{"i":1630,"t":"// Config defines the config for middleware. type Config struct { // Allowed session duration // Optional. Default value 24 * time.Hour Expiration time.Duration // Storage interface to store the session data // Optional. Default value memory.New() Storage fiber.Storage // KeyLookup is a string in the form of \":\" that is used // to extract session id from the request. // Possible values: \"header:\", \"query:\" or \"cookie:\" // Optional. Default value \"cookie:session_id\". KeyLookup string // Domain of the CSRF cookie. // Optional. Default value \"\". CookieDomain string // Path of the CSRF cookie. // Optional. Default value \"\". CookiePath string // Indicates if CSRF cookie is secure. // Optional. Default value false. CookieSecure bool // Indicates if CSRF cookie is HTTP only. // Optional. Default value false. CookieHTTPOnly bool // Value of SameSite cookie. // Optional. Default value \"Lax\". CookieSameSite string // Decides whether cookie should last for only the browser sesison. // Ignores Expiration if set to true // Optional. Default value false. CookieSessionOnly bool // KeyGenerator generates the session key. // Optional. Default value utils.UUIDv4 KeyGenerator func() string // Deprecated: Please use KeyLookup CookieName string // Source defines where to obtain the session id source Source // The session name sessionName string }","s":"Config","u":"/api/middleware/session","h":"#config","p":1623},{"i":1632,"t":"var ConfigDefault = Config{ Expiration: 24 * time.Hour, KeyLookup: \"cookie:session_id\", KeyGenerator: utils.UUIDv4, source: \"cookie\", sessionName: \"session_id\", }","s":"Default Config","u":"/api/middleware/session","h":"#default-config","p":1623},{"i":1634,"t":"const ( SourceCookie Source = \"cookie\" SourceHeader Source = \"header\" SourceURLQuery Source = \"query\" )","s":"Constants","u":"/api/middleware/session","h":"#constants","p":1623},{"i":1636,"t":"You can use any storage from our storage package. storage := sqlite3.New() // From github.com/gofiber/storage/sqlite3 store := session.New(session.Config{ Storage: storage, }) To use the store, see the Examples.","s":"Custom Storage/Database","u":"/api/middleware/session","h":"#custom-storagedatabase","p":1623},{"i":1638,"t":"Skip middleware for Fiber that skips a wrapped handler if a predicate is true.","s":"Skip","u":"/api/middleware/skip","h":"","p":1637},{"i":1640,"t":"func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler","s":"Signatures","u":"/api/middleware/skip","h":"#signatures","p":1637},{"i":1642,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/skip\" ) After you initiate your Fiber app, you can use the following possibilities: func main() { app := fiber.New() app.Use(skip.New(BasicHandler, func(ctx *fiber.Ctx) bool { return ctx.Method() == fiber.MethodGet })) app.Get(\"/\", func(ctx *fiber.Ctx) error { return ctx.SendString(\"It was a GET request!\") }) log.Fatal(app.Listen(\":3000\")) } func BasicHandler(ctx *fiber.Ctx) error { return ctx.SendString(\"It was not a GET request!\") } tip app.Use will handle requests from any route, and any method. In the example above, it will only skip if the method is GET.","s":"Examples","u":"/api/middleware/skip","h":"#examples","p":1637},{"i":1644,"t":"There exist two distinct implementations of timeout middleware Fiber. New Wraps a fiber.Handler with a timeout. If the handler takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler. caution This has been deprecated since it raises race conditions. NewWithContext As a fiber.Handler wrapper, it creates a context with context.WithTimeout and pass it in UserContext. If the context passed executions (eg. DB ops, Http calls) takes longer than the given duration to return, the timeout error is set and forwarded to the centralized ErrorHandler. It does not cancel long running executions. Underlying executions must handle timeout by using context.Context parameter.","s":"Timeout","u":"/api/middleware/timeout","h":"","p":1643},{"i":1646,"t":"func New(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler func NewWithContext(handler fiber.Handler, timeout time.Duration, timeoutErrors ...error) fiber.Handler","s":"Signatures","u":"/api/middleware/timeout","h":"#signatures","p":1643},{"i":1648,"t":"Import the middleware package that is part of the Fiber web framework import ( \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/timeout\" ) After you initiate your Fiber app, you can use the following possibilities: func main() { app := fiber.New() h := func(c *fiber.Ctx) error { sleepTime, _ := time.ParseDuration(c.Params(\"sleepTime\") + \"ms\") if err := sleepWithContext(c.UserContext(), sleepTime); err != nil { return fmt.Errorf(\"%w: execution error\", err) } return nil } app.Get(\"/foo/:sleepTime\", timeout.New(h, 2*time.Second)) log.Fatal(app.Listen(\":3000\")) } func sleepWithContext(ctx context.Context, d time.Duration) error { timer := time.NewTimer(d) select { case <-ctx.Done(): if !timer.Stop() { <-timer.C } return context.DeadlineExceeded case <-timer.C: } return nil } Test http 200 with curl: curl --location -I --request GET 'http://localhost:3000/foo/1000' Test http 408 with curl: curl --location -I --request GET 'http://localhost:3000/foo/3000' Use with custom error: var ErrFooTimeOut = errors.New(\"foo context canceled\") func main() { app := fiber.New() h := func(c *fiber.Ctx) error { sleepTime, _ := time.ParseDuration(c.Params(\"sleepTime\") + \"ms\") if err := sleepWithContextWithCustomError(c.UserContext(), sleepTime); err != nil { return fmt.Errorf(\"%w: execution error\", err) } return nil } app.Get(\"/foo/:sleepTime\", timeout.NewWithContext(h, 2*time.Second, ErrFooTimeOut)) log.Fatal(app.Listen(\":3000\")) } func sleepWithContextWithCustomError(ctx context.Context, d time.Duration) error { timer := time.NewTimer(d) select { case <-ctx.Done(): if !timer.Stop() { <-timer.C } return ErrFooTimeOut case <-timer.C: } return nil } Sample usage with a DB call: func main() { app := fiber.New() db, _ := gorm.Open(postgres.Open(\"postgres://localhost/foodb\"), &gorm.Config{}) handler := func(ctx *fiber.Ctx) error { tran := db.WithContext(ctx.UserContext()).Begin() if tran = tran.Exec(\"SELECT pg_sleep(50)\"); tran.Error != nil { return tran.Error } if tran = tran.Commit(); tran.Error != nil { return tran.Error } return nil } app.Get(\"/foo\", timeout.NewWithContext(handler, 10*time.Second)) log.Fatal(app.Listen(\":3000\")) }","s":"Examples","u":"/api/middleware/timeout","h":"#examples","p":1643},{"i":1651,"t":"TechEmpower provides a performance comparison of many web application frameworks executing fundamental tasks such as JSON serialization, database access, and server-side template composition. Each framework is operating in a realistic production configuration. Results are captured on cloud instances and on physical hardware. The test implementations are largely community-contributed and all source is available at the GitHub repository. Fiber v1.10.0 28 HT Cores Intel(R) Xeon(R) Gold 5120 CPU @ 2.20GHz 32GB RAM Ubuntu 18.04.3 4.15.0-88-generic Dedicated Cisco 10-Gbit Ethernet switch.","s":"TechEmpower","u":"/extra/benchmarks","h":"#techempower","p":1649},{"i":1653,"t":"The Plaintext test is an exercise of the request-routing fundamentals only, designed to demonstrate the capacity of high-performance platforms in particular. Requests will be sent using HTTP pipelining. The response payload is still small, meaning good performance is still necessary in order to saturate the gigabit Ethernet of the test environment. See Plaintext requirements Fiber - 6,162,556 responses per second with an average latency of 2.0 ms. Express - 367,069 responses per second with an average latency of 354.1 ms.","s":"Plaintext","u":"/extra/benchmarks","h":"#plaintext","p":1649},{"i":1655,"t":"Fiber handled 11,846 responses per second with an average latency of 42.8 ms. Express handled 2,066 responses per second with an average latency of 390.44 ms.","s":"Data Updates","u":"/extra/benchmarks","h":"#data-updates","p":1649},{"i":1657,"t":"Fiber handled 19,664 responses per second with an average latency of 25.7 ms. Express handled 4,302 responses per second with an average latency of 117.2 ms.","s":"Multiple Queries","u":"/extra/benchmarks","h":"#multiple-queries","p":1649},{"i":1659,"t":"Fiber handled 368,647 responses per second with an average latency of 0.7 ms. Express handled 57,880 responses per second with an average latency of 4.4 ms.","s":"Single Query","u":"/extra/benchmarks","h":"#single-query","p":1649},{"i":1661,"t":"Fiber handled 1,146,667 responses per second with an average latency of 0.4 ms. Express handled 244,847 responses per second with an average latency of 1.1 ms.","s":"JSON Serialization","u":"/extra/benchmarks","h":"#json-serialization","p":1649},{"i":1663,"t":"🔗 https://github.com/smallnest/go-web-framework-benchmark CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz MEM 4GB GO go1.13.6 linux/amd64 OS Linux The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers. The concurrency clients are 5000. Latency is the time of real processing time by web servers. The smaller is the better. Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better. If we enable http pipelining, test result as below: Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is: If we enable http pipelining, test result as below: Dependency graph for v1.9.0","s":"Go web framework benchmark","u":"/extra/benchmarks","h":"#go-web-framework-benchmark","p":1649},{"i":1666,"t":"There is no definitive answer to this question. The answer depends on the scale of your application and the team that is involved. To be as flexible as possible, Fiber makes no assumptions in terms of structure. Routes and other application-specific logic can live in as many files as you wish, in any directory structure you prefer. View the following examples for inspiration: gofiber/boilerplate thomasvvugt/fiber-boilerplate Youtube - Building a REST API using Gorm and Fiber embedmode/fiberseed","s":"How should I structure my application?","u":"/extra/faq","h":"#how-should-i-structure-my-application","p":1664},{"i":1668,"t":"If you're using v2.32.0 or later, all you need to do is to implement a custom error handler. See below, or see a more detailed explanation at Error Handling. If you're using v2.31.0 or earlier, the error handler will not capture 404 errors. Instead, you need to add a middleware function at the very bottom of the stack (below all other functions) to handle a 404 response: Example app.Use(func(c *fiber.Ctx) error { return c.Status(fiber.StatusNotFound).SendString(\"Sorry can't find that!\") })","s":"How do I handle custom 404 responses?","u":"/extra/faq","h":"#how-do-i-handle-custom-404-responses","p":1664},{"i":1670,"t":"Air is a handy tool that automatically restarts your Go applications whenever the source code changes, making your development process faster and more efficient. To use Air in a Fiber project, follow these steps: Install Air by downloading the appropriate binary for your operating system from the GitHub release page or by building the tool directly from source. Create a configuration file for Air in your project directory. This file can be named, for example, .air.toml or air.conf. Here's a sample configuration file that works with Fiber: # .air.toml root = \".\" tmp_dir = \"tmp\" [build] cmd = \"go build -o ./tmp/main .\" bin = \"./tmp/main\" delay = 1000 # ms exclude_dir = [\"assets\", \"tmp\", \"vendor\"] include_ext = [\"go\", \"tpl\", \"tmpl\", \"html\"] exclude_regex = [\"_test\\\\.go\"] Start your Fiber application using Air by running the following command in the terminal: air As you make changes to your source code, Air will detect them and automatically restart the application. A complete example demonstrating the use of Air with Fiber can be found in the Fiber Recipes repository. This example shows how to configure and use Air in a Fiber project to create an efficient development environment.","s":"How can i use live reload ?","u":"/extra/faq","h":"#how-can-i-use-live-reload-","p":1664},{"i":1672,"t":"To override the default error handler, you can override the default when providing a Config when initiating a new Fiber instance. Example app := fiber.New(fiber.Config{ ErrorHandler: func(c *fiber.Ctx, err error) error { return c.Status(fiber.StatusInternalServerError).SendString(err.Error()) }, }) We have a dedicated page explaining how error handling works in Fiber, see Error Handling.","s":"How do I set up an error handler?","u":"/extra/faq","h":"#how-do-i-set-up-an-error-handler","p":1664},{"i":1674,"t":"Fiber currently supports 8 template engines in our gofiber/template middleware: Ace Amber Django Handlebars HTML Jet Mustache Pug To learn more about using Templates in Fiber, see Templates.","s":"Which template engines does Fiber support?","u":"/extra/faq","h":"#which-template-engines-does-fiber-support","p":1664},{"i":1676,"t":"Yes, we have our own Discord server, where we hang out. We have different rooms for every subject. If you have questions or just want to have a chat, feel free to join us via this > invite link <.","s":"Does Fiber have a community chat?","u":"/extra/faq","h":"#does-fiber-have-a-community-chat","p":1664},{"i":1678,"t":"Yes we do, here are some examples: This example works v2 package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/logger\" ) type Host struct { Fiber *fiber.App } func main() { // Hosts hosts := map[string]*Host{} //----- // API //----- api := fiber.New() api.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"api.localhost:3000\"] = &Host{api} api.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"API\") }) //------ // Blog //------ blog := fiber.New() blog.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"blog.localhost:3000\"] = &Host{blog} blog.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Blog\") }) //--------- // Website //--------- site := fiber.New() site.Use(logger.New(logger.Config{ Format: \"[${ip}]:${port} ${status} - ${method} ${path}\\n\", })) hosts[\"localhost:3000\"] = &Host{site} site.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Website\") }) // Server app := fiber.New() app.Use(func(c *fiber.Ctx) error { host := hosts[c.Hostname()] if host == nil { return c.SendStatus(fiber.StatusNotFound) } else { host.Fiber.Handler()(c.Context()) return nil } }) log.Fatal(app.Listen(\":3000\")) } If more information is needed, please refer to this issue #750","s":"Does fiber support sub domain routing ?","u":"/extra/faq","h":"#does-fiber-support-sub-domain-routing-","p":1664},{"i":1681,"t":"It’s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them. Example app.Get(\"/\", func(c *fiber.Ctx) error { // Pass error to Fiber return c.SendFile(\"file-does-not-exist\") }) Fiber does not handle panics by default. To recover from a panic thrown by any handler in the stack, you need to include the Recover middleware below: Example package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/fiber/v2/middleware/recover\" ) func main() { app := fiber.New() app.Use(recover.New()) app.Get(\"/\", func(c *fiber.Ctx) error { panic(\"This panic is caught by fiber\") }) log.Fatal(app.Listen(\":3000\")) } You could use Fiber's custom error struct to pass an additional status code using fiber.NewError(). It's optional to pass a message; if this is left empty, it will default to the status code message (404 equals Not Found). Example app.Get(\"/\", func(c *fiber.Ctx) error { // 503 Service Unavailable return fiber.ErrServiceUnavailable // 503 On vacation! return fiber.NewError(fiber.StatusServiceUnavailable, \"On vacation!\") })","s":"Catching Errors","u":"/guide/error-handling","h":"#catching-errors","p":1679},{"i":1683,"t":"Fiber provides an error handler by default. For a standard error, the response is sent as 500 Internal Server Error. If the error is of type fiber.Error, the response is sent with the provided status code and message. Example // Default error handler var DefaultErrorHandler = func(c *fiber.Ctx, err error) error { // Status code defaults to 500 code := fiber.StatusInternalServerError // Retrieve the custom status code if it's a *fiber.Error var e *fiber.Error if errors.As(err, &e) { code = e.Code } // Set Content-Type: text/plain; charset=utf-8 c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8) // Return status code with error message return c.Status(code).SendString(err.Error()) }","s":"Default Error Handler","u":"/guide/error-handling","h":"#default-error-handler","p":1679},{"i":1685,"t":"A custom error handler can be set using a Config when initializing a Fiber instance. In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response. The following example shows how to display error pages for different types of errors. Example // Create a new fiber instance with custom config app := fiber.New(fiber.Config{ // Override default error handler ErrorHandler: func(ctx *fiber.Ctx, err error) error { // Status code defaults to 500 code := fiber.StatusInternalServerError // Retrieve the custom status code if it's a *fiber.Error var e *fiber.Error if errors.As(err, &e) { code = e.Code } // Send custom error page err = ctx.Status(code).SendFile(fmt.Sprintf(\"./%d.html\", code)) if err != nil { // In case the SendFile fails return ctx.Status(fiber.StatusInternalServerError).SendString(\"Internal Server Error\") } // Return from handler return nil }, }) // ... Special thanks to the Echo & Express framework for inspiration regarding error handling.","s":"Custom Error Handler","u":"/guide/error-handling","h":"#custom-error-handler","p":1679},{"i":1688,"t":"Since Fiber v2.32.0, we use encoding/json as default json library due to stability and producibility. However, the standard library is a bit slow compared to 3rd party libraries. If you're not happy with the performance of encoding/json, we recommend you to use these libraries: goccy/go-json bytedance/sonic segmentio/encoding mailru/easyjson minio/simdjson-go wI2L/jettison Example package main import \"github.com/gofiber/fiber/v2\" import \"github.com/goccy/go-json\" func main() { app := fiber.New(fiber.Config{ JSONEncoder: json.Marshal, JSONDecoder: json.Unmarshal, }) # ... }","s":"Custom JSON Encoder/Decoder","u":"/guide/faster-fiber","h":"#custom-json-encoderdecoder","p":1686},{"i":1690,"t":"Set custom JSON encoder for client Set custom JSON decoder for client Set custom JSON encoder for application Set custom JSON decoder for application","s":"References","u":"/guide/faster-fiber","h":"#references","p":1686},{"i":1692,"t":"info In general, the Group functionality in Fiber behaves similarly to ExpressJS. Groups are declared virtually and all routes declared within the group are flattened into a single list with a prefix, which is then checked by the framework in the order it was declared. This means that the behavior of Group in Fiber is identical to that of ExpressJS.","s":"🎭 Grouping","u":"/guide/grouping","h":"","p":1691},{"i":1694,"t":"Like Routing, groups can also have paths that belong to a cluster. func main() { app := fiber.New() api := app.Group(\"/api\", middleware) // /api v1 := api.Group(\"/v1\", middleware) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", middleware) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } A Group of paths can have an optional handler. func main() { app := fiber.New() api := app.Group(\"/api\") // /api v1 := api.Group(\"/v1\") // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\") // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } caution Running /api, /v1 or /v2 will result in 404 error, make sure you have the errors set.","s":"Paths","u":"/guide/grouping","h":"#paths","p":1691},{"i":1696,"t":"Group handlers can also be used as a routing path but they must have Next added to them so that the flow can continue. func main() { app := fiber.New() handler := func(c *fiber.Ctx) error { return c.SendStatus(fiber.StatusOK) } api := app.Group(\"/api\") // /api v1 := api.Group(\"/v1\", func(c *fiber.Ctx) error { // middleware for /api/v1 c.Set(\"Version\", \"v1\") return c.Next() }) v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user log.Fatal(app.Listen(\":3000\")) }","s":"Group Handlers","u":"/guide/grouping","h":"#group-handlers","p":1691},{"i":1698,"t":"With Fiber v2.30.0, you can execute custom user functions when to run some methods. Here is a list of this hooks: OnRoute OnName OnGroup OnGroupName OnListen OnFork OnShutdown OnMount","s":"🪝 Hooks","u":"/guide/hooks","h":"","p":1697},{"i":1700,"t":"// Handlers define a function to create hooks for Fiber. type OnRouteHandler = func(Route) error type OnNameHandler = OnRouteHandler type OnGroupHandler = func(Group) error type OnGroupNameHandler = OnGroupHandler type OnListenHandler = func() error type OnForkHandler = func(int) error type OnShutdownHandler = OnListenHandler type OnMountHandler = func(*App) error","s":"Constants","u":"/guide/hooks","h":"#constants","p":1697},{"i":1702,"t":"OnRoute is a hook to execute user functions on each route registeration. Also you can get route properties by route parameter. Signature func (app *App) OnRoute(handler ...OnRouteHandler)","s":"OnRoute","u":"/guide/hooks","h":"#onroute","p":1697},{"i":1704,"t":"OnName is a hook to execute user functions on each route naming. Also you can get route properties by route parameter. caution OnName only works with naming routes, not groups. Signature func (app *App) OnName(handler ...OnNameHandler) OnName Example package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" ) func main() { app := fiber.New() app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"index\") app.Hooks().OnName(func(r fiber.Route) error { fmt.Print(\"Name: \" + r.Name + \", \") return nil }) app.Hooks().OnName(func(r fiber.Route) error { fmt.Print(\"Method: \" + r.Method + \"\\n\") return nil }) app.Get(\"/add/user\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"addUser\") app.Delete(\"/destroy/user\", func(c *fiber.Ctx) error { return c.SendString(c.Route().Name) }).Name(\"destroyUser\") app.Listen(\":5000\") } // Results: // Name: addUser, Method: GET // Name: destroyUser, Method: DELETE","s":"OnName","u":"/guide/hooks","h":"#onname","p":1697},{"i":1706,"t":"OnGroup is a hook to execute user functions on each group registeration. Also you can get group properties by group parameter. Signature func (app *App) OnGroup(handler ...OnGroupHandler)","s":"OnGroup","u":"/guide/hooks","h":"#ongroup","p":1697},{"i":1708,"t":"OnGroupName is a hook to execute user functions on each group naming. Also you can get group properties by group parameter. caution OnGroupName only works with naming groups, not routes. Signature func (app *App) OnGroupName(handler ...OnGroupNameHandler)","s":"OnGroupName","u":"/guide/hooks","h":"#ongroupname","p":1697},{"i":1710,"t":"OnListen is a hook to execute user functions on Listen, ListenTLS, Listener. Signature func (app *App) OnListen(handler ...OnListenHandler)","s":"OnListen","u":"/guide/hooks","h":"#onlisten","p":1697},{"i":1712,"t":"OnFork is a hook to execute user functions on Fork. Signature func (app *App) OnFork(handler ...OnForkHandler)","s":"OnFork","u":"/guide/hooks","h":"#onfork","p":1697},{"i":1714,"t":"OnShutdown is a hook to execute user functions after Shutdown. Signature func (app *App) OnShutdown(handler ...OnShutdownHandler)","s":"OnShutdown","u":"/guide/hooks","h":"#onshutdown","p":1697},{"i":1716,"t":"OnMount is a hook to execute user function after mounting process. The mount event is fired when sub-app is mounted on a parent app. The parent app is passed as a parameter. It works for app and group mounting. Signature func (h *Hooks) OnMount(handler ...OnMountHandler) OnMount Example package main import ( \"fmt\" \"github.com/gofiber/fiber/v2\" ) func main() { app := New() app.Get(\"/\", testSimpleHandler).Name(\"x\") subApp := New() subApp.Get(\"/test\", testSimpleHandler) subApp.Hooks().OnMount(func(parent *fiber.App) error { fmt.Print(\"Mount path of parent app: \"+parent.MountPath()) // ... return nil }) app.Mount(\"/sub\", subApp) } // Result: // Mount path of parent app: caution OnName/OnRoute/OnGroup/OnGroupName hooks are mount-sensitive. If you use one of these routes on sub app and you mount it; paths of routes and groups will start with mount prefix.","s":"OnMount","u":"/guide/hooks","h":"#onmount","p":1697},{"i":1719,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Handlers","u":"/guide/routing","h":"#handlers","p":1717},{"i":1721,"t":"Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be strings or string patterns. Examples of route paths based on strings // This route path will match requests to the root route, \"/\": app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"root\") }) // This route path will match requests to \"/about\": app.Get(\"/about\", func(c *fiber.Ctx) error { return c.SendString(\"about\") }) // This route path will match requests to \"/random.txt\": app.Get(\"/random.txt\", func(c *fiber.Ctx) error { return c.SendString(\"random.txt\") }) As with the expressJs framework, the order of the route declaration plays a role. When a request is received, the routes are checked in the order in which they are declared. info So please be careful to write routes with variable parameters after the routes that contain fixed parts, so that these variable parts do not match instead and unexpected behavior occurs.","s":"Paths","u":"/guide/routing","h":"#paths","p":1717},{"i":1723,"t":"Route parameters are dynamic elements in the route, which are named or not named segments. This segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the Params function, with the name of the route parameter specified in the path as their respective keys or for unnamed parameters the character(*, +) and the counter of this. The characters :, +, and * are characters that introduce a parameter. Greedy parameters are indicated by wildcard(*) or plus(+) signs. The routing also offers the possibility to use optional parameters, for the named parameters these are marked with a final \"?\", unlike the plus sign which is not optional, you can use the wildcard character for a parameter range which is optional and greedy. Example of define routes with route parameters // Parameters app.Get(\"/user/:name/books/:title\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s\\n\", c.Params(\"name\")) fmt.Fprintf(c, \"%s\\n\", c.Params(\"title\")) return nil }) // Plus - greedy - not optional app.Get(\"/user/+\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"+\")) }) // Optional parameter app.Get(\"/user/:name?\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"name\")) }) // Wildcard - greedy - optional app.Get(\"/user/*\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"*\")) }) // This route path will match requests to \"/v1/some/resource/name:customVerb\", since the parameter character is escaped app.Get(\"/v1/some/resource/name\\\\:customVerb\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, Community\") }) info Since the hyphen (-) and the dot (.) are interpreted literally, they can be used along with route parameters for useful purposes. info All special parameter characters can also be escaped with \"\\\\\" and lose their value, so you can use them in the route if you want, like in the custom methods of the google api design guide. // http://localhost:3000/plantae/prunus.persica app.Get(\"/plantae/:genus.:species\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s.%s\\n\", c.Params(\"genus\"), c.Params(\"species\")) return nil // prunus.persica }) // http://localhost:3000/flights/LAX-SFO app.Get(\"/flights/:from-:to\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s-%s\\n\", c.Params(\"from\"), c.Params(\"to\")) return nil // LAX-SFO }) Our intelligent router recognizes that the introductory parameter characters should be part of the request route in this case and can process them as such. // http://localhost:3000/shop/product/color:blue/size:xs app.Get(\"/shop/product/color::color/size::size\", func(c *fiber.Ctx) error { fmt.Fprintf(c, \"%s:%s\\n\", c.Params(\"color\"), c.Params(\"size\")) return nil // blue:xs }) In addition, several parameters in a row and several unnamed parameter characters in the route, such as the wildcard or plus character, are possible, which greatly expands the possibilities of the router for the user. // GET /@v1 // Params: \"sign\" -> \"@\", \"param\" -> \"v1\" app.Get(\"/:sign:param\", handler) // GET /api-v1 // Params: \"name\" -> \"v1\" app.Get(\"/api-:name\", handler) // GET /customer/v1/cart/proxy // Params: \"*1\" -> \"customer/\", \"*2\" -> \"/cart\" app.Get(\"/*v1*/proxy\", handler) // GET /v1/brand/4/shop/blue/xs // Params: \"*1\" -> \"brand/4\", \"*2\" -> \"blue/xs\" app.Get(\"/v1/*/shop/*\", handler) We have adapted the routing strongly to the express routing, but currently without the possibility of the regular expressions, because they are quite slow. The possibilities can be tested with version 0.1.7 (express 4) in the online Express route tester.","s":"Parameters","u":"/guide/routing","h":"#parameters","p":1717},{"i":1725,"t":"Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values by parameters. The feature was intorduced in v2.37.0 and inspired by .NET Core. caution Constraints aren't validation for parameters. If constraint aren't valid for parameter value, Fiber returns 404 handler. Constraint Example Example matches int :id 123456789, -123456789 bool :active true,false guid :id CD2C1638-1638-72D5-1638-DEADBEEF1638 float :weight 1.234, -1,001.01e8 minLen(value) :username Test (must be at least 4 characters) maxLen(value) :filename MyFile (must be no more than 8 characters len(length) :filename somefile.txt (exactly 12 characters) min(value) :age 19 (Integer value must be at least 18) max(value) :age 91 (Integer value must be no more than 120) range(min,max) :age 91 (Integer value must be at least 18 but no more than 120) alpha :name Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive) datetime :dob 2005-11-01 regex(expression) :date 2022-08-27 (Must match regular expression) Examples Single Constraint Multiple Constraints Regex Constraint app.Get(\"/:test\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/12 // 12 // curl -X GET http://localhost:3000/1 // Cannot GET /1 You can use ; for multiple constraints. app.Get(\"/:test\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/120000 // Cannot GET /120000 // curl -X GET http://localhost:3000/1 // Cannot GET /1 // curl -X GET http://localhost:3000/250 // 250 Fiber precompiles regex query when to register routes. So there're no performance overhead for regex constraint. app.Get(\"/:date\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"date\")) }) // curl -X GET http://localhost:3000/125 // Cannot GET /125 // curl -X GET http://localhost:3000/test // Cannot GET /test // curl -X GET http://localhost:3000/2022-08-27 // 2022-08-27 caution You should use \\\\ before routing-specific characters when to use datetime constraint (*, +, ?, :, /, <, >, ;, (, )), to avoid wrong parsing. Optional Parameter Example You can impose constraints on optional parameters as well. app.Get(\"/:test?\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"test\")) }) // curl -X GET http://localhost:3000/42 // 42 // curl -X GET http://localhost:3000/ // // curl -X GET http://localhost:3000/7.0 // Cannot GET /7.0","s":"Constraints","u":"/guide/routing","h":"#constraints","p":1717},{"i":1727,"t":"Functions that are designed to make changes to the request or response are called middleware functions. The Next is a Fiber router function, when called, executes the next function that matches the current route. Example of a middleware function app.Use(func(c *fiber.Ctx) error { // Set a custom header on all responses: c.Set(\"X-Custom-Header\", \"Hello, World\") // Go to next middleware: return c.Next() }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") }) Use method path is a mount, or prefix path, and limits middleware to only apply to any paths requested that begin with it.","s":"Middleware","u":"/guide/routing","h":"#middleware","p":1717},{"i":1729,"t":"If you have many endpoints, you can organize your routes using Group. func main() { app := fiber.New() api := app.Group(\"/api\", middleware) // /api v1 := api.Group(\"/v1\", middleware) // /api/v1 v1.Get(\"/list\", handler) // /api/v1/list v1.Get(\"/user\", handler) // /api/v1/user v2 := api.Group(\"/v2\", middleware) // /api/v2 v2.Get(\"/list\", handler) // /api/v2/list v2.Get(\"/user\", handler) // /api/v2/user log.Fatal(app.Listen(\":3000\")) } More information about this in our Grouping Guide","s":"Grouping","u":"/guide/routing","h":"#grouping","p":1717},{"i":1732,"t":"Fiber provides a Views interface to provide your own template engine: Views type Views interface { Load() error Render(io.Writer, string, interface{}, ...string) error } Views interface contains a Load and Render method, Load is executed by Fiber on app initialization to load/parse the templates. // Pass engine to Fiber's Views Engine app := fiber.New(fiber.Config{ Views: engine, // Views Layout is the global layout for all template render until override on Render function. ViewsLayout: \"layouts/main\" }) The Render method is linked to the ctx.Render() function that accepts a template name and binding data. It will use global layout if layout is not being defined in Render function. If the Fiber config option PassLocalsToViews is enabled, then all locals set using ctx.Locals(key, value) will be passed to the template. app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"hello\": \"world\", }); })","s":"Template interfaces","u":"/guide/templates","h":"#template-interfaces","p":1730},{"i":1734,"t":"Fiber team maintains templates package that provides wrappers for multiple template engines: html ace amber django handlebars jet mustache pug Example views/index.html package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html/v2\" ) func main() { // Initialize standard Go html template engine engine := html.New(\"./views\", \".html\") // If you want other engine, just replace with following // Create a new engine with django // engine := django.New(\"./views\", \".django\") app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index template return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) }

{{.Title}}

","s":"Engines","u":"/guide/templates","h":"#engines","p":1730},{"i":1737,"t":"Fiber can make great use of the validator package to ensure correct validation of data to store. Official validator Github page (Installation, use, examples..). You can find the detailed descriptions of the validations used in the fields contained on the structs below: Detailed docs Validation Example type Job struct{ Type string `validate:\"required,min=3,max=32\"` Salary int `validate:\"required,number\"` } type User struct{ Name string `validate:\"required,min=3,max=32\"` // use `*bool` here otherwise the validation will fail for `false` values // Ref: https://github.com/go-playground/validator/issues/319#issuecomment-339222389 IsActive *bool `validate:\"required\"` Email string `validate:\"required,email,min=6,max=32\"` Job Job `validate:\"dive\"` } type ErrorResponse struct { FailedField string Tag string Value string } var validate = validator.New() func ValidateStruct(user User) []*ErrorResponse { var errors []*ErrorResponse err := validate.Struct(user) if err != nil { for _, err := range err.(validator.ValidationErrors) { var element ErrorResponse element.FailedField = err.StructNamespace() element.Tag = err.Tag() element.Value = err.Param() errors = append(errors, &element) } } return errors } func AddUser(c *fiber.Ctx) error { //Connect to database user := new(User) if err := c.BodyParser(user); err != nil { return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{ \"message\": err.Error(), }) } errors := ValidateStruct(*user) if errors != nil { return c.Status(fiber.StatusBadRequest).JSON(errors) } //Do something else here //Return user return c.JSON(user) } // Running a test with the following curl commands // curl -X POST -H \"Content-Type: application/json\" --data \"{\\\"name\\\":\\\"john\\\",\\\"isactive\\\":\\\"True\\\"}\" http://localhost:8080/register/user // Results in // [{\"FailedField\":\"User.Email\",\"Tag\":\"required\",\"Value\":\"\"},{\"FailedField\":\"User.Job.Salary\",\"Tag\":\"required\",\"Value\":\"\"},{\"FailedField\":\"User.Job.Type\",\"Tag\":\"required\",\"Value\":\"\"}]⏎","s":"Validator package","u":"/guide/validation","h":"#validator-package","p":1735},{"i":1739,"t":"Registers a route bound to a specific HTTP method. Signatures // HTTP methods func (app *App) Get(path string, handlers ...Handler) Router func (app *App) Head(path string, handlers ...Handler) Router func (app *App) Post(path string, handlers ...Handler) Router func (app *App) Put(path string, handlers ...Handler) Router func (app *App) Delete(path string, handlers ...Handler) Router func (app *App) Connect(path string, handlers ...Handler) Router func (app *App) Options(path string, handlers ...Handler) Router func (app *App) Trace(path string, handlers ...Handler) Router func (app *App) Patch(path string, handlers ...Handler) Router // Add allows you to specifiy a method as value func (app *App) Add(method, path string, handlers ...Handler) Router // All will register the route on all HTTP methods // Almost the same as app.Use but not bound to prefixes func (app *App) All(path string, handlers ...Handler) Router Examples // Simple GET handler app.Get(\"/api/list\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a GET request!\") }) // Simple POST handler app.Post(\"/api/register\", func(c *fiber.Ctx) error { return c.SendString(\"I'm a POST request!\") }) Use can be used for middleware packages and prefix catchers. These routes will only match the beginning of each path i.e. /john will match /john/doe, /johnnnnn etc Signature func (app *App) Use(args ...interface{}) Router Examples // Match any request app.Use(func(c *fiber.Ctx) error { return c.Next() }) // Match request starting with /api app.Use(\"/api\", func(c *fiber.Ctx) error { return c.Next() }) // Match requests starting with /api or /home (multiple-prefix support) app.Use([]string{\"/api\", \"/home\"}, func(c *fiber.Ctx) error { return c.Next() }) // Attach multiple handlers app.Use(\"/api\", func(c *fiber.Ctx) error { c.Set(\"X-Custom-Header\", random.String(32)) return c.Next() }, func(c *fiber.Ctx) error { return c.Next() })","s":"Route Handlers","u":"/partials/routing/route-handlers","h":"","p":1738},{"i":1742,"t":"Checks, if the specified extensions or content types are acceptable. info Based on the request’s Accept HTTP header. Signature func (c *Ctx) Accepts(offers ...string) string func (c *Ctx) AcceptsCharsets(offers ...string) string func (c *Ctx) AcceptsEncodings(offers ...string) string func (c *Ctx) AcceptsLanguages(offers ...string) string Example // Accept: text/html, application/json; q=0.8, text/plain; q=0.5; charset=\"utf-8\" app.Get(\"/\", func(c *fiber.Ctx) error { c.Accepts(\"html\") // \"html\" c.Accepts(\"text/html\") // \"text/html\" c.Accepts(\"json\", \"text\") // \"json\" c.Accepts(\"application/json\") // \"application/json\" c.Accepts(\"text/plain\", \"application/json\") // \"application/json\", due to quality c.Accepts(\"image/png\") // \"\" c.Accepts(\"png\") // \"\" // ... }) Example 2 // Accept: text/html, text/*, application/json, */*; q=0 app.Get(\"/\", func(c *fiber.Ctx) error { c.Accepts(\"text/plain\", \"application/json\") // \"application/json\", due to specificity c.Accepts(\"application/json\", \"text/html\") // \"text/html\", due to first match c.Accepts(\"image/png\") // \"\", due to */* without q factor 0 is Not Acceptable // ... }) Fiber provides similar functions for the other accept headers. // Accept-Charset: utf-8, iso-8859-1;q=0.2 // Accept-Encoding: gzip, compress;q=0.2 // Accept-Language: en;q=0.8, nl, ru app.Get(\"/\", func(c *fiber.Ctx) error { c.AcceptsCharsets(\"utf-16\", \"iso-8859-1\") // \"iso-8859-1\" c.AcceptsEncodings(\"compress\", \"br\") // \"compress\" c.AcceptsLanguages(\"pt\", \"nl\", \"ru\") // \"nl\" // ... })","s":"Accepts","u":"/api/ctx","h":"#accepts","p":1740},{"i":1744,"t":"Params is used to get all route parameters. Using Params method to get params. Signature func (c *Ctx) AllParams() map[string]string Example // GET http://example.com/user/fenny app.Get(\"/user/:name\", func(c *fiber.Ctx) error { c.AllParams() // \"{\"name\": \"fenny\"}\" // ... }) // GET http://example.com/user/fenny/123 app.Get(\"/user/*\", func(c *fiber.Ctx) error { c.AllParams() // \"{\"*1\": \"fenny/123\"}\" // ... })","s":"AllParams","u":"/api/ctx","h":"#allparams","p":1740},{"i":1746,"t":"Returns the *App reference so you could easily access all application settings. Signature func (c *Ctx) App() *App Example app.Get(\"/stack\", func(c *fiber.Ctx) error { return c.JSON(c.App().Stack()) })","s":"App","u":"/api/ctx","h":"#app","p":1740},{"i":1748,"t":"Appends the specified value to the HTTP response header field. caution If the header is not already set, it creates the header with the specified value. Signature func (c *Ctx) Append(field string, values ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Append(\"Link\", \"http://google.com\", \"http://localhost\") // => Link: http://localhost, http://google.com c.Append(\"Link\", \"Test\") // => Link: http://localhost, http://google.com, Test // ... })","s":"Append","u":"/api/ctx","h":"#append","p":1740},{"i":1750,"t":"Sets the HTTP response Content-Disposition header field to attachment. Signature func (c *Ctx) Attachment(filename ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Attachment() // => Content-Disposition: attachment c.Attachment(\"./upload/images/logo.png\") // => Content-Disposition: attachment; filename=\"logo.png\" // => Content-Type: image/png // ... })","s":"Attachment","u":"/api/ctx","h":"#attachment","p":1740},{"i":1752,"t":"Returns the base URL (protocol + host) as a string. Signature func (c *Ctx) BaseURL() string Example // GET https://example.com/page#chapter-1 app.Get(\"/\", func(c *fiber.Ctx) error { c.BaseURL() // https://example.com // ... })","s":"BaseURL","u":"/api/ctx","h":"#baseurl","p":1740},{"i":1754,"t":"Add vars to default view var map binding to template engine. Variables are read by the Render method and may be overwritten. Signature func (c *Ctx) Bind(vars Map) error Example app.Use(func(c *fiber.Ctx) error { c.Bind(fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"xxx.tmpl\", fiber.Map{}) // Render will use Title variable })","s":"Bind","u":"/api/ctx","h":"#bind","p":1740},{"i":1756,"t":"Returns the raw request body. Signature func (c *Ctx) Body() []byte Example // curl -X POST http://localhost:8080 -d user=john app.Post(\"/\", func(c *fiber.Ctx) error { // Get raw body from POST request: return c.Send(c.Body()) // []byte(\"user=john\") }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Body","u":"/api/ctx","h":"#body","p":1740},{"i":1758,"t":"Binds the request body to a struct. It is important to specify the correct struct tag based on the content type to be parsed. For example, if you want to parse a JSON body with a field called Pass, you would use a struct field of json:\"pass\". content-type struct tag application/x-www-form-urlencoded form multipart/form-data form application/json json application/xml xml text/xml xml Signature func (c *Ctx) BodyParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `json:\"name\" xml:\"name\" form:\"name\"` Pass string `json:\"pass\" xml:\"pass\" form:\"pass\"` } app.Post(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.BodyParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe // ... }) // Run tests with the following curl commands // curl -X POST -H \"Content-Type: application/json\" --data \"{\\\"name\\\":\\\"john\\\",\\\"pass\\\":\\\"doe\\\"}\" localhost:3000 // curl -X POST -H \"Content-Type: application/xml\" --data \"johndoe\" localhost:3000 // curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" --data \"name=john&pass=doe\" localhost:3000 // curl -X POST -F name=john -F pass=doe http://localhost:3000 // curl -X POST \"http://localhost:3000/?name=john&pass=doe\" Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"BodyParser","u":"/api/ctx","h":"#bodyparser","p":1740},{"i":1760,"t":"Expire a client cookie (or all cookies if left empty) Signature func (c *Ctx) ClearCookie(key ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { // Clears all cookies: c.ClearCookie() // Expire specific cookie by name: c.ClearCookie(\"user\") // Expire multiple cookies by names: c.ClearCookie(\"token\", \"session\", \"track_id\", \"version\") // ... }) caution Web browsers and other compliant clients will only clear the cookie if the given options are identical to those when creating the cookie, excluding expires and maxAge. ClearCookie will not set these values for you - a technique similar to the one shown below should be used to ensure your cookie is deleted. Example app.Get(\"/set\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"token\", Value: \"randomvalue\", Expires: time.Now().Add(24 * time.Hour), HTTPOnly: true, SameSite: \"lax\", }) // ... }) app.Get(\"/delete\", func(c *fiber.Ctx) error { c.Cookie(&fiber.Cookie{ Name: \"token\", // Set expiry date to the past Expires: time.Now().Add(-(time.Hour * 2)), HTTPOnly: true, SameSite: \"lax\", }) // ... })","s":"ClearCookie","u":"/api/ctx","h":"#clearcookie","p":1740},{"i":1762,"t":"ClientHelloInfo contains information from a ClientHello message in order to guide application logic in the GetCertificate and GetConfigForClient callbacks. You can refer to the ClientHelloInfo struct documentation for more information on the returned struct. Signature func (c *Ctx) ClientHelloInfo() *tls.ClientHelloInfo Example // GET http://example.com/hello app.Get(\"/hello\", func(c *fiber.Ctx) error { chi := c.ClientHelloInfo() // ... })","s":"ClientHelloInfo","u":"/api/ctx","h":"#clienthelloinfo","p":1740},{"i":1764,"t":"Returns *fasthttp.RequestCtx that is compatible with the context.Context interface that requires a deadline, a cancellation signal, and other values across API boundaries. Signature func (c *Ctx) Context() *fasthttp.RequestCtx info Please read the Fasthttp Documentation for more information.","s":"Context","u":"/api/ctx","h":"#context","p":1740},{"i":1766,"t":"Set cookie Signature func (c *Ctx) Cookie(cookie *Cookie) type Cookie struct { Name string `json:\"name\"` Value string `json:\"value\"` Path string `json:\"path\"` Domain string `json:\"domain\"` MaxAge int `json:\"max_age\"` Expires time.Time `json:\"expires\"` Secure bool `json:\"secure\"` HTTPOnly bool `json:\"http_only\"` SameSite string `json:\"same_site\"` SessionOnly bool `json:\"session_only\"` } Example app.Get(\"/\", func(c *fiber.Ctx) error { // Create cookie cookie := new(fiber.Cookie) cookie.Name = \"john\" cookie.Value = \"doe\" cookie.Expires = time.Now().Add(24 * time.Hour) // Set cookie c.Cookie(cookie) // ... })","s":"Cookie","u":"/api/ctx","h":"#cookie","p":1740},{"i":1768,"t":"Get cookie value by key, you could pass an optional default value that will be returned if the cookie key does not exist. Signature func (c *Ctx) Cookies(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { // Get cookie by key: c.Cookies(\"name\") // \"john\" c.Cookies(\"empty\", \"doe\") // \"doe\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Cookies","u":"/api/ctx","h":"#cookies","p":1740},{"i":1770,"t":"Transfers the file from path as an attachment. Typically, browsers will prompt the user to download. By default, the Content-Disposition header filename= parameter is the file path (this typically appears in the browser dialog). Override this default with the filename parameter. Signature func (c *Ctx) Download(file string, filename ...string) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.Download(\"./files/report-12345.pdf\"); // => Download report-12345.pdf return c.Download(\"./files/report-12345.pdf\", \"report.pdf\"); // => Download report.pdf })","s":"Download","u":"/api/ctx","h":"#download","p":1740},{"i":1772,"t":"Performs content-negotiation on the Accept HTTP header. It uses Accepts to select a proper format. info If the header is not specified or there is no proper format, text/plain is used. Signature func (c *Ctx) Format(body interface{}) error Example app.Get(\"/\", func(c *fiber.Ctx) error { // Accept: text/plain c.Format(\"Hello, World!\") // => Hello, World! // Accept: text/html c.Format(\"Hello, World!\") // =>

Hello, World!

// Accept: application/json c.Format(\"Hello, World!\") // => \"Hello, World!\" // .. })","s":"Format","u":"/api/ctx","h":"#format","p":1740},{"i":1774,"t":"MultipartForm files can be retrieved by name, the first file from the given key is returned. Signature func (c *Ctx) FormFile(key string) (*multipart.FileHeader, error) Example app.Post(\"/\", func(c *fiber.Ctx) error { // Get first file from form field \"document\": file, err := c.FormFile(\"document\") // Save file to root directory: return c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)) })","s":"FormFile","u":"/api/ctx","h":"#formfile","p":1740},{"i":1776,"t":"Any form values can be retrieved by name, the first value from the given key is returned. Signature func (c *Ctx) FormValue(key string, defaultValue ...string) string Example app.Post(\"/\", func(c *fiber.Ctx) error { // Get first value from form field \"name\": c.FormValue(\"name\") // => \"john\" or \"\" if not exist // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"FormValue","u":"/api/ctx","h":"#formvalue","p":1740},{"i":1778,"t":"https://expressjs.com/en/4x/api.html#req.fresh Signature func (c *Ctx) Fresh() bool","s":"Fresh","u":"/api/ctx","h":"#fresh","p":1740},{"i":1780,"t":"Returns the HTTP request header specified by the field. tip The match is case-insensitive. Signature func (c *Ctx) Get(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Get(\"Content-Type\") // \"text/plain\" c.Get(\"CoNtEnT-TypE\") // \"text/plain\" c.Get(\"something\", \"john\") // \"john\" // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Get","u":"/api/ctx","h":"#get","p":1740},{"i":1782,"t":"Returns the HTTP request headers. Signature func (c *Ctx) GetReqHeaders() map[string]string","s":"GetReqHeaders","u":"/api/ctx","h":"#getreqheaders","p":1740},{"i":1784,"t":"Returns the HTTP response header specified by the field. tip The match is case-insensitive. Signature func (c *Ctx) GetRespHeader(key string, defaultValue ...string) string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.GetRespHeader(\"X-Request-Id\") // \"8d7ad5e3-aaf3-450b-a241-2beb887efd54\" c.GetRespHeader(\"Content-Type\") // \"text/plain\" c.GetRespHeader(\"something\", \"john\") // \"john\" // .. }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"GetRespHeader","u":"/api/ctx","h":"#getrespheader","p":1740},{"i":1786,"t":"Returns the HTTP response headers. Signature func (c *Ctx) GetRespHeaders() map[string]string","s":"GetRespHeaders","u":"/api/ctx","h":"#getrespheaders","p":1740},{"i":1788,"t":"Generates URLs to named routes, with parameters. URLs are relative, for example: \"/user/1831\" Signature func (c *Ctx) GetRouteURL(routeName string, params Map) (string, error) Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Home page\") }).Name(\"home\") app.Get(\"/user/:id\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"id\")) }).Name(\"user.show\") app.Get(\"/test\", func(c *fiber.Ctx) error { location, _ := c.GetRouteURL(\"user.show\", fiber.Map{\"id\": 1}) return c.SendString(location) }) // /test returns \"/user/1\"","s":"GetRouteURL","u":"/api/ctx","h":"#getrouteurl","p":1740},{"i":1790,"t":"Returns the hostname derived from the Host HTTP header. Signature func (c *Ctx) Hostname() string Example // GET http://google.com/search app.Get(\"/\", func(c *fiber.Ctx) error { c.Hostname() // \"google.com\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Hostname","u":"/api/ctx","h":"#hostname","p":1740},{"i":1792,"t":"Returns the remote IP address of the request. Signature func (c *Ctx) IP() string Example app.Get(\"/\", func(c *fiber.Ctx) error { c.IP() // \"127.0.0.1\" // ... }) When registering the proxy request header in the fiber app, the ip address of the header is returned (Fiber configuration) app := fiber.New(fiber.Config{ ProxyHeader: fiber.HeaderXForwardedFor, })","s":"IP","u":"/api/ctx","h":"#ip","p":1740},{"i":1794,"t":"Returns an array of IP addresses specified in the X-Forwarded-For request header. Signature func (c *Ctx) IPs() []string Example // X-Forwarded-For: proxy1, 127.0.0.1, proxy3 app.Get(\"/\", func(c *fiber.Ctx) error { c.IPs() // [\"proxy1\", \"127.0.0.1\", \"proxy3\"] // ... })","s":"IPs","u":"/api/ctx","h":"#ips","p":1740},{"i":1796,"t":"Returns the matching content type, if the incoming request’s Content-Type HTTP header field matches the MIME type specified by the type parameter. info If the request has no body, it returns false. Signature func (c *Ctx) Is(extension string) bool Example // Content-Type: text/html; charset=utf-8 app.Get(\"/\", func(c *fiber.Ctx) error { c.Is(\"html\") // true c.Is(\".html\") // true c.Is(\"json\") // false // ... })","s":"Is","u":"/api/ctx","h":"#is","p":1740},{"i":1798,"t":"Returns true if request came from localhost Signature func (c *Ctx) IsFromLocal() bool { Example app.Get(\"/\", func(c *fiber.Ctx) error { // If request came from localhost, return true else return false c.IsFromLocal() // ... })","s":"IsFromLocal","u":"/api/ctx","h":"#isfromlocal","p":1740},{"i":1800,"t":"Converts any interface or string to JSON using the goccy/go-json package. info JSON also sets the content header to application/json. Signature func (c *Ctx) JSON(data interface{}) error Example type SomeStruct struct { Name string Age uint8 } app.Get(\"/json\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ Name: \"Grame\", Age: 20, } return c.JSON(data) // => Content-Type: application/json // => \"{\"Name\": \"Grame\", \"Age\": 20}\" return c.JSON(fiber.Map{ \"name\": \"Grame\", \"age\": 20, }) // => Content-Type: application/json // => \"{\"name\": \"Grame\", \"age\": 20}\" })","s":"JSON","u":"/api/ctx","h":"#json","p":1740},{"i":1802,"t":"Sends a JSON response with JSONP support. This method is identical to JSON, except that it opts-in to JSONP callback support. By default, the callback name is simply callback. Override this by passing a named string in the method. Signature func (c *Ctx) JSONP(data interface{}, callback ...string) error Example type SomeStruct struct { name string age uint8 } app.Get(\"/\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ name: \"Grame\", age: 20, } return c.JSONP(data) // => callback({\"name\": \"Grame\", \"age\": 20}) return c.JSONP(data, \"customFunc\") // => customFunc({\"name\": \"Grame\", \"age\": 20}) })","s":"JSONP","u":"/api/ctx","h":"#jsonp","p":1740},{"i":1804,"t":"Joins the links followed by the property to populate the response’s Link HTTP header field. Signature func (c *Ctx) Links(link ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Links( \"http://api.example.com/users?page=2\", \"next\", \"http://api.example.com/users?page=5\", \"last\", ) // Link: ; rel=\"next\", // ; rel=\"last\" // ... })","s":"Links","u":"/api/ctx","h":"#links","p":1740},{"i":1806,"t":"A method that stores variables scoped to the request and, therefore, are available only to the routes that match the request. tip This is useful if you want to pass some specific data to the next middleware. Signature func (c *Ctx) Locals(key interface{}, value ...interface{}) interface{} Example app.Use(func(c *fiber.Ctx) error { c.Locals(\"user\", \"admin\") return c.Next() }) app.Get(\"/admin\", func(c *fiber.Ctx) error { if c.Locals(\"user\") == \"admin\" { return c.Status(fiber.StatusOK).SendString(\"Welcome, admin!\") } return c.SendStatus(fiber.StatusForbidden) })","s":"Locals","u":"/api/ctx","h":"#locals","p":1740},{"i":1808,"t":"Sets the response Location HTTP header to the specified path parameter. Signature func (c *Ctx) Location(path string) Example app.Post(\"/\", func(c *fiber.Ctx) error { c.Location(\"http://example.com\") c.Location(\"/foo/bar\") return nil })","s":"Location","u":"/api/ctx","h":"#location","p":1740},{"i":1810,"t":"Returns a string corresponding to the HTTP method of the request: GET, POST, PUT, and so on. Optionally, you could override the method by passing a string. Signature func (c *Ctx) Method(override ...string) string Example app.Post(\"/\", func(c *fiber.Ctx) error { c.Method() // \"POST\" c.Method(\"GET\") c.Method() // GET // ... })","s":"Method","u":"/api/ctx","h":"#method","p":1740},{"i":1812,"t":"To access multipart form entries, you can parse the binary with MultipartForm(). This returns a map[string][]string, so given a key, the value will be a string slice. Signature func (c *Ctx) MultipartForm() (*multipart.Form, error) Example app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form if token := form.Value[\"token\"]; len(token) > 0 { // Get key value: fmt.Println(token[0]) } // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to disk: if err := c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)); err != nil { return err } } } return err })","s":"MultipartForm","u":"/api/ctx","h":"#multipartform","p":1740},{"i":1814,"t":"When Next is called, it executes the next method in the stack that matches the current route. You can pass an error struct within the method that will end the chaining and call the error handler. Signature func (c *Ctx) Next() error Example app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(\"1st route!\") return c.Next() }) app.Get(\"*\", func(c *fiber.Ctx) error { fmt.Println(\"2nd route!\") return c.Next() }) app.Get(\"/\", func(c *fiber.Ctx) error { fmt.Println(\"3rd route!\") return c.SendString(\"Hello, World!\") })","s":"Next","u":"/api/ctx","h":"#next","p":1740},{"i":1816,"t":"Returns the original request URL. Signature func (c *Ctx) OriginalURL() string Example // GET http://example.com/search?q=something app.Get(\"/\", func(c *fiber.Ctx) error { c.OriginalURL() // \"/search?q=something\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"OriginalURL","u":"/api/ctx","h":"#originalurl","p":1740},{"i":1818,"t":"Method can be used to get the route parameters, you could pass an optional default value that will be returned if the param key does not exist. info Defaults to empty string (\"\"), if the param doesn't exist. Signature func (c *Ctx) Params(key string, defaultValue ...string) string Example // GET http://example.com/user/fenny app.Get(\"/user/:name\", func(c *fiber.Ctx) error { c.Params(\"name\") // \"fenny\" // ... }) // GET http://example.com/user/fenny/123 app.Get(\"/user/*\", func(c *fiber.Ctx) error { c.Params(\"*\") // \"fenny/123\" c.Params(\"*1\") // \"fenny/123\" // ... }) Unnamed route parameters(*, +) can be fetched by the character and the counter in the route. Example // ROUTE: /v1/*/shop/* // GET: /v1/brand/4/shop/blue/xs c.Params(\"*1\") // \"brand/4\" c.Params(\"*2\") // \"blue/xs\" For reasons of downward compatibility, the first parameter segment for the parameter character can also be accessed without the counter. Example app.Get(\"/v1/*/shop/*\", func(c *fiber.Ctx) error { c.Params(\"*\") // outputs the values of the first wildcard segment }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Params","u":"/api/ctx","h":"#params","p":1740},{"i":1820,"t":"Method can be used to get an integer from the route parameters. Please note if that parameter is not in the request, zero will be returned. If the parameter is NOT a number, zero and an error will be returned info Defaults to the integer zero (0), if the param doesn't exist. Signature func (c *Ctx) ParamsInt(key string) (int, error) Example // GET http://example.com/user/123 app.Get(\"/user/:id\", func(c *fiber.Ctx) error { id, err := c.ParamsInt(\"id\") // int 123 and no error // ... }) This method is equivalent of using atoi with ctx.Params","s":"ParamsInt","u":"/api/ctx","h":"#paramsint","p":1740},{"i":1822,"t":"This method is similar to BodyParser, but for path parameters. It is important to use the struct tag \"params\". For example, if you want to parse a path parameter with a field called Pass, you would use a struct field of params:\"pass\" Signature func (c *Ctx) ParamsParser(out interface{}) error Example // GET http://example.com/user/111 app.Get(\"/user/:id\", func(c *fiber.Ctx) error { param := struct {ID uint `params:\"id\"`}{} c.ParamsParser(¶m) // \"{\"id\": 111}\" // ... })","s":"ParamsParser","u":"/api/ctx","h":"#paramsparser","p":1740},{"i":1824,"t":"Contains the path part of the request URL. Optionally, you could override the path by passing a string. For internal redirects, you might want to call RestartRouting instead of Next. Signature func (c *Ctx) Path(override ...string) string Example // GET http://example.com/users?sort=desc app.Get(\"/users\", func(c *fiber.Ctx) error { c.Path() // \"/users\" c.Path(\"/john\") c.Path() // \"/john\" // ... })","s":"Path","u":"/api/ctx","h":"#path","p":1740},{"i":1826,"t":"Contains the request protocol string: http or https for TLS requests. Signature func (c *Ctx) Protocol() string Example // GET http://example.com app.Get(\"/\", func(c *fiber.Ctx) error { c.Protocol() // \"http\" // ... })","s":"Protocol","u":"/api/ctx","h":"#protocol","p":1740},{"i":1828,"t":"Queries is a function that returns an object containing a property for each query string parameter in the route. Signature func (c *Ctx) Queries() (map[string]string, error) Example // GET http://example.com/?name=alex&want_pizza=false&id= app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"name\"] // \"alex\" m[\"want_pizza\"] // \"false\" m[\"id\"] // \"\" // ... }) Example // GET http://example.com/?field1=value1&field1=value2&field2=value3 app.Get(\"/\", func (c *fiber.Ctx) error { m := c.Queries() m[\"field1\"] // \"value2\" m[\"field2\"] // value3 }) Example // GET http://example.com/?list_a=1&list_a=2&list_a=3&list_b[]=1&list_b[]=2&list_b[]=3&list_c=1,2,3 app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"list_a\"] // \"3\" m[\"list_b[]\"] // \"3\" m[\"list_c\"] // \"1,2,3\" }) Example // GET /api/posts?filters.author.name=John&filters.category.name=Technology app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"filters.author.name\"] // John m[\"filters.category.name\"] // Technology }) Example // GET /api/posts?tags=apple,orange,banana&filters[tags]=apple,orange,banana&filters[category][name]=fruits&filters.tags=apple,orange,banana&filters.category.name=fruits app.Get(\"/\", func(c *fiber.Ctx) error { m := c.Queries() m[\"tags\"] // apple,orange,banana m[\"filters[tags]\"] // apple,orange,banana m[\"filters[category][name]\"] // fruits m[\"filters.tags\"] // apple,orange,banana m[\"filters.category.name\"] // fruits })","s":"Queries","u":"/api/ctx","h":"#queries","p":1740},{"i":1830,"t":"This property is an object containing a property for each query string parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. info If there is no query string, it returns an empty string. Signature func (c *Ctx) Query(key string, defaultValue ...string) string Example // GET http://example.com/?order=desc&brand=nike app.Get(\"/\", func(c *fiber.Ctx) error { c.Query(\"order\") // \"desc\" c.Query(\"brand\") // \"nike\" c.Query(\"empty\", \"nike\") // \"nike\" // ... }) Returned value is only valid within the handler. Do not store any references. Make copies or use the Immutable setting instead. Read more...","s":"Query","u":"/api/ctx","h":"#query","p":1740},{"i":1832,"t":"This property is an object containing a property for each query boolean parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, false will be returned. If the parameter is not a boolean, it is still tried to be converted and usually returned as false. Signature func (c *Ctx) QueryBool(key string, defaultValue ...bool) bool Example // GET http://example.com/?name=alex&want_pizza=false&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryBool(\"want_pizza\") // false c.QueryBool(\"want_pizza\", true) // false c.QueryBool(\"name\") // false c.QueryBool(\"name\", true) // true c.QueryBool(\"id\") // false c.QueryBool(\"id\", true) // true // ... })","s":"QueryBool","u":"/api/ctx","h":"#querybool","p":1740},{"i":1834,"t":"This property is an object containing a property for each query float64 parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, zero will be returned. If the parameter is not a number, it is still tried to be converted and usually returned as 1. info Defaults to the float64 zero (0), if the param doesn't exist. Signature func (c *Ctx) QueryFloat(key string, defaultValue ...float64) float64 Example // GET http://example.com/?name=alex&amount=32.23&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryFloat(\"amount\") // 32.23 c.QueryFloat(\"amount\", 3) // 32.23 c.QueryFloat(\"name\", 1) // 1 c.QueryFloat(\"name\") // 0 c.QueryFloat(\"id\", 3) // 3 // ... })","s":"QueryFloat","u":"/api/ctx","h":"#queryfloat","p":1740},{"i":1836,"t":"This property is an object containing a property for each query integer parameter in the route, you could pass an optional default value that will be returned if the query key does not exist. caution Please note if that parameter is not in the request, zero will be returned. If the parameter is not a number, it is still tried to be converted and usually returned as 1. info Defaults to the integer zero (0), if the param doesn't exist. Signature func (c *Ctx) QueryInt(key string, defaultValue ...int) int Example // GET http://example.com/?name=alex&wanna_cake=2&id= app.Get(\"/\", func(c *fiber.Ctx) error { c.QueryInt(\"wanna_cake\", 1) // 2 c.QueryInt(\"name\", 1) // 1 c.QueryInt(\"id\", 1) // 1 c.QueryInt(\"id\") // 0 // ... })","s":"QueryInt","u":"/api/ctx","h":"#queryint","p":1740},{"i":1838,"t":"This method is similar to BodyParser, but for query parameters. It is important to use the struct tag \"query\". For example, if you want to parse a query parameter with a field called Pass, you would use a struct field of query:\"pass\". Signature func (c *Ctx) QueryParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `query:\"name\"` Pass string `query:\"pass\"` Products []string `query:\"products\"` } app.Get(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.QueryParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe log.Println(p.Products) // [shoe, hat] // ... }) // Run tests with the following curl command // curl \"http://localhost:3000/?name=john&pass=doe&products=shoe,hat\"","s":"QueryParser","u":"/api/ctx","h":"#queryparser","p":1740},{"i":1840,"t":"A struct containing the type and a slice of ranges will be returned. Signature func (c *Ctx) Range(size int) (Range, error) Example // Range: bytes=500-700, 700-900 app.Get(\"/\", func(c *fiber.Ctx) error { b := c.Range(1000) if b.Type == \"bytes\" { for r := range r.Ranges { fmt.Println(r) // [500, 700] } } })","s":"Range","u":"/api/ctx","h":"#range","p":1740},{"i":1842,"t":"Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. Signature func (c *Ctx) Redirect(location string, status ...int) error Example app.Get(\"/coffee\", func(c *fiber.Ctx) error { return c.Redirect(\"/teapot\") }) app.Get(\"/teapot\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusTeapot).Send(\"🍵 short and stout 🍵\") }) More examples app.Get(\"/\", func(c *fiber.Ctx) error { return c.Redirect(\"/foo/bar\") return c.Redirect(\"../login\") return c.Redirect(\"http://example.com\") return c.Redirect(\"http://example.com\", 301) })","s":"Redirect","u":"/api/ctx","h":"#redirect","p":1740},{"i":1844,"t":"Redirects to the specific route along with the parameters and with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. info If you want to send queries to route, you must add \"queries\" key typed as map[string]string to params. Signature func (c *Ctx) RedirectToRoute(routeName string, params fiber.Map, status ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { // /user/fiber return c.RedirectToRoute(\"user\", fiber.Map{ \"name\": \"fiber\" }) }) app.Get(\"/with-queries\", func(c *fiber.Ctx) error { // /user/fiber?data[0][name]=john&data[0][age]=10&test=doe return c.RedirectToRoute(\"user\", fiber.Map{ \"name\": \"fiber\", \"queries\": map[string]string{\"data[0][name]\": \"john\", \"data[0][age]\": \"10\", \"test\": \"doe\"}, }) }) app.Get(\"/user/:name\", func(c *fiber.Ctx) error { return c.SendString(c.Params(\"name\")) }).Name(\"user\")","s":"RedirectToRoute","u":"/api/ctx","h":"#redirecttoroute","p":1740},{"i":1846,"t":"Redirects back to refer URL. It redirects to fallback URL if refer header doesn't exists, with specified status, a positive integer that corresponds to an HTTP status code. info If not specified, status defaults to 302 Found. Signature func (c *Ctx) RedirectBack(fallback string, status ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Home page\") }) app.Get(\"/test\", func(c *fiber.Ctx) error { c.Set(\"Content-Type\", \"text/html\") return c.SendString(`Back`) }) app.Get(\"/back\", func(c *fiber.Ctx) error { return c.RedirectBack(\"/\") })","s":"RedirectBack","u":"/api/ctx","h":"#redirectback","p":1740},{"i":1848,"t":"Renders a view with data and sends a text/html response. By default Render uses the default Go Template engine. If you want to use another View engine, please take a look at our Template middleware. Signature func (c *Ctx) Render(name string, bind interface{}, layouts ...string) error","s":"Render","u":"/api/ctx","h":"#render","p":1740},{"i":1850,"t":"Request return the *fasthttp.Request pointer Signature func (c *Ctx) Request() *fasthttp.Request Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Request().Header.Method() // => []byte(\"GET\") })","s":"Request","u":"/api/ctx","h":"#request","p":1740},{"i":1852,"t":"This method is similar to BodyParser, but for request headers. It is important to use the struct tag \"reqHeader\". For example, if you want to parse a request header with a field called Pass, you would use a struct field of reqHeader:\"pass\". Signature func (c *Ctx) ReqHeaderParser(out interface{}) error Example // Field names should start with an uppercase letter type Person struct { Name string `reqHeader:\"name\"` Pass string `reqHeader:\"pass\"` Products []string `reqHeader:\"products\"` } app.Get(\"/\", func(c *fiber.Ctx) error { p := new(Person) if err := c.ReqHeaderParser(p); err != nil { return err } log.Println(p.Name) // john log.Println(p.Pass) // doe log.Println(p.Products) // [shoe, hat] // ... }) // Run tests with the following curl command // curl \"http://localhost:3000/\" -H \"name: john\" -H \"pass: doe\" -H \"products: shoe,hat\"","s":"ReqHeaderParser","u":"/api/ctx","h":"#reqheaderparser","p":1740},{"i":1854,"t":"Response return the *fasthttp.Response pointer Signature func (c *Ctx) Response() *fasthttp.Response Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Response().BodyWriter().Write([]byte(\"Hello, World!\")) // => \"Hello, World!\" return nil })","s":"Response","u":"/api/ctx","h":"#response","p":1740},{"i":1856,"t":"Instead of executing the next method when calling Next, RestartRouting restarts execution from the first method that matches the current route. This may be helpful after overriding the path, i. e. an internal redirect. Note that handlers might be executed again which could result in an infinite loop. Signature func (c *Ctx) RestartRouting() error Example app.Get(\"/new\", func(c *fiber.Ctx) error { return c.SendString(\"From /new\") }) app.Get(\"/old\", func(c *fiber.Ctx) error { c.Path(\"/new\") return c.RestartRouting() })","s":"RestartRouting","u":"/api/ctx","h":"#restartrouting","p":1740},{"i":1858,"t":"Returns the matched Route struct. Signature func (c *Ctx) Route() *Route Example // http://localhost:8080/hello app.Get(\"/hello/:name\", func(c *fiber.Ctx) error { r := c.Route() fmt.Println(r.Method, r.Path, r.Params, r.Handlers) // GET /hello/:name handler [name] // ... }) caution Do not rely on c.Route() in middlewares before calling c.Next() - c.Route() returns the last executed route. Example func MyMiddleware() fiber.Handler { return func(c *fiber.Ctx) error { beforeNext := c.Route().Path // Will be '/' err := c.Next() afterNext := c.Route().Path // Will be '/hello/:name' return err } }","s":"Route","u":"/api/ctx","h":"#route","p":1740},{"i":1860,"t":"Method is used to save any multipart file to disk. Signature func (c *Ctx) SaveFile(fh *multipart.FileHeader, path string) error Example app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to disk: if err := c.SaveFile(file, fmt.Sprintf(\"./%s\", file.Filename)); err != nil { return err } } return err } })","s":"SaveFile","u":"/api/ctx","h":"#savefile","p":1740},{"i":1862,"t":"Method is used to save any multipart file to an external storage system. Signature func (c *Ctx) SaveFileToStorage(fileheader *multipart.FileHeader, path string, storage Storage) error Example storage := memory.New() app.Post(\"/\", func(c *fiber.Ctx) error { // Parse the multipart form: if form, err := c.MultipartForm(); err == nil { // => *multipart.Form // Get all files from \"documents\" key: files := form.File[\"documents\"] // => []*multipart.FileHeader // Loop through files: for _, file := range files { fmt.Println(file.Filename, file.Size, file.Header[\"Content-Type\"][0]) // => \"tutorial.pdf\" 360641 \"application/pdf\" // Save the files to storage: if err := c.SaveFileToStorage(file, fmt.Sprintf(\"./%s\", file.Filename), storage); err != nil { return err } } return err } })","s":"SaveFileToStorage","u":"/api/ctx","h":"#savefiletostorage","p":1740},{"i":1864,"t":"A boolean property that is true , if a TLS connection is established. Signature func (c *Ctx) Secure() bool Example // Secure() method is equivalent to: c.Protocol() == \"https\"","s":"Secure","u":"/api/ctx","h":"#secure","p":1740},{"i":1866,"t":"Sets the HTTP response body. Signature func (c *Ctx) Send(body []byte) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.Send([]byte(\"Hello, World!\")) // => \"Hello, World!\" }) Fiber also provides SendString and SendStream methods for raw inputs. tip Use this if you don't need type assertion, recommended for faster performance. Signature func (c *Ctx) SendString(body string) error func (c *Ctx) SendStream(stream io.Reader, size ...int) error Example app.Get(\"/\", func(c *fiber.Ctx) error { return c.SendString(\"Hello, World!\") // => \"Hello, World!\" return c.SendStream(bytes.NewReader([]byte(\"Hello, World!\"))) // => \"Hello, World!\" })","s":"Send","u":"/api/ctx","h":"#send","p":1740},{"i":1868,"t":"Transfers the file from the given path. Sets the Content-Type response HTTP header field based on the filenames extension. caution Method doesn´t use gzipping by default, set it to true to enable. Signature func (c *Ctx) SendFile(file string, compress ...bool) error Example app.Get(\"/not-found\", func(c *fiber.Ctx) error { return c.SendFile(\"./public/404.html\"); // Disable compression return c.SendFile(\"./static/index.html\", false); }) info If the file contains an url specific character you have to escape it before passing the file path into the sendFile function. Example app.Get(\"/file-with-url-chars\", func(c *fiber.Ctx) error { return c.SendFile(url.PathEscape(\"hash_sign_#.txt\")) })","s":"SendFile","u":"/api/ctx","h":"#sendfile","p":1740},{"i":1870,"t":"Sets the status code and the correct status message in the body, if the response body is empty. tip You can find all used status codes and messages here. Signature func (c *Ctx) SendStatus(status int) error Example app.Get(\"/not-found\", func(c *fiber.Ctx) error { return c.SendStatus(415) // => 415 \"Unsupported Media Type\" c.SendString(\"Hello, World!\") return c.SendStatus(415) // => 415 \"Hello, World!\" })","s":"SendStatus","u":"/api/ctx","h":"#sendstatus","p":1740},{"i":1872,"t":"Sets the response’s HTTP header field to the specified key, value. Signature func (c *Ctx) Set(key string, val string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Set(\"Content-Type\", \"text/plain\") // => \"Content-type: text/plain\" // ... })","s":"Set","u":"/api/ctx","h":"#set","p":1740},{"i":1874,"t":"Allow you to config BodyParser/QueryParser decoder, base on schema's options, providing possibility to add custom type for pausing. Signature func SetParserDecoder(parserConfig fiber.ParserConfig{ IgnoreUnknownKeys bool, ParserType []fiber.ParserType{ Customtype interface{}, Converter func(string) reflect.Value, }, ZeroEmpty bool, SetAliasTag string, }) Example type CustomTime time.Time // String() returns the time in string func (ct *CustomTime) String() string { t := time.Time(*ct).String() return t } // Register the converter for CustomTime type format as 2006-01-02 var timeConverter = func(value string) reflect.Value { fmt.Println(\"timeConverter\", value) if v, err := time.Parse(\"2006-01-02\", value); err == nil { return reflect.ValueOf(v) } return reflect.Value{} } customTime := fiber.ParserType{ Customtype: CustomTime{}, Converter: timeConverter, } // Add setting to the Decoder fiber.SetParserDecoder(fiber.ParserConfig{ IgnoreUnknownKeys: true, ParserType: []fiber.ParserType{customTime}, ZeroEmpty: true, }) // Example to use CustomType, you pause custom time format not in RFC3339 type Demo struct { Date CustomTime `form:\"date\" query:\"date\"` Title string `form:\"title\" query:\"title\"` Body string `form:\"body\" query:\"body\"` } app.Post(\"/body\", func(c *fiber.Ctx) error { var d Demo c.BodyParser(&d) fmt.Println(\"d.Date\", d.Date.String()) return c.JSON(d) }) app.Get(\"/query\", func(c *fiber.Ctx) error { var d Demo c.QueryParser(&d) fmt.Println(\"d.Date\", d.Date.String()) return c.JSON(d) }) // curl -X POST -F title=title -F body=body -F date=2021-10-20 http://localhost:3000/body // curl -X GET \"http://localhost:3000/query?title=title&body=body&date=2021-10-20\"","s":"SetParserDecoder","u":"/api/ctx","h":"#setparserdecoder","p":1740},{"i":1876,"t":"Sets the user specified implementation for context interface. Signature func (c *Ctx) SetUserContext(ctx context.Context) Example app.Get(\"/\", func(c *fiber.Ctx) error { ctx := context.Background() c.SetUserContext(ctx) // Here ctx could be any context implementation // ... })","s":"SetUserContext","u":"/api/ctx","h":"#setusercontext","p":1740},{"i":1878,"t":"https://expressjs.com/en/4x/api.html#req.stale Signature func (c *Ctx) Stale() bool","s":"Stale","u":"/api/ctx","h":"#stale","p":1740},{"i":1880,"t":"Sets the HTTP status for the response. info Method is a chainable. Signature func (c *Ctx) Status(status int) *Ctx Example app.Get(\"/fiber\", func(c *fiber.Ctx) error { c.Status(fiber.StatusOK) return nil } app.Get(\"/hello\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusBadRequest).SendString(\"Bad Request\") } app.Get(\"/world\", func(c *fiber.Ctx) error { return c.Status(fiber.StatusNotFound).SendFile(\"./public/gopher.png\") })","s":"Status","u":"/api/ctx","h":"#status","p":1740},{"i":1882,"t":"Returns a string slice of subdomains in the domain name of the request. The application property subdomain offset, which defaults to 2, is used for determining the beginning of the subdomain segments. Signature func (c *Ctx) Subdomains(offset ...int) []string Example // Host: \"tobi.ferrets.example.com\" app.Get(\"/\", func(c *fiber.Ctx) error { c.Subdomains() // [\"ferrets\", \"tobi\"] c.Subdomains(1) // [\"tobi\"] // ... })","s":"Subdomains","u":"/api/ctx","h":"#subdomains","p":1740},{"i":1884,"t":"Sets the Content-Type HTTP header to the MIME type listed here specified by the file extension. Signature func (c *Ctx) Type(ext string, charset ...string) *Ctx Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Type(\".html\") // => \"text/html\" c.Type(\"html\") // => \"text/html\" c.Type(\"png\") // => \"image/png\" c.Type(\"json\", \"utf-8\") // => \"application/json; charset=utf-8\" // ... })","s":"Type","u":"/api/ctx","h":"#type","p":1740},{"i":1886,"t":"UserContext returns a context implementation that was set by user earlier or returns a non-nil, empty context, if it was not set earlier. Signature func (c *Ctx) UserContext() context.Context Example app.Get(\"/\", func(c *fiber.Ctx) error { ctx := c.UserContext() // ctx is context implementation set by user // ... })","s":"UserContext","u":"/api/ctx","h":"#usercontext","p":1740},{"i":1888,"t":"Adds the given header field to the Vary response header. This will append the header, if not already listed, otherwise leaves it listed in the current location. info Multiple fields are allowed. Signature func (c *Ctx) Vary(fields ...string) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Vary(\"Origin\") // => Vary: Origin c.Vary(\"User-Agent\") // => Vary: Origin, User-Agent // No duplicates c.Vary(\"Origin\") // => Vary: Origin, User-Agent c.Vary(\"Accept-Encoding\", \"Accept\") // => Vary: Origin, User-Agent, Accept-Encoding, Accept // ... })","s":"Vary","u":"/api/ctx","h":"#vary","p":1740},{"i":1890,"t":"Write adopts the Writer interface Signature func (c *Ctx) Write(p []byte) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.Write([]byte(\"Hello, World!\")) // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"Write","u":"/api/ctx","h":"#write","p":1740},{"i":1892,"t":"Writef adopts the string with variables Signature func (c *Ctx) Writef(f string, a ...interface{}) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { world := \"World!\" c.Writef(\"Hello, %s\", world) // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"Writef","u":"/api/ctx","h":"#writef","p":1740},{"i":1894,"t":"WriteString adopts the string Signature func (c *Ctx) WriteString(s string) (n int, err error) Example app.Get(\"/\", func(c *fiber.Ctx) error { c.WriteString(\"Hello, World!\") // => \"Hello, World!\" fmt.Fprintf(c, \"%s\\n\", \"Hello, World!\") // \"Hello, World!Hello, World!\" })","s":"WriteString","u":"/api/ctx","h":"#writestring","p":1740},{"i":1896,"t":"A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery). Signature func (c *Ctx) XHR() bool Example // X-Requested-With: XMLHttpRequest app.Get(\"/\", func(c *fiber.Ctx) error { c.XHR() // true // ... })","s":"XHR","u":"/api/ctx","h":"#xhr","p":1740},{"i":1898,"t":"Converts any interface or string to XML using the standard encoding/xml package. info XML also sets the content header to application/xml. Signature func (c *Ctx) XML(data interface{}) error Example type SomeStruct struct { XMLName xml.Name `xml:\"Fiber\"` Name string `xml:\"Name\"` Age uint8 `xml:\"Age\"` } app.Get(\"/\", func(c *fiber.Ctx) error { // Create data struct: data := SomeStruct{ Name: \"Grame\", Age: 20, } return c.XML(data) // // Grame // 20 // })","s":"XML","u":"/api/ctx","h":"#xml","p":1740},{"i":1900,"t":"OpenTelemetry support for Fiber. Can be found on OpenTelemetry Registry.","s":"Otelfiber","u":"/contrib/otelfiber/","h":"","p":1899},{"i":1902,"t":"This middleware supports Fiber v2. go get -u github.com/gofiber/contrib/otelfiber","s":"Install","u":"/contrib/otelfiber/","h":"#install","p":1899},{"i":1904,"t":"otelfiber.Middleware(opts ...Option) fiber.Handler","s":"Signature","u":"/contrib/otelfiber/","h":"#signature","p":1899},{"i":1906,"t":"Property Type Description Default Next func(*fiber.Ctx) bool Define a function to skip this middleware when returned trueRequired - Rego quer nil TracerProvider oteltrace.TracerProvider Specifies a tracer provider to use for creating a tracer nil - the global tracer provider is used MeterProvider otelmetric.MeterProvider Specifies a meter provider to use for reporting nil - the global meter provider is used Port *int Specifies the value to use when setting the net.host.port attribute on metrics/spans Required: If not default (80 for http, 443 for https) Propagators propagation.TextMapPropagator Specifies propagators to use for extracting information from the HTTP requests If none are specified, global ones will be used ServerName *string specifies the value to use when setting the http.server_name attribute on metrics/spans - SpanNameFormatter func(*fiber.Ctx) string Takes a function that will be called on every request and the returned string will become the Span Name default formatter returns the route pathRaw","s":"Config","u":"/contrib/otelfiber/","h":"#config","p":1899},{"i":1908,"t":"Please refer to example","s":"Usage","u":"/contrib/otelfiber/","h":"#usage","p":1899},{"i":1910,"t":"package main import ( \"context\" \"errors\" \"log\" \"go.opentelemetry.io/otel/sdk/resource\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/contrib/otelfiber\" \"go.opentelemetry.io/otel\" \"go.opentelemetry.io/otel/attribute\" stdout \"go.opentelemetry.io/otel/exporters/stdout/stdouttrace\" //\"go.opentelemetry.io/otel/exporters/jaeger\" \"go.opentelemetry.io/otel/propagation\" sdktrace \"go.opentelemetry.io/otel/sdk/trace\" semconv \"go.opentelemetry.io/otel/semconv/v1.4.0\" oteltrace \"go.opentelemetry.io/otel/trace\" ) var tracer = otel.Tracer(\"fiber-server\") func main() { tp := initTracer() defer func() { if err := tp.Shutdown(context.Background()); err != nil { log.Printf(\"Error shutting down tracer provider: %v\", err) } }() app := fiber.New() app.Use(otelfiber.Middleware()) app.Get(\"/error\", func(ctx *fiber.Ctx) error { return errors.New(\"abc\") }) app.Get(\"/users/:id\", func(c *fiber.Ctx) error { id := c.Params(\"id\") name := getUser(c.UserContext(), id) return c.JSON(fiber.Map{\"id\": id, name: name}) }) log.Fatal(app.Listen(\":3000\")) } func initTracer() *sdktrace.TracerProvider { exporter, err := stdout.New(stdout.WithPrettyPrint()) if err != nil { log.Fatal(err) } tp := sdktrace.NewTracerProvider( sdktrace.WithSampler(sdktrace.AlwaysSample()), sdktrace.WithBatcher(exporter), sdktrace.WithResource( resource.NewWithAttributes( semconv.SchemaURL, semconv.ServiceNameKey.String(\"my-service\"), )), ) otel.SetTracerProvider(tp) otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{})) return tp } func getUser(ctx context.Context, id string) string { _, span := tracer.Start(ctx, \"getUser\", oteltrace.WithAttributes(attribute.String(\"id\", id))) defer span.End() if id == \"123\" { return \"otelfiber tester\" } return \"unknown\" }","s":"Example","u":"/contrib/otelfiber/","h":"#example","p":1899}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/723",[0,7.753,1,9.501,2,8.153,3,2.485,4,7.434]],["t/725",[5,7.278,6,8.481,7,7.756,8,8.481,9,8.481,10,6.196,11,7.278,12,6.018,13,6.196,14,3.873,15,7.756,16,7.756,17,6.921,18,7.278,19,6.637]],["t/727",[3,2.546,5,8.354,20,2.469]],["t/729",[21,4.094,22,7.087,23,2.734,24,7.073,25,7.926,26,8.524,27,4.804,28,7.073]],["t/731",[29,9.735,30,9.735,31,9.735]],["t/733",[3,1.588,5,5.21,13,4.436,26,4.955,32,3.115,33,1.797,34,3.765,35,1.421,36,6.778,37,1.577,38,6.071,39,2.855,40,2.401,41,6.071,42,6.778,43,6.071,44,2.855,45,6.071,46,9.467,47,6.071,48,2.062,49,3.365,50,1.111,51,0.648,52,4.955,53,5.984,54,4.751,55,4.436,56,4.001,57,4.751,58,6.541,59,1.354,60,4.056,61,3.867,62,8.124]],["t/735",[26,9.063,39,4.522,63,8.794]],["t/737",[23,1.754,24,4.537,28,4.537,36,4.537,37,1.055,42,4.537,51,0.954,52,4.537,57,4.35,59,1.273,64,1.508,65,2.777,66,1.609,67,2.998,68,4.771,69,4.35,70,4.537,71,4.771,72,0.749,73,1.424,74,2.233,75,4.771,76,4.771,77,4.771,78,4.771,79,4.771,80,1.893,81,1.723,82,4.537,83,3.273,84,2.614,85,5.084,86,7.813,87,5.559,88,3.021,89,5.559,90,5.559,91,5.559,92,4.061]],["t/739",[23,1.858,24,4.807,28,4.807,36,4.807,37,1.118,40,2.329,42,4.807,51,0.948,52,4.807,57,4.609,59,0.96,64,1.598,65,2.891,66,1.705,67,3.177,68,5.055,69,4.609,70,4.807,71,5.055,72,0.793,73,1.509,74,2.366,75,5.055,76,5.055,77,5.055,78,5.055,79,5.055,80,1.704,81,1.552,82,4.807,83,3.468,84,2.77,85,5.387,88,2.278,92,4.303,93,3.8,94,5.055,95,2.136,96,5.891]],["t/741",[23,1.93,24,4.993,28,4.993,36,4.993,37,1.162,42,4.993,51,0.948,52,4.993,57,4.788,59,0.997,64,1.66,65,2.967,66,1.771,67,3.3,68,5.251,69,4.788,70,4.993,71,5.251,72,0.824,73,1.568,74,2.457,75,5.251,76,5.251,77,5.251,78,5.251,79,5.251,80,1.749,81,1.593,82,4.993,83,3.602,84,2.877,88,2.366,92,4.47,97,6.118,98,6.118]],["t/743",[20,2.439,21,3.512,99,8.794,100,3.955]],["t/745",[3,2.344,20,2.273,21,3.892,22,6.736,23,2.827,100,3.686,101,5.364,102,8.196]],["t/747",[103,9.735,104,1.732,105,4.173]],["t/749",[3,1.291,32,2.532,33,2.503,34,3.06,35,1.68,37,1.762,39,3.976,40,1.951,50,1.313,80,1.034,81,1.613,99,4.513,106,1.867,107,1.655,108,2.533,109,2.254,110,1.319,111,1.84,112,1.437,113,4.513,114,3.976,115,4.235,116,4.513,117,4.513,118,7.175,119,3.327,120,7.575,121,3.252,122,4.513,123,6.561,124,4.935,125,4.935,126,4.513,127,8.454,128,2.446,129,2.153,130,2.029,131,2.627,132,2.192,133,3.861,134,4.935,135,4.935,136,4.935,137,4.935,138,4.935,139,3.723,140,4.935,141,4.935,142,3.41,143,7.175,144,4.935,145,2.816,146,3.41,147,1.521,148,1.676,149,3.252,150,2.905,151,2.446,152,4.935]],["t/751",[23,1.901,51,0.94,59,1.347,64,1.635,65,2.936,66,1.744,72,0.811,73,1.544,74,2.42,80,1.262,81,1.576,102,5.51,110,1.518,113,5.51,116,5.51,117,5.51,122,5.51,123,5.51,126,5.51,142,4.163,153,6.025,154,6.025,155,6.025,156,4.402,157,6.025,158,6.025,159,1.846,160,6.025,161,5.51,162,6.025,163,6.025,164,6.025,165,6.025,166,3.809,167,2.113,168,6.025,169,6.025]],["t/753",[11,8.354,20,2.469,100,4.004]],["t/755",[21,3.999,22,6.923,23,2.961,170,8.056]],["t/757",[105,4.173,171,9.735,172,8.354]],["t/759",[11,5.21,20,1.54,32,3.115,33,1.797,34,3.765,35,1.421,37,1.797,50,1.111,51,0.474,59,0.99,73,1.556,80,1.272,81,1.158,107,2.036,112,1.768,167,2.129,173,7.595,174,3.319,175,4.604,176,10.178,177,2.129,178,5.21,179,5.573,180,3.275,181,3.464,182,6.071,183,2.102,184,6.071,185,3.505,186,4.955,187,3.01,188,6.071,189,2.696,190,2.438,191,3.192,192,3.916,193,3.152,194,3.152,195,6.071]],["t/761",[23,2.222,51,0.936,59,1.148,64,1.912,65,3.26,66,2.04,72,0.949,73,1.805,74,2.829,81,1.344,92,5.147,110,1.295,111,2.627,142,4.868,159,2.158,170,6.046,172,6.046,173,6.443,178,6.046,181,4.02,196,6.046,197,5.513,198,7.045,199,7.045,200,6.443]],["t/763",[23,2.11,51,0.943,59,1.09,64,1.814,65,3.15,66,1.936,72,0.901,73,1.713,74,2.686,81,1.276,92,4.886,110,1.229,142,4.621,159,2.049,170,5.739,172,5.739,179,3.937,189,2.97,196,5.739,197,5.233,200,6.116,201,6.688,202,6.688,203,8.864,204,6.688,205,6.688,206,6.688,207,6.688]],["t/765",[20,2.469,100,4.004,208,8.902]],["t/767",[3,2.242,20,2.174,21,4.235,22,7.054,23,2.705,100,3.526,101,5.132,209,7.84,210,7.84]],["t/769",[104,1.732,105,4.173,211,9.735]],["t/771",[3,2.207,32,3.188,33,1.84,34,3.854,35,1.455,50,1.544,51,0.485,60,2.477,107,2.829,109,2.838,111,2.318,147,2.6,183,3.317,191,3.267,208,5.683,212,8.762,213,5.443,214,5.831,215,6.215,216,2.631,217,6.886,218,7.717,219,5.333,220,3.188,221,6.215,222,4.41,223,4.294,224,4.41,225,2.151,226,4.889,227,2.598,228,4.863,229,6.215,230,3.014,231,2.894]],["t/773",[3,1.363,7,4.766,21,1.187,23,1.025,37,0.617,50,0.953,51,0.944,59,1.063,64,0.882,65,1.852,66,0.941,67,1.753,72,0.438,73,0.833,74,1.305,80,1.367,81,1.244,95,1.179,110,1.199,111,2.783,112,1.899,132,1.444,147,1.002,150,1.914,209,2.973,210,2.973,212,2.973,217,2.653,218,2.973,220,1.668,228,2.544,232,3.932,233,1.98,234,5.212,235,3.251,236,3.251,237,5.212,238,3.905,239,1.418,240,3.601,241,2.789,242,2.973,243,2.544,244,2.889,245,3.251,246,3.251,247,3.251,248,1.316,249,1.855,250,2.246,251,3.251,252,3.251,253,1.611,254,3.808,255,2.973,256,1.431,257,2.653,258,2.973,259,2.789,260,2.544,261,1.529,262,3.251,263,2.973,264,2.973,265,2.973,266,2.973,267,4.766,268,2.973,269,2.973,270,2.973,271,1.038,272,4.253,273,2.973,274,1.777,275,2.973,276,3.251,277,3.251,278,2.544,279,3.251,280,3.251,281,5.212,282,7.464,283,5.212,284,3.251,285,3.251,286,2.097,287,3.251,288,3.251,289,3.251,290,3.251,291,3.251,292,3.251,293,3.251,294,3.251,295,3.251,296,3.251,297,3.251,298,2.789,299,1.544]],["t/775",[51,0.946,110,1.307,112,2.07,228,5.562,238,4.255,244,3.94,263,6.501,264,8.437,265,6.501,266,6.501,267,8.437,268,6.501,269,6.501,270,6.501,271,2.269,272,7.529,273,6.501,274,3.886,275,6.501,300,4.494,301,7.109]],["t/777",[20,2.439,100,3.955,261,4.522,302,8.794]],["t/779",[3,2.267,20,2.198,21,4.094,22,7.087,23,2.734,100,3.565,101,5.188,303,7.926,304,7.926]],["t/781",[104,1.732,105,4.173,305,9.735]],["t/783",[3,1.911,32,2.596,33,1.498,34,3.139,35,1.185,37,1.783,48,2.912,50,0.926,59,1.191,60,3.418,61,2.356,72,0.682,80,1.06,81,0.965,95,1.836,106,1.914,107,1.697,108,2.58,109,3.337,110,1.343,111,1.887,112,2.497,130,3.005,191,2.66,193,2.628,216,1.578,261,2.38,302,4.628,306,4.343,307,5.049,308,5.061,309,3.941,310,5.061,311,3.749,312,2.356,313,4.628,314,2.334,315,5.049,316,4.628,317,2.628,318,4.628,319,5.338,320,5.061,321,5.061,322,5.061,323,5.061,324,4.628,325,3.697,326,6.683,327,2.133,328,3.96,329,4.13,330,3.497,331,6.271,332,4.628,333,4.628]],["t/785",[23,2.203,51,0.934,59,1.138,64,1.895,65,3.241,66,2.022,67,3.766,72,1.228,73,1.789,74,2.804,81,1.332,110,1.283,159,2.139,261,3.284,271,2.229,299,3.317,303,6.386,304,6.386,307,7.017,334,6.983,335,6.983,336,4.18,337,3.251]],["t/787",[20,2.439,100,3.955,261,4.522,338,8.794]],["t/789",[3,2.267,20,2.198,21,4.094,22,7.087,23,2.734,100,3.565,101,5.188,339,7.926,340,8.667]],["t/791",[104,1.732,105,4.173,341,9.735]],["t/793",[3,1.787,32,2.369,33,1.367,34,2.864,35,1.081,37,1.707,48,3.053,50,0.845,53,2.919,59,1.326,60,3.242,61,2.15,72,0.622,80,0.968,81,0.881,95,1.675,106,1.747,107,1.548,108,2.413,109,3.121,110,1.495,111,1.722,112,2.618,130,3.346,191,2.427,193,2.398,216,1.44,223,3.191,261,2.171,306,3.963,307,6.632,309,3.686,311,3.506,312,2.15,313,4.223,314,2.129,315,4.722,316,4.223,317,2.398,318,4.223,319,4.992,324,4.223,325,3.373,326,6.249,327,1.946,328,3.613,329,3.768,330,3.191,331,5.864,332,4.223,333,4.223,338,6.249,342,6.834,343,4.223,344,4.618,345,3.613,346,1.609,347,4.618,348,4.618,349,4.618,350,4.618]],["t/795",[23,2.057,51,0.952,59,1.421,64,1.77,65,3.098,66,1.888,72,1.174,73,2.234,74,2.619,81,1.244,110,1.199,112,1.899,159,1.998,189,3.872,271,2.082,307,6.785,336,3.904,337,3.037,339,5.964,343,5.964,351,6.522,352,6.522,353,3.904,354,6.522]],["t/797",[3,1.859,10,6.74,58,4.912,59,1.504,84,3.343,88,2.749,106,2.689,110,1.883,147,2.19,216,2.216,253,3.524,355,4.119,356,3.31,357,6.281,358,5.364,359,3.563,360,6.501,361,5.044,362,5.044,363,5.364,364,5.364,365,6.501,366,5.044,367,5.562,368,7.109,369,6.501]],["t/799",[3,2.149,20,2.084,21,4,22,6.924,23,2.592,51,0.641,100,3.379,101,4.918,370,5.678,371,3.649,372,7.514,373,6.706,374,6.706,375,6.706]],["t/801",[53,6.079,59,1.567,376,9.616,377,9.616]],["t/803",[3,0.993,10,4.304,32,1.948,33,1.124,34,2.355,35,1.69,37,1.672,50,1.611,53,4.563,59,1.177,72,0.511,84,3.395,107,1.273,108,2.872,109,1.734,112,2.564,129,1.656,130,3.832,148,1.289,177,3.089,216,1.184,238,3.526,256,1.671,300,2.4,311,1.948,314,1.751,346,2.053,355,2.2,356,1.768,357,5.633,359,4.078,361,4.181,362,2.694,378,2.971,379,4.808,380,2.92,381,3.972,382,1.862,383,5.891,384,4.181,385,3.472,386,3.099,387,1.862,388,2.971,389,2.694,390,3.797,391,3.258,392,2.694,393,1.562,394,2.4,395,6.195,396,3.797,397,2.166,398,1.882,399,3.258,400,6.602,401,2.2,402,3.258,403,3.472,404,5.056,405,2.694,406,4.61,407,3.797,408,5.388,409,3.472,410,3.099,411,3.797,412,3.472,413,2.624,414,3.099,415,3.472,416,2.235]],["t/805",[3,0.948,10,2.647,23,1.143,49,2.008,51,0.963,58,2.503,59,1.293,60,1.444,64,0.983,65,2.019,66,1.049,72,1.068,73,0.928,74,1.455,81,1.336,84,3.295,110,1.583,111,1.351,112,1.055,159,1.11,167,2.457,189,2.523,244,2.008,248,2.836,353,2.169,357,4.059,373,2.957,374,2.957,375,2.957,383,2.957,395,6.806,399,3.109,417,1.837,418,3.109,419,4.874,420,3.313,421,3.313,422,3.109,423,3.623,424,3.623,425,4.444,426,3.313,427,3.313,428,3.313,429,2.317,430,3.313,431,3.313,432,3.148,433,3.664,434,3.313,435,1.916,436,2.734,437,2.008,438,3.313,439,3.313,440,3.623,441,2.29,442,2.133,443,4.635,444,3.623,445,3.313,446,3.313,447,3.313,448,3.313,449,3.313,450,3.313,451,3.313,452,3.313,453,2.835]],["t/807",[50,1.668,51,0.712,60,3.634,146,4.825,147,2.81,148,2.371,256,3.074,357,5.884,405,6.471,406,5.464,419,5.993,425,5.464,432,3.87,433,4.504,454,4.111,455,4.046,456,5.369,457,6.983,458,6.983,459,9.12,460,9.12,461,5.102,462,6.983,463,5.102,464,5.993]],["t/809",[3,0.725,10,2.025,23,0.874,49,3.241,51,0.957,58,1.915,59,1.225,60,1.105,64,0.752,65,1.627,66,0.803,72,0.914,73,0.71,74,1.113,81,1.116,84,2.75,110,1.382,111,1.034,112,1.333,159,0.849,167,2.051,175,1.254,177,2.636,189,3.804,244,1.536,248,2.367,261,1.304,300,1.752,309,1.495,312,1.291,353,1.659,357,3.388,373,2.262,374,2.262,375,2.262,383,2.262,395,5.827,399,2.379,417,1.405,418,2.379,419,3.929,420,2.535,421,2.535,422,2.379,425,3.582,426,2.535,427,2.535,428,2.535,429,1.868,430,2.535,431,2.535,432,2.537,433,2.953,434,2.535,435,1.545,436,2.091,437,1.536,438,2.535,439,2.535,441,1.752,442,1.632,443,3.736,445,2.535,446,2.535,447,2.535,448,2.535,449,2.535,450,2.535,451,2.535,452,2.535,453,2.169,465,2.772,466,2.772,467,1.672,468,2.772,469,1.199,470,0.491,471,3.345,472,4.578,473,4.578,474,2.772,475,2.535,476,2.262,477,2.772,478,3.929,479,2.772,480,2.535,481,2.772,482,1.515,483,1.582,484,1.359,485,2.091,486,2.772,487,2.772,488,2.772,489,2.772,490,2.772,491,3.087,492,2.772,493,2.772,494,2.772,495,2.772,496,2.772,497,2.772,498,2.772]],["t/811",[469,4.06,485,7.083,499,9.388,500,7.661,501,7.083,502,9.388]],["t/813",[10,5.763,119,5.319,177,3.458,216,2.459,300,4.987,312,3.673,355,4.571,356,3.673,359,3.955,410,6.438,412,7.214,415,7.214,469,4.263,485,5.952,501,5.952,503,6.438,504,6.173,505,5.319,506,6.77,507,7.889]],["t/815",[2,3.167,10,2.696,23,1.164,35,0.864,44,1.736,48,1.253,50,0.675,51,0.898,59,0.939,64,1.001,65,2.048,66,1.068,72,0.776,73,0.946,74,1.482,80,0.773,81,0.704,84,3.768,93,2.381,95,1.339,108,2.035,110,1.473,112,1.678,128,2.857,129,1.61,130,3.574,132,3.149,174,2.017,177,3.048,225,1.278,260,2.888,300,2.333,357,4.108,359,2.889,373,3.012,374,3.012,375,3.012,383,7.852,384,6.167,408,7.947,409,3.375,410,3.012,418,3.167,422,3.167,508,3.691,509,2.432,510,3.375,511,4.945,512,5.27,513,4.703,514,4.945,515,2.785,516,3.375,517,3.691,518,2.619,519,1.829,520,3.375,521,2.619,522,3.691,523,3.012,524,5.763,525,3.691,526,3.691,527,3.691,528,3.691,529,3.375,530,3.691,531,3.691,532,3.691,533,3.691,534,3.691,535,3.691,536,2.696,537,2.619,538,3.691]],["t/817",[12,6.36,13,6.547,14,4.093,20,2.273,21,3.273,100,3.686,174,4.899,484,4.394,485,6.762,539,8.196]],["t/819",[21,3.999,22,6.923,23,2.961,540,8.585]],["t/821",[105,4.173,541,9.735,542,8.902]],["t/823",[13,7.562,32,2.872,33,1.657,34,3.472,35,1.311,37,1.866,50,1.024,51,0.437,59,0.912,60,2.231,61,2.607,72,0.754,81,1.068,107,1.877,108,1.977,110,1.443,132,2.486,147,2.419,148,1.901,150,4.622,174,4.292,183,1.938,185,2.907,190,2.248,193,2.907,194,2.907,364,4.224,388,4.381,543,5.12,544,8.989,545,5.12,546,4.804,547,5.12,548,4.869,549,7.4,550,5.12,551,6.738,552,5.12,553,4.804,554,5.12,555,5.12,556,5.12,557,5.12,558,5.599]],["t/825",[33,2.779,59,1.53,80,1.967,81,1.791,388,7.346,556,8.585]],["t/827",[3,1.154,13,3.223,20,1.119,23,1.392,33,1.306,35,1.033,40,2.612,51,0.951,59,1.077,62,3.786,64,1.792,65,2.348,66,1.277,72,0.89,73,1.13,74,1.772,81,1.26,92,3.223,95,2.396,110,1.214,111,1.645,112,1.284,142,3.048,148,1.498,149,2.907,150,2.597,159,1.351,167,1.547,183,1.527,193,2.291,196,3.786,197,3.452,256,1.942,388,5.169,398,2.187,432,2.445,433,2.845,442,2.597,470,0.781,540,4.034,542,4.034,543,4.034,545,4.034,547,4.034,549,3.6,550,4.034,552,4.034,554,4.034,555,4.034,557,4.034,559,1.578,560,2.075,561,4.411,562,4.453,563,2.48,564,4.411,565,3.389,566,4.411,567,4.411,568,4.411,569,4.411,570,4.411,571,1.47,572,4.034,573,4.411,574,4.411]],["t/829",[20,2.889,49,4.309,50,1.01,55,5.68,147,1.701,185,2.879,261,3.656,317,4.673,371,2.452,394,3.49,442,3.25,470,1.377,483,3.15,519,2.736,575,5.118,576,5.52,577,5.52,578,5.52,579,3.25,580,6.083,581,5.048,582,5.52,583,4.505,584,8.383,585,9.769,586,5.52,587,7.042,588,5.52,589,5.52,590,2.902,591,4.737,592,6.672,593,5.048]],["t/831",[3,1.947,17,7.756,58,5.143,59,1.549,88,2.878,106,2.816,110,1.924,216,2.321,253,3.69,256,3.276,356,3.466,357,6.391,358,5.616,359,3.731,360,6.807,361,5.282,362,5.282,363,5.616,364,5.616,594,6.388,595,7.443]],["t/833",[3,2.267,20,2.198,21,4.094,22,7.087,23,2.734,100,3.565,101,5.188,596,8.667,597,8.667]],["t/835",[53,6.079,59,1.567,598,9.616,599,9.616]],["t/837",[3,2.173,17,3.222,32,2.026,33,1.169,34,2.449,35,0.924,37,1.153,49,4.101,50,1.52,53,3.839,59,1.206,84,1.857,106,1.494,107,1.324,108,3.481,109,1.803,112,2.61,130,3.416,132,1.754,147,1.217,177,2.913,225,1.367,231,1.839,238,3.635,286,2.547,300,4.677,306,3.389,327,1.664,357,6.377,358,2.979,359,4.164,361,4.309,362,2.802,379,4.956,380,3.01,381,4.094,382,1.936,384,2.802,392,2.802,393,1.624,394,2.496,400,5.553,413,2.728,435,2.049,478,5.211,511,3.389,537,4.309,594,5.211,600,3.949,601,2.405,602,3.949,603,3.222,604,3.611,605,3.09,606,7.399,607,2.547,608,3.949,609,4.956,610,5.553,611,3.949,612,3.949,613,2.979,614,3.09,615,3.949]],["t/839",[3,1.692,17,5.279,50,1.789,59,1.054,83,3.808,104,1.151,108,3.061,110,1.593,132,2.873,191,3.4,256,3.816,300,4.089,357,6.497,359,3.243,384,6.152,393,2.66,429,3.537,435,2.925,478,5.551,601,3.94,604,5.916,605,6.784,607,4.173,610,5.916,616,6.469,617,4.557,618,4.881,619,3.691,620,6.469]],["t/841",[3,2.845,18,9.333,20,2.353,145,5.294,621,8.484]],["t/843",[470,1.746,622,2.065]],["t/845",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/847",[3,2.023,20,2.703,23,2.44,50,1.415,51,0.832,64,2.099,66,2.819,73,2.731,74,3.106,356,3.601,435,2.61,559,2.767,624,3.877,625,3.792,626,7.735,627,2.825,628,3.181]],["t/849",[629,9.127]],["t/851",[18,7.438,40,3.428,51,0.875,197,6.782,621,7.926,629,7.926,630,8.667,631,8.667,632,5.375,633,7.926,634,8.667]],["t/853",[19,6.934,20,2.247,81,1.69,95,3.214,150,5.217,240,6.123,607,5.716,632,5.496,635,6.686,636,5.397,637,4.982]],["t/855",[21,3.999,22,6.923,23,2.961,638,8.585]],["t/857",[19,4.922,23,1.304,51,0.964,59,1.025,64,1.122,65,2.236,66,1.197,72,0.557,73,1.059,74,1.66,80,0.866,81,0.789,110,1.399,111,2.839,112,1.831,147,1.274,189,4.451,190,1.66,244,2.292,261,1.944,286,2.667,299,1.964,317,2.147,327,1.743,467,1.51,575,1.888,638,3.781,639,4.135,640,4.135,641,3.548,642,3.12,643,4.135,644,4.135,645,4.135,646,3.781,647,3.781,648,6.962,649,4.135,650,2.857,651,4.135,652,4.135,653,3.548,654,4.135,655,4.135,656,4.135,657,3.235,658,4.135,659,2.173,660,6.29,661,8.508,662,4.135,663,4.135,664,6.29,665,4.135,666,2.26,667,4.135,668,4.135,669,4.135,670,4.135]],["t/859",[3,1.893,19,7.305,40,2.863,50,1.708,51,0.882,59,1.18,73,1.855,74,2.907,80,1.517,81,1.381,106,2.738,107,2.427,109,3.306,110,1.33,365,6.62,646,6.62,647,6.62,648,6.62,671,7.239,672,4.489,673,3.904,674,7.239,675,6.62,676,7.239,677,7.239]],["t/862",[3,1.11,12,3.013,20,1.077,33,1.257,37,1.469,50,0.777,51,0.892,59,1.648,110,1.18,112,1.868,128,2.104,129,3.375,132,1.886,177,3.547,187,2.104,216,1.324,227,1.775,327,2.705,346,3.394,382,3.146,387,2.082,393,1.746,437,2.353,483,2.422,518,3.013,609,3.465,678,4.246,679,3.478,680,2.499,681,3.102,682,3.013,683,3.643,684,3.013,685,4.246,686,3.643,687,4.246,688,2.038,689,2.26,690,3.322,691,4.848,692,2.353,693,3.102,694,2.798,695,3.102,696,2.353,697,2.353,698,4.798,699,2.26,700,2.387,701,3.014,702,4.229,703,3.883,704,4.246,705,4.246,706,2.387]],["t/864",[707,7.125,708,8.303,709,7.125,710,6.776,711,6.497,712,6.497,713,6.776,714,7.593,715,5.249,716,7.125,717,7.125,718,6.497,719,7.593,720,6.776,721,6.497,722,6.497,723,7.125]],["t/866",[50,1.678,679,3.154,680,6.76,707,7.869,724,10.802]],["t/868",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/870",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,726,6.577]],["t/872",[21,3.892,100,3.181,128,3.834,231,3.601,239,3.374,371,3.435,469,3.345,519,3.834,563,4.348,627,2.825,707,6.637,718,6.052,727,4.118,728,7.735,729,4.228,730,4.118,731,3.752,732,4.481,733,4.481,734,4.413,735,4.481,736,7.073]],["t/874",[20,1.711,35,1.579,44,3.172,48,2.29,50,1.234,51,0.886,64,1.83,66,2.581,104,1.586,119,4.547,183,2.335,230,3.272,393,3.666,435,2.276,559,2.413,627,3.255,628,2.774,679,3.066,701,2.627,736,6.168,737,6.745,738,6.745,739,3.343,740,5.788,741,3.46,742,5.788,743,3.638,744,3.738,745,3.381]],["t/876",[20,1.144,33,1.336,35,2.483,37,1.805,44,3.159,51,0.962,104,0.803,107,1.513,119,5.411,167,2.815,177,2.356,183,1.562,187,3.33,190,1.812,220,2.315,225,3.671,227,1.886,230,2.189,382,2.212,417,2.288,454,3.955,455,3.892,575,3.068,698,2.798,701,2.617,739,3.978,740,3.872,741,3.446,742,3.872,743,2.434,744,2.501,745,2.262,746,1.648,747,4.091,748,2.537,749,2.748]],["t/878",[20,2.001,44,3.71,50,1.443,51,0.84,104,1.404,119,5.319,183,2.731,225,2.731,230,3.827,311,4.047,467,2.881,701,3.073,739,3.91,740,6.77,741,4.047,742,6.77,743,4.255,744,4.372,745,3.955,750,3.504]],["t/880",[21,3.097,174,4.636,484,4.158,539,7.756,679,3.546,751,7.756,752,7.278,753,8.481,754,5.471,755,7.756,756,7.756,757,7.756,758,6.399,759,6.018]],["t/882",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/884",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,760,6.577]],["t/886",[21,3.84,100,3.09,128,3.725,231,3.499,239,3.278,371,3.337,469,3.249,519,3.725,563,4.224,627,2.744,679,2.584,680,4.424,727,4,729,4.107,730,4,731,3.645,732,4.354,733,4.354,734,4.287,735,4.354,751,8.743,752,8.205,761,6.872]],["t/888",[35,1.62,48,2.35,50,1.266,51,0.892,64,1.878,66,2.625,104,1.613,177,2.428,393,3.729,435,2.336,469,4.373,559,2.477,627,3.311,628,2.847,679,3.119,699,3.685,761,6.33,762,6.922,763,6.922,764,7.4,765,5.732,766,6.922]],["t/890",[33,1.479,35,2.32,37,1.617,51,0.919,104,0.889,107,1.675,147,2.231,167,2.539,177,2.986,183,1.73,187,3.589,190,2.007,225,3.431,226,4.195,227,2.089,244,4.013,387,2.45,417,2.534,537,3.546,579,4.262,679,2.49,699,4.533,701,2.82,746,1.825,749,3.043,764,5.909,765,5.902,767,4.997,768,4.078,769,2.991,770,6.213,771,3.453,772,3.369,773,2.991,774,4.288,775,4.288,776,4.288,777,4.078,778,3.099,779,3.77]],["t/892",[51,0.919,104,1.477,183,2.874,387,4.071,467,3.032,579,4.888,699,4.42,701,3.234,750,3.688,764,6.776,768,6.776,778,5.15,779,6.265]],["t/894",[50,1.697,177,3.254,346,3.233,747,5.65,780,7.26,781,8.484,782,9.278]],["t/896",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/898",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,783,6.014]],["t/900",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,709,8.408,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,784,7.143]],["t/902",[35,1.664,44,3.343,48,2.414,50,1.3,51,0.899,64,1.929,66,2.671,104,1.642,183,2.461,230,3.448,393,3.794,435,2.399,559,2.543,627,3.369,628,2.924,679,3.173,701,2.769,744,3.94,745,3.563,784,6.501,785,7.109,786,7.109,787,6.1]],["t/904",[33,1.461,35,2.486,37,0.937,44,3.374,50,1.313,51,0.951,104,0.878,107,2.406,112,1.437,130,2.029,167,1.731,177,2.516,183,2.484,187,3.556,216,1.538,220,2.532,225,3.676,227,2.063,230,2.394,307,6.413,382,2.419,417,2.502,698,3.06,701,2.795,709,6.157,744,2.735,745,2.474,746,1.802,749,3.005,787,4.235,788,2.905,789,6.561,790,4.027,791,4.935,792,4.935,793,4.935,794,6.561]],["t/906",[44,3.824,51,0.851,104,1.447,112,2.368,183,3.478,230,3.945,307,5.619,467,2.97,701,3.168,744,4.507,745,4.077,750,3.612,787,6.979,789,7.437,794,7.437,795,8.133]],["t/908",[21,2.62,44,4.364,50,1.312,132,3.186,174,3.921,393,2.95,575,3.276,679,2.467,680,4.223,710,5.854,713,5.854,718,5.613,720,5.854,780,5.613,796,7.173,797,7.173,798,7.173,799,6.56,800,5.412,801,7.173,802,7.173,803,7.173,804,8.828,805,7.173,806,5.09,807,7.173,808,5.613,809,6.156,810,4.449]],["t/910",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/912",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,811,6.577]],["t/914",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,710,6.374,722,6.112,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,812,7.143]],["t/916",[35,1.695,44,3.404,48,2.458,50,1.324,51,0.882,64,1.964,66,2.703,104,1.661,183,2.506,393,3.839,435,2.442,559,2.59,627,3.409,628,2.977,679,3.211,701,2.82,812,6.62,813,7.239,814,7.239,815,7.239,816,6.294]],["t/918",[12,3.591,33,1.498,35,2.332,37,1.387,39,2.38,40,2.001,44,4.033,51,0.95,104,1.526,107,2.45,130,2.081,131,2.694,167,1.775,177,1.775,183,2.53,187,3.622,225,3.448,226,4.234,227,2.116,230,2.455,240,3.497,417,2.566,679,1.741,701,2.846,710,4.13,743,2.73,746,1.848,749,3.082,816,5.782,817,4.628,818,3.819,819,3.96,820,3.697,821,4.343,822,5.061,823,4.628,824,4.628,825,3.96,826,4.628]],["t/920",[35,1.865,44,3.747,51,0.883,104,1.765,183,3.434,226,4.617,230,3.865,467,2.91,701,3.104,743,4.298,750,4.406,816,5.373,817,7.287,824,7.287,826,7.287]],["t/922",[50,1.738,679,3.268,680,5.593,711,7.434,827,9.501]],["t/924",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/926",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,828,6.577]],["t/928",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,711,7.667,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,829,7.143]],["t/930",[35,1.552,48,2.252,50,1.213,51,0.9,64,1.799,66,2.552,104,1.568,230,4.276,387,3.251,393,3.625,435,2.238,454,3.904,455,3.842,559,2.373,627,3.219,628,2.727,679,3.405,711,5.189,739,3.287,778,4.113,816,4.471,829,6.065,830,6.632,831,6.632,832,6.065,833,5.691,834,5.691,835,2.945]],["t/932",[33,1.84,37,2.04,51,0.9,104,1.106,167,2.18,179,4.968,226,4.889,227,3.528,454,4.968,455,4.889,706,6.041,711,8.408,739,3.081,746,2.269,816,5.689,833,5.333,834,5.333,836,8.769,837,3.659,838,4.689]],["t/934",[35,1.793,51,0.897,104,1.722,230,4.694,436,5.779,454,4.509,455,4.438,467,2.797,739,3.797,743,4.131,750,4.298,778,4.75,816,5.164,832,7.005,833,6.573,834,6.573,835,3.402,839,7.005]],["t/936",[21,2.62,50,1.882,51,0.56,54,5.613,101,4.293,104,1.83,233,4.369,311,4.761,484,3.517,679,2.467,680,4.223,691,5.217,712,5.613,765,7.122,840,6.56,841,6.56,842,4.957,843,4.033,844,6.56,845,6.56,846,5.854,847,3.596]],["t/938",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/940",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,848,6.577]],["t/942",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,712,7.667,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,849,7.143]],["t/944",[50,1.519,51,0.859,64,2.253,66,2.946,393,3.415,435,2.802,559,2.971,627,3.032,628,3.415,679,3.5,712,6.497,849,7.593,850,8.303]],["t/946",[33,1.093,35,2.034,37,1.233,39,1.01,48,0.729,50,0.675,51,0.921,59,0.602,104,0.657,107,1.238,110,0.678,111,1.376,131,1.965,147,0.662,167,0.753,174,2.018,177,1.703,183,1.278,187,3.514,190,0.862,191,1.129,216,1.151,219,1.843,220,1.102,223,1.484,225,2.899,226,1.244,231,1,239,0.937,244,2.046,312,3.023,317,1.115,346,2.008,356,1.719,359,1.076,417,1.089,435,2.561,469,0.928,470,0.654,483,1.225,537,1.524,548,2.289,565,1.102,579,2.173,584,3.167,587,2.888,601,1.308,607,3.131,619,1.225,699,1.965,701,1.438,712,6.27,730,1.143,743,1.158,746,1.348,749,1.308,765,4.104,769,1.285,770,3.167,771,1.484,772,1.448,773,1.285,774,1.843,775,1.843,776,1.843,777,1.752,778,1.332,779,1.62,788,5.664,808,1.68,816,1.448,842,2.55,843,2.075,851,3.012,852,2.147,853,1.68,854,2.147,855,1.752,856,2.147,857,2.147,858,2.147,859,1.752,860,1.752,861,1.963,862,2.147,863,4.44,864,4.348,865,6.492,866,2.785,867,2.248,868,3.691,869,3.691,870,3.691,871,3.375,872,3.691,873,3.691,874,5.763,875,4.21,876,3.691,877,2.619,878,3.691,879,3.375,880,3.691,881,3.691,882,3.691,883,3.375,884,1.963,885,4.44,886,1.68,887,3.691,888,2.173,889,1.484,890,2.147,891,2.147,892,1.62,893,1.569,894,2.147,895,1.963,896,1.963]],["t/948",[51,0.784,104,1.447,183,2.815,467,2.97,701,3.168,743,4.386,750,3.612,765,6.351,778,5.044,779,6.136,788,4.788,863,7.437,866,7.581,884,7.437,885,7.437,897,8.133]],["t/950",[50,1.717,679,3.229,680,5.527,713,8.937,898,9.388]],["t/952",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/954",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,899,6.577]],["t/956",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,713,7.996,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,900,7.143]],["t/958",[35,1.759,48,2.551,50,1.375,51,0.892,64,2.039,66,2.768,104,1.701,393,3.932,435,2.535,559,2.689,579,4.424,627,3.492,628,3.09,679,3.288,900,6.872,901,7.514,902,7.514,903,6.872]],["t/960",[33,1.997,37,1.896,51,0.903,83,5.248,104,1.2,226,3.908,227,2.82,314,3.11,317,3.502,454,5.878,455,5.785,579,5.248,706,3.792,746,2.463,765,4.264,904,4.108,905,8.152,906,5.504,907,6.168,908,5.635,909,6.168,910,4.927,911,4.547]],["t/962",[51,0.919,104,1.477,112,2.417,230,4.028,231,3.866,454,4.888,455,4.811,467,3.032,579,4.888,750,3.688,903,7.593,905,7.593,908,5.249]],["t/964",[50,1.738,679,3.268,680,5.593,714,8.688,912,9.501]],["t/966",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/968",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,913,6.577]],["t/970",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,715,6.194,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,914,6.703]],["t/972",[35,1.759,48,2.551,50,1.375,51,0.892,64,2.039,66,2.768,104,1.701,393,3.932,435,2.535,559,2.689,575,3.432,627,3.492,628,3.09,679,3.288,915,7.514,916,7.514,917,7.514,918,7.514]],["t/974",[33,2.067,35,2.135,37,1.326,51,0.943,104,1.243,107,2.341,177,2.449,183,2.417,187,4.521,225,3.157,575,4.165,701,3.552,746,2.55,749,4.253,788,4.111,904,4.253,919,6.983,920,5.269,921,6.983,922,6.983,923,6.386]],["t/976",[51,0.849,104,1.651,467,3.388,575,4.237,750,4.12,923,8.484]],["t/978",[679,3.348,680,5.731,715,6.154]],["t/980",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/982",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,924,6.577]],["t/984",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,715,6.194,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,914,6.703]],["t/986",[35,1.726,48,2.504,50,1.349,51,0.908,64,2.001,66,2.735,104,1.681,230,3.577,393,3.885,435,2.488,559,2.638,627,3.45,628,3.033,679,3.249,744,4.087,745,3.696,914,6.328,925,6.018,926,7.374]],["t/988",[33,2.408,35,1.904,51,0.93,104,1.447,177,2.852,220,4.172,227,3.4,230,3.945,382,3.987,417,4.123,698,5.044,744,4.507,745,4.077,746,2.97]],["t/990",[51,0.892,104,1.613,230,4.397,467,3.31,744,5.024,745,4.544,750,4.026]],["t/992",[21,3.388,50,1.697,679,3.191,680,6.403,716,7.962,927,9.278]],["t/994",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/996",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,928,6.577]],["t/998",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,716,8.408,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,929,7.143]],["t/1000",[20,2.084,35,1.4,37,1.135,44,3.865,48,2.791,50,1.504,51,0.892,64,1.622,66,2.38,104,1.671,119,5.541,183,2.845,393,3.862,435,2.018,559,2.139,627,3.43,628,2.459,679,2.827,701,3.202,706,3.362,739,2.964,741,3.068,743,4.433,929,5.468,930,5.98,931,8.219,932,3.52,933,5.131,934,3.94,935,5.98]],["t/1002",[20,1.138,33,1.328,35,2.479,37,1.956,44,3.146,50,1.224,51,0.962,83,2.641,104,0.798,107,1.504,119,4.51,167,2.805,177,1.574,183,1.553,187,3.316,190,1.802,225,3.665,346,1.563,454,3.938,455,3.876,575,3.055,701,2.606,706,2.522,739,3.965,741,3.432,743,2.42,746,1.638,747,4.871,748,2.522,749,2.732,769,2.685,788,2.641,932,2.641,933,3.85,934,2.957]],["t/1004",[20,2.106,44,3.905,51,0.859,104,1.477,119,5.598,183,2.874,467,3.032,701,3.234,739,4.116,741,4.26,743,4.478,750,3.688,932,4.888,933,7.125,934,5.472]],["t/1006",[50,1.717,679,3.229,680,5.527,717,8.056,936,9.388,937,9.388]],["t/1008",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/1010",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,938,5.367]],["t/1012",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,717,8.408,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,939,7.143]],["t/1014",[20,1.451,35,1.339,37,1.086,44,2.69,48,2.706,50,1.458,51,0.908,64,1.552,66,2.308,104,1.632,183,2.759,230,3.866,393,3.773,435,1.93,559,2.047,627,3.35,628,2.352,679,2.741,701,3.105,706,3.216,739,2.835,741,2.934,743,3.085,744,4.417,745,3.995,788,3.367,932,3.367,934,3.769,939,5.231,940,5.72,941,7.971,942,4.909,943,4.476,944,3.69,945,5.72]],["t/1016",[20,0.923,33,1.078,35,2.486,37,1.934,44,2.681,50,1.043,51,0.964,83,2.143,104,1.25,107,1.22,130,1.497,167,2.789,177,1.999,183,1.26,187,2.826,190,1.462,220,1.867,225,3.676,227,1.521,230,1.765,233,3.472,346,1.268,382,1.784,417,1.845,454,3.356,455,3.303,575,2.603,679,1.252,698,2.257,701,2.22,706,3.205,739,3.483,741,2.924,743,1.963,744,2.017,745,1.824,746,1.329,747,4.279,748,2.046,749,2.217,769,2.179,788,4.136,825,2.848,932,2.143,934,2.398,942,3.123,943,2.848,944,2.348,946,2.97]],["t/1018",[20,1.981,44,3.673,51,0.876,104,1.39,183,2.704,230,3.789,467,2.852,701,3.043,739,3.872,741,4.007,743,4.213,744,4.329,745,3.915,750,3.469,788,4.598,932,4.598,934,5.147,942,6.703,943,6.112,944,5.038]],["t/1020",[21,3.349,50,1.678,69,7.175,70,7.483,679,3.154,680,5.398,718,7.175,947,9.17]],["t/1022",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/1024",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,938,5.367]],["t/1026",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,718,7.667,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,948,7.143]],["t/1028",[20,1.244,35,1.148,37,0.931,44,2.306,48,2.86,50,1.541,51,0.923,64,1.331,66,2.068,67,2.645,69,3.837,104,1.647,183,2.916,230,4.086,393,3.806,435,1.655,559,1.755,627,3.38,628,2.017,679,2.457,701,3.281,706,4.015,739,2.431,741,2.516,743,2.645,744,4.669,745,4.223,747,5.636,788,2.887,932,2.887,934,3.232,948,4.485,949,4.904,950,8.424,951,4.208,952,7.142,953,4.904]],["t/1030",[20,0.977,33,1.141,35,2.479,37,1.856,44,2.802,50,1.333,51,0.961,83,3.508,104,0.685,107,1.292,112,1.122,167,2.555,177,2.09,183,1.334,187,2.953,190,1.547,220,1.976,225,3.665,227,1.61,230,1.869,346,2.076,382,1.889,417,1.953,454,3.508,455,3.452,575,2.721,698,2.389,701,2.321,706,2.166,739,3.611,741,3.057,743,2.078,744,2.135,745,1.931,746,1.407,747,5.399,748,2.166,749,2.346,769,3.566,788,4.289,932,2.268,934,3.926,938,3.144,951,3.306]],["t/1032",[20,2.021,44,3.747,51,0.883,104,1.418,183,2.758,230,3.865,467,2.91,701,3.104,739,3.95,741,4.088,743,4.298,744,4.416,745,3.994,750,3.539,788,4.691,932,4.691,934,5.251,951,6.838]],["t/1034",[50,1.717,177,3.293,346,3.271,747,5.717,780,7.346,954,9.388]],["t/1036",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/1038",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,783,6.014]],["t/1040",[21,3.806,100,3.033,128,3.655,174,4.031,187,3.655,231,3.433,239,3.217,371,3.275,469,3.189,484,3.615,519,3.655,563,5.311,627,2.693,719,8.639,727,3.926,729,4.031,730,3.926,731,3.577,732,4.272,733,4.272,734,4.207,735,4.272,808,5.77,955,6.743,956,6.743]],["t/1042",[35,1.726,40,2.916,48,2.504,50,1.349,51,0.887,64,2.001,66,2.735,104,1.681,393,3.885,435,2.488,559,2.638,627,3.45,628,3.033,679,3.249,747,4.491,956,6.743,957,7.374,958,7.374,959,6.328,960,6.328]],["t/1044",[33,2.183,35,2.211,37,1.4,40,2.916,44,3.468,51,0.934,104,1.312,112,2.147,167,2.586,225,3.608,429,3.008,746,2.693,747,4.491,838,5.564,892,7.128,959,6.328,960,6.328,961,6.328]],["t/1046",[40,3.585,51,0.838,104,1.613,467,3.31,747,5.521,750,4.026,959,7.779,960,7.779]],["t/1048",[50,1.738,679,3.268,680,5.593,720,7.753,962,9.501]],["t/1050",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/1052",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,963,6.014]],["t/1054",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,720,7.996,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,964,7.143]],["t/1056",[35,1.635,48,2.371,50,1.277,51,0.894,64,1.895,66,2.64,104,1.623,183,2.417,230,3.387,393,3.751,435,2.356,559,2.499,627,3.33,628,2.872,679,3.137,701,2.72,743,3.766,744,3.87,745,3.5,747,4.253,788,4.111,964,6.386,965,6.983,966,6.983,967,6.983]],["t/1058",[20,0.898,33,1.049,35,2.468,37,1.864,44,2.624,50,1.021,51,0.961,83,2.085,104,1.228,107,1.188,112,1.031,130,1.457,167,2.421,177,1.957,183,1.226,187,2.766,190,1.422,220,1.817,225,3.65,227,1.481,230,1.718,311,1.817,325,2.587,346,1.234,382,1.737,417,1.796,454,3.285,455,3.233,575,2.548,679,1.218,698,2.197,701,2.173,706,4.404,739,3.422,741,2.863,743,1.91,744,1.963,745,1.775,746,1.293,747,5.19,748,1.991,749,2.157,754,2.285,769,3.34,788,4.064,825,2.771,932,2.085,934,2.334,943,2.771,944,2.285,946,2.89,963,5.103,968,3.239]],["t/1060",[20,1.906,35,1.759,44,3.534,51,0.892,104,1.701,183,2.601,230,3.645,467,2.744,701,2.927,739,3.725,741,3.855,743,4.053,744,4.165,745,3.767,750,4.246,788,4.424,932,4.424,934,4.952,943,5.88,944,4.847,968,6.872]],["t/1062",[21,3.428,50,1.717,679,3.229,680,5.527,721,7.346,969,9.388]],["t/1064",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/1066",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,970,6.577]],["t/1068",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,721,7.667,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,971,7.143]],["t/1070",[35,0.924,44,1.857,48,1.341,50,0.722,51,0.942,64,1.071,66,1.758,100,1.624,104,1.08,110,0.726,111,1.473,112,1.768,167,1.385,183,2.561,189,2.697,225,1.367,314,3.412,317,4.313,387,1.936,393,3.894,394,2.496,435,2.497,454,2.325,455,2.288,519,1.957,559,1.413,627,3.033,679,2.089,701,2.882,721,6.5,739,1.957,741,2.026,745,1.979,836,3.222,908,2.496,911,2.662,932,2.325,971,3.611,972,3.949,973,8.966,974,3.389,975,4.752,976,3.389,977,3.611,978,3.949,979,3.389,980,3.949,981,4.956,982,6.073,983,3.949,984,3.389,985,3.949,986,3.949,987,3.949,988,6.073,989,3.09,990,3.09,991,3.389,992,2.802,993,3.389,994,6.073]],["t/1072",[33,0.86,35,2.457,37,1.845,44,2.841,50,0.531,51,0.961,104,1.075,107,0.974,112,0.846,119,1.958,167,1.668,177,1.019,181,1.657,183,1.005,187,2.358,190,2.427,216,1.483,225,3.683,240,2.007,314,2.786,317,1.508,380,1.44,387,1.424,454,3.557,455,3.501,470,0.514,482,1.588,505,1.958,513,2.37,575,2.759,701,1.853,706,3.397,721,2.273,725,1.657,739,3.463,741,3.1,745,1.456,746,1.061,747,2.897,748,1.633,749,1.769,772,1.958,773,1.738,904,1.769,908,3.007,911,1.958,932,1.71,974,2.492,975,2.273,976,2.492,979,4.082,981,2.37,995,2.122,996,2.273,997,2.904,998,1.958,999,3.376,1000,2.904,1001,2.904,1002,2.904,1003,2.904,1004,2.904,1005,2.904,1006,5.525,1007,2.904,1008,2.122,1009,4.35,1010,4.35,1011,2.656,1012,2.656,1013,1.958,1014,2.37,1015,2.273,1016,2.904]],["t/1074",[37,1.326,44,3.284,51,0.943,104,1.243,112,2.033,183,2.417,314,3.22,387,3.424,454,4.111,455,4.046,467,2.55,701,2.72,739,3.461,741,3.582,745,3.5,750,3.101,932,4.111,974,5.993,975,5.464,976,5.993,977,6.386,979,5.993,981,5.699,1006,6.386,1009,6.386,1010,6.386]],["t/1076",[50,1.697,679,3.191,680,5.462,715,5.865,781,8.484,1017,7.571,1018,9.278]],["t/1078",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/1080",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,1019,6.577]],["t/1082",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,1020,9.798,1021,7.143]],["t/1084",[35,1.455,48,2.11,50,1.137,51,0.913,64,1.686,66,2.443,104,1.501,177,2.96,393,3.47,435,2.097,559,2.224,627,3.082,628,2.556,672,3.854,679,2.902,772,4.19,773,5.051,835,2.76,1013,4.19,1021,5.683,1022,6.215,1023,6.215,1024,5.333,1025,5.683,1026,5.683,1027,5.683,1028,5.683,1029,5.333,1030,4.41,1031,5.072,1032,5.683,1033,5.333,1034,5.683,1035,4.863]],["t/1086",[33,2.163,51,0.885,104,1.3,177,3.293,672,4.531,746,2.668,772,4.926,773,5.621,883,9.49,1013,4.926,1024,8.059,1026,6.681,1027,6.681,1028,6.681,1029,8.059,1031,5.962,1032,6.681,1033,8.059,1035,5.717]],["t/1088",[51,0.867,104,1.509,467,3.097,750,3.767,835,4.578,1024,7.278,1025,7.756,1029,7.278,1030,6.018,1033,7.278,1034,7.756,1036,8.481]],["t/1090",[21,2.644,50,1.89,54,5.664,101,4.333,104,1.838,233,4.409,311,4.789,484,3.549,679,2.49,680,4.261,691,5.248,722,5.664,765,7.142,840,6.62,841,6.62,842,5.002,843,4.07,844,6.62,845,6.62,846,5.907,847,3.629]],["t/1092",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/1094",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,1037,6.577]],["t/1096",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,722,7.667,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,1038,7.143]],["t/1098",[35,1.649,48,2.392,50,1.289,51,0.874,64,1.912,66,2.656,104,1.632,183,2.439,314,3.249,393,3.772,435,2.377,559,2.521,579,5.4,627,3.35,628,2.898,679,3.155,701,2.744,816,6.184,851,7.486,1038,6.443,1039,7.045,1040,7.045]],["t/1100",[33,2.014,35,2.099,37,1.818,51,0.938,104,1.443,107,1.539,130,1.888,147,2.097,167,1.61,177,2.843,183,1.589,187,3.373,190,1.844,225,3.104,226,3.942,227,1.919,244,3.771,387,2.251,417,2.328,537,3.258,579,4.006,679,1.579,701,2.65,722,3.592,746,2.485,749,2.796,765,6.052,768,3.746,769,2.748,770,7.694,771,3.172,772,3.095,773,2.748,774,3.94,775,3.94,776,3.94,777,3.746,778,2.847,779,3.464,816,5.466,851,5.553,895,4.198,896,4.198]],["t/1102",[35,2.185,51,0.903,104,1.661,174,3.957,183,2.506,213,4.669,387,3.549,467,2.644,579,5.496,701,2.82,750,4.146,765,5.901,768,5.907,778,4.489,779,5.462,816,6.294,851,7.618,1041,7.239,1042,6.62]],["t/1104",[50,1.717,679,3.229,680,5.527,723,9.398,1043,9.388]],["t/1106",[35,2.198,104,1.949,371,4.169,470,1.663,622,1.967]],["t/1108",[37,1.872,59,1.785,72,1.549,104,1.17,227,2.749,327,3.695,437,3.645,623,2.921,666,6.158,679,3.955,692,3.645,696,3.645,697,3.645,700,3.697,701,2.562,702,3.595,725,3.752,938,5.367]],["t/1110",[21,3.91,100,3.212,128,3.872,231,3.637,239,3.408,371,3.469,469,3.378,519,3.872,563,4.391,627,2.852,723,8.408,727,4.158,729,4.27,730,4.158,731,3.789,732,4.526,733,4.526,734,4.457,735,4.526,1044,6.112]],["t/1112",[35,1.527,44,3.067,48,2.215,50,1.193,51,0.896,64,1.77,66,2.524,104,1.551,183,2.258,230,4.228,393,3.585,435,2.201,559,2.334,627,3.184,628,2.682,679,2.998,701,2.541,743,3.518,744,3.615,745,3.269,788,3.84,835,2.897,1044,5.104,1045,5.323,1046,6.522,1047,5.964,1048,5.597,1049,6.821,1050,5.597,1051,5.597]],["t/1114",[12,2.965,20,1.06,33,1.237,35,2.355,37,1.204,44,3.603,51,0.957,104,1.128,107,1.401,167,2.224,177,2.224,183,1.446,187,3.143,190,2.546,216,2.389,220,2.144,225,3.587,227,2.651,230,2.027,382,2.049,417,3.215,698,2.591,701,2.47,706,4.809,743,2.254,744,2.316,745,2.094,746,1.526,749,2.545,772,5.166,773,3.795,788,4.511,818,3.153,835,1.856,888,2.46,1048,5.441,1049,4.961,1050,5.441,1051,5.441,1052,4.178,1053,4.178,1054,3.821,1055,4.178,1056,3.821]],["t/1116",[44,3.673,51,0.876,104,1.39,183,2.704,230,4.753,467,2.852,701,3.043,743,4.213,744,4.329,745,3.915,750,3.469,788,4.598,835,3.469,1047,7.143,1048,6.703,1049,7.667,1050,6.703,1051,6.703]],["t/1118",[20,1.74,50,1.649,51,0.704,64,1.862,95,2.489,100,2.822,114,4.24,129,2.993,132,3.048,175,3.104,240,4.741,356,3.195,366,4.869,367,5.369,560,4.24,590,3.607,625,3.364,1057,6.862,1058,3.858,1059,6.862,1060,6.862,1061,6.275,1062,5.6,1063,6.862,1064,5.177,1065,5.177,1066,4.869,1067,5.369,1068,3.52,1069,5.177,1070,5.013,1071,5.177,1072,5.6]],["t/1120",[21,4.133,22,6.691,23,2.795,174,4.844,729,4.844,1073,8.104,1074,8.104,1075,8.862]],["t/1122",[23,0.9,35,1.617,37,1.558,39,1.341,50,1.264,51,0.946,59,0.764,64,0.774,65,1.666,66,1.357,72,0.384,73,0.731,80,0.982,81,0.894,100,1.173,108,2.106,110,1.097,114,4.411,115,2.447,129,2.045,130,1.173,159,0.874,167,1.644,175,1.29,183,1.622,216,0.889,225,2.392,250,1.971,253,1.414,261,1.341,278,3.667,299,1.355,309,1.538,312,1.328,337,2.182,346,0.994,389,2.024,416,1.679,429,1.912,435,1.581,470,1.057,482,2.562,536,2.083,560,4.411,590,2.464,843,1.603,847,1.43,875,2.083,1068,3.061,1076,1.603,1077,2.447,1078,2.963,1079,2.852,1080,2.852,1081,2.152,1082,2.447,1083,2.152,1084,2.852,1085,2.852,1086,2.447,1087,2.327,1088,1.803,1089,2.152,1090,2.852,1091,3.354,1092,4.022,1093,2.852,1094,2.447,1095,2.852,1096,5.213,1097,2.852,1098,1.398,1099,2.852,1100,1.679,1101,2.852,1102,2.152,1103,4.687,1104,2.852,1105,2.852,1106,2.852,1107,2.852,1108,2.852,1109,2.957,1110,2.327,1111,1.559,1112,2.608,1113,2.852,1114,2.963,1115,2.715,1116,2.715,1117,1.923,1118,1.879]],["t/1124",[115,6.979,470,1.44,482,4.445,560,3.824,590,4.275,686,6.979,688,4.822,1064,6.136,1065,6.136,1066,5.771,1067,6.363,1068,4.172,1069,6.136,1070,5.941,1071,6.136,1072,6.637,1076,4.572,1119,6.979]],["t/1126",[21,2.846,23,2.459,49,1.946,50,1.014,51,0.953,64,2.302,65,3.478,66,2.257,72,1.05,73,1.997,100,1.444,114,1.651,129,1.531,131,4.517,261,3.666,483,3.916,536,2.565,560,4.602,590,4.46,684,2.491,1068,3.999,1087,2.865,1088,2.219,1100,2.067,1111,4.261,1120,2.649,1121,2.865,1122,5.541,1123,4.916,1124,3.21,1125,6.689,1126,3.21,1127,3.51,1128,5.371,1129,5.541,1130,3.21,1131,3.21,1132,3.51,1133,3.51,1134,3.21,1135,3.21,1136,3.51,1137,3.51,1138,5.541,1139,3.21,1140,3.51,1141,3.51]],["t/1128",[39,3.747,397,5.661,417,4.04,482,4.356,560,3.747,617,4.189,806,5.654,998,5.373,1070,5.821,1142,9.879,1143,7.287,1144,7.969,1145,7.969,1146,7.969,1147,5.821,1148,6.012,1149,7.969,1150,6.012]],["t/1130",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,673,4.726,1064,6.612,1123,5.077,1151,8.764,1152,5.653,1153,6.055]],["t/1132",[23,1.361,51,0.951,59,1.059,61,2.009,64,1.171,65,2.777,66,1.249,72,0.581,73,1.106,80,1.361,81,1.239,110,1.194,148,1.465,159,1.322,175,1.952,261,2.029,299,2.05,312,2.009,337,3.025,429,1.76,435,1.456,470,0.764,548,4.029,560,4.386,590,3.415,659,3.415,1064,4.902,1068,3.333,1088,2.728,1089,3.256,1091,3.653,1098,2.116,1100,2.54,1109,3.22,1111,2.359,1114,4.107,1115,3.764,1116,5.038,1117,2.909,1118,4.281,1154,4.315,1155,3.521,1156,5.544,1157,3.521,1158,4.315,1159,4.315,1160,3.376,1161,4.315,1162,2.783,1163,2.5,1164,4.315,1165,4.315,1166,2.628,1167,3.062]],["t/1134",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,673,4.726,1065,6.612,1123,5.077,1152,5.653,1153,6.055,1168,8.764]],["t/1136",[23,1.399,51,0.938,59,1.081,61,2.066,64,1.204,65,2.824,66,2.3,72,0.597,73,1.137,80,1.39,81,1.265,110,1.219,148,1.506,159,1.359,175,2.007,261,2.086,299,2.107,312,2.066,337,3.088,429,1.81,435,1.497,470,0.786,560,4.438,590,3.487,659,3.487,1065,5.005,1068,3.403,1088,2.804,1089,3.347,1091,3.729,1098,2.175,1100,2.612,1109,3.288,1111,2.425,1114,4.193,1115,3.843,1116,5.108,1117,2.991,1118,4.371,1155,3.62,1156,5.637,1157,3.62,1160,3.471,1162,2.861,1163,2.57,1166,2.702,1167,3.148,1169,4.436,1170,4.436,1171,4.436,1172,4.436,1173,4.436,1174,4.436]],["t/1138",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,673,4.726,1066,6.219,1123,5.077,1152,5.653,1153,6.055,1175,8.764]],["t/1140",[23,1.361,51,0.948,59,1.059,61,3.025,64,1.171,65,2.309,66,1.249,72,0.581,73,1.106,80,1.361,81,1.239,110,1.194,159,1.322,175,1.952,261,2.029,299,2.05,312,2.009,337,3.025,429,1.76,435,1.456,470,0.764,548,4.029,560,4.386,590,3.415,659,3.415,1066,4.61,1068,4.009,1088,2.728,1089,3.256,1091,3.653,1098,2.116,1100,2.54,1109,3.22,1111,2.359,1114,4.107,1115,3.764,1116,4.527,1117,2.909,1118,4.281,1156,4.61,1162,2.783,1163,3.764,1166,2.628,1167,3.062,1176,3.946,1177,4.315,1178,4.315,1179,4.315,1180,3.376,1181,4.315,1182,3.376,1183,4.315,1184,3.521,1185,3.946,1186,3.703]],["t/1142",[23,1.465,39,2.184,50,1.493,51,0.926,59,0.757,64,1.26,65,2.439,66,1.345,72,0.625,73,1.19,80,0.973,81,0.886,108,2.423,110,0.854,114,4.24,132,2.063,159,1.423,175,2.101,213,2.996,261,2.184,299,2.206,337,2.163,397,2.65,429,1.895,435,1.567,467,1.696,514,3.986,559,1.662,560,4.736,590,4.74,601,2.829,906,3.79,1066,3.296,1091,2.611,1100,2.734,1111,2.539,1115,2.691,1185,4.247,1187,5.601,1188,3.79,1189,4.645,1190,6.863,1191,4.645,1192,3.79,1193,6.863,1194,4.645,1195,4.645,1196,4.645,1197,4.645,1198,4.645,1199,4.645,1200,2.936,1201,4.645,1202,3.634,1203,4.645,1204,4.645,1205,4.645,1206,3.986]],["t/1144",[20,2.121,37,0.92,48,1.645,51,0.927,61,4.284,72,0.652,73,1.241,88,1.873,108,2.499,110,1.301,129,2.113,175,2.191,272,5.777,429,1.976,435,1.634,560,4.327,590,2.546,835,2.151,1066,3.437,1068,5.244,1109,3.509,1114,3.062,1115,2.806,1162,4.566,1176,4.43,1186,4.157,1206,4.157,1207,4.844,1208,4.844,1209,4.844,1210,4.844,1211,3.79,1212,6.473,1213,3.004,1214,4.844,1215,4.844,1216,4.43,1217,4.844,1218,6.074,1219,6.473,1220,7.079,1221,6.473,1222,7.079,1223,4.844,1224,3.539,1225,4.844]],["t/1146",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,673,4.726,1067,6.857,1123,5.077,1152,5.653,1153,6.055,1226,8.764]],["t/1148",[23,1.392,51,0.951,59,1.077,61,3.076,64,1.197,65,2.348,66,1.277,72,0.594,73,1.13,80,1.384,81,1.26,110,1.214,159,1.351,175,1.996,261,2.075,299,2.096,312,2.054,337,3.076,429,1.8,435,1.488,470,0.781,560,4.427,590,3.472,659,3.472,1068,4.062,1088,2.789,1089,3.328,1091,3.714,1098,2.163,1100,2.597,1109,3.274,1111,2.411,1114,4.176,1115,3.827,1116,3.827,1117,2.974,1118,4.353,1162,2.845,1163,3.827,1166,2.687,1167,3.13,1180,3.452,1182,3.452,1184,3.6,1227,4.411,1228,3.786,1229,4.034,1230,3.786,1231,4.411,1232,4.411,1233,4.411,1234,4.411,1235,4.411,1236,6.605]],["t/1150",[21,2.484,27,3.77,50,1.64,114,4.715,167,2.386,187,3.372,274,3.719,312,3.168,482,3.719,484,3.335,560,3.199,590,3.576,673,3.669,689,3.622,837,4.005,847,3.41,867,4.143,893,4.97,1068,3.49,1098,3.335,1100,4.005,1123,3.942,1152,4.388,1153,4.701,1237,6.221,1238,5.133,1239,4.388,1240,6.803,1241,6.803,1242,4.97,1243,5.838,1244,6.803,1245,5.838,1246,6.803,1247,4.701]],["t/1152",[23,1.392,51,0.945,59,1.077,61,3.076,64,1.197,65,2.348,66,1.277,72,0.594,73,1.13,80,1.384,81,1.26,110,1.214,114,3.106,159,1.351,175,1.996,261,2.075,299,2.096,312,2.054,337,3.076,429,1.8,435,1.488,470,0.781,560,4.427,590,3.472,659,3.472,1068,4.83,1082,3.786,1086,3.786,1088,2.789,1089,3.328,1091,3.714,1098,2.163,1100,2.597,1109,3.274,1111,2.411,1114,4.176,1115,3.827,1116,3.827,1117,2.974,1118,4.353,1162,2.845,1163,3.827,1166,2.687,1167,3.13,1180,3.452,1182,3.452,1184,3.6,1228,3.786,1230,3.786,1248,3.6,1249,3.786,1250,4.411,1251,4.411,1252,4.411]],["t/1154",[23,1.729,51,0.933,59,0.893,64,1.487,65,2.75,66,1.587,72,0.738,73,1.405,80,1.149,81,1.046,110,1.008,114,3.638,159,1.679,192,3.536,261,2.578,299,2.604,337,2.553,429,2.237,467,2.002,560,4.216,590,5.399,659,2.882,1068,2.812,1091,3.082,1100,3.227,1109,2.717,1111,2.997,1115,3.176,1116,3.176,1125,4.704,1155,4.474,1157,4.474,1187,4.474,1200,3.465,1202,4.29,1239,4.99,1248,4.474,1249,4.704,1253,5.013,1254,5.013,1255,4.798,1256,5.013,1257,4.704]],["t/1156",[23,1.617,37,0.973,51,0.929,59,0.836,64,1.391,65,2.621,66,1.484,72,0.69,73,1.313,80,1.074,81,0.978,108,1.81,110,1.356,159,1.571,192,3.307,261,2.411,299,2.435,309,2.765,429,2.092,467,1.872,560,4.063,590,4.541,659,2.695,1068,3.784,1091,2.882,1100,3.018,1109,2.541,1115,2.97,1116,2.97,1125,4.399,1187,4.184,1200,3.241,1202,4.011,1216,4.688,1224,3.745,1238,3.868,1239,3.307,1248,4.184,1253,4.688,1254,4.688,1255,3.179,1256,4.688,1257,4.399,1258,5.127,1259,8.639,1260,5.127,1261,4.688,1262,5.127,1263,5.127,1264,4.184,1265,5.127,1266,4.688,1267,5.127]],["t/1158",[21,2.463,49,5.534,50,1.234,64,2.882,114,4.192,128,4.419,129,2.942,132,2.996,133,5.278,179,3.971,216,2.103,224,4.786,470,1.195,553,5.788,559,2.413,867,4.108,995,4.927,1068,4.573,1120,5.089,1188,5.504,1224,7.294,1238,5.089,1268,6.168,1269,5.788,1270,6.168,1271,6.745,1272,5.504,1273,4.927,1274,6.745]],["t/1160",[108,3.78,114,5.744,253,3.872,380,3.872,416,4.598,435,2.636,441,4.938,843,4.391,1068,4.007,1096,5.894,1102,5.894,1275,6.374,1276,7.143]],["t/1162",[21,3.201,39,2.475,50,0.963,51,0.411,66,1.524,100,3.091,114,5.298,130,2.165,133,4.118,167,1.846,189,2.337,380,2.609,393,3.605,416,3.098,435,1.776,509,3.468,519,2.609,804,4.517,875,3.845,889,3.637,904,3.205,1058,2.959,1083,6.615,1092,4.517,1098,2.58,1152,3.395,1268,4.813,1277,5.263,1278,4.813,1279,5.263,1280,5.263,1281,5.263,1282,4.813,1283,5.263,1284,5.263,1285,5.263,1286,5.263,1287,4.517,1288,5.263,1289,4.118,1290,5.263,1291,6.133,1292,7.482,1293,4.813,1294,5.263,1295,5.263,1296,6.133,1297,4.517,1298,5.263,1299,4.813,1300,3.003,1301,4.118]],["t/1164",[37,1.259,50,1.213,84,3.119,114,5.42,129,2.893,167,3.473,225,2.296,256,4.358,380,5.598,398,3.287,416,3.904,429,2.706,565,3.402,867,4.039,998,5.943,1292,6.897,1302,6.632,1303,5.004,1304,6.632,1305,5.691,1306,5.412,1307,6.632,1308,6.632,1309,4.192]],["t/1166",[21,2.507,27,1.564,33,2.032,35,0.66,37,1.55,48,0.958,50,1.494,51,0.895,64,1.607,84,2.185,95,1.023,108,2.882,109,1.288,110,0.854,114,3.839,130,1.16,151,1.399,167,0.99,179,1.661,185,1.045,189,1.253,190,1.133,194,2.412,224,4.871,238,1.689,250,1.949,346,1.619,355,1.635,389,2.002,398,1.399,435,0.952,441,5.456,467,1.696,470,0.5,509,1.859,515,2.129,549,2.302,617,1.483,619,1.61,632,2.881,650,1.949,684,2.002,746,1.696,754,1.82,810,1.75,843,1.586,1068,3.038,1091,1.586,1098,1.383,1238,5.179,1261,4.248,1310,2.821,1311,2.821,1312,1.82,1313,2.821,1314,4.645,1315,2.821,1316,2.821,1317,2.821,1318,2.421,1319,2.821,1320,4.248,1321,2.821,1322,2.58,1323,2.821,1324,2.58,1325,3.791,1326,3.986,1327,2.58,1328,2.821,1329,5.921,1330,3.505,1331,4.645,1332,2.821,1333,4.248,1334,4.248,1335,2.821,1336,6.94,1337,2.421,1338,2.421,1339,2.58,1340,2.58,1341,4.645,1342,4.645,1343,5.921,1344,2.421,1345,2.58,1346,5.921,1347,4.645,1348,6.864,1349,2.58,1350,2.58,1351,2.58,1352,2.821,1353,2.821,1354,2.58,1355,2.58,1356,2.821,1357,4.248,1358,2.821,1359,2.821,1360,2.821,1361,2.821]],["t/1168",[21,1.576,33,1.277,37,0.819,50,1.793,51,0.895,114,5.035,167,1.513,189,1.916,241,3.703,244,3.601,253,2.139,256,3.827,311,3.333,346,1.504,393,1.775,429,3.547,435,1.456,467,1.576,470,0.764,618,3.256,627,1.576,699,2.297,773,6.087,843,5.51,1058,2.426,1152,2.783,1156,4.61,1257,3.703,1292,5.084,1312,4.191,1362,7.951,1363,3.376,1364,3.062,1365,3.946,1366,4.315,1367,7.145,1368,4.315,1369,3.946,1370,3.946,1371,3.376,1372,4.315,1373,4.315,1374,2.676,1375,4.315,1376,4.315,1377,3.946,1378,4.315,1379,4.315,1380,3.946,1381,6.497,1382,3.703]],["t/1170",[21,2.241,27,1.646,32,1.524,33,1.434,37,1.165,50,1.295,51,0.718,93,1.916,100,1.221,112,0.865,114,4.603,120,2.424,129,1.296,131,1.581,132,1.319,145,1.694,167,3.648,183,1.028,187,2.401,190,1.193,192,1.916,219,2.548,225,1.028,257,2.424,309,1.602,345,2.324,346,2.915,384,2.107,386,2.424,387,1.456,389,2.107,413,2.052,435,1.002,470,0.526,471,2.17,482,3.354,518,2.107,559,1.063,565,1.524,580,2.324,618,5.341,650,2.052,682,2.107,684,2.107,694,1.957,699,1.581,746,1.769,754,1.916,818,2.241,843,1.67,867,1.809,893,2.17,996,2.324,1068,1.524,1094,4.157,1098,3.008,1109,2.401,1192,3.954,1318,2.548,1337,5.265,1383,4.845,1384,6.136,1385,2.324,1386,2.97,1387,2.716,1388,2.548,1389,2.424,1390,2.241,1391,4.845,1392,6.136,1393,4.845,1394,2.97,1395,2.716,1396,2.716,1397,6.136,1398,2.424,1399,2.241,1400,2.97,1401,2.241,1402,2.716,1403,2.97,1404,2.548,1405,2.716,1406,3.539,1407,2.97,1408,4.93,1409,2.716,1410,2.97,1411,2.97,1412,9.164,1413,7.079,1414,5.265,1415,2.548,1416,2.548,1417,4.157,1418,2.716,1419,2.97,1420,2.97,1421,2.716,1422,2.716,1423,4.157,1424,2.548]],["t/1172",[21,1.101,33,1.835,37,0.572,50,0.897,51,0.815,61,2.284,64,0.818,65,1.072,72,0.406,83,1.775,84,4.176,107,1.011,108,3.268,110,1.139,111,1.829,114,3.697,132,1.339,167,2.174,183,1.044,190,1.211,194,2.547,216,1.529,231,2.887,244,3.436,250,2.083,256,2.729,309,1.626,346,1.051,389,2.139,413,3.389,429,2.529,436,5.931,470,0.534,475,2.757,548,1.87,551,5.321,559,1.755,617,2.578,618,3.701,659,4.865,688,1.447,690,2.359,694,3.232,703,2.757,727,1.605,731,2.379,746,2.264,754,1.945,773,3.711,778,1.87,838,2.275,904,1.836,1078,1.906,1156,2.139,1192,2.461,1292,2.359,1363,3.838,1364,3.48,1389,2.461,1396,2.757,1406,3.583,1414,5.321,1416,2.587,1425,3.015,1426,5.46,1427,5.06,1428,3.015,1429,3.015,1430,2.359,1431,3.015,1432,3.015,1433,6.2,1434,4.003,1435,3.015,1436,3.015,1437,3.015,1438,3.015,1439,2.757,1440,3.015,1441,2.757,1442,3.015,1443,5.589,1444,7.861,1445,2.757,1446,2.359,1447,3.015,1448,2.757,1449,3.015]],["t/1174",[33,2.433,50,0.86,51,0.882,64,1.275,108,2.902,110,1.859,114,2.21,132,2.087,167,1.648,257,3.835,366,3.335,401,2.723,484,2.304,503,5.65,509,3.097,559,1.682,617,5.497,688,2.256,731,2.28,810,2.915,838,5.224,1238,3.546,1275,5.65,1303,3.546,1443,5.417,1446,3.678,1450,4.7,1451,4.7,1452,4.7,1453,4.7,1454,10.731,1455,10.731,1456,8.22,1457,4.7,1458,4.7,1459,4.7,1460,4.7,1461,4.7,1462,4.033,1463,4.7,1464,4.7,1465,3.032,1466,4.7,1467,4.7,1468,4.7]],["t/1176",[33,1.132,35,0.524,37,0.951,39,3.13,50,1.617,51,0.825,59,0.365,61,1.781,64,0.607,65,1.359,66,0.648,72,0.515,88,1.479,108,1.35,112,1.938,114,5.264,130,3.359,148,2.26,151,1.896,167,3.099,189,2.224,194,1.162,216,0.698,220,1.148,248,0.906,253,1.896,255,2.047,256,1.684,257,1.827,309,1.207,346,0.78,380,2.483,398,1.109,416,2.252,417,1.135,429,2.716,435,0.755,443,1.827,467,1.829,470,1.049,482,2.091,548,1.388,559,0.801,565,1.148,580,1.751,601,1.363,624,1.122,632,2.372,693,1.635,754,1.444,759,1.588,806,1.588,810,1.388,843,1.258,847,1.122,867,1.363,888,1.318,904,1.363,1068,2.569,1076,1.258,1096,1.689,1098,1.097,1102,1.689,1160,6.063,1162,1.444,1163,2.216,1219,2.047,1276,6.632,1282,3.498,1287,1.921,1296,1.827,1299,2.047,1300,1.277,1301,2.993,1306,1.827,1312,1.444,1320,2.047,1334,5.419,1377,2.047,1380,3.498,1406,4.329,1408,2.418,1412,3.498,1417,5.085,1418,2.047,1421,2.047,1443,1.751,1469,2.047,1470,1.921,1471,2.238,1472,2.238,1473,2.238,1474,1.751,1475,1.588,1476,2.238,1477,1.827,1478,2.238,1479,2.238,1480,2.047,1481,2.238,1482,2.238,1483,2.238,1484,3.121,1485,2.238,1486,2.238,1487,2.238,1488,2.238,1489,7.253,1490,2.238,1491,1.827,1492,2.238,1493,2.238,1494,2.047,1495,1.689,1496,1.689,1497,2.238,1498,2.047,1499,2.238,1500,2.238,1501,2.238,1502,2.238,1503,2.238,1504,2.238,1505,2.238,1506,2.238,1507,2.238,1508,2.238,1509,2.047,1510,2.047,1511,2.238,1512,2.238]],["t/1178",[4,1.031,21,0.874,22,0.833,27,0.73,33,1.833,35,0.771,37,1.315,48,1.788,50,1.324,51,0.888,59,0.215,64,0.357,65,0.468,72,0.322,84,4.594,88,1.566,93,1.544,94,1.13,95,2.511,106,0.498,107,1.93,108,3.571,110,1.429,111,1.511,112,0.383,114,4.044,128,2.008,130,0.985,133,1.031,167,0.462,174,0.72,179,1.41,181,1.366,183,1.822,189,2.088,190,0.962,191,0.692,192,2.613,220,0.676,231,0.613,240,2.274,241,1.13,249,1.366,250,1.654,253,3.432,256,1.449,346,0.834,380,1.187,388,1.031,389,3.336,393,0.542,394,0.833,410,1.075,417,0.668,429,2.526,435,2.536,470,0.424,484,0.646,559,0.857,601,0.802,603,1.075,617,1.259,619,0.752,641,2.055,650,0.91,673,1.291,681,0.962,695,2.405,731,0.639,746,1.923,754,2.123,790,1.075,835,1.799,843,2.277,888,0.775,944,1.544,998,0.888,1091,0.741,1098,0.646,1192,1.075,1238,0.994,1273,6.52,1289,1.031,1303,1.807,1309,1.514,1318,1.13,1325,1.075,1344,1.13,1349,2.19,1350,2.19,1351,2.19,1354,2.19,1385,2.576,1387,1.205,1406,1.749,1414,4.518,1416,1.13,1417,5.314,1423,1.13,1443,1.031,1480,1.205,1484,1.075,1494,1.205,1495,0.994,1496,0.994,1513,3.098,1514,4.034,1515,1.317,1516,2.394,1517,4.051,1518,4.051,1519,2.394,1520,2.394,1521,2.394,1522,2.394,1523,2.394,1524,2.394,1525,8.768,1526,1.317,1527,1.954,1528,1.13,1529,1.317,1530,4.051,1531,2.394,1532,3.292,1533,3.01,1534,1.317,1535,2.19,1536,2.394,1537,1.317,1538,1.317,1539,1.205,1540,3.292,1541,1.317,1542,1.205,1543,2.19,1544,1.205,1545,1.205,1546,0.994,1547,1.205,1548,1.317,1549,1.317,1550,1.031,1551,1.317,1552,3.292,1553,2.394,1554,1.317,1555,0.935,1556,1.317,1557,1.317,1558,1.317,1559,1.205,1560,1.317]],["t/1180",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,673,4.726,1069,6.612,1123,5.077,1152,5.653,1153,6.055,1561,8.764]],["t/1182",[23,1.376,51,0.943,59,1.068,61,3.05,64,1.184,65,2.328,66,1.263,72,0.588,73,1.118,80,1.373,81,1.25,110,1.204,159,1.337,175,1.974,261,2.052,299,2.073,312,2.031,337,3.05,429,1.78,435,1.472,470,0.773,548,4.063,560,4.406,590,3.443,659,3.443,1068,4.035,1069,4.942,1088,2.758,1091,3.683,1098,2.139,1100,2.568,1109,3.247,1111,2.385,1114,4.141,1115,3.795,1116,4.557,1117,2.941,1118,4.317,1156,4.648,1162,2.814,1163,3.795,1166,2.657,1167,3.096,1180,3.414,1182,3.414,1228,3.744,1230,3.744,1562,4.363,1563,4.363,1564,4.363,1565,4.363,1566,4.363,1567,4.363,1568,4.363,1569,4.363]],["t/1184",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,673,4.726,1070,6.402,1123,5.077,1152,5.653,1153,6.055,1570,8.764]],["t/1186",[23,1.297,39,1.934,51,0.946,56,2.71,59,1.021,61,2.917,64,1.116,65,2.227,66,1.191,72,0.554,73,1.054,80,1.313,81,1.195,110,1.151,114,1.934,159,1.26,175,1.861,261,1.934,299,1.954,337,2.917,429,1.678,435,1.388,484,2.017,548,2.551,560,4.294,590,3.293,659,3.293,847,2.062,1068,3.893,1070,5.544,1088,3.96,1091,3.522,1098,2.017,1100,2.421,1109,3.106,1111,2.248,1114,3.96,1115,3.63,1116,3.63,1117,2.773,1118,4.129,1155,3.357,1157,3.357,1162,2.653,1163,3.63,1166,3.816,1180,3.218,1182,3.218,1184,3.357,1229,3.761,1239,2.653,1309,2.6,1571,4.113,1572,4.113,1573,4.113,1574,4.113,1575,4.113,1576,4.113,1577,4.113,1578,3.53,1579,4.113,1580,2.462,1581,4.113]],["t/1188",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,673,4.726,1071,6.612,1123,5.077,1152,5.653,1153,6.055,1582,8.764]],["t/1190",[23,1.339,51,0.943,59,1.046,61,1.977,64,1.152,65,2.75,66,1.229,72,0.572,73,1.088,80,1.345,81,1.224,110,1.18,148,1.442,159,1.301,175,1.921,261,1.997,299,2.017,312,1.977,337,2.988,429,1.732,435,1.433,470,0.752,548,4.798,560,4.355,590,3.374,659,3.374,1068,3.292,1071,4.842,1088,4.057,1091,3.608,1098,2.082,1100,2.499,1109,3.181,1111,2.321,1114,4.057,1115,3.718,1116,4.996,1117,2.862,1118,4.229,1156,3.013,1160,3.322,1162,2.739,1163,2.46,1166,3.908,1167,3.013,1200,2.684,1583,4.246,1584,4.246,1585,4.246,1586,4.246,1587,5.869,1588,4.246,1589,4.246,1590,4.246,1591,4.246,1592,4.246,1593,4.246]],["t/1192",[27,4.857,114,4.121,274,4.79,312,4.08,435,2.957,560,4.121,673,4.726,1072,7.152,1123,5.077,1152,5.653,1153,6.055,1594,8.764]],["t/1194",[23,1.318,51,0.955,59,1.033,61,1.945,64,1.134,65,2.723,66,1.21,72,0.563,73,1.071,80,1.328,81,1.209,110,1.165,148,1.419,159,1.28,175,1.89,261,1.965,299,1.985,312,1.945,337,2.952,429,1.705,435,1.41,470,0.74,548,2.591,560,4.324,590,3.333,659,3.333,1068,3.253,1072,5.174,1088,4.008,1091,3.565,1098,2.049,1100,2.46,1109,3.143,1111,2.284,1114,4.008,1115,3.674,1116,4.956,1117,2.817,1118,4.178,1156,2.965,1160,3.269,1162,2.695,1163,2.421,1166,3.861,1167,2.965,1200,2.641,1587,5.798,1595,4.178,1596,4.178,1597,4.178,1598,4.178,1599,4.178,1600,4.178,1601,4.178,1602,4.178,1603,4.178,1604,4.178]],["t/1196",[20,2.511,21,2.422,55,4.845,73,1.699,101,3.969,180,3.577,185,2.456,258,6.065,356,4.104,470,1.175,560,3.119,625,3.251,635,5.004,681,4.845,715,4.192,780,5.189,800,5.004,837,3.904,875,4.845,1123,3.842,1128,5.189,1255,4.113,1390,5.004,1465,4.278,1605,6.065,1606,6.632,1607,6.632,1608,5.691,1609,5.691,1610,6.632,1611,6.632,1612,6.632,1613,5.189,1614,5.691,1615,5.004,1616,6.632,1617,6.632,1618,6.632]],["t/1198",[21,4.075,23,2.705,50,1.568,174,4.686,371,4.609,731,4.159,1008,6.263,1073,7.84,1074,7.84,1619,6.469,1620,6.263]],["t/1200",[20,0.849,27,2.957,35,1.249,37,0.635,48,1.136,50,1.516,51,0.914,59,1.084,72,0.718,73,0.858,80,0.701,81,1.581,88,3.205,93,2.159,108,1.182,110,1.395,111,1.248,147,1.644,192,2.159,216,1.043,238,3.982,239,2.902,240,2.313,254,2.445,346,3.078,359,3.334,394,2.116,435,1.129,470,0.945,485,2.525,565,1.717,617,3.989,619,1.91,673,1.805,688,1.606,810,2.076,820,2.445,837,3.141,843,4.267,1031,2.731,1035,4.175,1078,2.116,1098,3.261,1111,1.829,1382,2.872,1404,2.872,1621,5.697,1622,3.347,1623,3.061,1624,5.335,1625,2.619,1626,3.347,1627,1.829,1628,3.347,1629,3.061,1630,3.347,1631,5.335,1632,5.335,1633,6.652,1634,3.347,1635,4.291,1636,2.872,1637,3.347,1638,3.347,1639,3.347,1640,3.347,1641,3.347,1642,3.347,1643,4.578,1644,3.347,1645,3.347,1646,2.872,1647,3.347,1648,3.347,1649,3.347,1650,3.061,1651,3.347,1652,3.061,1653,3.061]],["t/1202",[20,1.74,21,2.506,23,2.165,51,0.867,59,1.118,64,1.862,65,3.204,66,1.987,72,0.924,73,2.31,74,2.756,80,1.438,81,1.309,110,1.261,159,2.102,312,3.195,336,4.107,337,4.198,353,4.107,435,2.315,483,3.915,1078,4.338,1088,4.338,1109,3.401,1654,6.275,1655,6.862,1656,6.862,1657,5.177,1658,4.626,1659,4.741]],["t/1204",[20,0.894,37,0.669,40,3.573,51,0.94,53,3.515,59,1.473,73,0.903,80,1.637,81,1.49,88,1.363,95,2.497,108,2.43,110,1.563,147,2.408,151,2.756,159,1.08,161,3.225,179,2.076,180,1.902,185,2.059,225,1.221,233,2.147,238,2.11,248,3.657,317,1.831,325,2.576,336,3.328,337,3.205,346,1.229,380,2.756,432,3.082,482,1.927,509,2.324,559,1.262,575,1.61,579,2.076,618,2.66,622,0.739,699,1.877,806,2.502,1058,1.982,1076,1.982,1081,4.195,1109,3.412,1245,3.026,1300,3.172,1477,2.878,1580,2.11,1627,1.927,1660,2.878,1661,5.56,1662,3.225,1663,4.771,1664,3.515,1665,3.526,1666,3.026,1667,2.878,1668,3.526,1669,3.526,1670,3.225,1671,3.526,1672,3.526,1673,4.771,1674,3.526,1675,3.526,1676,3.225,1677,3.225,1678,2.878,1679,3.526]],["t/1206",[37,1.655,39,5.137,50,1.193,51,0.509,73,1.671,74,2.619,88,2.522,104,1.161,108,3.078,167,2.288,194,3.387,300,6.207,345,5.104,353,3.904,536,4.765,559,2.334,622,1.367,810,4.045,1239,6.334,1326,5.597,1580,3.904,1643,5.597,1680,5.623,1681,7.114,1682,5.964,1683,5.964,1684,6.522,1685,5.964,1686,6.522,1687,6.522,1688,6.522]],["t/1208",[20,2.581,21,3.716,93,5.356,180,5.488,394,5.249,673,4.478,688,3.985,1128,7.963,1401,6.265,1465,5.356,1689,8.303,1690,8.303,1691,8.303]],["t/1211",[3,0.937,33,0.614,35,2.006,37,0.68,39,4.474,40,1.87,48,0.704,50,1.163,51,0.919,60,1.884,72,0.279,73,0.918,80,0.435,88,1.385,95,1.299,104,0.637,106,1.355,107,2.131,108,1.265,109,0.947,110,0.381,111,2.94,112,1.043,130,2.614,147,1.104,148,0.704,167,1.256,181,3.212,183,1.949,185,0.768,187,1.028,190,0.833,191,1.09,194,1.077,213,1.338,216,2.325,225,2.966,227,1.498,230,1.738,300,4.018,327,0.874,330,3.268,346,2.747,382,1.017,387,1.017,391,1.78,470,0.838,500,1.692,559,0.742,565,1.064,571,0.691,575,0.947,622,0.435,659,2.486,672,2.222,684,1.472,688,0.995,689,1.104,745,1.796,746,1.308,810,1.286,847,1.04,888,1.221,944,1.338,1014,1.692,1058,1.166,1076,1.166,1077,1.78,1078,1.311,1166,1.263,1188,1.692,1239,4.81,1309,1.311,1326,1.78,1399,1.565,1408,1.311,1580,1.241,1619,2.703,1657,3.568,1666,1.78,1680,5.084,1681,6.992,1682,1.897,1683,1.897,1685,5.148,1692,2.803,1693,2.074,1694,1.338,1695,2.074,1696,2.074,1697,2.074,1698,2.265,1699,2.074,1700,2.074,1701,2.074,1702,2.074,1703,2.074,1704,1.897,1705,2.311,1706,1.897,1707,4.729,1708,1.78,1709,1.623,1710,2.074,1711,2.074,1712,3.582,1713,2.074,1714,1.897,1715,2.074,1716,1.897,1717,1.472,1718,2.074,1719,2.074,1720,3.582,1721,2.074,1722,3.356,1723,1.78,1724,2.923,1725,1.897,1726,2.074,1727,1.897]],["t/1213",[3,0.669,37,1.813,40,1.693,48,0.868,50,0.783,51,0.875,59,1.346,64,0.694,72,1.316,73,2.871,80,1.629,81,1.575,88,4.359,95,2.342,100,1.052,110,1.518,129,1.115,147,2.215,148,0.868,156,1.868,180,2.309,185,2.045,232,1.929,248,2.235,286,4.637,309,1.379,346,0.891,432,1.417,470,0.758,482,1.398,565,1.312,622,0.897,806,3.038,867,1.557,920,1.929,1017,3.493,1058,2.407,1076,1.437,1081,1.929,1213,2.655,1242,1.868,1255,2.655,1300,4.102,1664,2.706,1694,6.302,1698,3.49,1728,2.194,1729,2.194,1730,2.194,1731,2.194,1732,2.194,1733,2.194,1734,2.194,1735,2.194,1736,2.194,1737,2.194,1738,2.194,1739,2.194,1740,2.194,1741,3.673,1742,2.194,1743,2.194,1744,2.087,1745,2.194,1746,2.194,1747,1.814,1748,3.673,1749,3.493,1750,2.194,1751,2.087,1752,2.194]],["t/1215",[20,1.696,37,1.27,51,0.915,59,1.09,65,2.377,72,1.194,73,2.712,74,3.56,80,1.401,81,1.276,110,1.229,233,4.073,272,5.458,298,5.739,299,3.177,435,2.257,470,1.184,622,1.401,1694,4.314,1744,5.458,1753,6.936,1754,6.688,1755,8.864,1756,6.688,1757,5.739,1758,6.688]],["t/1217",[32,2.852,37,1.055,40,3.09,51,0.913,65,1.976,66,1.609,72,1.052,73,2.645,74,3.935,191,2.922,470,0.985,519,4.857,520,7.145,521,3.945,622,1.165,688,2.668,699,2.959,1255,3.448,1301,4.35,1303,5.895,1753,7.668,1759,9.034,1760,5.084,1761,5.559,1762,5.559,1763,5.559,1764,5.559,1765,5.559,1766,5.559,1767,5.559,1768,5.559,1769,5.559,1770,3.273,1771,5.559,1772,5.559]],["t/1219",[37,1.11,51,0.936,65,2.078,72,1.09,73,2.378,74,2.348,88,4.462,101,3.5,180,4.365,248,2.367,299,2.778,370,4.04,435,1.973,470,1.036,622,1.225,746,2.135,1694,3.771,1773,5.592,1774,5.847,1775,4.772,1776,4.772,1777,4.772,1778,4.772,1779,4.772,1780,4.772,1781,4.772,1782,5.018,1783,5.018,1784,5.018,1785,5.018,1786,5.018,1787,5.018]],["t/1221",[37,1.628,51,0.89,65,2.262,72,1.155,73,2.485,74,2.556,108,2.247,130,2.618,167,3.402,248,2.576,299,3.024,469,2.752,470,1.127,622,1.334,1694,5.532,1698,4.023,1788,7.842,1789,6.365,1790,6.365,1791,6.365,1792,5.82,1793,6.365,1794,6.365,1795,5.82,1796,6.365,1797,6.365,1798,6.365,1799,6.365,1800,6.365,1801,6.365,1802,6.365,1803,6.365]],["t/1223",[51,0.919,65,2.749,72,1.311,73,2.731,74,3.106,110,1.422,470,1.37,575,4.867,622,1.621,635,5.836,835,3.435,1636,6.637,1804,7.735,1805,7.735]],["t/1225",[12,4.18,59,1.519,72,1.255,73,2.794,110,1.083,220,3.022,226,3.413,227,2.462,382,2.888,548,3.653,575,3.715,591,7.996,592,7.996,695,4.303,702,4.446,706,5.238,731,2.857,748,3.312,819,4.609,1054,5.387,1309,3.724,1806,8.521,1807,5.891,1808,5.891,1809,8.135,1810,5.891,1811,5.891,1812,5.891,1813,5.891,1814,5.891,1815,5.891,1816,5.055,1817,5.891,1818,5.891,1819,5.891,1820,4.18]],["t/1227",[72,1.193,73,2.712,88,3.426,95,3.214,110,1.629,622,1.857,818,6.686,1213,5.496,1821,8.862,1822,8.862]],["t/1229",[40,3.392,51,0.97,59,0.825,65,1.799,67,2.73,72,0.984,73,2.197,74,2.032,80,1.06,81,0.965,88,3.316,95,3.406,110,1.343,112,1.473,248,2.048,256,2.228,274,2.766,353,3.029,467,1.848,470,0.896,617,2.66,622,1.06,636,5.223,1163,2.932,1213,3.139,1330,5.514,1664,3.199,1694,3.264,1823,5.514,1824,5.061,1825,5.061,1826,4.628,1827,5.061,1828,7.307,1829,4.13]],["t/1231",[37,0.666,40,3.87,51,0.963,59,0.572,65,1.248,67,1.893,72,0.746,73,1.759,74,1.41,80,0.736,81,0.67,88,2.142,95,3.653,110,0.645,112,1.022,159,1.075,167,3.532,248,1.421,256,1.545,353,2.101,433,3.574,435,1.184,467,1.282,470,0.622,617,1.845,622,0.736,636,5.959,659,1.845,698,4.257,1163,3.977,1528,3.012,1694,2.264,1749,2.865,1826,3.21,1829,8.855,1830,3.51,1831,3.51,1832,3.51,1833,3.51,1834,3.51,1835,3.51,1836,3.51,1837,3.51,1838,3.51,1839,3.51,1840,3.51,1841,3.51,1842,3.51,1843,3.012,1844,3.51,1845,5.541,1846,2.747,1847,3.51,1848,3.012]],["t/1233",[37,1.171,40,2.438,51,0.944,59,1.005,65,2.191,67,3.326,72,1.13,73,2.445,74,2.476,80,1.292,81,1.176,88,2.384,95,3.044,110,1.133,112,1.795,159,1.889,167,2.944,248,3.397,256,2.714,353,3.691,467,2.252,470,1.092,617,3.241,622,1.292,636,3.755,659,3.241,690,4.825,1829,5.032,1843,5.291,1849,6.166,1850,6.166,1851,6.166]],["t/1235",[3,1.541,40,2.329,51,0.937,59,0.96,65,2.094,67,3.177,72,1.255,73,2.387,74,2.366,81,1.124,95,2.95,107,1.975,110,1.083,111,2.197,167,2.066,248,3.771,256,2.593,271,1.88,336,3.526,337,2.743,378,4.609,470,1.043,617,3.096,622,1.234,636,3.587,659,3.096,690,4.609,1213,3.653,1664,3.724,1829,4.807,1843,5.055,1852,5.891,1853,5.891,1854,5.055,1855,3.882,1856,5.387,1857,5.891]],["t/1237",[51,0.81,72,1.155,73,2.859,104,2.063,110,1.576,131,4.564,346,2.987,622,1.796]],["t/1239",[48,2.88,50,1.552,72,1.142,73,2.641,88,4.294,110,1.559,147,2.613,575,3.873,622,1.777,1680,5.471,1858,7.278,1859,8.481]],["t/1241",[37,1.483,48,2.652,51,0.765,59,1.273,72,1.052,73,2.51,92,5.706,147,2.407,185,2.892,470,1.383,622,1.637,691,4.391,739,3.872,741,4.007,748,5.508,999,5.543,1680,5.038,1860,7.811,1861,7.811,1862,7.811]],["t/1243",[35,1.986,37,1.189,39,2.946,40,2.477,50,1.76,51,0.805,59,1.021,72,0.844,73,2.174,104,1.509,132,2.782,147,1.93,177,2.197,185,2.319,470,1.109,559,2.241,622,1.312,691,3.522,748,3.522,908,3.96,911,5.72,989,4.901,990,4.901,992,6.02,999,4.445,1680,4.04,1863,7.758,1864,7.28,1865,7.28,1866,5.728,1867,6.264,1868,5.728,1869,5.728,1870,5.112,1871,5.112]],["t/1245",[35,2.16,37,1.35,50,1.688,51,0.846,59,1.159,72,0.957,73,2.364,104,1.642,132,3.157,470,1.259,559,2.543,622,1.489,748,3.997,911,6.22,989,5.562,990,5.562,992,5.044,1866,6.501,1870,7.529,1871,8.359,1872,7.109,1873,7.109]],["t/1247",[35,1.895,37,1.11,39,2.75,40,2.312,50,1.698,51,0.782,59,0.953,72,0.787,73,2.073,104,1.44,132,2.597,147,1.802,177,2.051,185,2.165,470,1.036,559,2.092,622,1.225,691,3.287,748,3.287,908,3.696,911,5.456,989,4.575,990,4.575,992,5.743,999,4.149,1371,4.575,1680,3.771,1864,6.945,1865,6.945,1868,7.401,1869,5.347,1870,4.772,1871,4.772,1874,8.093,1875,7.401,1876,5.847,1877,5.847,1878,5.847,1879,5.347,1880,5.347,1881,5.347,1882,5.347]],["t/1249",[35,1.914,37,1.127,39,2.791,40,2.347,50,1.711,51,0.787,59,0.967,72,0.799,73,2.095,104,1.455,132,2.636,147,1.829,177,2.081,185,2.198,470,1.051,559,2.123,622,1.243,691,3.337,748,3.337,908,3.752,911,5.513,989,4.644,990,4.644,992,5.802,999,4.211,1680,3.828,1864,5.093,1865,5.093,1870,6.673,1871,7.634,1875,5.427,1879,5.427,1880,5.427,1881,5.427,1882,8.555,1883,8.177,1884,5.935,1885,5.935,1886,5.935]],["t/1251",[48,2.392,50,1.678,51,0.716,59,1.148,67,4.947,72,0.949,73,2.35,95,3.327,181,4.02,429,2.874,470,1.248,622,1.476,748,3.961,911,4.75,984,6.046,993,6.046,1887,9.173,1888,7.045,1889,7.045,1890,9.173,1891,7.045,1892,5.316,1893,7.045,1894,7.045,1895,7.045,1896,7.045,1897,7.045]],["t/1253",[35,1.075,39,2.159,48,2.31,50,0.84,51,0.93,59,1.109,61,2.138,67,3.67,72,0.618,73,1.743,80,0.962,81,0.876,95,2.94,110,0.844,112,1.336,148,2.31,159,1.406,179,2.703,190,1.844,191,2.413,226,3.942,248,2.754,278,3.592,336,2.748,337,3.168,429,1.873,435,2.296,469,3.506,470,0.813,617,2.413,619,2.619,622,0.962,835,2.039,888,2.703,944,2.961,1109,2.276,1443,3.592,1446,3.592,1496,5.134,1620,3.354,1898,4.591,1899,4.591,1900,4.591,1901,4.591,1902,4.591,1903,6.804,1904,4.591,1905,5.839,1906,4.591,1907,6.804,1908,3.746,1909,4.591,1910,4.591,1911,4.198,1912,4.591,1913,3.94,1914,4.591,1915,4.198,1916,4.591,1917,4.591]],["t/1255",[32,4.546,72,1.193,73,2.712,95,3.214,110,1.629,622,1.857,1918,7.727]],["t/1258",[14,5.085,37,2.114,51,0.493,72,1.499,95,3.094,147,1.946,185,3.577,271,3.554,314,2.911,317,5.91,622,1.323,1255,3.916,1919,6.314,1920,6.314,1921,6.314,1922,6.314,1923,6.314,1924,6.314]],["t/1260",[14,3.915,95,4.047,147,2.642,810,5.317,1608,7.357,1609,7.357,1925,8.573,1926,7.84,1927,8.573,1928,8.573,1929,8.573,1930,7.357]],["t/1262",[51,0.947,61,3.499,112,2.188,189,4.67,194,3.901,416,5.628,627,2.744,1491,6.132,1908,6.132,1926,6.872,1931,7.514,1932,7.514,1933,7.514,1934,7.514,1935,7.514,1936,7.514]],["t/1264",[14,5.306,37,1.849,51,0.673,72,1.402,148,2.179,177,2.25,216,2.688,327,4.389,346,2.236,370,5.958,470,1.136,491,7.02,622,1.344,691,3.607,1937,6.416,1938,6.416,1939,6.416,1940,6.416,1941,6.416,1942,6.416,1943,6.416,1944,5.868,1945,6.416,1946,5.868]],["t/1266",[14,5.136,37,1.722,51,0.808,72,1.324,101,3.351,108,1.977,148,3.079,177,2.754,309,4.235,327,4.143,346,1.951,370,7.153,470,0.992,491,6.627,622,1.173,650,3.868,691,3.148,867,3.41,1058,3.148,1944,5.12,1946,5.12,1947,5.599,1948,5.599,1949,5.599,1950,5.599,1951,5.599,1952,5.599,1953,5.599,1954,5.599,1955,9.068,1956,5.12]],["t/1268",[14,4.739,51,0.81,72,1.155,148,2.911,309,4.624,470,1.518,622,1.796,702,4.686,706,4.82,1957,10.377,1958,8.573]],["t/1270",[14,5.312,37,1.513,51,0.774,72,1.336,84,3.747,148,2.706,216,2.484,327,3.359,346,2.776,470,1.411,622,1.67,1959,7.969,1960,7.969,1961,7.969,1962,7.969]],["t/1272",[14,5.391,37,1.812,50,1.128,51,0.655,72,1.443,101,3.691,177,2.163,216,2.617,327,4.022,346,3.569,370,4.261,401,3.573,470,1.092,491,4.157,622,1.292,637,5.759,1058,3.467,1956,5.639,1963,6.166,1964,6.166,1965,6.166,1966,6.166,1967,6.166,1968,6.166,1969,6.166]],["t/1274",[14,5.182,37,1.528,51,0.779,72,1.344,148,2.733,216,2.51,327,3.393,346,2.805,470,1.426,622,1.687,1627,5.457,1970,8.05,1971,8.05,1972,8.05]],["t/1276",[14,5.145,33,2.919,37,1.498,51,0.77,72,1.328,148,2.679,216,2.459,327,3.325,346,2.749,398,3.91,470,1.397,622,1.653,1973,7.889,1974,7.889,1975,7.889,1976,7.889]],["t/1278",[14,5.2,37,1.544,51,0.784,72,1.353,148,2.761,216,2.535,327,3.428,470,1.44,622,1.704,739,4.98,1977,8.133,1978,8.133,1979,8.133]],["t/1280",[14,5.182,37,1.896,51,0.779,72,1.344,150,4.739,216,2.51,325,5.881,327,3.393,470,1.426,622,1.687,1980,8.05,1981,8.05,1982,8.05,1983,8.05]],["t/1282",[14,5.055,37,1.427,50,1.375,51,0.746,72,1.288,185,2.782,216,2.343,325,5.489,327,3.167,358,5.669,454,4.424,455,6.093,470,1.331,503,6.132,622,1.574,1984,6.872,1985,7.514,1986,7.514,1987,7.514,1988,6.448]],["t/1284",[14,4.73,37,0.955,51,0.926,61,4.626,72,1.151,110,0.924,128,2.493,131,3.872,132,2.233,147,2.633,190,2.02,216,2.268,220,2.58,225,1.741,253,2.493,256,2.213,327,3.066,387,3.566,470,0.891,484,2.466,546,4.315,593,4.599,613,3.794,622,1.054,790,4.104,835,2.233,886,3.935,1163,2.914,1989,4.315,1990,5.029,1991,5.029,1992,8.546,1993,4.315,1994,9.364,1995,4.599,1996,7.274,1997,5.029,1998,5.029,1999,5.029,2000,5.029,2001,5.029,2002,5.029]],["t/1286",[14,4.559,33,2.383,51,0.779,72,1.084,111,3.002,129,3.512,147,2.48,148,2.733,216,2.51,355,5.784,398,3.99,442,4.739,470,1.426,562,5.427,622,1.687,2003,8.05,2004,8.05]],["t/1288",[14,4.559,33,2.383,51,0.779,72,1.084,111,3.002,129,3.512,147,2.48,148,2.733,216,2.51,398,3.99,442,4.739,470,1.426,622,1.687,2005,8.147,2006,6.569,2007,8.05,2008,8.05]],["t/1290",[14,3.833,33,1.825,51,0.883,61,2.871,72,0.83,112,1.795,147,2.586,148,2.094,194,3.202,216,1.922,328,4.825,398,3.056,401,6.209,442,4.941,470,1.092,622,1.292,771,4.261,820,4.505,837,3.63,1615,4.652,1988,5.291,2009,5.291,2010,5.032,2011,5.291,2012,9.368,2013,4.063,2014,7.676,2015,5.032,2016,5.291,2017,6.166,2018,5.639,2019,6.166,2020,5.639]],["t/1292",[14,4.383,20,0.71,33,1.367,37,1.545,39,4.229,50,0.512,51,0.894,72,1.018,95,1.016,131,1.491,132,1.244,147,2.651,148,0.951,167,2.651,177,0.983,194,2.398,216,1.44,220,1.437,253,1.389,256,2.033,311,3.878,327,1.181,398,3.388,401,5.561,442,3.469,470,1.21,484,1.373,491,1.889,548,1.737,622,1.432,746,1.023,771,3.191,820,3.374,837,2.719,1058,1.575,1370,5.388,1395,2.562,1615,3.484,1988,2.404,1989,2.404,2012,5.388,2013,3.043,2014,4.223,2015,3.769,2016,3.963,2018,2.562,2020,2.562,2021,5.056,2022,6.732,2023,2.404,2024,2.801,2025,2.801,2026,2.801,2027,2.801,2028,5.388,2029,2.801,2030,2.801,2031,5.892,2032,2.801,2033,3.963,2034,5.865,2035,2.801,2036,2.801,2037,2.801,2038,2.801,2039,4.618,2040,2.801,2041,5.892,2042,6.834,2043,2.801,2044,5.892,2045,2.801,2046,2.801,2047,2.801,2048,2.801,2049,4.618,2050,4.618,2051,2.801,2052,2.801]],["t/1294",[14,4.588,51,0.784,60,3.241,72,1.095,147,2.506,181,4.64,261,3.824,278,6.363,470,1.44,622,1.704,825,6.363,1306,6.637,2053,6.136,2054,8.133,2055,6.979,2056,8.133,2057,8.133]],["t/1296",[14,4.708,51,0.805,72,1.142,147,2.613,216,2.644,226,5.973,227,3.545,470,1.502,622,1.777,1717,6.018,2058,8.481,2059,8.481]],["t/1298",[14,5.127,50,1.792,51,0.765,72,1.052,147,2.407,181,4.457,233,4.757,470,1.383,519,3.872,622,1.637,1056,8.96,1615,5.894,2015,6.374,2060,7.143,2061,7.811,2062,7.143,2063,7.811]],["t/1300",[14,4.979,51,0.784,72,1.095,167,2.852,214,5.619,470,1.44,511,6.979,575,3.714,622,1.704,739,4.031,991,8.622,992,5.771,1371,6.363,1705,5.246,2064,8.133]],["t/1302",[14,4.314,51,0.908,67,3.977,72,0.993,104,1.681,177,2.586,216,2.299,435,2.488,470,1.306,622,1.545,908,5.972,911,6.369,975,5.77,984,6.328,992,6.703,993,6.328,2065,7.374,2066,7.374,2067,7.374]],["t/1304",[14,4.678,51,0.8,72,1.13,190,3.37,216,2.616,470,1.486,622,1.758,1163,4.862,2068,7.674,2069,5.798,2070,5.658,2071,7.201,2072,8.391,2073,8.391]],["t/1306",[14,4.708,48,2.88,51,0.805,72,1.142,216,2.644,355,4.914,441,5.361,470,1.502,622,1.777,2074,7.278,2075,8.481,2076,7.756,2077,8.481]],["t/1308",[14,4.708,48,2.88,51,0.805,72,1.142,139,6.399,216,2.644,355,4.914,470,1.502,622,1.777,2078,7.278,2079,8.481,2080,7.756,2081,8.481]],["t/1310",[14,4.678,51,0.863,72,1.13,110,1.542,147,3.547,233,5.11,470,1.486,622,1.758,1908,6.848,2082,8.391]],["t/1312",[14,4.719,48,3.17,51,0.807,60,4.118,72,0.975,194,3.759,216,2.257,233,4.409,470,1.282,622,1.517,771,5.002,820,5.288,837,4.261,1615,5.462,1911,6.62,2013,4.77,2015,5.907,2016,6.212,2083,7.239,2084,9.335,2085,7.239,2086,7.239,2087,7.239]],["t/1314",[14,4.42,48,2.601,51,0.828,60,3.052,61,3.567,72,1.032,175,3.465,216,2.388,327,3.229,345,5.994,398,3.797,413,5.293,470,1.357,622,1.605,1613,5.994,2088,11.147,2089,6.573,2090,7.66,2091,7.66]],["t/1316",[14,3.465,51,0.825,59,1.568,61,4.918,72,1.022,110,1.394,189,4.272,190,3.047,193,3.939,194,5.484,314,3.498,327,4.682,470,1.344,622,1.59,2092,7.586]],["t/1318",[14,3.567,37,2.131,51,0.836,59,1.597,61,4.562,72,1.052,110,1.436,189,3.469,190,3.137,193,4.056,194,5.087,314,3.602,470,1.383,622,1.637,2093,7.811]],["t/1320",[14,3.189,51,0.793,59,1.486,61,5.013,72,0.94,110,1.283,129,3.046,189,4.05,190,2.804,193,3.626,194,5.273,256,3.074,314,3.22,327,4.281,467,2.55,470,1.237,491,4.708,622,1.463,691,3.926,746,2.55,2094,6.983,2095,6.983,2096,5.269,2097,6.983]],["t/1322",[14,4.289,35,1.71,50,1.337,51,0.885,59,1.191,72,0.984,107,2.45,108,2.579,110,1.343,214,5.048,470,1.294,622,1.531,635,5.512,777,5.962,1705,4.712,1908,5.962,2098,7.306,2099,6.681,2100,7.306,2101,7.306,2102,7.306,2103,7.306,2104,7.306,2105,7.306,2106,6.681]],["t/1324",[13,2.47,14,0.249,19,1.83,33,0.447,50,0.192,51,0.966,59,0.089,83,0.617,84,0.257,95,0.548,120,0.855,147,0.721,148,0.794,149,2.794,177,0.53,185,0.56,193,0.283,194,0.283,216,0.17,222,2.169,225,0.672,228,0.427,243,0.427,244,1.874,254,0.399,256,0.854,274,1.061,300,0.662,314,0.252,362,0.387,364,0.412,382,0.267,384,0.387,386,0.445,398,2.102,401,0.316,405,0.743,417,0.531,441,0.955,461,0.399,467,0.199,506,9.335,562,0.706,565,1.391,575,0.478,583,0.855,622,0.219,637,0.589,641,0.899,642,0.79,659,0.287,672,0.338,698,0.338,706,0.589,727,0.558,729,0.298,739,0.519,749,0.332,759,0.387,765,0.345,778,1.451,866,0.79,910,1.104,946,0.445,1015,1.182,1049,0.427,1083,0.412,1163,0.316,1200,0.955,1247,0.377,1273,0.399,1289,0.427,1300,0.598,1330,0.79,1357,0.958,1374,0.338,1408,1.227,1426,3.285,1430,0.82,1513,0.69,1555,0.743,1613,0.427,1619,0.412,1627,0.298,1635,0.975,1652,0.499,1663,0.468,1664,0.345,1705,2.562,1757,0.468,1846,0.427,1993,0.468,2006,0.855,2009,0.468,2010,0.855,2011,0.468,2013,0.359,2023,0.468,2069,0.724,2099,0.499,2107,1.418,2108,0.546,2109,9.657,2110,0.546,2111,0.546,2112,0.546,2113,0.546,2114,0.546,2115,0.546,2116,0.546,2117,0.546,2118,1.048,2119,0.546,2120,0.546,2121,0.546,2122,0.546,2123,0.546,2124,0.546,2125,0.546,2126,0.546,2127,0.546,2128,0.546,2129,0.468,2130,0.546,2131,0.546,2132,0.958,2133,0.546,2134,0.546,2135,0.765,2136,0.546,2137,0.546,2138,0.546,2139,1.048,2140,0.546,2141,0.546,2142,0.546,2143,0.546,2144,0.546,2145,2.212,2146,1.923,2147,0.546,2148,0.546,2149,0.546,2150,0.546,2151,0.546,2152,0.546,2153,0.546,2154,0.546,2155,0.546,2156,0.546,2157,0.546,2158,0.546,2159,0.546,2160,0.546,2161,0.546,2162,0.546,2163,0.546,2164,0.546,2165,0.546,2166,0.546,2167,0.546,2168,0.546,2169,0.546,2170,0.546,2171,0.546,2172,0.546,2173,0.546,2174,0.546,2175,0.546,2176,0.546,2177,0.546,2178,0.546,2179,0.546,2180,0.546,2181,0.546,2182,0.546,2183,1.511,2184,1.048,2185,0.546,2186,0.546,2187,3.686,2188,0.546,2189,0.546,2190,0.546,2191,1.511,2192,0.546,2193,0.546,2194,0.546,2195,0.546,2196,0.546,2197,0.546,2198,0.546,2199,0.546,2200,0.546,2201,0.468,2202,0.546,2203,0.546,2204,0.427,2205,0.546,2206,0.546,2207,0.546,2208,0.546,2209,0.546,2210,0.546,2211,1.511,2212,0.546,2213,0.546,2214,0.546,2215,0.546,2216,0.546,2217,0.546,2218,0.546,2219,0.546,2220,0.546,2221,0.546,2222,1.048,2223,0.546,2224,1.94,2225,1.048,2226,0.546,2227,0.546,2228,1.048,2229,0.546,2230,0.546,2231,1.048,2232,0.546,2233,0.427,2234,1.048,2235,0.546,2236,0.546,2237,1.048,2238,0.546,2239,0.546,2240,1.048,2241,0.546,2242,0.546,2243,1.048,2244,0.546,2245,0.499,2246,1.048,2247,0.546,2248,0.546,2249,1.048,2250,0.546,2251,0.546,2252,1.048,2253,0.546,2254,0.546,2255,1.048,2256,0.546,2257,0.546,2258,1.048,2259,0.546,2260,0.499,2261,1.048,2262,0.546,2263,0.546,2264,1.048,2265,0.546,2266,0.499,2267,1.048,2268,0.546,2269,0.546,2270,0.958,2271,0.546,2272,0.546,2273,1.048,2274,0.546,2275,0.546,2276,1.048,2277,1.048,2278,0.546,2279,0.546,2280,1.048,2281,1.048,2282,0.546,2283,0.546,2284,1.048,2285,0.546,2286,0.546,2287,1.048,2288,0.546,2289,0.546,2290,1.048,2291,0.546,2292,0.546,2293,1.048,2294,1.048,2295,0.546,2296,1.048,2297,0.546,2298,0.546,2299,3.382,2300,0.546,2301,0.499,2302,0.546,2303,0.546,2304,0.546,2305,0.546,2306,1.048,2307,0.546,2308,0.399,2309,1.048,2310,0.546,2311,0.546,2312,1.048,2313,0.546,2314,0.546,2315,1.048,2316,0.546,2317,0.499,2318,1.048,2319,0.546,2320,0.546,2321,1.048,2322,0.546,2323,0.546,2324,1.048,2325,0.546,2326,0.546,2327,1.048,2328,1.048,2329,0.546,2330,0.546,2331,1.048,2332,0.546,2333,0.546,2334,1.048,2335,0.546,2336,0.546,2337,1.048,2338,1.048,2339,0.546,2340,0.546,2341,0.546,2342,0.546,2343,0.546,2344,0.546,2345,0.546,2346,0.546,2347,0.546,2348,0.546,2349,0.546,2350,0.546,2351,0.546,2352,0.546,2353,0.546,2354,0.546,2355,0.546,2356,0.546,2357,0.546,2358,0.546,2359,0.546,2360,0.546,2361,0.546,2362,0.546,2363,0.546,2364,0.546,2365,0.546,2366,0.546,2367,0.546,2368,0.546,2369,0.546,2370,0.546,2371,0.546,2372,0.546,2373,0.546,2374,0.546,2375,0.546,2376,0.546,2377,0.546,2378,0.546,2379,0.546,2380,0.546,2381,0.546,2382,0.546,2383,0.546,2384,0.546,2385,0.546,2386,0.546,2387,0.546,2388,0.546,2389,0.546,2390,0.546,2391,0.546,2392,0.546,2393,0.546,2394,0.546,2395,0.546,2396,0.546,2397,0.546,2398,0.546,2399,0.546,2400,0.546,2401,0.546,2402,0.546,2403,0.546,2404,0.546,2405,0.546,2406,0.546,2407,0.546,2408,0.546,2409,0.546,2410,0.546,2411,0.546,2412,0.546,2413,0.546,2414,0.546,2415,0.546,2416,0.546,2417,0.546,2418,0.546,2419,0.546,2420,0.546,2421,0.546,2422,0.546,2423,0.765,2424,0.546,2425,0.546,2426,0.546,2427,0.546,2428,0.546,2429,0.445,2430,0.546,2431,0.546,2432,0.546,2433,0.546,2434,0.499,2435,0.546,2436,1.048,2437,0.546,2438,0.546,2439,1.048,2440,0.546,2441,0.546,2442,0.445,2443,0.546,2444,0.546,2445,0.546,2446,1.048,2447,0.546,2448,0.546,2449,0.427,2450,0.546,2451,0.546,2452,0.958,2453,0.546,2454,0.445,2455,0.546,2456,0.546,2457,0.546,2458,0.546,2459,0.499,2460,0.546,2461,0.546,2462,0.499,2463,0.546,2464,0.546,2465,0.468,2466,0.546,2467,0.546,2468,0.546,2469,0.546,2470,0.546,2471,0.546,2472,0.546,2473,0.546,2474,0.546,2475,0.546,2476,0.546,2477,0.399,2478,0.546,2479,0.546,2480,0.546,2481,0.546,2482,0.546,2483,0.546,2484,0.499,2485,0.855,2486,0.387,2487,0.546,2488,0.546,2489,0.546,2490,0.546,2491,0.546,2492,0.468,2493,0.546,2494,0.546,2495,0.546,2496,0.546,2497,0.82,2498,0.546,2499,0.546,2500,0.546,2501,0.546,2502,0.546,2503,0.546,2504,0.499,2505,0.546,2506,0.546,2507,0.546,2508,0.499,2509,0.546,2510,0.546,2511,0.546,2512,0.546,2513,0.546,2514,0.499,2515,0.546,2516,0.546,2517,0.546,2518,0.546,2519,0.546,2520,0.546,2521,0.546,2522,0.546,2523,0.546,2524,0.546,2525,0.546,2526,0.499,2527,0.546,2528,0.546,2529,1.048,2530,0.546,2531,0.546,2532,0.546,2533,0.546,2534,0.546,2535,0.546,2536,0.546,2537,0.546,2538,0.546,2539,0.546,2540,0.546,2541,0.546,2542,0.546,2543,0.546,2544,0.468,2545,0.546,2546,0.546,2547,0.546,2548,0.546,2549,1.048,2550,0.546,2551,0.546,2552,0.546,2553,0.546,2554,0.546,2555,0.546,2556,0.546,2557,0.468,2558,0.546,2559,2.339,2560,0.546,2561,0.546,2562,0.546,2563,0.546,2564,0.546,2565,0.546,2566,1.048,2567,0.546,2568,0.546,2569,0.546,2570,0.546,2571,0.546,2572,0.412,2573,0.546,2574,0.546,2575,0.546,2576,0.546,2577,0.546,2578,0.546,2579,0.546,2580,0.546,2581,0.546,2582,0.546,2583,0.546,2584,0.546,2585,0.499,2586,0.499,2587,0.546,2588,0.546,2589,0.546,2590,0.546,2591,0.546,2592,0.546,2593,0.546,2594,0.499,2595,0.445]],["t/1327",[35,1.776,51,0.867,72,1.022,73,2.706,74,3.047,95,2.751,104,1.879,167,2.661,175,4.352,225,2.626,233,5.858,429,3.095,435,3.246,470,1.344,622,1.59,623,3.369]],["t/1329",[3,0.823,20,0.798,21,0.35,25,0.877,32,0.917,33,0.932,34,0.595,35,1.355,37,1.035,39,1.181,40,0.707,48,0.607,49,0.991,50,1.168,51,0.556,54,0.751,56,0.632,59,0.291,60,1.68,61,1.466,73,1.396,81,0.183,88,1.217,93,0.619,95,1.346,100,1.033,104,0.447,105,0.411,106,0.363,107,2.583,108,0.631,110,1.064,111,2.381,112,0.916,114,1.746,121,0.632,129,0.418,130,0.394,131,0.952,132,0.426,133,0.751,139,0.724,145,0.547,147,1.784,148,2.257,149,0.632,167,1.302,175,0.809,177,0.336,178,1.534,179,1.053,181,3.793,183,2.667,185,1.166,190,1.264,213,0.619,214,0.663,216,2.072,220,1.288,222,2.634,225,1.09,226,1.036,227,1.05,233,0.584,238,1.503,239,0.418,248,1.503,250,0.663,253,0.475,254,1.834,256,1.105,271,0.306,274,0.524,278,0.751,309,0.517,311,0.492,312,1.728,314,0.824,315,0.663,317,0.928,319,0.701,328,0.751,330,0.663,346,1.77,355,1.036,359,1.861,366,0.681,380,0.475,381,1.693,394,0.606,398,1.245,401,1.036,416,1.053,417,1.273,429,0.729,435,0.324,441,1.99,442,1.478,469,0.415,470,0.317,484,0.47,509,0.632,515,1.349,536,0.701,548,0.595,560,1.48,565,2.163,575,1.437,584,0.823,590,1.655,601,0.584,603,2.049,607,0.619,613,3.181,617,0.504,619,0.547,628,0.394,635,0.724,637,0.539,642,0.724,684,1.269,688,0.858,689,0.511,690,0.751,691,1.412,699,0.511,702,0.524,706,2.625,730,0.511,731,0.867,739,0.475,741,0.492,748,0.539,752,0.823,769,0.574,772,2.503,773,0.574,809,0.823,818,1.349,819,0.751,825,0.751,837,0.565,842,0.663,843,0.539,853,0.751,859,0.783,867,2.261,877,2.233,886,1.399,892,1.349,893,1.306,904,2.261,908,0.606,944,2.394,946,0.783,999,1.782,1012,0.877,1013,1.205,1031,0.783,1035,1.965,1058,0.539,1091,1.412,1094,1.534,1096,1.349,1111,0.524,1119,0.823,1120,1.895,1121,0.783,1143,1.635,1150,1.349,1243,0.823,1289,0.751,1309,0.606,1312,1.153,1336,0.877,1338,1.534,1374,0.595,1390,0.724,1401,1.349,1405,1.635,1408,1.13,1409,0.877,1426,2.406,1430,0.751,1475,0.681,1609,0.823,1614,0.823,1621,1.153,1646,0.823,1653,0.877,1694,1.153,1698,0.606,1709,0.751,1717,0.681,1753,0.751,1993,0.823,2005,0.783,2022,1.399,2074,0.823,2076,0.877,2078,0.823,2080,0.877,2089,0.823,2260,0.877,2423,1.834,2434,1.635,2449,2.463,2462,1.635,2504,0.877,2508,1.635,2544,0.823,2572,0.724,2596,2.878,2597,1.788,2598,1.788,2599,1.788,2600,0.959,2601,0.959,2602,0.959,2603,0.959,2604,0.959,2605,2.511,2606,4.669,2607,0.959,2608,3.148,2609,0.959,2610,1.459,2611,0.959,2612,0.959,2613,0.959,2614,0.959,2615,0.959,2616,0.959,2617,1.635,2618,0.959,2619,0.959,2620,0.959,2621,0.959,2622,0.877,2623,0.959,2624,0.823,2625,0.959,2626,0.959,2627,0.959,2628,0.959,2629,1.459,2630,0.877,2631,0.959,2632,0.959,2633,0.783,2634,0.959,2635,3.411,2636,3.181,2637,0.823,2638,0.959,2639,0.959,2640,0.877,2641,0.959,2642,1.788,2643,2.296,2644,0.823,2645,1.788,2646,2.878,2647,2.511,2648,2.155,2649,1.635,2650,2.296,2651,2.511,2652,0.959,2653,0.959,2654,0.959,2655,0.959,2656,0.823,2657,0.959,2658,0.823,2659,1.788,2660,0.823,2661,0.959,2662,1.635,2663,1.788,2664,1.788,2665,2.296,2666,0.877,2667,0.877,2668,1.534,2669,0.959,2670,1.788,2671,1.788,2672,0.959,2673,1.788,2674,0.959,2675,0.959,2676,0.959,2677,1.635,2678,0.959,2679,0.877,2680,0.959,2681,0.959,2682,1.635,2683,0.959,2684,0.959,2685,0.823,2686,0.823,2687,1.635,2688,1.635,2689,0.877,2690,0.823,2691,0.877,2692,1.788,2693,1.788,2694,1.788,2695,0.959,2696,0.959,2697,0.823,2698,0.959,2699,1.788,2700,0.959,2701,0.959,2702,0.959,2703,0.959,2704,0.877,2705,0.681,2706,0.877,2707,0.823,2708,0.877,2709,0.877,2710,0.959,2711,0.959,2712,0.959,2713,0.959]],["t/1331",[37,1.44,48,2.576,51,0.751,59,1.722,72,1.022,80,1.59,81,1.447,110,1.394,159,2.324,175,3.432,190,3.047,225,2.626,233,4.62,315,7.298,435,2.56,470,1.344,622,1.59,2714,7.586,2715,7.586,2716,7.586,2717,7.586]],["t/1333",[51,0.934,56,4.602,72,0.94,73,1.789,107,2.341,111,2.604,121,7.095,470,1.237,617,3.671,622,1.463,1111,3.817,1660,5.699,2596,9.287,2679,6.386,2718,9.12,2719,9.12,2720,6.983,2721,9.12,2722,6.386]],["t/1335",[20,2.273,88,4.12,147,2.762,366,6.36,367,7.013,1061,8.196,1200,5.665,2705,6.36,2723,8.962]],["t/1337",[20,1.39,34,3.4,51,0.873,59,0.893,73,1.405,81,1.476,105,4.943,107,1.838,129,2.392,167,1.923,622,1.149,1496,5.837,1820,3.89,1858,6.639,2724,5.482,2725,5.482,2726,8.698,2727,5.482,2728,5.482,2729,9.147,2730,5.482,2731,5.482,2732,7.737,2733,5.482,2734,5.482,2735,5.482,2736,5.482,2737,5.482,2738,5.482,2739,4.704,2740,5.482,2741,5.482,2742,5.482,2743,5.482,2744,5.482,2745,5.482]],["t/1340",[20,1.505,23,1.872,51,0.949,64,1.61,65,2.906,66,1.718,72,1.26,73,2.095,74,2.383,105,3.505,110,1.091,159,1.818,175,2.685,260,4.644,337,2.763,353,3.552,741,3.045,748,3.337,1109,2.942,1200,3.752,1484,4.843,1495,4.478,1496,4.478,1892,4.478,2726,6.673,2729,7.017,2746,4.644,2747,5.935,2748,5.935,2749,5.935,2750,5.935,2751,5.935,2752,5.935,2753,5.935]],["t/1342",[3,2.219,20,1.589,23,1.976,51,0.946,64,1.699,65,3.015,66,1.813,72,1.142,73,2.174,74,2.516,105,2.685,110,1.151,175,2.834,185,2.319,261,2.946,353,3.749,741,3.214,748,3.522,1200,3.96,1484,5.112,1495,6.401,1496,4.726,1892,4.726,2726,6.923,2746,4.901,2754,6.264,2755,6.264,2756,6.264,2757,6.264,2758,6.264]],["t/1344",[23,2.128,51,0.944,59,1.099,64,1.83,65,3.168,66,1.953,72,1.2,81,1.287,105,3.822,110,1.24,112,1.964,336,4.037,337,3.141,741,3.46,748,3.792,1200,4.264,1892,5.089,2726,5.504,2729,5.788,2746,5.278,2759,6.745,2760,6.745,2761,6.745,2762,6.745,2763,5.788,2764,6.168]],["t/1346",[23,2.263,51,0.929,59,1.169,64,1.946,65,3.298,66,2.077,72,1.25,73,1.838,74,2.881,81,1.368,110,1.318,336,4.293,337,3.34,741,3.68,748,4.033,1200,4.534,1206,6.156,1892,5.412,2746,5.613,2763,6.156,2764,6.56,2765,6.56,2766,6.56]],["t/1348",[23,1.992,51,0.952,59,1.029,64,1.713,65,3.031,66,1.828,72,1.149,73,1.618,74,2.536,81,1.204,110,1.568,112,1.838,183,2.186,189,4.29,314,2.911,741,3.239,748,3.55,1200,3.991,1892,4.764,2746,4.94,2763,5.418,2765,5.774,2766,5.774,2767,6.314,2768,6.314,2769,6.314,2770,6.314,2771,6.314,2772,6.314]],["t/1350",[3,2.105,20,2.041,48,2.733,58,5.562,60,3.208,83,5.877,88,3.112,106,3.045,132,3.575,185,2.981,253,3.99,359,4.035,361,5.712,362,5.712,363,6.074,503,8.147,765,6.311]],["t/1352",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1354",[3,1.237,20,1.764,23,1.491,37,0.898,48,1.605,50,0.865,51,0.949,58,3.267,59,0.771,62,4.057,64,1.283,66,2.013,73,1.211,80,0.991,81,0.902,84,4.277,104,1.237,107,1.585,110,1.672,111,2.593,132,2.1,166,4.396,183,1.637,356,2.201,397,2.698,405,3.355,429,3.365,432,4.571,433,5.32,436,6.223,559,1.692,624,2.37,625,2.318,627,1.727,628,1.944,839,7.543,1399,3.567,1539,4.324,2773,4.728,2774,6.954,2775,4.057,2776,4.728,2777,4.057,2778,4.728,2779,4.057,2780,4.728]],["t/1356",[3,1.465,33,1.053,35,2.301,37,1.621,50,0.651,51,0.944,58,5.426,60,2.231,61,1.657,80,0.745,81,0.679,83,2.094,84,2.633,93,2.295,104,1.232,105,1.525,106,2.118,107,1.877,108,1.977,109,1.625,110,1.273,111,2.088,112,2.016,130,3.73,148,1.208,166,3.54,174,1.945,177,1.964,183,1.232,191,1.87,225,3.139,253,1.764,317,1.847,358,2.684,362,2.525,393,2.303,405,3.973,425,2.784,429,1.452,454,4.076,455,4.012,565,1.825,583,2.903,607,3.612,746,1.299,765,4.964,1166,2.167,1269,3.053,1325,2.903,1374,2.206,1527,2.903,1984,3.254,2010,2.903,2775,6.739,2777,3.053,2779,3.053,2781,3.053,2782,2.525,2783,3.558,2784,2.684,2785,3.558,2786,3.558]],["t/1358",[51,0.784,58,5.619,84,3.824,104,1.447,106,3.076,112,3.174,166,5.141,405,5.771,425,6.363,454,4.788,455,4.712,467,2.97,750,3.612,2775,6.979,2777,6.979,2779,6.979]],["t/1360",[3,2.516,20,2.151,33,1.854,50,1.146,55,6.198,60,3.834,61,2.917,110,1.151,147,1.93,193,3.252,363,4.726,366,4.445,367,4.901,393,2.576,398,3.105,414,5.112,435,2.113,529,7.758,672,7.263,681,4.576,889,4.328,1188,5.112,1272,5.112,1705,5.472,2572,6.401,2781,5.375,2787,6.264,2788,4.901,2789,5.112,2790,6.264,2791,6.264]],["t/1362",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1364",[3,1.244,20,1.771,23,1.5,35,1.113,37,0.903,48,2.372,50,0.87,51,0.934,59,0.775,64,1.29,66,2.022,67,2.565,73,1.219,80,1.911,81,1.74,104,1.243,106,1.799,107,1.595,110,1.676,111,2.605,159,1.457,177,1.668,197,3.722,227,1.988,230,2.307,356,2.215,382,3.424,397,2.714,417,4.197,559,1.702,624,2.384,625,2.332,627,2.551,628,1.956,675,6.387,1030,3.375,2792,4.756,2793,4.756,2794,4.756,2795,3.375,2796,3.722,2797,4.082,2798,4.756,2799,4.756,2800,4.756,2801,4.756,2802,4.756,2803,3.134,2804,4.082,2805,4.756,2806,4.756,2807,4.756]],["t/1366",[3,1.989,33,0.838,35,2.36,37,1.306,48,1.582,49,3.29,50,0.852,51,0.947,53,2.945,60,2.366,61,1.318,80,0.976,81,0.889,88,1.095,95,2.153,104,1.224,106,2.245,107,1.99,108,1,109,1.293,110,1.091,111,1.737,112,1.356,121,1.866,130,1.916,148,2.016,175,1.281,177,2.413,181,1.616,183,1.613,185,1.048,193,1.47,216,0.883,225,2.632,227,1.948,239,1.235,248,1.146,317,1.47,327,1.194,346,0.987,363,2.136,382,3.728,387,2.284,393,3.127,413,1.956,417,1.436,559,1.013,565,3.045,628,1.164,672,5.361,679,0.974,693,2.069,698,1.756,715,1.79,746,1.034,773,1.695,835,1.258,847,1.419,877,3.306,1426,1.616,1498,2.589,2069,1.956,2782,2.009,2789,2.311,2795,2.009,2796,3.646,2797,2.43,2803,1.866,2804,2.43,2808,2.589,2809,4.261,2810,2.589,2811,2.831,2812,2.216,2813,2.216,2814,2.216,2815,2.43,2816,2.589,2817,2.831,2818,2.589,2819,2.831,2820,2.589,2821,2.589,2822,2.589,2823,2.589,2824,2.43]],["t/1368",[37,1.326,51,0.872,80,1.463,81,1.332,95,2.533,104,1.243,106,2.642,110,1.283,112,2.957,183,3.157,382,3.424,387,3.424,467,2.55,672,4.331,679,2.402,750,3.101,835,3.101,1426,3.984,2795,4.955,2796,5.464,2797,5.993,2803,4.602,2804,5.993,2809,6.386,2816,6.386,2821,6.386,2823,6.386,2824,5.993]],["t/1370",[3,2.242,4,6.709,20,2.174,50,1.568,60,3.417,148,2.911,149,5.65,330,7.711,441,5.42,2825,7.357,2826,8.573,2827,8.573]],["t/1372",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1374",[3,2.15,20,2.084,23,1.886,35,1.4,48,2.03,50,1.094,51,0.933,64,1.622,66,2.38,73,1.532,80,1.253,81,1.141,104,1.462,106,2.262,107,2.005,109,2.731,110,1.099,248,2.42,319,6.004,356,2.784,397,3.412,559,2.139,624,2.997,625,2.932,627,3.001,628,2.459,835,3.65,1076,3.362,2789,4.88,2828,5.98,2829,5.98,2830,8.219,2831,8.219,2832,5.98]],["t/1376",[3,2.184,33,1.811,35,1.955,51,0.943,80,1.282,81,1.167,104,1.691,106,3.158,107,2.051,108,2.16,109,2.794,110,1.125,111,2.282,112,1.781,130,3.434,190,2.457,225,2.89,231,2.849,319,6.1,330,4.228,387,3,746,2.234,835,3.708,1660,4.993,2833,6.118,2834,7.165,2835,5.595,2836,5.595,2837,5.595]],["t/1378",[51,0.838,104,1.613,106,3.429,112,2.639,319,6.622,467,3.31,750,4.026,2834,7.779]],["t/1380",[51,0.945,231,3.826,319,6.003,330,5.678,387,4.029,835,4.491,2107,6.003,2834,7.051,2835,7.514,2836,7.514,2837,7.514]],["t/1382",[3,2.318,20,2.247,50,1.621,181,5.056,225,3.068,274,4.844,461,6.474,682,6.288,855,7.232,2485,7.232,2838,7.605]],["t/1384",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1386",[3,1.252,20,1.779,23,1.51,33,1.417,35,1.12,37,0.909,48,1.625,50,1.52,51,0.859,60,1.907,64,1.298,66,2.031,73,1.226,104,1.248,107,1.604,108,1.689,110,0.879,147,1.474,148,1.625,149,4.623,216,2.187,223,3.306,244,2.652,274,5,356,2.228,397,2.73,398,2.372,442,2.817,470,1.243,471,3.496,483,2.73,484,2.346,559,1.712,565,3.599,624,2.399,625,2.346,627,2.562,628,1.968,875,3.496,1273,3.496,1658,4.73,1705,3.087,2013,4.623,2838,6.02,2839,4.785,2840,7.016,2841,7.016,2842,6.02,2843,4.785,2844,4.785,2845,4.106,2846,6.02,2847,3.744,2848,4.376,2849,4.376,2850,4.376,2851,3.905,2852,4.376,2853,4.785]],["t/1388",[3,1.237,33,0.854,35,2.129,37,1.458,50,1.405,51,0.944,60,3.06,80,0.604,81,0.55,95,1.046,104,1.07,106,1.789,107,2.016,108,1.669,109,1.317,110,0.869,111,2.242,112,1.377,130,3.583,147,2.902,148,2.362,183,0.998,190,1.158,214,3.267,216,1.474,223,1.992,225,3.149,239,1.258,244,3.854,274,3.802,317,1.497,346,2.874,387,1.414,461,3.455,471,2.106,484,1.414,500,3.859,565,3.084,617,1.516,624,1.445,672,1.788,746,1.053,765,2.989,888,1.697,904,3.661,1273,2.106,1705,1.86,1722,3.355,2013,1.9,2477,2.106,2782,4.266,2838,2.474,2842,5.159,2845,4.058,2846,4.058,2848,2.637,2849,2.637,2850,2.637,2851,2.353,2852,2.637,2854,4.324,2855,6.955,2856,2.883,2857,4.324,2858,2.883,2859,2.474,2860,4.324,2861,2.883,2862,2.256]],["t/1390",[51,0.923,104,1.312,106,2.789,112,2.75,183,2.553,387,3.615,467,2.693,750,3.275,1722,5.233,2824,6.328,2842,6.328,2845,6.328,2846,6.328,2854,6.743,2857,6.743,2860,6.743,2863,7.374,2864,6.743,2865,7.374,2866,7.374,2867,7.374,2868,7.374]],["t/1392",[3,2.406,20,1.228,35,1.134,37,0.92,44,3.329,48,1.645,49,3.923,50,1.295,59,0.789,64,1.314,100,1.992,104,1.259,110,0.89,129,2.113,130,1.992,132,2.151,146,3.347,147,2.577,175,2.191,213,3.124,216,2.608,224,3.437,225,1.677,256,2.132,312,3.296,317,2.515,346,1.688,357,6.117,361,3.437,382,2.375,392,3.437,429,1.976,470,0.858,484,2.375,637,5.173,679,1.666,682,3.437,715,3.062,998,3.266,1078,4.475,1163,2.806,1269,4.157,1374,3.004,1462,4.157,1475,3.437,1846,3.79,2013,3.192,2429,3.953,2485,3.953,2544,4.157,2869,7.713,2870,4.844,2871,4.43,2872,4.844,2873,4.844,2874,4.844,2875,5.341]],["t/1394",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1396",[3,1.529,20,2.052,23,1.844,35,1.369,37,1.11,48,1.985,50,1.07,51,0.901,59,0.953,64,1.586,66,2.343,73,1.498,80,1.225,81,1.115,104,1.44,216,1.823,356,2.722,357,3.388,382,2.867,397,3.336,484,2.867,518,4.149,559,2.092,624,2.931,625,2.867,627,2.955,628,2.405,835,2.597,2803,3.853,2851,4.772,2869,4.412,2875,4.412,2876,5.847,2877,5.847,2878,5.018,2879,5.456,2880,5.347,2881,4.575,2882,4.772,2883,4.412,2884,4.271,2885,4.575,2886,6.945]],["t/1398",[3,1.399,33,0.724,35,2.302,37,1.679,40,0.967,49,1.356,50,0.978,51,0.949,59,0.399,72,0.329,80,0.864,81,0.787,104,0.951,106,1.56,107,2.105,108,0.864,109,1.117,110,0.758,111,1.538,112,0.712,130,1.696,147,1.271,167,0.858,175,1.107,177,1.446,183,1.428,185,0.906,214,1.69,216,1.667,220,1.255,225,3.404,227,1.023,238,3.201,346,2.818,357,4.686,382,3.078,392,1.736,393,2.883,401,1.417,435,1.804,518,2.927,614,1.914,628,1.006,632,2.558,637,4.777,679,0.841,694,1.612,727,1.302,746,0.893,835,1.086,910,1.787,925,1.996,1344,2.099,1717,1.736,2486,1.736,2782,3.794,2803,2.718,2813,1.914,2814,1.914,2847,1.914,2851,1.996,2869,6.898,2875,1.846,2879,4.233,2880,2.237,2881,1.914,2882,1.996,2883,1.846,2884,1.787,2885,1.914,2886,6.523,2887,2.446,2888,2.099,2889,2.099,2890,2.237,2891,2.237,2892,2.099,2893,3.112,2894,2.237,2895,2.237,2896,2.237,2897,2.099,2898,1.996,2899,2.237,2900,2.237,2901,2.237,2902,2.099]],["t/1400",[51,0.876,104,1.39,148,2.652,381,5.266,382,3.83,467,2.852,750,3.469,835,3.469,2658,6.703,2803,5.147,2875,5.894,2879,5.266,2881,6.112,2882,6.374,2883,5.894,2884,5.706,2885,6.112,2886,6.703,2903,7.143,2904,7.811]],["t/1402",[51,0.896,357,5.313,1426,5.232,2107,6.699,2869,6.919,2903,8.386]],["t/1404",[50,1.586,51,0.875,64,2.352,679,4.097,1044,6.782,1045,7.073,2878,7.438]],["t/1406",[3,1.917,20,0.987,35,0.911,50,0.712,51,0.469,55,2.842,88,1.504,95,2.177,100,2.469,104,1.068,147,3.203,148,1.321,179,2.29,181,3.425,185,2.715,220,3.761,224,4.26,225,2.538,239,2.619,256,4.317,309,2.098,317,3.806,380,1.928,387,2.943,442,2.29,506,3.339,521,2.761,559,1.392,565,3.08,575,2.742,619,2.22,730,2.071,731,1.887,806,2.761,835,1.728,853,3.044,855,3.175,875,2.842,893,2.842,908,4.634,920,2.935,996,3.044,1110,3.175,1123,2.254,1163,2.254,1273,2.842,1324,3.558,1620,2.842,1627,2.127,1705,2.509,1846,3.044,2146,2.761,2423,2.842,2442,7.68,2452,3.558,2640,3.558,2643,3.558,2646,3.558,2660,3.339,2813,3.044,2905,3.89,2906,7.331,2907,3.89,2908,3.89,2909,3.89,2910,3.89,2911,3.89,2912,3.89,2913,3.339,2914,3.89,2915,3.89,2916,3.89,2917,3.89,2918,3.89,2919,3.558,2920,3.89,2921,3.89,2922,3.89,2923,3.89,2924,3.89,2925,3.339,2926,3.339]],["t/1408",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1410",[3,1.859,20,2.34,23,2.242,35,1.664,48,2.414,50,1.3,51,0.915,59,1.159,64,1.929,66,2.671,73,1.821,104,1.642,356,3.31,397,4.056,559,2.543,624,3.563,625,3.485,627,3.369,628,2.924,2927,7.109,2928,7.109,2929,7.109,2930,6.1]],["t/1412",[3,1.787,33,1.367,35,2.105,51,0.913,59,1.326,80,1.705,81,1.552,93,2.978,95,1.675,104,1.447,106,2.585,107,2.728,108,2.872,109,2.109,110,1.653,111,1.722,112,1.344,130,2.81,147,3.29,148,1.568,185,1.71,214,4.722,224,3.277,225,3.113,256,3.957,565,3.506,601,2.812,746,1.686,835,2.051,1854,3.963,2442,7.338,2660,6.981,2926,5.864,2930,3.963,2931,6.249,2932,4.618]],["t/1414",[51,0.931,59,1.248,80,2.028,81,1.846,104,1.363,107,3.245,110,1.779,467,2.797,750,3.402,2926,6.573,2930,6.573,2931,7.005,2933,7.66,2934,7.005,2935,7.005]],["t/1416",[51,0.919,256,3.945,835,3.98,2107,6.547,2442,7.314,2934,8.196,2936,8.962]],["t/1418",[3,2.768,20,2.247,167,3.108,346,3.088,484,4.345,605,8.857,637,5.951]],["t/1420",[3,2.172,37,1.932,51,0.794,72,1.37,104,1.477,105,3.56,110,1.526,623,3.688,1312,5.356,2633,6.776,2862,6.497,2937,8.303,2938,7.125,2939,8.303]],["t/1422",[3,1.154,20,1.675,23,1.392,37,1.254,50,1.208,51,0.919,59,1.077,64,1.197,66,1.912,73,1.13,80,1.384,81,1.26,104,0.785,110,1.214,112,1.284,131,2.348,132,1.959,159,1.351,167,1.547,175,1.996,177,3.302,216,1.375,223,3.048,231,2.054,239,2.882,253,2.187,254,3.223,346,2.301,356,2.054,435,2.672,469,1.908,483,3.769,537,4.687,559,1.578,605,6.196,624,2.211,625,2.163,627,1.611,628,1.814,637,3.714,730,3.516,1312,4.261,1399,3.328,1401,3.328,1664,2.789,1670,4.034,1855,2.907,1913,3.786,2633,5.39,2938,5.668,2940,4.411,2941,4.034,2942,4.034,2943,4.034,2944,6.04,2945,4.034,2946,4.034,2947,4.411,2948,4.034]],["t/1424",[3,1.706,33,1.284,35,2.041,37,1.864,48,2.215,49,2.405,50,0.794,51,0.931,59,1.063,80,0.909,81,0.828,104,1.395,106,2.468,107,1.455,108,2.768,109,1.981,110,0.797,111,1.618,112,1.263,130,2.683,139,3.274,174,2.372,175,1.963,177,3.573,225,3.018,256,1.91,327,1.829,401,2.514,414,3.541,441,4.956,483,2.476,504,3.395,605,5.105,637,4.902,746,1.584,1389,3.541,2633,5.324,2875,3.274,2938,3.723,2941,3.968,2942,3.968,2943,7.169,2944,3.968,2949,3.723,2950,3.968,2951,4.339,2952,4.339,2953,3.968,2954,3.968,2955,4.339]],["t/1426",[51,0.867,104,1.509,106,3.208,112,2.469,177,2.975,467,3.097,504,6.637,750,3.767,2949,7.278,2950,7.756,2953,7.756,2954,7.756,2956,8.481]],["t/1428",[3,1.734,37,1.259,48,2.252,50,1.213,51,0.773,104,1.18,109,3.029,111,2.473,167,2.326,177,2.326,231,3.088,259,5.691,470,1.175,504,6.897,537,4.706,637,5.566,1150,5.004,1309,4.192,1312,4.278,1470,5.691,2622,6.065,2869,6.651,2875,5.004,2878,5.691,2879,4.471,2881,5.189,2897,5.691,2945,6.065,2946,6.065,2949,5.691,2957,6.065,2958,6.632,2959,6.632,2960,6.632,2961,6.632]],["t/1430",[3,2.371,20,2.299,50,1.658,225,3.138,682,6.432,842,6.264,843,5.096,2477,6.622,2962,8.29]],["t/1432",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1434",[3,2.219,20,2.151,23,1.976,35,1.466,40,2.477,48,2.127,50,1.552,51,0.902,64,1.699,66,2.456,73,1.605,104,1.509,132,2.782,356,2.917,397,3.574,484,3.071,559,2.241,619,3.574,624,3.14,625,3.071,627,3.098,628,2.576,2962,5.728,2963,6.264,2964,8.484,2965,8.484,2966,6.264,2967,5.728,2968,6.264,2969,6.264,2970,6.264,2971,5.728,2972,6.264]],["t/1436",[51,0.912,60,3.492,185,3.245,467,3.2,2973,8.764,2974,8.764,2975,8.764,2976,8.764,2977,8.764]],["t/1438",[3,1.984,33,2.246,51,0.895,104,1.879,130,3.12,166,6.081,746,2.77,842,6.647,843,5.408,847,4.822,2967,8.797,2971,8.797,2978,8.797]],["t/1440",[104,1.776]],["t/1442",[3,2.172,20,2.106,60,3.309,192,5.356,356,3.866,398,4.116,575,3.792,619,4.738,672,5.15,688,3.985,809,7.125,1374,5.15,2449,6.497,2979,8.303,2980,7.125,2981,8.303,2982,8.303]],["t/1444",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1446",[3,1.444,20,1.972,23,1.741,35,1.292,48,1.874,50,1.01,51,0.927,59,1.267,60,3.098,64,1.498,66,2.251,73,1.414,80,1.629,81,1.483,104,1.383,110,1.429,111,2.059,148,2.64,159,2.382,336,4.653,337,3.62,356,2.57,397,3.15,559,1.975,624,2.767,625,2.707,627,2.839,628,2.27,2449,6.083,2629,4.505,2983,5.52,2984,5.52,2985,7.11,2986,5.52,2987,7.775,2988,5.52,2989,5.52]],["t/1448",[3,1.843,33,1.425,35,1.127,49,3.906,50,1.525,51,0.913,80,1.009,81,0.918,104,1.483,106,2.666,107,2.363,108,1.7,109,2.199,110,0.885,111,1.795,112,1.402,130,2.898,147,2.171,225,1.667,327,3.513,346,1.677,359,3.532,461,3.517,501,3.632,672,4.37,693,5.148,746,1.758,867,2.932,889,3.327,1275,5.751,1303,3.632,1408,4.455,1427,3.929,1544,4.403,2449,7.178,2629,8.324,2630,6.444,2782,3.416,2980,4.131,2990,4.814,2991,4.814,2992,4.814,2993,4.814,2994,4.403,2995,4.814,2996,4.814,2997,4.814]],["t/1450",[51,0.838,104,1.613,106,3.429,112,2.639,183,3.138,467,3.31,750,4.026,2629,7.398]],["t/1452",[3,2.043,20,1.981,40,3.089,64,2.119,66,2.261,88,3.02,145,4.457,185,3.628,355,4.526,505,5.266,575,3.567,860,6.374,996,6.112,1213,4.844,1680,5.038,2013,5.147,2477,5.706,2812,6.112,2998,7.143,2999,7.143,3000,7.811,3001,7.143]],["t/1454",[72,1.311,105,4.173,175,4.404]],["t/1456",[3,1.341,20,1.87,23,1.617,40,2.027,50,1.349,51,0.887,59,0.836,64,1.391,66,2.135,73,1.313,80,1.074,81,0.978,110,0.942,150,3.018,159,1.571,312,2.387,356,2.387,378,4.011,387,2.513,456,5.086,467,2.693,559,1.834,624,2.57,625,2.513,627,1.872,628,2.108,686,4.399,835,3.837,843,2.882,1109,2.541,2071,8.591,2096,3.868,2477,3.745,2998,6.745,3001,4.688,3002,5.127,3003,5.127,3004,5.127,3005,5.127,3006,5.127,3007,5.127,3008,5.127,3009,5.127,3010,5.127,3011,5.127,3012,7.376,3013,7.376,3014,5.127,3015,5.127,3016,5.127,3017,5.127,3018,5.127]],["t/1458",[3,2.501,33,2.225,35,1.759,51,0.912,80,1.574,81,1.433,104,1.871,106,3.617,107,2.519,108,2.653,109,3.432,110,1.381,111,2.802,112,2.188,130,3.932,225,2.601,746,2.744]],["t/1460",[51,0.849,104,1.651,106,3.509,112,2.701,467,3.388,750,4.12]],["t/1462",[3,2.76,14,3.029,20,1.682,35,1.552,48,2.252,50,1.213,84,3.119,109,3.029,132,2.945,147,3.051,220,3.402,244,3.675,261,3.119,307,4.582,314,3.058,484,3.251,518,4.706,672,4.113,715,4.192,837,3.904,1150,5.004,1469,6.065,1680,4.278,2697,5.691,3019,9.649,3020,6.632,3021,6.632,3022,5.691,3023,7.564,3024,6.632,3025,6.632,3026,6.632]],["t/1464",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1466",[3,1.859,20,2.34,23,2.242,35,1.664,39,3.343,48,2.414,50,1.3,51,0.877,64,1.929,66,2.671,73,1.821,104,1.642,314,3.278,356,3.31,397,4.056,559,2.543,624,3.563,625,3.485,627,3.369,628,2.924,3023,7.917,3027,7.109,3028,7.109,3029,7.109]],["t/1468",[3,1.827,33,1.408,35,2.274,37,1.572,39,3.285,40,1.881,51,0.943,60,1.895,80,0.997,81,0.907,88,1.839,104,1.473,106,2.642,107,1.595,108,1.679,109,2.172,110,0.874,111,1.774,112,2.033,130,3.404,148,1.615,216,1.483,225,3.516,300,3.007,314,3.221,470,0.842,500,3.882,672,4.332,746,1.737,909,4.35,1087,3.882,1088,3.007,1650,4.35,1705,3.068,2069,3.287,2668,4.082,2796,5.465,3019,7.569,3023,4.082,3030,7.827,3031,4.756,3032,4.35]],["t/1470",[39,3.989,51,0.867,104,1.509,106,3.208,112,2.469,300,5.361,314,3.911,467,3.097,750,3.767,2069,5.86,2796,6.637,3032,7.756,3033,8.481]],["t/1472",[3,1.947,20,1.888,39,3.5,40,3.758,51,0.742,100,3.061,111,2.776,145,4.247,181,4.247,216,2.321,225,2.577,239,3.247,314,3.432,346,2.593,441,4.705,636,4.533,730,3.963,1098,3.649,1239,4.801,1402,6.807,1680,4.801,1698,4.705,1770,4.382,2704,6.807,3030,6.388,3034,7.443]],["t/1474",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1476",[3,1.518,20,2.042,21,3.376,23,1.831,48,1.971,50,1.691,51,0.847,64,1.575,66,2.331,73,1.487,100,2.387,104,1.433,111,2.164,132,2.578,249,3.312,356,2.702,397,3.312,519,2.877,559,2.077,624,2.909,625,2.846,627,2.12,628,2.387,659,3.051,755,5.308,771,4.01,842,4.01,904,3.535,1100,3.417,1399,4.379,1580,4.819,1657,4.379,1692,4.542,1722,4.119,1727,5.308,3035,4.24,3036,8.052,3037,8.052,3038,5.308,3039,5.804,3040,4.981,3041,5.308,3042,5.804]],["t/1478",[21,1.848,23,1.596,39,4.033,51,0.905,64,1.373,65,2.597,66,1.465,72,0.682,73,1.297,74,2.032,95,1.836,111,1.887,156,3.697,244,4.05,261,2.38,299,2.404,314,3.369,467,2.669,695,3.697,998,3.412,1100,5.864,1187,5.963,1200,3.199,1202,5.718,1239,4.714,1580,4.374,1646,4.343,1657,3.819,1681,6.999,1692,3.96,2013,4.816,3035,3.697,3040,4.343,3041,4.628,3043,5.061,3044,5.061,3045,4.628,3046,5.061,3047,4.343,3048,5.061,3049,5.514,3050,5.061,3051,5.061,3052,5.061,3053,6.271,3054,5.061,3055,5.061,3056,5.061]],["t/1480",[23,2.489,51,0.923,64,2.14,65,3.504,66,2.284,72,1.062,73,2.021,74,3.168,299,3.748,1124,7.214,1126,7.214,1580,4.722,3035,5.763,3049,5.952,3057,6.438,3058,7.889]],["t/1482",[23,2.44,51,0.919,64,2.099,65,3.461,66,2.239,72,1.042,73,1.982,74,3.106,299,3.674,1130,7.073,1131,7.073,1580,4.63,1708,6.637,3035,5.651,3049,5.836,3057,6.312,3059,7.735,3060,7.735]],["t/1484",[23,2.489,51,0.923,64,2.14,65,3.504,66,2.284,72,1.062,73,2.021,74,3.168,299,3.748,1134,7.214,1135,7.214,1580,4.722,3035,5.763,3049,5.952,3057,6.438,3061,7.889]],["t/1486",[21,2.852,23,2.464,51,0.921,64,2.119,65,3.482,66,2.261,72,1.052,73,2.001,74,3.137,299,3.711,1139,7.143,1580,4.675,3035,5.706,3049,5.894,3057,6.374,3062,7.811,3063,7.811]],["t/1488",[21,2.362,23,2.041,50,1.183,51,0.938,64,1.755,65,3.081,66,1.873,67,3.489,72,0.871,73,1.657,74,2.598,108,2.284,112,1.883,156,4.726,189,3.85,256,2.847,299,3.073,734,3.691,1213,4.012,1491,5.279,1580,3.872,3035,4.726,3049,4.881,3064,6.469,3065,6.469,3066,6.469,3067,6.469,3068,6.469,3069,6.469,3070,8.67,3071,6.469]],["t/1490",[3,1.434,21,1.265,33,1.623,35,2.28,37,1.469,39,4.217,40,1.37,50,1.245,51,0.954,60,2.185,80,0.726,81,0.661,104,1.211,106,2.074,107,1.838,108,1.223,109,1.582,110,1.008,111,1.292,112,1.596,119,2.336,130,3.182,131,1.844,132,1.539,148,1.862,174,1.894,181,1.977,183,1.199,185,2.03,190,1.391,216,1.709,225,3.251,244,1.92,346,2.371,355,2.007,387,1.698,398,1.717,633,3.168,650,2.394,659,2.882,672,2.148,746,1.265,888,2.039,1087,2.827,1202,2.711,1239,4.389,1580,3.282,1657,4.137,1680,2.235,1692,2.711,1698,2.19,1705,2.235,1714,3.168,1716,3.168,1722,3.891,1723,2.973,3030,4.705,3038,3.168,3040,2.973,3053,4.705,3072,3.464,3073,2.336,3074,3.464,3075,3.464,3076,3.168,3077,3.464]],["t/1492",[51,0.889,104,1.447,106,3.076,112,2.925,183,2.815,387,3.987,467,2.97,659,4.275,750,3.612,1580,4.868,1657,6.136,1692,6.363,1722,5.771,3053,6.979,3076,7.437]],["t/1494",[3,2.371,73,2.323,148,3.078,185,3.357,216,2.826,682,6.432,910,6.622,1062,7.398,3078,9.065]],["t/1496",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1498",[23,2.37,51,0.927,59,1.225,64,2.039,65,3.398,66,2.175,72,1.012,73,1.925,74,3.018,80,1.574,81,1.433,110,1.381,159,2.302,353,4.498,453,5.88,456,4.424,469,3.249,1658,5.066,3079,7.514,3080,7.514]],["t/1500",[3,1.201,12,1.974,13,5.502,14,1.27,33,0.824,35,2.549,37,1.939,51,0.942,53,1.758,94,2.387,104,1.043,106,1.737,107,2.282,108,0.982,109,1.27,112,0.81,130,1.888,174,1.521,183,2.03,190,1.117,225,3.803,274,4.432,325,2.032,346,3.794,387,2.251,461,2.032,551,2.387,565,1.427,628,1.144,746,1.016,835,1.235,836,2.27,867,2.796,1426,3.345,1619,2.099,1705,1.794,2454,2.27,2484,2.544,2485,5.553,2486,1.974,2585,2.544,2586,2.544,3081,4.199,3082,4.199,3083,2.544,3084,4.199,3085,4.199,3086,4.591,3087,4.591,3088,4.591,3089,4.591,3090,4.591,3091,5.361,3092,2.782,3093,2.782,3094,2.544,3095,2.544,3096,2.544,3097,2.544,3098,2.544,3099,2.544,3100,2.544,3101,2.544,3102,2.544]],["t/1502",[51,0.737,104,1.312,174,4.031,274,5.164,387,3.615,467,2.693,750,3.275,835,3.275,867,5.753,2454,6.018,2514,6.743,3081,6.743,3082,6.743,3083,6.743,3084,6.743,3085,6.743,3091,6.743,3094,6.743,3095,6.743,3096,6.743,3097,6.743,3098,6.743,3099,6.743,3100,6.743,3101,6.743,3102,6.743]],["t/1504",[3,1.81,20,1.755,51,0.708,147,2.133,148,2.35,177,2.428,180,3.733,317,3.594,417,3.51,470,1.226,515,5.223,565,3.551,575,3.161,837,4.075,867,4.216,1058,3.892,1102,5.223,1338,5.94,1398,5.649,1627,3.784,2668,5.94,2812,7.095,3103,7.781,3104,6.922,3105,6.922,3106,6.33,3107,5.94,3108,6.922,3109,6.922,3110,6.922,3111,6.922,3112,5.649,3113,6.922]],["t/1506",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1508",[3,2.149,20,2.564,23,2.592,50,1.503,51,0.789,64,2.229,66,2.927,73,2.105,356,3.826,559,2.94,624,4.119,625,4.029,627,3.001,628,3.379,3114,8.217]],["t/1510",[3115,9.98]],["t/1512",[51,0.926,243,7.175,2795,6.507,3116,9.17,3117,8.386]],["t/1514",[3,1.871,33,1.108,35,2.264,37,1.106,51,0.932,59,0.61,60,2.322,80,0.784,81,0.714,95,1.358,104,1.273,106,2.204,107,1.255,108,2.85,109,2.661,110,0.688,111,1.396,112,1.09,121,3.84,130,2.942,147,1.153,148,2.97,167,1.313,177,3.068,185,1.386,224,2.656,225,3.348,227,1.565,243,5.598,254,2.734,256,1.647,274,2.046,359,1.876,393,1.539,613,2.824,679,2.46,699,1.993,715,3.683,746,1.367,772,2.524,821,6.139,904,2.28,1030,2.656,1152,2.414,1312,2.414,1426,2.136,1527,3.055,1550,2.929,2795,2.656,2814,2.929,2862,2.929,3103,7.95,3118,5.328,3119,5.328,3120,3.423,3121,3.212,3122,5.328,3123,3.743,3124,5.826]],["t/1516",[3,1.283,27,3.959,37,0.931,50,0.897,51,0.928,59,0.799,80,1.028,81,0.935,95,1.779,104,0.873,106,1.855,107,1.644,109,2.24,110,1.548,112,2.694,147,1.511,177,1.72,185,1.816,216,2.227,224,3.48,243,3.837,256,3.144,361,3.48,386,5.829,467,1.791,679,1.687,750,3.741,808,5.589,821,4.208,1030,3.48,1426,2.798,1613,5.589,1620,3.583,2096,5.389,2795,3.48,2935,4.485,3103,4.208,3118,4.485,3119,4.485,3120,6.532,3121,4.208,3122,4.485,3125,4.904,3126,8.424,3127,8.424,3128,4.904,3129,4.485,3130,4.485,3131,4.904]],["t/1518",[3,2.427,83,5.462,132,4.12,177,3.815,358,7,632,5.754]],["t/1520",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1522",[0,4.862,3,1.008,20,0.977,23,1.215,37,0.731,51,0.932,59,0.971,64,1.045,65,2.118,66,1.115,72,0.802,73,0.987,74,1.547,80,0.807,81,1.137,83,3.508,107,1.292,110,1.339,111,1.437,112,1.122,130,2.45,159,1.18,177,3.109,180,3.929,183,1.334,194,2,220,1.976,248,1.559,312,1.794,353,2.306,359,1.931,363,5.497,364,2.907,456,4.289,467,1.407,469,1.666,470,1.055,484,1.889,619,2.198,637,3.35,688,1.849,835,1.711,847,1.931,1076,2.166,1658,4.912,2053,2.907,2784,2.907,2879,2.597,3132,3.306,3133,3.306,3134,3.306,3135,3.306,3136,5.449,3137,5.449,3138,5.449,3139,3.523,3140,3.306,3141,3.306,3142,5.113,3143,3.306,3144,3.306,3145,3.306,3146,5.449,3147,3.523,3148,3.523,3149,3.523,3150,3.306,3151,5.958,3152,3.523,3153,3.306,3154,3.853,3155,3.523,3156,3.853,3157,3.853,3158,3.853]],["t/1524",[23,1.009,37,0.977,50,0.585,51,0.95,59,1.205,64,0.868,65,1.828,66,0.926,67,1.725,72,0.869,73,0.819,74,1.284,80,1.352,81,1.546,83,5.75,104,0.569,106,1.21,107,1.725,108,1.129,110,1.672,111,1.918,112,0.931,159,0.98,177,1.122,183,1.781,191,1.681,231,2.395,329,2.61,353,1.914,359,1.603,378,2.502,453,2.502,456,3.799,464,2.744,467,1.168,579,1.883,617,1.681,619,3.682,637,2.892,835,1.42,1270,2.925,1301,2.502,1408,2.022,1658,2.156,2656,2.744,2784,2.413,2879,2.156,3132,2.744,3133,2.744,3134,2.744,3135,2.744,3136,5.901,3137,5.901,3138,5.901,3139,2.925,3140,2.744,3141,2.744,3142,4.414,3143,2.744,3144,2.744,3145,2.744,3146,2.925,3147,2.925,3148,2.925,3149,2.925,3150,4.414,3152,4.704,3153,4.414,3159,5.144,3160,3.198,3161,5.144,3162,3.198,3163,3.198,3164,3.198,3165,3.198,3166,2.925,3167,3.198,3168,3.198,3169,3.198,3170,3.198,3171,3.198,3172,3.198,3173,3.198]],["t/1526",[23,1.415,37,0.852,51,0.955,59,1.304,64,1.217,65,2.377,66,1.299,72,0.604,73,1.149,74,1.802,80,1.676,81,1.526,83,5.219,107,1.504,110,1.629,111,1.673,112,1.306,148,1.523,159,1.374,177,2.805,183,1.553,353,2.685,359,2.249,405,3.184,406,3.511,453,3.511,456,3.938,464,3.85,537,4.747,565,2.302,617,2.358,619,3.817,835,1.993,1658,3.025,2107,3.278,3132,3.85,3133,3.85,3134,3.85,3135,3.85,3140,3.85,3141,3.85,3142,5.74,3143,3.85,3144,3.85,3145,3.85,3150,3.85,3153,3.85,3174,6.689,3175,6.689,3176,4.487,3177,4.487,3178,4.487]],["t/1528",[3,1.588,33,1.169,35,2.216,37,1.702,48,1.341,50,1.354,51,0.935,53,3.839,59,0.99,104,1.317,105,1.693,106,2.297,107,2.036,108,2.933,109,1.803,112,1.768,130,3.687,147,1.217,148,1.341,177,3.32,225,3.277,238,3.635,346,2.578,357,3.518,359,4.164,361,4.309,362,2.802,379,4.956,380,3.01,381,4.094,382,1.936,392,2.802,393,1.624,401,2.288,402,3.389,403,3.611,404,5.211,405,2.802,406,3.09,614,3.09,628,1.624,746,1.442,2879,4.094,2888,3.389,2889,3.389,2890,3.611,2891,3.611,2892,3.389,3179,3.949,3180,3.949]],["t/1530",[51,0.934,59,1.614,80,1.847,81,1.681,104,1.18,110,1.82,148,2.252,177,2.326,180,3.577,189,3.915,286,4.278,357,3.842,379,5.412,381,4.471,382,3.251,392,4.706,404,5.691,406,5.189,467,2.422,750,2.945,2879,4.471,3181,6.632,3182,6.632,3183,6.632,3184,6.632]],["t/1532",[3,2.506,20,1.576,35,1.975,44,3.968,50,1.753,64,1.686,100,2.556,129,2.711,147,1.915,180,4.551,213,4.009,256,2.735,300,3.929,312,2.894,317,3.227,356,2.894,455,3.601,470,1.101,484,4.137,563,3.494,579,3.659,619,3.546,679,2.137,682,4.41,701,2.421,715,3.929,810,3.854,855,5.072,877,5.988,998,4.19,1078,3.929,1374,3.854,1475,4.41,2690,5.333,2813,4.863,3185,6.215,3186,6.215,3187,5.683,3188,6.215,3189,6.215]],["t/1534",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1536",[3,1.454,20,1.981,23,1.754,35,1.301,37,1.055,48,1.888,50,1.017,51,0.928,59,0.906,64,1.508,66,2.262,73,1.424,80,1.893,81,1.723,104,1.39,106,2.103,107,1.864,110,1.66,222,3.945,230,2.696,356,2.588,382,2.726,397,3.172,559,1.989,624,2.787,625,2.726,627,2.853,628,2.286,679,1.912,932,3.273,1030,3.945,1147,4.061,2069,3.841,2635,4.061,2803,3.663,3190,5.559,3191,5.559,3192,4.771,3193,5.559,3194,4.771,3195,5.559,3196,5.559]],["t/1538",[50,1.128,51,0.883,56,4.063,147,2.586,181,3.518,213,3.977,230,2.991,249,3.518,382,4.115,470,1.092,509,4.063,512,7.676,691,3.467,693,4.505,764,5.032,810,3.824,818,6.333,995,4.505,1030,4.375,1147,4.505,1535,7.676,2069,4.261,3192,5.291,3197,5.291,3198,8.727,3199,6.166,3200,5.291,3201,6.166,3202,6.166,3203,6.166,3204,7.676,3205,8.394,3206,8.394,3207,6.166]],["t/1540",[3,1.898,33,0.917,35,2.323,37,0.952,48,1.702,49,1.717,50,1.155,51,0.951,53,1.958,59,0.505,60,1.234,80,1.323,81,1.205,104,1.124,105,1.328,106,1.896,107,2.118,108,1.094,109,1.415,110,1.161,111,2.355,112,0.902,121,2.041,128,2.485,129,1.351,130,2.062,147,2.236,175,1.401,177,1.086,183,1.736,190,1.244,216,1.563,220,1.589,225,1.072,227,1.295,253,1.536,254,2.263,259,4.302,364,3.783,382,2.458,393,2.985,417,1.571,442,1.824,470,0.549,484,1.519,565,1.589,679,1.724,688,1.487,706,1.742,715,3.169,746,1.831,773,1.854,835,1.376,866,2.337,877,4.481,888,1.824,961,2.658,1717,2.198,2053,2.337,2069,3.464,2071,4.302,2301,2.833,2635,3.663,2788,3.923,2795,2.198,2803,3.304,2810,2.833,2813,2.424,2814,2.424,2862,2.424,3073,2.089,3194,4.302,3197,2.658,3198,2.833,3200,4.302,3204,2.833,3208,3.098,3209,3.098,3210,2.833,3211,2.833,3212,2.833,3213,3.098,3214,3.098]],["t/1542",[37,1.35,51,0.915,59,1.159,80,1.933,81,1.76,104,1.265,110,1.696,183,3.194,382,3.485,467,2.596,750,3.157,835,3.157,866,5.364,2069,4.912,2635,5.193,2795,5.044,2803,4.685,3194,6.1,3200,6.1,3210,6.501,3211,6.501,3212,6.501,3215,7.109]],["t/1544",[50,1.586,51,0.875,64,2.352,679,4.097,1044,6.782,1045,7.073,3192,7.438]],["t/1546",[3,2.427,20,2.353,185,3.436,261,4.363,307,6.411,2053,7,3216,9.278]],["t/1548",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1550",[3,1.32,12,2.216,20,1.28,23,0.985,35,1.181,37,0.593,39,3.429,48,2.476,50,0.571,51,0.932,59,0.509,64,0.847,66,1.461,73,0.8,80,0.654,81,0.962,95,2.303,104,1.13,110,0.574,111,1.164,112,0.909,147,0.962,189,2.82,190,1.254,192,2.014,193,3.297,225,1.081,248,1.264,256,1.374,261,3.429,271,0.997,309,1.684,312,1.454,327,1.316,356,1.454,397,1.781,491,2.105,505,4.916,519,2.501,521,2.216,559,1.117,624,1.565,625,1.531,627,1.843,628,1.284,688,1.499,731,1.514,741,1.602,846,2.548,944,2.014,1213,3.129,1224,3.686,1247,3.486,1305,2.679,1424,2.679,1513,2.057,1547,2.855,1620,2.281,1667,2.548,1915,2.855,2610,2.548,2636,2.356,2685,2.679,3112,2.548,3217,2.855,3218,2.281,3219,3.122,3220,2.855,3221,3.122,3222,9.01,3223,2.855,3224,4.118,3225,2.855,3226,4.33,3227,3.122,3228,3.122,3229,5.449,3230,5.449,3231,3.122,3232,2.855,3233,2.855,3234,2.679,3235,3.122,3236,3.122,3237,3.122,3238,3.122,3239,2.855,3240,3.122,3241,2.855,3242,3.122,3243,3.122,3244,3.122,3245,2.855,3246,2.855,3247,2.855,3248,3.122,3249,3.122,3250,3.122,3251,2.855,3252,3.122,3253,3.122,3254,2.679]],["t/1552",[3,1.359,33,1.538,35,2.296,37,1.736,48,1.099,51,0.936,59,0.528,80,1.088,81,1.241,95,1.174,104,1.158,106,1.965,107,2.497,108,1.834,109,1.478,110,0.595,111,1.207,112,1.512,130,3.353,147,0.998,151,1.605,183,1.121,190,1.3,193,1.681,220,1.661,225,3.165,227,1.353,253,1.605,256,1.425,261,3.834,271,1.033,327,1.365,416,1.906,417,2.634,429,1.321,505,3.502,607,2.088,746,1.182,810,2.008,847,1.623,1081,2.443,1102,2.443,1224,5.44,1247,3.589,1305,4.458,1306,2.642,1470,2.778,1620,3.795,2055,2.778,2308,2.365,2572,2.443,2610,2.642,3224,2.642,3229,4.458,3230,4.458,3233,2.96,3234,2.778,3241,2.96,3245,2.96,3246,2.96,3247,2.96,3251,2.96,3254,4.458,3255,3.237,3256,5.195,3257,2.237,3258,3.237,3259,3.237,3260,2.96,3261,3.237,3262,3.237,3263,4.751,3264,2.96,3265,3.237,3266,2.96,3267,3.237,3268,3.237,3269,3.237,3270,3.237,3271,3.237,3272,3.237]],["t/1554",[51,0.821,95,2.725,104,1.337,106,2.842,111,2.802,112,2.783,193,3.901,417,3.81,467,2.744,505,5.066,607,4.847,750,3.337,1224,5.489,1620,5.489,2055,6.448,2308,5.489,3224,6.132,3229,6.448,3230,6.448,3254,6.448,3257,5.192,3260,6.872,3263,6.872,3266,6.872]],["t/1556",[40,1.324,50,0.612,51,0.972,59,0.545,60,2.651,61,3.097,95,1.214,147,2.855,148,2.577,150,3.916,151,1.659,186,2.731,193,2.77,248,1.355,249,1.91,307,2.313,314,1.543,331,2.872,401,3.091,417,1.697,607,2.159,637,2.999,642,2.525,701,1.304,739,1.659,741,1.717,843,1.882,1627,1.829,2107,2.445,2594,3.061,2610,2.731,2636,4.025,3226,2.872,3257,2.313,3273,3.347,3274,3.347,3275,3.347,3276,3.347,3277,3.347,3278,5.335,3279,3.347,3280,3.347,3281,3.347,3282,3.347,3283,3.347,3284,3.347,3285,3.347,3286,3.347,3287,6.652,3288,4.879,3289,3.347,3290,3.347,3291,3.347,3292,3.347,3293,3.347,3294,3.347,3295,3.347,3296,3.347,3297,3.347,3298,3.347,3299,3.347,3300,3.347,3301,3.347,3302,3.347,3303,3.347,3304,3.347,3305,3.347,3306,3.347,3307,3.347,3308,3.347,3309,3.347,3310,3.347,3311,3.347,3312,3.347,3313,3.347,3314,3.347,3315,3.347,3316,3.347,3317,3.347,3318,3.347,3319,3.347,3320,3.347,3321,3.347]],["t/1558",[3,2.172,20,2.106,180,4.478,192,5.356,193,4.311,575,3.792,800,6.265,889,5.737,1015,6.497,1465,5.356,1629,7.593,1770,4.888,3322,10.063,3323,7.125,3324,8.303]],["t/1560",[72,1.311,105,4.173,175,4.404]],["t/1562",[3,2.319,20,1.934,23,1.694,35,1.257,48,1.824,50,0.982,51,0.884,64,1.457,66,2.207,73,1.376,104,1.357,110,0.987,149,3.539,180,2.896,192,3.464,244,2.976,356,2.501,397,3.064,456,3.161,463,3.923,559,1.921,562,3.621,579,3.161,624,2.692,625,2.633,627,2.784,628,2.209,1116,3.112,1426,3.064,1528,6.543,1659,5.268,3226,4.609,3323,8.281,3325,5.37,3326,7.625,3327,5.37,3328,7.625,3329,5.37,3330,5.37,3331,5.37,3332,5.37,3333,5.37,3334,4.911,3335,5.37,3336,5.37,3337,5.37,3338,5.37,3339,5.37]],["t/1564",[3,1.632,20,1.038,33,1.211,35,2.338,37,1.73,40,3.346,48,1.389,50,1.142,51,0.945,80,0.857,81,0.781,104,1.346,106,2.361,107,2.092,108,1.445,109,1.869,110,0.752,111,1.526,112,1.191,130,2.566,180,2.207,183,1.416,194,2.125,214,2.827,225,3.457,227,1.71,314,2.877,461,2.989,587,3.202,659,2.151,694,2.696,746,1.494,778,2.538,847,3.128,888,2.409,1068,2.099,1116,3.616,1120,3.087,1163,2.371,1406,2.989,1578,5.355,1659,2.827,2477,2.989,3322,5.707,3323,3.511,3340,5.707,3341,4.092,3342,3.742,3343,4.092,3344,3.742,3345,5.707,3346,4.092,3347,4.092,3348,5.707,3349,4.092,3350,4.092]],["t/1566",[51,0.821,104,1.337,106,2.842,112,2.188,183,2.601,467,2.744,659,3.95,750,3.337,1116,4.354,3340,6.872,3342,6.872,3344,6.872,3345,6.872,3348,6.872,3351,9.561,3352,9.561,3353,9.561,3354,9.561,3355,9.561,3356,7.514]],["t/1568",[3,1.965,20,1.906,40,2.972,64,2.039,66,2.175,88,2.905,145,4.287,185,3.54,256,3.307,505,5.066,575,3.432,583,6.132,860,6.132,996,5.88,1213,4.66,1242,5.489,1680,4.847,2013,4.952,2812,5.88,2999,6.872,3357,9.561,3358,7.514,3359,7.514,3360,6.872,3361,6.448]],["t/1570",[72,1.311,105,4.173,175,4.404]],["t/1572",[3,1.613,20,2.129,23,1.945,35,1.965,40,2.438,48,2.094,50,1.128,51,0.863,64,1.673,66,2.43,73,1.58,104,1.493,309,3.326,314,3.87,356,2.871,397,3.518,470,1.092,559,2.206,579,5.618,617,3.241,624,3.091,625,3.023,627,3.065,628,2.536,650,4.261,1058,3.467,1166,3.755,1698,6.032,1788,5.639,3361,5.291,3362,6.166,3363,6.166,3364,6.166,3365,6.166,3366,6.166]],["t/1574",[3,2.184,20,1.552,33,1.811,35,1.955,37,1.162,51,0.936,80,1.282,81,1.167,104,1.691,106,3.158,107,2.051,108,2.16,109,2.794,110,1.125,111,2.282,112,1.781,130,3.909,220,3.139,225,2.89,314,2.821,470,1.084,484,3,650,4.228,746,2.234,1255,3.795,1406,4.47,1698,6.008,3361,5.251,3367,6.118,3368,6.118]],["t/1576",[51,0.849,104,1.651,106,3.509,112,2.701,467,3.388,750,4.12]],["t/1578",[3,2.398,20,2.326,147,2.826,565,4.704,575,4.188,1058,5.155,2423,7.891]],["t/1580",[37,1.849,51,0.76,55,2.531,59,1.261,60,3.743,72,1.312,81,1.476,104,0.616,105,3.317,147,2.894,185,3.803,190,1.391,222,2.458,226,3.177,227,1.448,317,4.877,435,1.169,536,2.531,559,1.239,575,1.582,632,3.4,691,6.228,819,4.29,837,5.278,886,2.711,961,2.973,981,6.88,1058,1.948,1717,2.458,1816,4.705,2068,5.014,2070,2.336,2486,2.458,2686,5.84,3369,3.464,3370,3.464,3371,8.431,3372,3.464,3373,8.589,3374,3.464,3375,3.464,3376,3.464,3377,3.464,3378,3.464,3379,2.973,3380,3.464,3381,3.464,3382,3.464,3383,3.464,3384,3.464,3385,2.973,3386,2.973,3387,3.464]],["t/1582",[3,0.584,20,0.968,23,0.704,37,0.724,48,1.697,50,1.416,51,0.945,55,1.631,59,1.18,60,2.357,64,0.606,66,1.105,73,0.572,80,1.517,81,1.381,88,0.863,110,1.622,111,2.478,112,2.57,147,1.822,148,2.008,185,1.851,189,4.147,191,1.173,220,1.958,222,4.197,226,1.293,230,1.083,239,2.58,250,1.542,253,1.106,314,2.727,317,1.981,356,1.039,384,1.584,397,1.273,417,1.132,559,1.365,575,3.534,607,1.44,619,1.273,624,1.119,625,1.094,627,0.815,628,0.918,778,1.384,790,1.821,819,1.746,861,2.041,866,2.879,888,1.314,991,1.915,992,1.584,1076,1.255,1098,1.094,1337,5.075,1345,2.041,1399,1.684,1401,1.684,1643,1.915,1658,1.505,1724,1.821,1905,1.915,2070,1.505,2423,3.651,2429,1.821,2486,1.584,2635,1.631,2636,1.684,2686,4.289,3373,2.041,3385,1.915,3386,1.915,3388,2.232,3389,3.816,3390,2.232,3391,2.232,3392,2.232,3393,2.232,3394,3.816,3395,3.816,3396,3.816,3397,3.816,3398,2.232,3399,2.232,3400,2.232,3401,2.232,3402,2.232,3403,2.232,3404,6.645,3405,4.998,3406,2.232,3407,2.232,3408,2.232,3409,2.232,3410,2.041,3411,2.232,3412,3.816,3413,4.998,3414,4.998,3415,4.998,3416,1.915,3417,2.232,3418,2.041,3419,2.232,3420,2.232]],["t/1584",[3,1.41,33,1.004,35,1.789,37,0.644,48,1.151,50,1.227,51,0.936,60,2.148,80,0.71,81,0.647,104,1.484,105,2.311,106,2.039,107,1.137,108,1.197,109,1.548,110,0.623,111,1.264,112,1.953,130,2.759,131,1.805,147,2.067,148,1.83,174,1.853,185,1.996,190,2.164,216,1.057,225,2.646,226,4.429,227,1.417,253,1.68,317,5.018,442,1.996,470,0.6,484,1.662,565,2.765,575,3.491,613,5.062,637,1.906,706,3.03,746,1.238,772,2.286,835,1.506,877,2.406,888,1.996,892,2.558,904,2.065,908,2.143,911,2.286,920,2.558,975,4.217,1013,3.634,1035,5.249,1243,2.909,1367,3.1,1724,4.398,1725,4.929,2423,2.477,2662,4.929,2687,4.929,2688,4.929,2689,3.1,2690,2.909,2691,3.1,2709,4.929,3385,2.909,3386,2.909,3416,4.625,3421,3.39,3422,3.39,3423,3.39,3424,3.39,3425,3.39]],["t/1586",[51,0.815,104,1.542,106,3.279,112,3.264,226,5.022,467,3.165,750,3.849,1724,7.073,3416,7.438,3426,8.667]],["t/1588",[3,2.292,20,2.222,145,5,217,8.581,381,5.908,1371,6.857,1382,7.52,1705,5.653,1823,6.612,3427,7.52,3428,7.52]],["t/1590",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1592",[3,2.385,20,2.313,23,2.203,35,1.635,50,1.277,51,0.894,59,1.486,64,1.895,66,2.64,73,1.789,80,1.463,81,1.332,104,1.243,159,2.139,356,3.251,559,2.499,624,3.5,625,3.424,627,3.33,628,2.872,3427,5.993,3429,6.386,3430,6.386,3431,6.386,3432,6.983]],["t/1594",[3,2.117,33,1.731,35,2.173,51,0.929,80,1.696,81,1.544,104,1.651,106,3.061,107,2.713,108,2.857,109,2.67,110,1.075,111,2.18,112,1.702,129,2.551,130,3.817,145,4.618,181,3.336,183,2.024,225,3.213,746,2.135,1823,6.106,1846,6.332,3433,7.401,3434,7.401,3435,5.347,3436,4.772]],["t/1596",[51,0.826,104,1.577,106,3.352,112,2.58,183,3.068,467,3.236,750,3.936,3433,8.104,3434,8.104,3435,8.104]],["t/1598",[3,2.546,20,2.469,2070,6.563]],["t/1600",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1602",[23,1.93,51,0.943,59,1.361,64,1.66,65,2.967,66,1.771,72,0.824,73,1.568,74,2.457,80,1.749,81,1.593,110,1.535,166,3.868,175,2.768,336,3.662,337,2.849,353,3.662,456,4.915,469,2.646,1625,4.788,1678,4.993,2201,5.251,2788,4.788,3437,6.118,3438,6.118,3439,7.165,3440,5.595,3441,7.165,3442,5.595,3443,5.595,3444,5.595]],["t/1604",[3,1.956,33,1.548,35,1.751,40,2.068,51,0.932,53,3.305,104,1.554,106,1.978,107,1.753,108,1.846,109,2.388,112,1.522,130,3.592,146,3.613,166,3.305,174,2.858,175,2.365,180,2.82,190,2.1,193,2.715,194,2.715,225,2.589,231,2.434,314,2.411,346,1.822,378,4.091,470,0.926,518,3.71,659,2.748,746,1.909,835,3.322,853,4.091,944,3.372,1510,4.781,1625,6.834,2070,5.043,2204,4.091,2788,4.091,3439,4.487,3445,4.781,3446,4.091,3447,5.228,3448,5.228,3449,5.228,3450,5.228,3451,4.781,3452,5.228,3453,5.228]],["t/1606",[51,0.849,104,1.651,467,3.388,750,4.12,2788,7.26,3451,8.484]],["t/1608",[3,2.455,20,2.381,60,3.741,309,5.063,3454,8.056,3455,9.388]],["t/1610",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1612",[3,1.734,20,2.235,23,2.092,35,1.552,37,1.259,48,2.993,49,3.675,50,1.213,51,0.9,64,1.799,66,2.552,72,0.893,73,1.699,104,1.568,110,1.219,148,2.993,356,3.088,397,3.784,559,2.373,624,3.324,625,3.251,627,3.219,628,2.727,1426,3.784,1513,4.37,1681,5.412,3225,6.065,3456,6.632,3457,6.632]],["t/1614",[3,1.911,33,1.498,35,2.199,37,1.387,49,4.753,50,0.926,51,0.933,72,0.682,80,1.06,81,0.965,104,1.526,106,2.764,107,1.697,108,2.58,109,2.311,110,0.93,111,1.887,112,1.473,129,2.208,130,3.863,147,2.894,148,2.912,177,2.563,225,3.251,392,5.185,393,2.081,414,5.963,607,3.264,746,1.848,1076,2.845,1426,2.888,1513,5.652,2781,4.343,2885,3.96,3454,4.343,3458,5.061]],["t/1616",[35,1.695,49,5.727,50,1.708,51,0.729,104,1.661,106,2.738,112,2.107,147,2.231,148,2.458,346,2.522,392,5.137,467,2.644,575,3.306,750,3.215,773,4.333,780,5.664,1398,5.907,2477,5.288,2859,6.212,2885,5.664,3121,6.212,3454,6.212,3459,7.239,3460,7.239,3461,6.212,3462,7.239]],["t/1618",[3,2.195,34,5.204,40,3.318,132,3.727,314,3.869,435,2.831,632,5.204,688,4.028,759,5.955,1062,6.848,1625,6.566,2595,6.848,3445,9.366,3463,8.391,3464,8.391]],["t/1620",[72,1.295,104,1.711,105,4.123,623,4.271]],["t/1622",[23,1.96,51,0.945,59,1.375,64,1.686,65,2.999,66,1.799,72,0.837,73,1.592,74,2.496,80,1.768,81,1.61,110,1.551,166,3.929,175,2.811,336,3.72,337,2.894,353,3.72,456,4.968,469,2.687,1625,4.863,1678,5.072,3439,7.241,3440,5.683,3441,7.241,3442,5.683,3443,5.683,3444,5.683,3465,6.215,3466,6.215]],["t/1624",[3,2.787,20,1.962,35,1.811,44,4.579,50,1.415,64,2.099,100,3.181,129,3.374,213,4.989,256,3.404,312,3.601,470,1.37,484,3.792,679,2.66,682,5.488,715,4.889,998,5.215,1078,4.889,1374,4.797,1475,5.488,2893,5.836]],["t/1626",[21,1.848,33,1.498,37,1.891,59,1.623,72,1.576,81,0.965,104,0.9,107,1.697,129,4.097,177,1.775,346,1.763,393,4.096,623,2.248,666,6.339,692,2.805,696,2.805,697,2.805,700,2.845,701,1.971,877,3.591,1374,3.139,1513,3.335,1608,4.343,1770,2.979,2893,8.55,3467,5.061,3468,5.061,3469,4.628,3470,5.061,3471,4.628,3472,5.061]],["t/1628",[3,1.141,20,1.661,23,1.376,35,1.021,50,0.798,51,0.961,59,0.711,64,1.184,66,1.896,73,1.118,80,0.914,81,0.832,104,0.776,110,0.802,112,2.29,159,1.337,167,2.297,177,2.759,189,4.37,216,2.042,231,2.031,346,1.52,356,2.031,382,2.139,393,2.694,432,2.418,491,2.941,559,1.561,624,2.187,625,2.139,627,2.392,628,1.794,679,1.5,698,2.706,799,3.99,1076,2.453,1374,2.706,1491,6.419,2893,7.07,3469,3.99,3473,4.363,3474,4.363,3475,4.363,3476,4.363,3477,4.363,3478,4.363,3479,4.363,3480,4.363,3481,4.363,3482,4.363,3483,4.363,3484,4.363,3485,4.363]],["t/1630",[3,0.836,33,0.947,35,2.347,37,1.797,40,1.265,49,1.772,50,0.941,51,0.935,72,0.431,104,1.148,107,2.164,111,1.193,129,1.395,130,2.116,147,0.985,167,1.122,177,1.122,183,2.234,185,1.184,186,2.61,214,2.21,216,0.997,225,3.47,227,1.337,256,1.408,346,3.636,382,2.522,393,1.315,401,1.853,402,2.744,518,2.269,565,1.641,614,2.502,628,1.315,637,4.866,673,1.725,679,1.769,727,1.702,746,1.168,758,4.869,820,2.336,910,2.336,925,2.61,1513,3.39,1717,2.269,2486,2.269,2782,3.65,2803,3.39,2814,2.502,2847,2.502,2869,5.579,2879,4.351,2881,2.502,2882,2.61,2883,2.413,2884,2.336,2888,2.744,2889,2.744,2892,2.744,2893,6.531,2894,2.925,2895,2.925,2896,2.925,2897,2.744,2898,2.61,2899,2.925,2900,2.925,2901,2.925,3461,2.744,3486,2.925,3487,2.925,3488,2.925]],["t/1632",[51,0.859,104,1.477,382,4.071,467,3.032,637,4.668,750,3.688,758,6.265,2803,5.472,2879,5.598,2884,6.066,3461,7.125,3486,7.593,3487,7.593,3488,7.593,3489,8.303]],["t/1634",[51,0.924,148,2.88,150,4.993,637,4.768,758,8.38,2107,6.196,3490,8.481,3491,8.481,3492,8.481]],["t/1636",[50,1.838,51,0.889,64,2.206,312,3.787,393,4.132,470,1.44,679,4.024,1044,6.363,1045,6.637,3493,8.133]],["t/1638",[3,2.398,20,2.326,88,3.546,109,4.933,111,3.42,2707,7.869,3494,9.17]],["t/1640",[72,1.235,80,1.921,81,1.749,105,4.631,107,3.075,1150,6.919,3495,8.386]],["t/1642",[3,1.454,20,1.981,23,1.754,50,1.017,51,0.921,59,1.273,64,1.508,65,1.976,66,2.262,72,1.052,73,2.002,74,2.233,81,1.723,95,2.834,107,1.864,109,2.539,110,1.66,142,5.399,145,3.172,147,2.784,156,4.061,159,1.703,248,2.25,299,2.641,356,2.588,470,0.985,485,4.194,559,1.989,572,5.084,624,2.787,625,2.726,627,2.03,628,2.286,2864,5.084,3218,4.061,3496,5.559,3497,5.559,3498,7.813,3499,5.559]],["t/1644",[3,1.434,20,1.39,50,1.003,59,1.261,88,2.12,105,3.317,110,1.422,128,2.717,145,3.128,151,2.717,175,2.48,185,2.03,186,4.474,187,2.717,216,2.412,222,5.49,226,5.951,238,4.631,253,2.717,329,4.474,380,4.444,381,5.216,429,3.156,435,1.85,483,3.128,509,5.098,691,4.349,747,3.339,1303,4.136,1636,4.704,1717,5.49,1770,3.227,1820,3.89,2062,7.075,2707,4.704,2862,4.29,3428,6.639,3500,5.482,3501,5.482,3502,5.482,3503,5.482,3504,5.482,3505,5.013,3506,5.482,3507,5.013,3508,5.482,3509,4.704]],["t/1646",[59,1.669,72,1.379,105,4.935,226,5.934,227,4.282,3495,7.674,3510,10.242,3511,8.391]],["t/1648",[3,0.66,20,1.074,23,0.796,48,0.857,50,0.775,51,0.962,59,1.404,64,0.685,65,1.944,66,1.226,67,2.951,72,0.961,73,1.641,74,2.197,80,0.887,81,1.044,88,0.976,110,1.747,112,2.607,142,1.744,147,1.305,185,1.568,189,3.431,227,1.77,238,1.511,253,1.251,299,2.599,356,1.175,380,2.099,391,2.166,456,3.771,463,3.094,467,0.922,469,1.831,513,3.456,559,0.903,601,3.901,624,1.265,625,1.238,627,0.922,628,1.038,747,2.579,1757,2.166,1820,3.005,2096,3.195,2245,2.308,2497,3.314,3130,3.873,3509,2.166,3512,2.524,3513,6.405,3514,4.235,3515,3.005,3516,2.524,3517,4.235,3518,2.524,3519,4.235,3520,2.524,3521,4.235,3522,4.235,3523,4.235,3524,4.235,3525,6.405,3526,2.524,3527,2.524,3528,2.524,3529,5.471,3530,2.524,3531,2.524,3532,2.524,3533,2.524,3534,2.308,3535,2.524,3536,2.524,3537,5.471,3538,2.524,3539,2.524,3540,2.524,3541,6.405,3542,2.524,3543,2.524,3544,2.524,3545,2.524]],["t/1651",[0,4.474,20,1.39,44,2.578,49,3.038,51,0.428,114,2.578,128,2.717,132,2.435,179,3.227,213,3.536,233,3.339,240,3.788,244,3.038,355,3.176,356,2.553,380,2.717,469,2.371,471,4.005,476,4.474,482,2.997,575,2.504,617,2.882,625,3.793,683,4.704,745,2.748,756,5.013,758,4.136,810,3.4,837,3.227,838,4.136,1014,4.474,1272,4.474,1275,4.474,1289,4.29,1385,4.29,1930,4.704,2812,4.29,3187,5.013,3446,4.29,3546,5.482,3547,5.013,3548,5.482,3549,5.482,3550,5.482,3551,5.482,3552,5.482,3553,5.482,3554,5.482,3555,5.482,3556,5.482,3557,5.013,3558,5.013,3559,5.013,3560,5.482,3561,5.482,3562,5.482,3563,5.482,3564,5.482,3565,5.482,3566,5.482,3567,5.482,3568,5.482,3569,5.482,3570,5.013,3571,5.482]],["t/1653",[20,1.516,50,1.094,60,3.743,147,2.533,174,3.269,185,2.214,248,2.42,312,2.784,469,3.554,521,4.243,594,5.131,681,4.368,693,4.368,837,4.839,842,4.132,888,4.839,889,5.679,1013,5.541,1092,5.131,1148,6.201,1339,5.468,1415,5.131,1465,3.857,1623,5.468,1662,5.468,2089,5.131,3257,5.679,3515,5.832,3547,5.468,3570,5.468,3572,8.219,3573,5.98,3574,5.468,3575,5.98,3576,5.98,3577,5.468,3578,5.98,3579,5.98,3580,5.98,3581,5.98,3582,5.98,3583,5.98]],["t/1655",[20,2.041,60,3.978,145,5.696,888,5.877,1013,6.731,1148,7.533,1465,5.192,3257,6.898,3515,7.084,3584,8.05,3585,8.05,3586,8.05,3587,8.05]],["t/1657",[20,2.041,60,3.978,145,5.696,888,5.877,1013,6.731,1148,7.533,1465,5.192,3257,6.898,3515,7.084,3588,8.05,3589,8.05,3590,8.05,3591,8.05]],["t/1659",[20,2.041,60,3.978,145,5.696,888,5.877,1013,6.731,1148,7.533,1465,5.192,2270,7.361,3257,6.898,3515,7.084,3592,8.05,3593,8.05,3594,8.05]],["t/1661",[20,2.041,60,3.978,145,5.696,888,5.877,1013,6.731,1148,7.533,1465,5.192,3257,6.898,3515,7.084,3595,8.05,3596,8.05,3597,8.05,3598,8.05]],["t/1663",[4,3.79,21,1.769,51,0.553,88,1.873,121,5.512,181,4.039,185,2.621,317,3.675,356,3.895,387,2.375,417,4.665,469,4.421,483,2.764,575,3.233,601,2.95,617,4.397,625,2.375,731,2.35,745,2.428,823,4.43,879,4.43,1014,5.777,1030,3.437,1049,5.539,1078,4.475,1142,4.43,1398,5.777,1613,5.539,2308,3.539,2617,6.473,3257,3.347,3334,4.43,3418,4.43,3515,6.945,3557,4.43,3558,4.43,3559,4.43,3577,6.473,3599,4.844,3600,4.844,3601,4.844,3602,4.844,3603,4.844,3604,4.844,3605,4.844,3606,4.844,3607,7.079,3608,7.079,3609,4.844,3610,4.844,3611,4.43,3612,4.844,3613,4.844]],["t/1666",[4,5.146,20,2.223,39,3.093,50,1.203,63,6.014,179,5.16,180,3.547,239,2.869,242,6.014,248,2.662,470,1.165,559,2.353,590,3.457,618,6.614,628,2.705,800,4.962,1076,3.697,1128,5.146,1218,5.644,1239,4.242,1245,5.644,1385,5.146,1446,5.146,2665,6.014,2697,5.644,2808,6.014,3614,8.766,3615,6.014,3616,6.577,3617,6.577,3618,6.577,3619,6.577,3620,6.577,3621,6.577,3622,6.577,3623,6.577,3624,6.577,3625,6.577]],["t/1668",[3,1.625,48,2.11,50,1.544,51,0.659,59,1.751,60,2.477,81,1.185,88,3.263,108,2.979,110,1.142,128,3.081,145,4.815,249,3.546,309,3.352,312,3.929,470,1.101,619,4.815,688,2.983,757,5.683,859,6.886,1078,5.334,1291,5.072,1747,4.41,1823,4.689,2053,4.689,2233,6.603,2994,5.683,3446,4.863,3626,5.683,3627,6.215,3628,6.215,3629,5.683,3630,6.215,3631,6.215,3632,6.215]],["t/1670",[0,3.069,20,2.354,21,2.62,39,3.374,50,1.481,51,0.849,121,2.478,167,1.319,179,4.224,192,3.772,194,3.036,213,4.628,239,2.551,371,1.67,435,1.973,470,1.271,476,3.069,483,2.146,559,2.092,688,1.805,758,5.414,804,6.158,838,2.838,842,2.599,875,4.272,955,3.439,1008,2.748,1068,1.929,1121,3.069,1128,5.615,1166,2.29,1239,2.426,1255,2.332,1278,3.439,1292,2.943,1297,3.227,1309,2.377,1340,3.439,1422,5.348,1580,2.251,1615,2.838,1619,2.838,1659,2.599,1708,3.227,2682,3.439,2980,5.018,3073,2.536,3264,3.439,3360,5.348,3515,2.669,3534,3.439,3574,3.439,3611,3.439,3633,10.289,3634,3.439,3635,5.348,3636,3.761,3637,3.439,3638,3.761,3639,3.761,3640,5.848,3641,3.761,3642,3.761,3643,3.761,3644,5.848,3645,3.761,3646,5.848,3647,3.761,3648,3.761,3649,3.761,3650,3.761,3651,3.761,3652,3.761,3653,3.761,3654,3.761,3655,3.761]],["t/1672",[20,2.286,35,2.111,51,0.835,59,1.81,73,1.758,80,1.438,81,1.309,88,2.653,104,1.221,110,1.261,132,3.048,145,5.144,175,3.104,189,3.048,233,4.179,312,3.195,381,4.626,470,1.215,627,2.506,769,5.396,1111,3.751,1309,4.338,1659,4.741,1930,5.889,3656,6.862,3657,6.862]],["t/1674",[3,2.043,20,2.485,50,1.429,56,5.147,100,3.212,114,5.035,312,3.637,560,3.673,688,3.749,1064,5.894,1065,5.894,1066,5.543,1067,6.112,1068,4.007,1069,5.894,1070,5.706,1071,5.894,1119,6.703,2146,5.543,3658,7.811]],["t/1676",[51,0.784,57,6.363,191,4.275,575,3.714,684,5.771,759,5.771,871,7.437,1401,6.136,2013,5.359,2820,7.437,3615,7.437,3659,7.437,3660,8.133,3661,8.133,3662,8.133,3663,8.133,3664,7.437,3665,8.133]],["t/1678",[20,0.927,23,1.153,27,2.027,33,1.082,51,0.966,59,1.299,64,0.992,65,2.033,66,1.059,72,0.492,73,0.937,74,3.201,80,1.477,81,1.521,95,2.556,101,2.189,110,1.59,112,1.666,180,3.086,193,3.659,261,1.72,299,1.737,394,2.311,470,1.013,505,4.751,515,2.759,575,1.67,619,2.086,673,1.972,688,1.755,739,4.289,746,1.335,1309,2.311,1627,1.999,1677,3.344,1747,2.595,2429,2.984,2739,3.138,3217,3.344,3223,6.445,3224,5.751,3659,3.344,3666,3.657,3667,3.657,3668,3.657,3669,3.657,3670,3.657,3671,5.721,3672,3.657,3673,3.657,3674,3.657,3675,3.657,3676,3.657,3677,3.657,3678,3.657,3679,3.657,3680,3.657,3681,3.657,3682,3.657,3683,3.657,3684,3.657,3685,3.657,3686,3.657]],["t/1681",[3,1.626,20,2.305,23,1.284,35,1.455,48,1.382,50,1.137,51,0.885,59,1.562,64,1.104,65,2.209,66,1.179,72,0.548,73,1.043,74,1.635,80,1.58,81,1.438,88,2.915,108,1.437,110,1.551,121,2.683,145,2.323,159,2.31,187,2.018,193,3.227,194,3.227,217,5.073,223,2.813,225,1.409,248,1.648,261,1.914,299,1.934,315,4.295,429,3.076,470,1.335,483,2.323,548,2.525,587,3.185,619,2.323,694,2.683,746,1.487,1078,2.573,1110,3.322,1369,3.723,1550,3.185,1654,3.723,1823,3.071,1854,3.493,2233,3.185,2317,5.684,2815,3.493,2902,3.493,3073,2.745,3427,6.471,3429,3.723,3430,3.723,3431,3.723,3687,6.216,3688,3.493,3689,4.071,3690,4.071,3691,4.071,3692,4.071,3693,4.071,3694,4.071,3695,6.216,3696,4.071]],["t/1683",[20,1.275,33,2.153,35,2.001,48,1.708,51,0.904,59,1.782,60,2.899,80,1.054,81,0.959,88,2.812,110,1.337,132,3.231,146,3.475,189,2.233,193,4.862,194,5.377,216,1.568,223,3.475,315,5.026,398,2.493,467,2.656,470,0.891,523,4.104,575,2.297,995,3.674,1415,6.242,2135,3.674,2145,4.104,2146,3.568,2308,5.314,2658,4.315,3436,5.936,3697,7.815,3698,4.599,3699,4.599,3700,4.599,3701,5.029,3702,5.029,3703,5.029]],["t/1685",[20,1.43,33,1.67,35,1.63,48,3.091,50,0.657,51,0.915,59,1.8,60,2.247,73,0.92,81,0.685,88,3.316,104,1.003,110,1.28,112,1.642,142,2.481,145,2.048,146,2.481,175,1.624,189,3.093,191,1.887,193,2.928,194,4.453,216,1.119,223,2.481,233,3.434,261,1.688,317,1.864,355,2.08,366,2.548,367,2.809,369,3.283,372,3.283,381,2.42,435,1.211,442,4.1,467,1.311,470,0.999,509,2.366,559,1.285,575,1.64,601,3.434,625,1.76,627,1.311,684,4.002,769,2.149,800,2.709,853,4.413,906,2.93,1102,2.709,1111,1.962,1166,2.186,1297,3.081,1404,3.081,1465,2.316,1514,3.081,1659,4.812,1706,3.283,2033,3.081,2308,2.623,3428,3.081,3436,4.602,3446,2.809,3634,3.283,3697,5.157,3698,3.283,3699,3.283,3700,3.283,3704,3.59,3705,3.59,3706,3.59,3707,3.59,3708,3.59]],["t/1688",[2,5.093,20,1.505,21,2.167,23,1.872,35,1.389,50,1.496,51,0.853,64,1.61,65,2.906,66,2.367,72,0.799,73,1.521,355,5.42,470,1.051,771,4.101,837,3.494,859,4.843,995,4.336,1111,3.244,1120,7.606,1355,5.427,1441,5.427,1462,5.093,1704,5.427,2074,5.093,2078,5.093,2666,5.427,2667,5.427,3107,5.093,3626,5.427,3709,8.177,3710,5.935,3711,5.427,3712,5.935,3713,5.427,3714,5.935,3715,5.935,3716,5.935,3717,5.935,3718,5.935,3719,5.935]],["t/1690",[48,3.853,139,7.533,179,5.877,216,3.537,317,5.184,355,6.574,441,6.311]],["t/1692",[20,2.396,49,4.087,93,4.756,108,2.603,248,2.985,501,5.564,521,5.233,625,3.615,689,3.926,693,5.387,904,4.491,998,4.972,1098,3.615,1445,6.743,1448,6.743,1666,6.328,1698,4.661,1773,7.595,2925,6.328,3720,8.639,3721,9.532,3722,7.374]],["t/1694",[3,2.064,40,2.601,51,0.953,59,1.072,65,2.338,72,0.886,73,1.685,74,2.642,88,4.159,101,4.723,180,5.066,216,1.368,225,1.519,239,1.914,248,1.776,299,3.125,370,5.453,483,2.503,617,2.306,730,2.335,836,3.58,1770,2.583,1773,4.545,1775,5.368,1776,5.368,1777,5.368,1778,5.368,1779,5.368,1780,5.368,1781,5.368,1782,5.645,1783,5.645,1784,5.645,1785,5.645,1786,5.645,1787,5.645,2233,3.433,3723,4.387]],["t/1696",[3,1.564,40,2.365,50,1.094,51,0.945,59,1.34,65,2.125,72,0.805,73,1.532,74,2.401,80,1.722,81,1.568,88,3.91,106,2.262,110,1.511,180,4.433,248,2.42,286,3.857,298,5.131,299,2.841,370,5.679,650,4.132,1773,4.132,1775,4.88,1776,4.88,1777,4.88,1778,4.88,1779,4.88,1780,4.88,1781,4.88,2919,5.468,3724,5.98,3725,5.98]],["t/1698",[20,2.062,27,4.507,48,2.761,84,3.824,95,2.95,108,2.871,380,4.031,483,4.64,904,4.953,1918,5.359,3726,8.133,3727,7.437,3728,7.437,3729,7.437,3730,7.437,3731,7.437,3732,7.437,3733,7.437,3734,7.437]],["t/1700",[20,1.641,33,3.446,51,0.92,59,1.775,72,0.871,88,2.501,108,2.284,130,2.66,435,2.183,1792,5.916,1918,4.263,3735,7.928,3736,5.916,3737,7.928,3738,6.469,3739,5.916,3740,7.928,3741,5.916,3742,6.469,3743,5.916,3744,5.916,3745,6.469]],["t/1702",[32,4.215,72,1.107,73,2.591,84,3.864,108,2.901,151,4.073,248,4.433,380,4.073,482,4.492,622,1.722,1918,5.415,3727,7.514,3735,7.514,3746,7.514,3747,8.217]],["t/1704",[23,1.376,32,2.238,51,0.943,59,1.527,64,1.184,65,2.328,66,1.263,72,0.882,73,2.015,74,1.752,80,1.648,81,1.5,84,2.052,95,2.376,108,1.54,110,1.722,112,1.907,151,2.163,159,1.337,167,3.066,248,3.539,260,3.414,380,2.163,470,0.773,482,2.385,617,2.293,622,0.914,698,2.706,1211,3.414,1309,2.758,1770,2.568,1773,3.015,1795,5.99,1856,3.99,1918,2.875,3728,7.193,3736,3.99,3748,4.363,3749,7.865,3750,6.551,3751,4.363,3752,4.363,3753,4.363,3754,4.363,3755,4.363,3756,4.363,3757,4.363,3758,4.363,3759,4.363,3760,4.363,3761,4.363]],["t/1706",[32,4.215,72,1.107,73,2.591,84,3.864,108,2.901,151,4.073,380,4.073,482,4.492,622,1.722,1773,7.568,1918,5.415,3729,7.514,3737,7.514,3746,7.514,3762,8.217]],["t/1708",[32,3.968,72,1.042,73,2.495,84,3.637,108,2.731,151,3.834,167,3.415,248,3.131,380,3.834,482,4.228,622,1.621,1309,4.889,1770,4.553,1773,7.729,1918,5.097,3730,8.905,3739,7.073,3763,7.735]],["t/1710",[72,1.155,73,2.659,84,4.032,108,3.027,380,4.25,622,1.796,748,5.834,1863,7.84,1918,5.65,3731,7.84,3740,7.84,3764,8.573]],["t/1712",[72,1.18,73,2.694,84,4.121,108,3.094,380,4.344,622,1.836,1918,5.775,3732,8.014,3741,8.014,3765,8.764,3766,8.764]],["t/1714",[72,1.18,73,2.694,84,4.121,108,3.094,380,4.344,622,1.836,1806,8.014,1918,5.775,3733,8.014,3743,8.014,3767,8.764]],["t/1716",[23,1.465,40,3.228,50,0.85,51,0.89,59,0.757,64,1.26,65,2.439,66,1.345,72,0.924,73,2.74,84,2.184,108,1.64,110,0.854,112,1.352,121,3.061,151,2.302,159,1.423,175,3.105,228,3.634,248,2.778,260,3.634,380,2.302,429,1.895,463,3.393,470,0.823,519,2.302,617,2.442,622,0.973,1255,2.881,1309,2.936,1698,2.936,1753,8.369,1760,6.276,1770,2.734,1773,4.742,1918,5.379,2722,8.246,2739,3.986,3734,6.276,3744,4.247,3768,4.645,3769,4.645,3770,4.645,3771,6.863,3772,4.645,3773,4.645,3774,4.645,3775,4.645,3776,4.645,3777,4.645,3778,4.645,3779,4.645]],["t/1719",[3,0.669,37,1.813,40,1.693,48,0.868,50,0.783,51,0.875,59,1.346,64,0.694,72,1.316,73,2.871,80,1.629,81,1.575,88,4.359,95,2.342,100,1.052,110,1.518,129,1.115,147,2.215,148,0.868,156,1.868,180,2.309,185,2.045,232,1.929,248,2.235,286,4.637,309,1.379,346,0.891,432,1.417,470,0.758,482,1.398,565,1.312,622,0.897,806,3.038,867,1.557,920,1.929,1017,3.493,1058,2.407,1076,1.437,1081,1.929,1213,2.655,1242,1.868,1255,2.655,1300,4.102,1664,2.706,1694,6.302,1698,3.49,1728,2.194,1729,2.194,1730,2.194,1731,2.194,1732,2.194,1733,2.194,1734,2.194,1735,2.194,1736,2.194,1737,2.194,1738,2.194,1739,2.194,1740,2.194,1741,3.673,1742,2.194,1743,2.194,1744,2.087,1745,2.194,1746,2.194,1747,1.814,1748,3.673,1749,3.493,1750,2.194,1751,2.087,1752,2.194]],["t/1721",[37,1.545,40,3.974,51,0.866,59,1.326,80,1.705,81,1.552,93,2.978,95,1.675,110,1.495,130,1.899,147,3.096,151,2.289,159,1.415,248,4.555,249,2.635,470,0.818,510,4.223,521,4.849,579,2.718,624,3.426,625,2.264,632,2.864,673,2.49,689,2.458,699,2.458,843,3.842,846,3.768,892,3.484,1300,5.13,1301,3.613,1580,2.764,2859,3.963,2925,3.963,2985,4.223,3197,3.963,3220,4.223,3688,3.963,3720,4.223,3721,6.249,3780,4.618,3781,4.618,3782,4.618,3783,4.618,3784,4.618,3785,4.618,3786,4.618,3787,4.618]],["t/1723",[26,1.604,40,1.352,48,1.161,50,1.327,51,0.925,56,1.295,59,1.252,80,1.609,81,1.465,84,0.924,88,2.098,95,0.713,108,0.694,110,1.412,112,1.58,121,1.295,130,0.808,146,1.358,147,1.054,151,4.881,167,2.366,177,0.689,180,1.844,191,1.033,225,2.336,231,1.592,248,3.783,314,0.906,336,1.176,346,1.581,366,1.395,370,3.75,384,3.221,469,0.85,470,0.348,601,1.197,609,1.604,624,0.985,628,2.529,636,4.109,666,1.074,681,1.436,683,1.687,689,1.82,695,1.436,729,1.074,810,2.121,820,1.436,835,1.519,847,1.714,1287,1.687,1300,1.122,1312,5.195,1327,1.797,1362,1.797,1408,1.243,1430,1.538,1465,3.501,1477,4.429,1605,1.797,1673,1.687,1676,1.797,1694,2.206,1989,2.935,2782,1.395,2815,1.687,2883,1.483,2913,1.687,3045,1.797,3446,1.538,3711,1.797,3788,1.966,3789,1.797,3790,2.935,3791,1.604,3792,1.966,3793,3.127,3794,1.797,3795,5.427,3796,5.427,3797,1.966,3798,1.966,3799,1.966,3800,1.966,3801,5.018,3802,3.704,3803,1.966,3804,2.791,3805,3.42,3806,1.604,3807,1.797,3808,1.966,3809,3.127,3810,1.966,3811,1.966,3812,1.966,3813,1.966,3814,1.966,3815,1.966,3816,1.966,3817,1.604,3818,1.966,3819,1.966,3820,1.966,3821,1.966,3822,1.966,3823,1.966,3824,1.966,3825,3.42,3826,1.966,3827,1.966,3828,1.966,3829,1.966,3830,1.966,3831,1.966,3832,1.966,3833,1.966,3834,1.966,3835,1.966,3836,1.966,3837,1.966,3838,1.966,3839,1.966,3840,1.966,3841,1.966,3842,1.966,3843,1.966,3844,1.797,3845,1.797,3846,1.797,3847,1.797,3848,1.966,3849,1.966,3850,1.966,3851,1.797]],["t/1725",[20,0.963,37,0.421,40,0.878,50,0.91,51,0.918,59,0.96,80,1.235,81,1.124,88,0.858,107,0.744,110,1.217,150,1.307,151,3.283,190,0.891,220,1.139,225,1.315,248,2.385,314,1.751,346,2.308,357,1.286,359,1.904,380,1.1,416,1.307,456,5.345,469,1.642,470,1.044,519,1.1,601,1.352,688,2.828,800,1.675,835,1.687,837,1.307,998,1.496,1058,2.135,1076,1.248,1213,1.376,1272,1.811,1273,1.621,1293,2.03,1300,2.84,1312,4.272,1333,3.473,1364,3.532,1365,2.03,1426,5.18,1430,1.737,1439,2.03,1465,1.432,1658,1.496,1770,2.236,1995,2.03,2146,1.575,2233,1.737,2624,1.905,2913,1.905,2957,2.03,3112,1.811,3117,2.03,3155,2.03,3688,1.905,3817,1.811,3852,9.079,3853,2.219,3854,2.219,3855,2.219,3856,3.797,3857,2.219,3858,3.797,3859,2.219,3860,2.219,3861,2.219,3862,2.219,3863,3.797,3864,2.219,3865,2.219,3866,2.219,3867,2.219,3868,2.219,3869,2.219,3870,2.219,3871,2.219,3872,2.219,3873,2.219,3874,2.219,3875,2.219,3876,2.219,3877,2.219,3878,2.219,3879,2.219,3880,3.797,3881,2.219,3882,2.219,3883,3.797,3884,3.797,3885,2.219,3886,2.219,3887,2.219,3888,2.219,3889,2.219,3890,2.219,3891,2.219,3892,1.905,3893,3.797,3894,2.219,3895,3.473,3896,2.219,3897,2.219,3898,2.219,3899,5.892,3900,3.797,3901,4.977,3902,4.977,3903,4.977,3904,2.219,3905,4.977,3906,2.219,3907,3.797,3908,2.219,3909,2.219,3910,2.219,3911,2.219,3912,2.219,3913,2.219,3914,2.219,3915,2.219,3916,2.219,3917,2.219,3918,2.219,3919,2.219,3920,2.219,3921,2.219,3922,2.219,3923,2.219,3924,2.219,3925,2.219,3926,2.219,3927,2.219]],["t/1727",[3,2.555,20,1.4,21,2.016,40,3.559,48,2.64,50,1.01,51,0.834,56,3.638,59,1.267,60,3.098,80,1.157,81,1.483,95,2.002,106,3.404,108,3.636,110,1.429,147,2.396,148,2.64,159,1.691,192,3.561,216,1.721,239,2.408,248,2.234,253,3.854,286,3.561,336,3.304,337,3.62,380,2.736,470,0.978,681,4.033,877,3.917,1109,2.736,1242,4.033,1300,3.15,1694,3.561,1698,3.49,1747,3.917,1751,4.505,1753,4.32,2656,4.737]],["t/1729",[3,2.476,50,1.111,51,0.941,65,2.158,72,0.818,73,1.556,74,2.438,88,3.935,101,3.634,180,4.479,248,2.457,299,2.884,370,4.195,394,3.838,579,3.574,688,2.914,1385,4.751,1773,5.739,1775,4.955,1776,4.955,1777,4.955,1778,4.955,1779,4.955,1780,4.955,1781,4.955,1782,5.21,1783,5.21,1784,5.21,1785,5.21,1786,5.21,1787,5.21,3817,4.955,3928,6.071]],["t/1732",[20,2.015,33,1.313,37,1.259,50,1.213,51,0.842,59,1.295,73,1.699,80,0.929,81,0.846,95,2.406,104,0.789,108,2.805,110,0.815,114,4.438,129,3.846,130,1.824,132,2.946,149,2.923,159,1.359,167,1.556,181,2.531,216,1.383,225,1.536,250,4.583,256,1.953,337,2.066,346,1.546,380,2.199,429,2.706,536,5.804,560,4.146,590,5.395,607,2.861,627,1.62,657,3.471,699,2.362,759,3.148,769,2.655,886,3.471,1091,5.306,1096,6.652,1109,2.199,1110,3.62,1111,2.425,1112,4.057,1114,2.804,1115,2.57,1118,2.923,1543,4.057,2677,4.057,2708,4.057,3929,4.436,3930,4.436,3931,4.436]],["t/1734",[20,1.206,21,1.737,23,1.5,51,0.924,59,0.775,61,3.252,64,1.895,65,2.482,66,1.377,72,0.641,73,1.219,80,0.997,81,0.907,110,0.874,114,4.289,132,2.112,159,1.457,175,2.152,191,2.5,261,2.237,299,2.26,337,2.215,345,3.722,435,1.605,470,0.842,559,1.702,560,4.937,590,2.5,627,1.737,659,2.5,995,3.475,1058,2.674,1064,3.589,1065,3.589,1066,5.873,1067,3.722,1068,4.984,1069,3.589,1070,3.475,1071,3.589,1082,4.082,1086,4.082,1091,2.674,1109,2.358,1111,2.6,1114,3.007,1115,2.756,1116,2.756,1162,3.068,1186,4.082,1218,4.082,1248,3.882,1249,4.082,1545,4.35,3505,4.35]],["t/1737",[20,0.75,27,2.677,33,2.304,34,1.835,37,1.585,44,1.391,50,1.292,51,0.936,59,1.361,64,0.803,67,1.596,72,0.65,81,0.564,84,3.322,107,1.619,110,1.43,112,1.782,167,1.038,183,1.024,189,3.457,190,1.188,239,1.291,256,2.126,311,1.518,315,2.044,346,1.683,359,4.416,371,1.314,393,1.217,398,1.467,456,2.843,463,2.161,467,2.235,469,1.279,470,0.855,476,2.414,483,1.688,559,1.059,562,1.995,617,1.555,699,1.575,706,1.663,746,2.579,893,2.161,906,2.414,1008,2.161,1078,1.87,1237,2.706,1247,2.044,1291,2.414,1408,1.87,1426,1.688,1514,2.539,1550,2.315,1559,2.706,1614,2.539,1659,2.044,1664,1.87,1913,2.539,2053,3.644,2784,2.232,3789,4.417,3932,2.959,3933,6.12,3934,4.83,3935,2.959,3936,2.959,3937,2.959,3938,2.959,3939,2.959,3940,2.959,3941,2.959,3942,2.959,3943,2.959,3944,2.959,3945,7.063,3946,2.959,3947,2.959,3948,2.959,3949,2.959,3950,2.959,3951,2.959,3952,2.959,3953,2.959,3954,2.959,3955,2.959,3956,2.959,3957,2.959,3958,2.959,3959,2.959,3960,2.959,3961,2.959,3962,2.959,3963,2.959,3964,2.959,3965,2.959,3966,2.959,3967,2.959]],["t/1739",[3,0.669,37,1.813,40,1.693,48,0.868,50,0.783,51,0.875,59,1.346,64,0.694,72,1.316,73,2.871,80,1.629,81,1.575,88,4.359,95,2.342,100,1.052,110,1.518,129,1.115,147,2.215,148,0.868,156,1.868,180,2.309,185,2.045,232,1.929,248,2.235,286,4.637,309,1.379,346,0.891,432,1.417,470,0.758,482,1.398,565,1.312,622,0.897,806,3.038,867,1.557,920,1.929,1017,3.493,1058,2.407,1076,1.437,1081,1.929,1213,2.655,1242,1.868,1255,2.655,1300,4.102,1664,2.706,1694,6.302,1698,3.49,1728,2.194,1729,2.194,1730,2.194,1731,2.194,1732,2.194,1733,2.194,1734,2.194,1735,2.194,1736,2.194,1737,2.194,1738,2.194,1739,2.194,1740,2.194,1741,3.673,1742,2.194,1743,2.194,1744,2.087,1745,2.194,1746,2.194,1747,1.814,1748,3.673,1749,3.493,1750,2.194,1751,2.087,1752,2.194]],["t/1742",[20,0.805,33,0.939,37,1.791,51,0.941,59,1.046,72,0.991,80,1.345,81,1.224,93,2.046,108,1.12,120,2.589,132,1.409,148,1.735,149,6.418,159,1.966,185,1.175,231,1.477,271,2.349,330,2.192,355,1.838,387,1.555,398,1.572,441,2.005,470,0.905,553,4.386,562,6.115,571,2.452,622,0.665,632,1.967,689,1.689,695,2.318,731,1.539,835,2.27,847,1.59,1068,1.627,1076,1.783,1083,2.394,1212,2.901,1221,2.901,1300,1.81,1546,2.394,1555,5.726,2135,2.318,2146,3.627,2465,2.722,2825,2.722,3107,6.315,3968,2.722,3969,3.172,3970,3.172,3971,3.172,3972,3.172,3973,3.172,3974,3.172,3975,3.172,3976,3.172,3977,3.172,3978,5.111,3979,5.111,3980,3.172,3981,5.111,3982,3.172,3983,3.172,3984,3.172,3985,3.172,3986,2.901,3987,6.418,3988,6.418,3989,3.172,3990,3.172,3991,3.172,3992,6.418,3993,5.111,3994,3.172,3995,3.172,3996,3.172,3997,3.172]],["t/1744",[50,1.595,51,0.946,59,1.421,72,0.878,80,1.827,81,1.663,95,2.366,151,3.233,166,4.123,167,2.288,248,2.64,271,2.082,470,1.155,571,2.173,622,1.367,636,5.98,835,2.897,3804,5.323,3806,5.323,3998,6.522,3999,5.964,4000,8.718,4001,5.964,4002,5.964,4003,5.964]],["t/1746",[51,0.77,59,1.286,72,1.062,73,2.755,80,1.653,81,1.505,110,1.812,179,4.644,216,2.459,244,4.372,271,2.518,470,1.397,571,2.629,622,1.653,1627,4.312,4004,7.889,4005,7.889,4006,7.889]],["t/1748",[37,1.611,51,0.902,59,1.021,60,2.496,72,0.844,80,1.312,81,1.195,148,3.267,159,1.919,185,2.319,216,1.953,271,2,311,3.214,346,3.352,435,2.113,469,3.669,470,1.109,571,2.087,622,1.312,759,6.02,847,4.253,1770,3.688,1905,8.255,2034,5.375,2644,5.375,3410,8.797,4007,6.264,4008,8.484]],["t/1750",[33,1.963,37,1.259,51,0.934,59,1.081,60,2.643,72,0.893,80,1.39,81,1.265,148,2.252,159,2.032,185,2.456,216,2.067,232,7.471,271,2.117,311,3.402,398,5.23,470,1.175,571,2.21,622,1.39,2492,8.497,4009,6.632,4010,6.632,4011,6.632,4012,6.632,4013,6.065]],["t/1752",[37,1.804,51,0.925,59,1.213,72,1.002,80,1.56,81,1.42,110,1.368,159,2.28,271,2.376,314,3.432,470,1.318,571,2.48,622,1.56,632,4.616,642,5.616,739,3.69,835,3.306,2106,6.807,4014,7.443,4015,7.443,4016,7.443]],["t/1754",[35,1.49,50,1.164,51,0.871,59,1.581,72,0.857,80,1.334,81,1.636,95,2.308,110,1.17,114,2.993,131,3.388,159,1.95,271,2.032,309,3.433,337,2.964,389,6.085,467,3.132,470,1.127,560,2.993,571,2.121,590,3.346,622,1.334,657,4.98,843,4.821,1042,5.82,1091,4.821,1109,3.155,1115,3.688,1116,4.969,1747,4.516,4017,6.365,4018,6.365,4019,6.365]],["t/1756",[50,1.146,51,0.841,59,1.021,61,4.479,72,0.844,80,1.312,81,1.195,88,2.422,110,1.768,131,3.335,147,2.614,216,1.953,239,2.733,249,3.574,271,2,327,2.64,346,2.183,359,3.14,393,2.576,456,3.688,470,1.109,571,2.087,622,1.312,688,3.007,1098,3.071,1426,3.574,1621,4.04,1627,3.424,1635,4.04,1664,5.363,1855,4.128,2096,4.726,2637,7.28,4020,6.264,4021,6.264,4022,6.264,4023,6.264]],["t/1758",[33,2.558,37,0.974,50,0.938,51,0.887,59,0.836,61,2.387,66,0.922,72,0.429,80,0.667,81,0.608,88,1.232,110,0.942,112,0.927,129,1.389,131,1.696,147,0.981,167,1.798,189,2.858,191,1.674,216,0.993,239,1.389,249,1.817,253,1.579,256,3.247,271,1.017,311,3.302,346,1.11,355,2.971,359,1.597,393,1.31,398,4.008,401,4.274,416,3.018,429,2.092,432,1.765,433,2.054,456,5.086,463,4.701,469,1.377,470,0.908,483,1.817,559,1.14,562,3.457,571,1.061,622,0.667,632,1.975,657,2.492,688,1.529,746,2.953,847,1.597,1008,2.327,1098,1.562,1247,3.543,1255,1.975,1264,2.599,1426,4.614,1434,2.599,1621,2.054,1627,1.741,1635,2.054,1658,2.147,1664,5.111,1855,2.099,2005,4.184,2006,4.184,2009,4.4,2010,4.184,2011,4.4,2023,2.733,2132,2.913,2784,2.403,3047,4.4,4024,5.127,4025,3.185,4026,2.733,4027,2.733,4028,2.913,4029,2.913,4030,3.185,4031,3.185,4032,3.185,4033,2.733,4034,3.185,4035,2.733,4036,2.733,4037,3.185,4038,6.436,4039,3.185,4040,3.185,4041,3.185,4042,3.185,4043,3.185]],["t/1760",[37,0.769,50,0.741,51,0.922,59,1.225,72,0.545,80,1.575,81,1.434,111,2.309,159,1.241,167,2.952,216,1.93,225,1.402,231,1.886,271,1.293,317,3.215,346,2.157,356,1.886,357,3.587,382,4.689,435,1.366,470,1.097,501,3.056,519,2.007,571,1.349,622,0.849,637,5.769,691,2.277,694,2.669,698,2.512,729,2.214,749,3.771,1058,2.277,1076,2.277,1077,3.475,1078,2.56,1150,3.056,1546,3.056,1550,3.169,1722,2.874,1770,2.384,2572,3.056,2847,3.169,2871,3.704,2883,4.672,2884,4.523,2893,3.056,2898,5.053,2902,3.475,2948,5.662,4044,4.05,4045,4.05,4046,4.05,4047,4.05,4048,4.05,4049,4.05,4050,4.05,4051,4.05,4052,4.05,4053,4.05,4054,3.704,4055,5.662,4056,4.05,4057,4.05,4058,4.05,4059,4.05]],["t/1762",[51,0.884,59,1.09,72,0.901,80,1.401,81,1.276,110,1.229,179,3.937,271,2.135,315,4.621,394,5.603,470,1.184,521,4.746,571,2.228,622,1.401,688,3.21,699,3.56,746,3.237,1123,3.875,1446,5.233,1627,3.656,1667,5.458,3817,5.458,4060,9.943,4061,6.688,4062,6.688,4063,6.688,4064,6.688,4065,6.688,4066,6.116,4067,6.688,4068,6.688]],["t/1764",[72,1.032,110,1.408,129,3.342,131,4.078,174,4.187,180,4.131,238,4.585,271,2.445,346,2.669,394,4.842,571,2.552,622,1.605,635,5.779,673,4.131,688,3.676,689,4.078,1123,4.438,1816,6.573,1820,5.435,1858,8.305,2028,7.005,2595,6.251,3509,6.573,4069,7.66]],["t/1766",[33,1.548,37,1.915,40,2.068,51,0.919,59,0.852,72,0.704,80,1.095,81,0.997,107,2.929,159,1.602,167,1.834,190,2.1,216,2.332,271,1.669,346,1.822,382,2.563,432,2.898,433,3.372,435,1.764,470,0.926,571,1.742,622,1.095,637,5.9,746,1.909,910,3.82,1722,3.71,1723,4.487,2486,3.71,2884,3.82,2898,4.267,3379,4.487,4028,4.781,4054,4.781,4055,4.781,4070,5.228,4071,5.228,4072,5.228,4073,5.228,4074,5.228,4075,5.228,4076,5.228,4077,5.228,4078,5.228,4079,5.228,4080,5.228,4081,5.228,4082,5.228,4083,5.228,4084,5.228]],["t/1768",[35,1.4,37,1.783,50,1.094,51,0.876,59,0.975,72,0.805,80,1.253,81,1.141,88,2.312,110,1.511,131,3.183,159,1.832,177,3.294,187,2.964,216,1.864,225,2.07,239,2.609,249,3.412,271,1.909,346,3.272,359,2.997,393,2.459,429,2.44,432,3.314,433,5.302,470,1.059,571,1.992,622,1.253,637,5.28,688,2.87,1098,2.932,1621,3.857,1627,3.269,1635,3.857,4085,5.98,4086,4.132,4087,5.98,4088,5.98]],["t/1770",[35,1.895,37,1.537,39,3.806,40,3.2,51,0.849,59,1.319,72,0.787,80,1.225,81,1.115,84,2.75,110,1.487,148,1.985,151,4.012,159,1.791,232,4.412,271,1.867,398,2.898,470,1.036,571,1.948,622,1.225,769,3.5,860,6.604,1015,4.575,1296,7.574,1619,7.003,2492,5.018,2557,5.018,2847,6.332,4089,5.847,4090,5.847,4091,5.847,4092,5.847,4093,8.093,4094,9.281,4095,8.093]],["t/1772",[50,1.451,51,0.932,59,1.293,72,0.765,80,1.19,81,1.083,129,2.477,148,2.693,149,6.857,159,1.74,185,2.103,271,1.813,337,4.845,398,2.815,470,1.006,505,5.347,513,4.634,514,6.806,562,3.829,571,1.892,622,1.19,689,3.023,837,3.343,847,2.847,1011,5.193,1109,3.931,1266,5.193,1555,4.03,2135,5.794,4096,5.679,4097,9.138,4098,5.679]],["t/1774",[37,1.238,39,5.137,51,0.853,59,1.421,72,0.878,80,1.367,81,1.244,110,1.602,146,4.507,167,2.288,177,2.288,189,2.897,271,2.082,311,3.346,401,3.779,470,1.155,571,2.173,622,1.367,691,3.667,731,4.228,1123,3.779,1239,4.207,1374,4.045,1580,3.904,1855,4.298,2021,5.597,4099,6.522,4100,5.323,4101,6.522,4102,5.597,4103,5.323,4104,5.323]],["t/1776",[37,1.783,50,1.094,51,0.892,59,0.975,72,0.805,80,1.253,81,1.141,88,2.312,110,1.511,131,3.183,146,4.132,167,2.883,177,2.097,187,2.964,216,1.864,239,2.609,249,3.412,271,1.909,311,3.068,346,3.524,359,2.997,393,2.459,401,4.762,432,3.314,470,1.059,571,1.992,622,1.253,688,2.87,691,3.362,731,3.987,1098,2.932,1621,3.857,1627,3.269,1635,3.857,1855,3.94,4086,4.132,4105,5.98,4106,5.98]],["t/1778",[72,1.249,107,3.111,271,2.962,571,3.091,622,1.944,3471,8.484,4107,9.278]],["t/1780",[33,2.421,37,1.776,50,1.086,51,0.874,59,0.967,72,0.799,80,1.243,81,1.132,88,2.295,110,1.503,131,3.159,147,1.829,148,2.015,159,1.818,185,2.198,216,1.85,239,2.589,249,3.386,271,1.895,311,3.045,346,2.068,359,2.975,393,2.441,432,4.532,470,1.051,571,1.977,601,3.614,622,1.243,688,2.849,692,3.289,847,2.975,1098,2.91,1300,3.386,1621,3.828,1627,3.244,1635,3.828,2135,5.973,3218,4.336,3892,5.093,4086,4.101,4108,8.177,4109,5.935]],["t/1782",[72,1.207,110,1.647,147,2.762,148,3.043,166,5.665,185,3.319,271,2.861,571,2.986,622,1.878,4110,8.962]],["t/1784",[33,1.693,37,1.742,50,1.046,51,0.865,59,0.932,60,2.279,72,0.77,80,1.199,81,1.091,88,2.212,110,1.465,131,3.045,147,1.763,148,1.942,159,1.752,185,2.118,216,1.783,239,2.495,249,3.264,271,1.826,311,2.934,346,1.993,359,2.867,393,2.352,432,4.417,470,1.013,571,1.906,601,3.484,622,1.199,688,2.745,847,2.867,1098,2.804,1300,3.264,1513,3.769,1621,3.69,1627,3.127,1635,3.69,2135,4.179,3218,4.179,3892,4.909,4086,3.952,4111,5.72,4112,5.72,4113,5.72,4114,5.72,4115,5.72,4116,5.72,4117,5.72,4118,5.72,4119,5.72]],["t/1786",[60,3.571,72,1.207,110,1.647,148,3.043,166,5.665,185,3.319,271,2.861,571,2.986,622,1.878,4120,8.962]],["t/1788",[37,1.552,49,3.289,51,0.853,59,1.643,67,3.201,72,0.799,80,1.96,81,1.784,110,1.853,151,2.942,159,1.818,167,2.081,248,2.402,271,1.895,314,3.77,389,4.211,469,2.566,470,1.448,571,1.977,622,1.243,636,3.614,835,2.636,1578,5.093,1659,4.101,2497,4.644,4121,5.935,4122,5.935,4123,5.427,4124,5.935,4125,5.093,4126,5.935,4127,5.935,4128,5.427,4129,5.935,4130,5.935,4131,5.935,4132,5.935]],["t/1790",[37,1.259,50,1.213,51,0.882,59,1.081,72,0.893,80,1.39,81,1.265,88,2.564,110,1.62,131,3.53,148,2.252,159,2.032,185,2.456,216,2.067,239,2.893,249,3.784,271,2.117,346,2.311,359,3.324,393,2.727,470,1.175,571,2.21,622,1.39,688,3.183,739,3.287,1098,3.251,1621,4.278,1627,3.625,1635,4.278,2650,6.065,4133,8.815,4134,6.065,4135,6.632,4136,6.632]],["t/1792",[20,2.235,37,1.259,51,0.9,59,1.081,72,0.893,73,2.258,80,1.39,81,1.265,110,1.62,147,2.716,148,2.993,159,2.032,213,4.278,271,2.117,470,1.175,571,2.21,622,1.39,932,3.904,999,6.255,1111,3.625,1213,4.113,2423,4.845,2635,4.845,2636,7.471,2649,6.065,2685,5.691,4137,6.632]],["t/1794",[37,1.326,51,0.894,59,1.138,72,0.94,80,1.463,81,1.332,110,1.283,147,2.152,148,2.371,159,2.139,222,6.471,271,2.229,470,1.237,571,2.327,622,1.463,847,3.5,932,5.369,999,4.955,1389,5.699,1426,5.204,2635,5.102,2636,6.881,4138,9.12,4139,9.12]],["t/1796",[33,3.147,37,1.144,51,0.894,59,0.982,61,2.805,72,0.811,80,1.262,81,1.149,107,2.02,110,1.518,111,3.081,147,1.857,148,2.046,151,2.987,159,1.846,183,2.86,185,2.231,271,1.923,311,3.091,398,4.674,470,1.067,571,2.008,622,1.262,689,3.208,847,3.02,1300,4.714,1555,4.275,2129,5.171,2145,4.917,2146,4.275,2624,5.171,3968,5.171,4140,6.025,4141,6.025,4142,6.025,4143,6.025]],["t/1798",[51,0.905,59,1.191,72,0.984,80,1.531,81,1.394,107,2.45,110,1.907,111,3.502,147,2.894,159,2.238,183,2.529,271,2.332,470,1.294,571,2.434,622,1.531,4144,9.391,4145,9.391,4146,7.306,4147,7.306]],["t/1800",[33,2.521,37,1.375,50,0.914,51,0.931,59,1.18,64,1.356,72,0.673,80,1.047,81,0.953,110,1.331,129,3.159,148,1.697,167,3.476,216,1.558,256,3.187,271,1.595,355,4.933,398,4.221,435,1.686,470,0.885,562,5.741,571,1.665,622,1.047,689,2.66,746,2.644,1147,6.821,1330,7.477,2705,3.546,3713,4.57,4148,4.997,4149,6.213,4150,4.288,4151,4.997,4152,8.012,4153,4.997,4154,4.997]],["t/1802",[33,1.508,35,1.192,37,1.634,51,0.897,59,1.197,60,2.03,72,0.686,80,1.067,81,0.972,95,2.663,100,3.019,110,1.349,129,2.222,159,1.56,167,3.304,256,3.231,271,1.626,355,4.254,429,2.078,435,1.719,442,2.999,470,0.902,501,3.843,504,3.986,571,1.697,622,1.067,746,2.681,769,3.049,1147,6.288,1330,7.107,1667,7.687,4149,6.3,4150,4.371,4152,7.387,4155,7.341,4156,5.094,4157,5.094,4158,5.094,4159,7.341,4160,5.094,4161,5.094,4162,5.094]],["t/1804",[32,3.49,37,1.292,51,0.905,59,1.109,72,0.916,80,1.425,81,1.298,106,2.573,148,2.31,159,2.084,185,2.519,271,2.172,311,3.49,470,1.205,559,2.434,571,2.267,622,1.425,727,3.622,759,7.115,3664,6.221,4163,6.803,4164,6.221,4165,6.803,4166,6.803,4167,8.965,4168,8.965,4169,6.803,4170,6.803]],["t/1806",[3,1.576,50,1.102,51,0.878,59,1.347,72,0.811,80,1.262,81,1.576,95,2.185,106,2.279,110,1.733,129,4.113,147,2.546,191,3.167,240,4.163,248,2.439,256,2.652,271,1.923,286,3.886,346,2.099,393,2.478,429,2.458,436,7.114,470,1.067,571,2.008,622,1.262,843,3.387,1076,3.387,1300,3.438,1424,5.171,1747,4.275,3218,4.402,4171,6.025,4172,6.025,4173,8.262,4174,6.025,4175,6.025,4176,6.025]],["t/1808",[37,1.454,40,3.029,51,0.756,59,1.248,60,3.052,72,1.032,80,1.605,81,1.461,110,1.408,112,2.23,148,2.601,151,3.797,185,2.836,216,2.388,271,2.445,470,1.357,571,2.552,622,1.605,847,3.84,1855,5.048,2497,5.994,4177,7.66,4178,7.66,4179,7.66]],["t/1810",[37,2.044,51,0.894,59,1.138,72,0.94,80,1.463,81,1.332,95,3.308,110,1.283,147,2.152,185,2.586,225,2.417,271,2.229,429,2.849,470,1.237,571,2.327,622,1.463,769,4.18,1663,5.993,1664,5.765,1855,4.602,4180,5.699,4181,6.983,4182,9.12,4183,6.983]],["t/1812",[37,0.824,39,4.618,51,0.959,59,1.063,67,2.34,72,0.584,80,0.909,81,0.828,110,1.441,112,1.899,177,2.749,189,4.361,244,2.405,271,1.385,346,2.273,357,2.514,387,2.127,401,4.542,413,2.998,416,3.84,470,0.768,571,1.446,622,0.909,691,2.439,1121,3.541,1123,2.514,1374,2.691,1408,2.743,1474,3.395,1475,3.079,1855,2.859,2021,5.598,2022,5.105,2818,3.968,3022,3.723,4100,3.541,4102,3.723,4103,3.541,4104,3.541,4184,4.339,4185,5.598,4186,3.723,4187,4.339,4188,4.339,4189,4.339,4190,3.723,4191,3.723,4192,3.723,4193,3.723,4194,3.723,4195,3.723,4196,3.723,4197,3.723]],["t/1814",[51,0.849,56,3.853,59,1.773,72,0.787,80,1.945,81,1.77,88,2.261,95,2.935,106,3.511,110,1.706,159,2.843,248,4.054,253,4.012,271,1.867,286,5.22,336,3.5,337,2.722,380,2.898,429,2.385,470,1.036,571,1.948,622,1.225,746,2.135,1098,2.867,1300,3.336,1371,4.575,1406,4.271,1823,4.412,4198,5.847,4199,5.847,4200,5.847]],["t/1816",[37,1.281,50,1.234,51,0.886,59,1.099,72,0.908,80,1.413,81,1.287,88,2.608,110,1.638,131,3.591,147,2.078,159,2.066,216,2.103,239,2.942,249,3.848,271,2.153,274,3.687,314,3.11,346,2.35,359,3.381,393,2.774,470,1.195,571,2.247,622,1.413,688,3.237,1098,3.307,1621,4.351,1627,3.687,1635,4.351,3166,6.168,4201,6.745,4202,6.745,4203,6.745]],["t/1818",[35,1.438,37,1.59,50,1.124,51,0.93,59,1.217,72,0.54,80,1.565,81,1.425,82,3.271,88,1.55,95,1.454,110,1.129,131,2.134,151,4.15,177,1.406,187,3.045,216,1.25,225,1.388,239,1.749,244,2.222,248,3.389,249,2.287,271,1.28,346,2.602,359,2.009,393,1.649,429,1.636,470,1.323,571,1.336,622,0.84,636,3.741,688,1.924,689,2.134,694,2.642,695,2.929,731,2.98,864,3.025,1098,1.965,1224,2.929,1312,3.963,1477,3.271,1621,2.586,1627,2.191,1635,2.586,1673,3.44,1678,5.013,2595,3.271,3790,5.272,3793,3.666,3794,5.618,3804,3.271,3806,3.271,3844,3.666,3845,3.666,3846,3.666,3847,3.666,3999,3.666,4001,3.666,4002,3.666,4003,5.618,4086,2.77,4204,4.009,4205,6.143,4206,4.009,4207,4.009,4208,4.009,4209,4.009]],["t/1820",[35,1.379,37,1.118,50,1.488,51,0.872,59,1.638,72,0.793,80,1.234,81,1.124,95,2.95,110,1.495,147,1.815,151,4.619,187,2.92,189,2.616,190,3.267,248,2.384,271,1.88,387,2.888,470,1.043,484,2.888,571,1.963,622,1.234,636,3.587,653,5.055,673,3.177,689,3.136,773,3.526,864,4.444,1364,5.772,1390,7.03,1427,4.807,1513,3.882,4125,5.055,4210,5.891,4211,5.891,4212,5.891,4213,5.891,4214,5.891]],["t/1822",[40,3.319,50,1.536,51,0.883,59,1.368,66,1.785,72,0.83,80,1.292,81,1.176,95,2.236,129,2.69,151,4.161,191,3.241,253,3.056,271,1.968,311,4.306,416,3.63,429,2.516,470,1.487,571,2.055,622,1.292,636,5.112,746,3.485,1247,4.261,1513,5.531,1546,4.652,2822,5.639,4125,5.291,4215,5.291,4216,6.166,4217,6.166,4218,6.166,4219,6.166,4220,6.166,4221,6.166]],["t/1824",[37,1.872,40,3.467,51,0.898,59,1.072,72,0.886,80,1.378,81,1.254,84,3.093,106,2.488,147,2.026,191,3.457,225,2.277,249,3.752,253,3.26,271,2.099,314,3.032,429,2.683,432,3.645,470,1.165,523,5.367,571,2.191,622,1.378,624,3.297,699,3.501,769,3.936,2070,4.434,2789,7.154,3804,5.367,4222,6.014,4223,6.577,4224,6.577,4225,6.577]],["t/1826",[37,1.804,51,0.91,59,1.213,72,1.002,80,1.56,81,1.42,147,2.928,159,2.28,185,3.877,271,2.376,470,1.318,571,2.48,622,1.56,642,7.17,699,3.963,908,4.705,2648,6.388,4226,7.443]],["t/1828",[32,1.986,37,0.735,51,0.965,59,1.531,72,0.805,80,1.722,81,1.695,108,1.367,110,0.712,150,4.302,151,1.919,159,2.722,166,2.447,183,1.34,248,1.567,271,1.909,432,2.146,470,1.574,482,2.116,571,1.29,622,0.811,699,2.061,754,2.497,778,3.709,4227,3.54,4228,8.886,4229,8.886,4230,3.871,4231,3.871,4232,3.871,4233,3.871,4234,3.871,4235,3.871,4236,3.871,4237,3.871,4238,3.871,4239,3.871,4240,3.871,4241,3.871,4242,3.871,4243,3.871,4244,3.871,4245,3.871,4246,5.981,4247,3.871,4248,3.871,4249,3.871,4250,7.308,4251,3.871,4252,3.871,4253,5.981,4254,3.871]],["t/1830",[32,3.931,35,1.266,37,2.015,50,0.989,51,0.87,59,0.881,72,0.728,80,1.133,81,1.031,88,2.091,110,1.635,131,2.879,150,5.238,151,2.68,159,1.656,177,1.896,187,2.68,216,1.686,225,1.872,239,2.359,248,2.189,249,3.085,271,1.726,346,2.67,359,2.71,393,2.224,429,2.206,470,0.958,482,2.956,571,1.802,622,1.133,688,2.595,689,2.879,694,3.563,699,2.879,754,3.488,1098,2.651,1621,3.488,1627,2.956,1635,3.488,4086,3.736,4255,5.407,4256,5.407,4257,5.407,4258,5.407,4259,5.407,4260,8.898,4261,5.407]],["t/1832",[32,3.838,35,1.224,37,0.993,51,0.902,59,0.852,72,0.704,80,1.095,81,0.997,107,2.508,110,1.605,111,3.762,147,1.611,150,4.404,151,4.33,159,1.602,177,1.834,183,3.633,187,2.592,225,1.81,248,2.116,271,1.669,346,1.822,429,2.133,470,0.926,482,2.858,484,2.563,571,1.742,622,1.095,673,2.82,699,2.783,754,3.372,889,3.613,1363,5.853,1709,4.091,1770,3.078,2705,3.71,4086,3.613,4227,4.781,4262,4.487,4263,5.228,4264,7.48,4265,7.48,4266,7.48]],["t/1834",[32,3.749,35,1.711,37,0.961,51,0.885,59,0.825,72,0.682,80,1.06,81,0.965,110,1.576,147,1.559,150,4.302,151,4.251,159,1.55,177,1.775,187,3.622,225,1.752,248,2.048,271,1.616,346,1.763,387,3.583,429,2.065,470,0.896,482,2.766,484,2.481,571,1.686,622,1.06,636,3.082,673,2.73,689,2.694,699,2.694,754,3.264,773,3.029,778,5.319,835,3.809,864,3.819,889,3.497,1390,5.514,1709,3.96,1770,2.979,2705,3.591,4086,3.497,4262,4.343,4267,9.392,4268,5.061,4269,5.061,4270,7.307,4271,7.307,4272,7.307,4273,5.061]],["t/1836",[32,3.802,35,1.735,37,0.98,51,0.875,59,0.841,72,0.695,80,1.081,81,0.984,110,1.594,147,1.59,150,4.362,151,4.298,159,1.581,177,1.81,187,3.673,190,2.976,225,1.786,231,2.403,248,2.089,271,1.647,346,1.798,387,3.633,429,2.105,470,0.914,482,2.821,484,2.53,571,1.719,622,1.081,636,3.143,673,2.783,689,2.747,699,2.747,754,3.328,773,3.089,835,4.64,864,3.893,889,3.565,1364,5.258,1390,5.591,1709,4.038,1770,3.038,2705,3.662,4086,3.565,4262,4.428,4274,5.16,4275,5.16,4276,5.16,4277,5.16,4278,7.41]],["t/1838",[33,1.391,37,1.561,50,1.267,51,0.928,59,1.128,66,1.361,72,0.633,80,0.985,81,0.896,95,1.705,110,0.864,112,1.368,129,2.05,150,4.839,151,3.432,159,1.44,167,2.428,189,3.651,191,2.471,253,2.33,271,1.5,311,4.217,416,2.767,429,2.825,432,2.605,433,3.032,456,4.076,469,2.032,470,1.226,471,3.434,483,2.682,559,1.682,571,1.566,622,0.985,746,3.002,1008,3.434,1247,3.248,1255,2.915,1264,3.835,1434,3.835,1546,3.546,4026,4.033,4027,4.033,4033,4.033,4035,4.033,4036,4.033,4215,4.033,4279,6.924,4280,4.7,4281,4.7,4282,4.7,4283,4.7,4284,4.298,4285,4.298,4286,4.298,4287,4.7]],["t/1840",[33,1.9,51,0.937,59,1.405,72,0.864,80,1.344,81,1.224,110,1.179,159,1.966,190,2.577,271,2.048,327,2.705,413,4.434,470,1.136,571,2.138,622,1.344,699,3.416,746,2.343,1408,6.582,1495,4.841,1533,5.868,2308,4.687,4288,6.416,4289,6.416,4290,9.739,4291,6.416,4292,6.416,4293,6.416,4294,6.416,4295,6.416]],["t/1842",[35,1.292,37,1.048,40,2.183,51,0.857,59,1.592,72,0.743,80,1.886,81,1.717,110,1.963,159,1.691,185,2.044,190,2.217,193,5.072,194,2.866,271,1.762,314,2.545,470,1.377,571,1.839,622,1.157,688,2.65,689,2.939,847,4.511,1364,3.917,2070,3.722,2201,4.737,2204,4.32,3073,3.722,3791,4.505,4134,5.048,4180,4.505,4296,5.52,4297,5.52,4298,5.52,4299,5.52,4300,5.52,4301,5.52,4302,5.52,4303,5.52,4304,5.52,4305,7.775]],["t/1844",[20,1.787,33,1.425,35,1.127,37,0.914,51,0.86,59,1.495,72,0.648,80,1.746,81,1.59,110,1.532,150,5.401,151,2.386,159,1.475,166,3.043,167,2.472,177,1.689,185,1.783,190,1.933,191,2.531,193,4.763,194,2.5,248,2.852,271,1.537,309,2.597,432,2.668,433,3.105,442,2.834,469,2.082,470,0.853,571,1.604,609,3.929,622,1.009,636,4.292,689,3.752,745,2.413,847,3.532,1076,2.707,1115,4.829,1364,3.416,2070,3.246,2204,3.767,3073,3.246,3791,3.929,3806,3.929,3807,4.403,4180,3.929,4306,4.814,4307,4.814,4308,7.047,4309,4.814,4310,4.814,4311,4.814,4312,4.814,4313,4.814]],["t/1846",[33,1.646,35,1.301,37,1.055,51,0.836,59,1.597,72,0.749,80,1.893,81,1.723,110,1.66,148,1.888,159,1.703,185,2.059,187,2.756,190,2.233,193,5.088,194,2.886,271,1.775,314,3.603,385,5.084,470,0.985,571,1.852,622,1.165,689,2.959,847,3.916,864,4.194,1364,3.945,1555,3.945,1627,4.271,1659,3.841,2070,5.268,2204,4.35,2706,5.084,3073,3.748,3791,4.537,4123,5.084,4128,5.084,4180,4.537,4314,5.559,4315,5.084,4316,5.559,4317,5.559,4318,5.559,4319,5.559]],["t/1848",[3,1.843,21,2.573,35,2.147,37,1.742,50,1.678,54,5.513,59,1.148,60,2.808,72,0.949,114,4.314,129,3.074,191,3.703,256,3.101,271,2.249,442,4.148,509,4.643,560,4.314,571,2.348,590,4.822,603,5.75,622,1.476,657,5.513,673,3.8,1091,5.157,1096,5.316,1555,4.999,4320,7.045]],["t/1850",[51,0.883,59,1.299,72,1.073,80,1.67,81,1.52,110,1.465,147,3.057,159,2.441,271,2.544,470,1.411,571,2.655,622,1.67,1388,6.838,4321,9.921,4322,7.969,4323,7.969]],["t/1852",[33,1.321,37,1.513,50,1.219,51,0.92,59,1.086,66,1.292,72,0.601,80,0.935,81,0.851,95,1.618,110,0.82,112,1.299,129,1.946,147,2.052,148,2.262,159,1.367,167,2.796,189,3.54,191,2.345,253,2.211,271,1.424,311,4.089,416,2.626,429,3.252,432,3.692,433,4.297,456,3.921,463,5.823,469,1.929,470,1.18,471,4.866,483,2.545,559,1.596,571,1.486,622,0.935,746,2.911,1008,3.259,1247,3.083,1255,2.767,1264,3.641,1434,3.641,1546,3.366,1658,3.008,3288,4.08,4026,3.828,4027,3.828,4033,3.828,4035,3.828,4036,3.828,4215,3.828,4284,4.08,4285,4.08,4286,4.08,4324,6.661,4325,4.461,4326,4.461,4327,4.461,4328,4.461,4329,4.461]],["t/1854",[51,0.87,59,1.248,60,3.857,72,1.032,80,1.605,81,1.461,110,1.779,112,2.23,159,2.347,271,2.445,337,4.506,470,1.357,571,2.552,622,1.605,1109,3.797,1388,6.573,4330,9.678,4331,7.66]],["t/1856",[40,2.401,51,0.795,56,4.001,59,1.543,72,0.818,80,1.74,81,1.584,88,2.347,95,3.012,106,3.142,110,1.526,175,2.747,248,2.457,249,3.464,253,3.01,271,1.938,380,4.692,470,1.075,484,2.977,523,4.955,571,2.023,617,3.192,622,1.272,731,2.945,769,3.634,1062,4.955,1300,3.464,1474,4.751,2060,5.552,2070,4.093,3436,4.955,3441,5.21,3635,5.552,4222,7.595,4332,6.071,4333,6.071,4334,6.071,4335,6.071,4336,6.071]],["t/1858",[3,1.386,51,0.944,59,1.231,72,1.017,80,1.582,81,1.44,88,2.049,105,2.272,110,1.763,167,1.858,189,3.354,220,2.718,248,3.882,253,2.626,271,1.691,286,4.871,380,2.626,470,1.337,571,1.765,622,1.11,727,2.821,746,1.935,1300,3.023,1495,3.998,1542,4.845,1770,3.119,4337,5.298,4338,5.298,4339,8.799,4340,5.298,4341,5.298,4342,5.298,4343,5.298,4344,7.552,4345,5.298,4346,5.298,4347,7.552,4348,5.298]],["t/1860",[37,0.914,39,4.955,40,1.904,50,0.881,51,0.957,59,1.149,67,2.597,72,0.648,80,1.009,81,0.918,95,1.746,110,1.295,112,2.052,177,1.689,189,4.53,271,1.537,401,4.083,416,2.834,470,0.853,571,1.604,622,1.009,1123,2.789,1374,4.37,1408,3.043,1474,3.767,1475,3.416,1855,3.173,2022,5.514,3022,6.047,4100,5.751,4102,4.131,4103,3.929,4104,3.929,4185,4.131,4186,4.131,4190,4.131,4191,4.131,4192,4.131,4193,4.131,4194,4.131,4195,4.131,4196,4.131,4197,4.131,4349,4.814]],["t/1862",[37,0.872,39,4.881,40,1.815,50,0.84,51,0.955,59,1.109,67,2.476,72,0.618,80,0.962,81,0.876,95,1.665,110,1.251,112,1.981,177,1.61,189,4.454,271,1.466,401,3.942,416,2.703,470,0.813,516,4.198,571,1.53,622,0.962,679,3.449,925,3.746,1123,2.66,1166,2.796,1374,4.22,1408,2.902,1474,3.592,1475,3.258,1855,3.025,2022,5.324,4100,5.553,4103,3.746,4104,3.746,4185,3.94,4186,3.94,4190,3.94,4191,3.94,4192,3.94,4193,3.94,4194,3.94,4195,3.94,4196,3.94,4197,3.94,4350,4.591,4351,4.591]],["t/1864",[32,4.088,51,0.843,72,1.073,95,2.89,107,2.672,111,2.972,185,2.951,271,2.544,470,1.411,571,2.655,622,1.67,706,4.48,907,7.287,908,5.037,910,7.248,1363,6.235,1427,6.503,2648,6.838]],["t/1866",[20,1.292,33,1.508,37,0.967,50,0.932,51,0.886,59,1.627,60,2.03,61,2.372,72,1.159,80,1.538,81,1.4,95,1.847,110,1.582,132,2.262,159,2.249,185,1.886,190,2.046,216,1.588,271,2.748,327,2.147,336,3.049,337,4.843,470,1.3,546,4.371,549,4.157,571,2.868,613,3.843,619,2.906,622,1.538,771,3.519,808,3.986,837,2.999,1109,4.267,2637,4.371,3218,3.721,3637,4.658,4352,5.094,4353,5.094,4354,5.094,4355,5.094,4356,5.094,4357,5.094,4358,5.094,4359,5.094]],["t/1868",[33,1.558,35,1.232,37,0.999,39,4.123,40,2.972,50,0.963,51,0.789,59,1.429,60,2.097,72,0.709,80,1.575,81,1.434,95,1.909,107,1.765,108,1.858,110,1.611,111,1.963,148,1.787,181,3.003,183,1.822,185,1.949,216,2.343,220,2.7,271,1.68,311,2.7,314,3.466,330,5.193,398,2.609,429,2.147,470,1.331,571,1.754,622,1.103,632,3.264,689,2.802,691,2.959,699,2.802,944,3.395,1076,2.959,1083,3.971,1296,4.295,1312,3.395,1770,3.098,2033,4.517,2557,4.517,2825,4.517,3073,3.548,3129,4.813,3809,4.813,4360,5.263,4361,5.263,4362,4.813,4363,5.263,4364,5.263,4365,5.263,4366,5.263]],["t/1870",[27,3.444,33,1.84,50,1.137,51,0.865,59,1.375,60,2.477,61,3.929,72,0.837,80,1.302,81,1.185,110,1.551,190,2.496,193,4.975,194,4.381,216,1.937,271,1.984,315,5.831,336,3.72,337,3.929,470,1.101,571,2.071,622,1.302,694,4.095,1109,3.081,1291,5.072,2266,7.717,2784,4.689,3073,4.19,3218,4.54,4362,5.683,4367,6.215,4368,8.438,4369,6.215,4370,6.215]],["t/1872",[33,2.731,37,1.752,51,0.899,59,1.159,72,0.957,80,1.489,81,1.356,148,2.414,159,2.178,177,2.493,185,2.632,216,2.216,271,2.269,311,3.647,346,2.477,398,3.524,470,1.259,571,2.369,622,1.489,696,3.94,697,3.94,847,3.563,2135,6.74,4164,6.501,4315,6.501]],["t/1874",[33,2.129,37,1.765,48,1.681,50,0.558,51,0.914,59,0.807,61,1.42,72,0.667,80,1.037,81,0.944,104,0.543,107,1.66,110,1.557,111,1.846,112,0.888,129,1.331,132,1.355,139,3.735,189,2.199,216,0.951,225,1.056,309,2.67,346,1.725,417,2.51,443,4.04,456,2.914,467,2.282,470,0.877,480,5.715,491,2.056,505,3.338,565,1.565,622,0.639,628,1.254,632,1.892,745,2.482,746,1.114,1116,1.767,1147,3.617,1213,1.892,1426,2.825,1527,2.489,1664,1.928,2096,3.735,2526,2.789,2572,2.301,2705,4.434,3047,5.363,3112,4.04,3232,2.789,3379,2.617,3895,4.527,4371,3.05,4372,3.05,4373,4.951,4374,3.05,4375,3.05,4376,4.951,4377,4.951,4378,4.951,4379,6.249,4380,6.249,4381,4.951,4382,3.05,4383,8.47,4384,3.05,4385,4.951,4386,3.05,4387,3.05,4388,3.05,4389,3.05,4390,3.05,4391,3.05,4392,3.05,4393,3.05,4394,3.05,4395,3.05,4396,3.05,4397,3.05,4398,3.05,4399,3.05,4400,3.05,4401,4.951,4402,4.951,4403,4.951,4404,3.05,4405,3.05,4406,3.05,4407,3.05,4408,3.05,4409,3.05,4410,3.05]],["t/1876",[27,4.049,51,0.905,59,1.191,72,0.984,80,1.531,81,1.394,84,3.436,128,4.655,129,3.187,159,2.238,216,2.278,238,5.621,271,2.332,470,1.294,571,3.458,622,1.531,847,3.662,1820,5.184,4411,7.306,4412,7.306,4413,7.306]],["t/1878",[72,1.249,107,3.111,271,2.962,571,3.091,622,1.944,4414,9.278,4415,9.278]],["t/1880",[51,0.882,59,1.614,60,2.643,72,0.893,80,2.075,81,1.889,95,2.405,110,1.82,112,1.931,147,2.043,185,2.456,190,2.663,193,3.443,216,2.067,271,2.117,470,1.175,571,2.937,622,1.39,689,3.53,4066,6.065,4416,6.632,4417,6.632,4418,6.632,4419,6.632,4420,6.632,4421,6.632,4422,6.632]],["t/1882",[32,3.319,35,1.514,37,1.646,50,1.183,51,0.894,59,1.054,72,0.871,80,1.355,81,1.234,110,1.189,147,1.993,159,1.982,167,2.269,179,3.808,190,2.598,231,3.012,271,2.065,413,4.47,470,1.146,571,2.155,622,1.355,739,3.207,1242,4.726,1660,5.279,2486,4.59,3790,5.551,4423,9.779,4424,6.469,4425,6.469,4426,6.469,4427,6.469,4428,6.469,4429,8.67,4430,6.469]],["t/1884",[27,3.417,33,2.485,37,1.594,39,2.9,51,0.937,59,1.005,72,0.83,80,1.292,81,1.176,148,2.094,159,1.889,185,2.283,216,1.922,271,1.968,398,3.056,470,1.092,562,4.157,571,2.797,622,1.292,847,3.091,904,3.755,1083,4.652,1555,5.956,2129,5.291,2145,5.032,2146,5.956,2465,5.291,3986,5.639,4013,5.639,4431,6.166,4432,6.166,4433,6.166,4434,6.166,4435,6.166]],["t/1886",[51,0.888,59,1.109,72,0.916,80,1.425,81,1.298,84,4.216,110,1.648,112,1.98,128,4.444,159,2.084,216,3.126,238,6.001,271,2.172,328,5.323,470,1.205,571,3.341,622,1.425,694,4.483,1820,4.827,3507,8.198,3629,8.198,4436,6.803]],["t/1888",[14,4.407,37,1.02,51,0.923,56,3.539,59,0.875,60,2.14,72,0.723,80,1.125,81,1.024,84,4.169,148,3.01,149,5.842,159,1.645,271,1.714,274,5.275,309,2.896,311,3.912,441,4.82,470,0.951,565,2.755,571,1.789,622,1.125,689,2.859,691,3.019,893,3.923,904,4.643,1058,3.019,1322,4.911,2034,4.609,2459,9.32,2497,4.202,2644,4.609,3106,4.911,4437,5.37,4438,7.625,4439,5.37,4440,5.37]],["t/1890",[51,0.872,59,1.486,72,0.94,80,1.463,81,1.332,129,3.046,159,2.139,189,3.101,190,2.804,271,2.229,327,2.944,337,5.013,470,1.237,571,2.327,622,1.463,892,5.269,1109,5.034,1211,5.464,3234,5.993,3801,5.699,3802,5.699,4441,5.993,4442,6.983,4443,6.983,4444,5.993]],["t/1892",[37,1.683,51,0.884,59,1.445,72,0.901,80,1.401,81,1.276,129,2.918,159,2.049,189,2.97,190,2.686,271,2.135,337,5.271,470,1.184,571,2.228,622,1.401,666,3.656,843,3.76,1109,4.928,1211,5.233,3801,5.458,3802,5.458,4441,5.739,4444,5.739,4445,6.688,4446,6.688,4447,6.688]],["t/1894",[37,1.742,51,0.874,59,1.495,72,0.949,80,1.476,81,1.344,159,2.158,189,3.129,190,2.829,271,2.249,337,5.03,470,1.248,571,2.348,622,1.476,1109,5.056,1211,5.513,3801,5.75,3802,5.75,4441,6.046,4444,6.046,4448,7.045,4449,7.045,4450,7.045]],["t/1896",[32,3.49,51,0.888,59,1.109,72,0.916,80,1.425,81,1.298,107,2.281,111,3.343,147,3.09,148,2.31,159,2.084,271,2.172,311,3.49,317,3.532,470,1.205,515,5.133,571,2.267,622,1.425,810,4.219,1120,5.133,1363,5.323,1426,5.115,1509,6.221,2782,4.827,3968,5.838,4451,8.965,4452,6.803,4453,6.803]],["t/1898",[20,1.981,33,1.646,37,1.483,50,1.017,51,0.913,59,1.273,64,1.508,72,0.749,80,1.165,81,1.06,110,1.022,129,3.408,148,1.888,159,1.703,167,2.74,216,1.733,256,3.439,271,1.775,398,2.756,435,1.876,470,0.985,571,1.852,622,1.165,689,2.959,746,2.853,995,4.061,1147,4.061,1330,5.895,2005,6.376,2006,4.537,2705,3.945,4029,5.084,4149,6.705,4150,4.771,4152,4.771,4454,5.559,4455,5.559,4456,5.559,4457,5.559,4458,5.559,4459,5.559,4460,5.559,4461,5.559,4462,5.559]],["t/1900",[16,10.015,20,2.381,100,3.861,3073,6.329,4463,9.388]],["t/1902",[3,2.427,20,2.353,21,3.388,22,5.865,100,3.816,101,5.553,4464,8.484]],["t/1904",[105,4.173,225,3.37,4465,9.735]],["t/1906",[3,1.187,32,2.328,33,1.343,34,2.814,35,1.885,37,1.529,50,1.943,53,4.265,106,1.717,107,1.522,108,2.382,109,2.072,110,1.48,112,2.344,130,1.866,132,3.96,147,2.079,167,1.592,174,2.481,185,2.982,190,1.822,216,2.103,248,1.837,250,5.564,253,2.249,346,2.351,394,2.869,435,1.531,509,2.99,519,2.249,544,4.15,580,3.551,614,3.551,741,2.328,847,5.005,1015,3.551,1325,5.505,1423,3.894,1848,6.91,2454,3.703,4466,4.538,4467,4.538,4468,4.538,4469,4.538,4470,4.538,4471,4.538,4472,6.746,4473,4.538,4474,6.746,4475,4.538,4476,4.538,4477,6.746,4478,4.538,4479,4.538,4480,4.538,4481,4.538,4482,4.538,4483,4.538]],["t/1908",[470,1.724,673,5.25,1627,5.321]],["t/1910",[15,3.254,23,1.122,37,1.063,51,0.951,59,1.129,64,0.965,65,1.99,66,1.03,67,1.919,72,1.058,73,0.912,74,1.429,80,0.745,81,1.068,110,1.57,112,1.63,132,1.58,142,2.458,167,2.428,189,3.793,238,2.129,261,1.673,299,1.69,467,1.299,491,2.399,575,1.625,580,2.784,581,3.254,587,2.784,591,3.053,592,3.053,653,3.053,1513,5.976,1820,2.525,1848,4.805,2978,3.254,3239,5.121,3851,3.254,4464,3.254,4484,3.558,4485,3.558,4486,3.558,4487,3.558,4488,3.558,4489,3.558,4490,3.558,4491,3.558,4492,3.558,4493,3.558,4494,3.558,4495,3.558,4496,3.558,4497,6.924,4498,5.6,4499,3.558,4500,3.558,4501,3.558,4502,3.558,4503,3.558,4504,3.558,4505,3.558,4506,3.558,4507,3.558,4508,3.558,4509,3.558,4510,3.558,4511,3.558,4512,3.558,4513,3.558,4514,3.558,4515,3.558,4516,3.558,4517,3.558,4518,3.558,4519,3.558,4520,3.558,4521,3.558,4522,3.558,4523,3.558,4524,3.558,4525,3.558,4526,3.558]]],"invertedIndex":[["",{"_index":51,"t":{"733":{"position":[[258,1],[333,2]]},"737":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[570,1],[572,2],[588,2],[591,1],[759,1],[761,2],[777,2],[780,1],[802,1]]},"739":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[427,2],[536,1],[538,2],[554,2],[557,1],[579,1]]},"741":{"position":[[20,1],[159,1],[173,1],[179,2],[200,2],[383,1],[385,2],[421,2],[424,2],[513,1],[515,2],[531,2],[534,1],[556,1]]},"751":{"position":[[20,1],[160,1],[174,1],[180,2],[373,3],[377,1],[417,1],[476,2],[524,1],[686,2],[689,3],[693,2],[725,1]]},"759":{"position":[[82,2]]},"761":{"position":[[20,1],[95,1],[109,1],[115,2],[170,1],[199,2],[206,2],[323,1],[377,1]]},"763":{"position":[[20,1],[138,1],[152,1],[171,2],[336,1],[342,2],[397,1],[426,2],[433,2],[483,1],[537,1]]},"771":{"position":[[458,1]]},"773":{"position":[[626,1],[780,1],[794,1],[798,1],[839,3],[919,1],[937,2],[944,1],[955,2],[1020,1],[1022,2],[1129,1],[1131,1],[1165,2],[1205,2],[1212,2],[1309,3],[1332,2],[1360,1],[1369,2],[1410,2],[1417,1],[1473,1],[1491,1],[1554,1],[1571,2],[1612,1],[1621,2],[1662,2],[1669,1],[1711,1],[1853,2],[1856,1],[1894,2],[1928,1]]},"775":{"position":[[134,1],[152,2],[159,1],[170,2],[235,1],[237,2],[321,1],[323,1],[338,2],[341,2]]},"785":{"position":[[20,1],[114,1],[128,1],[134,2],[159,2],[236,3],[279,1],[318,2],[352,1]]},"795":{"position":[[20,1],[118,1],[132,1],[138,2],[160,2],[277,3],[320,1],[359,2],[369,2],[397,2],[404,1],[453,1],[455,1]]},"799":{"position":[[34,1]]},"805":{"position":[[20,1],[131,1],[145,1],[151,2],[166,2],[207,2],[257,2],[366,3],[370,2],[446,1],[479,1],[486,2],[514,2],[537,2],[574,2],[584,2],[592,2],[601,1],[649,1],[651,2],[679,2],[764,1],[778,1],[780,2],[802,2],[855,2],[913,2],[960,2],[967,1],[1022,1],[1061,1],[1099,1],[1135,1],[1173,1],[1180,2],[1220,2],[1256,2],[1312,1],[1314,1],[1322,1]]},"807":{"position":[[125,1],[244,1]]},"809":{"position":[[20,1],[164,1],[170,1],[172,2],[245,2],[324,2],[410,1],[424,1],[430,2],[445,2],[536,2],[581,1],[617,2],[624,1],[665,1],[667,2],[708,2],[758,2],[893,2],[896,3],[900,2],[976,1],[1009,1],[1016,2],[1044,2],[1067,2],[1104,2],[1114,2],[1122,2],[1131,1],[1179,1],[1181,2],[1209,2],[1294,1],[1308,1],[1310,2],[1332,2],[1385,2],[1443,2],[1484,2],[1491,1],[1588,1],[1627,1],[1665,1],[1701,1],[1739,1],[1746,2],[1786,2],[1822,2],[1878,1],[1880,1],[1888,1]]},"815":{"position":[[691,1],[801,1],[815,1],[821,2],[898,3],[942,1],[970,2],[973,1],[1008,1],[1057,1],[1059,2],[1112,2],[1129,1],[1207,1],[1209,2],[1294,2],[1337,1],[1339,1]]},"823":{"position":[[365,2]]},"827":{"position":[[85,1],[134,1],[157,2],[171,1],[238,1],[240,1],[262,1],[332,1],[346,1],[352,2],[374,2],[377,1],[415,2],[430,1],[445,2],[454,1],[456,1],[462,2],[792,1],[869,2],[876,2],[879,1],[948,1],[977,2],[1000,1]]},"847":{"position":[[77,1],[146,1],[181,2]]},"851":{"position":[[4,2],[33,4],[94,1]]},"857":{"position":[[20,1],[97,1],[111,1],[117,2],[172,1],[174,2],[223,2],[306,1],[350,1],[384,2],[444,1],[446,2],[523,2],[559,2],[592,2],[633,2],[636,2],[639,2],[737,1],[767,1],[773,1],[791,1],[814,2],[821,1],[855,1],[892,1],[923,2],[930,1],[965,1],[967,1],[969,3],[1004,2],[1069,2],[1108,1]]},"859":{"position":[[130,2],[207,1],[256,2],[259,3],[320,4]]},"862":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"874":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"876":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"878":{"position":[[48,1],[173,1],[188,1]]},"888":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"890":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"892":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"902":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"904":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"906":{"position":[[18,1],[85,1],[203,1]]},"916":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"918":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"920":{"position":[[0,2],[57,1],[126,1],[172,1]]},"930":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"932":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"934":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"936":{"position":[[302,4]]},"944":{"position":[[134,2],[163,2],[196,2]]},"946":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"948":{"position":[[18,1],[193,1]]},"958":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"960":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"962":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"972":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"974":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"976":{"position":[[18,1],[56,1]]},"986":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"988":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"990":{"position":[[18,1],[43,1],[58,1]]},"1000":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"1002":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"1004":{"position":[[18,1],[43,3],[141,1]]},"1014":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"1016":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"1018":{"position":[[18,1],[43,3],[150,1],[185,1]]},"1028":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"1030":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"1032":{"position":[[18,1],[43,3],[150,1],[165,1]]},"1042":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"1044":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"1046":{"position":[[18,1],[78,1]]},"1056":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"1058":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"1060":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"1070":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"1072":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"1074":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]},"1084":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"1086":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"1088":{"position":[[18,1],[57,2],[97,1]]},"1098":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"1100":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"1102":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"1112":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"1114":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"1116":{"position":[[18,1],[110,1],[182,1],[197,1]]},"1118":{"position":[[155,1],[194,1]]},"1122":{"position":[[20,1],[58,2],[119,2],[156,2],[198,2],[207,2],[296,1],[310,1],[312,2],[366,2],[435,2],[467,2],[516,2],[583,2],[635,2],[716,2],[744,2],[832,2],[860,2],[966,2],[996,2],[1078,5],[1084,2],[1124,2],[1239,1],[1256,1],[1258,1],[1265,1],[1267,3],[1271,2],[1274,2],[1352,2],[1394,2],[1397,2],[1459,2],[1558,1],[1622,2],[1625,2],[1628,2],[1702,1],[1766,2],[1785,2],[1819,1]]},"1126":{"position":[[205,1],[307,1],[321,1],[330,2],[386,2],[428,2],[431,2],[444,2],[456,1],[540,1],[645,1],[659,1],[668,2],[737,2],[779,2],[782,2],[795,2],[807,1],[896,1],[1001,1],[1015,1],[1024,2],[1096,2],[1138,2],[1141,2],[1162,2],[1174,1],[1260,1],[1333,2],[1393,1],[1407,1],[1416,2],[1464,2],[1506,2],[1509,2],[1557,1]]},"1132":{"position":[[18,1],[52,1],[68,1],[102,1],[205,1],[276,1],[351,1],[365,1],[367,2],[397,2],[427,2],[457,2],[502,2],[512,2],[563,2],[599,2],[641,2],[682,1],[684,2],[762,2],[765,2],[812,1],[814,2],[912,2],[931,2],[965,1]]},"1136":{"position":[[271,1],[348,1],[362,1],[364,2],[394,2],[428,2],[458,2],[503,2],[513,2],[566,2],[602,2],[644,2],[685,1],[687,2],[765,2],[768,2],[815,1],[817,2],[915,2],[934,2],[968,1]]},"1140":{"position":[[21,2],[57,2],[81,2],[117,2],[353,1],[431,1],[445,1],[447,2],[477,2],[513,2],[543,2],[588,2],[598,2],[652,2],[688,2],[730,2],[771,1],[773,2],[851,2],[854,2],[901,1],[903,2],[1001,2],[1020,2],[1054,1]]},"1142":{"position":[[15,2],[87,2],[97,2],[100,2],[481,1],[578,1],[635,1],[637,2],[667,2],[742,2],[778,2],[820,2],[861,1],[863,2],[946,2],[949,2],[983,1]]},"1144":{"position":[[0,2],[63,1],[76,2],[98,1],[139,4],[148,1],[157,2],[160,1],[162,2],[192,2],[228,2],[285,2],[321,2],[462,2],[562,2],[578,2]]},"1148":{"position":[[18,3],[40,2],[62,3],[84,2],[311,1],[393,1],[407,1],[409,2],[439,2],[476,2],[506,2],[551,2],[561,2],[612,2],[648,2],[690,2],[731,1],[733,2],[811,2],[814,2],[861,1],[863,2],[961,2],[980,2],[1014,1]]},"1152":{"position":[[48,3],[101,3],[332,1],[408,1],[422,1],[424,2],[454,2],[486,2],[516,2],[561,2],[571,2],[623,2],[659,2],[701,2],[742,1],[744,2],[822,2],[825,2],[872,1],[874,2],[972,2],[991,2],[1025,1]]},"1154":{"position":[[20,1],[112,1],[166,1],[175,2],[224,2],[260,2],[302,2],[343,1],[345,2],[458,2],[461,2],[495,1],[604,3],[663,3]]},"1156":{"position":[[20,1],[128,1],[182,1],[191,2],[256,2],[322,1],[348,2],[351,1],[353,2],[389,2],[469,1],[471,2],[562,2],[565,2],[599,1]]},"1162":{"position":[[470,2]]},"1166":{"position":[[207,1],[213,1],[289,1],[449,1],[856,2],[878,1],[900,1],[909,2],[927,2],[956,1],[980,2],[1002,1],[1227,2],[1309,1],[1498,1],[1597,1],[1626,2],[1799,2],[1829,1],[1831,1],[1844,3],[1861,2],[1934,2],[1958,2],[1961,2]]},"1168":{"position":[[18,4],[204,2],[207,1],[209,3],[310,2],[324,3],[407,2],[434,2],[560,2],[563,3],[740,2],[743,3],[831,1],[888,2]]},"1170":{"position":[[558,2],[892,2],[913,2],[1327,1],[1351,1],[1374,1],[1401,1],[1856,5]]},"1172":{"position":[[577,1],[605,1],[619,1],[625,2],[734,1],[1022,1],[1072,1],[1085,1],[1108,1],[1116,1],[1725,2],[1767,2],[1774,2]]},"1174":{"position":[[240,2],[262,3],[296,2],[334,2],[372,1],[409,2],[447,1],[484,2],[591,2],[679,2],[693,2]]},"1176":{"position":[[674,2],[759,2],[1465,1],[1641,1],[1872,2],[1891,1],[1922,1],[1985,1],[2016,1],[2047,1],[2069,2],[2076,1],[2089,1],[2155,1],[2210,1],[2259,1],[2310,1],[2726,2],[2738,1],[2755,1]]},"1178":{"position":[[198,1],[220,1],[271,1],[284,2],[299,1],[313,1],[320,1],[335,1],[337,1],[1076,2],[1108,1],[1120,1],[1139,1],[1193,1],[1195,2],[1232,2],[1301,2],[1379,1],[1392,2],[1407,1],[1421,1],[1436,2],[1439,2],[1442,1],[1444,2],[1492,2],[2159,1],[2455,2],[2524,1],[2633,1],[2646,2],[2651,2],[2662,2],[2677,1],[2691,1],[2706,2],[3006,2],[3044,2],[3672,1],[3770,1],[3785,2],[4068,1],[4405,1],[4456,2],[4509,1],[4514,2],[4532,2],[4615,1],[4628,2],[4633,2],[4644,2],[4659,1],[4673,1],[4688,2],[4716,2],[4723,1],[4784,1],[4786,1]]},"1182":{"position":[[278,2],[289,2],[328,1],[403,1],[417,1],[419,2],[449,2],[479,2],[509,2],[554,2],[564,2],[614,2],[650,2],[692,2],[733,1],[735,2],[813,2],[816,2],[863,1],[865,2],[963,2],[982,2],[1016,1]]},"1186":{"position":[[23,3],[49,2],[71,3],[97,2],[341,1],[421,1],[435,1],[437,2],[467,2],[507,2],[537,2],[624,2],[706,2],[716,2],[789,2],[825,2],[867,2],[908,1],[910,2],[988,2],[991,2],[1038,1],[1040,2],[1138,2],[1157,2],[1191,1]]},"1190":{"position":[[256,1],[288,1],[363,2],[377,2],[396,1],[410,1],[412,2],[442,2],[472,2],[502,2],[547,2],[557,2],[607,2],[643,2],[685,2],[726,1],[728,2],[806,2],[809,2],[856,1],[858,2],[956,2],[975,2],[1009,1]]},"1194":{"position":[[19,2],[56,1],[64,2],[130,1],[171,1],[275,1],[307,1],[383,2],[397,2],[416,1],[430,1],[432,2],[462,2],[494,2],[524,2],[569,2],[579,2],[631,2],[667,2],[709,2],[750,1],[752,2],[830,2],[833,2],[880,1],[882,2],[980,2],[999,2],[1033,1]]},"1200":{"position":[[531,1],[533,2],[586,2],[605,2],[608,3],[612,1],[810,1],[812,2],[865,2],[884,2],[906,2],[967,2],[985,2],[1018,2],[1021,3],[1025,1],[1167,1],[1169,2],[1205,2],[1242,2],[1245,3],[1249,2],[1461,2],[1505,2]]},"1202":{"position":[[143,1],[149,2],[202,1],[241,2],[264,1]]},"1204":{"position":[[329,2],[639,2],[685,3],[727,1],[766,2],[780,2],[867,1],[897,1],[899,1],[920,2],[923,2],[962,2],[984,2],[1062,1],[1084,2],[1087,2],[1090,1],[1119,1],[1121,1],[1141,2],[1144,2],[1158,1],[1198,2],[1211,2],[1297,1],[1330,1],[1332,1],[1349,2],[1352,2],[1375,2]]},"1206":{"position":[[271,2]]},"1211":{"position":[[349,2],[352,2],[388,2],[391,2],[429,2],[432,2],[480,2],[549,2],[868,2],[871,2],[914,2],[917,2],[962,2],[965,2],[1188,2],[1276,1],[1278,2],[1366,2],[1444,2],[1509,2],[1559,2],[1627,2],[1676,2],[1738,2],[1784,2],[1850,2],[1905,2],[1974,2],[2025,2],[2072,2],[2075,2],[2105,1],[2172,2],[2219,2],[2286,2],[2289,2],[2347,2],[2423,2],[2426,2],[2475,2],[2546,2],[2549,2],[2598,1],[2608,2],[2752,1],[2781,2]]},"1213":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"1215":{"position":[[133,1],[139,2],[160,2],[201,2],[219,1],[271,1],[309,2],[343,1]]},"1217":{"position":[[156,1],[162,2],[181,2],[200,2],[221,2],[325,2],[351,2],[383,2],[419,2],[422,2],[425,1]]},"1219":{"position":[[146,1],[152,2],[171,2],[201,2],[212,2],[241,2],[277,2],[318,2],[337,2],[366,2],[402,2],[443,2],[490,1]]},"1221":{"position":[[186,1],[192,2],[249,1],[288,2],[355,2],[385,2],[428,1]]},"1223":{"position":[[119,1],[125,2],[167,1],[171,2],[174,3],[178,1]]},"1229":{"position":[[112,1],[139,1],[152,1],[166,1],[172,2],[257,2],[292,3],[296,1],[298,2],[347,1],[356,1],[358,1],[360,1],[411,1],[419,1],[421,1],[423,2],[426,1],[428,1],[480,1],[488,1],[490,1],[492,2],[495,1],[497,1],[553,1],[555,1],[557,1]]},"1231":{"position":[[126,1],[153,1],[166,1],[180,1],[186,2],[373,2],[451,2],[486,3],[490,1],[492,2],[539,1],[548,1],[550,1],[552,1],[596,4],[616,2],[619,1],[685,2],[688,1],[760,1],[762,2],[765,1],[767,1],[795,3],[807,4],[827,2],[830,1],[858,3],[893,2],[896,1],[924,3],[962,1],[964,2],[979,1],[981,1],[1055,1],[1057,2],[1072,1],[1074,1],[1148,1],[1150,2],[1158,1]]},"1233":{"position":[[111,1],[138,1],[151,1],[165,1],[171,2],[230,2],[275,3],[279,1],[281,2],[328,1],[337,1],[381,4],[401,1]]},"1235":{"position":[[211,1],[217,2],[272,1],[336,2],[379,3],[383,1],[385,2],[412,1],[421,1],[423,1],[468,4],[488,1],[490,1]]},"1237":{"position":[[39,1],[51,2]]},"1241":{"position":[[113,2],[157,2]]},"1243":{"position":[[307,1],[349,1],[453,2],[456,1]]},"1245":{"position":[[194,1],[236,1],[340,2],[343,1]]},"1247":{"position":[[390,1],[432,1],[607,2],[610,1]]},"1249":{"position":[[439,1],[481,1],[656,2],[659,1]]},"1251":{"position":[[205,2],[295,1]]},"1253":{"position":[[347,2],[427,1],[454,2],[457,2],[516,2],[519,2],[562,2],[565,2],[585,2],[681,2],[706,2],[723,2],[772,2],[790,1],[800,2],[855,2],[858,2],[875,1]]},"1258":{"position":[[58,2]]},"1262":{"position":[[40,2],[62,2],[156,2],[174,2],[181,1],[194,1],[213,2],[226,2],[229,3]]},"1264":{"position":[[380,2],[383,3]]},"1266":{"position":[[448,2],[460,2],[470,2],[480,2],[490,2]]},"1268":{"position":[[134,2],[137,3]]},"1270":{"position":[[190,2],[193,3]]},"1272":{"position":[[429,2],[432,3]]},"1274":{"position":[[197,2],[200,3]]},"1276":{"position":[[210,2],[213,3]]},"1278":{"position":[[158,2],[161,3]]},"1280":{"position":[[201,2],[204,3]]},"1282":{"position":[[241,2],[244,3]]},"1284":{"position":[[148,2],[214,2],[217,2],[235,2],[297,2],[325,2],[328,2],[343,1],[386,2],[389,2],[459,2],[490,2],[493,2],[737,2],[740,3]]},"1286":{"position":[[182,2],[185,3]]},"1288":{"position":[[178,2],[181,3]]},"1290":{"position":[[109,2],[166,2],[169,2],[236,2],[331,2],[388,2],[391,3]]},"1292":{"position":[[162,2],[228,2],[231,2],[298,2],[402,2],[468,2],[471,3],[772,2],[775,3],[1153,2],[1156,3],[1225,2],[1289,1],[1291,2],[1347,2],[1387,2],[1436,1],[1448,2],[1502,2],[1505,2],[1580,2],[1690,2],[1754,2],[1859,2],[1862,3]]},"1294":{"position":[[168,2],[171,3]]},"1296":{"position":[[138,2],[141,3]]},"1298":{"position":[[217,2],[220,3]]},"1300":{"position":[[188,2],[191,3]]},"1302":{"position":[[98,2],[131,2],[175,2],[229,1],[255,2],[258,3]]},"1304":{"position":[[157,2],[160,3]]},"1306":{"position":[[154,2],[157,3]]},"1308":{"position":[[158,2],[161,3]]},"1310":{"position":[[97,2],[116,2],[119,3]]},"1312":{"position":[[255,2],[300,2],[303,3]]},"1314":{"position":[[190,1],[216,2],[219,3]]},"1316":{"position":[[158,2],[175,2],[178,3]]},"1318":{"position":[[146,2],[164,2],[167,3]]},"1320":{"position":[[232,2],[252,2],[255,3]]},"1322":{"position":[[268,1],[287,2],[312,2],[315,2],[318,3]]},"1324":{"position":[[46,1],[58,1],[66,2],[96,1],[105,2],[135,1],[144,2],[173,1],[181,2],[212,1],[222,2],[247,1],[258,2],[291,1],[303,2],[336,1],[348,2],[379,1],[389,2],[418,1],[426,1],[468,1],[482,1],[508,1],[536,1],[570,1],[610,1],[657,1],[704,1],[758,1],[805,1],[852,1],[904,1],[958,1],[1018,1],[1084,1],[1157,1],[1199,1],[1252,1],[1269,1],[1275,2],[1319,1],[1325,2],[1361,1],[1367,2],[1402,1],[1408,2],[1429,1],[1435,2],[1468,1],[1474,2],[1508,1],[1514,2],[1567,1],[1573,2],[1608,1],[1614,2],[1652,1],[1658,2],[1698,1],[1704,2],[1739,1],[1745,2],[1785,1],[1791,2],[1821,1],[1827,2],[1869,1],[1875,2],[1917,1],[1923,2],[1954,1],[1960,2],[1994,1],[2000,2],[2037,1],[2043,2],[2075,1],[2081,2],[2124,1],[2130,2],[2173,1],[2179,2],[2211,1],[2217,2],[2255,1],[2261,2],[2300,1],[2306,2],[2341,1],[2347,2],[2381,1],[2387,2],[2429,1],[2435,2],[2474,1],[2480,2],[2523,1],[2529,2],[2567,1],[2573,2],[2607,1],[2613,2],[2643,1],[2649,2],[2689,1],[2695,2],[2740,1],[2746,2],[2791,1],[2797,2],[2841,1],[2847,2],[2894,1],[2900,2],[2955,1],[2961,2],[3002,1],[3008,2],[3041,1],[3047,2],[3091,1],[3097,2],[3142,1],[3148,2],[3179,1],[3185,2],[3226,1],[3232,2],[3265,1],[3271,2],[3311,1],[3317,2],[3364,1],[3370,2],[3407,1],[3413,2],[3462,1],[3468,2],[3516,1],[3522,2],[3563,1],[3569,2],[3609,1],[3615,2],[3651,1],[3657,2],[3701,1],[3707,2],[3747,1],[3753,2],[3802,1],[3808,2],[3855,1],[3861,2],[3904,1],[3910,2],[3947,1],[3953,2],[3988,1],[3994,2],[4045,1],[4051,2],[4066,1],[4079,1],[4095,1],[4124,2],[4159,1],[4190,2],[4226,1],[4260,2],[4292,1],[4320,2],[4351,1],[4378,2],[4417,1],[4452,2],[4488,1],[4520,2],[4560,1],[4596,2],[4631,1],[4664,2],[4695,1],[4722,2],[4749,1],[4772,2],[4809,1],[4842,2],[4884,1],[4921,2],[4963,1],[5003,2],[5044,1],[5080,2],[5124,1],[5163,2],[5215,1],[5262,2],[5300,1],[5336,2],[5366,1],[5391,2],[5432,1],[5469,2],[5511,1],[5549,2],[5577,1],[5602,2],[5640,1],[5675,2],[5705,1],[5732,2],[5769,1],[5803,2],[5847,1],[5886,2],[5920,1],[5954,2],[6000,1],[6046,2],[6091,1],[6136,2],[6174,1],[6212,2],[6249,1],[6282,2],[6315,1],[6344,2],[6385,1],[6422,2],[6459,1],[6492,2],[6538,1],[6580,2],[6624,1],[6664,2],[6704,1],[6742,2],[6776,1],[6807,2],[6839,1],[6869,2],[6917,1],[6965,2],[6980,1],[7028,1],[7050,1],[7092,1],[7140,1],[7186,1],[7217,1],[7244,1],[7282,1],[7316,1],[7341,1],[7366,1],[7393,1],[7430,1],[7470,1],[7496,1],[7520,1],[7550,1],[7584,1],[7615,1],[7636,1],[7659,1],[7694,1],[7734,1],[7776,1],[7819,1],[7848,1],[7874,1],[7905,1],[7933,1],[7964,1],[8004,1],[8045,1],[8078,1],[8102,1],[8131,1],[8164,1],[8215,1],[8284,1],[8349,1],[8413,1],[8478,1],[8538,1],[8599,1],[8667,1],[8714,1],[8749,1],[8809,1],[8857,1],[8874,1],[8906,1],[8952,1],[8995,1],[9036,1],[9077,1],[9116,1],[9149,1],[9173,1],[9201,1],[9242,1],[9285,1],[9332,1],[9377,1],[9414,1],[9446,1],[9470,1],[9490,1],[9513,1],[9546,1],[9582,1],[9609,1],[9632,1],[9662,1],[9699,1],[9731,1],[9756,1],[9794,1],[9860,1],[9932,1],[9980,1],[10014,1],[10053,1],[10103,1],[10165,1],[10225,1],[10281,1],[10331,1],[10374,1],[10411,1],[10449,1],[10488,1],[10516,1],[10539,1],[10566,1],[10593,1],[10616,1],[10637,1],[10672,1],[10719,1],[10773,1],[10824,1],[10873,1],[10926,1],[10970,1],[11010,1],[11055,1],[11089,1],[11112,1],[11133,1],[11165,1],[11197,1],[11223,1],[11256,1],[11291,1],[11325,1],[11359,1],[11394,1],[11422,1],[11460,1],[11503,1],[11535,1],[11573,1],[11611,1],[11648,1],[11668,1]]},"1327":{"position":[[155,2],[177,2],[192,2],[195,3]]},"1329":{"position":[[76,2],[97,2],[231,2],[234,2],[237,3],[346,2],[507,1],[514,1],[999,1],[1334,1],[5037,1],[5332,2],[5335,2],[5916,2],[6900,2]]},"1331":{"position":[[174,1],[227,2]]},"1333":{"position":[[104,2],[146,2],[188,2],[211,1],[251,1],[258,1],[295,1],[297,2],[300,3]]},"1337":{"position":[[95,1],[195,1],[325,1],[412,1],[510,1],[591,1],[704,1],[846,1]]},"1340":{"position":[[20,1],[118,1],[132,1],[134,2],[155,2],[170,2],[187,1],[253,2],[274,1],[339,2],[382,1],[430,1],[459,1],[512,1],[544,1]]},"1342":{"position":[[20,1],[118,1],[132,1],[134,2],[155,2],[170,2],[190,1],[253,2],[296,1],[349,1],[420,1],[473,2],[476,1]]},"1344":{"position":[[20,1],[112,1],[126,1],[128,2],[146,1],[207,2],[225,1],[302,2],[359,1],[392,1],[430,1]]},"1346":{"position":[[20,1],[112,1],[126,1],[132,2],[172,2],[247,1],[280,1],[318,1]]},"1348":{"position":[[20,1],[112,1],[126,1],[132,2],[183,2],[258,1],[302,1],[317,2],[360,2],[367,1],[380,1],[416,1],[418,1],[442,1]]},"1354":{"position":[[77,1],[160,1],[238,2],[366,2],[369,3],[373,2],[516,2],[580,1],[590,2],[600,2],[608,2],[617,1],[631,1],[641,2],[652,2],[660,2],[672,1],[686,1],[701,2],[743,1],[786,2],[841,3]]},"1356":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[236,2],[239,2],[305,2],[366,2],[425,2],[475,2],[478,2],[527,2],[573,2],[619,2],[669,2],[724,2],[770,2],[773,2],[837,2],[907,2],[992,2],[995,2],[1048,2],[1106,2],[1109,2],[1165,2],[1223,2],[1226,2],[1282,1]]},"1358":{"position":[[18,1],[182,1]]},"1364":{"position":[[77,1],[156,1],[234,2],[284,2],[389,1],[417,2],[427,2],[445,1],[480,3],[638,1],[656,2],[729,1],[759,2],[802,1],[838,2],[841,3],[883,1],[957,2]]},"1366":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[255,2],[258,2],[282,1],[321,2],[427,2],[430,2],[456,2],[459,2],[508,2],[567,2],[570,2],[616,2],[687,2],[690,2],[728,1],[730,2],[767,2],[770,1],[809,2],[898,2],[901,2],[977,2],[1031,2],[1034,2],[1109,2],[1181,1],[1191,2],[1194,2],[1238,2],[1335,2],[1408,2],[1428,2],[1431,2],[1459,2],[1501,2],[1572,2],[1575,2],[1648,1]]},"1368":{"position":[[18,1],[53,1],[153,1],[189,2],[328,1]]},"1374":{"position":[[77,1],[159,1],[237,2],[290,2],[403,2],[408,3],[412,2],[519,1],[537,2],[557,2],[592,2],[597,3]]},"1376":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[240,2],[243,2],[278,2],[299,2],[318,2],[339,2],[376,1]]},"1378":{"position":[[18,1],[60,1]]},"1380":{"position":[[0,2],[28,1],[44,1],[62,1],[81,1],[106,1],[110,1]]},"1386":{"position":[[77,1],[155,1],[233,2],[282,2],[458,3],[959,1],[993,2],[1010,2],[1013,3]]},"1388":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[282,2],[352,2],[355,2],[449,2],[488,2],[491,2],[559,2],[630,2],[633,2],[660,3],[684,2],[760,2],[812,2],[815,2],[895,2],[967,2],[1041,2],[1044,2],[1071,3],[1095,2],[1168,2],[1242,2],[1314,2],[1363,2],[1366,2],[1422,2],[1495,2],[1506,2],[1509,2],[1536,3],[1561,2],[1638,2],[1656,2],[1659,2],[1700,1]]},"1390":{"position":[[18,1],[76,4],[227,2],[230,5],[250,3],[294,3],[309,1]]},"1396":{"position":[[77,1],[155,1],[233,2],[282,2],[447,1],[532,1],[534,3],[538,2],[541,3]]},"1398":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[265,2],[333,2],[353,2],[374,2],[394,2],[414,2],[433,2],[454,2],[457,2],[503,2],[506,2],[567,2],[634,2],[688,2],[718,2],[745,3],[769,2],[797,2],[824,3],[846,2],[885,2],[937,2],[979,2],[1033,2],[1087,2],[1143,2],[1211,2],[1271,2],[1331,2],[1334,2],[1358,1],[1395,2],[1449,2],[1452,2],[1509,2],[1568,2],[1623,2],[1626,2],[1648,2],[1669,2],[1710,2],[1713,2],[1773,2],[1809,2],[1812,2],[1885,2],[1888,2],[1999,1]]},"1400":{"position":[[18,1],[49,1],[121,1],[234,1]]},"1402":{"position":[[6,1],[19,1],[36,1]]},"1404":{"position":[[58,2],[75,2],[166,3]]},"1406":{"position":[[1107,1],[1138,1]]},"1410":{"position":[[77,1],[160,1],[238,2],[292,2],[401,2],[404,3],[408,3]]},"1412":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[264,2],[267,2],[396,2],[484,2],[487,2],[648,2],[712,2],[715,2],[768,1]]},"1414":{"position":[[18,1],[65,1],[99,2],[125,2],[168,1],[208,2],[237,1]]},"1416":{"position":[[6,1],[26,1],[64,1],[70,1]]},"1420":{"position":[[0,2],[72,2]]},"1422":{"position":[[77,1],[164,1],[242,2],[270,2],[389,2],[500,2],[698,3],[702,2],[709,1],[782,1],[813,1],[834,2],[837,2],[845,1],[914,1],[974,2],[988,2]]},"1424":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[249,2],[252,2],[300,2],[339,1],[357,2],[360,2],[439,2],[551,2],[590,2],[593,2],[689,2],[728,2],[731,2],[827,1]]},"1426":{"position":[[18,1],[71,3],[127,1]]},"1428":{"position":[[307,2],[330,3],[432,3]]},"1434":{"position":[[77,1],[157,1],[235,2],[305,2],[443,3],[529,4],[534,3],[538,1]]},"1436":{"position":[[24,1],[34,1],[106,1],[108,1]]},"1438":{"position":[[0,2],[64,1],[66,2],[164,2],[268,1]]},"1446":{"position":[[77,1],[155,1],[233,2],[282,2],[289,1],[379,1],[418,2],[421,2],[506,3],[510,2],[517,1],[610,1],[649,2]]},"1448":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[264,2],[328,2],[394,2],[462,2],[529,2],[595,2],[661,2],[704,1]]},"1450":{"position":[[18,1],[52,1]]},"1456":{"position":[[77,1],[166,1],[254,1],[341,1],[429,2],[592,1],[689,5],[695,1],[732,1],[765,1]]},"1458":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,1]]},"1460":{"position":[[18,1],[39,1]]},"1466":{"position":[[77,1],[158,1],[236,2],[288,2],[411,3]]},"1468":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[259,2],[262,2],[284,2],[299,2],[326,2],[329,2],[377,2],[457,2],[522,2],[525,2],[578,2],[661,2],[664,2],[733,1]]},"1470":{"position":[[18,1],[45,3],[103,1]]},"1472":{"position":[[98,1],[262,1]]},"1476":{"position":[[77,1],[161,1],[239,2],[337,3],[341,2],[529,3]]},"1478":{"position":[[110,1],[227,1],[229,2],[289,2],[370,1],[376,2],[456,3],[460,2],[558,2],[614,2],[780,3],[815,1]]},"1480":{"position":[[55,1],[168,1],[182,1],[188,2],[284,3],[319,1]]},"1482":{"position":[[55,1],[171,1],[185,1],[191,2],[301,3],[336,1]]},"1484":{"position":[[58,1],[174,1],[188,1],[194,2],[306,3],[341,1]]},"1486":{"position":[[55,1],[174,1],[188,1],[194,2],[290,3],[325,1]]},"1488":{"position":[[53,1],[137,2],[260,1],[274,1],[290,2],[309,2],[316,1],[329,1],[335,2],[413,3],[448,1]]},"1490":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[240,2],[285,2],[288,2],[343,2],[346,2],[408,2],[447,2],[450,2],[485,2],[488,2],[509,2],[551,2],[581,2],[584,2],[640,2],[679,2],[682,2],[745,2],[792,2],[859,2],[862,2],[920,2],[978,2],[981,2],[1003,2],[1050,2],[1096,2],[1132,2],[1135,2],[1157,2],[1216,1]]},"1492":{"position":[[18,1],[62,3],[134,3],[138,1]]},"1498":{"position":[[20,1],[100,1],[114,1],[120,2],[195,1],[229,2],[252,1]]},"1500":{"position":[[0,2],[64,1],[66,2],[113,2],[166,2],[183,2],[236,2],[258,2],[322,2],[339,2],[380,2],[460,2],[474,2],[519,2],[544,2],[605,2],[630,2],[657,3],[690,2],[707,2],[760,2],[782,2],[840,2],[858,2],[925,2],[947,2],[974,3],[1002,2],[1034,2],[1110,2],[1140,2],[1213,2],[1245,2],[1320,2],[1344,2],[1403,2],[1429,2],[1490,2],[1512,2],[1573,2],[1610,2],[1674,1]]},"1502":{"position":[[18,1],[377,1]]},"1504":{"position":[[89,1],[147,1]]},"1508":{"position":[[77,1],[162,1]]},"1512":{"position":[[57,1],[72,2],[75,3],[79,3]]},"1514":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[258,2],[317,2],[320,2],[345,1],[382,2],[456,2],[459,2],[516,2],[606,2],[609,2],[749,2],[841,2],[844,2],[921,2],[955,2],[958,2],[1035,2],[1087,2],[1090,2],[1178,1]]},"1516":{"position":[[18,1],[58,1],[60,2],[166,2],[182,1],[269,1],[280,2],[297,2],[303,1],[305,2],[374,2],[415,1],[428,2],[468,2],[538,2],[594,1]]},"1522":{"position":[[20,1],[133,1],[139,1],[148,1],[181,1],[243,1],[258,2],[301,2],[392,2],[397,1],[416,1],[468,1],[482,1],[488,2],[503,2],[687,3],[729,1],[782,2],[805,1],[813,1],[837,1],[878,2],[990,2],[1092,2]]},"1524":{"position":[[159,1],[291,1],[297,1],[306,1],[353,1],[445,1],[447,1],[509,1],[524,2],[567,2],[658,2],[663,1],[682,1],[734,1],[771,1],[785,2],[836,2],[859,1],[897,1],[912,1],[914,1],[928,1],[942,1],[948,2],[1078,3],[1120,1],[1153,2],[1207,1],[1260,2],[1306,1],[1361,2],[1384,1],[1408,1],[1410,1],[1473,2],[1484,1],[1621,2],[1652,1],[1777,2]]},"1526":{"position":[[20,1],[133,1],[141,1],[150,1],[174,1],[188,1],[194,2],[224,2],[311,1],[326,2],[369,2],[460,2],[465,1],[484,1],[536,2],[539,2],[580,1],[613,2],[677,1],[730,2],[753,1],[777,1],[779,1],[842,2],[853,1],[982,2]]},"1528":{"position":[[0,2],[64,1],[66,2],[113,2],[166,2],[238,2],[293,2],[366,2],[410,2],[491,2],[562,2],[598,2],[649,2],[669,2],[690,2],[710,2],[729,2],[749,2],[787,2],[841,2],[896,2],[989,2],[1058,2],[1107,1]]},"1530":{"position":[[18,1],[69,1],[87,2],[140,1],[149,2],[180,1],[248,1],[333,2],[357,1],[429,1]]},"1536":{"position":[[77,1],[158,1],[236,2],[288,2],[397,1],[413,2],[428,2],[455,1],[510,1],[544,2],[586,1],[624,2],[655,3]]},"1538":{"position":[[195,1],[254,3],[407,1],[442,1],[459,1],[478,1],[503,1]]},"1540":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[287,2],[290,2],[312,2],[390,2],[393,2],[431,1],[433,2],[450,2],[453,1],[492,2],[568,2],[571,2],[585,1],[624,2],[680,2],[683,2],[720,1],[722,2],[774,2],[777,1],[806,2],[852,2],[877,2],[880,2],[922,2],[968,1],[992,2],[995,2],[1041,2],[1095,2],[1098,2],[1173,2],[1244,2],[1247,2],[1324,1]]},"1542":{"position":[[18,1],[50,1],[105,1],[121,2],[163,1],[214,2],[309,1]]},"1544":{"position":[[58,2],[75,2],[172,3]]},"1550":{"position":[[77,1],[157,1],[416,2],[467,2],[510,2],[633,3],[637,2],[718,2],[833,3],[837,2],[858,1],[1012,3],[1016,2],[1048,2],[1124,2],[1131,1],[1175,1],[1244,3],[1248,2],[1446,1],[1496,2],[1499,2],[1502,3],[1506,2],[1673,1],[1704,2],[1722,1],[1756,1],[1758,2],[1761,3],[1765,2],[1872,3]]},"1552":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[289,2],[330,2],[333,2],[401,2],[447,2],[450,2],[521,2],[556,2],[559,2],[648,2],[734,2],[737,2],[786,2],[879,2],[882,2],[928,2],[989,2],[992,2],[1018,1],[1064,2],[1109,2],[1112,2],[1151,2],[1215,2],[1218,2],[1324,1]]},"1554":{"position":[[18,1],[175,1],[235,1]]},"1556":{"position":[[0,2],[26,1],[35,1],[51,1],[71,1],[95,1],[116,1],[131,1],[145,1],[161,1],[180,1],[199,1],[215,1],[229,1],[247,1],[269,1],[280,2],[310,1],[322,2],[353,1],[389,1],[405,2],[441,1],[450,2],[479,1],[510,1],[537,1],[556,1],[566,2],[616,1],[628,2],[659,1],[674,2],[706,1],[722,2],[750,1],[761,2],[786,1],[796,2],[822,1],[834,2],[862,1],[874,2],[893,1],[910,1],[927,1],[947,1],[966,1],[986,1],[1006,1],[1024,1],[1043,1],[1053,1]]},"1562":{"position":[[77,1],[158,1],[236,2],[336,2],[379,2],[416,2],[740,2],[749,1],[846,2]]},"1564":{"position":[[0,2],[64,1],[66,2],[88,2],[91,2],[142,2],[160,2],[163,2],[217,2],[279,2],[282,2],[323,2],[394,2],[397,2],[452,2],[500,2],[503,2],[549,2],[598,1],[631,2],[634,2],[745,2],[799,1],[832,2],[835,2],[955,1]]},"1566":{"position":[[18,1],[297,3],[301,1]]},"1572":{"position":[[77,1],[156,1],[234,2],[284,2],[327,2],[501,2]]},"1574":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[255,2],[317,2],[348,2],[351,2],[373,2],[390,1]]},"1576":{"position":[[18,1],[39,1]]},"1580":{"position":[[0,2],[110,2],[257,2],[400,2],[634,2],[822,2],[1020,2],[1212,2]]},"1582":{"position":[[77,1],[156,1],[234,2],[301,2],[404,2],[407,2],[586,2],[589,2],[673,2],[846,2],[1034,3],[1038,2],[1110,1],[1116,2],[1171,2],[1196,2],[1203,1],[1216,1],[1218,2],[1311,2],[1314,2],[1406,1],[1415,2],[1468,2],[1475,1],[1488,1],[1490,2],[1583,2],[1586,2],[1695,1],[1704,2],[1763,1],[1773,2],[1780,1],[1793,1],[1795,2],[1888,2],[1891,2],[1984,1],[1993,2],[2070,2],[2077,1],[2090,1],[2092,2],[2185,2],[2188,2],[2351,2],[2354,3],[2358,2],[2534,2],[2577,1],[2634,2],[2678,1],[2735,2],[2738,3],[2742,2],[2950,3]]},"1584":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[256,2],[259,2],[302,2],[355,2],[358,2],[387,2],[436,2],[439,2],[493,2],[544,2],[547,2],[602,2],[671,2],[674,2],[727,2],[780,2],[825,2],[891,2],[965,2],[1039,2],[1096,2],[1154,2],[1231,2],[1300,1]]},"1586":{"position":[[18,1],[122,1]]},"1592":{"position":[[77,1],[158,1],[236,2],[288,2],[373,1],[397,2]]},"1594":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[244,2],[247,2],[297,2],[359,2],[362,2],[461,1]]},"1596":{"position":[[18,1],[109,1]]},"1602":{"position":[[20,1],[102,1],[116,1],[122,2],[238,2],[258,3],[303,1],[342,2],[388,1],[421,1],[423,1],[440,2],[463,1]]},"1604":{"position":[[0,2],[64,1],[66,2],[115,2],[168,2],[252,2],[297,2],[319,2],[338,2],[358,2],[396,2],[465,2],[501,2],[544,2],[642,1]]},"1606":{"position":[[18,1],[59,1]]},"1612":{"position":[[77,1],[160,1],[238,2],[292,2],[427,1],[448,2],[451,3]]},"1614":{"position":[[0,2],[64,1],[66,2],[137,2],[140,2],[195,2],[262,2],[265,2],[316,2],[383,2],[386,2],[443,2],[509,2],[547,2],[550,2],[605,1]]},"1616":{"position":[[199,1],[300,1]]},"1622":{"position":[[20,1],[101,1],[115,1],[121,2],[235,2],[238,3],[283,1],[322,2],[368,1],[401,1],[403,1],[420,2],[443,1]]},"1628":{"position":[[77,1],[158,1],[236,2],[265,2],[313,2],[368,1],[370,2],[408,2],[431,2],[438,1],[451,1],[453,2],[471,2],[491,2],[533,2],[554,2],[569,2],[603,2],[629,2],[652,2],[659,1],[672,1],[674,2],[748,1],[753,2],[776,2],[796,2],[803,1],[816,1],[871,2]]},"1630":{"position":[[0,2],[64,1],[66,2],[94,2],[124,1],[161,2],[208,2],[270,2],[341,2],[384,2],[455,2],[520,2],[550,2],[577,3],[601,2],[629,2],[656,3],[678,2],[717,2],[769,2],[811,2],[865,2],[894,2],[950,2],[1018,2],[1055,2],[1112,2],[1155,2],[1222,2],[1276,2],[1339,2],[1378,1]]},"1632":{"position":[[18,1],[43,1],[161,1]]},"1634":{"position":[[6,1],[28,1],[59,1],[92,1],[102,1]]},"1636":{"position":[[58,2],[75,2],[124,2],[173,2]]},"1642":{"position":[[77,1],[155,1],[245,1],[251,2],[323,1],[345,2],[364,3],[408,1],[457,2],[491,1],[533,1],[586,1]]},"1648":{"position":[[77,1],[158,1],[248,1],[254,2],[271,2],[299,1],[314,2],[358,1],[373,2],[426,2],[433,1],[481,1],[494,1],[585,1],[653,1],[661,2],[688,1],[695,1],[726,1],[728,1],[738,1],[777,1],[788,1],[801,1],[1026,1],[1075,1],[1081,2],[1098,2],[1126,1],[1141,2],[1185,1],[1200,2],[1268,2],[1275,1],[1323,1],[1336,1],[1453,1],[1536,1],[1544,2],[1571,1],[1578,1],[1609,1],[1611,1],[1621,1],[1649,1],[1660,1],[1673,1],[1716,1],[1722,2],[1743,2],[1825,2],[1855,1],[1862,2],[1915,1],[1962,2],[1969,1],[1989,1],[1999,1],[2027,2],[2034,1],[2054,1],[2067,1],[2165,1]]},"1651":{"position":[[497,1]]},"1663":{"position":[[0,2],[94,1]]},"1668":{"position":[[415,1],[492,2]]},"1670":{"position":[[545,1],[562,1],[564,3],[576,1],[596,1],[622,2],[629,1],[650,1],[657,1],[674,1],[716,1],[762,1]]},"1672":{"position":[[142,2],[219,1],[294,2],[297,2]]},"1676":{"position":[[180,1],[194,2]]},"1678":{"position":[[77,1],[163,1],[182,1],[201,1],[215,1],[217,2],[232,2],[254,2],[262,2],[269,2],[281,2],[389,3],[421,1],[472,1],[501,2],[504,2],[513,2],[521,2],[535,2],[644,3],[677,1],[730,1],[760,2],[763,2],[775,2],[786,2],[803,2],[912,3],[940,1],[993,1],[1026,2],[1029,2],[1043,2],[1091,1],[1098,2],[1129,2],[1136,1],[1180,1],[1187,1],[1234,1],[1236,2],[1270,1]]},"1681":{"position":[[244,1],[246,2],[310,2],[492,1],[579,1],[593,1],[599,2],[675,1],[716,2],[750,1],[1021,1],[1023,2],[1085,2],[1175,2]]},"1683":{"position":[[226,2],[275,1],[313,1],[315,2],[351,2],[386,2],[485,1],[492,1],[501,1],[503,2],[613,2],[700,1]]},"1685":{"position":[[539,2],[593,2],[620,2],[706,1],[708,2],[744,2],[779,2],[878,1],[885,1],[894,1],[896,2],[926,1],[993,2],[1000,1],[1002,2],[1119,1],[1121,2],[1155,2],[1158,2],[1161,2],[1164,3],[1195,1]]},"1688":{"position":[[480,1],[486,2],[569,2],[572,1],[574,3],[578,1]]},"1694":{"position":[[79,1],[85,2],[104,2],[137,2],[148,2],[180,2],[216,2],[257,2],[276,2],[308,2],[344,2],[385,2],[432,1],[493,1],[499,2],[518,2],[539,2],[550,2],[570,2],[606,2],[647,2],[666,2],[686,2],[722,2],[763,2],[810,1]]},"1696":{"position":[[131,1],[137,2],[160,2],[188,1],[226,1],[232,2],[253,2],[264,2],[309,1],[311,2],[376,2],[404,2],[445,2],[492,1]]},"1700":{"position":[[0,2],[77,1],[116,1],[153,1],[197,1],[235,1],[269,1],[310,1],[348,1]]},"1704":{"position":[[271,1],[309,1],[323,1],[329,2],[382,1],[482,1],[501,1],[503,1],[512,1],[514,2],[517,2],[531,2],[579,1],[600,1],[602,1],[613,1],[632,2],[681,1],[791,1],[872,1],[874,2],[886,2],[916,2]]},"1716":{"position":[[308,1],[346,1],[360,1],[366,2],[424,2],[525,1],[586,2],[589,3],[604,2],[633,1],[635,2],[646,2]]},"1719":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"1721":{"position":[[185,2],[243,4],[286,1],[316,2],[319,2],[414,1],[445,2],[448,2],[553,1],[589,2]]},"1723":{"position":[[372,2],[415,2],[418,2],[425,1],[658,4],[841,2],[916,1],[1012,2],[1015,2],[1091,1],[1128,2],[1131,2],[1202,1],[1242,2],[1245,2],[1321,1],[1358,2],[1361,2],[1553,1],[1595,2],[1620,1],[1622,1],[1636,3],[1796,4],[1928,2],[2037,1],[2116,2],[2134,2],[2137,2],[2233,1],[2306,2],[2317,2],[2476,2],[2607,1],[2683,2],[2694,2],[2915,2],[2927,2],[2946,1],[2948,4],[2962,1],[3002,2],[3017,2],[3036,1],[3074,2],[3105,2],[3122,1],[3143,1],[3185,2],[3217,2],[3234,1],[3253,1]]},"1725":{"position":[[1339,1],[1379,2],[1382,2],[1422,2],[1428,2],[1467,2],[1496,1],[1587,1],[1627,2],[1630,2],[1674,2],[1696,2],[1735,2],[1752,2],[1793,2],[1986,1],[2026,2],[2029,2],[2070,2],[2089,2],[2131,2],[2151,2],[2199,2],[2236,2],[2306,3],[2310,2],[2313,2],[2316,2],[2319,2],[2322,2],[2325,2],[2328,2],[2331,2],[2334,3],[2497,1],[2537,2],[2540,2],[2580,2],[2586,2],[2624,2],[2627,2],[2668,2]]},"1727":{"position":[[279,1],[281,2],[363,2],[405,2],[446,1],[485,2]]},"1729":{"position":[[82,1],[88,2],[107,2],[140,2],[151,2],[183,2],[219,2],[260,2],[279,2],[311,2],[347,2],[388,2],[435,1]]},"1732":{"position":[[97,1],[168,1],[298,2],[341,2],[383,2],[507,2],[867,1],[923,3],[927,2]]},"1734":{"position":[[188,1],[264,1],[278,1],[280,2],[334,2],[366,2],[423,2],[458,2],[468,2],[508,2],[550,2],[591,1],[593,2],[680,2],[683,2],[717,1]]},"1737":{"position":[[407,1],[474,2],[548,2],[750,1],[778,1],[823,1],[838,1],[904,1],[938,2],[970,2],[977,1],[990,2],[1032,1],[1080,1],[1116,1],[1142,1],[1163,1],[1190,1],[1192,1],[1208,1],[1243,1],[1272,2],[1292,2],[1319,2],[1326,1],[1417,2],[1420,1],[1429,2],[1464,2],[1471,1],[1526,1],[1587,1],[1589,2],[1640,2],[1779,2],[1793,2]]},"1739":{"position":[[62,2],[644,2],[761,2],[812,2],[938,2],[1006,1],[1050,2],[1053,2],[1127,1],[1172,2],[1406,2],[1460,1],[1478,2],[1481,2],[1558,1],[1576,2],[1579,2],[1711,1],[1729,2],[1732,2],[1801,1],[1863,2],[1891,1],[1909,2]]},"1742":{"position":[[349,2],[469,1],[489,2],[522,2],[563,2],[603,2],[669,2],[730,2],[733,2],[753,2],[756,2],[759,2],[762,3],[766,2],[779,2],[827,4],[874,1],[920,2],[1005,2],[1063,2],[1066,3],[1077,3],[1118,2],[1121,3],[1125,2],[1191,2],[1234,2],[1275,2],[1350,1],[1394,2],[1447,2],[1498,2],[1506,2],[1509,3],[1513,2]]},"1744":{"position":[[141,2],[226,1],[242,2],[265,2],[268,3],[272,2],[275,2],[360,1],[376,2],[401,2],[404,3],[408,2]]},"1746":{"position":[[166,1],[199,2]]},"1748":{"position":[[262,1],[322,2],[325,2],[395,2],[398,2],[449,2],[452,3],[456,2]]},"1750":{"position":[[172,1],[189,2],[192,2],[268,2],[271,2],[327,2],[330,2],[357,2],[360,3],[364,2]]},"1752":{"position":[[31,1],[101,2],[181,1],[195,2],[218,2],[221,3],[225,2]]},"1754":{"position":[[211,1],[257,2],[260,2],[301,1],[344,2],[378,2]]},"1756":{"position":[[76,2],[166,1],[168,2],[227,2],[250,2]]},"1758":{"position":[[452,2],[524,1],[624,1],[665,1],[669,2],[691,2],[715,2],[722,1],[735,1],[757,2],[785,2],[792,2],[795,3],[799,2],[802,2],[848,2],[961,2],[1085,2],[1197,2],[1260,2]]},"1760":{"position":[[151,1],[153,2],[192,2],[249,2],[343,2],[346,3],[350,2],[718,1],[808,1],[855,2],[858,2],[861,3],[865,2],[912,1],[953,2],[1020,1],[1060,2],[1063,2],[1066,3],[1070,2]]},"1762":{"position":[[330,2],[405,1],[411,2],[434,2],[437,3],[441,2]]},"1766":{"position":[[77,1],[387,1],[435,1],[437,2],[461,2],[494,1],[516,1],[539,1],[559,1],[572,2],[603,2],[606,3],[610,2]]},"1768":{"position":[[243,1],[245,2],[285,2],[321,2],[330,2],[333,3],[337,2]]},"1770":{"position":[[398,1],[447,2],[450,2],[540,2],[543,2],[566,2]]},"1772":{"position":[[286,1],[288,2],[336,2],[339,2],[356,2],[403,2],[406,2],[430,2],[484,2],[487,2],[506,2],[509,2],[512,2]]},"1774":{"position":[[216,1],[218,2],[274,2],[300,2],[392,2]]},"1776":{"position":[[214,1],[216,2],[279,2],[282,2],[295,2],[311,2],[314,2],[317,2]]},"1780":{"position":[[208,1],[232,2],[270,2],[313,2],[323,2],[326,2],[329,2]]},"1784":{"position":[[219,1],[253,2],[327,2],[380,2],[390,2],[393,2],[396,2]]},"1788":{"position":[[222,1],[319,1],[420,1],[434,2],[514,2],[517,2]]},"1790":{"position":[[106,2],[176,1],[191,2],[207,2],[210,3],[214,2]]},"1792":{"position":[[128,1],[137,2],[152,2],[155,3],[159,2],[289,2],[356,2]]},"1794":{"position":[[129,2],[213,1],[223,2],[260,2],[263,3],[267,2]]},"1796":{"position":[[256,2],[336,1],[351,2],[373,2],[394,2],[403,2],[406,3],[410,2]]},"1798":{"position":[[87,1],[135,1],[137,2],[218,2],[221,3],[225,2]]},"1800":{"position":[[218,1],[242,1],[286,1],[288,2],[316,2],[355,1],[377,2],[380,2],[414,2],[417,2],[504,2],[507,2],[510,2],[544,2],[547,2],[581,2]]},"1802":{"position":[[336,1],[360,1],[400,1],[402,2],[430,2],[469,1],[492,2],[495,2],[572,2],[575,2],[619,2]]},"1804":{"position":[[184,1],[289,1],[291,2],[351,2],[404,2],[407,3],[411,2]]},"1806":{"position":[[331,1],[375,2],[421,1],[443,2],[454,1],[518,1],[563,2]]},"1808":{"position":[[165,1],[234,2]]},"1810":{"position":[[261,1],[274,2],[311,2],[318,2],[321,3],[325,2]]},"1812":{"position":[[279,1],[281,2],[323,2],[349,2],[356,1],[358,2],[361,2],[389,2],[424,1],[428,1],[430,2],[470,1],[472,2],[517,2],[543,2],[546,2],[573,2],[608,2],[623,1],[695,2],[698,2],[741,2],[775,2],[836,2],[843,1],[856,1],[858,1],[860,1],[873,2]]},"1814":{"position":[[279,1],[323,2],[364,1],[408,2],[449,1],[514,2]]},"1816":{"position":[[87,2],[170,1],[188,2],[213,2],[216,3],[220,2]]},"1818":{"position":[[174,5],[290,2],[375,1],[394,2],[405,2],[408,3],[412,2],[415,2],[500,1],[516,2],[546,2],[561,2],[564,3],[568,2],[599,2],[672,2],[695,2],[743,2],[771,2],[978,1],[994,2],[1046,2]]},"1820":{"position":[[343,2],[424,1],[434,2],[455,2],[479,2],[482,3],[486,2]]},"1822":{"position":[[302,2],[383,1],[391,2],[450,2],[467,2],[470,3],[474,2]]},"1824":{"position":[[247,2],[332,1],[343,2],[380,2],[391,2],[394,3],[398,2]]},"1826":{"position":[[120,2],[184,1],[199,2],[209,2],[212,3],[216,2]]},"1828":{"position":[[182,2],[278,1],[282,2],[307,2],[333,2],[352,2],[355,2],[358,2],[361,3],[365,2],[376,2],[484,1],[488,2],[515,2],[539,2],[549,2],[560,2],[698,1],[702,2],[729,2],[750,2],[769,2],[780,2],[791,2],[905,1],[909,2],[949,2],[984,2],[998,2],[1009,2],[1217,1],[1221,2],[1246,2],[1288,2],[1340,2],[1368,2],[1418,2],[1428,2]]},"1830":{"position":[[334,2],[421,1],[440,2],[467,2],[502,2],[512,2],[515,3],[519,2]]},"1832":{"position":[[458,2],[554,1],[582,2],[623,2],[652,2],[687,2],[713,2],[746,2],[754,2],[757,3],[761,2]]},"1834":{"position":[[526,2],[618,1],[643,2],[678,2],[711,2],[737,2],[764,2],[769,2],[772,3],[776,2]]},"1836":{"position":[[516,2],[608,1],[638,2],[665,2],[690,2],[712,2],[717,2],[720,3],[724,2]]},"1838":{"position":[[302,2],[374,1],[467,1],[507,1],[511,2],[533,2],[558,2],[565,1],[578,1],[600,2],[628,2],[659,2],[674,2],[677,3],[681,2],[684,2],[729,2]]},"1840":{"position":[[132,2],[203,1],[207,2],[234,2],[245,1],[253,2],[271,1],[288,2],[302,1],[304,1],[306,2]]},"1842":{"position":[[313,1],[344,2],[391,1],[454,4],[459,2],[514,1],[661,2]]},"1844":{"position":[[449,1],[451,2],[526,2],[529,2],[582,1],[584,2],[796,2],[799,2],[850,1]]},"1846":{"position":[[347,1],[382,2],[427,1],[512,2],[557,1],[586,2]]},"1850":{"position":[[143,1],[173,2],[176,2],[193,2]]},"1852":{"position":[[312,2],[384,1],[489,1],[529,1],[533,2],[555,2],[584,2],[591,1],[604,1],[626,2],[654,2],[685,2],[700,2],[703,3],[707,2],[710,2],[755,2]]},"1854":{"position":[[147,1],[206,2],[209,2],[239,2]]},"1856":{"position":[[398,1],[433,2],[477,1],[520,2]]},"1858":{"position":[[81,2],[161,1],[165,2],[230,2],[265,2],[268,3],[272,2],[434,1],[468,1],[481,2],[499,2],[510,3],[518,2],[540,2],[558,2],[595,1],[597,1]]},"1860":{"position":[[176,1],[178,2],[220,2],[246,2],[253,1],[255,2],[258,2],[277,2],[322,2],[348,2],[351,2],[378,2],[413,2],[428,1],[500,2],[503,2],[546,2],[580,2],[641,2],[648,1],[661,1],[663,1],[676,1],[678,2]]},"1862":{"position":[[201,2],[256,1],[258,2],[300,2],[326,2],[333,1],[335,2],[338,2],[357,2],[402,2],[428,2],[431,2],[458,2],[493,2],[508,1],[580,2],[583,2],[626,2],[663,2],[742,2],[749,1],[762,1],[764,1],[777,1],[779,2]]},"1864":{"position":[[32,1],[116,2],[166,2]]},"1866":{"position":[[123,1],[164,2],[167,2],[186,2],[504,1],[543,2],[546,2],[627,2],[630,2],[649,2]]},"1868":{"position":[[322,1],[364,2],[436,2],[635,1],[690,2]]},"1870":{"position":[[262,1],[289,2],[292,2],[379,2],[382,2],[405,2]]},"1872":{"position":[[165,1],[203,2],[206,2],[236,2],[239,3],[243,2]]},"1874":{"position":[[314,2],[353,2],[390,2],[467,1],[471,2],[507,1],[509,2],[594,1],[629,1],[677,2],[717,2],[724,1],[752,1],[777,1],[790,2],[863,1],[865,2],[1024,2],[1027,2],[1118,1],[1244,1],[1289,1],[1375,2],[1421,1],[1508,2],[1511,2],[1601,2]]},"1876":{"position":[[168,1],[174,2],[220,2],[268,2],[271,3],[275,2]]},"1880":{"position":[[166,1],[204,1],[249,1],[317,1],[362,1],[434,2]]},"1882":{"position":[[268,2],[342,1],[359,2],[398,2],[410,2],[413,3],[417,2]]},"1884":{"position":[[207,1],[225,2],[228,2],[258,2],[261,2],[290,2],[293,2],[332,2],[335,2],[372,2],[375,3],[379,2]]},"1886":{"position":[[238,1],[244,2],[263,2],[308,2],[311,3],[315,2]]},"1888":{"position":[[288,1],[307,2],[310,2],[347,2],[350,2],[378,2],[412,2],[415,2],[479,2],[482,2],[535,2],[538,3],[542,2]]},"1890":{"position":[[139,1],[174,2],[177,2],[236,2],[268,2]]},"1892":{"position":[[164,1],[172,2],[213,2],[216,2],[275,2],[307,2]]},"1894":{"position":[[141,1],[174,2],[177,2],[236,2],[268,2]]},"1896":{"position":[[220,2],[294,1],[304,2],[312,2],[315,3],[319,2]]},"1898":{"position":[[222,1],[302,1],[342,1],[344,2],[372,2],[411,1],[432,2],[443,2],[465,2],[482,2],[494,2]]},"1910":{"position":[[20,1],[507,1],[520,1],[562,1],[567,2],[596,1],[605,2],[647,2],[654,1],[715,1],[717,3],[725,2],[817,1],[844,2],[894,1],[899,2],[922,2],[1001,2],[1035,1],[1080,1],[1096,2],[1143,2],[1150,1],[1167,1],[1172,2],[1397,3],[1401,1],[1560,1],[1614,1],[1624,2],[1733,2],[1742,1],[1770,1],[1789,1]]}}}],["0",{"_index":387,"t":{"803":{"position":[[457,2]]},"862":{"position":[[492,1]]},"890":{"position":[[251,1]]},"892":{"position":[[86,2]]},"930":{"position":[[341,2]]},"1070":{"position":[[325,2]]},"1072":{"position":[[402,1]]},"1074":{"position":[[106,2]]},"1100":{"position":[[201,1]]},"1102":{"position":[[274,2]]},"1170":{"position":[[216,2]]},"1211":{"position":[[2316,2]]},"1284":{"position":[[238,2],[345,2]]},"1366":{"position":[[1411,1],[1443,1]]},"1368":{"position":[[271,2]]},"1376":{"position":[[316,1]]},"1380":{"position":[[64,1]]},"1388":{"position":[[1686,2]]},"1390":{"position":[[306,2]]},"1406":{"position":[[74,3],[296,1]]},"1456":{"position":[[674,2]]},"1490":{"position":[[889,2]]},"1492":{"position":[[111,2]]},"1500":{"position":[[210,4],[501,2]]},"1502":{"position":[[43,4]]},"1663":{"position":[[176,1]]},"1742":{"position":[[1098,1]]},"1812":{"position":[[426,1]]},"1820":{"position":[[243,4]]},"1834":{"position":[[405,4],[740,1]]},"1836":{"position":[[405,4],[715,1]]}}}],["0.1.7",{"_index":3850,"t":{"1723":{"position":[[3499,5]]}}}],["0.4",{"_index":3596,"t":{"1661":{"position":[[72,3]]}}}],["0.7",{"_index":3593,"t":{"1659":{"position":[[70,3]]}}}],["01",{"_index":3895,"t":{"1725":{"position":[[1108,4],[1126,2]]},"1874":{"position":[[570,2],[697,2]]}}}],["02",{"_index":3112,"t":{"1504":{"position":[[324,2]]},"1550":{"position":[[967,3]]},"1725":{"position":[[1113,4]]},"1874":{"position":[[573,2],[700,4]]}}}],["0666",{"_index":3237,"t":{"1550":{"position":[[1111,5]]}}}],["08",{"_index":3901,"t":{"1725":{"position":[[1185,2],[2193,2],[2207,2]]}}}],["0rtt",{"_index":2923,"t":{"1406":{"position":[[835,5]]}}}],["1",{"_index":835,"t":{"930":{"position":[[390,2]]},"934":{"position":[[202,1]]},"1084":{"position":[[332,1]]},"1088":{"position":[[55,1],[94,2]]},"1112":{"position":[[402,1]]},"1114":{"position":[[839,1]]},"1116":{"position":[[180,1]]},"1144":{"position":[[145,2]]},"1178":{"position":[[1261,2],[2649,1],[4469,2],[4631,1]]},"1223":{"position":[[169,1]]},"1253":{"position":[[222,1]]},"1284":{"position":[[734,2]]},"1366":{"position":[[280,1]]},"1368":{"position":[[51,1]]},"1374":{"position":[[406,1],[595,1]]},"1376":{"position":[[297,1],[337,1]]},"1380":{"position":[[47,1],[83,1]]},"1396":{"position":[[445,1]]},"1398":{"position":[[1356,1]]},"1400":{"position":[[119,1]]},"1406":{"position":[[277,1]]},"1412":{"position":[[355,4]]},"1416":{"position":[[66,3]]},"1456":{"position":[[559,1],[623,2],[763,1]]},"1500":{"position":[[1371,5]]},"1502":{"position":[[284,5]]},"1522":{"position":[[395,1]]},"1524":{"position":[[661,1]]},"1526":{"position":[[463,1]]},"1540":{"position":[[583,1]]},"1542":{"position":[[48,1]]},"1584":{"position":[[696,1]]},"1604":{"position":[[279,3],[351,6]]},"1723":{"position":[[3116,4],[3228,4]]},"1725":{"position":[[1481,2],[1749,2]]},"1742":{"position":[[1390,3],[1407,2]]},"1744":{"position":[[379,7]]},"1752":{"position":[[141,1]]},"1788":{"position":[[480,3]]},"1834":{"position":[[368,2],[708,2],[714,1]]},"1836":{"position":[[368,2],[635,2],[662,2],[668,1],[687,2],[693,1]]}}}],["1,001.01e8",{"_index":3868,"t":{"1725":{"position":[[510,10]]}}}],["1,146,667",{"_index":3595,"t":{"1661":{"position":[[14,9]]}}}],["1,2,3",{"_index":4243,"t":{"1828":{"position":[[772,7]]}}}],["1.0",{"_index":655,"t":{"857":{"position":[[595,3]]}}}],["1.1",{"_index":3598,"t":{"1661":{"position":[[152,3]]}}}],["1.14/1.15",{"_index":728,"t":{"872":{"position":[[33,11]]}}}],["1.16",{"_index":3040,"t":{"1476":{"position":[[557,6]]},"1478":{"position":[[84,5]]},"1490":{"position":[[471,4]]}}}],["1.17",{"_index":1073,"t":{"1120":{"position":[[11,4]]},"1198":{"position":[[39,4]]}}}],["1.18",{"_index":539,"t":{"817":{"position":[[55,4]]},"880":{"position":[[82,4]]}}}],["1.234",{"_index":3867,"t":{"1725":{"position":[[502,6]]}}}],["1.3",{"_index":2910,"t":{"1406":{"position":[[152,3]]}}}],["1.3'",{"_index":2905,"t":{"1406":{"position":[[57,5]]}}}],["10",{"_index":745,"t":{"874":{"position":[[366,2]]},"876":{"position":[[636,2]]},"878":{"position":[[170,2]]},"902":{"position":[[300,2]]},"904":{"position":[[258,2]]},"906":{"position":[[82,2]]},"986":{"position":[[258,2]]},"988":{"position":[[75,2]]},"990":{"position":[[40,2]]},"1014":{"position":[[342,2],[567,2]]},"1016":{"position":[[860,2]]},"1018":{"position":[[147,2]]},"1028":{"position":[[342,2],[535,2],[749,2]]},"1030":{"position":[[875,2]]},"1032":{"position":[[147,2]]},"1056":{"position":[[319,2]]},"1058":{"position":[[1015,2]]},"1060":{"position":[[206,2]]},"1070":{"position":[[368,2]]},"1072":{"position":[[1456,2]]},"1074":{"position":[[149,2]]},"1112":{"position":[[329,2]]},"1114":{"position":[[319,2]]},"1116":{"position":[[107,2]]},"1211":{"position":[[2102,2],[2749,2]]},"1651":{"position":[[565,2]]},"1663":{"position":[[182,2]]},"1844":{"position":[[774,5]]},"1874":{"position":[[1568,2],[1677,2]]}}}],["10*time.second",{"_index":3545,"t":{"1648":{"position":[[2117,16]]}}}],["10.1",{"_index":2160,"t":{"1324":{"position":[[1380,4]]}}}],["10.4.1",{"_index":2196,"t":{"1324":{"position":[[1840,6]]}}}],["100",{"_index":1049,"t":{"1112":{"position":[[361,4],[380,4]]},"1114":{"position":[[585,4],[711,4]]},"1116":{"position":[[139,4],[158,4]]},"1324":{"position":[[1271,3]]},"1663":{"position":[[189,3],[580,4]]}}}],["1000",{"_index":3611,"t":{"1663":{"position":[[585,5]]},"1670":{"position":[[652,4]]}}}],["101",{"_index":2155,"t":{"1324":{"position":[[1321,3]]}}}],["102",{"_index":2158,"t":{"1324":{"position":[[1363,3]]}}}],["1024",{"_index":2605,"t":{"1329":{"position":[[509,4],[516,4],[1001,4]]}}}],["103",{"_index":2162,"t":{"1324":{"position":[[1404,3]]}}}],["10m",{"_index":1028,"t":{"1084":{"position":[[316,6]]},"1086":{"position":[[73,6]]}}}],["11",{"_index":1439,"t":{"1172":{"position":[[724,3]]},"1725":{"position":[[1123,2]]}}}],["11,846",{"_index":3584,"t":{"1655":{"position":[[14,6]]}}}],["11.1",{"_index":2188,"t":{"1324":{"position":[[1758,4]]}}}],["11.2",{"_index":2284,"t":{"1324":{"position":[[3161,4],[5562,4]]}}}],["11.3",{"_index":2287,"t":{"1324":{"position":[[3198,4],[5615,4]]}}}],["11.4",{"_index":2290,"t":{"1324":{"position":[[3245,4],[5688,4]]}}}],["11.5",{"_index":2331,"t":{"1324":{"position":[[3923,4],[6755,4]]}}}],["111",{"_index":4221,"t":{"1822":{"position":[[461,5]]}}}],["117.2",{"_index":3591,"t":{"1657":{"position":[[148,5]]}}}],["12",{"_index":1333,"t":{"1166":{"position":[[923,3],[1025,3]]},"1725":{"position":[[723,2],[1425,2]]}}}],["120",{"_index":3884,"t":{"1725":{"position":[[867,4],[962,4]]}}}],["120000",{"_index":3910,"t":{"1725":{"position":[[1688,7]]}}}],["123",{"_index":653,"t":{"857":{"position":[[562,3]]},"1820":{"position":[[462,3]]},"1910":{"position":[[1736,5]]}}}],["12345.pdf",{"_index":4094,"t":{"1770":{"position":[[434,12],[469,9],[513,11]]}}}],["123456",{"_index":839,"t":{"934":{"position":[[120,9]]},"1354":{"position":[[356,9],[506,9],[663,8]]}}}],["123456789",{"_index":3858,"t":{"1725":{"position":[[377,10],[389,9]]}}}],["125",{"_index":3919,"t":{"1725":{"position":[[2084,4]]}}}],["127.0.0.1",{"_index":932,"t":{"1000":{"position":[[256,12]]},"1002":{"position":[[225,11]]},"1004":{"position":[[53,12]]},"1014":{"position":[[248,12]]},"1016":{"position":[[267,11]]},"1018":{"position":[[53,12]]},"1028":{"position":[[248,12]]},"1030":{"position":[[345,11]]},"1032":{"position":[[53,12]]},"1058":{"position":[[398,11]]},"1060":{"position":[[92,12]]},"1070":{"position":[[262,12]]},"1072":{"position":[[84,11]]},"1074":{"position":[[34,12]]},"1536":{"position":[[416,11]]},"1792":{"position":[[140,11]]},"1794":{"position":[[157,10],[237,12]]}}}],["127.0.0.1:11211",{"_index":923,"t":{"974":{"position":[[113,17]]},"976":{"position":[[37,18]]}}}],["127.0.0.1:3000",{"_index":3010,"t":{"1456":{"position":[[525,14]]}}}],["127.0.0.1:3000/debug/var",{"_index":3011,"t":{"1456":{"position":[[566,25]]}}}],["127.0.0.1:3000/debug/vars?r=c",{"_index":3018,"t":{"1456":{"position":[[702,29]]}}}],["127.0.0.1:8091",{"_index":832,"t":{"930":{"position":[[287,17]]},"934":{"position":[[73,17]]}}}],["13",{"_index":2986,"t":{"1446":{"position":[[306,3]]}}}],["1433",{"_index":942,"t":{"1014":{"position":[[267,5]]},"1016":{"position":[[355,4]]},"1018":{"position":[[72,5]]}}}],["15",{"_index":887,"t":{"946":{"position":[[2668,2],[2722,2]]}}}],["15:04:05",{"_index":3260,"t":{"1552":{"position":[[759,8]]},"1554":{"position":[[126,11]]}}}],["15th",{"_index":1617,"t":{"1196":{"position":[[363,5]]}}}],["16",{"_index":3995,"t":{"1742":{"position":[[1375,4]]}}}],["1638",{"_index":3863,"t":{"1725":{"position":[[453,4],[463,4]]}}}],["18",{"_index":3880,"t":{"1725":{"position":[[798,3],[942,2]]}}}],["18.04.3",{"_index":3565,"t":{"1651":{"position":[[523,7]]}}}],["1831710635",{"_index":2987,"t":{"1446":{"position":[[310,11],[541,11]]}}}],["185",{"_index":1653,"t":{"1200":{"position":[[1552,5]]},"1329":{"position":[[4103,5]]}}}],["19",{"_index":3879,"t":{"1725":{"position":[[763,2]]}}}],["19,664",{"_index":3588,"t":{"1657":{"position":[[14,6]]}}}],["1;q=0.2",{"_index":3989,"t":{"1742":{"position":[[1226,7]]}}}],["1e7",{"_index":1025,"t":{"1084":{"position":[[271,4]]},"1088":{"position":[[41,4]]}}}],["1gb",{"_index":1032,"t":{"1084":{"position":[[366,6]]},"1086":{"position":[[131,6]]}}}],["1s",{"_index":1899,"t":{"1253":{"position":[[168,2]]}}}],["2",{"_index":231,"t":{"771":{"position":[[460,1]]},"837":{"position":[[1145,2]]},"872":{"position":[[26,1]]},"886":{"position":[[43,1]]},"900":{"position":[[24,1]]},"914":{"position":[[23,1]]},"928":{"position":[[27,1]]},"942":{"position":[[26,1]]},"946":{"position":[[175,3]]},"956":{"position":[[22,1]]},"962":{"position":[[80,1]]},"970":{"position":[[24,1]]},"984":{"position":[[24,1]]},"998":{"position":[[25,1]]},"1012":{"position":[[23,1]]},"1026":{"position":[[23,1]]},"1040":{"position":[[24,1]]},"1054":{"position":[[26,1]]},"1068":{"position":[[23,1]]},"1082":{"position":[[27,1]]},"1096":{"position":[[20,1]]},"1110":{"position":[[25,1]]},"1172":{"position":[[371,3],[471,1],[540,1]]},"1178":{"position":[[3533,1]]},"1376":{"position":[[364,1]]},"1380":{"position":[[108,1]]},"1422":{"position":[[677,1]]},"1428":{"position":[[258,1]]},"1524":{"position":[[1356,4],[1807,2]]},"1604":{"position":[[283,2]]},"1628":{"position":[[750,2]]},"1723":{"position":[[3137,4],[3247,4]]},"1742":{"position":[[777,1]]},"1760":{"position":[[1022,4]]},"1836":{"position":[[641,1]]},"1882":{"position":[[133,2]]}}}],["2*time.second",{"_index":3519,"t":{"1648":{"position":[[538,15],[1391,14]]}}}],["2,066",{"_index":3586,"t":{"1655":{"position":[[94,5]]}}}],["2.0",{"_index":3581,"t":{"1653":{"position":[[444,3]]}}}],["2.20ghz",{"_index":3561,"t":{"1651":{"position":[[499,7]]}}}],["2.3.3",{"_index":2277,"t":{"1324":{"position":[[3060,5],[5404,5]]}}}],["2.30ghz",{"_index":3601,"t":{"1663":{"position":[[96,7]]}}}],["20",{"_index":1147,"t":{"1128":{"position":[[87,2]]},"1536":{"position":[[436,3]]},"1538":{"position":[[176,3]]},"1800":{"position":[[351,3],[446,4],[500,3],[576,4]]},"1802":{"position":[[465,3],[532,4],[614,4]]},"1874":{"position":[[1571,2],[1680,3]]},"1898":{"position":[[407,3]]}}}],["200",{"_index":1757,"t":{"1215":{"position":[[221,3]]},"1324":{"position":[[1431,3]]},"1648":{"position":[[813,3]]}}}],["2005",{"_index":3896,"t":{"1725":{"position":[[1118,4]]}}}],["2006",{"_index":3232,"t":{"1550":{"position":[[975,6]]},"1874":{"position":[[565,4]]}}}],["201",{"_index":2167,"t":{"1324":{"position":[[1470,3]]}}}],["202",{"_index":2170,"t":{"1324":{"position":[[1510,3]]}}}],["2020",{"_index":1618,"t":{"1196":{"position":[[369,5]]}}}],["2022",{"_index":3900,"t":{"1725":{"position":[[1180,4],[2202,4]]}}}],["203",{"_index":2173,"t":{"1324":{"position":[[1569,3]]}}}],["204",{"_index":2176,"t":{"1324":{"position":[[1610,3]]}}}],["2048",{"_index":489,"t":{"809":{"position":[[604,5]]}}}],["205",{"_index":2179,"t":{"1324":{"position":[[1654,3]]}}}],["206",{"_index":2182,"t":{"1324":{"position":[[1700,3]]}}}],["207",{"_index":2186,"t":{"1324":{"position":[[1741,3]]}}}],["208",{"_index":2190,"t":{"1324":{"position":[[1787,3]]}}}],["226",{"_index":2194,"t":{"1324":{"position":[[1823,3]]}}}],["2295",{"_index":2327,"t":{"1324":{"position":[[3868,5],[6671,5]]}}}],["23",{"_index":1381,"t":{"1168":{"position":[[938,3],[966,2]]}}}],["24",{"_index":3486,"t":{"1630":{"position":[[121,2]]},"1632":{"position":[[40,2]]}}}],["244,847",{"_index":3597,"t":{"1661":{"position":[[96,7]]}}}],["25",{"_index":869,"t":{"946":{"position":[[1341,2],[2037,2]]}}}],["25.7",{"_index":3589,"t":{"1657":{"position":[[69,4]]}}}],["250",{"_index":3912,"t":{"1725":{"position":[[1796,3]]}}}],["2518",{"_index":2159,"t":{"1324":{"position":[[1374,5]]}}}],["256",{"_index":2618,"t":{"1329":{"position":[[995,3]]}}}],["27",{"_index":3902,"t":{"1725":{"position":[[1188,2],[2196,2],[2210,2]]}}}],["27017",{"_index":933,"t":{"1000":{"position":[[275,6]]},"1002":{"position":[[313,5]]},"1004":{"position":[[72,6]]}}}],["2774",{"_index":2337,"t":{"1324":{"position":[[4001,5],[6876,5]]}}}],["28",{"_index":3555,"t":{"1651":{"position":[[454,2]]}}}],["2]string",{"_index":612,"t":{"837":{"position":[[1095,9]]}}}],["2beb887efd54",{"_index":4117,"t":{"1784":{"position":[[281,13]]}}}],["3",{"_index":778,"t":{"890":{"position":[[658,1]]},"892":{"position":[[116,2]]},"930":{"position":[[363,2]]},"934":{"position":[[174,1]]},"946":{"position":[[1010,1]]},"948":{"position":[[93,2]]},"1100":{"position":[[613,1]]},"1102":{"position":[[255,2]]},"1172":{"position":[[473,1]]},"1324":{"position":[[2192,1],[3383,1],[3535,1],[5899,1],[6149,1]]},"1564":{"position":[[185,1]]},"1582":{"position":[[1460,3]]},"1828":{"position":[[732,3],[753,3]]},"1834":{"position":[[675,2],[761,2],[767,1]]}}}],["3.1",{"_index":2225,"t":{"1324":{"position":[[2274,3],[4203,3]]}}}],["3.2",{"_index":2243,"t":{"1324":{"position":[[2542,3],[4609,3]]}}}],["30",{"_index":1030,"t":{"1084":{"position":[[337,3]]},"1088":{"position":[[60,3]]},"1364":{"position":[[442,2]]},"1514":{"position":[[342,2]]},"1516":{"position":[[179,2]]},"1536":{"position":[[452,2]]},"1538":{"position":[[192,2]]},"1663":{"position":[[537,2]]}}}],["300",{"_index":2198,"t":{"1324":{"position":[[1871,3]]}}}],["3000",{"_index":1892,"t":{"1251":{"position":[[226,8]]},"1340":{"position":[[357,4]]},"1342":{"position":[[271,4]]},"1344":{"position":[[320,4]]},"1346":{"position":[[190,4]]},"1348":{"position":[[201,4]]}}}],["301",{"_index":2201,"t":{"1324":{"position":[[1919,3]]},"1602":{"position":[[253,4]]},"1842":{"position":[[656,4]]}}}],["302",{"_index":2204,"t":{"1324":{"position":[[1956,3]]},"1604":{"position":[[566,3]]},"1842":{"position":[[179,3]]},"1844":{"position":[[187,3]]},"1846":{"position":[[215,3]]}}}],["303",{"_index":2207,"t":{"1324":{"position":[[1996,3]]}}}],["304",{"_index":2210,"t":{"1324":{"position":[[2039,3]]}}}],["305",{"_index":2213,"t":{"1324":{"position":[[2077,3]]}}}],["307",{"_index":2216,"t":{"1324":{"position":[[2126,3]]}}}],["308",{"_index":2219,"t":{"1324":{"position":[[2175,3]]}}}],["32",{"_index":2633,"t":{"1329":{"position":[[1952,4]]},"1420":{"position":[[92,2]]},"1422":{"position":[[289,2],[426,3]]},"1424":{"position":[[391,2],[476,3]]}}}],["32.23",{"_index":4271,"t":{"1834":{"position":[[646,5],[681,5]]}}}],["3229",{"_index":2195,"t":{"1324":{"position":[[1834,5]]}}}],["32gb",{"_index":3562,"t":{"1651":{"position":[[507,4]]}}}],["33",{"_index":3015,"t":{"1456":{"position":[[648,3]]}}}],["3306",{"_index":951,"t":{"1028":{"position":[[267,5]]},"1030":{"position":[[433,4]]},"1032":{"position":[[72,5]]}}}],["339222389",{"_index":3940,"t":{"1737":{"position":[[623,9]]}}}],["354.1",{"_index":3583,"t":{"1653":{"position":[[518,5]]}}}],["36",{"_index":3120,"t":{"1514":{"position":[[670,2]]},"1516":{"position":[[291,3],[323,2]]}}}],["3600",{"_index":1727,"t":{"1211":{"position":[[2775,5]]},"1476":{"position":[[523,5]]}}}],["360641",{"_index":4196,"t":{"1812":{"position":[[716,6]]},"1860":{"position":[[521,6]]},"1862":{"position":[[601,6]]}}}],["367,069",{"_index":3582,"t":{"1653":{"position":[[462,7]]}}}],["368,647",{"_index":3592,"t":{"1659":{"position":[[14,7]]}}}],["390.44",{"_index":3587,"t":{"1655":{"position":[[148,6]]}}}],["3rd",{"_index":1441,"t":{"1172":{"position":[[793,3]]},"1688":{"position":[[158,3]]}}}],["4",{"_index":1430,"t":{"1172":{"position":[[475,3]]},"1324":{"position":[[3426,1],[5967,1]]},"1329":{"position":[[505,1]]},"1723":{"position":[[3514,2]]},"1725":{"position":[[579,1]]}}}],["4,302",{"_index":3590,"t":{"1657":{"position":[[94,5]]}}}],["4.1",{"_index":2184,"t":{"1324":{"position":[[1717,3],[2056,3]]}}}],["4.15.0",{"_index":3566,"t":{"1651":{"position":[[531,6]]}}}],["4.2",{"_index":2258,"t":{"1324":{"position":[[2759,3],[4934,3]]}}}],["4.3.1",{"_index":2110,"t":{"1324":{"position":[[79,5]]}}}],["4.3.2",{"_index":2112,"t":{"1324":{"position":[[118,5]]}}}],["4.3.3",{"_index":2114,"t":{"1324":{"position":[[157,5]]}}}],["4.3.4",{"_index":2116,"t":{"1324":{"position":[[194,5]]}}}],["4.3.5",{"_index":2121,"t":{"1324":{"position":[[271,5]]}}}],["4.3.6",{"_index":2123,"t":{"1324":{"position":[[316,5]]}}}],["4.3.7",{"_index":2125,"t":{"1324":{"position":[[361,5]]}}}],["4.3.8",{"_index":2127,"t":{"1324":{"position":[[402,5]]}}}],["4.4",{"_index":2270,"t":{"1324":{"position":[[2974,3],[5275,3]]},"1659":{"position":[[149,3]]}}}],["400",{"_index":364,"t":{"797":{"position":[[212,4]]},"823":{"position":[[271,3]]},"831":{"position":[[221,4]]},"1324":{"position":[[2213,3]]},"1522":{"position":[[839,3]]},"1540":{"position":[[855,3],[970,3]]}}}],["401",{"_index":362,"t":{"797":{"position":[[154,4]]},"803":{"position":[[333,3]]},"831":{"position":[[163,4]]},"837":{"position":[[330,3]]},"1324":{"position":[[2257,3]]},"1350":{"position":[[138,3]]},"1356":{"position":[[943,3]]},"1528":{"position":[[432,3]]}}}],["402",{"_index":2227,"t":{"1324":{"position":[[2302,3]]}}}],["403",{"_index":2230,"t":{"1324":{"position":[[2343,3]]}}}],["404",{"_index":2233,"t":{"1324":{"position":[[2383,3]]},"1668":{"position":[[229,3],[360,3]]},"1681":{"position":[[951,4]]},"1694":{"position":[[860,3]]},"1725":{"position":[[316,3]]}}}],["404.html",{"_index":3039,"t":{"1476":{"position":[[503,11]]}}}],["405",{"_index":2236,"t":{"1324":{"position":[[2431,3]]}}}],["406",{"_index":2239,"t":{"1324":{"position":[[2476,3]]}}}],["407",{"_index":2242,"t":{"1324":{"position":[[2525,3]]}}}],["408",{"_index":2245,"t":{"1324":{"position":[[2569,3]]},"1648":{"position":[[904,3]]}}}],["409",{"_index":2248,"t":{"1324":{"position":[[2609,3]]}}}],["4096",{"_index":2692,"t":{"1329":{"position":[[5564,4],[6974,4]]}}}],["410",{"_index":2251,"t":{"1324":{"position":[[2645,3]]}}}],["411",{"_index":2254,"t":{"1324":{"position":[[2691,3]]}}}],["412",{"_index":2257,"t":{"1324":{"position":[[2742,3]]}}}],["413",{"_index":2260,"t":{"1324":{"position":[[2793,3]]},"1329":{"position":[[464,3]]}}}],["414",{"_index":2263,"t":{"1324":{"position":[[2843,3]]}}}],["415",{"_index":2266,"t":{"1324":{"position":[[2896,3]]},"1870":{"position":[[295,3],[385,3]]}}}],["416",{"_index":2269,"t":{"1324":{"position":[[2957,3]]}}}],["417",{"_index":2272,"t":{"1324":{"position":[[3004,3]]}}}],["418",{"_index":2275,"t":{"1324":{"position":[[3043,3]]}}}],["42",{"_index":3117,"t":{"1512":{"position":[[54,2]]},"1725":{"position":[[2583,2]]}}}],["42.8",{"_index":3585,"t":{"1655":{"position":[[69,4]]}}}],["421",{"_index":2279,"t":{"1324":{"position":[[3093,3]]}}}],["422",{"_index":2283,"t":{"1324":{"position":[[3144,3]]}}}],["423",{"_index":2286,"t":{"1324":{"position":[[3181,3]]}}}],["424",{"_index":2289,"t":{"1324":{"position":[[3228,3]]}}}],["425",{"_index":2292,"t":{"1324":{"position":[[3267,3]]}}}],["426",{"_index":1652,"t":{"1200":{"position":[[1543,4]]},"1324":{"position":[[3313,3]]}}}],["428",{"_index":2298,"t":{"1324":{"position":[[3366,3]]}}}],["429",{"_index":2301,"t":{"1324":{"position":[[3409,3]]},"1540":{"position":[[274,3]]}}}],["431",{"_index":2303,"t":{"1324":{"position":[[3464,3]]}}}],["443",{"_index":4476,"t":{"1906":{"position":[[545,3]]}}}],["450b",{"_index":4115,"t":{"1784":{"position":[[271,4]]}}}],["451",{"_index":2305,"t":{"1324":{"position":[[3518,3]]}}}],["4918",{"_index":2187,"t":{"1324":{"position":[[1752,5],[3155,5],[3192,5],[3239,5],[3917,5],[5556,5],[5609,5],[5682,5],[6749,5]]}}}],["4gb",{"_index":3603,"t":{"1663":{"position":[[108,3]]}}}],["5",{"_index":866,"t":{"946":{"position":[[1246,2],[1942,2]]},"948":{"position":[[129,2],[152,2]]},"1324":{"position":[[3481,1],[6059,1]]},"1540":{"position":[[302,1]]},"1542":{"position":[[33,2]]},"1582":{"position":[[1624,1],[1765,3]]}}}],["5.2",{"_index":2294,"t":{"1324":{"position":[[3284,4],[5745,4]]}}}],["500",{"_index":2308,"t":{"1324":{"position":[[3565,3]]},"1552":{"position":[[1014,3]]},"1554":{"position":[[171,3]]},"1663":{"position":[[197,3]]},"1683":{"position":[[90,3],[342,3]]},"1685":{"position":[[735,3]]},"1840":{"position":[[291,5]]}}}],["5000",{"_index":3607,"t":{"1663":{"position":[[261,5],[591,4]]}}}],["501",{"_index":2311,"t":{"1324":{"position":[[3611,3]]}}}],["502",{"_index":2314,"t":{"1324":{"position":[[3653,3]]}}}],["503",{"_index":2317,"t":{"1324":{"position":[[3703,3]]},"1681":{"position":[[1026,3],[1088,3]]}}}],["504",{"_index":2320,"t":{"1324":{"position":[[3749,3]]}}}],["505",{"_index":2323,"t":{"1324":{"position":[[3804,3]]}}}],["506",{"_index":2326,"t":{"1324":{"position":[[3857,3]]}}}],["507",{"_index":2330,"t":{"1324":{"position":[[3906,3]]}}}],["508",{"_index":2333,"t":{"1324":{"position":[[3949,3]]}}}],["510",{"_index":2336,"t":{"1324":{"position":[[3990,3]]}}}],["511",{"_index":2340,"t":{"1324":{"position":[[4047,3]]}}}],["5120",{"_index":3560,"t":{"1651":{"position":[[488,4]]}}}],["5432",{"_index":968,"t":{"1058":{"position":[[486,4]]},"1060":{"position":[[111,5]]}}}],["57,880",{"_index":3594,"t":{"1659":{"position":[[94,6]]}}}],["5789",{"_index":2119,"t":{"1324":{"position":[[229,4]]}}}],["5842",{"_index":2191,"t":{"1324":{"position":[[1798,5],[3960,5],[6814,5]]}}}],["6",{"_index":1357,"t":{"1166":{"position":[[1810,3],[1856,4]]},"1324":{"position":[[4064,1],[6978,1]]}}}],["6,162,556",{"_index":3580,"t":{"1653":{"position":[[386,9]]}}}],["6.2.1",{"_index":2153,"t":{"1324":{"position":[[1288,5]]}}}],["6.2.2",{"_index":2156,"t":{"1324":{"position":[[1338,5]]}}}],["6.3.1",{"_index":2165,"t":{"1324":{"position":[[1448,5]]}}}],["6.3.2",{"_index":2168,"t":{"1324":{"position":[[1487,5]]}}}],["6.3.3",{"_index":2171,"t":{"1324":{"position":[[1527,5]]}}}],["6.3.4",{"_index":2174,"t":{"1324":{"position":[[1586,5]]}}}],["6.3.5",{"_index":2177,"t":{"1324":{"position":[[1627,5]]}}}],["6.3.6",{"_index":2180,"t":{"1324":{"position":[[1671,5]]}}}],["6.4.1",{"_index":2199,"t":{"1324":{"position":[[1888,5]]}}}],["6.4.2",{"_index":2202,"t":{"1324":{"position":[[1936,5]]}}}],["6.4.3",{"_index":2205,"t":{"1324":{"position":[[1973,5]]}}}],["6.4.4",{"_index":2208,"t":{"1324":{"position":[[2013,5]]}}}],["6.4.5",{"_index":2214,"t":{"1324":{"position":[[2094,5]]}}}],["6.4.7",{"_index":2217,"t":{"1324":{"position":[[2143,5]]}}}],["6.5.1",{"_index":2222,"t":{"1324":{"position":[[2230,5],[4137,5]]}}}],["6.5.10",{"_index":2255,"t":{"1324":{"position":[[2708,6],[4855,6]]}}}],["6.5.11",{"_index":2261,"t":{"1324":{"position":[[2810,6],[5016,6]]}}}],["6.5.12",{"_index":2264,"t":{"1324":{"position":[[2860,6],[5093,6]]}}}],["6.5.13",{"_index":2267,"t":{"1324":{"position":[[2913,6],[5176,6]]}}}],["6.5.14",{"_index":2273,"t":{"1324":{"position":[[3021,6],[5349,6]]}}}],["6.5.15",{"_index":2296,"t":{"1324":{"position":[[3330,6],[5816,6]]}}}],["6.5.2",{"_index":2228,"t":{"1324":{"position":[[2319,5],[4273,5]]}}}],["6.5.3",{"_index":2231,"t":{"1324":{"position":[[2360,5],[4333,5]]}}}],["6.5.4",{"_index":2234,"t":{"1324":{"position":[[2400,5],[4391,5]]}}}],["6.5.5",{"_index":2237,"t":{"1324":{"position":[[2448,5],[4465,5]]}}}],["6.5.6",{"_index":2240,"t":{"1324":{"position":[[2493,5],[4533,5]]}}}],["6.5.7",{"_index":2246,"t":{"1324":{"position":[[2586,5],[4677,5]]}}}],["6.5.8",{"_index":2249,"t":{"1324":{"position":[[2626,5],[4735,5]]}}}],["6.5.9",{"_index":2252,"t":{"1324":{"position":[[2662,5],[4785,5]]}}}],["6.6.1",{"_index":2309,"t":{"1324":{"position":[[3582,5],[6225,5]]}}}],["6.6.2",{"_index":2312,"t":{"1324":{"position":[[3628,5],[6295,5]]}}}],["6.6.3",{"_index":2315,"t":{"1324":{"position":[[3670,5],[6357,5]]}}}],["6.6.4",{"_index":2318,"t":{"1324":{"position":[[3720,5],[6435,5]]}}}],["6.6.5",{"_index":2321,"t":{"1324":{"position":[[3766,5],[6505,5]]}}}],["6.6.6",{"_index":2324,"t":{"1324":{"position":[[3821,5],[6593,5]]}}}],["60",{"_index":824,"t":{"918":{"position":[[342,2]]},"920":{"position":[[123,2]]}}}],["600",{"_index":2801,"t":{"1364":{"position":[[702,7]]}}}],["6000",{"_index":2806,"t":{"1364":{"position":[[923,7]]}}}],["6140",{"_index":3600,"t":{"1663":{"position":[[85,4]]}}}],["6379",{"_index":974,"t":{"1070":{"position":[[281,5]]},"1072":{"position":[[172,4]]},"1074":{"position":[[53,5]]}}}],["6380",{"_index":983,"t":{"1070":{"position":[[617,9]]}}}],["64",{"_index":1034,"t":{"1084":{"position":[[386,3]]},"1088":{"position":[[77,3]]}}}],["6585",{"_index":2299,"t":{"1324":{"position":[[3377,5],[3420,5],[3475,5],[4058,5],[5893,5],[5961,5],[6053,5],[6972,5]]}}}],["7",{"_index":2338,"t":{"1324":{"position":[[4007,1],[6882,1]]}}}],["7.0",{"_index":3927,"t":{"1725":{"position":[[2682,4]]}}}],["7.1",{"_index":2192,"t":{"1324":{"position":[[1804,3]]}}}],["7.2",{"_index":2334,"t":{"1324":{"position":[[3966,3],[6820,3]]}}}],["700",{"_index":4290,"t":{"1840":{"position":[[152,4],[157,3],[297,4]]}}}],["7168",{"_index":2276,"t":{"1324":{"position":[[3054,5],[5398,5]]}}}],["72).unix",{"_index":439,"t":{"805":{"position":[[766,11]]},"809":{"position":[[1296,11]]}}}],["7231",{"_index":2109,"t":{"1324":{"position":[[73,5],[112,5],[151,5],[188,5],[265,5],[310,5],[355,5],[396,5],[1282,5],[1332,5],[1442,5],[1481,5],[1521,5],[1580,5],[1621,5],[1665,5],[1882,5],[1930,5],[1967,5],[2007,5],[2088,5],[2137,5],[2224,5],[2313,5],[2354,5],[2394,5],[2442,5],[2487,5],[2580,5],[2620,5],[2656,5],[2702,5],[2804,5],[2854,5],[2907,5],[3015,5],[3324,5],[3576,5],[3622,5],[3664,5],[3714,5],[3760,5],[3815,5],[4131,5],[4267,5],[4327,5],[4385,5],[4459,5],[4527,5],[4671,5],[4729,5],[4779,5],[4849,5],[5010,5],[5087,5],[5170,5],[5343,5],[5810,5],[6219,5],[6289,5],[6351,5],[6429,5],[6499,5],[6587,5]]}}}],["7232",{"_index":2211,"t":{"1324":{"position":[[2050,5],[2753,5],[4928,5]]}}}],["7233",{"_index":2183,"t":{"1324":{"position":[[1711,5],[2968,5],[5269,5]]}}}],["7235",{"_index":2224,"t":{"1324":{"position":[[2268,5],[2536,5],[4197,5],[4603,5]]}}}],["72d5",{"_index":3864,"t":{"1725":{"position":[[458,4]]}}}],["750",{"_index":3686,"t":{"1678":{"position":[[1330,4]]}}}],["7517",{"_index":507,"t":{"813":{"position":[[174,5]]}}}],["7538",{"_index":2220,"t":{"1324":{"position":[[2186,5]]}}}],["7540",{"_index":2280,"t":{"1324":{"position":[[3104,5],[5476,5]]}}}],["7725",{"_index":2306,"t":{"1324":{"position":[[3529,5],[6143,5]]}}}],["8",{"_index":2146,"t":{"1324":{"position":[[877,2],[930,2],[985,2],[1050,2],[1117,2],[1196,2]]},"1406":{"position":[[731,1]]},"1674":{"position":[[25,1]]},"1683":{"position":[[548,1]]},"1725":{"position":[[657,1]]},"1742":{"position":[[428,2],[1214,2]]},"1796":{"position":[[296,1]]},"1884":{"position":[[328,3],[369,2]]}}}],["8\">20worldworld!{{.name}}${{.price}}.new(dir",{"_index":1084,"t":{"1122":{"position":[[398,17]]}}}],["enhancesentryev",{"_index":281,"t":{"773":{"position":[[1313,18],[1509,19]]}}}],["ensur",{"_index":1550,"t":{"1178":{"position":[[3876,7]]},"1514":{"position":[[648,7]]},"1681":{"position":[[18,6]]},"1737":{"position":[[53,6]]},"1760":{"position":[[638,6]]}}}],["entir",{"_index":1538,"t":{"1178":{"position":[[2228,6]]}}}],["entiti",{"_index":2604,"t":{"1329":{"position":[[478,6]]}}}],["entri",{"_index":2818,"t":{"1366":{"position":[[1338,7]]},"1812":{"position":[[25,8]]}}}],["environ",{"_index":842,"t":{"936":{"position":[[131,11]]},"946":{"position":[[224,11],[261,11]]},"1090":{"position":[[125,11]]},"1329":{"position":[[4936,11]]},"1430":{"position":[[55,11]]},"1438":{"position":[[94,11],[193,11]]},"1476":{"position":[[541,11]]},"1653":{"position":[[338,12]]},"1670":{"position":[[1184,12]]}}}],["envoy",{"_index":3157,"t":{"1522":{"position":[[1231,5]]}}}],["envvar",{"_index":2962,"t":{"1430":{"position":[[0,6]]},"1434":{"position":[[588,6]]}}}],["envvar.config",{"_index":2966,"t":{"1434":{"position":[[387,14]]}}}],["envvar.new",{"_index":2965,"t":{"1434":{"position":[[291,13],[375,11]]}}}],["eq",{"_index":1456,"t":{"1174":{"position":[[266,2],[508,2],[594,2]]}}}],["equal",{"_index":1854,"t":{"1235":{"position":[[119,5]]},"1412":{"position":[[348,6]]},"1681":{"position":[[956,6]]}}}],["equiv=\"cont",{"_index":1359,"t":{"1166":{"position":[[1875,14]]}}}],["equival",{"_index":1427,"t":{"1172":{"position":[[381,10],[482,10],[1563,10]]},"1448":{"position":[[509,11]]},"1820":{"position":[[504,10]]},"1864":{"position":[[138,10]]}}}],["err",{"_index":189,"t":{"759":{"position":[[336,3]]},"763":{"position":[[167,3]]},"795":{"position":[[365,3],[393,3]]},"805":{"position":[[909,3],[956,3]]},"809":{"position":[[555,3],[577,3],[613,3],[660,4],[1439,3],[1480,3],[1530,4]]},"857":{"position":[[757,3],[787,3],[810,3],[844,4],[888,3],[919,3],[954,4]]},"1070":{"position":[[675,3],[737,3]]},"1162":{"position":[[466,3]]},"1166":{"position":[[1494,3]]},"1168":{"position":[[884,3]]},"1176":{"position":[[1991,3],[2012,3],[2065,3]]},"1178":{"position":[[1488,3],[2520,3],[3668,3],[4528,3],[4712,3]]},"1262":{"position":[[152,3],[170,3],[208,4]]},"1316":{"position":[[119,4],[153,4]]},"1318":{"position":[[141,4]]},"1320":{"position":[[182,4],[227,4]]},"1348":{"position":[[313,3],[356,3],[376,3]]},"1488":{"position":[[286,3],[305,3]]},"1530":{"position":[[123,3],[145,3]]},"1550":{"position":[[1044,3],[1120,3],[1170,4]]},"1582":{"position":[[1167,3],[1192,3],[1212,3],[1411,3],[1464,3],[1484,3],[1700,3],[1769,3],[1789,3],[1989,3],[2066,3],[2086,3]]},"1628":{"position":[[404,3],[427,3],[625,3],[648,3],[772,3],[792,3]]},"1648":{"position":[[369,3],[422,3],[476,4],[1196,3],[1264,3],[1318,4]]},"1672":{"position":[[202,3]]},"1683":{"position":[[296,3]]},"1685":{"position":[[689,3],[922,3],[989,3]]},"1737":{"position":[[934,3],[966,3],[986,3],[1288,3],[1315,3]]},"1758":{"position":[[687,3],[711,3],[731,3]]},"1774":{"position":[[270,3]]},"1812":{"position":[[319,3],[345,3],[771,3],[832,3],[852,3],[869,3]]},"1820":{"position":[[430,3]]},"1838":{"position":[[529,3],[554,3],[574,3]]},"1852":{"position":[[551,3],[580,3],[600,3]]},"1858":{"position":[[514,3],[591,3]]},"1860":{"position":[[216,3],[242,3],[576,3],[637,3],[657,3],[672,3]]},"1862":{"position":[[296,3],[322,3],[659,3],[738,3],[758,3],[773,3]]},"1874":{"position":[[673,3],[713,3]]},"1890":{"position":[[82,3]]},"1892":{"position":[[107,3]]},"1894":{"position":[[84,3]]},"1910":{"position":[[601,3],[643,3],[710,4],[1092,3],[1139,3]]}}}],["err.(validator.validationerror",{"_index":3950,"t":{"1737":{"position":[[999,32]]}}}],["err.error",{"_index":1559,"t":{"1178":{"position":[[4739,12]]},"1737":{"position":[[1404,12]]}}}],["err.param",{"_index":3956,"t":{"1737":{"position":[[1144,11]]}}}],["err.structnamespac",{"_index":3952,"t":{"1737":{"position":[[1082,21]]}}}],["err.tag",{"_index":3954,"t":{"1737":{"position":[[1118,9]]}}}],["errbadgateway",{"_index":2403,"t":{"1324":{"position":[[6301,13]]}}}],["errbadrequest",{"_index":2341,"t":{"1324":{"position":[[4081,13]]}}}],["errconflict",{"_index":2359,"t":{"1324":{"position":[[4683,11]]}}}],["errexpectationfail",{"_index":2375,"t":{"1324":{"position":[[5279,20]]}}}],["errfaileddepend",{"_index":2385,"t":{"1324":{"position":[[5620,19]]}}}],["errfootimeout",{"_index":3529,"t":{"1648":{"position":[[1012,13],[1406,15],[1630,13]]}}}],["errforbidden",{"_index":2347,"t":{"1324":{"position":[[4279,12]]}}}],["errgatewaytimeout",{"_index":2407,"t":{"1324":{"position":[[6441,17]]}}}],["errgon",{"_index":2361,"t":{"1324":{"position":[[4741,7]]}}}],["errhttpversionnotsupport",{"_index":2409,"t":{"1324":{"position":[[6511,26]]}}}],["errinsufficientstorag",{"_index":2413,"t":{"1324":{"position":[[6681,22]]}}}],["errinternalservererror",{"_index":2399,"t":{"1324":{"position":[[6151,22]]}}}],["errinvalididempotencykey",{"_index":3131,"t":{"1516":{"position":[[382,25]]}}}],["errlengthrequir",{"_index":2363,"t":{"1324":{"position":[[4791,17]]}}}],["errlock",{"_index":2383,"t":{"1324":{"position":[[5567,9]]}}}],["errloopdetect",{"_index":2415,"t":{"1324":{"position":[[6760,15]]}}}],["errmethodnotallow",{"_index":2351,"t":{"1324":{"position":[[4397,19]]}}}],["errmisdirectedrequest",{"_index":2379,"t":{"1324":{"position":[[5410,21]]}}}],["errmissingormalformedapikey",{"_index":3181,"t":{"1530":{"position":[[152,27]]}}}],["errnetworkauthenticationrequir",{"_index":2419,"t":{"1324":{"position":[[6884,32]]}}}],["errnotaccept",{"_index":2353,"t":{"1324":{"position":[[4471,16]]}}}],["errnotextend",{"_index":2417,"t":{"1324":{"position":[[6824,14]]}}}],["errnotfound",{"_index":2349,"t":{"1324":{"position":[[4339,11]]}}}],["errnotimpl",{"_index":2401,"t":{"1324":{"position":[[6231,17]]}}}],["erron",{"_index":3108,"t":{"1504":{"position":[[156,11]]}}}],["error",{"_index":59,"t":{"733":{"position":[[366,5],[453,5]]},"737":{"position":[[564,5],[753,5]]},"739":{"position":[[530,5]]},"741":{"position":[[507,5]]},"751":{"position":[[411,5],[518,5]]},"759":{"position":[[340,6]]},"761":{"position":[[164,5]]},"763":{"position":[[391,5]]},"773":{"position":[[1354,5],[1548,5],[1606,5]]},"783":{"position":[[337,7],[353,7]]},"785":{"position":[[273,5]]},"793":{"position":[[454,8],[524,7],[540,7]]},"795":{"position":[[314,5],[445,7]]},"797":{"position":[[175,6],[232,6]]},"801":{"position":[[55,5]]},"803":{"position":[[137,5],[248,6],[255,5]]},"805":{"position":[[473,5],[560,5],[1093,5],[1167,5]]},"809":{"position":[[559,5],[1003,5],[1090,5],[1659,5],[1733,5]]},"815":{"position":[[936,5],[1050,6]]},"823":{"position":[[578,6]]},"825":{"position":[[67,6]]},"827":{"position":[[785,6],[942,5]]},"831":{"position":[[184,6],[240,6]]},"835":{"position":[[61,5]]},"837":{"position":[[129,5],[245,6],[252,5]]},"839":{"position":[[510,6]]},"857":{"position":[[166,5],[761,5]]},"859":{"position":[[15,5]]},"862":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"870":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"884":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"898":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"912":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"926":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"940":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"946":{"position":[[2737,5],[3002,7]]},"954":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"968":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"982":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"996":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1010":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1024":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1038":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1052":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1066":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1080":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1094":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1108":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"1122":{"position":[[1552,5],[1696,5]]},"1132":{"position":[[676,5],[806,5]]},"1136":{"position":[[679,5],[809,5]]},"1140":{"position":[[765,5],[895,5]]},"1142":{"position":[[855,5]]},"1148":{"position":[[725,5],[855,5]]},"1152":{"position":[[736,5],[866,5]]},"1154":{"position":[[337,5]]},"1156":{"position":[[463,5]]},"1176":{"position":[[1995,5]]},"1178":{"position":[[2448,6]]},"1182":{"position":[[727,5],[857,5]]},"1186":{"position":[[902,5],[1032,5]]},"1190":{"position":[[720,5],[850,5]]},"1194":{"position":[[744,5],[874,5]]},"1200":{"position":[[525,5],[804,5],[1161,5]]},"1202":{"position":[[196,5]]},"1204":{"position":[[395,6],[539,5],[721,5],[861,5],[1056,5],[1291,5]]},"1213":{"position":[[1000,5],[1121,5],[1454,5],[1552,5],[1705,5],[1795,5],[1885,5]]},"1215":{"position":[[265,5]]},"1225":{"position":[[445,5],[510,5],[573,5]]},"1229":{"position":[[133,5]]},"1231":{"position":[[147,5]]},"1233":{"position":[[132,5]]},"1235":{"position":[[266,5]]},"1241":{"position":[[98,5]]},"1243":{"position":[[192,5]]},"1245":{"position":[[71,5]]},"1247":{"position":[[240,5]]},"1249":{"position":[[288,5]]},"1251":{"position":[[184,5]]},"1253":{"position":[[331,6],[421,5]]},"1316":{"position":[[46,6],[124,8]]},"1318":{"position":[[48,6],[112,8]]},"1320":{"position":[[47,6],[187,8]]},"1322":{"position":[[62,6]]},"1324":{"position":[[4068,6]]},"1329":{"position":[[3397,5],[3449,5]]},"1331":{"position":[[121,6],[168,5],[211,5]]},"1337":{"position":[[686,6]]},"1344":{"position":[[386,5]]},"1346":{"position":[[274,5]]},"1348":{"position":[[296,5]]},"1354":{"position":[[737,5]]},"1364":{"position":[[877,5]]},"1392":{"position":[[361,6]]},"1396":{"position":[[525,6]]},"1398":{"position":[[1992,6]]},"1410":{"position":[[375,6]]},"1412":{"position":[[651,5],[756,5],[762,5]]},"1414":{"position":[[211,6]]},"1422":{"position":[[776,5],[908,5]]},"1424":{"position":[[682,6],[820,6]]},"1446":{"position":[[373,5],[604,5]]},"1456":{"position":[[335,5]]},"1498":{"position":[[189,5]]},"1514":{"position":[[743,5]]},"1516":{"position":[[263,5]]},"1522":{"position":[[236,6],[723,5]]},"1524":{"position":[[502,6],[1114,5],[1201,5],[1300,5]]},"1526":{"position":[[304,6],[574,5],[671,5]]},"1528":{"position":[[403,6],[982,6]]},"1530":{"position":[[63,5],[127,6],[134,5]]},"1536":{"position":[[580,5]]},"1540":{"position":[[714,5]]},"1542":{"position":[[157,5]]},"1550":{"position":[[1439,6]]},"1552":{"position":[[1421,6]]},"1556":{"position":[[558,7]]},"1580":{"position":[[394,5],[628,5],[816,5],[1014,5]]},"1582":{"position":[[1104,5],[1400,5],[1689,5],[1978,5],[2571,5],[2672,5]]},"1592":{"position":[[367,5],[389,7]]},"1602":{"position":[[297,5],[382,5]]},"1622":{"position":[[277,5],[362,5]]},"1626":{"position":[[123,6],[154,5],[322,5],[359,5],[390,5]]},"1628":{"position":[[362,5]]},"1642":{"position":[[402,5],[527,5]]},"1644":{"position":[[187,5],[548,5]]},"1646":{"position":[[69,9],[173,9]]},"1648":{"position":[[293,5],[468,7],[647,5],[1001,6],[1120,5],[1310,7],[1530,5],[1849,5]]},"1668":{"position":[[78,5],[142,5],[198,5],[233,7],[409,5]]},"1672":{"position":[[24,5],[206,6],[213,5],[340,5],[375,5]]},"1678":{"position":[[466,5],[724,5],[987,5],[1085,5]]},"1681":{"position":[[48,6],[238,5],[254,5],[669,5],[781,5],[1015,5]]},"1683":{"position":[[18,5],[59,6],[110,6],[124,5],[237,5],[300,6],[307,5],[640,5]]},"1685":{"position":[[9,5],[112,5],[166,5],[240,6],[317,5],[409,5],[488,5],[523,7],[640,5],[693,6],[700,5],[911,5],[1111,7],[1241,5]]},"1694":{"position":[[864,6],[894,6]]},"1696":{"position":[[182,5],[303,5]]},"1700":{"position":[[91,5],[167,5],[244,5],[281,5],[361,5]]},"1704":{"position":[[376,5],[476,5],[573,5],[675,5],[785,5]]},"1716":{"position":[[519,5]]},"1719":{"position":[[1000,5],[1121,5],[1454,5],[1552,5],[1705,5],[1795,5],[1885,5]]},"1721":{"position":[[280,5],[408,5],[547,5]]},"1723":{"position":[[910,5],[1085,5],[1196,5],[1315,5],[1547,5],[2031,5],[2227,5],[2601,5]]},"1725":{"position":[[1333,5],[1581,5],[1980,5],[2491,5]]},"1727":{"position":[[273,5],[440,5]]},"1732":{"position":[[106,5],[162,5],[861,5]]},"1734":{"position":[[585,5]]},"1737":{"position":[[910,6],[1156,6],[1201,6],[1237,5],[1422,6],[1457,6]]},"1739":{"position":[[1000,5],[1121,5],[1454,5],[1552,5],[1705,5],[1795,5],[1885,5]]},"1742":{"position":[[463,5],[868,5],[1344,5]]},"1744":{"position":[[220,5],[354,5]]},"1746":{"position":[[160,5]]},"1748":{"position":[[256,5]]},"1750":{"position":[[166,5]]},"1752":{"position":[[175,5]]},"1754":{"position":[[164,5],[205,5],[295,5]]},"1756":{"position":[[160,5]]},"1758":{"position":[[438,5],[659,5]]},"1760":{"position":[[145,5],[712,5],[906,5]]},"1762":{"position":[[399,5]]},"1766":{"position":[[429,5]]},"1768":{"position":[[237,5]]},"1770":{"position":[[346,5],[392,5]]},"1772":{"position":[[234,5],[280,5]]},"1774":{"position":[[162,6],[210,5]]},"1776":{"position":[[208,5]]},"1780":{"position":[[202,5]]},"1784":{"position":[[213,5]]},"1788":{"position":[[169,6],[216,5],[313,5],[414,5]]},"1790":{"position":[[170,5]]},"1792":{"position":[[122,5]]},"1794":{"position":[[207,5]]},"1796":{"position":[[330,5]]},"1798":{"position":[[129,5]]},"1800":{"position":[[181,5],[280,5]]},"1802":{"position":[[299,5],[394,5]]},"1804":{"position":[[178,5]]},"1806":{"position":[[325,5],[415,5]]},"1808":{"position":[[159,5]]},"1810":{"position":[[255,5]]},"1812":{"position":[[225,6],[273,5]]},"1814":{"position":[[110,5],[181,5],[227,5],[273,5],[358,5],[443,5]]},"1816":{"position":[[164,5]]},"1818":{"position":[[369,5],[494,5],[972,5]]},"1820":{"position":[[186,5],[328,6],[418,5],[473,5]]},"1822":{"position":[[288,5],[377,5]]},"1824":{"position":[[326,5]]},"1826":{"position":[[178,5]]},"1828":{"position":[[167,6],[272,5],[478,5],[692,5],[899,5],[1211,5]]},"1830":{"position":[[415,5]]},"1832":{"position":[[548,5]]},"1834":{"position":[[612,5]]},"1836":{"position":[[602,5]]},"1838":{"position":[[288,5],[501,5]]},"1840":{"position":[[117,6],[197,5]]},"1842":{"position":[[255,5],[307,5],[385,5],[508,5]]},"1844":{"position":[[397,5],[443,5],[576,5],[844,5]]},"1846":{"position":[[295,5],[341,5],[421,5],[551,5]]},"1848":{"position":[[280,5]]},"1850":{"position":[[137,5]]},"1852":{"position":[[298,5],[523,5]]},"1854":{"position":[[141,5]]},"1856":{"position":[[343,5],[392,5],[471,5]]},"1858":{"position":[[155,5],[462,5]]},"1860":{"position":[[123,5],[170,5]]},"1862":{"position":[[179,5],[250,5]]},"1866":{"position":[[71,5],[117,5],[390,5],[452,5],[498,5]]},"1868":{"position":[[261,5],[316,5],[629,5]]},"1870":{"position":[[201,5],[256,5]]},"1872":{"position":[[159,5]]},"1874":{"position":[[1283,5],[1415,5]]},"1876":{"position":[[162,5]]},"1880":{"position":[[160,5],[243,5],[356,5]]},"1882":{"position":[[336,5]]},"1884":{"position":[[201,5]]},"1886":{"position":[[232,5]]},"1888":{"position":[[282,5]]},"1890":{"position":[[86,6],[133,5]]},"1892":{"position":[[111,6],[158,5]]},"1894":{"position":[[88,6],[135,5]]},"1896":{"position":[[288,5]]},"1898":{"position":[[185,5],[336,5]]},"1910":{"position":[[32,8],[811,5],[888,5]]}}}],["errorhandl",{"_index":381,"t":{"803":{"position":[[218,12],[261,12]]},"837":{"position":[[215,12],[258,12]]},"1329":{"position":[[3338,12],[3351,12],[3364,12]]},"1400":{"position":[[160,13]]},"1528":{"position":[[296,12],[459,12]]},"1530":{"position":[[90,13]]},"1588":{"position":[[126,13]]},"1644":{"position":[[233,13],[594,13]]},"1672":{"position":[[169,13]]},"1685":{"position":[[654,13]]}}}],["errorrespons",{"_index":3945,"t":{"1737":{"position":[[757,13],[887,16],[917,16],[1046,13]]}}}],["errors.as(err",{"_index":3699,"t":{"1683":{"position":[[466,14]]},"1685":{"position":[[859,14]]}}}],["errors.new(\"abc",{"_index":4503,"t":{"1910":{"position":[[826,17]]}}}],["errors.new(\"foo",{"_index":3530,"t":{"1648":{"position":[[1028,15]]}}}],["errorstatuscodehandl",{"_index":188,"t":{"759":{"position":[[294,22]]}}}],["errpaymentrequir",{"_index":2345,"t":{"1324":{"position":[[4207,18]]}}}],["errpreconditionfail",{"_index":2365,"t":{"1324":{"position":[[4862,21]]}}}],["errpreconditionrequir",{"_index":2391,"t":{"1324":{"position":[[5823,23]]}}}],["errproxyauthrequir",{"_index":2355,"t":{"1324":{"position":[[4539,20]]}}}],["errrequestedrangenotsatisfi",{"_index":2373,"t":{"1324":{"position":[[5183,31]]}}}],["errrequestentitytoolarg",{"_index":2367,"t":{"1324":{"position":[[4938,24]]}}}],["errrequestheaderfieldstoolarg",{"_index":2395,"t":{"1324":{"position":[[5969,30]]}}}],["errrequesttimeout",{"_index":2357,"t":{"1324":{"position":[[4613,17]]}}}],["errrequesturitoolong",{"_index":2369,"t":{"1324":{"position":[[5023,20]]}}}],["errserviceunavail",{"_index":2405,"t":{"1324":{"position":[[6363,21]]}}}],["errteapot",{"_index":2377,"t":{"1324":{"position":[[5356,9]]}}}],["errtooearli",{"_index":2387,"t":{"1324":{"position":[[5693,11]]}}}],["errtoomanyrequest",{"_index":2393,"t":{"1324":{"position":[[5901,18]]}}}],["errunauthor",{"_index":2343,"t":{"1324":{"position":[[4143,15]]}}}],["errunavailableforlegalreason",{"_index":2397,"t":{"1324":{"position":[[6061,29]]}}}],["errunprocessableent",{"_index":2381,"t":{"1324":{"position":[[5488,22]]}}}],["errunsupportedmediatyp",{"_index":2371,"t":{"1324":{"position":[[5100,23]]}}}],["errupgraderequir",{"_index":2389,"t":{"1324":{"position":[[5750,18]]}}}],["errvariantalsonegoti",{"_index":2411,"t":{"1324":{"position":[[6599,24]]}}}],["escap",{"_index":3809,"t":{"1723":{"position":[[1473,7],[1783,7]]},"1868":{"position":[[503,6]]}}}],["especi",{"_index":858,"t":{"946":{"position":[[480,10]]}}}],["essenti",{"_index":1654,"t":{"1202":{"position":[[18,11]]},"1681":{"position":[[5,9]]}}}],["establish",{"_index":907,"t":{"960":{"position":[[117,9]]},"1864":{"position":[[57,12]]}}}],["etag",{"_index":2449,"t":{"1324":{"position":[[7638,6]]},"1329":{"position":[[1818,4],[1846,4],[1897,5],[1962,5]]},"1442":{"position":[[0,4]]},"1446":{"position":[[300,5],[528,5]]},"1448":{"position":[[249,5],[427,4],[573,5],[644,5]]}}}],["etc",{"_index":1081,"t":{"1122":{"position":[[201,5]]},"1204":{"position":[[181,6],[480,4]]},"1213":{"position":[[1335,3]]},"1552":{"position":[[875,3]]},"1719":{"position":[[1335,3]]},"1739":{"position":[[1335,3]]}}}],["etcd",{"_index":713,"t":{"864":{"position":[[51,4]]},"908":{"position":[[29,4]]},"950":{"position":[[2,4],[28,4]]},"956":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":901,"t":{"958":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":902,"t":{"958":{"position":[[216,16]]}}}],["ethernet",{"_index":3570,"t":{"1651":{"position":[[573,8]]},"1653":{"position":[[317,8]]}}}],["evalu",{"_index":1396,"t":{"1170":{"position":[[582,8]]},"1172":{"position":[[1615,9]]}}}],["event",{"_index":228,"t":{"771":{"position":[[421,5]]},"773":{"position":[[1159,5]]},"775":{"position":[[332,5]]},"1324":{"position":[[10496,5]]},"1716":{"position":[[77,5]]}}}],["exactli",{"_index":1995,"t":{"1284":{"position":[[274,7]]},"1725":{"position":[[714,8]]}}}],["exampl",{"_index":470,"t":{"809":{"position":[[206,8]]},"827":{"position":[[41,7]]},"829":{"position":[[267,8],[554,8]]},"843":{"position":[[11,8]]},"868":{"position":[[24,8]]},"882":{"position":[[24,8]]},"896":{"position":[[24,8]]},"910":{"position":[[24,8]]},"924":{"position":[[24,8]]},"938":{"position":[[24,8]]},"946":{"position":[[1407,7],[2103,7]]},"952":{"position":[[24,8]]},"966":{"position":[[24,8]]},"980":{"position":[[24,8]]},"994":{"position":[[24,8]]},"1008":{"position":[[24,8]]},"1022":{"position":[[24,8]]},"1036":{"position":[[24,8]]},"1050":{"position":[[24,8]]},"1064":{"position":[[24,8]]},"1072":{"position":[[555,8]]},"1078":{"position":[[24,8]]},"1092":{"position":[[24,8]]},"1106":{"position":[[24,8]]},"1122":{"position":[[218,7],[523,8],[1650,7]]},"1124":{"position":[[22,9]]},"1132":{"position":[[493,8]]},"1136":{"position":[[494,8]]},"1140":{"position":[[579,8]]},"1148":{"position":[[542,8]]},"1152":{"position":[[552,8]]},"1158":{"position":[[319,8]]},"1166":{"position":[[195,7]]},"1168":{"position":[[950,7]]},"1170":{"position":[[1935,8]]},"1172":{"position":[[746,7]]},"1176":{"position":[[123,8],[1043,8],[1851,7],[2397,7]]},"1178":{"position":[[1198,7],[3512,7]]},"1182":{"position":[[545,8]]},"1190":{"position":[[538,8]]},"1194":{"position":[[560,8]]},"1196":{"position":[[33,8]]},"1200":{"position":[[489,8],[744,7]]},"1211":{"position":[[471,8],[825,8],[2600,7]]},"1213":{"position":[[929,8],[1397,8]]},"1215":{"position":[[112,8]]},"1217":{"position":[[135,8]]},"1219":{"position":[[125,8]]},"1221":{"position":[[165,8]]},"1223":{"position":[[98,8]]},"1229":{"position":[[91,8]]},"1231":{"position":[[105,8]]},"1233":{"position":[[90,8]]},"1235":{"position":[[190,8]]},"1241":{"position":[[104,8]]},"1243":{"position":[[198,8]]},"1245":{"position":[[77,8]]},"1247":{"position":[[246,8]]},"1249":{"position":[[294,8]]},"1251":{"position":[[190,8]]},"1253":{"position":[[338,8]]},"1264":{"position":[[248,7]]},"1266":{"position":[[316,7]]},"1268":{"position":[[102,7]]},"1270":{"position":[[157,7]]},"1272":{"position":[[360,7]]},"1274":{"position":[[148,7]]},"1276":{"position":[[169,7]]},"1278":{"position":[[124,7]]},"1280":{"position":[[164,7]]},"1282":{"position":[[203,7]]},"1284":{"position":[[616,7]]},"1286":{"position":[[135,7]]},"1288":{"position":[[132,7]]},"1290":{"position":[[318,7]]},"1292":{"position":[[389,7],[715,7],[1052,7],[1678,7]]},"1294":{"position":[[146,7]]},"1296":{"position":[[103,7]]},"1298":{"position":[[195,7]]},"1300":{"position":[[153,7]]},"1302":{"position":[[90,7]]},"1304":{"position":[[122,7]]},"1306":{"position":[[114,7]]},"1308":{"position":[[116,7]]},"1310":{"position":[[85,7]]},"1312":{"position":[[242,7]]},"1314":{"position":[[192,7]]},"1316":{"position":[[133,7]]},"1318":{"position":[[121,7]]},"1320":{"position":[[196,7]]},"1322":{"position":[[188,7]]},"1327":{"position":[[147,7]]},"1329":{"position":[[68,7],[5541,8]]},"1331":{"position":[[128,7]]},"1333":{"position":[[96,7]]},"1386":{"position":[[507,7],[556,8]]},"1392":{"position":[[836,8]]},"1428":{"position":[[181,8]]},"1468":{"position":[[463,7]]},"1504":{"position":[[95,7]]},"1522":{"position":[[1144,8],[1273,7]]},"1532":{"position":[[393,8]]},"1538":{"position":[[101,7]]},"1540":{"position":[[1419,7]]},"1572":{"position":[[334,8]]},"1574":{"position":[[320,8]]},"1584":{"position":[[923,8]]},"1604":{"position":[[310,8]]},"1624":{"position":[[209,8]]},"1636":{"position":[[202,9]]},"1642":{"position":[[660,7]]},"1666":{"position":[[353,8]]},"1668":{"position":[[374,7]]},"1670":{"position":[[455,8],[988,7],[1087,7]]},"1672":{"position":[[130,7]]},"1678":{"position":[[25,9],[40,7]]},"1681":{"position":[[198,7],[464,7],[975,7]]},"1683":{"position":[[218,7]]},"1685":{"position":[[459,7],[531,7]]},"1688":{"position":[[376,7]]},"1704":{"position":[[243,7]]},"1716":{"position":[[280,7]]},"1719":{"position":[[929,8],[1397,8]]},"1721":{"position":[[144,8]]},"1723":{"position":[[794,7]]},"1725":{"position":[[340,7],[348,7],[1223,8],[2381,7]]},"1727":{"position":[[213,7]]},"1734":{"position":[[143,7]]},"1737":{"position":[[148,12],[295,7]]},"1739":{"position":[[929,8],[1397,8]]},"1742":{"position":[[341,7],[769,7]]},"1744":{"position":[[133,7]]},"1746":{"position":[[115,7]]},"1748":{"position":[[216,7]]},"1750":{"position":[[126,7]]},"1752":{"position":[[93,7]]},"1754":{"position":[[170,7]]},"1756":{"position":[[68,7]]},"1758":{"position":[[130,8],[444,7]]},"1760":{"position":[[105,7],[669,7]]},"1762":{"position":[[322,7]]},"1766":{"position":[[389,7]]},"1768":{"position":[[197,7]]},"1770":{"position":[[352,7]]},"1772":{"position":[[240,7]]},"1774":{"position":[[169,7]]},"1776":{"position":[[167,7]]},"1780":{"position":[[162,7]]},"1784":{"position":[[173,7]]},"1788":{"position":[[72,8],[176,7]]},"1790":{"position":[[98,7]]},"1792":{"position":[[82,7]]},"1794":{"position":[[121,7]]},"1796":{"position":[[248,7]]},"1798":{"position":[[89,7]]},"1800":{"position":[[187,7]]},"1802":{"position":[[305,7]]},"1804":{"position":[[138,7]]},"1806":{"position":[[290,7]]},"1808":{"position":[[118,7]]},"1810":{"position":[[214,7]]},"1812":{"position":[[232,7]]},"1814":{"position":[[233,7]]},"1816":{"position":[[79,7]]},"1818":{"position":[[282,7],[664,7],[921,7]]},"1820":{"position":[[335,7]]},"1822":{"position":[[115,8],[294,7]]},"1824":{"position":[[239,7]]},"1826":{"position":[[112,7]]},"1828":{"position":[[174,7],[368,7],[552,7],[783,7],[1001,7]]},"1830":{"position":[[326,7]]},"1832":{"position":[[450,7]]},"1834":{"position":[[518,7]]},"1836":{"position":[[508,7]]},"1838":{"position":[[115,8],[294,7]]},"1840":{"position":[[124,7]]},"1842":{"position":[[261,7],[467,8]]},"1844":{"position":[[403,7]]},"1846":{"position":[[301,7]]},"1850":{"position":[[97,7]]},"1852":{"position":[[118,8],[304,7]]},"1854":{"position":[[101,7]]},"1856":{"position":[[349,7]]},"1858":{"position":[[73,7],[392,7]]},"1860":{"position":[[129,7]]},"1862":{"position":[[185,7]]},"1864":{"position":[[108,7]]},"1866":{"position":[[77,7],[458,7]]},"1868":{"position":[[267,7],[570,7]]},"1870":{"position":[[207,7]]},"1872":{"position":[[119,7]]},"1874":{"position":[[356,7],[1030,7]]},"1876":{"position":[[122,7]]},"1880":{"position":[[115,7]]},"1882":{"position":[[260,7]]},"1884":{"position":[[161,7]]},"1886":{"position":[[192,7]]},"1888":{"position":[[242,7]]},"1890":{"position":[[93,7]]},"1892":{"position":[[118,7]]},"1894":{"position":[[95,7]]},"1896":{"position":[[212,7]]},"1898":{"position":[[191,7]]},"1908":{"position":[[16,7]]}}}],["example.authz",{"_index":564,"t":{"827":{"position":[[387,13]]}}}],["example.html",{"_index":3259,"t":{"1552":{"position":[[721,12]]}}}],["example/loc",{"_index":116,"t":{"749":{"position":[[169,20]]},"751":{"position":[[247,21]]}}}],["exce",{"_index":2603,"t":{"1329":{"position":[[425,7]]}}}],["excecut",{"_index":3044,"t":{"1478":{"position":[[54,12]]}}}],["exceed",{"_index":1817,"t":{"1225":{"position":[[408,9]]}}}],["excel",{"_index":1689,"t":{"1208":{"position":[[82,9]]}}}],["except",{"_index":504,"t":{"813":{"position":[[55,9]]},"1424":{"position":[[284,6]]},"1426":{"position":[[39,7]]},"1428":{"position":[[140,6],[279,7]]},"1802":{"position":[[76,6]]}}}],["exclud",{"_index":1150,"t":{"1128":{"position":[[159,8]]},"1329":{"position":[[1100,8],[1212,8]]},"1428":{"position":[[310,7]]},"1462":{"position":[[227,7]]},"1640":{"position":[[32,7]]},"1760":{"position":[[499,9]]}}}],["exclude_dir",{"_index":3648,"t":{"1670":{"position":[[662,11]]}}}],["exclude_regex",{"_index":3651,"t":{"1670":{"position":[[748,13]]}}}],["excludevar",{"_index":2971,"t":{"1434":{"position":[[484,12]]},"1438":{"position":[[167,11],[238,11]]}}}],["exclus",{"_index":3025,"t":{"1462":{"position":[[345,11]]}}}],["execut",{"_index":380,"t":{"803":{"position":[[186,8],[302,8]]},"837":{"position":[[178,8],[299,8]]},"1072":{"position":[[920,7]]},"1160":{"position":[[31,9]]},"1162":{"position":[[569,8]]},"1164":{"position":[[0,7],[84,7],[127,8],[307,9],[396,7],[467,8]]},"1176":{"position":[[1584,8],[1770,8],[2360,8]]},"1178":{"position":[[1447,9],[2969,8]]},"1204":{"position":[[244,8],[591,8]]},"1329":{"position":[[3380,8]]},"1406":{"position":[[996,9]]},"1528":{"position":[[212,8],[337,8]]},"1644":{"position":[[452,10],[640,11],[663,10]]},"1648":{"position":[[458,9],[1300,9]]},"1651":{"position":[[81,9]]},"1698":{"position":[[28,7]]},"1702":{"position":[[21,7]]},"1704":{"position":[[20,7]]},"1706":{"position":[[21,7]]},"1708":{"position":[[25,7]]},"1710":{"position":[[22,7]]},"1712":{"position":[[20,7]]},"1714":{"position":[[24,7]]},"1716":{"position":[[21,7]]},"1725":{"position":[[18,7]]},"1727":{"position":[[154,8]]},"1732":{"position":[[229,8]]},"1814":{"position":[[24,8]]},"1856":{"position":[[11,9],[80,9],[247,8]]},"1858":{"position":[[376,8]]}}}],["execute(w",{"_index":1557,"t":{"1178":{"position":[[4691,13]]}}}],["exercis",{"_index":3573,"t":{"1653":{"position":[[25,8]]}}}],["exist",{"_index":187,"t":{"759":{"position":[[267,8]]},"862":{"position":[[371,5]]},"876":{"position":[[491,8],[508,8]]},"890":{"position":[[315,8],[332,8]]},"904":{"position":[[118,8],[135,8]]},"918":{"position":[[485,8],[502,8]]},"946":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"974":{"position":[[166,8],[183,8]]},"1002":{"position":[[626,8],[643,8]]},"1016":{"position":[[720,8],[737,8]]},"1030":{"position":[[735,8],[752,8]]},"1040":{"position":[[224,8]]},"1058":{"position":[[875,8],[892,8]]},"1072":{"position":[[1199,8],[1216,8]]},"1100":{"position":[[265,8],[282,8]]},"1114":{"position":[[179,8],[196,8]]},"1150":{"position":[[327,6]]},"1170":{"position":[[156,5],[384,6]]},"1211":{"position":[[687,5]]},"1644":{"position":[[6,5]]},"1681":{"position":[[302,7]]},"1768":{"position":[[115,6]]},"1776":{"position":[[305,5]]},"1818":{"position":[[137,6],[201,6]]},"1820":{"position":[[269,6]]},"1830":{"position":[[184,6]]},"1832":{"position":[[185,6]]},"1834":{"position":[[185,6],[431,6]]},"1836":{"position":[[185,6],[431,6]]},"1846":{"position":[[82,7]]}}}],["exit",{"_index":589,"t":{"829":{"position":[[407,6]]}}}],["exp",{"_index":437,"t":{"805":{"position":[[732,6]]},"809":{"position":[[1262,6]]},"862":{"position":[[599,3]]},"870":{"position":[[131,3]]},"884":{"position":[[131,3]]},"898":{"position":[[131,3]]},"912":{"position":[[131,3]]},"926":{"position":[[131,3]]},"940":{"position":[[128,3]]},"954":{"position":[[132,3]]},"968":{"position":[[131,3]]},"982":{"position":[[131,3]]},"996":{"position":[[131,3]]},"1010":{"position":[[131,3]]},"1024":{"position":[[131,3]]},"1038":{"position":[[131,3]]},"1052":{"position":[[131,3]]},"1066":{"position":[[131,3]]},"1080":{"position":[[131,3]]},"1094":{"position":[[131,3]]},"1108":{"position":[[131,3]]}}}],["expand",{"_index":1327,"t":{"1166":{"position":[[738,8]]},"1723":{"position":[[2861,7]]}}}],["expect",{"_index":583,"t":{"829":{"position":[[162,6]]},"1324":{"position":[[8104,8],[9982,7]]},"1356":{"position":[[679,8]]},"1568":{"position":[[96,8]]}}}],["expir",{"_index":382,"t":{"803":{"position":[[348,7]]},"837":{"position":[[345,7]]},"862":{"position":[[474,10],[503,11]]},"876":{"position":[[596,7]]},"904":{"position":[[218,7]]},"988":{"position":[[45,7]]},"1016":{"position":[[820,7]]},"1030":{"position":[[835,7]]},"1058":{"position":[[975,7]]},"1114":{"position":[[279,7]]},"1211":{"position":[[1977,10]]},"1225":{"position":[[309,8]]},"1324":{"position":[[7318,9]]},"1364":{"position":[[430,11],[510,6]]},"1366":{"position":[[198,10],[296,10],[842,10],[876,10],[1363,10]]},"1368":{"position":[[39,11]]},"1392":{"position":[[596,8]]},"1396":{"position":[[433,11]]},"1398":{"position":[[1222,10],[1274,10],[1324,6],[1370,10]]},"1400":{"position":[[107,11]]},"1528":{"position":[[447,7]]},"1530":{"position":[[315,7]]},"1536":{"position":[[440,11]]},"1538":{"position":[[180,11],[461,11]]},"1540":{"position":[[495,10],[599,10]]},"1542":{"position":[[36,11]]},"1628":{"position":[[693,10]]},"1630":{"position":[[136,10],[1029,10]]},"1632":{"position":[[28,11]]},"1760":{"position":[[0,6],[195,6],[252,6],[509,7],[781,8],[984,8]]},"1766":{"position":[[217,7]]}}}],["expirationgener",{"_index":2797,"t":{"1364":{"position":[[565,20]]},"1366":{"position":[[917,19]]},"1368":{"position":[[192,20]]}}}],["expiri",{"_index":4057,"t":{"1760":{"position":[[960,6]]}}}],["explain",{"_index":3657,"t":{"1672":{"position":[[325,10]]}}}],["explan",{"_index":3627,"t":{"1668":{"position":[[127,11]]}}}],["explicitli",{"_index":2851,"t":{"1386":{"position":[[820,10]]},"1388":{"position":[[438,10]]},"1396":{"position":[[592,10]]},"1398":{"position":[[487,10]]}}}],["explor",{"_index":1342,"t":{"1166":{"position":[[1217,9],[1282,8]]}}}],["export",{"_index":2978,"t":{"1438":{"position":[[128,6],[231,6]]},"1910":{"position":[[1082,9]]}}}],["exportvar",{"_index":2967,"t":{"1434":{"position":[[402,11]]},"1438":{"position":[[69,10],[135,10]]}}}],["expos",{"_index":2477,"t":{"1324":{"position":[[8496,6]]},"1388":{"position":[[1178,7]]},"1430":{"position":[[48,6]]},"1452":{"position":[[68,7]]},"1456":{"position":[[501,7]]},"1564":{"position":[[247,6]]},"1616":{"position":[[57,6]]}}}],["exposehead",{"_index":2860,"t":{"1388":{"position":[[1425,13],[1540,13]]},"1390":{"position":[[279,14]]}}}],["express",{"_index":1465,"t":{"1174":{"position":[[656,11]]},"1196":{"position":[[112,7]]},"1208":{"position":[[115,7]]},"1558":{"position":[[70,7]]},"1653":{"position":[[452,7]]},"1655":{"position":[[78,7]]},"1657":{"position":[[78,7]]},"1659":{"position":[[78,7]]},"1661":{"position":[[80,7]]},"1685":{"position":[[1197,7]]},"1723":{"position":[[3342,7],[3412,12],[3505,8],[3531,7]]},"1725":{"position":[[1211,11]]}}}],["expressj",{"_index":3720,"t":{"1692":{"position":[[71,10],[341,10]]},"1721":{"position":[[604,9]]}}}],["expvar",{"_index":2998,"t":{"1452":{"position":[[0,6]]},"1456":{"position":[[395,6],[546,6]]}}}],["expvar.newint(\"count",{"_index":3004,"t":{"1456":{"position":[[256,22]]}}}],["expvarhandlercal",{"_index":3014,"t":{"1456":{"position":[[626,21]]}}}],["expvarmw",{"_index":3002,"t":{"1456":{"position":[[109,8]]}}}],["expvarregexperror",{"_index":3016,"t":{"1456":{"position":[[652,21]]}}}],["ext",{"_index":1085,"t":{"1122":{"position":[[416,3]]}}}],["extauthz",{"_index":3158,"t":{"1522":{"position":[[1237,8]]}}}],["extend",{"_index":397,"t":{"803":{"position":[[683,10]]},"1128":{"position":[[8,9],[177,8]]},"1142":{"position":[[90,6]]},"1354":{"position":[[379,6]]},"1364":{"position":[[290,6]]},"1374":{"position":[[296,6]]},"1386":{"position":[[288,6]]},"1396":{"position":[[288,6]]},"1410":{"position":[[298,6]]},"1434":{"position":[[311,6]]},"1446":{"position":[[427,6]]},"1466":{"position":[[294,6]]},"1476":{"position":[[347,6]]},"1536":{"position":[[294,6]]},"1550":{"position":[[473,6]]},"1562":{"position":[[342,6]]},"1572":{"position":[[290,6]]},"1582":{"position":[[2364,6]]},"1612":{"position":[[298,6]]}}}],["extens",{"_index":1083,"t":{"1122":{"position":[[382,9]]},"1162":{"position":[[43,9],[172,9],[349,9]]},"1324":{"position":[[10790,11]]},"1742":{"position":[[25,10]]},"1868":{"position":[[112,10]]},"1884":{"position":[[85,10]]}}}],["extern",{"_index":516,"t":{"815":{"position":[[251,8]]},"1862":{"position":[[48,8]]}}}],["extract",{"_index":614,"t":{"837":{"position":[[1164,7]]},"1398":{"position":[[296,8]]},"1528":{"position":[[568,7]]},"1630":{"position":[[347,7]]},"1906":{"position":[[635,10]]}}}],["extractor",{"_index":2886,"t":{"1396":{"position":[[486,10],[579,9]]},"1398":{"position":[[281,9],[474,9],[1776,9],[1855,9],[1924,9],[1954,9]]},"1400":{"position":[[195,10]]}}}],["extraparam",{"_index":3247,"t":{"1550":{"position":[[1414,10]]},"1552":{"position":[[1396,10]]}}}],["eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9.eyjlehaioje0nje5ntcxmzz9.rb3arc4",{"_index":459,"t":{"807":{"position":[[136,70],[382,69]]}}}],["f",{"_index":3047,"t":{"1478":{"position":[[278,1]]},"1758":{"position":[[1214,1],[1227,1]]},"1874":{"position":[[1528,1],[1543,1],[1556,1]]}}}],["f2",{"_index":2040,"t":{"1292":{"position":[[1126,6]]}}}],["factor",{"_index":3985,"t":{"1742":{"position":[[1091,6]]}}}],["fail",{"_index":906,"t":{"960":{"position":[[106,7]]},"1142":{"position":[[111,5]]},"1685":{"position":[[1026,5]]},"1737":{"position":[[524,4]]}}}],["failedfield",{"_index":3946,"t":{"1737":{"position":[[780,11]]}}}],["failedfield\":\"user.email\",\"tag\":\"required\",\"value\":\"\"},{\"failedfield\":\"user.job.salary\",\"tag\":\"required\",\"value\":\"\"},{\"failedfield\":\"user.job.type\",\"tag\":\"required\",\"valu",{"_index":3967,"t":{"1737":{"position":[[1796,181]]}}}],["failov",{"_index":978,"t":{"1070":{"position":[[419,8]]}}}],["failovercli",{"_index":1002,"t":{"1072":{"position":[[723,14]]}}}],["failur",{"_index":776,"t":{"890":{"position":[[604,8]]},"946":{"position":[[953,8]]},"1100":{"position":[[556,8]]}}}],["fallback",{"_index":385,"t":{"803":{"position":[[422,8]]},"1846":{"position":[[45,8]]}}}],["fals",{"_index":183,"t":{"759":{"position":[[175,5]]},"771":{"position":[[156,5],[370,6],[377,5]]},"823":{"position":[[190,5]]},"827":{"position":[[418,5]]},"874":{"position":[[347,6]]},"876":{"position":[[555,5]]},"878":{"position":[[151,6]]},"890":{"position":[[376,5]]},"892":{"position":[[96,6]]},"902":{"position":[[281,6]]},"904":{"position":[[177,5],[620,5]]},"906":{"position":[[63,6],[196,6]]},"916":{"position":[[298,6]]},"918":{"position":[[445,5],[545,5]]},"920":{"position":[[151,6],[165,6]]},"946":{"position":[[1108,5],[2786,6]]},"948":{"position":[[103,6]]},"974":{"position":[[225,5]]},"1000":{"position":[[337,6],[549,6]]},"1002":{"position":[[685,5]]},"1004":{"position":[[134,6]]},"1014":{"position":[[323,6],[548,6]]},"1016":{"position":[[779,5]]},"1018":{"position":[[128,6]]},"1028":{"position":[[323,6],[516,6],[730,6]]},"1030":{"position":[[794,5]]},"1032":{"position":[[128,6]]},"1056":{"position":[[300,6]]},"1058":{"position":[[934,5]]},"1060":{"position":[[187,6]]},"1070":{"position":[[335,6],[1003,6],[1160,6]]},"1072":{"position":[[1263,5]]},"1074":{"position":[[116,6]]},"1098":{"position":[[308,6]]},"1100":{"position":[[325,5]]},"1102":{"position":[[284,6]]},"1112":{"position":[[310,6]]},"1114":{"position":[[238,5]]},"1116":{"position":[[88,6]]},"1122":{"position":[[738,5],[854,5]]},"1170":{"position":[[209,6]]},"1172":{"position":[[1398,5]]},"1178":{"position":[[329,5],[1430,5],[2700,5],[3779,5],[3989,5],[4682,5]]},"1211":{"position":[[1471,5],[1586,5],[1703,6],[1811,6]]},"1329":{"position":[[640,5],[1128,5],[1240,5],[1349,5],[1499,5],[1721,5],[1812,5],[1998,5],[2434,5],[2550,5],[3332,5],[3770,5],[4109,5],[4676,5],[5091,5],[6071,5],[6214,5],[6609,5]]},"1348":{"position":[[346,6]]},"1354":{"position":[[695,5]]},"1356":{"position":[[706,5]]},"1366":{"position":[[592,5],[1206,5]]},"1368":{"position":[[106,6],[240,6]]},"1388":{"position":[[1393,6]]},"1390":{"position":[[272,6]]},"1398":{"position":[[912,6],[1006,6]]},"1450":{"position":[[45,6]]},"1490":{"position":[[606,5]]},"1492":{"position":[[74,6]]},"1500":{"position":[[571,6],[734,6],[809,6]]},"1522":{"position":[[425,6]]},"1524":{"position":[[691,6],[906,5]]},"1526":{"position":[[493,6]]},"1540":{"position":[[892,5],[1007,5]]},"1542":{"position":[[237,6],[268,6]]},"1552":{"position":[[1230,5]]},"1564":{"position":[[304,5]]},"1566":{"position":[[170,6]]},"1594":{"position":[[269,5]]},"1596":{"position":[[57,6]]},"1630":{"position":[[744,6],[838,6],[1082,6]]},"1737":{"position":[[533,7]]},"1796":{"position":[[191,6],[397,5]]},"1798":{"position":[[196,5]]},"1828":{"position":[[336,7]]},"1832":{"position":[[253,5],[370,6],[585,5],[626,5],[655,5],[716,5]]},"1868":{"position":[[428,7]]}}}],["far",{"_index":2991,"t":{"1448":{"position":[[288,3]]}}}],["fast",{"_index":780,"t":{"894":{"position":[[2,4]]},"908":{"position":[[165,5]]},"1034":{"position":[[2,4]]},"1196":{"position":[[232,4]]},"1616":{"position":[[26,4]]}}}],["faster",{"_index":3637,"t":{"1670":{"position":[[135,6]]},"1866":{"position":[[322,6]]}}}],["fastest",{"_index":1610,"t":{"1196":{"position":[[173,7]]}}}],["fasthttp",{"_index":635,"t":{"853":{"position":[[9,8]]},"1196":{"position":[[159,9]]},"1223":{"position":[[30,8]]},"1322":{"position":[[117,8]]},"1329":{"position":[[3259,8]]},"1764":{"position":[[248,8]]}}}],["fasthttp'",{"_index":1925,"t":{"1260":{"position":[[25,10]]}}}],["fasthttp.client",{"_index":3373,"t":{"1580":{"position":[[222,20],[373,20],[607,20],[795,20],[993,20],[1177,20],[1371,20]]},"1582":{"position":[[954,17]]}}}],["fasthttp.defaultlbclienttimeout",{"_index":3426,"t":{"1586":{"position":[[89,32]]}}}],["fasthttp.lbclient",{"_index":3425,"t":{"1584":{"position":[[1281,18]]}}}],["fasthttp.request",{"_index":4321,"t":{"1850":{"position":[[19,17],[79,17]]}}}],["fasthttp.request.uri().host",{"_index":2654,"t":{"1329":{"position":[[3302,29]]}}}],["fasthttp.requestctx",{"_index":1858,"t":{"1239":{"position":[[68,20]]},"1337":{"position":[[807,21],[848,19]]},"1764":{"position":[[8,20],[206,20]]}}}],["fasthttp.requesthandl",{"_index":1859,"t":{"1239":{"position":[[135,23]]}}}],["fasthttp.respons",{"_index":4330,"t":{"1854":{"position":[[20,18],[82,18]]}}}],["fasthttp.serv",{"_index":1804,"t":{"1223":{"position":[[81,16]]}}}],["fault",{"_index":3104,"t":{"1504":{"position":[[44,5]]}}}],["favicon",{"_index":3019,"t":{"1462":{"position":[[0,7],[42,7],[391,8],[436,7]]},"1468":{"position":[[231,7],[310,7],[445,7]]}}}],["favicon.ico",{"_index":3023,"t":{"1462":{"position":[[163,11],[413,12]]},"1466":{"position":[[373,16],[395,15]]},"1468":{"position":[[351,14]]}}}],["favnum",{"_index":1433,"t":{"1172":{"position":[[531,8],[591,7],[823,7]]}}}],["favourit",{"_index":1442,"t":{"1172":{"position":[[797,9]]}}}],["fd.test",{"_index":1844,"t":{"1231":{"position":[[715,10]]}}}],["featur",{"_index":1273,"t":{"1158":{"position":[[340,8]]},"1178":{"position":[[276,7],[287,8],[461,8],[627,7],[735,7],[1384,7],[1395,8],[1838,8],[2005,7],[2612,7],[2654,7],[2665,8],[2797,7],[3032,8],[3068,8],[3504,7],[4636,7],[4647,8],[5022,8]]},"1324":{"position":[[10016,8]]},"1386":{"position":[[757,7]]},"1388":{"position":[[375,7]]},"1406":{"position":[[84,8]]},"1725":{"position":[[139,7]]}}}],["feder",{"_index":3368,"t":{"1574":{"position":[[329,11]]}}}],["feel",{"_index":3663,"t":{"1676":{"position":[[150,4]]}}}],["feet",{"_index":1630,"t":{"1200":{"position":[[472,5]]}}}],["fenni",{"_index":4001,"t":{"1744":{"position":[[255,9]]},"1818":{"position":[[397,7]]}}}],["fenny/123",{"_index":4003,"t":{"1744":{"position":[[387,13]]},"1818":{"position":[[519,11],[549,11]]}}}],["ferret",{"_index":4428,"t":{"1882":{"position":[[362,11]]}}}],["fetch",{"_index":82,"t":{"737":{"position":[[388,5]]},"739":{"position":[[388,5]]},"741":{"position":[[388,5]]},"1818":{"position":[[609,7]]}}}],["ff1",{"_index":2047,"t":{"1292":{"position":[[1686,3]]}}}],["ff2",{"_index":2050,"t":{"1292":{"position":[[1750,3],[1834,5]]}}}],["ffffffffffffffffffffffffffffffffffffffff",{"_index":198,"t":{"761":{"position":[[240,43]]}}}],["fiber",{"_index":20,"t":{"727":{"position":[[22,6]]},"743":{"position":[[20,6]]},"745":{"position":[[25,5]]},"753":{"position":[[21,6]]},"759":{"position":[[127,5]]},"765":{"position":[[19,6]]},"767":{"position":[[25,5]]},"777":{"position":[[24,6]]},"779":{"position":[[25,5]]},"787":{"position":[[28,6]]},"789":{"position":[[25,5]]},"799":{"position":[[25,5]]},"817":{"position":[[30,6]]},"827":{"position":[[4,5]]},"829":{"position":[[29,5],[217,5],[234,5],[303,5],[316,5],[333,5],[385,5],[441,5],[487,5]]},"833":{"position":[[25,5]]},"841":{"position":[[23,6]]},"847":{"position":[[50,5],[162,5],[221,5]]},"853":{"position":[[32,5]]},"862":{"position":[[95,5]]},"874":{"position":[[302,8]]},"876":{"position":[[367,7]]},"878":{"position":[[106,8]]},"1000":{"position":[[292,8],[504,8]]},"1002":{"position":[[502,7]]},"1004":{"position":[[89,8]]},"1014":{"position":[[283,8]]},"1016":{"position":[[606,7]]},"1018":{"position":[[88,8]]},"1028":{"position":[[283,8]]},"1030":{"position":[[621,7]]},"1032":{"position":[[88,8]]},"1058":{"position":[[674,7]]},"1060":{"position":[[127,8]]},"1114":{"position":[[65,7]]},"1118":{"position":[[82,5]]},"1144":{"position":[[407,8],[449,5],[721,5]]},"1196":{"position":[[82,5],[100,5],[321,5]]},"1200":{"position":[[75,5]]},"1202":{"position":[[55,5]]},"1204":{"position":[[424,5]]},"1208":{"position":[[53,6],[144,6]]},"1215":{"position":[[14,5]]},"1292":{"position":[[493,5]]},"1329":{"position":[[52,5],[195,8],[2603,5],[3443,5]]},"1335":{"position":[[40,5]]},"1337":{"position":[[580,5]]},"1340":{"position":[[141,5]]},"1342":{"position":[[141,5]]},"1350":{"position":[[36,5]]},"1354":{"position":[[50,5],[186,5]]},"1360":{"position":[[21,5],[243,5]]},"1364":{"position":[[50,5],[182,5]]},"1370":{"position":[[27,5]]},"1374":{"position":[[50,5],[185,5]]},"1382":{"position":[[20,5]]},"1386":{"position":[[50,5],[181,5]]},"1392":{"position":[[20,5]]},"1396":{"position":[[50,5],[181,5]]},"1406":{"position":[[30,5]]},"1410":{"position":[[50,5],[186,5]]},"1418":{"position":[[23,5]]},"1422":{"position":[[50,5],[190,5]]},"1430":{"position":[[22,5]]},"1434":{"position":[[50,5],[183,5]]},"1442":{"position":[[20,5]]},"1446":{"position":[[50,5],[181,5]]},"1452":{"position":[[22,5]]},"1456":{"position":[[50,5],[192,5]]},"1462":{"position":[[23,5]]},"1466":{"position":[[50,5],[184,5]]},"1472":{"position":[[26,5]]},"1476":{"position":[[50,5],[187,5]]},"1504":{"position":[[27,5]]},"1508":{"position":[[50,5],[188,5]]},"1522":{"position":[[1225,5]]},"1532":{"position":[[23,5]]},"1536":{"position":[[50,5],[184,5]]},"1546":{"position":[[22,5]]},"1550":{"position":[[50,5],[364,5]]},"1558":{"position":[[23,5]]},"1562":{"position":[[50,5],[184,5]]},"1564":{"position":[[113,6]]},"1568":{"position":[[21,5]]},"1572":{"position":[[50,5],[182,5]]},"1574":{"position":[[341,6]]},"1578":{"position":[[21,5]]},"1582":{"position":[[50,5],[182,5]]},"1588":{"position":[[23,5]]},"1592":{"position":[[50,5],[184,5]]},"1598":{"position":[[27,6]]},"1608":{"position":[[25,5]]},"1612":{"position":[[50,5],[186,5]]},"1624":{"position":[[23,6]]},"1628":{"position":[[50,5],[184,5]]},"1638":{"position":[[20,5]]},"1642":{"position":[[50,5],[181,5]]},"1644":{"position":[[63,6]]},"1648":{"position":[[50,5],[184,5]]},"1651":{"position":[[440,5]]},"1653":{"position":[[378,5]]},"1655":{"position":[[0,5]]},"1657":{"position":[[0,5]]},"1659":{"position":[[0,5]]},"1661":{"position":[[0,5]]},"1666":{"position":[[162,5],[474,5]]},"1670":{"position":[[178,5],[538,6],[790,5],[1030,5],[1056,5],[1135,5]]},"1672":{"position":[[114,5],[364,6]]},"1674":{"position":[[0,5],[169,6]]},"1678":{"position":[[184,5]]},"1681":{"position":[[30,5],[163,5],[263,5],[313,5],[708,7]]},"1683":{"position":[[0,5]]},"1685":{"position":[[69,5],[555,5]]},"1688":{"position":[[6,5]]},"1692":{"position":[[44,5],[311,5]]},"1698":{"position":[[5,5]]},"1700":{"position":[[50,6]]},"1725":{"position":[[302,5],[1800,5]]},"1727":{"position":[[118,5]]},"1732":{"position":[[0,5],[241,5],[698,5]]},"1734":{"position":[[0,5]]},"1737":{"position":[[0,5]]},"1742":{"position":[[1128,5]]},"1792":{"position":[[211,5],[263,6]]},"1844":{"position":[[518,7],[695,8]]},"1866":{"position":[[189,5]]},"1898":{"position":[[435,7],[485,8]]},"1900":{"position":[[26,6]]},"1902":{"position":[[25,5]]}}}],["fiber'",{"_index":1110,"t":{"1122":{"position":[[1327,7]]},"1406":{"position":[[331,7]]},"1681":{"position":[[766,7]]},"1732":{"position":[[316,7]]}}}],["fiber.app",{"_index":2739,"t":{"1337":{"position":[[551,11]]},"1678":{"position":[[190,10]]},"1716":{"position":[[507,11]]}}}],["fiber.badg",{"_index":787,"t":{"902":{"position":[[256,17]]},"904":{"position":[[65,16]]},"906":{"position":[[38,17]]}}}],["fiber.config",{"_index":3034,"t":{"1472":{"position":[[229,13]]}}}],["fiber.ctx",{"_index":81,"t":{"737":{"position":[[364,11],[552,11],[741,11]]},"739":{"position":[[364,11],[518,11]]},"741":{"position":[[364,11],[495,11]]},"749":{"position":[[46,11],[750,11],[833,10]]},"751":{"position":[[399,11],[506,11]]},"759":{"position":[[324,11]]},"761":{"position":[[152,11]]},"763":{"position":[[379,11]]},"773":{"position":[[1342,11],[1536,11],[1594,11]]},"783":{"position":[[564,11]]},"785":{"position":[[261,11]]},"793":{"position":[[751,11]]},"795":{"position":[[302,11]]},"805":{"position":[[461,11],[1081,11],[1155,11]]},"809":{"position":[[991,11],[1647,11],[1721,11]]},"815":{"position":[[924,11]]},"823":{"position":[[541,11]]},"825":{"position":[[30,11]]},"827":{"position":[[748,11],[930,11]]},"853":{"position":[[53,10]]},"857":{"position":[[154,11]]},"859":{"position":[[190,11]]},"1122":{"position":[[1540,11],[1684,11]]},"1132":{"position":[[664,11],[794,11]]},"1136":{"position":[[667,11],[797,11]]},"1140":{"position":[[753,11],[883,11]]},"1142":{"position":[[843,11]]},"1148":{"position":[[713,11],[843,11]]},"1152":{"position":[[724,11],[854,11]]},"1154":{"position":[[325,11]]},"1156":{"position":[[451,11]]},"1182":{"position":[[715,11],[845,11]]},"1186":{"position":[[890,11],[1020,11]]},"1190":{"position":[[708,11],[838,11]]},"1194":{"position":[[732,11],[862,11]]},"1200":{"position":[[26,10],[137,9],[513,11],[792,11],[1149,11]]},"1202":{"position":[[184,11]]},"1204":{"position":[[709,11],[849,11],[1044,11],[1279,11]]},"1213":{"position":[[988,11],[1109,11],[1442,11],[1540,11],[1693,11],[1783,11],[1873,11]]},"1215":{"position":[[253,11]]},"1229":{"position":[[121,11]]},"1231":{"position":[[135,11]]},"1233":{"position":[[120,11]]},"1235":{"position":[[254,11]]},"1253":{"position":[[409,11]]},"1329":{"position":[[4591,9]]},"1331":{"position":[[156,11]]},"1337":{"position":[[642,11],[693,9]]},"1344":{"position":[[374,11]]},"1346":{"position":[[262,11]]},"1348":{"position":[[284,11]]},"1354":{"position":[[725,11]]},"1356":{"position":[[178,11]]},"1364":{"position":[[372,11],[593,11],[783,11],[865,11]]},"1366":{"position":[[178,11],[709,11]]},"1368":{"position":[[134,11]]},"1374":{"position":[[502,11]]},"1376":{"position":[[178,11]]},"1388":{"position":[[178,11]]},"1396":{"position":[[504,11]]},"1398":{"position":[[178,11],[1971,11]]},"1412":{"position":[[178,11],[379,11],[631,11]]},"1414":{"position":[[48,11],[151,11]]},"1422":{"position":[[764,11],[896,11]]},"1424":{"position":[[178,11]]},"1446":{"position":[[361,11],[592,11]]},"1448":{"position":[[178,11]]},"1456":{"position":[[323,11]]},"1458":{"position":[[178,11]]},"1468":{"position":[[178,11]]},"1490":{"position":[[178,11]]},"1498":{"position":[[177,11]]},"1514":{"position":[[241,11]]},"1516":{"position":[[41,11]]},"1522":{"position":[[205,11],[711,11]]},"1524":{"position":[[471,11],[754,11],[1102,11],[1189,11],[1288,11]]},"1526":{"position":[[273,11],[562,11],[659,11]]},"1530":{"position":[[51,11],[111,11]]},"1536":{"position":[[380,11],[491,11],[568,11]]},"1540":{"position":[[178,11],[412,11],[702,11]]},"1542":{"position":[[86,11],[145,11]]},"1550":{"position":[[1383,11],[1643,11]]},"1552":{"position":[[178,11],[371,11],[1365,11]]},"1564":{"position":[[435,11]]},"1574":{"position":[[178,11]]},"1580":{"position":[[340,11],[551,11],[742,11],[937,11]]},"1582":{"position":[[1092,11],[1388,11],[1677,11],[1966,11],[2559,11],[2660,11]]},"1584":{"position":[[178,11]]},"1592":{"position":[[355,11]]},"1594":{"position":[[178,11],[434,11]]},"1602":{"position":[[285,11],[370,11]]},"1614":{"position":[[178,11]]},"1622":{"position":[[265,11],[350,11]]},"1626":{"position":[[100,11]]},"1628":{"position":[[350,11]]},"1640":{"position":[[47,11]]},"1642":{"position":[[306,11],[390,11],[515,11]]},"1648":{"position":[[281,11],[1108,11],[1837,11]]},"1668":{"position":[[397,11]]},"1672":{"position":[[190,11]]},"1678":{"position":[[454,11],[712,11],[975,11],[1073,11]]},"1681":{"position":[[226,11],[657,11],[1003,11]]},"1683":{"position":[[284,11]]},"1685":{"position":[[677,11]]},"1696":{"position":[[170,11],[291,11]]},"1704":{"position":[[364,11],[663,11],[773,11]]},"1719":{"position":[[988,11],[1109,11],[1442,11],[1540,11],[1693,11],[1783,11],[1873,11]]},"1721":{"position":[[268,11],[396,11],[535,11]]},"1723":{"position":[[898,11],[1073,11],[1184,11],[1303,11],[1535,11],[2019,11],[2215,11],[2589,11]]},"1725":{"position":[[1321,11],[1569,11],[1968,11],[2479,11]]},"1727":{"position":[[261,11],[428,11]]},"1732":{"position":[[849,11]]},"1734":{"position":[[573,11]]},"1737":{"position":[[1225,11]]},"1739":{"position":[[988,11],[1109,11],[1442,11],[1540,11],[1693,11],[1783,11],[1873,11]]},"1742":{"position":[[451,11],[856,11],[1332,11]]},"1744":{"position":[[208,11],[342,11]]},"1746":{"position":[[148,11]]},"1748":{"position":[[244,11]]},"1750":{"position":[[154,11]]},"1752":{"position":[[163,11]]},"1754":{"position":[[193,11],[283,11]]},"1756":{"position":[[148,11]]},"1758":{"position":[[647,11]]},"1760":{"position":[[133,11],[700,11],[894,11]]},"1762":{"position":[[387,11]]},"1766":{"position":[[417,11]]},"1768":{"position":[[225,11]]},"1770":{"position":[[380,11]]},"1772":{"position":[[268,11]]},"1774":{"position":[[198,11]]},"1776":{"position":[[196,11]]},"1780":{"position":[[190,11]]},"1784":{"position":[[201,11]]},"1788":{"position":[[204,11],[301,11],[402,11]]},"1790":{"position":[[158,11]]},"1792":{"position":[[110,11]]},"1794":{"position":[[195,11]]},"1796":{"position":[[318,11]]},"1798":{"position":[[117,11]]},"1800":{"position":[[268,11]]},"1802":{"position":[[382,11]]},"1804":{"position":[[166,11]]},"1806":{"position":[[313,11],[403,11]]},"1808":{"position":[[147,11]]},"1810":{"position":[[243,11]]},"1812":{"position":[[261,11]]},"1814":{"position":[[261,11],[346,11],[431,11]]},"1816":{"position":[[152,11]]},"1818":{"position":[[357,11],[482,11],[960,11]]},"1820":{"position":[[406,11]]},"1822":{"position":[[365,11]]},"1824":{"position":[[314,11]]},"1826":{"position":[[166,11]]},"1828":{"position":[[260,11],[466,11],[680,11],[887,11],[1199,11]]},"1830":{"position":[[403,11]]},"1832":{"position":[[536,11]]},"1834":{"position":[[600,11]]},"1836":{"position":[[590,11]]},"1838":{"position":[[489,11]]},"1840":{"position":[[185,11]]},"1842":{"position":[[295,11],[373,11],[496,11]]},"1844":{"position":[[431,11],[564,11],[832,11]]},"1846":{"position":[[329,11],[409,11],[539,11]]},"1850":{"position":[[125,11]]},"1852":{"position":[[511,11]]},"1854":{"position":[[129,11]]},"1856":{"position":[[380,11],[459,11]]},"1858":{"position":[[143,11],[450,11]]},"1860":{"position":[[158,11]]},"1862":{"position":[[238,11]]},"1866":{"position":[[105,11],[486,11]]},"1868":{"position":[[304,11],[617,11]]},"1870":{"position":[[244,11]]},"1872":{"position":[[147,11]]},"1874":{"position":[[1271,11],[1403,11]]},"1876":{"position":[[150,11]]},"1880":{"position":[[148,11],[231,11],[344,11]]},"1882":{"position":[[324,11]]},"1884":{"position":[[189,11]]},"1886":{"position":[[220,11]]},"1888":{"position":[[270,11]]},"1890":{"position":[[121,11]]},"1892":{"position":[[146,11]]},"1894":{"position":[[123,11]]},"1896":{"position":[[276,11]]},"1898":{"position":[[324,11]]},"1910":{"position":[[799,11],[876,11]]}}}],["fiber.db",{"_index":817,"t":{"918":{"position":[[107,10]]},"920":{"position":[[77,11]]}}}],["fiber.errforbidden",{"_index":2873,"t":{"1392":{"position":[[342,18]]}}}],["fiber.error",{"_index":3697,"t":{"1683":{"position":[[141,12],[431,12],[450,12]]},"1685":{"position":[[824,12],[843,12]]}}}],["fiber.errorhandl",{"_index":3179,"t":{"1528":{"position":[[472,18]]}}}],["fiber.errserviceunavail",{"_index":3694,"t":{"1681":{"position":[[1057,27]]}}}],["fiber.errtooearli",{"_index":2930,"t":{"1410":{"position":[[382,18]]},"1412":{"position":[[737,18]]},"1414":{"position":[[218,18]]}}}],["fiber.errupgraderequir",{"_index":645,"t":{"857":{"position":[[359,24]]}}}],["fiber.gz",{"_index":2616,"t":{"1329":{"position":[[925,11]]}}}],["fiber.handl",{"_index":105,"t":{"747":{"position":[[33,13]]},"757":{"position":[[47,13]]},"769":{"position":[[34,13]]},"781":{"position":[[31,13]]},"791":{"position":[[35,13]]},"821":{"position":[[37,13]]},"845":{"position":[[27,13]]},"1329":{"position":[[3420,14]]},"1337":{"position":[[67,13],[97,13],[163,13],[197,13],[278,13],[327,13],[369,14],[397,13],[463,14],[495,13]]},"1340":{"position":[[189,13],[276,13]]},"1342":{"position":[[192,13]]},"1344":{"position":[[131,13],[210,13]]},"1352":{"position":[[24,13]]},"1356":{"position":[[1034,13]]},"1362":{"position":[[27,13]]},"1372":{"position":[[27,13]]},"1384":{"position":[[27,13]]},"1394":{"position":[[27,13]]},"1408":{"position":[[27,13]]},"1420":{"position":[[58,13]]},"1432":{"position":[[27,13]]},"1444":{"position":[[27,13]]},"1454":{"position":[[11,13]]},"1464":{"position":[[27,13]]},"1474":{"position":[[24,13]]},"1496":{"position":[[27,13]]},"1506":{"position":[[27,13]]},"1520":{"position":[[27,13]]},"1528":{"position":[[279,13]]},"1534":{"position":[[27,13]]},"1540":{"position":[[792,13]]},"1548":{"position":[[27,13]]},"1560":{"position":[[11,13]]},"1570":{"position":[[11,13]]},"1580":{"position":[[96,13],[243,13],[1198,13],[1392,13]]},"1584":{"position":[[479,13],[588,13]]},"1590":{"position":[[27,13]]},"1600":{"position":[[27,13]]},"1610":{"position":[[27,13]]},"1620":{"position":[[27,13]]},"1640":{"position":[[17,14],[65,13]]},"1644":{"position":[[82,13],[333,13]]},"1646":{"position":[[17,14],[79,13],[121,14],[183,13]]},"1858":{"position":[[420,13]]},"1904":{"position":[[37,13]]}}}],["fiber.headerauthor",{"_index":3184,"t":{"1530":{"position":[[359,26]]}}}],["fiber.headerxforwardedfor",{"_index":4137,"t":{"1792":{"position":[[329,26]]}}}],["fiber.headerxrequestid",{"_index":3462,"t":{"1616":{"position":[[228,23]]}}}],["fiber.ischild",{"_index":2720,"t":{"1333":{"position":[[194,16]]}}}],["fiber.ismethodsafe(c.method",{"_index":2935,"t":{"1414":{"position":[[177,30]]},"1516":{"position":[[135,30]]}}}],["fiber.map",{"_index":1115,"t":{"1122":{"position":[[1585,10],[1729,10]]},"1132":{"position":[[725,10],[875,10]]},"1136":{"position":[[728,10],[878,10]]},"1140":{"position":[[814,10],[964,10]]},"1142":{"position":[[914,10]]},"1144":{"position":[[396,10]]},"1148":{"position":[[774,10],[924,10]]},"1152":{"position":[[785,10],[935,10]]},"1154":{"position":[[421,10]]},"1156":{"position":[[518,10]]},"1182":{"position":[[776,10],[926,10]]},"1186":{"position":[[951,10],[1101,10]]},"1190":{"position":[[769,10],[919,10]]},"1194":{"position":[[793,10],[943,10]]},"1732":{"position":[[894,10]]},"1734":{"position":[[643,10]]},"1754":{"position":[[331,12]]},"1844":{"position":[[371,10],[499,10],[676,10]]}}}],["fiber.map{\"id",{"_index":4130,"t":{"1788":{"position":[[464,15]]}}}],["fiber.methoddelet",{"_index":2867,"t":{"1390":{"position":[[188,19]]}}}],["fiber.methodget",{"_index":2864,"t":{"1390":{"position":[[118,16]]},"1642":{"position":[[348,15]]}}}],["fiber.methodhead",{"_index":2824,"t":{"1366":{"position":[[1613,17]]},"1368":{"position":[[309,18]]},"1390":{"position":[[153,17]]}}}],["fiber.methodpatch",{"_index":2868,"t":{"1390":{"position":[[208,18]]}}}],["fiber.methodpost",{"_index":2865,"t":{"1390":{"position":[[135,17]]}}}],["fiber.methodput",{"_index":2866,"t":{"1390":{"position":[[171,16]]}}}],["fiber.mimetextplaincharsetutf8",{"_index":3702,"t":{"1683":{"position":[[581,31]]}}}],["fiber.new",{"_index":74,"t":{"737":{"position":[[182,11]]},"739":{"position":[[182,11]]},"741":{"position":[[182,11]]},"751":{"position":[[183,11]]},"761":{"position":[[118,11]]},"763":{"position":[[345,11]]},"773":{"position":[[1215,11]]},"785":{"position":[[137,11]]},"795":{"position":[[141,11]]},"805":{"position":[[154,11]]},"809":{"position":[[433,11]]},"815":{"position":[[824,11]]},"827":{"position":[[355,11]]},"847":{"position":[[184,12]]},"857":{"position":[[120,11]]},"859":{"position":[[133,11]]},"1202":{"position":[[152,11]]},"1206":{"position":[[274,11]]},"1215":{"position":[[142,11],[163,11]]},"1217":{"position":[[165,11],[184,11],[203,11],[224,11]]},"1219":{"position":[[155,11]]},"1221":{"position":[[195,11]]},"1223":{"position":[[128,11]]},"1229":{"position":[[175,11]]},"1231":{"position":[[189,11]]},"1233":{"position":[[174,11]]},"1235":{"position":[[220,11]]},"1327":{"position":[[180,11]]},"1340":{"position":[[158,11]]},"1342":{"position":[[158,11]]},"1346":{"position":[[135,11]]},"1348":{"position":[[135,11]]},"1478":{"position":[[379,11]]},"1480":{"position":[[191,11]]},"1482":{"position":[[194,11]]},"1484":{"position":[[197,11]]},"1486":{"position":[[197,11]]},"1488":{"position":[[338,11]]},"1498":{"position":[[123,11]]},"1522":{"position":[[491,11]]},"1524":{"position":[[951,11]]},"1526":{"position":[[197,11]]},"1602":{"position":[[125,11]]},"1622":{"position":[[124,11]]},"1642":{"position":[[254,11]]},"1648":{"position":[[257,11],[1084,11],[1725,11]]},"1678":{"position":[[284,11],[538,11],[806,11],[1046,11]]},"1681":{"position":[[602,11]]},"1694":{"position":[[88,11],[502,11]]},"1696":{"position":[[140,11]]},"1704":{"position":[[332,11]]},"1729":{"position":[[91,11]]},"1910":{"position":[[728,11]]}}}],["fiber.new(fiber.config",{"_index":1111,"t":{"1122":{"position":[[1355,23]]},"1126":{"position":[[389,23],[740,23],[1099,23],[1467,23]]},"1132":{"position":[[602,23]]},"1136":{"position":[[605,23]]},"1140":{"position":[[691,23]]},"1142":{"position":[[781,23]]},"1148":{"position":[[651,23]]},"1152":{"position":[[662,23]]},"1154":{"position":[[263,23]]},"1182":{"position":[[653,23]]},"1186":{"position":[[828,23]]},"1190":{"position":[[646,23]]},"1194":{"position":[[670,23]]},"1200":{"position":[[1464,23]]},"1329":{"position":[[100,23]]},"1333":{"position":[[149,23]]},"1672":{"position":[[145,23]]},"1685":{"position":[[596,23]]},"1688":{"position":[[489,23]]},"1732":{"position":[[344,23]]},"1734":{"position":[[511,23]]},"1792":{"position":[[292,23]]}}}],["fiber.new(fiber.config{view",{"_index":1216,"t":{"1144":{"position":[[324,29]]},"1156":{"position":[[392,29]]}}}],["fiber.newerror",{"_index":3692,"t":{"1681":{"position":[[834,17]]}}}],["fiber.newerror(782",{"_index":2717,"t":{"1331":{"position":[[183,19]]}}}],["fiber.newerror(fiber.statusserviceunavail",{"_index":3696,"t":{"1681":{"position":[[1112,46]]}}}],["fiber.parserconfig",{"_index":4375,"t":{"1874":{"position":[[177,19]]}}}],["fiber.parsertyp",{"_index":4378,"t":{"1874":{"position":[[232,19],[793,17]]}}}],["fiber.parsertype{customtim",{"_index":4391,"t":{"1874":{"position":[[975,31]]}}}],["fiber.request",{"_index":2104,"t":{"1322":{"position":[[247,15]]}}}],["fiber.rout",{"_index":1795,"t":{"1221":{"position":[[235,13]]},"1704":{"position":[[463,12],[560,12]]}}}],["fiber.setparserdecoder(fiber.parserconfig",{"_index":4390,"t":{"1874":{"position":[[895,42]]}}}],["fiber.sqlite3",{"_index":1047,"t":{"1112":{"position":[[260,18]]},"1116":{"position":[[38,18]]}}}],["fiber.stat",{"_index":1707,"t":{"1211":{"position":[[1124,12],[1173,14],[2653,13]]}}}],["fiber.statusforbidden",{"_index":569,"t":{"827":{"position":[[608,22]]}}}],["fiber.statusfound",{"_index":3451,"t":{"1604":{"position":[[570,19]]},"1606":{"position":[[40,18]]}}}],["fiber.statusinternalservererror",{"_index":3698,"t":{"1683":{"position":[[354,31]]},"1685":{"position":[[747,31]]}}}],["fiber.statusok",{"_index":1915,"t":{"1253":{"position":[[775,14]]},"1550":{"position":[[1707,14]]}}}],["fiber.storag",{"_index":2814,"t":{"1366":{"position":[[1095,13]]},"1398":{"position":[[1495,13]]},"1514":{"position":[[1164,13]]},"1540":{"position":[[1159,13]]},"1630":{"position":[[256,13]]}}}],["fiber_storag",{"_index":743,"t":{"874":{"position":[[323,16]]},"876":{"position":[[437,15]]},"878":{"position":[[127,16]]},"918":{"position":[[182,15]]},"920":{"position":[[97,16]]},"934":{"position":[[138,16]]},"946":{"position":[[354,16]]},"948":{"position":[[35,16]]},"1000":{"position":[[313,16],[525,16]]},"1002":{"position":[[572,15]]},"1004":{"position":[[110,16]]},"1014":{"position":[[299,16]]},"1016":{"position":[[671,15]]},"1018":{"position":[[104,16]]},"1028":{"position":[[299,16]]},"1030":{"position":[[686,15]]},"1032":{"position":[[104,16]]},"1056":{"position":[[276,16]]},"1058":{"position":[[739,15]]},"1060":{"position":[[143,16]]},"1112":{"position":[[286,16]]},"1114":{"position":[[130,15]]},"1116":{"position":[[64,16]]}}}],["fiberapp",{"_index":2737,"t":{"1337":{"position":[[529,8]]}}}],["fiberapp(app",{"_index":2738,"t":{"1337":{"position":[[538,12]]}}}],["fiberhandl",{"_index":2733,"t":{"1337":{"position":[[341,12]]}}}],["fiberhandler(h",{"_index":2734,"t":{"1337":{"position":[[354,14]]}}}],["fiberhandlerfunc",{"_index":2735,"t":{"1337":{"position":[[427,16]]}}}],["fiberhandlerfunc(h",{"_index":2736,"t":{"1337":{"position":[[444,18]]}}}],["fiberi18n",{"_index":6,"t":{"725":{"position":[[7,9]]}}}],["fiberi18n.new(&fiberi18n.config",{"_index":157,"t":{"751":{"position":[[204,32]]}}}],["fiberi18n.new(config",{"_index":103,"t":{"747":{"position":[[0,20]]}}}],["fibernewrelic.config",{"_index":172,"t":{"757":{"position":[[25,21]]},"761":{"position":[[209,21]]},"763":{"position":[[436,21]]}}}],["fibernewrelic.new(config",{"_index":171,"t":{"757":{"position":[[0,24]]}}}],["fibersentri",{"_index":7,"t":{"725":{"position":[[17,11]]},"773":{"position":[[0,11],[593,12]]}}}],["fibersentry.gethubfromcontext",{"_index":245,"t":{"773":{"position":[[232,31]]}}}],["fibersentry.gethubfromcontext(c",{"_index":283,"t":{"773":{"position":[[1372,33],[1624,33]]}}}],["fibersentry.new(config",{"_index":211,"t":{"769":{"position":[[0,22]]}}}],["fiberzap",{"_index":8,"t":{"725":{"position":[[29,8]]}}}],["fiberzap.new(config",{"_index":305,"t":{"781":{"position":[[0,19]]}}}],["fiberzerolog",{"_index":9,"t":{"725":{"position":[[38,12]]}}}],["fiberzerolog.new(config",{"_index":341,"t":{"791":{"position":[[0,23]]}}}],["field",{"_index":311,"t":{"783":{"position":[[183,6],[203,6]]},"793":{"position":[[361,6],[381,6]]},"803":{"position":[[546,5]]},"878":{"position":[[23,6]]},"936":{"position":[[67,6],[206,6]]},"1058":{"position":[[139,6]]},"1090":{"position":[[61,6],[200,6]]},"1168":{"position":[[253,6],[299,5]]},"1292":{"position":[[1080,6],[1111,6],[1319,5],[1716,6],[1780,6]]},"1329":{"position":[[248,6]]},"1737":{"position":[[231,6]]},"1748":{"position":[[56,6]]},"1750":{"position":[[50,5]]},"1758":{"position":[[179,5],[221,5],[455,5]]},"1774":{"position":[[246,5]]},"1776":{"position":[[245,5]]},"1780":{"position":[[49,6]]},"1784":{"position":[[50,6]]},"1796":{"position":[[86,5]]},"1804":{"position":[[85,6]]},"1822":{"position":[[169,5],[211,5]]},"1838":{"position":[[170,5],[212,5],[305,5]]},"1852":{"position":[[172,5],[214,5],[315,5]]},"1868":{"position":[[83,5]]},"1872":{"position":[[32,5]]},"1888":{"position":[[22,5],[175,6]]},"1896":{"position":[[75,5]]}}}],["fieldnam",{"_index":1370,"t":{"1168":{"position":[[313,10]]},"1292":{"position":[[957,9],[1294,9],[1330,9]]}}}],["file",{"_index":39,"t":{"733":{"position":[[61,4]]},"735":{"position":[[13,4]]},"749":{"position":[[370,5],[553,5],[707,6]]},"918":{"position":[[265,4]]},"946":{"position":[[216,4]]},"1122":{"position":[[570,5]]},"1128":{"position":[[140,5]]},"1142":{"position":[[402,6]]},"1162":{"position":[[38,4]]},"1176":{"position":[[1302,4],[1389,6],[1867,4],[2273,5],[2436,4]]},"1186":{"position":[[610,5]]},"1206":{"position":[[16,5],[58,6],[102,4],[230,5],[356,5]]},"1211":{"position":[[38,5],[127,5],[285,5],[489,5],[558,5],[569,9],[606,10],[700,4],[717,5],[1099,6],[1359,6],[1875,4],[2010,4],[2241,4]]},"1243":{"position":[[118,5]]},"1247":{"position":[[145,4]]},"1249":{"position":[[160,4]]},"1253":{"position":[[93,5]]},"1292":{"position":[[145,6],[221,6],[536,6],[808,4],[898,6],[1187,4],[1263,4],[1468,5]]},"1329":{"position":[[843,4],[895,4],[914,4]]},"1466":{"position":[[367,5]]},"1468":{"position":[[198,4],[287,4]]},"1470":{"position":[[39,5]]},"1472":{"position":[[58,5]]},"1478":{"position":[[36,5],[247,4],[470,4]]},"1490":{"position":[[262,5],[421,4],[649,4],[814,4],[923,4],[1118,4]]},"1550":{"position":[[1026,4],[1038,5],[1159,5],[1238,5]]},"1666":{"position":[[276,5]]},"1670":{"position":[[387,4],[432,4],[517,4]]},"1770":{"position":[[14,4],[171,4]]},"1774":{"position":[[14,5],[56,4],[231,4],[264,5],[308,4]]},"1812":{"position":[[483,5],[511,5],[589,6],[603,4],[617,5],[753,5]]},"1860":{"position":[[37,4],[288,5],[316,5],[394,6],[408,4],[422,5],[558,5]]},"1862":{"position":[[37,4],[368,5],[396,5],[474,6],[488,4],[502,5],[638,5]]},"1868":{"position":[[14,4],[451,4],[532,4]]},"1884":{"position":[[80,4]]}}}],["file'",{"_index":2044,"t":{"1292":{"position":[[1312,6],[1363,6],[1406,6]]}}}],["file.clos",{"_index":3240,"t":{"1550":{"position":[[1183,12]]}}}],["file.filenam",{"_index":4104,"t":{"1774":{"position":[[376,15]]},"1812":{"position":[[815,16]]},"1860":{"position":[[620,16]]},"1862":{"position":[[712,15]]}}}],["file.header[\"cont",{"_index":4193,"t":{"1812":{"position":[[663,20]]},"1860":{"position":[[468,20]]},"1862":{"position":[[548,20]]}}}],["file.s",{"_index":4192,"t":{"1812":{"position":[[652,10]]},"1860":{"position":[[457,10]]},"1862":{"position":[[537,10]]}}}],["fileb0x",{"_index":1138,"t":{"1126":{"position":[[1176,8],[1549,7]]}}}],["filedata",{"_index":2041,"t":{"1292":{"position":[[1160,9],[1170,8],[1451,8]]}}}],["filedata(formfil",{"_index":2046,"t":{"1292":{"position":[[1638,18]]}}}],["filenam",{"_index":1296,"t":{"1162":{"position":[[523,8],[675,9]]},"1176":{"position":[[1100,9]]},"1770":{"position":[[144,9],[260,8],[326,8]]},"1868":{"position":[[102,9]]}}}],["filename///stat",{"_index":1140,"t":{"1126":{"position":[[1359,33]]}}}],["github.com/casbin/xorm",{"_index":28,"t":{"729":{"position":[[120,22]]},"737":{"position":[[123,23]]},"739":{"position":[[123,23]]},"741":{"position":[[123,23]]}}}],["github.com/geertjohan/go.ric",{"_index":1135,"t":{"1126":{"position":[[969,31]]},"1484":{"position":[[142,31]]}}}],["github.com/getsentry/sentri",{"_index":210,"t":{"767":{"position":[[132,27]]},"773":{"position":[[640,28]]}}}],["github.com/go",{"_index":68,"t":{"737":{"position":[[90,14]]},"739":{"position":[[90,14]]},"741":{"position":[[90,14]]}}}],["github.com/gobuffalo/packr/v2",{"_index":1131,"t":{"1126":{"position":[[613,31]]},"1482":{"position":[[139,31]]}}}],["github.com/goccy/go",{"_index":3719,"t":{"1688":{"position":[[441,20]]}}}],["github.com/gofiber/compress",{"_index":1710,"t":{"1211":{"position":[[1401,30]]}}}],["github.com/gofiber/contrib/casbin",{"_index":24,"t":{"729":{"position":[[48,33]]},"737":{"position":[[52,35]]},"739":{"position":[[52,35]]},"741":{"position":[[52,35]]}}}],["github.com/gofiber/contrib/fiberi18n",{"_index":102,"t":{"745":{"position":[[83,36]]},"751":{"position":[[22,38]]}}}],["github.com/gofiber/contrib/fibernewrel",{"_index":170,"t":{"755":{"position":[[48,40]]},"761":{"position":[[52,42]]},"763":{"position":[[52,42]]}}}],["github.com/gofiber/contrib/fibersentri",{"_index":209,"t":{"767":{"position":[[83,38]]},"773":{"position":[[673,40]]}}}],["github.com/gofiber/contrib/fiberzap",{"_index":303,"t":{"779":{"position":[[83,35]]},"785":{"position":[[58,37]]}}}],["github.com/gofiber/contrib/fiberzerolog",{"_index":339,"t":{"789":{"position":[[83,39]]},"795":{"position":[[52,41]]}}}],["github.com/gofiber/contrib/jwt",{"_index":373,"t":{"799":{"position":[[109,30]]},"805":{"position":[[67,32]]},"809":{"position":[[131,32]]},"815":{"position":[[737,32]]}}}],["github.com/gofiber/contrib/opafib",{"_index":540,"t":{"819":{"position":[[48,35]]},"827":{"position":[[294,37]]}}}],["github.com/gofiber/contrib/otelfib",{"_index":4464,"t":{"1902":{"position":[[45,36]]},"1910":{"position":[[117,38]]}}}],["github.com/gofiber/contrib/paseto",{"_index":596,"t":{"833":{"position":[[83,33]]}}}],["github.com/gofiber/contrib/swagg",{"_index":626,"t":{"847":{"position":[[109,36]]}}}],["github.com/gofiber/contrib/websocket",{"_index":638,"t":{"855":{"position":[[48,36]]},"857":{"position":[[58,38]]}}}],["github.com/gofiber/emb",{"_index":1167,"t":{"1132":{"position":[[464,24]]},"1136":{"position":[[465,24]]},"1140":{"position":[[550,24]]},"1148":{"position":[[513,24]]},"1152":{"position":[[523,24]]},"1182":{"position":[[516,24]]},"1190":{"position":[[509,24]]},"1194":{"position":[[531,24]]}}}],["github.com/gofiber/fiber/v2",{"_index":23,"t":{"729":{"position":[[10,27]]},"737":{"position":[[22,29]]},"739":{"position":[[22,29]]},"741":{"position":[[22,29]]},"745":{"position":[[45,27]]},"751":{"position":[[61,29]]},"755":{"position":[[10,27]]},"761":{"position":[[22,29]]},"763":{"position":[[22,29]]},"767":{"position":[[45,27]]},"773":{"position":[[714,29]]},"779":{"position":[[45,27]]},"785":{"position":[[28,29]]},"789":{"position":[[45,27]]},"795":{"position":[[22,29]]},"799":{"position":[[71,27]]},"805":{"position":[[29,29]]},"809":{"position":[[62,29]]},"815":{"position":[[699,29]]},"819":{"position":[[10,27]]},"827":{"position":[[264,29]]},"833":{"position":[[45,27]]},"847":{"position":[[79,29]]},"855":{"position":[[10,27]]},"857":{"position":[[28,29]]},"1120":{"position":[[49,27]]},"1122":{"position":[[28,29]]},"1126":{"position":[[213,29],[548,29],[904,29],[1268,29]]},"1132":{"position":[[284,29]]},"1136":{"position":[[279,29]]},"1140":{"position":[[361,29]]},"1142":{"position":[[508,29]]},"1148":{"position":[[319,29]]},"1152":{"position":[[340,29]]},"1154":{"position":[[47,29]]},"1156":{"position":[[63,29]]},"1182":{"position":[[336,29]]},"1186":{"position":[[349,29]]},"1190":{"position":[[296,29]]},"1194":{"position":[[315,29]]},"1198":{"position":[[121,27]]},"1202":{"position":[[101,29]]},"1340":{"position":[[39,29]]},"1342":{"position":[[39,29]]},"1344":{"position":[[33,29]]},"1346":{"position":[[33,29]]},"1348":{"position":[[33,29]]},"1354":{"position":[[79,29]]},"1364":{"position":[[79,29]]},"1374":{"position":[[79,29]]},"1386":{"position":[[79,29]]},"1396":{"position":[[79,29]]},"1410":{"position":[[79,29]]},"1422":{"position":[[79,29]]},"1434":{"position":[[79,29]]},"1446":{"position":[[79,29]]},"1456":{"position":[[79,29]]},"1466":{"position":[[79,29]]},"1476":{"position":[[79,29]]},"1478":{"position":[[145,29]]},"1480":{"position":[[57,29]]},"1482":{"position":[[57,29]]},"1484":{"position":[[60,29]]},"1486":{"position":[[57,29]]},"1488":{"position":[[55,29]]},"1498":{"position":[[22,29]]},"1508":{"position":[[79,29]]},"1522":{"position":[[54,29]]},"1524":{"position":[[193,29]]},"1526":{"position":[[54,29]]},"1536":{"position":[[79,29]]},"1550":{"position":[[79,29]]},"1562":{"position":[[79,29]]},"1572":{"position":[[79,29]]},"1582":{"position":[[79,29]]},"1592":{"position":[[79,29]]},"1602":{"position":[[22,29]]},"1612":{"position":[[79,29]]},"1622":{"position":[[22,29]]},"1628":{"position":[[79,29]]},"1642":{"position":[[79,29]]},"1648":{"position":[[79,29]]},"1678":{"position":[[85,29]]},"1681":{"position":[[500,29]]},"1688":{"position":[[404,29]]},"1704":{"position":[[279,29]]},"1716":{"position":[[316,29]]},"1734":{"position":[[196,29]]},"1910":{"position":[[87,29]]}}}],["github.com/gofiber/fiber/v2/middleware/adaptor",{"_index":2746,"t":{"1340":{"position":[[69,48]]},"1342":{"position":[[69,48]]},"1344":{"position":[[63,48]]},"1346":{"position":[[63,48]]},"1348":{"position":[[63,48]]}}}],["github.com/gofiber/fiber/v2/middleware/basicauth",{"_index":2773,"t":{"1354":{"position":[[109,50]]}}}],["github.com/gofiber/fiber/v2/middleware/cach",{"_index":2792,"t":{"1364":{"position":[[109,46]]}}}],["github.com/gofiber/fiber/v2/middleware/compress",{"_index":2828,"t":{"1374":{"position":[[109,49]]}}}],["github.com/gofiber/fiber/v2/middleware/cor",{"_index":2839,"t":{"1386":{"position":[[109,45]]}}}],["github.com/gofiber/fiber/v2/middleware/csrf",{"_index":2876,"t":{"1396":{"position":[[109,45]]}}}],["github.com/gofiber/fiber/v2/middleware/earlydata",{"_index":2927,"t":{"1410":{"position":[[109,50]]}}}],["github.com/gofiber/fiber/v2/middleware/encryptcooki",{"_index":2940,"t":{"1422":{"position":[[109,54]]}}}],["github.com/gofiber/fiber/v2/middleware/envvar",{"_index":2963,"t":{"1434":{"position":[[109,47]]}}}],["github.com/gofiber/fiber/v2/middleware/etag",{"_index":2983,"t":{"1446":{"position":[[109,45]]}}}],["github.com/gofiber/fiber/v2/middleware/expvar",{"_index":3003,"t":{"1456":{"position":[[118,47]]}}}],["github.com/gofiber/fiber/v2/middleware/favicon",{"_index":3027,"t":{"1466":{"position":[[109,48]]}}}],["github.com/gofiber/fiber/v2/middleware/filesystem",{"_index":3035,"t":{"1476":{"position":[[109,51]]},"1478":{"position":[[175,51]]},"1480":{"position":[[87,51]]},"1482":{"position":[[87,51]]},"1484":{"position":[[90,51]]},"1486":{"position":[[87,51]]},"1488":{"position":[[85,51]]}}}],["github.com/gofiber/fiber/v2/middleware/helmet",{"_index":3079,"t":{"1498":{"position":[[52,47]]}}}],["github.com/gofiber/fiber/v2/middleware/idempot",{"_index":3114,"t":{"1508":{"position":[[109,52]]}}}],["github.com/gofiber/fiber/v2/middleware/keyauth",{"_index":3134,"t":{"1522":{"position":[[84,48]]},"1524":{"position":[[223,48]]},"1526":{"position":[[84,48]]}}}],["github.com/gofiber/fiber/v2/middleware/limit",{"_index":3190,"t":{"1536":{"position":[[109,48]]}}}],["github.com/gofiber/fiber/v2/middleware/logg",{"_index":3217,"t":{"1550":{"position":[[109,47]]},"1678":{"position":[[115,47]]}}}],["github.com/gofiber/fiber/v2/middleware/monitor",{"_index":3325,"t":{"1562":{"position":[[109,48]]}}}],["github.com/gofiber/fiber/v2/middleware/pprof",{"_index":3362,"t":{"1572":{"position":[[109,46]]}}}],["github.com/gofiber/fiber/v2/middleware/proxi",{"_index":3388,"t":{"1582":{"position":[[109,46]]}}}],["github.com/gofiber/fiber/v2/middleware/recov",{"_index":3429,"t":{"1592":{"position":[[109,48]]},"1681":{"position":[[530,48]]}}}],["github.com/gofiber/fiber/v2/middleware/redirect",{"_index":3437,"t":{"1602":{"position":[[52,49]]}}}],["github.com/gofiber/fiber/v2/middleware/requestid",{"_index":3456,"t":{"1612":{"position":[[109,50]]}}}],["github.com/gofiber/fiber/v2/middleware/rewrit",{"_index":3465,"t":{"1622":{"position":[[52,48]]}}}],["github.com/gofiber/fiber/v2/middleware/sess",{"_index":3473,"t":{"1628":{"position":[[109,48]]}}}],["github.com/gofiber/fiber/v2/middleware/skip",{"_index":3496,"t":{"1642":{"position":[[109,45]]}}}],["github.com/gofiber/fiber/v2/middleware/timeout",{"_index":3512,"t":{"1648":{"position":[[109,48]]}}}],["github.com/gofiber/fiber/v2/util",{"_index":262,"t":{"773":{"position":[[744,35]]}}}],["github.com/gofiber/recip",{"_index":3156,"t":{"1522":{"position":[[1166,26]]}}}],["github.com/gofiber/storage/arangodb",{"_index":736,"t":{"872":{"position":[[234,35]]},"874":{"position":[[35,37]]}}}],["github.com/gofiber/storage/azureblob",{"_index":761,"t":{"886":{"position":[[244,36]]},"888":{"position":[[35,38]]}}}],["github.com/gofiber/storage/badg",{"_index":784,"t":{"900":{"position":[[221,33]]},"902":{"position":[[35,35]]}}}],["github.com/gofiber/storage/bbolt",{"_index":812,"t":{"914":{"position":[[216,32]]},"916":{"position":[[35,34]]}}}],["github.com/gofiber/storage/couchbas",{"_index":829,"t":{"928":{"position":[[227,36]]},"930":{"position":[[35,38]]}}}],["github.com/gofiber/storage/dynamodb",{"_index":849,"t":{"942":{"position":[[225,35]]},"944":{"position":[[35,37]]}}}],["github.com/gofiber/storage/etcd",{"_index":900,"t":{"956":{"position":[[217,31]]},"958":{"position":[[35,33]]}}}],["github.com/gofiber/storage/memcach",{"_index":915,"t":{"972":{"position":[[35,37]]}}}],["github.com/gofiber/storage/memori",{"_index":914,"t":{"970":{"position":[[221,33]]},"984":{"position":[[221,33]]},"986":{"position":[[35,35]]}}}],["github.com/gofiber/storage/mongodb",{"_index":929,"t":{"998":{"position":[[223,34]]},"1000":{"position":[[35,36]]}}}],["github.com/gofiber/storage/mssql",{"_index":939,"t":{"1012":{"position":[[219,32]]},"1014":{"position":[[35,34]]}}}],["github.com/gofiber/storage/mysql",{"_index":948,"t":{"1026":{"position":[[219,32]]},"1028":{"position":[[35,34]]}}}],["github.com/gofiber/storage/pebbl",{"_index":956,"t":{"1040":{"position":[[292,33]]},"1042":{"position":[[35,35]]}}}],["github.com/gofiber/storage/postgres/v2",{"_index":964,"t":{"1054":{"position":[[225,38]]},"1056":{"position":[[35,40]]}}}],["github.com/gofiber/storage/redis/v2",{"_index":971,"t":{"1068":{"position":[[219,35]]},"1070":{"position":[[35,37]]}}}],["github.com/gofiber/storage/ristretto",{"_index":1021,"t":{"1082":{"position":[[227,36]]},"1084":{"position":[[35,38]]}}}],["github.com/gofiber/storage/s3",{"_index":1038,"t":{"1096":{"position":[[213,29]]},"1098":{"position":[[35,31]]}}}],["github.com/gofiber/storage/sqlite3",{"_index":1044,"t":{"1110":{"position":[[223,34]]},"1112":{"position":[[35,36]]},"1404":{"position":[[83,34]]},"1544":{"position":[[83,34]]},"1636":{"position":[[83,34]]}}}],["github.com/gofiber/template/ace/v2",{"_index":1164,"t":{"1132":{"position":[[314,36]]}}}],["github.com/gofiber/template/amber/v2",{"_index":1173,"t":{"1136":{"position":[[309,38]]}}}],["github.com/gofiber/template/any_template_engine/vx",{"_index":1075,"t":{"1120":{"position":[[87,50]]}}}],["github.com/gofiber/template/django/v3",{"_index":1185,"t":{"1140":{"position":[[391,39]]},"1142":{"position":[[538,39]]}}}],["github.com/gofiber/template/handlebars/v2",{"_index":1234,"t":{"1148":{"position":[[349,43]]}}}],["github.com/gofiber/template/html",{"_index":1125,"t":{"1126":{"position":[[243,34],[578,34],[934,34],[1298,34]]},"1154":{"position":[[77,34]]},"1156":{"position":[[93,34]]}}}],["github.com/gofiber/template/html/v2",{"_index":1082,"t":{"1122":{"position":[[258,37]]},"1152":{"position":[[370,37]]},"1734":{"position":[[226,37]]}}}],["github.com/gofiber/template/jet/v2",{"_index":1567,"t":{"1182":{"position":[[366,36]]}}}],["github.com/gofiber/template/mustach",{"_index":1080,"t":{"1122":{"position":[[159,38]]}}}],["github.com/gofiber/template/mustache/v2",{"_index":1575,"t":{"1186":{"position":[[379,41]]}}}],["github.com/gofiber/template/pug",{"_index":1079,"t":{"1122":{"position":[[122,33]]}}}],["github.com/gofiber/template/pug/v2",{"_index":1591,"t":{"1190":{"position":[[326,36]]}}}],["github.com/gofiber/template/slim/v2",{"_index":1602,"t":{"1194":{"position":[[345,37]]}}}],["github.com/golang",{"_index":374,"t":{"799":{"position":[[150,17]]},"805":{"position":[[100,18]]},"809":{"position":[[92,18]]},"815":{"position":[[770,18]]}}}],["github.com/markbates/pkg",{"_index":1126,"t":{"1126":{"position":[[278,28]]},"1480":{"position":[[139,28]]}}}],["github.com/newrelic/go",{"_index":201,"t":{"763":{"position":[[95,23]]}}}],["github.com/nicksnyder/go",{"_index":153,"t":{"751":{"position":[[91,25]]}}}],["github.com/o1egl/paseto",{"_index":597,"t":{"833":{"position":[[127,23]]}}}],["github.com/rakyll/statik/f",{"_index":3069,"t":{"1488":{"position":[[230,29]]}}}],["github.com/rs/zerolog",{"_index":351,"t":{"795":{"position":[[94,23]]}}}],["github.com/rs/zerolog/log",{"_index":340,"t":{"789":{"position":[[133,25]]}}}],["given",{"_index":691,"t":{"862":{"position":[[312,5],[427,5],[447,5],[660,5]]},"936":{"position":[[93,6],[228,6]]},"1090":{"position":[[87,6],[222,6]]},"1241":{"position":[[37,5]]},"1243":{"position":[[41,5]]},"1247":{"position":[[47,5]]},"1249":{"position":[[62,5]]},"1264":{"position":[[13,5]]},"1266":{"position":[[13,5]]},"1320":{"position":[[101,5]]},"1329":{"position":[[5167,5],[5903,5],[6026,5]]},"1538":{"position":[[353,5]]},"1580":{"position":[[134,5],[167,5],[276,5],[309,5],[428,5],[461,5],[661,5],[708,5],[848,5],[896,5],[1041,5],[1073,5],[1100,5],[1244,5],[1304,5]]},"1644":{"position":[[149,5],[510,5]]},"1760":{"position":[[436,5]]},"1774":{"position":[[70,5]]},"1776":{"position":[[67,5]]},"1812":{"position":[[120,5]]},"1868":{"position":[[28,5]]},"1888":{"position":[[9,5]]}}}],["glob",{"_index":1476,"t":{"1176":{"position":[[1070,4]]}}}],["global",{"_index":250,"t":{"773":{"position":[[379,6]]},"1122":{"position":[[1169,6]]},"1166":{"position":[[1350,10]]},"1172":{"position":[[51,6]]},"1178":{"position":[[2181,6],[3144,11]]},"1329":{"position":[[6776,6]]},"1582":{"position":[[429,6]]},"1732":{"position":[[406,6],[626,6]]},"1906":{"position":[[253,6],[381,6],[704,6]]}}}],["go",{"_index":21,"t":{"729":{"position":[[0,2],[38,2],[110,2]]},"743":{"position":[[0,2]]},"745":{"position":[[35,2],[73,2]]},"755":{"position":[[0,2],[38,2]]},"767":{"position":[[35,2],[73,2],[122,2],[160,2]]},"773":{"position":[[669,3]]},"779":{"position":[[35,2],[73,2],[119,2]]},"789":{"position":[[35,2],[73,2],[123,2]]},"799":{"position":[[61,2],[99,2],[140,2]]},"817":{"position":[[52,2]]},"819":{"position":[[0,2],[38,2]]},"833":{"position":[[35,2],[73,2],[117,2]]},"855":{"position":[[0,2],[38,2]]},"872":{"position":[[45,2],[147,2],[227,2]]},"880":{"position":[[79,2]]},"886":{"position":[[50,2],[152,2],[237,2]]},"900":{"position":[[31,2],[133,2],[214,2]]},"908":{"position":[[59,2]]},"914":{"position":[[30,2],[132,2],[209,2]]},"928":{"position":[[34,2],[136,2],[220,2]]},"936":{"position":[[44,2]]},"942":{"position":[[33,2],[135,2],[218,2]]},"956":{"position":[[29,2],[131,2],[210,2]]},"970":{"position":[[31,2],[133,2],[214,2]]},"984":{"position":[[31,2],[133,2],[214,2]]},"992":{"position":[[45,2]]},"998":{"position":[[32,2],[134,2],[216,2]]},"1012":{"position":[[30,2],[132,2],[212,2]]},"1020":{"position":[[46,2]]},"1026":{"position":[[30,2],[132,2],[212,2]]},"1040":{"position":[[31,2],[133,2],[285,2]]},"1054":{"position":[[33,2],[135,2],[218,2]]},"1062":{"position":[[29,2]]},"1068":{"position":[[30,2],[132,2],[212,2]]},"1082":{"position":[[34,2],[136,2],[220,2]]},"1090":{"position":[[38,2]]},"1096":{"position":[[27,2],[129,2],[206,2]]},"1110":{"position":[[32,2],[134,2],[216,2]]},"1120":{"position":[[0,2],[39,2],[77,2]]},"1126":{"position":[[447,2],[798,2],[1159,2],[1165,2]]},"1150":{"position":[[21,2]]},"1158":{"position":[[4,2]]},"1162":{"position":[[57,2],[121,2],[281,2]]},"1166":{"position":[[350,2],[539,2],[666,2],[859,2]]},"1168":{"position":[[139,2]]},"1170":{"position":[[20,2],[1198,2],[1295,2]]},"1172":{"position":[[1047,2]]},"1178":{"position":[[1543,2],[1726,2]]},"1196":{"position":[[197,3]]},"1198":{"position":[[35,3],[98,2],[114,2]]},"1202":{"position":[[266,2]]},"1208":{"position":[[45,2],[136,2]]},"1329":{"position":[[4765,2]]},"1476":{"position":[[553,3],[596,2],[668,2]]},"1478":{"position":[[81,2]]},"1486":{"position":[[146,2]]},"1488":{"position":[[211,2]]},"1490":{"position":[[468,2]]},"1626":{"position":[[551,2]]},"1663":{"position":[[112,2]]},"1670":{"position":[[53,2],[598,3],[718,6]]},"1688":{"position":[[359,2]]},"1727":{"position":[[366,2]]},"1734":{"position":[[303,2]]},"1848":{"position":[[92,2]]},"1902":{"position":[[35,2]]}}}],["go#hub",{"_index":236,"t":{"773":{"position":[[95,7]]}}}],["go.opentelemetry.io/otel",{"_index":4485,"t":{"1910":{"position":[[156,26]]}}}],["go.opentelemetry.io/otel/attribut",{"_index":4486,"t":{"1910":{"position":[[183,36]]}}}],["go.opentelemetry.io/otel/exporters/jaeg",{"_index":4488,"t":{"1910":{"position":[[283,45]]}}}],["go.opentelemetry.io/otel/exporters/stdout/stdouttrac",{"_index":4487,"t":{"1910":{"position":[[227,55]]}}}],["go.opentelemetry.io/otel/propag",{"_index":4489,"t":{"1910":{"position":[[329,38]]}}}],["go.opentelemetry.io/otel/sdk/resourc",{"_index":4484,"t":{"1910":{"position":[[47,39]]}}}],["go.opentelemetry.io/otel/sdk/trac",{"_index":4491,"t":{"1910":{"position":[[377,36]]}}}],["go.opentelemetry.io/otel/semconv/v1.4.0",{"_index":4493,"t":{"1910":{"position":[[422,41]]}}}],["go.opentelemetry.io/otel/trac",{"_index":4495,"t":{"1910":{"position":[[474,32]]}}}],["go.ric",{"_index":1133,"t":{"1126":{"position":[[809,8]]}}}],["go.uber.org/zap",{"_index":304,"t":{"779":{"position":[[129,15]]},"785":{"position":[[96,17]]}}}],["go1.13.6",{"_index":3604,"t":{"1663":{"position":[[115,8]]}}}],["go:emb",{"_index":1187,"t":{"1142":{"position":[[18,8],[580,10]]},"1154":{"position":[[114,10]]},"1156":{"position":[[130,10]]},"1478":{"position":[[252,10],[310,10]]}}}],["goal",{"_index":805,"t":{"908":{"position":[[121,4]]}}}],["gocb.clust",{"_index":828,"t":{"926":{"position":[[288,13]]}}}],["goccy/go",{"_index":3713,"t":{"1688":{"position":[[279,8]]},"1800":{"position":[[51,8]]}}}],["godoc",{"_index":1281,"t":{"1162":{"position":[[160,7]]}}}],["gofib",{"_index":576,"t":{"829":{"position":[[21,7]]}}}],["gofiber/boilerpl",{"_index":3621,"t":{"1666":{"position":[[379,19]]}}}],["gofiber/templ",{"_index":3658,"t":{"1674":{"position":[[51,16]]}}}],["gofiber/util",{"_index":1647,"t":{"1200":{"position":[[1110,14]]}}}],["gohtml",{"_index":1282,"t":{"1162":{"position":[[182,7]]},"1176":{"position":[[2049,12],[2265,7]]}}}],["gokv",{"_index":865,"t":{"946":{"position":[[1228,5],[1924,5],[2553,4],[2606,4],[2793,4]]}}}],["golang",{"_index":3043,"t":{"1478":{"position":[[47,6]]}}}],["golang.org/x/text/languag",{"_index":155,"t":{"751":{"position":[[131,28]]}}}],["gold",{"_index":3559,"t":{"1651":{"position":[[483,4]]},"1663":{"position":[[80,4]]}}}],["good",{"_index":1092,"t":{"1122":{"position":[[675,4],[794,4]]},"1162":{"position":[[388,4]]},"1653":{"position":[[248,4]]}}}],["googl",{"_index":3816,"t":{"1723":{"position":[[1903,6]]}}}],["google.com",{"_index":4136,"t":{"1790":{"position":[[194,12]]}}}],["gorm",{"_index":63,"t":{"735":{"position":[[0,4]]},"1666":{"position":[[465,4]]}}}],["gorm.config",{"_index":3536,"t":{"1648":{"position":[[1801,15]]}}}],["gorm.open(postgres.open(\"postgres://localhost/foodb",{"_index":3535,"t":{"1648":{"position":[[1746,54]]}}}],["gosublim",{"_index":1285,"t":{"1162":{"position":[[236,9]]}}}],["go’",{"_index":1311,"t":{"1166":{"position":[[21,4]]}}}],["gracefulli",{"_index":1807,"t":{"1225":{"position":[[9,10]]}}}],["grame",{"_index":4152,"t":{"1800":{"position":[[337,8],[430,8],[484,8],[560,8]]},"1802":{"position":[[451,8],[516,8],[598,8]]},"1898":{"position":[[393,8]]}}}],["graph",{"_index":3612,"t":{"1663":{"position":[[671,5]]}}}],["great",{"_index":3932,"t":{"1737":{"position":[[15,5]]}}}],["greatli",{"_index":3839,"t":{"1723":{"position":[[2853,7]]}}}],["greedi",{"_index":3795,"t":{"1723":{"position":[[470,6],[786,7],[1025,6],[1259,6]]}}}],["green",{"_index":3310,"t":{"1556":{"position":[[929,7]]}}}],["greet",{"_index":1206,"t":{"1142":{"position":[[925,11]]},"1144":{"position":[[704,11]]},"1346":{"position":[[165,6]]}}}],["greet(c",{"_index":2764,"t":{"1344":{"position":[[366,7]]},"1346":{"position":[[254,7]]}}}],["greet(w",{"_index":2752,"t":{"1340":{"position":[[466,7]]}}}],["greetwithhttpreq",{"_index":2767,"t":{"1348":{"position":[[165,17]]}}}],["greetwithhttpreq(c",{"_index":2768,"t":{"1348":{"position":[[265,18]]}}}],["group",{"_index":1773,"t":{"1219":{"position":[[8,5],[35,6]]},"1692":{"position":[[21,5],[82,6],[147,5],[302,5]]},"1694":{"position":[[14,6],[436,5]]},"1696":{"position":[[0,5]]},"1704":{"position":[[169,7]]},"1706":{"position":[[52,5],[90,5],[110,5]]},"1708":{"position":[[56,5],[87,5],[107,5],[167,7]]},"1716":{"position":[[195,5],[825,6]]},"1729":{"position":[[63,6],[472,8]]}}}],["group(prefix",{"_index":1774,"t":{"1219":{"position":[[76,12]]}}}],["gt",{"_index":1460,"t":{"1174":{"position":[[417,2]]}}}],["guid",{"_index":3817,"t":{"1723":{"position":[[1921,6]]},"1725":{"position":[[429,4]]},"1729":{"position":[[481,5]]},"1762":{"position":[[76,5]]}}}],["guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/howitworks.provisionedthroughput",{"_index":876,"t":{"946":{"position":[[1486,96],[2182,96]]}}}],["guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/limits.md#capac",{"_index":878,"t":{"946":{"position":[[1655,81],[2351,81]]}}}],["gzip",{"_index":2825,"t":{"1370":{"position":[[71,5]]},"1742":{"position":[[1254,5]]},"1868":{"position":[[150,8]]}}}],["h",{"_index":463,"t":{"807":{"position":[[357,1]]},"1562":{"position":[[605,1]]},"1648":{"position":[[269,1],[1096,1]]},"1716":{"position":[[226,2]]},"1737":{"position":[[1657,1]]},"1758":{"position":[[865,1],[978,1],[1102,1]]},"1852":{"position":[[789,1],[805,1],[820,1]]}}}],["h1",{"_index":1156,"t":{"1132":{"position":[[54,2],[132,2],[170,2]]},"1136":{"position":[[51,2],[124,2],[164,2]]},"1140":{"position":[[60,6],[73,7]]},"1168":{"position":[[747,4],[794,5]]},"1172":{"position":[[542,7]]},"1182":{"position":[[48,6],[61,7]]},"1190":{"position":[[46,2]]},"1194":{"position":[[53,2]]}}}],["h1>a",{"_index":1314,"t":{"1166":{"position":[[218,6],[426,5]]}}}],["h1>filler",{"_index":1506,"t":{"1176":{"position":[[2672,10]]}}}],["h1>hello",{"_index":1391,"t":{"1170":{"position":[[308,10],[858,10]]}}}],["h1>{{.title}}{{.}}{{index",{"_index":1432,"t":{"1172":{"position":[[519,11]]}}}],["h1>{{title}}footerheaderfeatur",{"_index":1518,"t":{"1178":{"position":[[497,11],[595,11],[1875,11],[1973,11]]}}}],["handi",{"_index":3634,"t":{"1670":{"position":[[9,5]]},"1685":{"position":[[192,5]]}}}],["handl",{"_index":145,"t":{"749":{"position":[[822,7]]},"841":{"position":[[45,7]]},"1170":{"position":[[760,6]]},"1329":{"position":[[3185,7]]},"1452":{"position":[[202,7]]},"1472":{"position":[[157,6]]},"1568":{"position":[[235,7]]},"1588":{"position":[[87,7]]},"1594":{"position":[[223,8],[340,6]]},"1642":{"position":[[605,6]]},"1644":{"position":[[679,6]]},"1655":{"position":[[6,7],[86,7]]},"1657":{"position":[[6,7],[86,7]]},"1659":{"position":[[6,7],[86,7]]},"1661":{"position":[[6,7],[88,7]]},"1668":{"position":[[148,9],[351,6]]},"1672":{"position":[[346,8],[381,9]]},"1681":{"position":[[328,6]]},"1685":{"position":[[1247,9]]}}}],["handlebar",{"_index":1067,"t":{"1118":{"position":[[267,10]]},"1124":{"position":[[98,10]]},"1146":{"position":[[0,10]]},"1674":{"position":[[97,10]]},"1734":{"position":[[115,10]]}}}],["handlebars.new(\"./view",{"_index":1235,"t":{"1148":{"position":[[442,25]]}}}],["handler",{"_index":88,"t":{"737":{"position":[[580,7],[769,7]]},"739":{"position":[[546,7]]},"741":{"position":[[523,7]]},"797":{"position":[[115,8]]},"831":{"position":[[124,8]]},"1144":{"position":[[370,7]]},"1176":{"position":[[2112,8],[2379,7]]},"1178":{"position":[[4200,7],[4262,7],[4796,7],[5134,7]]},"1200":{"position":[[277,8],[355,8],[571,7],[661,8],[850,7]]},"1204":{"position":[[217,7]]},"1206":{"position":[[87,7]]},"1211":{"position":[[2015,9],[2467,7]]},"1213":{"position":[[111,8],[120,11],[173,8],[182,11],[235,8],[244,11],[296,8],[305,11],[360,8],[369,11],[425,8],[434,11],[490,8],[499,11],[553,8],[562,11],[616,8],[625,11],[733,8],[742,11],[901,8],[910,11],[952,7],[1068,7],[1751,8]]},"1219":{"position":[[97,8],[106,11],[192,8],[232,8],[268,8],[309,8],[357,8],[393,8],[434,8]]},"1227":{"position":[[45,9]]},"1229":{"position":[[104,7],[209,8],[240,8]]},"1231":{"position":[[118,7],[214,8]]},"1233":{"position":[[103,7]]},"1239":{"position":[[0,7],[27,7],[125,9]]},"1329":{"position":[[2540,9],[3455,8],[4084,8],[6006,7]]},"1335":{"position":[[23,8],[54,9]]},"1350":{"position":[[104,7]]},"1366":{"position":[[1183,7]]},"1406":{"position":[[1011,8]]},"1452":{"position":[[188,9]]},"1468":{"position":[[318,7]]},"1568":{"position":[[221,9]]},"1582":{"position":[[1061,7]]},"1638":{"position":[[47,7]]},"1644":{"position":[[119,7]]},"1648":{"position":[[1817,7]]},"1663":{"position":[[223,9]]},"1668":{"position":[[84,8],[204,7]]},"1672":{"position":[[30,8]]},"1681":{"position":[[86,8],[139,7],[392,7]]},"1683":{"position":[[24,7],[243,7]]},"1685":{"position":[[15,7],[118,7],[172,7],[646,7],[1136,7]]},"1694":{"position":[[207,8],[248,8],[335,8],[376,8],[472,8],[597,8],[638,8],[713,8],[754,8]]},"1696":{"position":[[6,8],[152,7],[395,8],[436,8]]},"1700":{"position":[[3,8]]},"1719":{"position":[[111,8],[120,11],[173,8],[182,11],[235,8],[244,11],[296,8],[305,11],[360,8],[369,11],[425,8],[434,11],[490,8],[499,11],[553,8],[562,11],[616,8],[625,11],[733,8],[742,11],[901,8],[910,11],[952,7],[1068,7],[1751,8]]},"1723":{"position":[[2993,8],[3065,8],[3176,8],[3289,8]]},"1725":{"position":[[320,8]]},"1729":{"position":[[210,8],[251,8],[338,8],[379,8]]},"1739":{"position":[[111,8],[120,11],[173,8],[182,11],[235,8],[244,11],[296,8],[305,11],[360,8],[369,11],[425,8],[434,11],[490,8],[499,11],[553,8],[562,11],[616,8],[625,11],[733,8],[742,11],[901,8],[910,11],[952,7],[1068,7],[1751,8]]},"1756":{"position":[[293,8]]},"1758":{"position":[[1360,8]]},"1768":{"position":[[380,8]]},"1776":{"position":[[360,8]]},"1780":{"position":[[372,8]]},"1784":{"position":[[439,8]]},"1790":{"position":[[257,8]]},"1814":{"position":[[187,8]]},"1816":{"position":[[263,8]]},"1818":{"position":[[1089,8]]},"1830":{"position":[[562,8]]},"1856":{"position":[[229,8]]},"1858":{"position":[[250,7]]}}}],["handler(c",{"_index":1631,"t":{"1200":{"position":[[503,9],[782,9]]}}}],["handler(f",{"_index":2750,"t":{"1340":{"position":[[389,9]]}}}],["handler(w",{"_index":1494,"t":{"1176":{"position":[[2162,9]]},"1178":{"position":[[4357,9]]}}}],["handler).name(\"bar",{"_index":1801,"t":{"1221":{"position":[[334,20]]}}}],["handler).name(\"delet",{"_index":1838,"t":{"1231":{"position":[[347,23]]}}}],["handler).name(\"foo",{"_index":1797,"t":{"1221":{"position":[[267,20]]}}}],["handler).name(\"hom",{"_index":1834,"t":{"1231":{"position":[[257,21]]}}}],["handler).name(\"index",{"_index":1850,"t":{"1233":{"position":[[199,22]]}}}],["handler).name(\"test",{"_index":1842,"t":{"1231":{"position":[[421,21]]}}}],["handler).name(\"tracert",{"_index":1836,"t":{"1231":{"position":[[300,24]]}}}],["handlerscount",{"_index":1821,"t":{"1227":{"position":[[81,15]]}}}],["handshak",{"_index":671,"t":{"859":{"position":[[36,9]]}}}],["hang",{"_index":3661,"t":{"1676":{"position":[[46,4]]}}}],["happi",{"_index":3712,"t":{"1688":{"position":[[193,5]]}}}],["hardwar",{"_index":3552,"t":{"1651":{"position":[[317,9]]}}}],["hash",{"_index":2631,"t":{"1329":{"position":[[1932,7]]}}}],["hashedapikey",{"_index":3140,"t":{"1522":{"position":[[245,12]]},"1524":{"position":[[511,12]]},"1526":{"position":[[313,12]]}}}],["hashedkey",{"_index":3142,"t":{"1522":{"position":[[291,9],[378,13]]},"1524":{"position":[[557,9],[644,13]]},"1526":{"position":[[359,9],[446,13]]}}}],["haspermiss",{"_index":1525,"t":{"1178":{"position":[[713,13],[821,13],[945,13],[1161,13],[1315,13],[1338,14],[2492,13],[2579,16],[2829,15],[3012,13],[3099,13],[3585,13],[3727,16],[3896,13],[4115,13],[4572,16],[4904,13],[5008,13]]}}}],["haspermission(featur",{"_index":1515,"t":{"1178":{"position":[[236,21]]}}}],["hat",{"_index":4286,"t":{"1838":{"position":[[669,4]]},"1852":{"position":[[695,4]]}}}],["have",{"_index":1553,"t":{"1178":{"position":[[4220,6],[5070,6]]}}}],["hb",{"_index":1236,"t":{"1148":{"position":[[468,7],[603,8]]}}}],["head",{"_index":1163,"t":{"1132":{"position":[[225,4]]},"1136":{"position":[[219,4]]},"1140":{"position":[[265,6],[292,7]]},"1148":{"position":[[223,6],[250,7]]},"1152":{"position":[[244,6],[271,7]]},"1176":{"position":[[2497,6],[2627,7]]},"1182":{"position":[[235,6],[263,7]]},"1186":{"position":[[251,6],[278,7]]},"1190":{"position":[[206,4]]},"1194":{"position":[[224,4]]},"1229":{"position":[[440,7]]},"1231":{"position":[[779,7],[842,7],[908,7]]},"1284":{"position":[[514,4]]},"1304":{"position":[[54,5]]},"1324":{"position":[[98,6]]},"1392":{"position":[[252,5]]},"1406":{"position":[[1114,5]]},"1564":{"position":[[475,4]]}}}],["head(path",{"_index":1729,"t":{"1213":{"position":[[155,9]]},"1719":{"position":[[155,9]]},"1739":{"position":[[155,9]]}}}],["head(url",{"_index":1920,"t":{"1258":{"position":[[138,8]]}}}],["head>back/static/image.png",{"_index":3052,"t":{"1478":{"position":[[522,35]]}}}],["http:///static/static/image.png",{"_index":3054,"t":{"1478":{"position":[[617,42]]}}}],["http://api.example.com/users?page=2",{"_index":4167,"t":{"1804":{"position":[[195,38],[300,38]]}}}],["http://api.example.com/users?page=5",{"_index":4168,"t":{"1804":{"position":[[242,38],[354,38]]}}}],["http://example.com",{"_index":4226,"t":{"1826":{"position":[[127,18]]}}}],["http://example.com/?field1=value1&field1=value2&field2=value3",{"_index":4234,"t":{"1828":{"position":[[383,61]]}}}],["http://example.com/?list_a=1&list_a=2&list_a=3&list_b[]=1&list_b[]=2&list_b[]=3&list_c=1,2,3",{"_index":4239,"t":{"1828":{"position":[[567,92]]}}}],["http://example.com/?name=alex&amount=32.23&id",{"_index":4269,"t":{"1834":{"position":[[533,46]]}}}],["http://example.com/?name=alex&wanna_cake=2&id",{"_index":4275,"t":{"1836":{"position":[[523,46]]}}}],["http://example.com/?name=alex&want_pizza=false&id",{"_index":4227,"t":{"1828":{"position":[[189,50]]},"1832":{"position":[[465,50]]}}}],["http://example.com/?order=desc&brand=nik",{"_index":4256,"t":{"1830":{"position":[[341,41]]}}}],["http://example.com/hello",{"_index":4065,"t":{"1762":{"position":[[337,24]]}}}],["http://example.com/search?q=someth",{"_index":4201,"t":{"1816":{"position":[[94,37]]}}}],["http://example.com/user/111",{"_index":4218,"t":{"1822":{"position":[[309,27]]}}}],["http://example.com/user/123",{"_index":4211,"t":{"1820":{"position":[[350,27]]}}}],["http://example.com/user/fenni",{"_index":3999,"t":{"1744":{"position":[[148,29]]},"1818":{"position":[[297,29]]}}}],["http://example.com/user/fenny/123",{"_index":4002,"t":{"1744":{"position":[[282,33]]},"1818":{"position":[[422,33]]}}}],["http://example.com/users?sort=desc",{"_index":4224,"t":{"1824":{"position":[[254,34]]}}}],["http://google.com",{"_index":1905,"t":{"1253":{"position":[[460,17],[615,20]]},"1582":{"position":[[1439,20]]},"1748":{"position":[[281,20],[352,17],[425,18]]}}}],["http://google.com/search",{"_index":4135,"t":{"1790":{"position":[[113,24]]}}}],["http://localhost",{"_index":3410,"t":{"1582":{"position":[[2016,19]]},"1748":{"position":[[302,19],[334,17],[407,17]]}}}],["http://localhost:3000",{"_index":1658,"t":{"1202":{"position":[[293,21]]},"1386":{"position":[[589,21],[717,22]]},"1498":{"position":[[268,21]]},"1522":{"position":[[856,21],[968,21],[1070,21]]},"1524":{"position":[[1451,21]]},"1526":{"position":[[820,21]]},"1582":{"position":[[1726,24]]},"1725":{"position":[[2601,22]]},"1758":{"position":[[1238,21]]},"1852":{"position":[[763,24]]}}}],["http://localhost:3000/1",{"_index":3907,"t":{"1725":{"position":[[1443,23],[1711,23]]}}}],["http://localhost:3000/12",{"_index":3906,"t":{"1725":{"position":[[1397,24]]}}}],["http://localhost:3000/120000",{"_index":3909,"t":{"1725":{"position":[[1645,28]]}}}],["http://localhost:3000/125",{"_index":3918,"t":{"1725":{"position":[[2044,25]]}}}],["http://localhost:3000/2022",{"_index":3921,"t":{"1725":{"position":[[2166,26]]}}}],["http://localhost:3000/250",{"_index":3911,"t":{"1725":{"position":[[1767,25]]}}}],["http://localhost:3000/42",{"_index":3925,"t":{"1725":{"position":[[2555,24]]}}}],["http://localhost:3000/7.0",{"_index":3926,"t":{"1725":{"position":[[2642,25]]}}}],["http://localhost:3000/?name=john&pass=do",{"_index":4043,"t":{"1758":{"position":[[1276,43]]}}}],["http://localhost:3000/?name=john&pass=doe&products=shoe,hat",{"_index":4287,"t":{"1838":{"position":[[737,61]]}}}],["http://localhost:3000/allow",{"_index":3178,"t":{"1526":{"position":[[952,29]]}}}],["http://localhost:3000/api/user/john",{"_index":1675,"t":{"1204":{"position":[[1218,35]]}}}],["http://localhost:3000/auth2",{"_index":3173,"t":{"1524":{"position":[[1749,27]]}}}],["http://localhost:3000/authent",{"_index":3171,"t":{"1524":{"position":[[1585,35]]}}}],["http://localhost:3000/bodi",{"_index":4409,"t":{"1874":{"position":[[1574,26]]}}}],["http://localhost:3000/css/style.css",{"_index":1697,"t":{"1211":{"position":[[435,35]]}}}],["http://localhost:3000/flights/lax",{"_index":3824,"t":{"1723":{"position":[[2140,33]]}}}],["http://localhost:3000/foo/1000",{"_index":3527,"t":{"1648":{"position":[[861,32]]}}}],["http://localhost:3000/foo/3000",{"_index":3528,"t":{"1648":{"position":[[952,32]]}}}],["http://localhost:3000/hello.html",{"_index":1695,"t":{"1211":{"position":[[355,32]]}}}],["http://localhost:3000/john",{"_index":1672,"t":{"1204":{"position":[[991,26]]}}}],["http://localhost:3000/js/jquery.j",{"_index":1696,"t":{"1211":{"position":[[394,34]]}}}],["http://localhost:3000/login",{"_index":458,"t":{"807":{"position":[[88,27]]}}}],["http://localhost:3000/metr",{"_index":3330,"t":{"1562":{"position":[[634,29]]}}}],["http://localhost:3000/old",{"_index":3443,"t":{"1602":{"position":[[476,25]]},"1622":{"position":[[456,25]]}}}],["http://localhost:3000/old/hello",{"_index":3444,"t":{"1602":{"position":[[507,31]]},"1622":{"position":[[487,31]]}}}],["http://localhost:3000/plantae/prunus.persica",{"_index":3818,"t":{"1723":{"position":[[1931,44]]}}}],["http://localhost:3000/query?title=title&body=body&date=2021",{"_index":4410,"t":{"1874":{"position":[[1616,60]]}}}],["http://localhost:3000/shop/product/color:blue/size:x",{"_index":3832,"t":{"1723":{"position":[[2479,53]]}}}],["http://localhost:3000/static/css/style.css",{"_index":1702,"t":{"1211":{"position":[[968,42]]}}}],["http://localhost:3000/static/hello.html",{"_index":1700,"t":{"1211":{"position":[[874,39]]}}}],["http://localhost:3000/static/js/jquery.j",{"_index":1701,"t":{"1211":{"position":[[920,41]]}}}],["http://localhost:3000/test",{"_index":3920,"t":{"1725":{"position":[[2104,26]]}}}],["http://localhost:3001",{"_index":3413,"t":{"1582":{"position":[[2276,24],[2459,24],[2875,24]]}}}],["http://localhost:3002",{"_index":3414,"t":{"1582":{"position":[[2301,24],[2484,24],[2900,24]]}}}],["http://localhost:3003",{"_index":3415,"t":{"1582":{"position":[[2326,24],[2509,24],[2925,24]]}}}],["http://localhost:8000",{"_index":861,"t":{"946":{"position":[[614,24]]},"1582":{"position":[[820,25]]}}}],["http://localhost:8080",{"_index":4020,"t":{"1756":{"position":[[92,21]]}}}],["http://localhost:8080/css/style.css",{"_index":1688,"t":{"1206":{"position":[[466,35]]}}}],["http://localhost:8080/hello",{"_index":4337,"t":{"1858":{"position":[[84,27]]}}}],["http://localhost:8080/hello%20world",{"_index":1668,"t":{"1204":{"position":[[787,35]]}}}],["http://localhost:8080/hello.html",{"_index":1686,"t":{"1206":{"position":[[398,32]]}}}],["http://localhost:8080/js/jquery.j",{"_index":1687,"t":{"1206":{"position":[[431,34]]}}}],["http://localhost:8080/register/us",{"_index":3966,"t":{"1737":{"position":[[1743,35]]}}}],["http://www.foobar.com",{"_index":3424,"t":{"1584":{"position":[[332,22]]}}}],["httpapi",{"_index":3111,"t":{"1504":{"position":[[293,7]]}}}],["httperror",{"_index":2715,"t":{"1331":{"position":[[23,9]]}}}],["httphandler",{"_index":2724,"t":{"1337":{"position":[[27,11]]}}}],["httphandler(h",{"_index":2725,"t":{"1337":{"position":[[39,13]]}}}],["httphandlerfunc",{"_index":2727,"t":{"1337":{"position":[[111,15]]}}}],["httphandlerfunc(h",{"_index":2728,"t":{"1337":{"position":[[127,17]]}}}],["httphandlerfunc(mw",{"_index":2731,"t":{"1337":{"position":[[226,18]]}}}],["httpmiddlewar",{"_index":2730,"t":{"1337":{"position":[[211,14]]}}}],["httponli",{"_index":4055,"t":{"1760":{"position":[[822,9],[1027,9]]},"1766":{"position":[[280,8]]}}}],["httpreq",{"_index":2769,"t":{"1348":{"position":[[304,8]]}}}],["httpreq.url.str",{"_index":2772,"t":{"1348":{"position":[[420,21]]}}}],["https://blog.trailofbits.com/2019/03/25/what",{"_index":2921,"t":{"1406":{"position":[[733,44]]}}}],["https://cdn.jsdelivr.net/npm/chart.js@2.9/dist/chart.bundle.min.j",{"_index":3350,"t":{"1564":{"position":[[857,66]]}}}],["https://datatracker.ietf.org/doc/html/draft",{"_index":3109,"t":{"1504":{"position":[[244,43]]}}}],["https://datatracker.ietf.org/doc/html/rfc8446#sect",{"_index":2920,"t":{"1406":{"position":[[677,53]]}}}],["https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region",{"_index":852,"t":{"946":{"position":[[89,68]]}}}],["https://example.com",{"_index":2106,"t":{"1322":{"position":[[290,21]]},"1752":{"position":[[198,19]]}}}],["https://example.com/page#chapt",{"_index":4015,"t":{"1752":{"position":[[108,32]]}}}],["https://expressjs.com/en/4x/api.html#req.fresh",{"_index":4107,"t":{"1778":{"position":[[0,46]]}}}],["https://expressjs.com/en/4x/api.html#req.stal",{"_index":4414,"t":{"1878":{"position":[[0,46]]}}}],["https://fonts.googleapis.com/css2?family=roboto:wght@400;900&display=swap",{"_index":3347,"t":{"1564":{"position":[[656,73]]}}}],["https://foobar.com",{"_index":3423,"t":{"1584":{"position":[[311,20]]}}}],["https://github.com/awsdocs/amazon",{"_index":874,"t":{"946":{"position":[[1433,33],[1602,33],[2129,33],[2298,33]]}}}],["https://github.com/geertjohan/go.ric",{"_index":1134,"t":{"1126":{"position":[[838,37]]},"1484":{"position":[[0,37]]}}}],["https://github.com/go",{"_index":3938,"t":{"1737":{"position":[[556,21]]}}}],["https://github.com/gobuffalo/packr",{"_index":1130,"t":{"1126":{"position":[[485,34]]},"1482":{"position":[[0,34]]}}}],["https://github.com/gofiber/storag",{"_index":687,"t":{"862":{"position":[[207,34]]}}}],["https://github.com/markbates/pkg",{"_index":1124,"t":{"1126":{"position":[[150,34]]},"1480":{"position":[[0,34]]}}}],["https://github.com/rakyll/statik",{"_index":3064,"t":{"1488":{"position":[[0,32]]}}}],["https://github.com/smallnest/go",{"_index":3599,"t":{"1663":{"position":[[3,31]]}}}],["https://github.com/unnoted/fileb0x",{"_index":1139,"t":{"1126":{"position":[[1205,34]]},"1486":{"position":[[0,34]]}}}],["https://godoc.org/github.com/getsentry/sentri",{"_index":235,"t":{"773":{"position":[[48,46]]}}}],["https://gofiber.io",{"_index":2843,"t":{"1386":{"position":[[369,20]]}}}],["https://gofiber.net",{"_index":2844,"t":{"1386":{"position":[[390,21]]}}}],["https://hub.docker.com/r/amazon/dynamodb",{"_index":862,"t":{"946":{"position":[[646,40]]}}}],["https://i.imgur.com/\"+c.params(\"id\")+\".gif",{"_index":3402,"t":{"1582":{"position":[[1119,44]]}}}],["https://pkg.go.dev/github.com/fasthttp/websocket?tab=doc#pkg",{"_index":658,"t":{"857":{"position":[[666,60]]}}}],["https://programming.guide/go/format",{"_index":3258,"t":{"1552":{"position":[[662,35]]}}}],["https://storageaccountname.blob.core.windows.net",{"_index":767,"t":{"890":{"position":[[140,50]]}}}],["https://www.websocket.org/echo.html",{"_index":670,"t":{"857":{"position":[[1072,35]]}}}],["httptest.newrequest(\"get",{"_index":1909,"t":{"1253":{"position":[[588,26]]}}}],["hub",{"_index":282,"t":{"773":{"position":[[1365,3],[1406,3],[1617,3],[1658,3]]}}}],["hub.capturemessage(\"us",{"_index":295,"t":{"773":{"position":[[1767,24]]}}}],["hub.scope().settag(\"somerandomtag",{"_index":284,"t":{"773":{"position":[[1419,35]]}}}],["hub.withscope(func(scop",{"_index":291,"t":{"773":{"position":[[1671,24]]}}}],["hyphen",{"_index":3811,"t":{"1723":{"position":[[1613,6]]}}}],["i.",{"_index":920,"t":{"974":{"position":[[52,4]]},"1213":{"position":[[1292,4]]},"1406":{"position":[[965,4]]},"1584":{"position":[[305,5]]},"1719":{"position":[[1292,4]]},"1739":{"position":[[1292,4]]}}}],["i18n",{"_index":99,"t":{"743":{"position":[[3,4]]},"749":{"position":[[142,4]]}}}],["i18n.unmarshalfunc",{"_index":138,"t":{"749":{"position":[[648,18]]}}}],["i18n/v2/i18n",{"_index":154,"t":{"751":{"position":[[117,13]]}}}],["icon",{"_index":3020,"t":{"1462":{"position":[[80,4]]}}}],["id",{"_index":1513,"t":{"1178":{"position":[[200,2],[1141,2],[1257,3],[4465,3],[4827,2]]},"1324":{"position":[[10502,3],[11548,3]]},"1550":{"position":[[656,2]]},"1612":{"position":[[444,3]]},"1614":{"position":[[259,2],[298,3],[503,2]]},"1626":{"position":[[445,4]]},"1630":{"position":[[363,2],[1322,2]]},"1784":{"position":[[248,4]]},"1820":{"position":[[426,3]]},"1822":{"position":[[401,3],[453,7]]},"1910":{"position":[[896,2],[950,3],[984,3],[1596,2],[1704,5],[1730,2]]}}}],["idjohndoe/myembeddedfil",{"_index":3062,"t":{"1486":{"position":[[149,24]]}}}],["module>/statik",{"_index":3068,"t":{"1488":{"position":[[214,15]]}}}],["mongo.databas",{"_index":928,"t":{"996":{"position":[[288,15]]}}}],["mongodb",{"_index":716,"t":{"864":{"position":[[72,7]]},"992":{"position":[[2,7]]},"998":{"position":[[0,7],[192,7]]}}}],["mongodb.new",{"_index":930,"t":{"1000":{"position":[[171,13]]}}}],["mongodb.new(mongodb.config",{"_index":931,"t":{"1000":{"position":[[222,27],[408,27]]}}}],["mongodb/mongo",{"_index":927,"t":{"992":{"position":[[31,13]]}}}],["mongodb://user:password@127.0.0.1:27017",{"_index":935,"t":{"1000":{"position":[[451,42]]}}}],["monitor",{"_index":3322,"t":{"1558":{"position":[[0,7],[85,7],[101,7]]},"1564":{"position":[[120,8],[263,10]]}}}],["monitor.new",{"_index":3327,"t":{"1562":{"position":[[321,14]]}}}],["monitor.new(monitor.config{titl",{"_index":3329,"t":{"1562":{"position":[[488,33]]}}}],["month",{"_index":1376,"t":{"1168":{"position":[[788,5]]}}}],["more",{"_index":688,"t":{"862":{"position":[[246,4]]},"1124":{"position":[[8,4],[76,4]]},"1172":{"position":[[416,4]]},"1174":{"position":[[535,4]]},"1200":{"position":[[1512,4]]},"1208":{"position":[[4,4]]},"1211":{"position":[[1044,4]]},"1217":{"position":[[39,4]]},"1329":{"position":[[4812,4],[5056,4]]},"1442":{"position":[[46,4]]},"1522":{"position":[[1130,4]]},"1540":{"position":[[1399,4]]},"1550":{"position":[[725,4]]},"1618":{"position":[[140,4]]},"1668":{"position":[[113,4]]},"1670":{"position":[[146,4]]},"1674":{"position":[[139,4]]},"1678":{"position":[[1275,4]]},"1725":{"position":[[647,4],[857,4],[952,4],[1022,4]]},"1729":{"position":[[437,4]]},"1756":{"position":[[386,7]]},"1758":{"position":[[1453,7]]},"1762":{"position":[[218,4]]},"1764":{"position":[[275,4]]},"1768":{"position":[[473,7]]},"1776":{"position":[[453,7]]},"1780":{"position":[[465,7]]},"1784":{"position":[[532,7]]},"1790":{"position":[[350,7]]},"1816":{"position":[[356,7]]},"1818":{"position":[[1182,7]]},"1830":{"position":[[655,7]]},"1842":{"position":[[462,4]]}}}],["mount",{"_index":1753,"t":{"1215":{"position":[[8,5],[43,6]]},"1217":{"position":[[81,8],[435,8],[497,5],[536,8]]},"1329":{"position":[[3435,7]]},"1716":{"position":[[49,8],[71,5],[108,7],[201,9],[649,5],[728,5],[795,5],[848,5]]},"1727":{"position":[[509,6]]}}}],["mount(prefix",{"_index":1754,"t":{"1215":{"position":[[74,12]]}}}],["mountpath",{"_index":1759,"t":{"1217":{"position":[[4,9],[116,11],[467,10]]}}}],["move",{"_index":221,"t":{"771":{"position":[[255,6]]}}}],["ms",{"_index":3515,"t":{"1648":{"position":[[360,5],[1187,5]]},"1653":{"position":[[448,3],[524,3]]},"1655":{"position":[[74,3],[155,3]]},"1657":{"position":[[74,3],[154,3]]},"1659":{"position":[[74,3],[153,3]]},"1661":{"position":[[76,3],[156,3]]},"1663":{"position":[[178,3],[185,3],[193,3],[201,2],[540,2]]},"1670":{"position":[[659,2]]}}}],["msg",{"_index":661,"t":{"857":{"position":[[746,3],[782,4],[880,4],[913,5]]}}}],["mssql",{"_index":717,"t":{"864":{"position":[[80,5]]},"1006":{"position":[[2,5]]},"1012":{"position":[[0,5],[190,5]]}}}],["mssql.new",{"_index":940,"t":{"1014":{"position":[[169,11]]}}}],["mssql.new(mssql.config",{"_index":941,"t":{"1014":{"position":[[218,23],[444,23]]}}}],["mssqldb",{"_index":937,"t":{"1006":{"position":[[42,8]]}}}],["mstimeout",{"_index":1902,"t":{"1253":{"position":[[296,9]]}}}],["mt",{"_index":660,"t":{"857":{"position":[[739,2],[778,3]]}}}],["multi",{"_index":2687,"t":{"1329":{"position":[[5491,5],[5519,5]]},"1584":{"position":[[870,5],[901,5]]}}}],["multipart",{"_index":2022,"t":{"1292":{"position":[[20,9],[185,9],[632,9],[833,9],[1201,9],[1248,9],[1478,9]]},"1329":{"position":[[1558,9],[1649,9]]},"1812":{"position":[[10,9],[294,9]]},"1860":{"position":[[27,9],[191,9]]},"1862":{"position":[[27,9],[271,9]]}}}],["multipart.filehead",{"_index":4100,"t":{"1774":{"position":[[138,23]]},"1812":{"position":[[549,23]]},"1860":{"position":[[87,22],[354,23]]},"1862":{"position":[[126,22],[434,23]]}}}],["multipart.form",{"_index":4185,"t":{"1812":{"position":[[207,17],[364,15]]},"1860":{"position":[[261,15]]},"1862":{"position":[[341,15]]}}}],["multipart/form",{"_index":2023,"t":{"1292":{"position":[[81,14]]},"1324":{"position":[[807,15]]},"1758":{"position":[[306,14]]}}}],["multipartform",{"_index":2021,"t":{"1292":{"position":[[0,13],[165,13],[580,14]]},"1774":{"position":[[0,13]]},"1812":{"position":[[64,16],[191,15]]}}}],["multipartform(arg",{"_index":2026,"t":{"1292":{"position":[[356,18]]}}}],["multipartform(nil",{"_index":2031,"t":{"1292":{"position":[[752,19],[1133,19],[1840,18]]}}}],["multipl",{"_index":1058,"t":{"1118":{"position":[[47,8]]},"1162":{"position":[[608,8]]},"1168":{"position":[[378,8]]},"1204":{"position":[[208,8]]},"1211":{"position":[[500,8]]},"1213":{"position":[[1625,9],[1742,8]]},"1266":{"position":[[38,8]]},"1272":{"position":[[68,8]]},"1292":{"position":[[889,8]]},"1329":{"position":[[4756,8]]},"1504":{"position":[[200,8]]},"1572":{"position":[[369,8]]},"1578":{"position":[[64,8]]},"1580":{"position":[[41,8]]},"1719":{"position":[[1625,9],[1742,8]]},"1725":{"position":[[1250,8],[1502,8]]},"1734":{"position":[[66,8]]},"1739":{"position":[[1625,9],[1742,8]]},"1760":{"position":[[259,8]]},"1888":{"position":[[166,8]]}}}],["mustach",{"_index":1070,"t":{"1118":{"position":[[287,8]]},"1124":{"position":[[118,8]]},"1128":{"position":[[146,8]]},"1184":{"position":[[0,8]]},"1186":{"position":[[494,12],[762,13],[776,12]]},"1674":{"position":[[117,8]]},"1734":{"position":[[130,8]]}}}],["mustache.new(\"./view",{"_index":1576,"t":{"1186":{"position":[[470,23]]}}}],["mustache.newfilesystem(http.dir(\"./view",{"_index":1581,"t":{"1186":{"position":[[719,42]]}}}],["my_database.db",{"_index":815,"t":{"916":{"position":[[252,17]]}}}],["mycustomapi",{"_index":199,"t":{"761":{"position":[[293,14]]}}}],["mycustomstorag",{"_index":3196,"t":{"1536":{"position":[[636,18]]}}}],["myembeddedfiles.http",{"_index":3063,"t":{"1486":{"position":[[268,21]]}}}],["myfil",{"_index":3873,"t":{"1725":{"position":[[628,6]]}}}],["mymiddlewar",{"_index":4345,"t":{"1858":{"position":[[405,14]]}}}],["myservic",{"_index":3328,"t":{"1562":{"position":[[443,10],[522,10]]}}}],["mysql",{"_index":718,"t":{"864":{"position":[[86,5]]},"872":{"position":[[205,5]]},"908":{"position":[[268,6]]},"1020":{"position":[[2,5]]},"1026":{"position":[[0,5],[190,5]]}}}],["mysql.new",{"_index":949,"t":{"1028":{"position":[[169,11]]}}}],["mysql.new(mysql.config",{"_index":950,"t":{"1028":{"position":[[218,23],[424,23],[691,23]]}}}],["n",{"_index":1211,"t":{"1144":{"position":[[128,5]]},"1704":{"position":[[615,5]]},"1890":{"position":[[74,2]]},"1892":{"position":[[99,2]]},"1894":{"position":[[76,2]]}}}],["name",{"_index":167,"t":{"751":{"position":[[658,7]]},"759":{"position":[[122,4]]},"805":{"position":[[697,7],[1251,4],[1316,5]]},"809":{"position":[[1227,7],[1817,4],[1882,5]]},"827":{"position":[[136,7]]},"876":{"position":[[29,4],[335,4],[405,4]]},"890":{"position":[[40,5],[74,5]]},"904":{"position":[[33,4]]},"918":{"position":[[150,4]]},"932":{"position":[[251,4]]},"946":{"position":[[314,4]]},"1002":{"position":[[170,4],[470,4],[540,4]]},"1016":{"position":[[212,4],[511,4],[574,4],[639,4]]},"1030":{"position":[[290,4],[589,4],[654,4]]},"1044":{"position":[[33,4]]},"1058":{"position":[[343,4],[642,4],[707,4]]},"1070":{"position":[[488,6]]},"1072":{"position":[[29,4],[848,4]]},"1100":{"position":[[76,4]]},"1114":{"position":[[33,4],[98,4]]},"1122":{"position":[[891,4],[1260,4]]},"1150":{"position":[[315,4]]},"1162":{"position":[[0,6]]},"1164":{"position":[[319,5],[366,5],[428,4]]},"1166":{"position":[[880,4]]},"1168":{"position":[[305,4]]},"1170":{"position":[[324,7],[332,9],[378,5],[403,4],[443,4],[874,7],[882,9],[995,4],[1329,4],[1376,4],[1427,4],[1746,4],[1903,9]]},"1172":{"position":[[365,5],[465,5],[579,4]]},"1174":{"position":[[149,5]]},"1176":{"position":[[363,5],[787,4],[858,7],[990,4],[1307,6],[1332,5],[1367,5],[1447,4],[1536,4],[1746,4]]},"1178":{"position":[[2319,5]]},"1206":{"position":[[251,5]]},"1211":{"position":[[306,5],[1857,4]]},"1221":{"position":[[142,4],[301,6],[368,6]]},"1231":{"position":[[24,4],[571,7],[638,7],[707,7],[787,7],[850,7],[916,7],[1003,7],[1095,7]]},"1233":{"position":[[30,5],[356,7]]},"1235":{"position":[[443,7]]},"1292":{"position":[[1087,6],[1325,4],[1350,4],[1370,4],[1375,4]]},"1300":{"position":[[93,5]]},"1327":{"position":[[30,5]]},"1329":{"position":[[329,4],[848,4],[919,5],[1298,5],[2531,4]]},"1337":{"position":[[0,4]]},"1398":{"position":[[570,4]]},"1418":{"position":[[105,6]]},"1422":{"position":[[940,5]]},"1428":{"position":[[106,5]]},"1514":{"position":[[402,4]]},"1628":{"position":[[466,4],[864,6]]},"1630":{"position":[[1354,4]]},"1670":{"position":[[444,6]]},"1704":{"position":[[57,7],[150,6],[889,5],[919,5]]},"1708":{"position":[[62,7],[160,6]]},"1723":{"position":[[62,5],[75,5],[254,4],[611,5],[3028,6],[3057,7]]},"1732":{"position":[[591,4]]},"1737":{"position":[[427,4]]},"1744":{"position":[[245,9]]},"1758":{"position":[[461,5],[526,4]]},"1760":{"position":[[221,5],[279,6],[744,5],[938,5]]},"1766":{"position":[[79,4]]},"1774":{"position":[[40,5]]},"1776":{"position":[[36,5],[251,7]]},"1788":{"position":[[18,5]]},"1800":{"position":[[220,4],[331,5],[420,9],[476,7],[550,9]]},"1802":{"position":[[151,4],[203,5],[338,4],[445,5]]},"1838":{"position":[[311,5],[376,4]]},"1844":{"position":[[510,7],[687,7]]},"1852":{"position":[[321,5],[386,4],[791,6]]},"1858":{"position":[[258,6]]},"1882":{"position":[[51,4]]},"1898":{"position":[[255,4],[387,5]]},"1906":{"position":[[979,4]]},"1910":{"position":[[917,4],[988,5],[994,6]]}}}],["name\":\"sam",{"_index":1335,"t":{"1166":{"position":[[1004,14]]}}}],["name(\"addus",{"_index":3756,"t":{"1704":{"position":[[719,18]]}}}],["name(\"destroyus",{"_index":3758,"t":{"1704":{"position":[[829,22]]}}}],["name(\"hom",{"_index":4124,"t":{"1788":{"position":[[257,15]]}}}],["name(\"index",{"_index":1856,"t":{"1235":{"position":[[311,16]]},"1704":{"position":[[420,16]]}}}],["name(\"us",{"_index":4313,"t":{"1844":{"position":[[890,15]]}}}],["name(\"user.show",{"_index":4127,"t":{"1788":{"position":[[357,20]]}}}],["name(nam",{"_index":1831,"t":{"1231":{"position":[[80,9]]}}}],["name1",{"_index":2039,"t":{"1292":{"position":[[1118,7],[1723,7]]}}}],["name2",{"_index":1395,"t":{"1170":{"position":[[551,6]]},"1292":{"position":[[1787,7]]}}}],["namegramefiller",{"_index":1507,"t":{"1176":{"position":[[2695,9]]}}}],["p>hello",{"_index":1266,"t":{"1156":{"position":[[713,9]]},"1772":{"position":[[409,9]]}}}],["p>here",{"_index":1471,"t":{"1176":{"position":[[308,7]]}}}],["p>some",{"_index":1520,"t":{"1178":{"position":[[516,7],[1894,7]]}}}],["p>to",{"_index":1523,"t":{"1178":{"position":[[614,5],[1992,5]]}}}],["packag",{"_index":64,"t":{"737":{"position":[[0,7]]},"739":{"position":[[0,7]]},"741":{"position":[[0,7]]},"751":{"position":[[0,7]]},"761":{"position":[[0,7]]},"763":{"position":[[0,7]]},"773":{"position":[[606,7]]},"785":{"position":[[0,7]]},"795":{"position":[[0,7]]},"805":{"position":[[0,7]]},"809":{"position":[[0,7]]},"815":{"position":[[671,7]]},"827":{"position":[[242,7],[379,7]]},"847":{"position":[[22,7]]},"857":{"position":[[0,7]]},"874":{"position":[[19,8]]},"888":{"position":[[19,8]]},"902":{"position":[[19,8]]},"916":{"position":[[19,8]]},"930":{"position":[[19,8]]},"944":{"position":[[19,8]]},"958":{"position":[[19,8]]},"972":{"position":[[19,8]]},"986":{"position":[[19,8]]},"1000":{"position":[[19,8]]},"1014":{"position":[[19,8]]},"1028":{"position":[[19,8]]},"1042":{"position":[[19,8]]},"1056":{"position":[[19,8]]},"1070":{"position":[[19,8]]},"1084":{"position":[[19,8]]},"1098":{"position":[[19,8]]},"1112":{"position":[[19,8]]},"1118":{"position":[[5,7]]},"1122":{"position":[[0,7]]},"1126":{"position":[[185,7],[520,7],[876,7],[1240,7],[1351,7]]},"1132":{"position":[[256,7]]},"1136":{"position":[[251,7]]},"1140":{"position":[[333,7]]},"1142":{"position":[[461,7]]},"1148":{"position":[[291,7]]},"1152":{"position":[[312,7]]},"1154":{"position":[[0,7]]},"1156":{"position":[[0,7]]},"1158":{"position":[[42,8],[89,7],[170,7],[269,8]]},"1166":{"position":[[40,7],[556,7],[1079,7]]},"1172":{"position":[[13,7]]},"1174":{"position":[[31,7]]},"1176":{"position":[[1893,7]]},"1178":{"position":[[1743,8]]},"1182":{"position":[[308,7]]},"1186":{"position":[[321,7]]},"1190":{"position":[[268,7]]},"1194":{"position":[[287,7]]},"1202":{"position":[[81,7]]},"1213":{"position":[[1206,8]]},"1340":{"position":[[0,7]]},"1342":{"position":[[0,7]]},"1344":{"position":[[0,7]]},"1346":{"position":[[0,7]]},"1348":{"position":[[0,7]]},"1354":{"position":[[22,7]]},"1364":{"position":[[22,7]]},"1374":{"position":[[22,7]]},"1386":{"position":[[22,7]]},"1392":{"position":[[695,7]]},"1396":{"position":[[22,7]]},"1404":{"position":[[41,8]]},"1410":{"position":[[22,7]]},"1422":{"position":[[22,7]]},"1434":{"position":[[22,7]]},"1446":{"position":[[22,7]]},"1452":{"position":[[109,7]]},"1456":{"position":[[22,7]]},"1466":{"position":[[22,7]]},"1476":{"position":[[22,7]]},"1478":{"position":[[90,7]]},"1480":{"position":[[35,7]]},"1482":{"position":[[35,7]]},"1484":{"position":[[38,7]]},"1486":{"position":[[35,7]]},"1488":{"position":[[33,7]]},"1498":{"position":[[0,7]]},"1508":{"position":[[22,7]]},"1522":{"position":[[0,7]]},"1524":{"position":[[139,7]]},"1526":{"position":[[0,7]]},"1532":{"position":[[252,7]]},"1536":{"position":[[22,7]]},"1544":{"position":[[41,8]]},"1550":{"position":[[22,7]]},"1562":{"position":[[22,7]]},"1568":{"position":[[142,7]]},"1572":{"position":[[22,7]]},"1582":{"position":[[22,7]]},"1592":{"position":[[22,7]]},"1602":{"position":[[0,7]]},"1612":{"position":[[22,7]]},"1622":{"position":[[0,7]]},"1624":{"position":[[68,7]]},"1628":{"position":[[22,7]]},"1636":{"position":[[41,8]]},"1642":{"position":[[22,7]]},"1648":{"position":[[22,7]]},"1678":{"position":[[57,7]]},"1681":{"position":[[472,7]]},"1688":{"position":[[384,7]]},"1704":{"position":[[251,7]]},"1716":{"position":[[288,7]]},"1719":{"position":[[1206,8]]},"1734":{"position":[[31,7],[168,7]]},"1737":{"position":[[42,7]]},"1739":{"position":[[1206,8]]},"1800":{"position":[[65,8]]},"1898":{"position":[[72,8]]},"1910":{"position":[[0,7]]}}}],["packr",{"_index":1129,"t":{"1126":{"position":[[458,6],[789,5]]}}}],["packr.new(\"asset",{"_index":3059,"t":{"1482":{"position":[[265,17]]}}}],["page",{"_index":1659,"t":{"1202":{"position":[[355,5]]},"1562":{"position":[[462,5],[541,8]]},"1564":{"position":[[77,4]]},"1670":{"position":[[313,4]]},"1672":{"position":[[320,4]]},"1685":{"position":[[415,4],[494,5],[917,4]]},"1737":{"position":[[123,4]]},"1788":{"position":[[250,6]]},"1846":{"position":[[375,6]]}}}],["pair",{"_index":473,"t":{"809":{"position":[[309,4],[498,4]]}}}],["panic",{"_index":3427,"t":{"1588":{"position":[[48,6]]},"1592":{"position":[[296,5]]},"1681":{"position":[[335,6],[372,5],[689,5]]}}}],["panic(\"i",{"_index":288,"t":{"773":{"position":[[1556,8]]}}}],["panic(\"i'm",{"_index":3432,"t":{"1592":{"position":[[375,10]]}}}],["panic(\"thi",{"_index":3691,"t":{"1681":{"position":[[677,11]]}}}],["panic(err",{"_index":1491,"t":{"1176":{"position":[[2078,10]]},"1262":{"position":[[183,10]]},"1488":{"position":[[318,10]]},"1628":{"position":[[440,10],[661,10],[805,10]]}}}],["panick",{"_index":275,"t":{"773":{"position":[[1071,8]]},"775":{"position":[[286,8]]}}}],["paragraph:@127.0.0.1:6379/:@localhost:6379/://::a",{"_index":1319,"t":{"1166":{"position":[[373,20]]}}}],["template.html(html",{"_index":1353,"t":{"1166":{"position":[[1606,19]]}}}],["template.must(template.parsefiles(\"templatenam",{"_index":1378,"t":{"1168":{"position":[[833,50]]}}}],["template.must(template.parseglob(\"*.gohtml",{"_index":1435,"t":{"1172":{"position":[[628,45]]}}}],["template.new(\"hello.gohtml\").funcs(template.funcmap",{"_index":1351,"t":{"1166":{"position":[[1500,52]]},"1178":{"position":[[2526,52],[3674,52]]}}}],["template.parse(filenam",{"_index":1295,"t":{"1162":{"position":[[473,24]]}}}],["template.parsefiles(fil",{"_index":1478,"t":{"1176":{"position":[[1240,29]]}}}],["template.parsefiles(filenam",{"_index":1298,"t":{"1162":{"position":[[628,30]]}}}],["template.parseglob(layoutdir",{"_index":1490,"t":{"1176":{"position":[[2018,28]]}}}],["template.parseglob(pattern",{"_index":1299,"t":{"1162":{"position":[[711,27]]},"1176":{"position":[[1140,26]]}}}],["template.templ",{"_index":1377,"t":{"1168":{"position":[[808,18]]},"1176":{"position":[[1954,18]]}}}],["templatedata",{"_index":165,"t":{"751":{"position":[[625,13]]}}}],["templatenam",{"_index":1380,"t":{"1168":{"position":[[922,15]]},"1176":{"position":[[1499,16],[1620,15]]}}}],["templatesgo",{"_index":1500,"t":{"1176":{"position":[[2504,9]]}}}],["title>maintitle:@tcp(:)/Search the documentation - - + +

Search the documentation

- - + + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 4e20faa3141..cbea80d135b 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://docs.gofiber.io/searchweekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/casbin/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/fiberi18n/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/fibernewrelic/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/fibersentry/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/fiberzap/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/fiberzerolog/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/jwt/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/opafiber/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/otelfiber/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/otelfiber/example/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/paseto/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/swagger/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/websocket/weekly0.5https://docs.gofiber.io/contrib/next/weekly0.5https://docs.gofiber.io/contrib/next/casbin/weekly0.5https://docs.gofiber.io/contrib/next/fiberi18n/weekly0.5https://docs.gofiber.io/contrib/next/fibernewrelic/weekly0.5https://docs.gofiber.io/contrib/next/fibersentry/weekly0.5https://docs.gofiber.io/contrib/next/fiberzap/weekly0.5https://docs.gofiber.io/contrib/next/fiberzerolog/weekly0.5https://docs.gofiber.io/contrib/next/jwt/weekly0.5https://docs.gofiber.io/contrib/next/opafiber/weekly0.5https://docs.gofiber.io/contrib/next/otelfiber/weekly0.5https://docs.gofiber.io/contrib/next/otelfiber/example/weekly0.5https://docs.gofiber.io/contrib/next/paseto/weekly0.5https://docs.gofiber.io/contrib/next/swagger/weekly0.5https://docs.gofiber.io/contrib/next/websocket/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/casbin/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/fiberi18n/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/fibernewrelic/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/fibersentry/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/fiberzap/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/fiberzerolog/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/jwt/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/opafiber/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/otelfiber/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/otelfiber/example/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/paseto/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/swagger/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/websocket/weekly0.5https://docs.gofiber.io/next/weekly0.5https://docs.gofiber.io/next/api/appweekly0.5https://docs.gofiber.io/next/api/clientweekly0.5https://docs.gofiber.io/next/api/constantsweekly0.5https://docs.gofiber.io/next/api/ctxweekly0.5https://docs.gofiber.io/next/api/fiberweekly0.5https://docs.gofiber.io/next/api/logweekly0.5https://docs.gofiber.io/next/api/middleware/adaptorweekly0.5https://docs.gofiber.io/next/api/middleware/basicauthweekly0.5https://docs.gofiber.io/next/api/middleware/cacheweekly0.5https://docs.gofiber.io/next/api/middleware/compressweekly0.5https://docs.gofiber.io/next/api/middleware/corsweekly0.5https://docs.gofiber.io/next/api/middleware/csrfweekly0.5https://docs.gofiber.io/next/api/middleware/earlydataweekly0.5https://docs.gofiber.io/next/api/middleware/encryptcookieweekly0.5https://docs.gofiber.io/next/api/middleware/envvarweekly0.5https://docs.gofiber.io/next/api/middleware/etagweekly0.5https://docs.gofiber.io/next/api/middleware/expvarweekly0.5https://docs.gofiber.io/next/api/middleware/faviconweekly0.5https://docs.gofiber.io/next/api/middleware/filesystemweekly0.5https://docs.gofiber.io/next/api/middleware/helmetweekly0.5https://docs.gofiber.io/next/api/middleware/idempotencyweekly0.5https://docs.gofiber.io/next/api/middleware/keyauthweekly0.5https://docs.gofiber.io/next/api/middleware/limiterweekly0.5https://docs.gofiber.io/next/api/middleware/loggerweekly0.5https://docs.gofiber.io/next/api/middleware/monitorweekly0.5https://docs.gofiber.io/next/api/middleware/pprofweekly0.5https://docs.gofiber.io/next/api/middleware/proxyweekly0.5https://docs.gofiber.io/next/api/middleware/recoverweekly0.5https://docs.gofiber.io/next/api/middleware/redirectweekly0.5https://docs.gofiber.io/next/api/middleware/requestidweekly0.5https://docs.gofiber.io/next/api/middleware/rewriteweekly0.5https://docs.gofiber.io/next/api/middleware/sessionweekly0.5https://docs.gofiber.io/next/api/middleware/skipweekly0.5https://docs.gofiber.io/next/api/middleware/timeoutweekly0.5https://docs.gofiber.io/next/category/-middlewareweekly0.5https://docs.gofiber.io/next/category/apiweekly0.5https://docs.gofiber.io/next/category/extraweekly0.5https://docs.gofiber.io/next/category/guideweekly0.5https://docs.gofiber.io/next/extra/benchmarksweekly0.5https://docs.gofiber.io/next/extra/faqweekly0.5https://docs.gofiber.io/next/guide/error-handlingweekly0.5https://docs.gofiber.io/next/guide/faster-fiberweekly0.5https://docs.gofiber.io/next/guide/groupingweekly0.5https://docs.gofiber.io/next/guide/hooksweekly0.5https://docs.gofiber.io/next/guide/routingweekly0.5https://docs.gofiber.io/next/guide/templatesweekly0.5https://docs.gofiber.io/next/guide/validationweekly0.5https://docs.gofiber.io/next/partials/routing/route-handlersweekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/arangodb/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/azureblob/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/badger/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/bbolt/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/couchbase/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/dynamodb/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/etcd/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/memcache/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/memory/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/mongodb/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/mssql/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/mysql/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/pebble/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/postgres/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/redis/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/ristretto/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/s3/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/sqlite3/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/arangodb/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/azureblob/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/badger/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/bbolt/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/couchbase/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/dynamodb/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/etcd/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/memcache/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/memory/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/mongodb/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/mssql/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/mysql/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/pebble/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/postgres/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/redis/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/ristretto/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/s3/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/sqlite3/weekly0.5https://docs.gofiber.io/storage/next/weekly0.5https://docs.gofiber.io/storage/next/arangodb/weekly0.5https://docs.gofiber.io/storage/next/azureblob/weekly0.5https://docs.gofiber.io/storage/next/badger/weekly0.5https://docs.gofiber.io/storage/next/bbolt/weekly0.5https://docs.gofiber.io/storage/next/couchbase/weekly0.5https://docs.gofiber.io/storage/next/dynamodb/weekly0.5https://docs.gofiber.io/storage/next/etcd/weekly0.5https://docs.gofiber.io/storage/next/memcache/weekly0.5https://docs.gofiber.io/storage/next/memory/weekly0.5https://docs.gofiber.io/storage/next/mongodb/weekly0.5https://docs.gofiber.io/storage/next/mssql/weekly0.5https://docs.gofiber.io/storage/next/mysql/weekly0.5https://docs.gofiber.io/storage/next/pebble/weekly0.5https://docs.gofiber.io/storage/next/postgres/weekly0.5https://docs.gofiber.io/storage/next/redis/weekly0.5https://docs.gofiber.io/storage/next/ristretto/weekly0.5https://docs.gofiber.io/storage/next/s3/weekly0.5https://docs.gofiber.io/storage/next/sqlite3/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/arangodb/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/azureblob/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/badger/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/bbolt/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/couchbase/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/dynamodb/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/etcd/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/memcache/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/memory/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/mongodb/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/mssql/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/mysql/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/pebble/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/postgres/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/redis/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/ristretto/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/s3/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/sqlite3/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/arangodb/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/azureblob/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/badger/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/bbolt/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/couchbase/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/dynamodb/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/etcd/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/memcache/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/memory/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/mongodb/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/mssql/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/mysql/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/pebble/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/postgres/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/redis/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/ristretto/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/s3/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/sqlite3/weekly0.5https://docs.gofiber.io/template/next/weekly0.5https://docs.gofiber.io/template/next/ace/weekly0.5https://docs.gofiber.io/template/next/amber/weekly0.5https://docs.gofiber.io/template/next/django/weekly0.5https://docs.gofiber.io/template/next/handlebars/weekly0.5https://docs.gofiber.io/template/next/html/weekly0.5https://docs.gofiber.io/template/next/html/TEMPLATES_CHEATSHEETweekly0.5https://docs.gofiber.io/template/next/jet/weekly0.5https://docs.gofiber.io/template/next/mustache/weekly0.5https://docs.gofiber.io/template/next/pug/weekly0.5https://docs.gofiber.io/template/next/slim/weekly0.5https://docs.gofiber.io/v1.x/weekly0.5https://docs.gofiber.io/v1.x/api/appweekly0.5https://docs.gofiber.io/v1.x/api/ctxweekly0.5https://docs.gofiber.io/v1.x/api/middlewareweekly0.5https://docs.gofiber.io/v1.x/category/apiweekly0.5https://docs.gofiber.io/v1.x/category/guideweekly0.5https://docs.gofiber.io/v1.x/category/miscweekly0.5https://docs.gofiber.io/v1.x/guide/error-handlingweekly0.5https://docs.gofiber.io/v1.x/guide/groupingweekly0.5https://docs.gofiber.io/v1.x/guide/routingweekly0.5https://docs.gofiber.io/v1.x/guide/templatesweekly0.5https://docs.gofiber.io/v1.x/guide/validatingweekly0.5https://docs.gofiber.io/v1.x/misc/benchmarksweekly0.5https://docs.gofiber.io/v1.x/misc/faqweekly0.5https://docs.gofiber.io/contrib/weekly0.5https://docs.gofiber.io/contrib/casbin/weekly0.5https://docs.gofiber.io/contrib/fiberi18n/weekly0.5https://docs.gofiber.io/contrib/fibernewrelic/weekly0.5https://docs.gofiber.io/contrib/fibersentry/weekly0.5https://docs.gofiber.io/contrib/fiberzap/weekly0.5https://docs.gofiber.io/contrib/fiberzerolog/weekly0.5https://docs.gofiber.io/contrib/jwt/weekly0.5https://docs.gofiber.io/contrib/opafiber/weekly0.5https://docs.gofiber.io/contrib/otelfiber/weekly0.5https://docs.gofiber.io/contrib/otelfiber/example/weekly0.5https://docs.gofiber.io/contrib/paseto/weekly0.5https://docs.gofiber.io/contrib/swagger/weekly0.5https://docs.gofiber.io/contrib/websocket/weekly0.5https://docs.gofiber.io/storage/weekly0.5https://docs.gofiber.io/storage/arangodb/weekly0.5https://docs.gofiber.io/storage/azureblob/weekly0.5https://docs.gofiber.io/storage/badger/weekly0.5https://docs.gofiber.io/storage/bbolt/weekly0.5https://docs.gofiber.io/storage/couchbase/weekly0.5https://docs.gofiber.io/storage/dynamodb/weekly0.5https://docs.gofiber.io/storage/etcd/weekly0.5https://docs.gofiber.io/storage/memcache/weekly0.5https://docs.gofiber.io/storage/memory/weekly0.5https://docs.gofiber.io/storage/mongodb/weekly0.5https://docs.gofiber.io/storage/mssql/weekly0.5https://docs.gofiber.io/storage/mysql/weekly0.5https://docs.gofiber.io/storage/pebble/weekly0.5https://docs.gofiber.io/storage/postgres/weekly0.5https://docs.gofiber.io/storage/redis/weekly0.5https://docs.gofiber.io/storage/ristretto/weekly0.5https://docs.gofiber.io/storage/s3/weekly0.5https://docs.gofiber.io/storage/sqlite3/weekly0.5https://docs.gofiber.io/template/weekly0.5https://docs.gofiber.io/template/ace/weekly0.5https://docs.gofiber.io/template/amber/weekly0.5https://docs.gofiber.io/template/django/weekly0.5https://docs.gofiber.io/template/handlebars/weekly0.5https://docs.gofiber.io/template/html/weekly0.5https://docs.gofiber.io/template/html/TEMPLATES_CHEATSHEETweekly0.5https://docs.gofiber.io/template/jet/weekly0.5https://docs.gofiber.io/template/mustache/weekly0.5https://docs.gofiber.io/template/pug/weekly0.5https://docs.gofiber.io/template/slim/weekly0.5https://docs.gofiber.io/weekly0.5https://docs.gofiber.io/api/appweekly0.5https://docs.gofiber.io/api/clientweekly0.5https://docs.gofiber.io/api/constantsweekly0.5https://docs.gofiber.io/api/ctxweekly0.5https://docs.gofiber.io/api/fiberweekly0.5https://docs.gofiber.io/api/middleware/adaptorweekly0.5https://docs.gofiber.io/api/middleware/basicauthweekly0.5https://docs.gofiber.io/api/middleware/cacheweekly0.5https://docs.gofiber.io/api/middleware/compressweekly0.5https://docs.gofiber.io/api/middleware/corsweekly0.5https://docs.gofiber.io/api/middleware/csrfweekly0.5https://docs.gofiber.io/api/middleware/earlydataweekly0.5https://docs.gofiber.io/api/middleware/encryptcookieweekly0.5https://docs.gofiber.io/api/middleware/envvarweekly0.5https://docs.gofiber.io/api/middleware/etagweekly0.5https://docs.gofiber.io/api/middleware/expvarweekly0.5https://docs.gofiber.io/api/middleware/faviconweekly0.5https://docs.gofiber.io/api/middleware/filesystemweekly0.5https://docs.gofiber.io/api/middleware/helmetweekly0.5https://docs.gofiber.io/api/middleware/idempotencyweekly0.5https://docs.gofiber.io/api/middleware/keyauthweekly0.5https://docs.gofiber.io/api/middleware/limiterweekly0.5https://docs.gofiber.io/api/middleware/loggerweekly0.5https://docs.gofiber.io/api/middleware/monitorweekly0.5https://docs.gofiber.io/api/middleware/pprofweekly0.5https://docs.gofiber.io/api/middleware/proxyweekly0.5https://docs.gofiber.io/api/middleware/recoverweekly0.5https://docs.gofiber.io/api/middleware/redirectweekly0.5https://docs.gofiber.io/api/middleware/requestidweekly0.5https://docs.gofiber.io/api/middleware/rewriteweekly0.5https://docs.gofiber.io/api/middleware/sessionweekly0.5https://docs.gofiber.io/api/middleware/skipweekly0.5https://docs.gofiber.io/api/middleware/timeoutweekly0.5https://docs.gofiber.io/category/-middlewareweekly0.5https://docs.gofiber.io/category/apiweekly0.5https://docs.gofiber.io/category/extraweekly0.5https://docs.gofiber.io/category/guideweekly0.5https://docs.gofiber.io/extra/benchmarksweekly0.5https://docs.gofiber.io/extra/faqweekly0.5https://docs.gofiber.io/guide/error-handlingweekly0.5https://docs.gofiber.io/guide/faster-fiberweekly0.5https://docs.gofiber.io/guide/groupingweekly0.5https://docs.gofiber.io/guide/hooksweekly0.5https://docs.gofiber.io/guide/routingweekly0.5https://docs.gofiber.io/guide/templatesweekly0.5https://docs.gofiber.io/guide/validationweekly0.5https://docs.gofiber.io/partials/routing/route-handlersweekly0.5 \ No newline at end of file +https://docs.gofiber.io/searchweekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/casbin/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/fiberi18n/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/fibernewrelic/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/fibersentry/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/fiberzap/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/fiberzerolog/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/jwt/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/opafiber/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/otelfiber/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/otelfiber/example/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/paseto/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/swagger/weekly0.5https://docs.gofiber.io/contrib/fibersentry_v1.x.x/websocket/weekly0.5https://docs.gofiber.io/contrib/next/weekly0.5https://docs.gofiber.io/contrib/next/casbin/weekly0.5https://docs.gofiber.io/contrib/next/fiberi18n/weekly0.5https://docs.gofiber.io/contrib/next/fibernewrelic/weekly0.5https://docs.gofiber.io/contrib/next/fibersentry/weekly0.5https://docs.gofiber.io/contrib/next/fiberzap/weekly0.5https://docs.gofiber.io/contrib/next/fiberzerolog/weekly0.5https://docs.gofiber.io/contrib/next/jwt/weekly0.5https://docs.gofiber.io/contrib/next/opafiber/weekly0.5https://docs.gofiber.io/contrib/next/otelfiber/weekly0.5https://docs.gofiber.io/contrib/next/otelfiber/example/weekly0.5https://docs.gofiber.io/contrib/next/paseto/weekly0.5https://docs.gofiber.io/contrib/next/swagger/weekly0.5https://docs.gofiber.io/contrib/next/websocket/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/casbin/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/fiberi18n/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/fibernewrelic/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/fibersentry/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/fiberzap/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/fiberzerolog/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/jwt/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/opafiber/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/otelfiber/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/otelfiber/example/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/paseto/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/swagger/weekly0.5https://docs.gofiber.io/contrib/swagger_v1.x.x/websocket/weekly0.5https://docs.gofiber.io/next/weekly0.5https://docs.gofiber.io/next/api/appweekly0.5https://docs.gofiber.io/next/api/clientweekly0.5https://docs.gofiber.io/next/api/constantsweekly0.5https://docs.gofiber.io/next/api/ctxweekly0.5https://docs.gofiber.io/next/api/fiberweekly0.5https://docs.gofiber.io/next/api/logweekly0.5https://docs.gofiber.io/next/api/middleware/adaptorweekly0.5https://docs.gofiber.io/next/api/middleware/basicauthweekly0.5https://docs.gofiber.io/next/api/middleware/cacheweekly0.5https://docs.gofiber.io/next/api/middleware/compressweekly0.5https://docs.gofiber.io/next/api/middleware/corsweekly0.5https://docs.gofiber.io/next/api/middleware/csrfweekly0.5https://docs.gofiber.io/next/api/middleware/earlydataweekly0.5https://docs.gofiber.io/next/api/middleware/encryptcookieweekly0.5https://docs.gofiber.io/next/api/middleware/envvarweekly0.5https://docs.gofiber.io/next/api/middleware/etagweekly0.5https://docs.gofiber.io/next/api/middleware/expvarweekly0.5https://docs.gofiber.io/next/api/middleware/faviconweekly0.5https://docs.gofiber.io/next/api/middleware/filesystemweekly0.5https://docs.gofiber.io/next/api/middleware/helmetweekly0.5https://docs.gofiber.io/next/api/middleware/idempotencyweekly0.5https://docs.gofiber.io/next/api/middleware/keyauthweekly0.5https://docs.gofiber.io/next/api/middleware/limiterweekly0.5https://docs.gofiber.io/next/api/middleware/loggerweekly0.5https://docs.gofiber.io/next/api/middleware/monitorweekly0.5https://docs.gofiber.io/next/api/middleware/pprofweekly0.5https://docs.gofiber.io/next/api/middleware/proxyweekly0.5https://docs.gofiber.io/next/api/middleware/recoverweekly0.5https://docs.gofiber.io/next/api/middleware/redirectweekly0.5https://docs.gofiber.io/next/api/middleware/requestidweekly0.5https://docs.gofiber.io/next/api/middleware/rewriteweekly0.5https://docs.gofiber.io/next/api/middleware/sessionweekly0.5https://docs.gofiber.io/next/api/middleware/skipweekly0.5https://docs.gofiber.io/next/api/middleware/timeoutweekly0.5https://docs.gofiber.io/next/category/-middlewareweekly0.5https://docs.gofiber.io/next/category/apiweekly0.5https://docs.gofiber.io/next/category/extraweekly0.5https://docs.gofiber.io/next/category/guideweekly0.5https://docs.gofiber.io/next/extra/benchmarksweekly0.5https://docs.gofiber.io/next/extra/faqweekly0.5https://docs.gofiber.io/next/guide/error-handlingweekly0.5https://docs.gofiber.io/next/guide/faster-fiberweekly0.5https://docs.gofiber.io/next/guide/groupingweekly0.5https://docs.gofiber.io/next/guide/hooksweekly0.5https://docs.gofiber.io/next/guide/routingweekly0.5https://docs.gofiber.io/next/guide/templatesweekly0.5https://docs.gofiber.io/next/guide/validationweekly0.5https://docs.gofiber.io/next/partials/routing/route-handlersweekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/arangodb/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/azureblob/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/badger/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/bbolt/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/couchbase/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/dynamodb/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/etcd/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/memcache/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/memory/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/mongodb/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/mssql/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/mysql/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/pebble/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/postgres/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/redis/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/ristretto/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/s3/weekly0.5https://docs.gofiber.io/storage/etcd_v1.x.x/sqlite3/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/arangodb/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/azureblob/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/badger/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/bbolt/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/couchbase/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/dynamodb/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/etcd/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/memcache/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/memory/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/mongodb/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/mssql/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/mysql/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/pebble/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/postgres/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/redis/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/ristretto/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/s3/weekly0.5https://docs.gofiber.io/storage/memcache_v1.x.x/sqlite3/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/arangodb/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/azureblob/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/badger/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/bbolt/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/couchbase/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/dynamodb/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/etcd/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/memcache/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/memory/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/mongodb/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/mssql/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/mysql/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/pebble/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/postgres/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/redis/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/ristretto/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/s3/weekly0.5https://docs.gofiber.io/storage/mysql_v1.x.x/sqlite3/weekly0.5https://docs.gofiber.io/storage/next/weekly0.5https://docs.gofiber.io/storage/next/arangodb/weekly0.5https://docs.gofiber.io/storage/next/azureblob/weekly0.5https://docs.gofiber.io/storage/next/badger/weekly0.5https://docs.gofiber.io/storage/next/bbolt/weekly0.5https://docs.gofiber.io/storage/next/couchbase/weekly0.5https://docs.gofiber.io/storage/next/dynamodb/weekly0.5https://docs.gofiber.io/storage/next/etcd/weekly0.5https://docs.gofiber.io/storage/next/memcache/weekly0.5https://docs.gofiber.io/storage/next/memory/weekly0.5https://docs.gofiber.io/storage/next/mongodb/weekly0.5https://docs.gofiber.io/storage/next/mssql/weekly0.5https://docs.gofiber.io/storage/next/mysql/weekly0.5https://docs.gofiber.io/storage/next/pebble/weekly0.5https://docs.gofiber.io/storage/next/postgres/weekly0.5https://docs.gofiber.io/storage/next/redis/weekly0.5https://docs.gofiber.io/storage/next/ristretto/weekly0.5https://docs.gofiber.io/storage/next/s3/weekly0.5https://docs.gofiber.io/storage/next/sqlite3/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/arangodb/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/azureblob/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/badger/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/bbolt/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/couchbase/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/dynamodb/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/etcd/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/memcache/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/memory/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/mongodb/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/mssql/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/mysql/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/pebble/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/postgres/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/redis/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/ristretto/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/s3/weekly0.5https://docs.gofiber.io/storage/ristretto_v1.x.x/sqlite3/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/arangodb/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/azureblob/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/badger/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/bbolt/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/couchbase/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/dynamodb/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/etcd/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/memcache/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/memory/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/mongodb/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/mssql/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/mysql/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/pebble/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/postgres/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/redis/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/ristretto/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/s3/weekly0.5https://docs.gofiber.io/storage/sqlite3_v1.x.x/sqlite3/weekly0.5https://docs.gofiber.io/template/next/weekly0.5https://docs.gofiber.io/template/next/ace/weekly0.5https://docs.gofiber.io/template/next/amber/weekly0.5https://docs.gofiber.io/template/next/django/weekly0.5https://docs.gofiber.io/template/next/handlebars/weekly0.5https://docs.gofiber.io/template/next/html/weekly0.5https://docs.gofiber.io/template/next/html/TEMPLATES_CHEATSHEETweekly0.5https://docs.gofiber.io/template/next/jet/weekly0.5https://docs.gofiber.io/template/next/mustache/weekly0.5https://docs.gofiber.io/template/next/pug/weekly0.5https://docs.gofiber.io/template/next/slim/weekly0.5https://docs.gofiber.io/v1.x/weekly0.5https://docs.gofiber.io/v1.x/api/appweekly0.5https://docs.gofiber.io/v1.x/api/ctxweekly0.5https://docs.gofiber.io/v1.x/api/middlewareweekly0.5https://docs.gofiber.io/v1.x/category/apiweekly0.5https://docs.gofiber.io/v1.x/category/guideweekly0.5https://docs.gofiber.io/v1.x/category/miscweekly0.5https://docs.gofiber.io/v1.x/guide/error-handlingweekly0.5https://docs.gofiber.io/v1.x/guide/groupingweekly0.5https://docs.gofiber.io/v1.x/guide/routingweekly0.5https://docs.gofiber.io/v1.x/guide/templatesweekly0.5https://docs.gofiber.io/v1.x/guide/validatingweekly0.5https://docs.gofiber.io/v1.x/misc/benchmarksweekly0.5https://docs.gofiber.io/v1.x/misc/faqweekly0.5https://docs.gofiber.io/contrib/weekly0.5https://docs.gofiber.io/contrib/casbin/weekly0.5https://docs.gofiber.io/contrib/fiberi18n/weekly0.5https://docs.gofiber.io/contrib/fibernewrelic/weekly0.5https://docs.gofiber.io/contrib/fibersentry/weekly0.5https://docs.gofiber.io/contrib/fiberzap/weekly0.5https://docs.gofiber.io/contrib/fiberzerolog/weekly0.5https://docs.gofiber.io/contrib/jwt/weekly0.5https://docs.gofiber.io/contrib/opafiber/weekly0.5https://docs.gofiber.io/contrib/otelfiber/weekly0.5https://docs.gofiber.io/contrib/otelfiber/example/weekly0.5https://docs.gofiber.io/contrib/paseto/weekly0.5https://docs.gofiber.io/contrib/swagger/weekly0.5https://docs.gofiber.io/contrib/websocket/weekly0.5https://docs.gofiber.io/storage/weekly0.5https://docs.gofiber.io/storage/arangodb/weekly0.5https://docs.gofiber.io/storage/azureblob/weekly0.5https://docs.gofiber.io/storage/badger/weekly0.5https://docs.gofiber.io/storage/bbolt/weekly0.5https://docs.gofiber.io/storage/couchbase/weekly0.5https://docs.gofiber.io/storage/dynamodb/weekly0.5https://docs.gofiber.io/storage/etcd/weekly0.5https://docs.gofiber.io/storage/memcache/weekly0.5https://docs.gofiber.io/storage/memory/weekly0.5https://docs.gofiber.io/storage/mongodb/weekly0.5https://docs.gofiber.io/storage/mssql/weekly0.5https://docs.gofiber.io/storage/mysql/weekly0.5https://docs.gofiber.io/storage/pebble/weekly0.5https://docs.gofiber.io/storage/postgres/weekly0.5https://docs.gofiber.io/storage/redis/weekly0.5https://docs.gofiber.io/storage/ristretto/weekly0.5https://docs.gofiber.io/storage/s3/weekly0.5https://docs.gofiber.io/storage/sqlite3/weekly0.5https://docs.gofiber.io/template/weekly0.5https://docs.gofiber.io/template/ace/weekly0.5https://docs.gofiber.io/template/amber/weekly0.5https://docs.gofiber.io/template/django/weekly0.5https://docs.gofiber.io/template/handlebars/weekly0.5https://docs.gofiber.io/template/html/weekly0.5https://docs.gofiber.io/template/html/TEMPLATES_CHEATSHEETweekly0.5https://docs.gofiber.io/template/jet/weekly0.5https://docs.gofiber.io/template/mustache/weekly0.5https://docs.gofiber.io/template/pug/weekly0.5https://docs.gofiber.io/template/slim/weekly0.5https://docs.gofiber.io/weekly0.5https://docs.gofiber.io/api/appweekly0.5https://docs.gofiber.io/api/clientweekly0.5https://docs.gofiber.io/api/constantsweekly0.5https://docs.gofiber.io/api/ctxweekly0.5https://docs.gofiber.io/api/fiberweekly0.5https://docs.gofiber.io/api/middleware/adaptorweekly0.5https://docs.gofiber.io/api/middleware/basicauthweekly0.5https://docs.gofiber.io/api/middleware/cacheweekly0.5https://docs.gofiber.io/api/middleware/compressweekly0.5https://docs.gofiber.io/api/middleware/corsweekly0.5https://docs.gofiber.io/api/middleware/csrfweekly0.5https://docs.gofiber.io/api/middleware/earlydataweekly0.5https://docs.gofiber.io/api/middleware/encryptcookieweekly0.5https://docs.gofiber.io/api/middleware/envvarweekly0.5https://docs.gofiber.io/api/middleware/etagweekly0.5https://docs.gofiber.io/api/middleware/expvarweekly0.5https://docs.gofiber.io/api/middleware/faviconweekly0.5https://docs.gofiber.io/api/middleware/filesystemweekly0.5https://docs.gofiber.io/api/middleware/helmetweekly0.5https://docs.gofiber.io/api/middleware/idempotencyweekly0.5https://docs.gofiber.io/api/middleware/keyauthweekly0.5https://docs.gofiber.io/api/middleware/limiterweekly0.5https://docs.gofiber.io/api/middleware/loggerweekly0.5https://docs.gofiber.io/api/middleware/monitorweekly0.5https://docs.gofiber.io/api/middleware/pprofweekly0.5https://docs.gofiber.io/api/middleware/proxyweekly0.5https://docs.gofiber.io/api/middleware/recoverweekly0.5https://docs.gofiber.io/api/middleware/redirectweekly0.5https://docs.gofiber.io/api/middleware/requestidweekly0.5https://docs.gofiber.io/api/middleware/rewriteweekly0.5https://docs.gofiber.io/api/middleware/sessionweekly0.5https://docs.gofiber.io/api/middleware/skipweekly0.5https://docs.gofiber.io/api/middleware/timeoutweekly0.5https://docs.gofiber.io/category/-middlewareweekly0.5https://docs.gofiber.io/category/apiweekly0.5https://docs.gofiber.io/category/extraweekly0.5https://docs.gofiber.io/category/guideweekly0.5https://docs.gofiber.io/extra/benchmarksweekly0.5https://docs.gofiber.io/extra/faqweekly0.5https://docs.gofiber.io/guide/error-handlingweekly0.5https://docs.gofiber.io/guide/faster-fiberweekly0.5https://docs.gofiber.io/guide/groupingweekly0.5https://docs.gofiber.io/guide/hooksweekly0.5https://docs.gofiber.io/guide/routingweekly0.5https://docs.gofiber.io/guide/templatesweekly0.5https://docs.gofiber.io/guide/validationweekly0.5https://docs.gofiber.io/partials/routing/route-handlersweekly0.5 \ No newline at end of file diff --git a/storage/arangodb/index.html b/storage/arangodb/index.html index e28f6b7ddfa..e9f925a5ea1 100644 --- a/storage/arangodb/index.html +++ b/storage/arangodb/index.html @@ -1,22 +1,22 @@ - + -ArangoDB | Fiber +ArangoDB | Fiber - - + +
-
Version: memcache_v1.x.x

ArangoDB

Release +

Version: bbolt_v1.x.x

ArangoDB

Release Discord Test Security -Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/azureblob/index.html b/storage/azureblob/index.html index 77665362e6c..42eeaa66fb9 100644 --- a/storage/azureblob/index.html +++ b/storage/azureblob/index.html @@ -1,22 +1,22 @@ - + -Azure Blob | Fiber +Azure Blob | Fiber - - + +
-
Version: memcache_v1.x.x

Azure Blob

Release +

Version: bbolt_v1.x.x

Azure Blob

Release Discord Test Security -Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
- - +Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
+ + \ No newline at end of file diff --git a/storage/badger/index.html b/storage/badger/index.html index 9ab1fe2a051..13ead4045ca 100644 --- a/storage/badger/index.html +++ b/storage/badger/index.html @@ -1,22 +1,22 @@ - + -Badger | Fiber +Badger | Fiber - - + +
-
Version: memcache_v1.x.x

Badger

Release +

Version: bbolt_v1.x.x

Badger

Release Discord Test Security -Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
- - +Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
+ + \ No newline at end of file diff --git a/storage/bbolt/index.html b/storage/bbolt/index.html index 431155bfa39..bee2c5de9bd 100644 --- a/storage/bbolt/index.html +++ b/storage/bbolt/index.html @@ -1,22 +1,22 @@ - + -Bbolt | Fiber +Bbolt | Fiber - - + +
-
Version: memcache_v1.x.x

Bbolt

Release +

Version: bbolt_v1.x.x

Bbolt

Release Discord Test Security -Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
- - +Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/couchbase/index.html b/storage/couchbase/index.html index 085b347f9bb..e13a1abdbfc 100644 --- a/storage/couchbase/index.html +++ b/storage/couchbase/index.html @@ -1,22 +1,22 @@ - + -Couchbase | Fiber +Couchbase | Fiber - - + +
-
Version: memcache_v1.x.x

Couchbase

Release +

Version: bbolt_v1.x.x

Couchbase

Release Discord Test Security -Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
- - +Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/dynamodb/index.html b/storage/dynamodb/index.html index 223071635b2..9c5a714dc58 100644 --- a/storage/dynamodb/index.html +++ b/storage/dynamodb/index.html @@ -1,22 +1,22 @@ - + -DynamoDB | Fiber +DynamoDB | Fiber - - + +
-
Version: memcache_v1.x.x

DynamoDB

Release +

Version: bbolt_v1.x.x

DynamoDB

Release Discord Test Security -Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
- - +Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
+ + \ No newline at end of file diff --git a/storage/etcd/index.html b/storage/etcd/index.html index db3a18600df..645572f07c9 100644 --- a/storage/etcd/index.html +++ b/storage/etcd/index.html @@ -1,22 +1,22 @@ - + -Etcd | Fiber +Etcd | Fiber - - + +
-
Version: memcache_v1.x.x

Etcd

Release +

Version: bbolt_v1.x.x

Etcd

Release Discord Test Security -Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
- - +Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/arangodb/index.html b/storage/etcd_v1.x.x/arangodb/index.html index 2521993f543..30ec745adcd 100644 --- a/storage/etcd_v1.x.x/arangodb/index.html +++ b/storage/etcd_v1.x.x/arangodb/index.html @@ -6,17 +6,17 @@ ArangoDB | Fiber - - + +
-
Version: etcd_v1.x.x

ArangoDB

Release +

Version: etcd_v1.x.x

ArangoDB

Release Discord Test Security -Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/azureblob/index.html b/storage/etcd_v1.x.x/azureblob/index.html index 233f6800e9b..43c74f60924 100644 --- a/storage/etcd_v1.x.x/azureblob/index.html +++ b/storage/etcd_v1.x.x/azureblob/index.html @@ -6,17 +6,17 @@ Azure Blob | Fiber - - + +
-
Version: etcd_v1.x.x

Azure Blob

Release +

Version: etcd_v1.x.x

Azure Blob

Release Discord Test Security -Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
- - +Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/badger/index.html b/storage/etcd_v1.x.x/badger/index.html index 7c2dedabdce..fda1ad7d476 100644 --- a/storage/etcd_v1.x.x/badger/index.html +++ b/storage/etcd_v1.x.x/badger/index.html @@ -6,17 +6,17 @@ Badger | Fiber - - + +
-
Version: etcd_v1.x.x

Badger

Release +

Version: etcd_v1.x.x

Badger

Release Discord Test Security -Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
- - +Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/bbolt/index.html b/storage/etcd_v1.x.x/bbolt/index.html index 7cacea69c8a..9d1b1ff17fd 100644 --- a/storage/etcd_v1.x.x/bbolt/index.html +++ b/storage/etcd_v1.x.x/bbolt/index.html @@ -6,17 +6,17 @@ Bbolt | Fiber - - + +
-
Version: etcd_v1.x.x

Bbolt

Release +

Version: etcd_v1.x.x

Bbolt

Release Discord Test Security -Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
- - +Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/couchbase/index.html b/storage/etcd_v1.x.x/couchbase/index.html index 38a3ac3bc42..eba36bf6882 100644 --- a/storage/etcd_v1.x.x/couchbase/index.html +++ b/storage/etcd_v1.x.x/couchbase/index.html @@ -6,17 +6,17 @@ Couchbase | Fiber - - + +
-
Version: etcd_v1.x.x

Couchbase

Release +

Version: etcd_v1.x.x

Couchbase

Release Discord Test Security -Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
- - +Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/dynamodb/index.html b/storage/etcd_v1.x.x/dynamodb/index.html index 31ab60c25b6..2e5b13677f9 100644 --- a/storage/etcd_v1.x.x/dynamodb/index.html +++ b/storage/etcd_v1.x.x/dynamodb/index.html @@ -6,17 +6,17 @@ DynamoDB | Fiber - - + +
-
Version: etcd_v1.x.x

DynamoDB

Release +

Version: etcd_v1.x.x

DynamoDB

Release Discord Test Security -Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
- - +Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/etcd/index.html b/storage/etcd_v1.x.x/etcd/index.html index c600263e4bb..6439fa00dab 100644 --- a/storage/etcd_v1.x.x/etcd/index.html +++ b/storage/etcd_v1.x.x/etcd/index.html @@ -6,17 +6,17 @@ Etcd | Fiber - - + +
-
Version: etcd_v1.x.x

Etcd

Release +

Version: etcd_v1.x.x

Etcd

Release Discord Test Security -Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
- - +Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/index.html b/storage/etcd_v1.x.x/index.html index 44c639c3d71..73b1f3a747a 100644 --- a/storage/etcd_v1.x.x/index.html +++ b/storage/etcd_v1.x.x/index.html @@ -6,13 +6,13 @@ 👋 Welcome | Fiber - - + +
-
Version: etcd_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

- - +
Version: etcd_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/memcache/index.html b/storage/etcd_v1.x.x/memcache/index.html index 5af9918b678..b18b1c8d4f8 100644 --- a/storage/etcd_v1.x.x/memcache/index.html +++ b/storage/etcd_v1.x.x/memcache/index.html @@ -6,17 +6,17 @@ Memcache | Fiber - - + +
-
Version: etcd_v1.x.x

Memcache

Release +

Version: etcd_v1.x.x

Memcache

Release Discord Test Security -Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
- - +Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/memory/index.html b/storage/etcd_v1.x.x/memory/index.html index e2f9b7282bd..6f7a93b8a30 100644 --- a/storage/etcd_v1.x.x/memory/index.html +++ b/storage/etcd_v1.x.x/memory/index.html @@ -6,17 +6,17 @@ Memory | Fiber - - + +
-
Version: etcd_v1.x.x

Memory

Release +

Version: etcd_v1.x.x

Memory

Release Discord Test Security -Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
- - +Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/mongodb/index.html b/storage/etcd_v1.x.x/mongodb/index.html index fc331eadb2a..65a40f315b1 100644 --- a/storage/etcd_v1.x.x/mongodb/index.html +++ b/storage/etcd_v1.x.x/mongodb/index.html @@ -6,17 +6,17 @@ MongoDB | Fiber - - + +
-
Version: etcd_v1.x.x

MongoDB

Release +

Version: etcd_v1.x.x

MongoDB

Release Discord Test Security -Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
- - +Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/mssql/index.html b/storage/etcd_v1.x.x/mssql/index.html index af0fc93c0a2..129ce44ca35 100644 --- a/storage/etcd_v1.x.x/mssql/index.html +++ b/storage/etcd_v1.x.x/mssql/index.html @@ -6,17 +6,17 @@ MSSQL | Fiber - - + +
-
Version: etcd_v1.x.x

MSSQL

Release +

Version: etcd_v1.x.x

MSSQL

Release Discord Test Security -Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
- - +Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/mysql/index.html b/storage/etcd_v1.x.x/mysql/index.html index 8e516746575..ade763a1851 100644 --- a/storage/etcd_v1.x.x/mysql/index.html +++ b/storage/etcd_v1.x.x/mysql/index.html @@ -6,17 +6,17 @@ MySQL | Fiber - - + +
-
Version: etcd_v1.x.x

MySQL

Release +

Version: etcd_v1.x.x

MySQL

Release Discord Test Security -Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/pebble/index.html b/storage/etcd_v1.x.x/pebble/index.html index a29e85c5937..38efc0edaba 100644 --- a/storage/etcd_v1.x.x/pebble/index.html +++ b/storage/etcd_v1.x.x/pebble/index.html @@ -6,17 +6,17 @@ Pebble | Fiber - - + +
-
Version: etcd_v1.x.x

Pebble

Release +

Version: etcd_v1.x.x

Pebble

Release Discord Test Security -Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
- - +Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/postgres/index.html b/storage/etcd_v1.x.x/postgres/index.html index c7db1a85ee2..7ae0b0f4ba1 100644 --- a/storage/etcd_v1.x.x/postgres/index.html +++ b/storage/etcd_v1.x.x/postgres/index.html @@ -6,17 +6,17 @@ Postgres | Fiber - - + +
-
Version: etcd_v1.x.x

Postgres

Release +

Version: etcd_v1.x.x

Postgres

Release Discord Test Security -Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/redis/index.html b/storage/etcd_v1.x.x/redis/index.html index c1b84ca3ec2..4c12dea64bb 100644 --- a/storage/etcd_v1.x.x/redis/index.html +++ b/storage/etcd_v1.x.x/redis/index.html @@ -6,17 +6,17 @@ Redis | Fiber - - + +
-
Version: etcd_v1.x.x

Redis

Release +

Version: etcd_v1.x.x

Redis

Release Discord Test Security -Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
- - +Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/ristretto/index.html b/storage/etcd_v1.x.x/ristretto/index.html index 4549fe9bc7f..9f343b49b5e 100644 --- a/storage/etcd_v1.x.x/ristretto/index.html +++ b/storage/etcd_v1.x.x/ristretto/index.html @@ -6,17 +6,17 @@ Ristretto | Fiber - - + +
-
Version: etcd_v1.x.x

Ristretto

Release +

Version: etcd_v1.x.x

Ristretto

Release Discord Test Security -Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
- - +Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/s3/index.html b/storage/etcd_v1.x.x/s3/index.html index 933846cee12..8d28008ec81 100644 --- a/storage/etcd_v1.x.x/s3/index.html +++ b/storage/etcd_v1.x.x/s3/index.html @@ -6,17 +6,17 @@ S3 | Fiber - - + +
-
Version: etcd_v1.x.x

S3

Release +

Version: etcd_v1.x.x

S3

Release Discord Test Security -Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
- - +Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/etcd_v1.x.x/search-index.json b/storage/etcd_v1.x.x/search-index.json index 4ae23a18c95..86b9a2790f3 100644 --- a/storage/etcd_v1.x.x/search-index.json +++ b/storage/etcd_v1.x.x/search-index.json @@ -1 +1 @@ -[{"documents":[{"i":2827,"t":"👋 Welcome","u":"/storage/etcd_v1.x.x/","b":[]},{"i":2832,"t":"Azure Blob","u":"/storage/etcd_v1.x.x/azureblob/","b":[]},{"i":2846,"t":"ArangoDB","u":"/storage/etcd_v1.x.x/arangodb/","b":[]},{"i":2860,"t":"Bbolt","u":"/storage/etcd_v1.x.x/bbolt/","b":[]},{"i":2874,"t":"DynamoDB","u":"/storage/etcd_v1.x.x/dynamodb/","b":[]},{"i":2888,"t":"Couchbase","u":"/storage/etcd_v1.x.x/couchbase/","b":[]},{"i":2902,"t":"Etcd","u":"/storage/etcd_v1.x.x/etcd/","b":[]},{"i":2916,"t":"Memcache","u":"/storage/etcd_v1.x.x/memcache/","b":[]},{"i":2930,"t":"Memory","u":"/storage/etcd_v1.x.x/memory/","b":[]},{"i":2944,"t":"MongoDB","u":"/storage/etcd_v1.x.x/mongodb/","b":[]},{"i":2958,"t":"MSSQL","u":"/storage/etcd_v1.x.x/mssql/","b":[]},{"i":2972,"t":"MySQL","u":"/storage/etcd_v1.x.x/mysql/","b":[]},{"i":2986,"t":"Pebble","u":"/storage/etcd_v1.x.x/pebble/","b":[]},{"i":3000,"t":"Postgres","u":"/storage/etcd_v1.x.x/postgres/","b":[]},{"i":3014,"t":"Redis","u":"/storage/etcd_v1.x.x/redis/","b":[]},{"i":3028,"t":"Ristretto","u":"/storage/etcd_v1.x.x/ristretto/","b":[]},{"i":3042,"t":"S3","u":"/storage/etcd_v1.x.x/s3/","b":[]},{"i":3056,"t":"SQLite3","u":"/storage/etcd_v1.x.x/sqlite3/","b":[]},{"i":3070,"t":"Badger","u":"/storage/etcd_v1.x.x/badger/","b":[]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2827",[0,1.946,1,1.946]],["t/2832",[2,1.946,3,1.946]],["t/2846",[4,2.695]],["t/2860",[5,2.695]],["t/2874",[6,2.695]],["t/2888",[7,2.695]],["t/2902",[8,2.695]],["t/2916",[9,2.695]],["t/2930",[10,2.695]],["t/2944",[11,2.695]],["t/2958",[12,2.695]],["t/2972",[13,2.695]],["t/2986",[14,2.695]],["t/3000",[15,2.695]],["t/3014",[16,2.695]],["t/3028",[17,2.695]],["t/3042",[18,2.695]],["t/3056",[19,2.695]],["t/3070",[20,2.695]]],"invertedIndex":[["",{"_index":0,"t":{"2827":{"position":[[0,2]]}}}],["arangodb",{"_index":4,"t":{"2846":{"position":[[0,8]]}}}],["azur",{"_index":2,"t":{"2832":{"position":[[0,5]]}}}],["badger",{"_index":20,"t":{"3070":{"position":[[0,6]]}}}],["bbolt",{"_index":5,"t":{"2860":{"position":[[0,5]]}}}],["blob",{"_index":3,"t":{"2832":{"position":[[6,4]]}}}],["couchbas",{"_index":7,"t":{"2888":{"position":[[0,9]]}}}],["dynamodb",{"_index":6,"t":{"2874":{"position":[[0,8]]}}}],["etcd",{"_index":8,"t":{"2902":{"position":[[0,4]]}}}],["memcach",{"_index":9,"t":{"2916":{"position":[[0,8]]}}}],["memori",{"_index":10,"t":{"2930":{"position":[[0,6]]}}}],["mongodb",{"_index":11,"t":{"2944":{"position":[[0,7]]}}}],["mssql",{"_index":12,"t":{"2958":{"position":[[0,5]]}}}],["mysql",{"_index":13,"t":{"2972":{"position":[[0,5]]}}}],["pebbl",{"_index":14,"t":{"2986":{"position":[[0,6]]}}}],["postgr",{"_index":15,"t":{"3000":{"position":[[0,8]]}}}],["redi",{"_index":16,"t":{"3014":{"position":[[0,5]]}}}],["ristretto",{"_index":17,"t":{"3028":{"position":[[0,9]]}}}],["s3",{"_index":18,"t":{"3042":{"position":[[0,2]]}}}],["sqlite3",{"_index":19,"t":{"3056":{"position":[[0,7]]}}}],["welcom",{"_index":1,"t":{"2827":{"position":[[3,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":2828,"t":"📦 Storage","u":"/storage/etcd_v1.x.x/","h":"","p":2827},{"i":2830,"t":"📑 Storage Implementations","u":"/storage/etcd_v1.x.x/","h":"#-storage-implementations","p":2827},{"i":2834,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/azureblob/","h":"#table-of-contents","p":2832},{"i":2836,"t":"Signatures","u":"/storage/etcd_v1.x.x/azureblob/","h":"#signatures","p":2832},{"i":2838,"t":"Installation","u":"/storage/etcd_v1.x.x/azureblob/","h":"#installation","p":2832},{"i":2840,"t":"Examples","u":"/storage/etcd_v1.x.x/azureblob/","h":"#examples","p":2832},{"i":2842,"t":"Config","u":"/storage/etcd_v1.x.x/azureblob/","h":"#config","p":2832},{"i":2844,"t":"Default Config","u":"/storage/etcd_v1.x.x/azureblob/","h":"#default-config","p":2832},{"i":2848,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/arangodb/","h":"#table-of-contents","p":2846},{"i":2850,"t":"Signatures","u":"/storage/etcd_v1.x.x/arangodb/","h":"#signatures","p":2846},{"i":2852,"t":"Installation","u":"/storage/etcd_v1.x.x/arangodb/","h":"#installation","p":2846},{"i":2854,"t":"Examples","u":"/storage/etcd_v1.x.x/arangodb/","h":"#examples","p":2846},{"i":2856,"t":"Config","u":"/storage/etcd_v1.x.x/arangodb/","h":"#config","p":2846},{"i":2858,"t":"Default Config","u":"/storage/etcd_v1.x.x/arangodb/","h":"#default-config","p":2846},{"i":2862,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/bbolt/","h":"#table-of-contents","p":2860},{"i":2864,"t":"Signatures","u":"/storage/etcd_v1.x.x/bbolt/","h":"#signatures","p":2860},{"i":2866,"t":"Installation","u":"/storage/etcd_v1.x.x/bbolt/","h":"#installation","p":2860},{"i":2868,"t":"Examples","u":"/storage/etcd_v1.x.x/bbolt/","h":"#examples","p":2860},{"i":2870,"t":"Config","u":"/storage/etcd_v1.x.x/bbolt/","h":"#config","p":2860},{"i":2872,"t":"Default Config","u":"/storage/etcd_v1.x.x/bbolt/","h":"#default-config","p":2860},{"i":2876,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#table-of-contents","p":2874},{"i":2878,"t":"Signatures","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#signatures","p":2874},{"i":2880,"t":"Installation","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#installation","p":2874},{"i":2882,"t":"Examples","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#examples","p":2874},{"i":2884,"t":"Config","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#config","p":2874},{"i":2886,"t":"Default Config","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#default-config","p":2874},{"i":2890,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/couchbase/","h":"#table-of-contents","p":2888},{"i":2892,"t":"Signatures","u":"/storage/etcd_v1.x.x/couchbase/","h":"#signatures","p":2888},{"i":2894,"t":"Installation","u":"/storage/etcd_v1.x.x/couchbase/","h":"#installation","p":2888},{"i":2896,"t":"Examples","u":"/storage/etcd_v1.x.x/couchbase/","h":"#examples","p":2888},{"i":2898,"t":"Config","u":"/storage/etcd_v1.x.x/couchbase/","h":"#config","p":2888},{"i":2900,"t":"Default Config","u":"/storage/etcd_v1.x.x/couchbase/","h":"#default-config","p":2888},{"i":2904,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/etcd/","h":"#table-of-contents","p":2902},{"i":2906,"t":"Signatures","u":"/storage/etcd_v1.x.x/etcd/","h":"#signatures","p":2902},{"i":2908,"t":"Installation","u":"/storage/etcd_v1.x.x/etcd/","h":"#installation","p":2902},{"i":2910,"t":"Examples","u":"/storage/etcd_v1.x.x/etcd/","h":"#examples","p":2902},{"i":2912,"t":"Config","u":"/storage/etcd_v1.x.x/etcd/","h":"#config","p":2902},{"i":2914,"t":"Default Config","u":"/storage/etcd_v1.x.x/etcd/","h":"#default-config","p":2902},{"i":2918,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/memcache/","h":"#table-of-contents","p":2916},{"i":2920,"t":"Signatures","u":"/storage/etcd_v1.x.x/memcache/","h":"#signatures","p":2916},{"i":2922,"t":"Installation","u":"/storage/etcd_v1.x.x/memcache/","h":"#installation","p":2916},{"i":2924,"t":"Examples","u":"/storage/etcd_v1.x.x/memcache/","h":"#examples","p":2916},{"i":2926,"t":"Config","u":"/storage/etcd_v1.x.x/memcache/","h":"#config","p":2916},{"i":2928,"t":"Default Config","u":"/storage/etcd_v1.x.x/memcache/","h":"#default-config","p":2916},{"i":2932,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/memory/","h":"#table-of-contents","p":2930},{"i":2934,"t":"Signatures","u":"/storage/etcd_v1.x.x/memory/","h":"#signatures","p":2930},{"i":2936,"t":"Installation","u":"/storage/etcd_v1.x.x/memory/","h":"#installation","p":2930},{"i":2938,"t":"Examples","u":"/storage/etcd_v1.x.x/memory/","h":"#examples","p":2930},{"i":2940,"t":"Config","u":"/storage/etcd_v1.x.x/memory/","h":"#config","p":2930},{"i":2942,"t":"Default Config","u":"/storage/etcd_v1.x.x/memory/","h":"#default-config","p":2930},{"i":2946,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/mongodb/","h":"#table-of-contents","p":2944},{"i":2948,"t":"Signatures","u":"/storage/etcd_v1.x.x/mongodb/","h":"#signatures","p":2944},{"i":2950,"t":"Installation","u":"/storage/etcd_v1.x.x/mongodb/","h":"#installation","p":2944},{"i":2952,"t":"Examples","u":"/storage/etcd_v1.x.x/mongodb/","h":"#examples","p":2944},{"i":2954,"t":"Config","u":"/storage/etcd_v1.x.x/mongodb/","h":"#config","p":2944},{"i":2956,"t":"Default Config","u":"/storage/etcd_v1.x.x/mongodb/","h":"#default-config","p":2944},{"i":2960,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/mssql/","h":"#table-of-contents","p":2958},{"i":2962,"t":"Signatures","u":"/storage/etcd_v1.x.x/mssql/","h":"#signatures","p":2958},{"i":2964,"t":"Installation","u":"/storage/etcd_v1.x.x/mssql/","h":"#installation","p":2958},{"i":2966,"t":"Examples","u":"/storage/etcd_v1.x.x/mssql/","h":"#examples","p":2958},{"i":2968,"t":"Config","u":"/storage/etcd_v1.x.x/mssql/","h":"#config","p":2958},{"i":2970,"t":"Default Config","u":"/storage/etcd_v1.x.x/mssql/","h":"#default-config","p":2958},{"i":2974,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/mysql/","h":"#table-of-contents","p":2972},{"i":2976,"t":"Signatures","u":"/storage/etcd_v1.x.x/mysql/","h":"#signatures","p":2972},{"i":2978,"t":"Installation","u":"/storage/etcd_v1.x.x/mysql/","h":"#installation","p":2972},{"i":2980,"t":"Examples","u":"/storage/etcd_v1.x.x/mysql/","h":"#examples","p":2972},{"i":2982,"t":"Config","u":"/storage/etcd_v1.x.x/mysql/","h":"#config","p":2972},{"i":2984,"t":"Default Config","u":"/storage/etcd_v1.x.x/mysql/","h":"#default-config","p":2972},{"i":2988,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/pebble/","h":"#table-of-contents","p":2986},{"i":2990,"t":"Signatures","u":"/storage/etcd_v1.x.x/pebble/","h":"#signatures","p":2986},{"i":2992,"t":"Installation","u":"/storage/etcd_v1.x.x/pebble/","h":"#installation","p":2986},{"i":2994,"t":"Examples","u":"/storage/etcd_v1.x.x/pebble/","h":"#examples","p":2986},{"i":2996,"t":"Config","u":"/storage/etcd_v1.x.x/pebble/","h":"#config","p":2986},{"i":2998,"t":"Default Config","u":"/storage/etcd_v1.x.x/pebble/","h":"#default-config","p":2986},{"i":3002,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/postgres/","h":"#table-of-contents","p":3000},{"i":3004,"t":"Signatures","u":"/storage/etcd_v1.x.x/postgres/","h":"#signatures","p":3000},{"i":3006,"t":"Installation","u":"/storage/etcd_v1.x.x/postgres/","h":"#installation","p":3000},{"i":3008,"t":"Examples","u":"/storage/etcd_v1.x.x/postgres/","h":"#examples","p":3000},{"i":3010,"t":"Config","u":"/storage/etcd_v1.x.x/postgres/","h":"#config","p":3000},{"i":3012,"t":"Default Config","u":"/storage/etcd_v1.x.x/postgres/","h":"#default-config","p":3000},{"i":3016,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/redis/","h":"#table-of-contents","p":3014},{"i":3018,"t":"Signatures","u":"/storage/etcd_v1.x.x/redis/","h":"#signatures","p":3014},{"i":3020,"t":"Installation","u":"/storage/etcd_v1.x.x/redis/","h":"#installation","p":3014},{"i":3022,"t":"Examples","u":"/storage/etcd_v1.x.x/redis/","h":"#examples","p":3014},{"i":3024,"t":"Config","u":"/storage/etcd_v1.x.x/redis/","h":"#config","p":3014},{"i":3026,"t":"Default Config","u":"/storage/etcd_v1.x.x/redis/","h":"#default-config","p":3014},{"i":3030,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/ristretto/","h":"#table-of-contents","p":3028},{"i":3032,"t":"Signatures","u":"/storage/etcd_v1.x.x/ristretto/","h":"#signatures","p":3028},{"i":3034,"t":"Installation","u":"/storage/etcd_v1.x.x/ristretto/","h":"#installation","p":3028},{"i":3036,"t":"Examples","u":"/storage/etcd_v1.x.x/ristretto/","h":"#examples","p":3028},{"i":3038,"t":"Config","u":"/storage/etcd_v1.x.x/ristretto/","h":"#config","p":3028},{"i":3040,"t":"Default Config","u":"/storage/etcd_v1.x.x/ristretto/","h":"#default-config","p":3028},{"i":3044,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/s3/","h":"#table-of-contents","p":3042},{"i":3046,"t":"Signatures","u":"/storage/etcd_v1.x.x/s3/","h":"#signatures","p":3042},{"i":3048,"t":"Installation","u":"/storage/etcd_v1.x.x/s3/","h":"#installation","p":3042},{"i":3050,"t":"Examples","u":"/storage/etcd_v1.x.x/s3/","h":"#examples","p":3042},{"i":3052,"t":"Config","u":"/storage/etcd_v1.x.x/s3/","h":"#config","p":3042},{"i":3054,"t":"Default Config","u":"/storage/etcd_v1.x.x/s3/","h":"#default-config","p":3042},{"i":3058,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#table-of-contents","p":3056},{"i":3060,"t":"Signatures","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#signatures","p":3056},{"i":3062,"t":"Installation","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#installation","p":3056},{"i":3064,"t":"Examples","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#examples","p":3056},{"i":3066,"t":"Config","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#config","p":3056},{"i":3068,"t":"Default Config","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#default-config","p":3056},{"i":3072,"t":"Table of Contents","u":"/storage/etcd_v1.x.x/badger/","h":"#table-of-contents","p":3070},{"i":3074,"t":"Signatures","u":"/storage/etcd_v1.x.x/badger/","h":"#signatures","p":3070},{"i":3076,"t":"Installation","u":"/storage/etcd_v1.x.x/badger/","h":"#installation","p":3070},{"i":3078,"t":"Examples","u":"/storage/etcd_v1.x.x/badger/","h":"#examples","p":3070},{"i":3080,"t":"Config","u":"/storage/etcd_v1.x.x/badger/","h":"#config","p":3070},{"i":3082,"t":"Default Config","u":"/storage/etcd_v1.x.x/badger/","h":"#default-config","p":3070}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2828",[0,3.174,1,3.174]],["t/2830",[0,2.534,1,2.534,2,2.875]],["t/2834",[3,1.499,4,1.499]],["t/2836",[5,2.007]],["t/2838",[6,2.007]],["t/2840",[7,2.007]],["t/2842",[8,1.246]],["t/2844",[8,0.931,9,1.499]],["t/2848",[3,1.499,4,1.499]],["t/2850",[5,2.007]],["t/2852",[6,2.007]],["t/2854",[7,2.007]],["t/2856",[8,1.246]],["t/2858",[8,0.931,9,1.499]],["t/2862",[3,1.499,4,1.499]],["t/2864",[5,2.007]],["t/2866",[6,2.007]],["t/2868",[7,2.007]],["t/2870",[8,1.246]],["t/2872",[8,0.931,9,1.499]],["t/2876",[3,1.499,4,1.499]],["t/2878",[5,2.007]],["t/2880",[6,2.007]],["t/2882",[7,2.007]],["t/2884",[8,1.246]],["t/2886",[8,0.931,9,1.499]],["t/2890",[3,1.499,4,1.499]],["t/2892",[5,2.007]],["t/2894",[6,2.007]],["t/2896",[7,2.007]],["t/2898",[8,1.246]],["t/2900",[8,0.931,9,1.499]],["t/2904",[3,1.499,4,1.499]],["t/2906",[5,2.007]],["t/2908",[6,2.007]],["t/2910",[7,2.007]],["t/2912",[8,1.246]],["t/2914",[8,0.931,9,1.499]],["t/2918",[3,1.499,4,1.499]],["t/2920",[5,2.007]],["t/2922",[6,2.007]],["t/2924",[7,2.007]],["t/2926",[8,1.246]],["t/2928",[8,0.931,9,1.499]],["t/2932",[3,1.499,4,1.499]],["t/2934",[5,2.007]],["t/2936",[6,2.007]],["t/2938",[7,2.007]],["t/2940",[8,1.246]],["t/2942",[8,0.931,9,1.499]],["t/2946",[3,1.499,4,1.499]],["t/2948",[5,2.007]],["t/2950",[6,2.007]],["t/2952",[7,2.007]],["t/2954",[8,1.246]],["t/2956",[8,0.931,9,1.499]],["t/2960",[3,1.499,4,1.499]],["t/2962",[5,2.007]],["t/2964",[6,2.007]],["t/2966",[7,2.007]],["t/2968",[8,1.246]],["t/2970",[8,0.931,9,1.499]],["t/2974",[3,1.499,4,1.499]],["t/2976",[5,2.007]],["t/2978",[6,2.007]],["t/2980",[7,2.007]],["t/2982",[8,1.246]],["t/2984",[8,0.931,9,1.499]],["t/2988",[3,1.499,4,1.499]],["t/2990",[5,2.007]],["t/2992",[6,2.007]],["t/2994",[7,2.007]],["t/2996",[8,1.246]],["t/2998",[8,0.931,9,1.499]],["t/3002",[3,1.499,4,1.499]],["t/3004",[5,2.007]],["t/3006",[6,2.007]],["t/3008",[7,2.007]],["t/3010",[8,1.246]],["t/3012",[8,0.931,9,1.499]],["t/3016",[3,1.499,4,1.499]],["t/3018",[5,2.007]],["t/3020",[6,2.007]],["t/3022",[7,2.007]],["t/3024",[8,1.246]],["t/3026",[8,0.931,9,1.499]],["t/3030",[3,1.499,4,1.499]],["t/3032",[5,2.007]],["t/3034",[6,2.007]],["t/3036",[7,2.007]],["t/3038",[8,1.246]],["t/3040",[8,0.931,9,1.499]],["t/3044",[3,1.499,4,1.499]],["t/3046",[5,2.007]],["t/3048",[6,2.007]],["t/3050",[7,2.007]],["t/3052",[8,1.246]],["t/3054",[8,0.931,9,1.499]],["t/3058",[3,1.499,4,1.499]],["t/3060",[5,2.007]],["t/3062",[6,2.007]],["t/3064",[7,2.007]],["t/3066",[8,1.246]],["t/3068",[8,0.931,9,1.499]],["t/3072",[3,1.499,4,1.499]],["t/3074",[5,2.007]],["t/3076",[6,2.007]],["t/3078",[7,2.007]],["t/3080",[8,1.246]],["t/3082",[8,0.931,9,1.499]]],"invertedIndex":[["",{"_index":0,"t":{"2828":{"position":[[0,2]]},"2830":{"position":[[0,2]]}}}],["config",{"_index":8,"t":{"2842":{"position":[[0,6]]},"2844":{"position":[[8,6]]},"2856":{"position":[[0,6]]},"2858":{"position":[[8,6]]},"2870":{"position":[[0,6]]},"2872":{"position":[[8,6]]},"2884":{"position":[[0,6]]},"2886":{"position":[[8,6]]},"2898":{"position":[[0,6]]},"2900":{"position":[[8,6]]},"2912":{"position":[[0,6]]},"2914":{"position":[[8,6]]},"2926":{"position":[[0,6]]},"2928":{"position":[[8,6]]},"2940":{"position":[[0,6]]},"2942":{"position":[[8,6]]},"2954":{"position":[[0,6]]},"2956":{"position":[[8,6]]},"2968":{"position":[[0,6]]},"2970":{"position":[[8,6]]},"2982":{"position":[[0,6]]},"2984":{"position":[[8,6]]},"2996":{"position":[[0,6]]},"2998":{"position":[[8,6]]},"3010":{"position":[[0,6]]},"3012":{"position":[[8,6]]},"3024":{"position":[[0,6]]},"3026":{"position":[[8,6]]},"3038":{"position":[[0,6]]},"3040":{"position":[[8,6]]},"3052":{"position":[[0,6]]},"3054":{"position":[[8,6]]},"3066":{"position":[[0,6]]},"3068":{"position":[[8,6]]},"3080":{"position":[[0,6]]},"3082":{"position":[[8,6]]}}}],["content",{"_index":4,"t":{"2834":{"position":[[9,8]]},"2848":{"position":[[9,8]]},"2862":{"position":[[9,8]]},"2876":{"position":[[9,8]]},"2890":{"position":[[9,8]]},"2904":{"position":[[9,8]]},"2918":{"position":[[9,8]]},"2932":{"position":[[9,8]]},"2946":{"position":[[9,8]]},"2960":{"position":[[9,8]]},"2974":{"position":[[9,8]]},"2988":{"position":[[9,8]]},"3002":{"position":[[9,8]]},"3016":{"position":[[9,8]]},"3030":{"position":[[9,8]]},"3044":{"position":[[9,8]]},"3058":{"position":[[9,8]]},"3072":{"position":[[9,8]]}}}],["default",{"_index":9,"t":{"2844":{"position":[[0,7]]},"2858":{"position":[[0,7]]},"2872":{"position":[[0,7]]},"2886":{"position":[[0,7]]},"2900":{"position":[[0,7]]},"2914":{"position":[[0,7]]},"2928":{"position":[[0,7]]},"2942":{"position":[[0,7]]},"2956":{"position":[[0,7]]},"2970":{"position":[[0,7]]},"2984":{"position":[[0,7]]},"2998":{"position":[[0,7]]},"3012":{"position":[[0,7]]},"3026":{"position":[[0,7]]},"3040":{"position":[[0,7]]},"3054":{"position":[[0,7]]},"3068":{"position":[[0,7]]},"3082":{"position":[[0,7]]}}}],["exampl",{"_index":7,"t":{"2840":{"position":[[0,8]]},"2854":{"position":[[0,8]]},"2868":{"position":[[0,8]]},"2882":{"position":[[0,8]]},"2896":{"position":[[0,8]]},"2910":{"position":[[0,8]]},"2924":{"position":[[0,8]]},"2938":{"position":[[0,8]]},"2952":{"position":[[0,8]]},"2966":{"position":[[0,8]]},"2980":{"position":[[0,8]]},"2994":{"position":[[0,8]]},"3008":{"position":[[0,8]]},"3022":{"position":[[0,8]]},"3036":{"position":[[0,8]]},"3050":{"position":[[0,8]]},"3064":{"position":[[0,8]]},"3078":{"position":[[0,8]]}}}],["implement",{"_index":2,"t":{"2830":{"position":[[11,15]]}}}],["instal",{"_index":6,"t":{"2838":{"position":[[0,12]]},"2852":{"position":[[0,12]]},"2866":{"position":[[0,12]]},"2880":{"position":[[0,12]]},"2894":{"position":[[0,12]]},"2908":{"position":[[0,12]]},"2922":{"position":[[0,12]]},"2936":{"position":[[0,12]]},"2950":{"position":[[0,12]]},"2964":{"position":[[0,12]]},"2978":{"position":[[0,12]]},"2992":{"position":[[0,12]]},"3006":{"position":[[0,12]]},"3020":{"position":[[0,12]]},"3034":{"position":[[0,12]]},"3048":{"position":[[0,12]]},"3062":{"position":[[0,12]]},"3076":{"position":[[0,12]]}}}],["signatur",{"_index":5,"t":{"2836":{"position":[[0,10]]},"2850":{"position":[[0,10]]},"2864":{"position":[[0,10]]},"2878":{"position":[[0,10]]},"2892":{"position":[[0,10]]},"2906":{"position":[[0,10]]},"2920":{"position":[[0,10]]},"2934":{"position":[[0,10]]},"2948":{"position":[[0,10]]},"2962":{"position":[[0,10]]},"2976":{"position":[[0,10]]},"2990":{"position":[[0,10]]},"3004":{"position":[[0,10]]},"3018":{"position":[[0,10]]},"3032":{"position":[[0,10]]},"3046":{"position":[[0,10]]},"3060":{"position":[[0,10]]},"3074":{"position":[[0,10]]}}}],["storag",{"_index":1,"t":{"2828":{"position":[[3,7]]},"2830":{"position":[[3,7]]}}}],["tabl",{"_index":3,"t":{"2834":{"position":[[0,5]]},"2848":{"position":[[0,5]]},"2862":{"position":[[0,5]]},"2876":{"position":[[0,5]]},"2890":{"position":[[0,5]]},"2904":{"position":[[0,5]]},"2918":{"position":[[0,5]]},"2932":{"position":[[0,5]]},"2946":{"position":[[0,5]]},"2960":{"position":[[0,5]]},"2974":{"position":[[0,5]]},"2988":{"position":[[0,5]]},"3002":{"position":[[0,5]]},"3016":{"position":[[0,5]]},"3030":{"position":[[0,5]]},"3044":{"position":[[0,5]]},"3058":{"position":[[0,5]]},"3072":{"position":[[0,5]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":2829,"t":"Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares. // Storage interface for communicating with different database/key-value // providers. Visit https://github.com/gofiber/storage for more info. type Storage interface { // Get gets the value for the given key. // `nil, nil` is returned when the key does not exist Get(key string) ([]byte, error) // Set stores the given value for the given key along // with an expiration value, 0 means no expiration. // Empty key or value will be ignored without an error. Set(key string, val []byte, exp time.Duration) error // Delete deletes the value for the given key. // It returns no error if the storage does not contain the key, Delete(key string) error // Reset resets the storage and delete all keys. Reset() error // Close closes the storage and will stop any running garbage // collectors and open connections. Close() error }","s":"📦 Storage","u":"/storage/etcd_v1.x.x/","h":"","p":2827},{"i":2831,"t":"ArangoDB AzureBlob Badger Bbolt Couchbase DynamoDB Etcd Memcache Memory MongoDB MSSQL MySQL Pebble Postgres Redis S3 SQLite3","s":"📑 Storage Implementations","u":"/storage/etcd_v1.x.x/","h":"#-storage-implementations","p":2827},{"i":2833,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/etcd_v1.x.x/azureblob/","h":"","p":2832},{"i":2835,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/azureblob/","h":"#table-of-contents","p":2832},{"i":2837,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/azureblob/","h":"#signatures","p":2832},{"i":2839,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/etcd_v1.x.x/azureblob/","h":"#installation","p":2832},{"i":2841,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/etcd_v1.x.x/azureblob/","h":"#examples","p":2832},{"i":2843,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/etcd_v1.x.x/azureblob/","h":"#config","p":2832},{"i":2845,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/etcd_v1.x.x/azureblob/","h":"#default-config","p":2832},{"i":2847,"t":"A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.","s":"ArangoDB","u":"/storage/etcd_v1.x.x/arangodb/","h":"","p":2846},{"i":2849,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/arangodb/","h":"#table-of-contents","p":2846},{"i":2851,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() driver.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/arangodb/","h":"#signatures","p":2846},{"i":2853,"t":"ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/etcd_v1.x.x/arangodb/","h":"#installation","p":2846},{"i":2855,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/arangodb/","h":"#examples","p":2846},{"i":2857,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/arangodb/","h":"#config","p":2846},{"i":2859,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/arangodb/","h":"#default-config","p":2846},{"i":2861,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/etcd_v1.x.x/bbolt/","h":"","p":2860},{"i":2863,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/bbolt/","h":"#table-of-contents","p":2860},{"i":2865,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/bbolt/","h":"#signatures","p":2860},{"i":2867,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/etcd_v1.x.x/bbolt/","h":"#installation","p":2860},{"i":2869,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/etcd_v1.x.x/bbolt/","h":"#examples","p":2860},{"i":2871,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/etcd_v1.x.x/bbolt/","h":"#config","p":2860},{"i":2873,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/etcd_v1.x.x/bbolt/","h":"#default-config","p":2860},{"i":2875,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/etcd_v1.x.x/dynamodb/","h":"","p":2874},{"i":2877,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#table-of-contents","p":2874},{"i":2879,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#signatures","p":2874},{"i":2881,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#installation","p":2874},{"i":2883,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#examples","p":2874},{"i":2885,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#config","p":2874},{"i":2887,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#default-config","p":2874},{"i":2889,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/etcd_v1.x.x/couchbase/","h":"","p":2888},{"i":2891,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/couchbase/","h":"#table-of-contents","p":2888},{"i":2893,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/etcd_v1.x.x/couchbase/","h":"#signatures","p":2888},{"i":2895,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/etcd_v1.x.x/couchbase/","h":"#installation","p":2888},{"i":2897,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/couchbase/","h":"#examples","p":2888},{"i":2899,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/couchbase/","h":"#config","p":2888},{"i":2901,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/couchbase/","h":"#default-config","p":2888},{"i":2903,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/etcd_v1.x.x/etcd/","h":"","p":2902},{"i":2905,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/etcd/","h":"#table-of-contents","p":2902},{"i":2907,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/etcd/","h":"#signatures","p":2902},{"i":2909,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/etcd_v1.x.x/etcd/","h":"#installation","p":2902},{"i":2911,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/etcd_v1.x.x/etcd/","h":"#examples","p":2902},{"i":2913,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/etcd_v1.x.x/etcd/","h":"#config","p":2902},{"i":2915,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/etcd_v1.x.x/etcd/","h":"#default-config","p":2902},{"i":2917,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/etcd_v1.x.x/memcache/","h":"","p":2916},{"i":2919,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/memcache/","h":"#table-of-contents","p":2916},{"i":2921,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/memcache/","h":"#signatures","p":2916},{"i":2923,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/etcd_v1.x.x/memcache/","h":"#installation","p":2916},{"i":2925,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/etcd_v1.x.x/memcache/","h":"#examples","p":2916},{"i":2927,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/etcd_v1.x.x/memcache/","h":"#config","p":2916},{"i":2929,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/etcd_v1.x.x/memcache/","h":"#default-config","p":2916},{"i":2931,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/etcd_v1.x.x/memory/","h":"","p":2930},{"i":2933,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/memory/","h":"#table-of-contents","p":2930},{"i":2935,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/etcd_v1.x.x/memory/","h":"#signatures","p":2930},{"i":2937,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/etcd_v1.x.x/memory/","h":"#installation","p":2930},{"i":2939,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/memory/","h":"#examples","p":2930},{"i":2941,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/memory/","h":"#config","p":2930},{"i":2943,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/memory/","h":"#default-config","p":2930},{"i":2945,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/etcd_v1.x.x/mongodb/","h":"","p":2944},{"i":2947,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/mongodb/","h":"#table-of-contents","p":2944},{"i":2949,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/etcd_v1.x.x/mongodb/","h":"#signatures","p":2944},{"i":2951,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/etcd_v1.x.x/mongodb/","h":"#installation","p":2944},{"i":2953,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/etcd_v1.x.x/mongodb/","h":"#examples","p":2944},{"i":2955,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/etcd_v1.x.x/mongodb/","h":"#config","p":2944},{"i":2957,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/etcd_v1.x.x/mongodb/","h":"#default-config","p":2944},{"i":2959,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/etcd_v1.x.x/mssql/","h":"","p":2958},{"i":2961,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/mssql/","h":"#table-of-contents","p":2958},{"i":2963,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/mssql/","h":"#signatures","p":2958},{"i":2965,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/etcd_v1.x.x/mssql/","h":"#installation","p":2958},{"i":2967,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/mssql/","h":"#examples","p":2958},{"i":2969,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/etcd_v1.x.x/mssql/","h":"#config","p":2958},{"i":2971,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/etcd_v1.x.x/mssql/","h":"#default-config","p":2958},{"i":2973,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/etcd_v1.x.x/mysql/","h":"","p":2972},{"i":2975,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/mysql/","h":"#table-of-contents","p":2972},{"i":2977,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/mysql/","h":"#signatures","p":2972},{"i":2979,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/etcd_v1.x.x/mysql/","h":"#installation","p":2972},{"i":2981,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/mysql/","h":"#examples","p":2972},{"i":2983,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/mysql/","h":"#config","p":2972},{"i":2985,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/mysql/","h":"#default-config","p":2972},{"i":2987,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/etcd_v1.x.x/pebble/","h":"","p":2986},{"i":2989,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/pebble/","h":"#table-of-contents","p":2986},{"i":2991,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/pebble/","h":"#signatures","p":2986},{"i":2993,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/etcd_v1.x.x/pebble/","h":"#installation","p":2986},{"i":2995,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/etcd_v1.x.x/pebble/","h":"#examples","p":2986},{"i":2997,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/etcd_v1.x.x/pebble/","h":"#config","p":2986},{"i":2999,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/etcd_v1.x.x/pebble/","h":"#default-config","p":2986},{"i":3001,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/etcd_v1.x.x/postgres/","h":"","p":3000},{"i":3003,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/postgres/","h":"#table-of-contents","p":3000},{"i":3005,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/etcd_v1.x.x/postgres/","h":"#signatures","p":3000},{"i":3007,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/etcd_v1.x.x/postgres/","h":"#installation","p":3000},{"i":3009,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/postgres/","h":"#examples","p":3000},{"i":3011,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/postgres/","h":"#config","p":3000},{"i":3013,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/postgres/","h":"#default-config","p":3000},{"i":3015,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/etcd_v1.x.x/redis/","h":"","p":3014},{"i":3017,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/redis/","h":"#table-of-contents","p":3014},{"i":3019,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/etcd_v1.x.x/redis/","h":"#signatures","p":3014},{"i":3021,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/etcd_v1.x.x/redis/","h":"#installation","p":3014},{"i":3023,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/etcd_v1.x.x/redis/","h":"#examples","p":3014},{"i":3025,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/etcd_v1.x.x/redis/","h":"#config","p":3014},{"i":3027,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/etcd_v1.x.x/redis/","h":"#default-config","p":3014},{"i":3029,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/etcd_v1.x.x/ristretto/","h":"","p":3028},{"i":3031,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/ristretto/","h":"#table-of-contents","p":3028},{"i":3033,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/etcd_v1.x.x/ristretto/","h":"#signatures","p":3028},{"i":3035,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/etcd_v1.x.x/ristretto/","h":"#installation","p":3028},{"i":3037,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/etcd_v1.x.x/ristretto/","h":"#examples","p":3028},{"i":3039,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/etcd_v1.x.x/ristretto/","h":"#config","p":3028},{"i":3041,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/etcd_v1.x.x/ristretto/","h":"#default-config","p":3028},{"i":3043,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/etcd_v1.x.x/s3/","h":"","p":3042},{"i":3045,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/s3/","h":"#table-of-contents","p":3042},{"i":3047,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/s3/","h":"#signatures","p":3042},{"i":3049,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/etcd_v1.x.x/s3/","h":"#installation","p":3042},{"i":3051,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/etcd_v1.x.x/s3/","h":"#examples","p":3042},{"i":3053,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/etcd_v1.x.x/s3/","h":"#config","p":3042},{"i":3055,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/etcd_v1.x.x/s3/","h":"#default-config","p":3042},{"i":3057,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/etcd_v1.x.x/sqlite3/","h":"","p":3056},{"i":3059,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#table-of-contents","p":3056},{"i":3061,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#signatures","p":3056},{"i":3063,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#installation","p":3056},{"i":3065,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#examples","p":3056},{"i":3067,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#config","p":3056},{"i":3069,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#default-config","p":3056},{"i":3071,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/etcd_v1.x.x/badger/","h":"","p":3070},{"i":3073,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/badger/","h":"#table-of-contents","p":3070},{"i":3075,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/badger/","h":"#signatures","p":3070},{"i":3077,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/etcd_v1.x.x/badger/","h":"#installation","p":3070},{"i":3079,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/badger/","h":"#examples","p":3070},{"i":3081,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/etcd_v1.x.x/badger/","h":"#config","p":3070},{"i":3083,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/etcd_v1.x.x/badger/","h":"#default-config","p":3070}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2829",[0,2.408,1,1.183,2,1.08,3,1.021,4,4.843,5,2.408,6,0.588,7,2.408,8,1.112,9,2.408,10,1.49,11,2.408,12,2.408,13,2.408,14,3.958,15,2.131,16,2.408,17,2.408,18,2.408,19,2.408,20,1.021,21,2.408,22,4.489,23,2.813,24,2.177,25,3.13,26,1.145,27,1.021,28,1.287,29,1.64,30,2.813,31,1.705,32,0.994,33,2.408,34,2.36,35,1.41,36,2.408,37,2.408,38,2.408,39,2.408,40,1.021,41,1.021,42,1.021,43,0.762,44,2.957,45,1.705,46,1.021,47,0.937,48,2.054,49,2.408,50,2.131,51,2.408,52,2.408,53,1.95,54,1.262]],["t/2831",[55,4.571,56,5.645,57,4.571,58,4.252,59,3.998,60,3.998,61,4.252,62,4.997,63,3.998,64,4.571,65,4.571,66,3.998,67,4.997,68,4.252,69,3.998,70,3.998,71,4.571]],["t/2833",[1,1.268,72,5.15,73,5.15,74,5.817,75,5.15,76,5.817,77,5.817,78,4.382,79,2.117,80,5.817,81,5.817,82,4.12,83,5.817,84,5.817]],["t/2835",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2837",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,94,4.122]],["t/2839",[1,0.854,2,2.206,3,2.086,72,5.798,73,5.798,79,2.68,86,1.394,95,2.031,96,2.031,97,2.144,98,2.144,99,2.086,100,2.144,101,2.086,102,2.086,103,1.394,104,2.086,105,2.144,106,2.144,107,2.144,108,2.144,109,2.144,110,4.354]],["t/2841",[1,1.056,6,1.076,10,1.509,23,1.82,32,2.511,45,3.122,88,0.469,89,0.853,95,2.874,103,1.723,110,3.902,111,2.651,112,1.922,113,1.922,114,1.977,115,1.869,116,4.407,117,1.922,118,4.407,119,4.924,120,3.561,121,4.407]],["t/2843",[1,0.782,10,1.555,20,1.24,23,2.268,26,2.142,28,1.459,35,1.712,43,0.925,45,3.891,47,0.871,88,0.225,89,1.289,119,3.647,120,3.614,122,1.275,123,2.142,124,2.637,125,3.077,126,2.923,127,3.647,128,2.876,129,2.202,130,1.481,131,0.847,132,1.481,133,1.867,134,3.647,135,3.647,136,2.367,137,2.367,138,1.867,139,1.867,140,1.587,141,2.367,142,2.367,143,2.367,144,2.367,145,1.785,146,1.961,147,1.646]],["t/2845",[10,1.583,35,3.306,45,3.998,47,1.092,88,0.435,119,4.571,124,3.306,129,4.252,131,1.635,145,3.447,146,3.786,148,2.461,149,2.461]],["t/2847",[1,1.131,2,3.761,6,1.589,55,5.272,150,7.823]],["t/2849",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2851",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,151,4.122]],["t/2853",[3,2.17,55,4.143,66,3.623,79,2.733,86,1.45,95,2.112,96,2.112,97,2.23,98,2.23,99,2.17,100,2.23,101,2.17,102,2.17,103,1.45,104,2.17,105,2.23,106,2.23,107,2.23,108,2.23,109,2.23,152,5.116,153,4.529]],["t/2855",[1,1.032,6,1.04,8,1.967,10,1.493,32,2.452,47,0.824,88,0.458,89,0.824,103,1.683,111,2.589,112,1.857,113,1.857,114,1.91,115,1.807,117,1.857,131,1.234,153,3.771,154,4.26,155,4.26,156,1.759,157,3.45,158,1.91,159,3.45,160,1.444,161,2.721,162,1.628,163,1.714,164,1.589,165,1.514]],["t/2857",[8,1.194,10,1.657,20,1.097,23,1.69,26,1.947,28,1.672,34,1.58,43,0.819,44,1.58,47,0.792,88,0.199,89,1.406,122,1.128,123,2.416,125,3.355,130,1.311,131,0.749,132,1.311,140,1.404,147,1.457,156,2.097,157,2.095,158,1.836,159,2.095,160,1.388,161,3.244,162,0.989,163,1.041,164,0.965,165,0.919,166,2.074,167,1.735,168,2.305,169,2.074,170,2.074,171,1.58]],["t/2859",[6,1.283,8,2.427,10,1.41,47,1.017,88,0.405,125,2.427,131,1.523,148,2.292,149,2.292,156,2.171,157,4.256,158,2.357,159,4.256,160,1.782,161,3.357,162,2.009,163,2.114,164,1.96,165,1.868,172,3.96]],["t/2861",[1,0.803,2,2.072,6,1.128,15,4.091,32,1.908,58,3.481,61,3.481,66,3.273,68,3.481,79,1.682,82,3.273,160,2.129,168,2.602,173,4.621,174,4.621,175,4.621,176,4.621,177,4.621,178,4.621,179,4.621,180,4.621,181,7.134,182,4.621,183,4.621,184,3.742,185,4.621,186,3.742,187,4.621,188,4.621]],["t/2863",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2865",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,189,4.122]],["t/2867",[3,2.199,58,3.906,70,3.673,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,190,4.59]],["t/2869",[1,1.1,6,1.141,10,1.49,32,2.615,47,0.905,88,0.488,89,0.905,103,1.795,111,2.761,112,2.039,113,2.039,114,2.098,115,1.984,117,2.039,131,1.355,160,1.585,190,4.141,191,4.677,192,4.677,193,4.677,194,3.566]],["t/2871",[1,0.516,10,1.629,20,1.259,23,1.226,26,2.168,28,1.211,43,0.94,47,0.881,53,2.404,58,2.237,88,0.428,89,1.298,122,1.294,123,1.412,125,3.098,128,2.911,130,1.504,131,1.32,132,2.309,140,1.611,160,1.88,162,1.135,165,1.055,194,3.123,195,2.103,196,2.237,197,2.628,198,2.628,199,2.969,200,2.969,201,2.628,202,2.969,203,2.628,204,2.969,205,2.969,206,2.628,207,2.628,208,2.404,209,2.628]],["t/2873",[10,1.501,47,1.031,88,0.532,89,1.031,128,3.404,131,2,148,2.324,149,3.01,160,1.807,162,2.037,165,1.894,194,3.001,197,4.718,206,4.718,209,4.718]],["t/2875",[1,0.803,2,2.072,6,1.741,10,0.856,22,5.085,60,3.273,78,3.481,79,1.682,88,0.55,120,4.688,172,4.731,210,4.091,211,4.091,212,4.091,213,3.742,214,3.742,215,4.091,216,4.091,217,3.742,218,4.091,219,4.091,220,4.091]],["t/2877",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2879",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,221,4.122]],["t/2881",[3,2.199,60,4.804,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,222,4.59]],["t/2883",[1,1.244,6,1.378,10,1.458,32,2.331,60,3.998,103,1.6,111,3.123,112,2.461,113,2.461,114,2.531,115,2.394,222,4.997,223,5.645]],["t/2885",[6,0.491,10,1.55,14,2.039,20,0.854,23,1.13,25,1.63,26,2.036,28,1.022,30,0.831,31,1.425,45,1.425,47,0.389,50,0.993,60,3.528,82,1.425,87,0.831,88,0.155,89,1.069,95,0.463,96,0.463,101,0.476,102,0.476,115,1.974,117,0.489,120,2.252,122,0.877,123,0.533,124,1.179,125,2.433,127,0.908,128,0.716,130,0.568,131,0.583,132,1.02,133,0.716,134,1.63,135,1.63,136,0.908,137,0.908,138,0.716,139,0.716,140,0.609,141,0.908,142,0.908,143,0.908,144,0.908,145,0.685,146,0.752,147,0.631,162,0.429,171,0.685,186,0.908,194,0.631,201,0.993,207,1.782,213,1.63,214,1.63,224,1.516,225,2.012,226,1.121,227,1.121,228,1.121,229,1.121,230,1.121,231,1.121,232,1.121,233,2.83,234,1.121,235,1.121,236,1.121,237,1.121,238,2.738,239,2.012,240,1.121,241,1.121,242,3.846,243,1.121,244,2.424,245,3.339,246,3.846,247,1.782,248,2.012,249,2.012,250,2.012,251,2.012,252,2.012,253,2.012,254,2.012,255,2.012,256,2.012,257,3.339,258,3.339,259,2.012,260,2.012,261,2.012,262,2.012,263,2.012,264,2.012,265,2.012,266,1.782,267,0.993,268,2.424,269,1.782,270,1.121,271,1.121,272,2.012,273,1.782,274,1.121,275,0.845,276,1.121,277,1.121,278,1.121,279,1.121,280,0.993,281,1.121,282,1.121,283,1.121,284,0.993,285,0.993]],["t/2887",[10,1.303,47,1.061,88,0.423,120,4.118,131,1.588,145,3.348,146,3.678,148,2.39,149,2.39,162,2.096,233,2.459,244,4.854,247,6.225,267,4.854,268,4.854,286,5.483]],["t/2889",[1,1.192,2,3.077,6,1.674,59,4.86,287,6.861]],["t/2891",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2893",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,288,4.122]],["t/2895",[3,2.199,59,4.804,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,289,4.59]],["t/2897",[1,1.174,6,1.017,10,1.522,32,2.415,35,2.44,59,2.952,88,0.451,89,0.806,103,1.657,111,2.549,112,1.817,113,1.817,114,1.869,115,1.768,117,1.817,145,2.544,156,1.721,165,2.078,169,2.112,170,2.112,194,2.347,289,3.689,290,4.167,291,4.167,292,3.689,293,3.374,294,3.374,295,2.661]],["t/2899",[10,1.52,20,1.626,28,1.985,43,1.744,54,3.916,59,5.293,88,0.296,122,1.671,123,1.823,128,3.519,156,1.583,169,2.792,170,2.792,194,3.103,293,3.104,294,3.104,296,5.51,297,6.616,298,3.833,299,3.393]],["t/2901",[10,1.529,88,0.514,89,0.976,145,3.082,148,2.201,149,2.905,156,2.085,162,1.93,165,2.368,169,2.558,170,2.558,194,2.843,292,4.469,293,4.088,294,4.088,295,3.224,300,5.048,301,5.048]],["t/2903",[1,1.171,2,3.023,6,1.645,61,6.017,302,6.74]],["t/2905",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2907",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,303,4.122]],["t/2909",[3,2.199,61,5.109,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,304,4.59]],["t/2911",[1,1.138,6,1.2,10,1.515,32,2.704,88,0.505,89,0.951,103,1.856,111,2.855,112,2.144,113,2.144,114,2.206,115,2.086,117,2.144,124,2.88,304,4.354,305,4.918,306,4.918,307,4.354]],["t/2913",[10,1.532,20,1.807,28,1.816,43,1.348,54,2.232,88,0.328,120,2.495,122,1.857,124,3.478,128,2.721,169,3.464,170,3.464,275,3.209,308,3.45,309,3.017,310,5.257,311,4.26,312,4.26,313,4.206,314,4.474,315,4.26,316,4.26,317,3.45]],["t/2915",[10,1.583,24,3.179,88,0.435,96,2.331,124,3.306,148,2.461,149,2.461,165,2.006,169,2.86,170,2.86,307,4.997,310,4.997,314,4.252]],["t/2917",[1,1.192,2,3.077,6,1.674,62,6.074,318,6.861]],["t/2919",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2921",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,319,4.122]],["t/2923",[3,2.199,63,4.804,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,320,4.199]],["t/2925",[1,1.138,6,1.2,10,1.515,32,2.704,88,0.505,89,0.951,103,1.856,111,2.855,112,2.144,113,2.144,114,2.206,115,2.086,117,2.144,168,2.77,321,4.918,322,4.918,323,4.918,324,4.918]],["t/2927",[10,1.622,20,1.891,23,1.841,26,2.916,28,1.185,47,1.186,88,0.344,89,1.186,122,1.944,125,2.83,130,2.259,131,1.292,132,2.259,168,3.451,233,2,308,3.611,325,4.459,326,4.459,327,4.459,328,4.459,329,3.947]],["t/2929",[10,1.465,88,0.511,148,2.888,149,2.888,168,3.73,329,5.864]],["t/2931",[1,1.236,2,3.192,63,5.041]],["t/2933",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2935",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,330,4.122]],["t/2937",[3,2.199,63,4.804,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,320,4.199]],["t/2939",[1,1.119,6,1.17,10,1.547,32,2.659,88,0.496,89,0.927,103,1.825,111,2.807,112,2.09,113,2.09,114,2.15,115,2.034,117,2.09,163,1.929,164,1.788,165,1.704,320,3.883,331,4.795,332,4.795]],["t/2941",[10,1.606,20,2.326,23,2.264,34,3.348,43,1.735,44,3.348,88,0.423,89,1.061,122,2.39,140,2.976,163,2.205,164,2.045,165,1.948,171,3.348]],["t/2943",[10,1.543,88,0.494,148,2.791,149,2.791,163,2.575,164,2.387,165,2.274]],["t/2945",[1,1.151,2,3.545,6,1.616,64,5.363,79,2.411,333,6.623]],["t/2947",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2949",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,334,4.122]],["t/2951",[3,2.199,64,5.492,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,335,4.59]],["t/2953",[1,0.924,6,1.298,8,2.455,10,1.5,28,0.97,32,2.591,47,1.029,54,1.912,88,0.484,89,0.706,103,1.778,111,2.319,112,1.591,113,1.591,114,1.637,115,1.548,117,2.319,131,1.541,156,1.507,158,1.637,160,1.803,161,3.397,162,2.033,335,3.231,336,3.65,337,5.318,338,1.791,339,2.955,340,1.981,341,3.65]],["t/2955",[6,0.994,8,1.186,10,1.656,14,1.569,20,1.09,23,1.061,26,1.937,28,1.857,47,0.788,54,1.346,88,0.198,89,1.402,122,1.12,123,2.406,125,3.347,130,1.302,131,0.744,132,1.302,133,1.641,147,1.447,156,2.088,158,1.826,160,1.38,161,2.6,162,0.982,166,2.562,167,1.724,168,2.293,169,2.063,170,2.063,233,1.152,313,1.82,338,1.261,339,2.081,340,1.395]],["t/2957",[8,2.606,10,1.458,47,1.092,88,0.435,131,1.635,148,2.461,149,2.461,156,2.331,158,2.531,160,1.913,161,3.605,162,2.158,338,2.77,339,4.571,340,3.063]],["t/2959",[1,1.171,2,3.023,6,1.645,65,5.458,342,6.74,343,6.74]],["t/2961",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2963",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,344,3.105]],["t/2965",[3,2.199,65,5.492,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,345,4.59]],["t/2967",[1,0.887,6,1.246,8,1.594,10,1.534,28,0.917,32,2.509,47,0.988,54,1.809,88,0.468,89,0.668,103,1.722,111,2.226,112,1.505,113,1.505,114,1.548,115,1.464,117,2.226,131,1.479,156,1.425,158,1.548,160,1.17,162,1.32,163,2.054,164,1.904,165,1.814,233,1.548,338,1.694,340,1.873,345,3.056,346,3.452,347,5.105,348,2.795,349,2.445,350,2.445,351,3.452]],["t/2969",[1,0.35,6,0.815,8,0.93,10,1.66,14,1.23,20,0.854,23,1.38,26,1.59,28,1.821,34,1.23,43,0.637,44,1.23,47,0.646,54,1.751,88,0.33,89,1.403,122,0.878,123,2.371,125,3.348,130,1.021,131,0.583,132,1.021,133,1.286,140,1.093,147,1.134,156,1.768,158,1.498,160,1.133,162,0.77,163,0.81,164,0.751,165,0.716,166,2.17,167,1.351,168,1.882,169,1.693,170,1.693,171,1.23,195,1.427,208,1.631,217,2.706,233,1.92,313,1.427,338,0.988,340,1.093,348,1.631,349,1.427,350,1.427,352,1.783]],["t/2971",[8,2.394,10,1.486,47,1.003,88,0.4,131,1.502,148,2.261,149,2.261,156,2.141,158,2.325,160,1.758,162,1.982,163,2.086,164,1.934,165,1.842,233,2.325,338,2.544,340,2.814,348,4.199,349,3.673,350,3.673]],["t/2973",[1,1.131,2,2.92,6,1.589,66,4.611,79,2.369,353,6.51,354,5.764,355,6.51]],["t/2975",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2977",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,344,3.105]],["t/2979",[3,2.199,66,4.804,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,356,4.59]],["t/2981",[1,0.769,6,1.322,8,1.319,10,1.563,28,0.759,32,2.518,47,1.047,54,2.319,88,0.47,89,0.553,103,1.728,111,1.929,112,1.246,113,1.246,114,1.282,115,1.212,117,2.361,131,1.569,156,1.18,158,1.282,160,0.969,162,1.092,163,2.178,164,2.019,165,1.924,166,3.09,233,1.282,338,1.402,340,1.551,354,2.53,356,2.53,357,2.858,358,5.415,359,2.314,360,4.425,361,2.858,362,2.858]],["t/2983",[6,1.094,8,0.993,10,1.653,14,2.153,20,0.912,23,1.456,24,1.211,26,1.678,28,1.726,34,1.313,43,0.681,44,1.313,47,0.682,54,1.127,88,0.166,89,1.398,122,0.937,123,2.133,125,3.337,130,1.09,131,0.623,132,1.09,133,2.252,140,1.167,147,1.211,156,1.851,158,1.581,160,1.195,162,0.822,163,0.865,164,0.802,165,0.764,166,2.901,167,1.442,168,1.986,169,1.787,170,1.787,171,1.313,233,2.01,313,2.498,338,1.055,340,1.914,344,1.62,359,1.741]],["t/2985",[8,2.461,10,1.501,47,1.031,88,0.411,131,1.544,148,2.324,149,2.324,156,2.201,158,2.39,160,1.807,162,2.037,163,2.144,164,1.988,165,1.894,233,2.39,338,2.615,340,2.893,359,4.316]],["t/2987",[6,1.645,14,4.115,23,2.783,166,3.415,184,5.458,363,6.74]],["t/2989",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/2991",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,364,3.649]],["t/2993",[3,2.034,26,2.281,67,5.7,78,3.612,79,2.646,82,3.396,86,1.359,95,1.98,96,1.98,97,2.09,98,2.09,99,2.034,100,2.807,101,2.034,102,2.034,103,1.359,104,2.034,105,2.09,106,2.09,107,2.09,108,2.09,109,2.09,186,3.883,365,4.795,366,4.245]],["t/2995",[1,1.119,6,1.17,10,1.503,32,2.659,88,0.496,89,0.927,103,1.825,111,2.807,112,2.09,113,2.09,114,2.15,115,2.034,117,2.09,166,2.43,196,3.612,366,4.245,367,4.795,368,4.795,369,3.883,370,3.883]],["t/2997",[10,1.607,20,2.034,24,2.7,28,1.274,88,0.37,89,1.245,122,2.09,123,2.281,125,3.356,160,1.625,166,2.43,196,3.612,280,5.7,299,4.245,369,3.883,370,3.883,371,4.795,372,4.795]],["t/2999",[10,1.435,88,0.494,148,2.791,149,2.791,166,3.244,196,4.823,369,5.184,370,5.184]],["t/3001",[1,1.192,2,3.077,6,1.674,68,5.169,373,6.861]],["t/3003",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/3005",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,374,3.649]],["t/3007",[3,2.199,68,5.109,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,375,4.59]],["t/3009",[1,1.065,6,1.088,10,1.514,32,2.531,47,0.862,88,0.473,89,0.862,103,1.737,111,2.672,112,1.944,113,1.944,114,2,115,1.891,117,1.944,131,1.292,162,1.705,163,1.794,164,1.663,165,1.584,166,2.259,233,2,375,3.947,376,4.459,377,4.459,378,4.459]],["t/3011",[1,0.339,6,0.795,8,0.901,10,1.65,14,1.192,20,0.828,23,1.345,24,1.099,26,1.549,28,1.733,34,1.192,43,0.618,44,1.192,47,0.63,54,2.561,75,1.728,88,0.323,89,1.388,122,0.851,123,1.992,125,3.313,130,0.989,131,0.566,132,0.989,133,2.08,140,1.06,147,1.099,156,1.729,158,1.46,160,1.104,162,0.746,163,0.785,164,0.728,165,0.694,166,2.753,167,1.31,168,1.834,169,1.65,170,1.65,171,1.192,172,1.471,195,1.383,208,1.581,233,1.878,313,1.383,338,0.958,340,1.06,349,1.383,350,1.383,352,1.728,374,2.883,379,1.952,380,1.728]],["t/3013",[8,2.271,10,1.515,47,0.951,88,0.505,89,0.951,131,1.425,148,2.144,149,2.855,156,2.031,158,2.206,160,1.667,162,1.88,163,1.978,164,1.834,165,1.747,233,2.206,338,2.413,340,2.669,349,3.483,350,3.483,380,4.354]],["t/3015",[1,1.171,2,3.023,6,1.645,69,4.774,79,2.453,381,6.74]],["t/3017",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/3019",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,382,4.122]],["t/3021",[3,2.199,69,4.804,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,383,4.59]],["t/3023",[1,0.627,6,0.54,10,1.605,24,2.033,25,1.792,32,2.575,35,1.296,47,0.884,69,3.737,88,0.278,89,0.428,99,0.938,103,1.495,104,0.938,111,1.574,112,0.965,113,0.965,115,1.94,117,0.965,123,1.052,125,1.021,131,1.325,156,0.914,158,0.992,160,0.75,164,0.825,169,1.121,170,1.121,269,1.959,275,3.975,297,1.959,309,3.239,314,1.667,317,1.792,338,1.086,383,1.959,384,2.212,385,5.813,386,1.792,387,2.923,388,1.792,389,1.959,390,2.212,391,1.792,392,2.212,393,2.923,394,3.61,395,2.212,396,2.212,397,3.61,398,2.212,399,2.212,400,2.212,401,3.61,402,2.212,403,2.212,404,2.212,405,2.212,406,2.212,407,3.61,408,2.212]],["t/3025",[6,0.381,10,1.649,20,0.662,23,0.645,24,0.879,26,1.281,28,1.704,31,1.908,35,0.914,47,0.521,54,1.861,69,1.106,87,0.645,88,0.274,89,1.377,93,0.662,122,0.681,123,1.281,125,3.347,130,0.791,131,0.452,132,0.791,138,0.997,139,0.997,147,2,156,1.745,158,1.593,160,1.204,161,0.997,164,0.582,166,1.365,167,1.047,168,2,169,1.8,170,1.8,203,1.382,275,1.176,308,1.264,309,2.516,314,2.029,317,1.264,338,0.766,386,1.264,387,1.264,388,1.264,391,2.181,393,1.264,409,1.561,410,1.561,411,1.561,412,1.561,413,1.561,414,1.561,415,2.694,416,1.561,417,1.561,418,1.561,419,1.561,420,1.561,421,1.561,422,1.561,423,3.145,424,1.561,425,1.561,426,1.561,427,1.561,428,2.385,429,2.385,430,1.561,431,1.561,432,1.264,433,1.561,434,1.561,435,1.561]],["t/3027",[10,1.622,24,2.511,28,1.185,35,2.611,47,0.862,88,0.344,131,1.292,148,1.944,149,1.944,156,1.841,158,2,160,1.511,164,1.663,169,2.259,170,2.259,309,3.158,338,2.188,386,3.611,387,3.611,388,3.611,389,3.947,391,3.611,393,3.611,423,3.947,428,3.947,429,3.947]],["t/3029",[1,1.151,2,2.97,6,1.616,63,4.691,436,6.623,437,5.864,438,6.623]],["t/3031",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/3033",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,439,4.122]],["t/3035",[3,2.199,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,440,6.782,441,4.59]],["t/3037",[1,0.957,6,0.935,10,1.548,23,2.275,32,2.275,88,0.425,89,0.741,103,1.562,111,2.402,112,1.671,113,1.671,114,1.719,115,1.626,117,1.671,138,2.448,139,3.519,295,2.448,432,3.104,441,3.393,442,3.833,443,3.833,444,3.104,445,3.393,446,3.393,447,3.393,448,3.393,449,3.104,450,3.393,451,3.393,452,3.393,453,3.393,454,3.104,455,3.393,456,3.393]],["t/3039",[10,1.496,20,2.009,23,2.637,88,0.365,122,2.064,138,3.024,139,4.078,266,6.396,432,3.834,444,5.17,446,4.192,447,4.192,448,4.192,449,5.17,451,4.192,452,4.192,453,4.192,454,5.17,456,4.192]],["t/3041",[10,1.479,88,0.449,148,2.536,149,2.536,295,4.662,444,4.71,445,5.15,449,4.71,450,5.15,454,4.71,455,5.15,457,5.817]],["t/3043",[1,0.813,2,2.098,6,1.752,22,5.128,70,3.313,78,3.524,79,1.702,88,0.554,120,4.708,172,4.77,210,4.141,211,4.141,212,4.141,213,3.787,214,3.787,215,4.141,216,4.141,217,3.787,218,4.141,219,4.141,220,4.141]],["t/3045",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/3047",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,458,4.122]],["t/3049",[3,2.199,70,4.804,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,459,4.59]],["t/3051",[1,1.073,6,1.101,10,1.471,32,2.551,47,0.873,88,0.476,89,0.873,103,1.751,111,2.694,112,1.967,113,1.967,114,2.023,115,1.914,117,1.967,124,3.618,131,1.307,194,3.479,224,4.655,309,3.196,459,3.994,460,4.511,461,4.511]],["t/3053",[1,0.459,10,1.599,20,1.765,23,2.126,26,1.979,28,1.688,35,1.546,43,0.836,47,0.805,70,1.87,88,0.397,89,1.13,120,3.721,122,1.814,123,1.256,124,2.436,125,2.696,127,3.369,128,2.657,129,1.989,130,1.338,131,0.765,132,1.338,133,1.686,134,4.73,135,3.369,136,2.138,137,2.138,138,1.686,139,1.686,140,1.433,141,2.138,142,2.138,143,2.138,144,2.138,145,1.612,146,1.771,147,1.487,194,2.899,195,1.87,224,3.134,284,2.338,285,2.338]],["t/3055",[10,1.536,35,2.739,47,0.905,82,3.313,88,0.488,89,1.225,120,3.708,124,3.708,129,3.524,131,1.355,145,2.856,146,3.137,148,2.039,149,2.761,194,3.566,224,4.77,462,4.677,463,4.677,464,4.677]],["t/3057",[1,1.171,2,3.023,6,1.645,71,6.468,465,6.74]],["t/3059",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/3061",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,344,3.105]],["t/3063",[3,2.199,71,5.492,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,466,4.59]],["t/3065",[1,1.001,6,0.995,10,1.513,32,2.378,47,0.789,88,0.444,89,0.789,103,1.632,111,2.511,112,1.778,113,1.778,114,1.829,115,1.73,117,1.778,131,1.181,160,1.382,162,1.559,163,1.64,164,1.521,165,2.046,233,1.829,295,2.605,466,3.61,467,4.078,468,4.078,469,3.61,470,3.302,471,4.664,472,3.302,473,3.302]],["t/3067",[8,1.091,10,1.644,20,1.002,23,1.572,26,1.811,28,1.012,31,3.387,34,1.443,43,1.205,44,1.443,47,0.737,53,1.913,54,2.874,88,0.294,89,1.308,122,1.03,123,1.811,125,3.247,130,1.197,131,0.684,132,1.197,138,3.054,139,2.432,140,2.066,147,2.144,160,1.621,162,0.903,163,0.95,164,0.881,165,0.84,171,1.443,198,2.092,233,2.145,273,2.092,295,1.509,470,3.083,471,3.083,472,3.083,473,3.083,474,2.363,475,2.363,476,2.363,477,2.363,478,2.363]],["t/3069",[10,1.486,47,1.003,88,0.4,131,1.502,148,2.261,149,2.261,160,1.758,162,1.982,163,2.086,164,1.934,165,2.41,233,2.325,295,3.312,469,4.59,470,4.199,471,5.492,472,4.199,473,4.199]],["t/3071",[6,1.616,14,4.044,23,2.735,166,3.356,184,5.363,437,5.864,479,6.623]],["t/3073",[85,2.939,86,1.91,87,2.783,88,0.616,89,1.304]],["t/3075",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,88,0.318,90,3.57,91,1.797,92,3.475,93,1.748,364,3.649]],["t/3077",[3,2.199,57,5.492,79,2.751,86,1.47,95,2.141,96,2.141,97,2.261,98,2.261,99,2.199,100,2.261,101,2.199,102,2.199,103,1.47,104,2.199,105,2.261,106,2.261,107,2.261,108,2.261,109,2.261,480,4.59]],["t/3079",[1,1.082,6,1.114,10,1.525,32,2.572,47,0.883,88,0.48,89,0.883,103,1.765,111,2.716,112,1.99,113,1.99,114,2.047,115,1.936,117,1.99,131,1.322,160,1.548,163,1.836,164,1.703,165,1.622,480,4.042,481,4.565,482,4.565,483,3.697]],["t/3081",[6,1.086,10,1.63,20,1.221,23,1.838,24,1.621,26,2.117,28,0.765,31,2.039,34,1.758,43,0.911,44,1.758,47,0.861,57,3.604,88,0.222,89,1.411,122,1.255,123,1.37,125,3.368,130,1.459,131,1.289,132,2.255,140,1.563,160,1.509,163,1.158,164,1.074,165,1.023,171,1.758,195,2.039,233,1.291,483,2.332,484,3.94,485,2.879,486,2.879,487,2.879,488,5.419,489,2.879,490,3.94]],["t/3083",[10,1.439,24,3.088,47,1.061,88,0.423,131,2.037,148,2.39,149,2.39,160,1.858,163,2.205,164,2.045,165,1.948,483,4.44,484,4.854,488,4.854,490,4.854,491,5.483]]],"invertedIndex":[["",{"_index":10,"t":{"2829":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"2841":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"2843":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"2845":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"2855":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"2857":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"2859":{"position":[[48,1],[173,1],[188,1]]},"2869":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"2871":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"2873":{"position":[[0,2],[57,1],[126,1],[172,1]]},"2875":{"position":[[302,4]]},"2883":{"position":[[134,2],[163,2],[196,2]]},"2885":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"2887":{"position":[[18,1],[193,1]]},"2897":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"2899":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"2901":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"2911":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"2913":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"2915":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"2925":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"2927":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"2929":{"position":[[18,1],[56,1]]},"2939":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"2941":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"2943":{"position":[[18,1],[43,1],[58,1]]},"2953":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"2955":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"2957":{"position":[[18,1],[43,3],[141,1]]},"2967":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"2969":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"2971":{"position":[[18,1],[43,3],[150,1],[185,1]]},"2981":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"2983":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"2985":{"position":[[18,1],[43,3],[150,1],[165,1]]},"2995":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"2997":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"2999":{"position":[[18,1],[78,1]]},"3009":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"3011":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"3013":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"3023":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"3025":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"3027":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]},"3037":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"3039":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"3041":{"position":[[18,1],[57,2],[97,1]]},"3051":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"3053":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"3055":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"3065":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"3067":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"3069":{"position":[[18,1],[110,1],[182,1],[197,1]]},"3079":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"3081":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"3083":{"position":[[18,1],[85,1],[203,1]]}}}],["0",{"_index":35,"t":{"2829":{"position":[[492,1]]},"2843":{"position":[[251,1]]},"2845":{"position":[[86,2]]},"2897":{"position":[[341,2]]},"3023":{"position":[[325,2]]},"3025":{"position":[[402,1]]},"3027":{"position":[[106,2]]},"3053":{"position":[[201,1]]},"3055":{"position":[[274,2]]}}}],["1",{"_index":295,"t":{"2897":{"position":[[390,2]]},"2901":{"position":[[202,1]]},"3037":{"position":[[332,1]]},"3041":{"position":[[55,1],[94,2]]},"3065":{"position":[[402,1]]},"3067":{"position":[[839,1]]},"3069":{"position":[[180,1]]}}}],["1.14/1.15",{"_index":152,"t":{"2853":{"position":[[33,11]]}}}],["1.18",{"_index":80,"t":{"2833":{"position":[[82,4]]}}}],["10",{"_index":164,"t":{"2855":{"position":[[366,2]]},"2857":{"position":[[636,2]]},"2859":{"position":[[170,2]]},"2939":{"position":[[258,2]]},"2941":{"position":[[75,2]]},"2943":{"position":[[40,2]]},"2967":{"position":[[342,2],[567,2]]},"2969":{"position":[[860,2]]},"2971":{"position":[[147,2]]},"2981":{"position":[[342,2],[535,2],[749,2]]},"2983":{"position":[[875,2]]},"2985":{"position":[[147,2]]},"3009":{"position":[[319,2]]},"3011":{"position":[[1015,2]]},"3013":{"position":[[206,2]]},"3023":{"position":[[368,2]]},"3025":{"position":[[1456,2]]},"3027":{"position":[[149,2]]},"3065":{"position":[[329,2]]},"3067":{"position":[[319,2]]},"3069":{"position":[[107,2]]},"3079":{"position":[[300,2]]},"3081":{"position":[[258,2]]},"3083":{"position":[[82,2]]}}}],["100",{"_index":471,"t":{"3065":{"position":[[361,4],[380,4]]},"3067":{"position":[[585,4],[711,4]]},"3069":{"position":[[139,4],[158,4]]}}}],["10m",{"_index":448,"t":{"3037":{"position":[[316,6]]},"3039":{"position":[[73,6]]}}}],["123456",{"_index":301,"t":{"2901":{"position":[[120,9]]}}}],["127.0.0.1",{"_index":338,"t":{"2953":{"position":[[256,12]]},"2955":{"position":[[225,11]]},"2957":{"position":[[53,12]]},"2967":{"position":[[248,12]]},"2969":{"position":[[267,11]]},"2971":{"position":[[53,12]]},"2981":{"position":[[248,12]]},"2983":{"position":[[345,11]]},"2985":{"position":[[53,12]]},"3011":{"position":[[398,11]]},"3013":{"position":[[92,12]]},"3023":{"position":[[262,12]]},"3025":{"position":[[84,11]]},"3027":{"position":[[34,12]]}}}],["127.0.0.1:11211",{"_index":329,"t":{"2927":{"position":[[113,17]]},"2929":{"position":[[37,18]]}}}],["127.0.0.1:8091",{"_index":292,"t":{"2897":{"position":[[287,17]]},"2901":{"position":[[73,17]]}}}],["1433",{"_index":348,"t":{"2967":{"position":[[267,5]]},"2969":{"position":[[355,4]]},"2971":{"position":[[72,5]]}}}],["15",{"_index":272,"t":{"2885":{"position":[[2668,2],[2722,2]]}}}],["1e7",{"_index":445,"t":{"3037":{"position":[[271,4]]},"3041":{"position":[[41,4]]}}}],["1gb",{"_index":453,"t":{"3037":{"position":[[366,6]]},"3039":{"position":[[131,6]]}}}],["2",{"_index":96,"t":{"2839":{"position":[[43,1]]},"2853":{"position":[[26,1]]},"2867":{"position":[[23,1]]},"2881":{"position":[[26,1]]},"2885":{"position":[[175,3]]},"2895":{"position":[[27,1]]},"2909":{"position":[[22,1]]},"2915":{"position":[[80,1]]},"2923":{"position":[[24,1]]},"2937":{"position":[[24,1]]},"2951":{"position":[[25,1]]},"2965":{"position":[[23,1]]},"2979":{"position":[[23,1]]},"2993":{"position":[[24,1]]},"3007":{"position":[[26,1]]},"3021":{"position":[[23,1]]},"3035":{"position":[[27,1]]},"3049":{"position":[[20,1]]},"3063":{"position":[[25,1]]},"3077":{"position":[[24,1]]}}}],["25",{"_index":251,"t":{"2885":{"position":[[1341,2],[2037,2]]}}}],["27017",{"_index":339,"t":{"2953":{"position":[[275,6]]},"2955":{"position":[[313,5]]},"2957":{"position":[[72,6]]}}}],["3",{"_index":145,"t":{"2843":{"position":[[658,1]]},"2845":{"position":[[116,2]]},"2885":{"position":[[1010,1]]},"2887":{"position":[[93,2]]},"2897":{"position":[[363,2]]},"2901":{"position":[[174,1]]},"3053":{"position":[[613,1]]},"3055":{"position":[[255,2]]}}}],["30",{"_index":450,"t":{"3037":{"position":[[337,3]]},"3041":{"position":[[60,3]]}}}],["3306",{"_index":359,"t":{"2981":{"position":[[267,5]]},"2983":{"position":[[433,4]]},"2985":{"position":[[72,5]]}}}],["5",{"_index":247,"t":{"2885":{"position":[[1246,2],[1942,2]]},"2887":{"position":[[129,2],[152,2]]}}}],["5432",{"_index":380,"t":{"3011":{"position":[[486,4]]},"3013":{"position":[[111,5]]}}}],["60",{"_index":206,"t":{"2871":{"position":[[342,2]]},"2873":{"position":[[123,2]]}}}],["6379",{"_index":386,"t":{"3023":{"position":[[281,5]]},"3025":{"position":[[172,4]]},"3027":{"position":[[53,5]]}}}],["6380",{"_index":395,"t":{"3023":{"position":[[617,9]]}}}],["64",{"_index":455,"t":{"3037":{"position":[[386,3]]},"3041":{"position":[[77,3]]}}}],["8529",{"_index":159,"t":{"2855":{"position":[[286,5]]},"2857":{"position":[[179,4]]},"2859":{"position":[[90,5]]}}}],["_",{"_index":361,"t":{"2981":{"position":[[612,1]]}}}],["access",{"_index":135,"t":{"2843":{"position":[[422,6],[448,6]]},"2885":{"position":[[768,6],[794,6]]},"3053":{"position":[[371,6],[397,6]]}}}],["accesskey",{"_index":284,"t":{"2885":{"position":[[3096,9]]},"3053":{"position":[[659,9]]}}}],["account",{"_index":119,"t":{"2841":{"position":[[258,8],[320,8]]},"2843":{"position":[[32,7],[46,7]]},"2845":{"position":[[28,8]]}}}],["adaptor",{"_index":474,"t":{"3067":{"position":[[402,7]]}}}],["addr",{"_index":393,"t":{"3023":{"position":[[495,6],[592,6]]},"3025":{"position":[[794,5]]},"3027":{"position":[[177,6]]}}}],["address",{"_index":415,"t":{"3025":{"position":[[663,7],[699,10]]}}}],["admin",{"_index":300,"t":{"2901":{"position":[[101,8]]}}}],["allow",{"_index":235,"t":{"2885":{"position":[[415,6]]}}}],["along",{"_index":33,"t":{"2829":{"position":[[457,5]]}}}],["amount",{"_index":198,"t":{"2871":{"position":[[230,6]]},"3067":{"position":[[769,6]]}}}],["applic",{"_index":296,"t":{"2899":{"position":[[28,11],[108,11]]}}}],["arangodb",{"_index":55,"t":{"2831":{"position":[[0,8]]},"2847":{"position":[[2,8]]},"2853":{"position":[[0,8]]}}}],["arangodb.new",{"_index":154,"t":{"2855":{"position":[[172,14]]}}}],["arangodb.new(arangodb.config",{"_index":155,"t":{"2855":{"position":[[224,29]]}}}],["arangodb/go",{"_index":150,"t":{"2847":{"position":[[32,11],[55,11]]}}}],["attempt",{"_index":144,"t":{"2843":{"position":[[623,10]]},"2885":{"position":[[972,10]]},"3053":{"position":[[575,10]]}}}],["authent",{"_index":313,"t":{"2913":{"position":[[197,15],[259,15]]},"2955":{"position":[[81,14]]},"2969":{"position":[[123,14]]},"2983":{"position":[[69,14],[201,14]]},"3011":{"position":[[254,14]]}}}],["avail",{"_index":203,"t":{"2871":{"position":[[284,9]]},"3025":{"position":[[1481,9]]}}}],["aw",{"_index":134,"t":{"2843":{"position":[[418,3],[437,3]]},"2885":{"position":[[764,3],[783,3]]},"3053":{"position":[[98,3],[130,3],[367,3],[386,3]]}}}],["aws.bool(tru",{"_index":286,"t":{"2887":{"position":[[177,15]]}}}],["aws/aw",{"_index":210,"t":{"2875":{"position":[[32,7]]},"3043":{"position":[[26,7]]}}}],["aws/credenti",{"_index":215,"t":{"2875":{"position":[[154,19]]},"3043":{"position":[[148,19]]}}}],["aws_region",{"_index":232,"t":{"2885":{"position":[[283,13]]}}}],["awsdynamodb.cli",{"_index":221,"t":{"2879":{"position":[[285,19]]}}}],["azblob.cli",{"_index":94,"t":{"2837":{"position":[[288,14]]}}}],["azur",{"_index":72,"t":{"2833":{"position":[[0,5]]},"2839":{"position":[[0,5],[210,5]]}}}],["azureblob",{"_index":56,"t":{"2831":{"position":[[9,9]]}}}],["azureblob.new",{"_index":116,"t":{"2841":{"position":[[173,15]]}}}],["azureblob.new(azureblob.config",{"_index":118,"t":{"2841":{"position":[[226,31]]}}}],["badger",{"_index":57,"t":{"2831":{"position":[[19,6]]},"3077":{"position":[[0,6],[191,6]]},"3081":{"position":[[344,6],[487,6]]}}}],["badger.db",{"_index":364,"t":{"2991":{"position":[[288,10]]},"3075":{"position":[[288,10]]}}}],["badger.defaultoptions(\"./fiber.badg",{"_index":486,"t":{"3081":{"position":[[378,39]]}}}],["badger.defaultoptions(\"./fiber.badger\").withlogger(nil",{"_index":491,"t":{"3083":{"position":[[115,56]]}}}],["badger.logg",{"_index":489,"t":{"3081":{"position":[[532,13]]}}}],["badger.new",{"_index":481,"t":{"3079":{"position":[[170,12]]}}}],["badger.new(badger.config",{"_index":482,"t":{"3079":{"position":[[220,25]]}}}],["badger.opt",{"_index":487,"t":{"3081":{"position":[[432,14]]}}}],["badgeropt",{"_index":484,"t":{"3081":{"position":[[303,13],[418,13]]},"3083":{"position":[[100,14]]}}}],["bbolt",{"_index":58,"t":{"2831":{"position":[[26,5]]},"2861":{"position":[[2,5]]},"2867":{"position":[[0,5]]},"2871":{"position":[[137,5]]}}}],["bbolt.db",{"_index":189,"t":{"2865":{"position":[[288,9]]}}}],["bbolt.new",{"_index":191,"t":{"2869":{"position":[[169,11]]}}}],["bbolt.new(bbolt.config",{"_index":192,"t":{"2869":{"position":[[218,23]]}}}],["befor",{"_index":171,"t":{"2857":{"position":[[580,6]]},"2885":{"position":[[2921,6]]},"2941":{"position":[[29,6]]},"2969":{"position":[[804,6]]},"2983":{"position":[[819,6]]},"3011":{"position":[[959,6]]},"3067":{"position":[[263,6]]},"3081":{"position":[[202,6]]}}}],["blob",{"_index":73,"t":{"2833":{"position":[[6,4]]},"2839":{"position":[[6,4],[216,4]]}}}],["block",{"_index":270,"t":{"2885":{"position":[[2616,5]]}}}],["bolt",{"_index":174,"t":{"2861":{"position":[[44,4]]}}}],["bool",{"_index":132,"t":{"2843":{"position":[[388,4]]},"2857":{"position":[[567,4]]},"2871":{"position":[[460,4],[557,4]]},"2885":{"position":[[1120,4],[3062,5]]},"2927":{"position":[[237,4]]},"2955":{"position":[[697,4]]},"2969":{"position":[[791,4]]},"2983":{"position":[[806,4]]},"3011":{"position":[[946,4]]},"3025":{"position":[[1275,4]]},"3053":{"position":[[337,4]]},"3067":{"position":[[250,4]]},"3081":{"position":[[189,4],[636,4]]}}}],["bound",{"_index":436,"t":{"3029":{"position":[[9,5]]}}}],["bradfitz/gomemcach",{"_index":318,"t":{"2917":{"position":[[32,20]]}}}],["bucket",{"_index":194,"t":{"2869":{"position":[[270,7],[282,8]]},"2871":{"position":[[143,6],[198,6],[511,6]]},"2873":{"position":[[89,7]]},"2885":{"position":[[1074,6]]},"2897":{"position":[[333,7]]},"2899":{"position":[[263,6],[284,6]]},"2901":{"position":[[130,7]]},"3051":{"position":[[230,7],[242,6]]},"3053":{"position":[[69,6],[81,6],[291,6]]},"3055":{"position":[[32,7],[176,7]]}}}],["buffer",{"_index":456,"t":{"3037":{"position":[[416,7]]},"3039":{"position":[[190,7]]}}}],["bufferitem",{"_index":454,"t":{"3037":{"position":[[373,12]]},"3039":{"position":[[155,11],[198,11]]},"3041":{"position":[[64,12]]}}}],["byte",{"_index":29,"t":{"2829":{"position":[[393,8],[591,7]]},"2837":{"position":[[69,8],[123,7]]},"2851":{"position":[[69,8],[123,7]]},"2865":{"position":[[69,8],[123,7]]},"2879":{"position":[[66,8],[120,7]]},"2893":{"position":[[69,8],[123,7]]},"2907":{"position":[[70,8],[124,7]]},"2921":{"position":[[69,8],[123,7]]},"2935":{"position":[[69,8],[123,7]]},"2949":{"position":[[69,8],[123,7]]},"2963":{"position":[[69,8],[123,7]]},"2977":{"position":[[69,8],[123,7]]},"2991":{"position":[[69,8],[123,7]]},"3005":{"position":[[69,8],[123,7]]},"3019":{"position":[[69,8],[123,7]]},"3033":{"position":[[69,8],[123,7]]},"3047":{"position":[[69,8],[123,7]]},"3061":{"position":[[69,8],[123,7]]},"3075":{"position":[[69,8],[123,7]]}}}],["cach",{"_index":452,"t":{"3037":{"position":[[360,5]]},"3039":{"position":[[125,5]]}}}],["calcul",{"_index":256,"t":{"2885":{"position":[[1415,13],[2111,13]]}}}],["case",{"_index":278,"t":{"2885":{"position":[[2847,4]]}}}],["cer",{"_index":396,"t":{"3023":{"position":[[670,4]]}}}],["certif",{"_index":405,"t":{"3023":{"position":[[855,13]]}}}],["chu'",{"_index":179,"t":{"2861":{"position":[[97,5]]}}}],["clear",{"_index":130,"t":{"2843":{"position":[[304,6]]},"2857":{"position":[[480,6]]},"2871":{"position":[[474,6]]},"2885":{"position":[[1037,6]]},"2927":{"position":[[155,6]]},"2955":{"position":[[615,6]]},"2969":{"position":[[709,6]]},"2983":{"position":[[724,6]]},"3011":{"position":[[864,6]]},"3025":{"position":[[1188,6]]},"3053":{"position":[[254,6]]},"3067":{"position":[[168,6]]},"3081":{"position":[[107,6]]}}}],["client",{"_index":275,"t":{"2885":{"position":[[2810,6]]},"2913":{"position":[[308,6]]},"3023":{"position":[[428,6],[552,6],[642,6],[1025,6]]},"3025":{"position":[[932,7]]}}}],["client.key",{"_index":399,"t":{"3023":{"position":[[718,15]]}}}],["clientnam",{"_index":423,"t":{"3025":{"position":[[904,10],[948,11],[1013,10]]},"3027":{"position":[[212,11]]}}}],["clientv3.client",{"_index":303,"t":{"2907":{"position":[[289,16]]}}}],["close",{"_index":48,"t":{"2829":{"position":[[826,5],[832,6],[921,7]]},"2837":{"position":[[249,7]]},"2851":{"position":[[249,7]]},"2865":{"position":[[249,7]]},"2879":{"position":[[246,7]]},"2893":{"position":[[249,7]]},"2907":{"position":[[250,7]]},"2921":{"position":[[249,7]]},"2935":{"position":[[249,7]]},"2949":{"position":[[249,7]]},"2963":{"position":[[249,7]]},"2977":{"position":[[249,7]]},"2991":{"position":[[249,7]]},"3005":{"position":[[249,7]]},"3019":{"position":[[249,7]]},"3033":{"position":[[249,7]]},"3047":{"position":[[249,7]]},"3061":{"position":[[249,7]]},"3075":{"position":[[249,7]]}}}],["cloud",{"_index":77,"t":{"2833":{"position":[[66,6]]}}}],["cluster",{"_index":297,"t":{"2899":{"position":[[77,7],[157,7],[224,7],[345,7],[443,7]]},"3023":{"position":[[544,7]]}}}],["clustercli",{"_index":420,"t":{"3025":{"position":[[742,13]]}}}],["cockroachdb/pebbl",{"_index":363,"t":{"2987":{"position":[[26,18]]}}}],["collect",{"_index":161,"t":{"2855":{"position":[[311,11]]},"2857":{"position":[[394,10],[453,10],[517,10]]},"2859":{"position":[[115,11]]},"2953":{"position":[[301,11],[513,11]]},"2955":{"position":[[529,10],[588,10]]},"2957":{"position":[[98,11]]},"3025":{"position":[[1225,10]]}}}],["collector",{"_index":52,"t":{"2829":{"position":[[888,10]]}}}],["command",{"_index":426,"t":{"3025":{"position":[[960,7]]}}}],["commun",{"_index":11,"t":{"2829":{"position":[[139,13]]}}}],["config",{"_index":88,"t":{"2835":{"position":[[33,6],[48,6]]},"2837":{"position":[[16,10]]},"2841":{"position":[[157,6],[210,6]]},"2843":{"position":[[5,6]]},"2845":{"position":[[20,7]]},"2849":{"position":[[33,6],[48,6]]},"2851":{"position":[[16,10]]},"2855":{"position":[[156,6],[208,6]]},"2857":{"position":[[5,6]]},"2859":{"position":[[50,7]]},"2863":{"position":[[33,6],[48,6]]},"2865":{"position":[[16,10]]},"2869":{"position":[[153,6],[202,6]]},"2871":{"position":[[3,6],[22,6],[47,6]]},"2873":{"position":[[32,6],[59,7]]},"2875":{"position":[[60,6],[199,6],[262,7]]},"2877":{"position":[[33,6],[48,6]]},"2879":{"position":[[16,7]]},"2885":{"position":[[5,6],[209,6]]},"2887":{"position":[[20,7]]},"2891":{"position":[[33,6],[48,6]]},"2893":{"position":[[16,10]]},"2897":{"position":[[157,6],[233,6]]},"2899":{"position":[[5,6]]},"2901":{"position":[[32,6],[59,7]]},"2905":{"position":[[33,6],[48,6]]},"2907":{"position":[[16,10]]},"2911":{"position":[[152,6],[200,6]]},"2913":{"position":[[5,6]]},"2915":{"position":[[20,7]]},"2919":{"position":[[33,6],[48,6]]},"2921":{"position":[[16,10]]},"2925":{"position":[[156,6],[208,6]]},"2927":{"position":[[5,6]]},"2929":{"position":[[20,7]]},"2933":{"position":[[33,6],[48,6]]},"2935":{"position":[[16,10]]},"2939":{"position":[[154,6],[204,6]]},"2941":{"position":[[5,6]]},"2943":{"position":[[20,7]]},"2947":{"position":[[33,6],[48,6]]},"2949":{"position":[[16,10]]},"2953":{"position":[[155,6],[206,6],[368,6]]},"2955":{"position":[[5,6]]},"2957":{"position":[[20,7]]},"2961":{"position":[[33,6],[48,6]]},"2963":{"position":[[16,10]]},"2967":{"position":[[153,6],[202,6],[404,6]]},"2969":{"position":[[3,6],[22,6],[47,6]]},"2971":{"position":[[20,7]]},"2975":{"position":[[33,6],[48,6]]},"2977":{"position":[[16,10]]},"2981":{"position":[[153,6],[202,6],[384,6],[577,6]]},"2983":{"position":[[5,6]]},"2985":{"position":[[20,7]]},"2989":{"position":[[33,6],[48,6]]},"2991":{"position":[[16,10]]},"2995":{"position":[[154,6],[204,6]]},"2997":{"position":[[5,6]]},"2999":{"position":[[20,7]]},"3003":{"position":[[33,6],[48,6]]},"3005":{"position":[[16,10]]},"3009":{"position":[[159,6],[211,6]]},"3011":{"position":[[3,6],[22,6],[47,6]]},"3013":{"position":[[32,6],[59,7]]},"3017":{"position":[[33,6],[48,6]]},"3019":{"position":[[16,10]]},"3023":{"position":[[167,6],[216,6]]},"3025":{"position":[[5,6],[476,6],[1287,6]]},"3027":{"position":[[20,7]]},"3031":{"position":[[33,6],[48,6]]},"3033":{"position":[[16,10]]},"3037":{"position":[[157,6],[210,6]]},"3039":{"position":[[5,6]]},"3041":{"position":[[20,7]]},"3043":{"position":[[54,6],[193,6],[256,7]]},"3045":{"position":[[33,6],[48,6]]},"3047":{"position":[[16,10]]},"3051":{"position":[[150,6],[196,6]]},"3053":{"position":[[3,6],[22,6],[47,6]]},"3055":{"position":[[141,6],[168,7]]},"3059":{"position":[[33,6],[48,6]]},"3061":{"position":[[16,10]]},"3065":{"position":[[155,6],[206,6]]},"3067":{"position":[[5,6],[418,6]]},"3069":{"position":[[20,7]]},"3073":{"position":[[33,6],[48,6]]},"3075":{"position":[[16,10]]},"3079":{"position":[[154,6],[204,6]]},"3081":{"position":[[5,6]]},"3083":{"position":[[20,7]]}}}],["configdefault",{"_index":149,"t":{"2845":{"position":[[4,13]]},"2859":{"position":[[34,13]]},"2873":{"position":[[3,13],[43,13]]},"2887":{"position":[[4,13]]},"2901":{"position":[[3,13],[43,13]]},"2915":{"position":[[4,13]]},"2929":{"position":[[4,13]]},"2943":{"position":[[4,13]]},"2957":{"position":[[4,13]]},"2971":{"position":[[4,13]]},"2985":{"position":[[4,13]]},"2999":{"position":[[4,13]]},"3013":{"position":[[3,13],[43,13]]},"3027":{"position":[[4,13]]},"3041":{"position":[[4,13]]},"3055":{"position":[[112,13],[152,13]]},"3069":{"position":[[4,13]]},"3083":{"position":[[4,13]]}}}],["configur",{"_index":462,"t":{"3055":{"position":[[12,13]]}}}],["conn",{"_index":93,"t":{"2837":{"position":[[281,6]]},"2851":{"position":[[281,6]]},"2865":{"position":[[281,6]]},"2879":{"position":[[278,6]]},"2893":{"position":[[281,6]]},"2907":{"position":[[282,6]]},"2921":{"position":[[281,6]]},"2935":{"position":[[281,6]]},"2949":{"position":[[281,6]]},"2963":{"position":[[281,6]]},"2977":{"position":[[281,6]]},"2991":{"position":[[281,6]]},"3005":{"position":[[281,6]]},"3019":{"position":[[281,6]]},"3025":{"position":[[977,5]]},"3033":{"position":[[281,6]]},"3047":{"position":[[281,6]]},"3061":{"position":[[281,6]]},"3075":{"position":[[281,6]]}}}],["connect",{"_index":54,"t":{"2829":{"position":[[908,12]]},"2899":{"position":[[52,7],[132,7],[188,10],[273,7],[317,10]]},"2913":{"position":[[129,11]]},"2953":{"position":[[381,10]]},"2955":{"position":[[24,10]]},"2967":{"position":[[417,10]]},"2969":{"position":[[66,10],[926,10]]},"2981":{"position":[[397,10],[597,10]]},"2983":{"position":[[144,10]]},"3011":{"position":[[103,10],[128,10],[197,10],[792,10]]},"3025":{"position":[[349,10],[1416,12],[1459,11]]},"3067":{"position":[[517,11],[541,10],[655,11],[786,10]]}}}],["connectiontimeout",{"_index":293,"t":{"2897":{"position":[[344,18]]},"2899":{"position":[[353,17]]},"2901":{"position":[[155,18]]}}}],["connectionuri",{"_index":340,"t":{"2953":{"position":[[436,14]]},"2955":{"position":[[141,13]]},"2957":{"position":[[28,14]]},"2967":{"position":[[468,14]]},"2969":{"position":[[183,13]]},"2971":{"position":[[28,14]]},"2981":{"position":[[448,14]]},"2983":{"position":[[41,13],[261,13]]},"2985":{"position":[[28,14]]},"3011":{"position":[[314,13]]},"3013":{"position":[[67,14]]}}}],["connmaxlifetim",{"_index":473,"t":{"3065":{"position":[[385,16]]},"3067":{"position":[[736,15],[849,15]]},"3069":{"position":[[163,16]]}}}],["consol",{"_index":250,"t":{"2885":{"position":[[1329,8],[2025,8]]}}}],["contain",{"_index":45,"t":{"2829":{"position":[[718,7]]},"2841":{"position":[[275,10]]},"2843":{"position":[[64,9],[80,9],[341,10]]},"2845":{"position":[[41,10]]},"2885":{"position":[[542,9],[603,10]]}}}],["cost",{"_index":451,"t":{"3037":{"position":[[352,4]]},"3039":{"position":[[117,4]]}}}],["couchbas",{"_index":59,"t":{"2831":{"position":[[32,9]]},"2889":{"position":[[2,9]]},"2895":{"position":[[0,9],[194,9]]},"2897":{"position":[[203,9]]},"2899":{"position":[[67,9],[147,9],[214,9],[335,9],[433,9]]}}}],["couchbase.new",{"_index":290,"t":{"2897":{"position":[[173,15]]}}}],["couchbase.new(couchbase.config",{"_index":291,"t":{"2897":{"position":[[249,31]]}}}],["couchbase/gocb",{"_index":287,"t":{"2889":{"position":[[33,15]]}}}],["cpu",{"_index":433,"t":{"3025":{"position":[[1491,3]]}}}],["creat",{"_index":115,"t":{"2841":{"position":[[117,6]]},"2855":{"position":[[116,6]]},"2869":{"position":[[113,6]]},"2883":{"position":[[116,6]]},"2885":{"position":[[1217,7],[1301,8],[1913,7],[1997,8],[2558,7],[2641,8],[2933,8]]},"2897":{"position":[[117,6]]},"2911":{"position":[[112,6]]},"2925":{"position":[[116,6]]},"2939":{"position":[[114,6]]},"2953":{"position":[[115,6]]},"2967":{"position":[[113,6]]},"2981":{"position":[[113,6]]},"2995":{"position":[[114,6]]},"3009":{"position":[[119,6]]},"3023":{"position":[[121,6],[633,6],[1016,6]]},"3037":{"position":[[117,6]]},"3051":{"position":[[110,6]]},"3065":{"position":[[115,6]]},"3079":{"position":[[114,6]]}}}],["credenti",{"_index":120,"t":{"2841":{"position":[[294,12],[307,12]]},"2843":{"position":[[396,11],[501,13],[515,11],[527,11]]},"2875":{"position":[[77,11],[100,11],[216,11],[235,11],[290,11]]},"2885":{"position":[[742,11],[850,13],[864,11],[876,11],[3075,11]]},"2887":{"position":[[52,12],[65,14]]},"2913":{"position":[[322,12]]},"3043":{"position":[[71,11],[94,11],[210,11],[229,11],[284,11]]},"3053":{"position":[[345,11],[453,13],[467,11],[479,11],[638,11]]},"3055":{"position":[[214,12],[227,14]]}}}],["custom",{"_index":117,"t":{"2841":{"position":[[203,6]]},"2855":{"position":[[201,6]]},"2869":{"position":[[195,6]]},"2885":{"position":[[435,6]]},"2897":{"position":[[226,6]]},"2911":{"position":[[193,6]]},"2925":{"position":[[201,6]]},"2939":{"position":[[197,6]]},"2953":{"position":[[199,6],[361,6]]},"2967":{"position":[[195,6],[397,6]]},"2981":{"position":[[195,6],[377,6],[570,6]]},"2995":{"position":[[197,6]]},"3009":{"position":[[204,6]]},"3023":{"position":[[209,6]]},"3037":{"position":[[203,6]]},"3051":{"position":[[189,6]]},"3065":{"position":[[199,6]]},"3079":{"position":[[197,6]]}}}],["customendpoint",{"_index":234,"t":{"2885":{"position":[[400,14]]}}}],["darwin",{"_index":204,"t":{"2871":{"position":[[297,6]]}}}],["databas",{"_index":160,"t":{"2855":{"position":[[292,9]]},"2857":{"position":[[326,8],[375,8]]},"2859":{"position":[[96,9]]},"2861":{"position":[[184,8],[232,8]]},"2869":{"position":[[242,9]]},"2871":{"position":[[66,8],[118,8],[390,8]]},"2873":{"position":[[67,9]]},"2953":{"position":[[282,9],[494,9]]},"2955":{"position":[[461,8],[510,8]]},"2957":{"position":[[79,9]]},"2967":{"position":[[273,9]]},"2969":{"position":[[565,8],[614,8]]},"2971":{"position":[[78,9]]},"2981":{"position":[[273,9]]},"2983":{"position":[[580,8],[629,8]]},"2985":{"position":[[78,9]]},"2997":{"position":[[24,8]]},"3011":{"position":[[633,8],[682,8]]},"3013":{"position":[[117,9]]},"3023":{"position":[[315,9]]},"3025":{"position":[[319,8],[404,8],[524,8]]},"3027":{"position":[[96,9]]},"3065":{"position":[[250,9]]},"3067":{"position":[[24,8],[73,8],[674,9]]},"3069":{"position":[[28,9]]},"3079":{"position":[[246,9]]},"3081":{"position":[[24,8],[82,8]]},"3083":{"position":[[28,9]]}}}],["database/key",{"_index":13,"t":{"2829":{"position":[[168,12]]}}}],["database/sql",{"_index":353,"t":{"2973":{"position":[[29,12]]}}}],["db",{"_index":166,"t":{"2857":{"position":[[44,2],[133,2]]},"2955":{"position":[[53,3],[185,2],[267,2]]},"2969":{"position":[[95,3],[227,2],[309,2]]},"2981":{"position":[[594,2],[608,3],[715,3],[719,3]]},"2983":{"position":[[24,2],[130,2],[173,3],[305,2],[387,2]]},"2987":{"position":[[17,2]]},"2995":{"position":[[252,5]]},"2997":{"position":[[65,6]]},"2999":{"position":[[34,5]]},"3009":{"position":[[257,3]]},"3011":{"position":[[66,2],[177,2],[226,3],[358,2],[440,2]]},"3025":{"position":[[44,2],[126,2]]},"3071":{"position":[[17,2]]}}}],["dbpool",{"_index":378,"t":{"3009":{"position":[[261,7]]}}}],["default",{"_index":89,"t":{"2835":{"position":[[40,7]]},"2841":{"position":[[149,7]]},"2843":{"position":[[131,8],[240,7],[365,7],[490,7],[647,7]]},"2849":{"position":[[40,7]]},"2855":{"position":[[148,7]]},"2857":{"position":[[73,7],[168,7],[228,7],[293,7],[356,7],[426,7],[544,7],[625,7]]},"2863":{"position":[[40,7]]},"2869":{"position":[[145,7]]},"2871":{"position":[[96,7],[171,7],[331,7],[434,7],[534,7]]},"2873":{"position":[[24,7]]},"2877":{"position":[[40,7]]},"2885":{"position":[[374,9],[714,8],[839,7],[999,7],[1097,7],[1252,8],[1279,7],[1948,8],[1975,7],[3031,9]]},"2891":{"position":[[40,7]]},"2897":{"position":[[149,7]]},"2901":{"position":[[24,7]]},"2905":{"position":[[40,7]]},"2911":{"position":[[144,7]]},"2919":{"position":[[40,7]]},"2925":{"position":[[148,7]]},"2927":{"position":[[102,7],[214,7]]},"2933":{"position":[[40,7]]},"2939":{"position":[[146,7]]},"2941":{"position":[[64,7]]},"2947":{"position":[[40,7]]},"2953":{"position":[[147,7]]},"2955":{"position":[[127,7],[214,7],[302,7],[363,7],[428,7],[491,7],[561,7],[674,7]]},"2961":{"position":[[40,7]]},"2967":{"position":[[145,7]]},"2969":{"position":[[169,7],[256,7],[344,7],[404,7],[469,7],[532,7],[595,7],[660,7],[768,7],[849,7],[953,7]]},"2975":{"position":[[40,7]]},"2981":{"position":[[145,7]]},"2983":{"position":[[115,7],[247,7],[334,7],[422,7],[482,7],[547,7],[610,7],[675,7],[783,7],[864,7]]},"2989":{"position":[[40,7]]},"2995":{"position":[[146,7]]},"2997":{"position":[[54,7],[146,7]]},"3003":{"position":[[40,7]]},"3009":{"position":[[151,7]]},"3011":{"position":[[162,7],[300,7],[387,7],[475,7],[535,7],[600,7],[663,7],[728,7],[819,7],[923,7],[1004,7]]},"3013":{"position":[[24,7]]},"3017":{"position":[[40,7]]},"3023":{"position":[[159,7]]},"3025":{"position":[[73,7],[161,7],[221,7],[286,7],[391,7],[619,7],[772,7],[869,7],[999,7],[1067,7],[1141,7],[1252,7],[1351,7],[1445,7]]},"3031":{"position":[[40,7]]},"3037":{"position":[[149,7]]},"3045":{"position":[[40,7]]},"3051":{"position":[[142,7]]},"3053":{"position":[[190,7],[314,7],[442,7],[602,7]]},"3055":{"position":[[4,7],[133,7]]},"3059":{"position":[[40,7]]},"3065":{"position":[[147,7]]},"3067":{"position":[[54,7],[119,7],[227,7],[308,7],[574,7],[700,7],[828,7]]},"3073":{"position":[[40,7]]},"3079":{"position":[[146,7]]},"3081":{"position":[[54,7],[166,7],[247,7],[367,7],[464,7],[510,7],[609,7]]}}}],["defaultcost",{"_index":457,"t":{"3041":{"position":[[81,12]]}}}],["defin",{"_index":195,"t":{"2871":{"position":[[10,7]]},"2969":{"position":[[10,7]]},"3011":{"position":[[10,7]]},"3053":{"position":[[10,7]]},"3081":{"position":[[559,6]]}}}],["delet",{"_index":44,"t":{"2829":{"position":[[627,6],[634,7],[792,6]]},"2857":{"position":[[587,8]]},"2941":{"position":[[36,8]]},"2969":{"position":[[811,8]]},"2983":{"position":[[826,8]]},"3011":{"position":[[966,8]]},"3067":{"position":[[270,8]]},"3081":{"position":[[209,8]]}}}],["delete(key",{"_index":46,"t":{"2829":{"position":[[735,10]]},"2837":{"position":[[174,10]]},"2851":{"position":[[174,10]]},"2865":{"position":[[174,10]]},"2879":{"position":[[171,10]]},"2893":{"position":[[174,10]]},"2907":{"position":[[175,10]]},"2921":{"position":[[174,10]]},"2935":{"position":[[174,10]]},"2949":{"position":[[174,10]]},"2963":{"position":[[174,10]]},"2977":{"position":[[174,10]]},"2991":{"position":[[174,10]]},"3005":{"position":[[174,10]]},"3019":{"position":[[174,10]]},"3033":{"position":[[174,10]]},"3047":{"position":[[174,10]]},"3061":{"position":[[174,10]]},"3075":{"position":[[174,10]]}}}],["design",{"_index":5,"t":{"2829":{"position":[[62,8]]}}}],["develop",{"_index":258,"t":{"2885":{"position":[[1476,9],[1645,9],[2172,9],[2341,9]]}}}],["dgraph",{"_index":437,"t":{"3029":{"position":[[36,6]]},"3071":{"position":[[26,6]]}}}],["dialtimeout",{"_index":310,"t":{"2913":{"position":[[75,11],[141,11]]},"2915":{"position":[[67,12]]}}}],["didn't",{"_index":106,"t":{"2839":{"position":[[132,6]]},"2853":{"position":[[127,6]]},"2867":{"position":[[112,6]]},"2881":{"position":[[115,6]]},"2895":{"position":[[116,6]]},"2909":{"position":[[111,6]]},"2923":{"position":[[113,6]]},"2937":{"position":[[113,6]]},"2951":{"position":[[114,6]]},"2965":{"position":[[112,6]]},"2979":{"position":[[112,6]]},"2993":{"position":[[113,6]]},"3007":{"position":[[115,6]]},"3021":{"position":[[112,6]]},"3035":{"position":[[116,6]]},"3049":{"position":[[109,6]]},"3063":{"position":[[114,6]]},"3077":{"position":[[113,6]]}}}],["differ",{"_index":12,"t":{"2829":{"position":[[158,9]]}}}],["disabl",{"_index":350,"t":{"2967":{"position":[[369,10]]},"2969":{"position":[[964,9]]},"2971":{"position":[[174,10]]},"3011":{"position":[[830,9]]},"3013":{"position":[[169,10]]}}}],["divid",{"_index":325,"t":{"2927":{"position":[[36,7]]}}}],["docker",{"_index":239,"t":{"2885":{"position":[[535,6],[596,6]]}}}],["doesn't",{"_index":245,"t":{"2885":{"position":[[1192,7],[1888,7],[2534,7],[2702,7]]}}}],["don't",{"_index":186,"t":{"2861":{"position":[[211,5]]},"2885":{"position":[[2883,5]]},"2993":{"position":[[210,5]]}}}],["driver",{"_index":2,"t":{"2829":{"position":[[16,7]]},"2839":{"position":[[19,6]]},"2847":{"position":[[19,6],[44,6],[67,7]]},"2861":{"position":[[16,6]]},"2875":{"position":[[19,6]]},"2889":{"position":[[20,6]]},"2903":{"position":[[15,6]]},"2917":{"position":[[19,6]]},"2931":{"position":[[21,7]]},"2945":{"position":[[18,6],[48,7]]},"2959":{"position":[[16,6]]},"2973":{"position":[[16,6]]},"3001":{"position":[[19,6]]},"3015":{"position":[[16,6]]},"3029":{"position":[[23,6]]},"3043":{"position":[[13,6]]},"3057":{"position":[[18,6]]}}}],["driver.cli",{"_index":151,"t":{"2851":{"position":[[288,13]]}}}],["driver/mysql",{"_index":355,"t":{"2973":{"position":[[53,13]]}}}],["dure",{"_index":372,"t":{"2997":{"position":[[106,6]]}}}],["dynamodb",{"_index":60,"t":{"2831":{"position":[[42,8]]},"2875":{"position":[[2,8]]},"2881":{"position":[[0,8],[193,8]]},"2883":{"position":[[148,8]]},"2885":{"position":[[38,8],[326,8],[442,8],[518,9],[1467,8],[1636,8],[2163,8],[2332,8]]}}}],["dynamodb.new(dynamodb.config",{"_index":223,"t":{"2883":{"position":[[166,29]]}}}],["e.g",{"_index":229,"t":{"2885":{"position":[[161,4]]}}}],["each",{"_index":427,"t":{"3025":{"position":[[972,4]]}}}],["ec2",{"_index":216,"t":{"2875":{"position":[[177,3]]},"3043":{"position":[[171,3]]}}}],["effect",{"_index":412,"t":{"3025":{"position":[[541,7]]}}}],["empti",{"_index":37,"t":{"2829":{"position":[[518,5]]}}}],["enabl",{"_index":418,"t":{"3025":{"position":[[715,7]]}}}],["encount",{"_index":141,"t":{"2843":{"position":[[584,9]]},"2885":{"position":[[933,9]]},"3053":{"position":[[536,9]]}}}],["endpoint",{"_index":124,"t":{"2843":{"position":[[108,9],[191,8]]},"2845":{"position":[[56,9]]},"2885":{"position":[[459,9],[723,8]]},"2911":{"position":[[233,10]]},"2913":{"position":[[24,9],[53,9]]},"2915":{"position":[[28,10]]},"3051":{"position":[[255,9],[269,10]]},"3053":{"position":[[102,8],[111,8]]},"3055":{"position":[[52,8],[200,9]]}}}],["environ",{"_index":213,"t":{"2875":{"position":[[131,11]]},"2885":{"position":[[224,11],[261,11]]},"3043":{"position":[[125,11]]}}}],["err",{"_index":397,"t":{"3023":{"position":[[675,3],[737,3]]}}}],["error",{"_index":30,"t":{"2829":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"2837":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2851":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2865":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2879":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"2885":{"position":[[2737,5],[3002,7]]},"2893":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2907":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"2921":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2935":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2949":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2963":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2977":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2991":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3005":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3019":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3033":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3047":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3061":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3075":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]}}}],["especi",{"_index":236,"t":{"2885":{"position":[[480,10]]}}}],["establish",{"_index":312,"t":{"2913":{"position":[[117,9]]}}}],["etcd",{"_index":61,"t":{"2831":{"position":[[51,4]]},"2861":{"position":[[29,4]]},"2903":{"position":[[2,4],[28,4]]},"2909":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":305,"t":{"2911":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":306,"t":{"2911":{"position":[[216,16]]}}}],["exampl",{"_index":87,"t":{"2835":{"position":[[24,8]]},"2849":{"position":[[24,8]]},"2863":{"position":[[24,8]]},"2877":{"position":[[24,8]]},"2885":{"position":[[1407,7],[2103,7]]},"2891":{"position":[[24,8]]},"2905":{"position":[[24,8]]},"2919":{"position":[[24,8]]},"2933":{"position":[[24,8]]},"2947":{"position":[[24,8]]},"2961":{"position":[[24,8]]},"2975":{"position":[[24,8]]},"2989":{"position":[[24,8]]},"3003":{"position":[[24,8]]},"3017":{"position":[[24,8]]},"3025":{"position":[[555,8]]},"3031":{"position":[[24,8]]},"3045":{"position":[[24,8]]},"3059":{"position":[[24,8]]},"3073":{"position":[[24,8]]}}}],["execut",{"_index":424,"t":{"3025":{"position":[[920,7]]}}}],["exist",{"_index":26,"t":{"2829":{"position":[[371,5]]},"2843":{"position":[[315,8],[332,8]]},"2857":{"position":[[491,8],[508,8]]},"2871":{"position":[[485,8],[502,8]]},"2885":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"2927":{"position":[[166,8],[183,8]]},"2955":{"position":[[626,8],[643,8]]},"2969":{"position":[[720,8],[737,8]]},"2983":{"position":[[735,8],[752,8]]},"2993":{"position":[[224,8]]},"3011":{"position":[[875,8],[892,8]]},"3025":{"position":[[1199,8],[1216,8]]},"3053":{"position":[[265,8],[282,8]]},"3067":{"position":[[179,8],[196,8]]},"3081":{"position":[[118,8],[135,8]]}}}],["exp",{"_index":42,"t":{"2829":{"position":[[599,3]]},"2837":{"position":[[131,3]]},"2851":{"position":[[131,3]]},"2865":{"position":[[131,3]]},"2879":{"position":[[128,3]]},"2893":{"position":[[131,3]]},"2907":{"position":[[132,3]]},"2921":{"position":[[131,3]]},"2935":{"position":[[131,3]]},"2949":{"position":[[131,3]]},"2963":{"position":[[131,3]]},"2977":{"position":[[131,3]]},"2991":{"position":[[131,3]]},"3005":{"position":[[131,3]]},"3019":{"position":[[131,3]]},"3033":{"position":[[131,3]]},"3047":{"position":[[131,3]]},"3061":{"position":[[131,3]]},"3075":{"position":[[131,3]]}}}],["expir",{"_index":34,"t":{"2829":{"position":[[474,10],[503,11]]},"2857":{"position":[[596,7]]},"2941":{"position":[[45,7]]},"2969":{"position":[[820,7]]},"2983":{"position":[[835,7]]},"3011":{"position":[[975,7]]},"3067":{"position":[[279,7]]},"3081":{"position":[[218,7]]}}}],["fail",{"_index":311,"t":{"2913":{"position":[[106,7]]}}}],["failov",{"_index":390,"t":{"3023":{"position":[[419,8]]}}}],["failovercli",{"_index":419,"t":{"3025":{"position":[[723,14]]}}}],["failur",{"_index":143,"t":{"2843":{"position":[[604,8]]},"2885":{"position":[[953,8]]},"3053":{"position":[[556,8]]}}}],["fals",{"_index":131,"t":{"2843":{"position":[[376,5]]},"2845":{"position":[[96,6]]},"2855":{"position":[[347,6]]},"2857":{"position":[[555,5]]},"2859":{"position":[[151,6]]},"2869":{"position":[[298,6]]},"2871":{"position":[[445,5],[545,5]]},"2873":{"position":[[151,6],[165,6]]},"2885":{"position":[[1108,5],[2786,6]]},"2887":{"position":[[103,6]]},"2927":{"position":[[225,5]]},"2953":{"position":[[337,6],[549,6]]},"2955":{"position":[[685,5]]},"2957":{"position":[[134,6]]},"2967":{"position":[[323,6],[548,6]]},"2969":{"position":[[779,5]]},"2971":{"position":[[128,6]]},"2981":{"position":[[323,6],[516,6],[730,6]]},"2983":{"position":[[794,5]]},"2985":{"position":[[128,6]]},"3009":{"position":[[300,6]]},"3011":{"position":[[934,5]]},"3013":{"position":[[187,6]]},"3023":{"position":[[335,6],[1003,6],[1160,6]]},"3025":{"position":[[1263,5]]},"3027":{"position":[[116,6]]},"3051":{"position":[[308,6]]},"3053":{"position":[[325,5]]},"3055":{"position":[[284,6]]},"3065":{"position":[[310,6]]},"3067":{"position":[[238,5]]},"3069":{"position":[[88,6]]},"3079":{"position":[[281,6]]},"3081":{"position":[[177,5],[620,5]]},"3083":{"position":[[63,6],[196,6]]}}}],["fast",{"_index":184,"t":{"2861":{"position":[[165,5]]},"2987":{"position":[[2,4]]},"3071":{"position":[[2,4]]}}}],["fiber",{"_index":8,"t":{"2829":{"position":[[95,5]]},"2855":{"position":[[302,8]]},"2857":{"position":[[367,7]]},"2859":{"position":[[106,8]]},"2953":{"position":[[292,8],[504,8]]},"2955":{"position":[[502,7]]},"2957":{"position":[[89,8]]},"2967":{"position":[[283,8]]},"2969":{"position":[[606,7]]},"2971":{"position":[[88,8]]},"2981":{"position":[[283,8]]},"2983":{"position":[[621,7]]},"2985":{"position":[[88,8]]},"3011":{"position":[[674,7]]},"3013":{"position":[[127,8]]},"3067":{"position":[[65,7]]}}}],["fiber.badg",{"_index":483,"t":{"3079":{"position":[[256,17]]},"3081":{"position":[[65,16]]},"3083":{"position":[[38,17]]}}}],["fiber.db",{"_index":197,"t":{"2871":{"position":[[107,10]]},"2873":{"position":[[77,11]]}}}],["fiber.sqlite3",{"_index":469,"t":{"3065":{"position":[[260,18]]},"3069":{"position":[[38,18]]}}}],["fiber_storag",{"_index":162,"t":{"2855":{"position":[[323,16]]},"2857":{"position":[[437,15]]},"2859":{"position":[[127,16]]},"2871":{"position":[[182,15]]},"2873":{"position":[[97,16]]},"2885":{"position":[[354,16]]},"2887":{"position":[[35,16]]},"2901":{"position":[[138,16]]},"2953":{"position":[[313,16],[525,16]]},"2955":{"position":[[572,15]]},"2957":{"position":[[110,16]]},"2967":{"position":[[299,16]]},"2969":{"position":[[671,15]]},"2971":{"position":[[104,16]]},"2981":{"position":[[299,16]]},"2983":{"position":[[686,15]]},"2985":{"position":[[104,16]]},"3009":{"position":[[276,16]]},"3011":{"position":[[739,15]]},"3013":{"position":[[143,16]]},"3065":{"position":[[286,16]]},"3067":{"position":[[130,15]]},"3069":{"position":[[64,16]]}}}],["field",{"_index":172,"t":{"2859":{"position":[[23,6]]},"2875":{"position":[[67,6],[206,6]]},"3011":{"position":[[139,6]]},"3043":{"position":[[61,6],[200,6]]}}}],["file",{"_index":201,"t":{"2871":{"position":[[265,4]]},"2885":{"position":[[216,4]]}}}],["first",{"_index":105,"t":{"2839":{"position":[[119,5]]},"2853":{"position":[[114,5]]},"2867":{"position":[[99,5]]},"2881":{"position":[[102,5]]},"2895":{"position":[[103,5]]},"2909":{"position":[[98,5]]},"2923":{"position":[[100,5]]},"2937":{"position":[[100,5]]},"2951":{"position":[[101,5]]},"2965":{"position":[[99,5]]},"2979":{"position":[[99,5]]},"2993":{"position":[[100,5]]},"3007":{"position":[[102,5]]},"3021":{"position":[[99,5]]},"3035":{"position":[[103,5]]},"3049":{"position":[[96,5]]},"3063":{"position":[[101,5]]},"3077":{"position":[[100,5]]}}}],["follow",{"_index":113,"t":{"2841":{"position":[[90,9]]},"2855":{"position":[[89,9]]},"2869":{"position":[[86,9]]},"2883":{"position":[[89,9]]},"2897":{"position":[[90,9]]},"2911":{"position":[[85,9]]},"2925":{"position":[[89,9]]},"2939":{"position":[[87,9]]},"2953":{"position":[[88,9]]},"2967":{"position":[[86,9]]},"2981":{"position":[[86,9]]},"2995":{"position":[[87,9]]},"3009":{"position":[[92,9]]},"3023":{"position":[[100,9]]},"3037":{"position":[[90,9]]},"3051":{"position":[[83,9]]},"3065":{"position":[[88,9]]},"3079":{"position":[[87,9]]}}}],["format",{"_index":411,"t":{"3025":{"position":[[433,6]]}}}],["free",{"_index":254,"t":{"2885":{"position":[[1369,4],[2065,4]]}}}],["frequenc",{"_index":447,"t":{"3037":{"position":[[303,9]]},"3039":{"position":[[60,9]]}}}],["full",{"_index":187,"t":{"2861":{"position":[[227,4]]}}}],["func",{"_index":90,"t":{"2837":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2851":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2865":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2879":{"position":[[0,4],[32,4],[82,4],[153,4],[196,4],[228,4],[260,4]]},"2893":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2907":{"position":[[0,4],[36,4],[86,4],[157,4],[200,4],[232,4],[264,4]]},"2921":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2935":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2949":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2963":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2977":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2991":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3005":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3019":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3033":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3047":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3061":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3075":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]}}}],["garbag",{"_index":51,"t":{"2829":{"position":[[877,7]]}}}],["gcinterv",{"_index":163,"t":{"2855":{"position":[[354,11]]},"2857":{"position":[[653,10]]},"2859":{"position":[[158,11]]},"2939":{"position":[[246,11]]},"2941":{"position":[[92,10]]},"2943":{"position":[[28,11]]},"2967":{"position":[[330,11],[555,11]]},"2969":{"position":[[877,10]]},"2971":{"position":[[135,11]]},"2981":{"position":[[330,11],[523,11],[737,11]]},"2983":{"position":[[892,10]]},"2985":{"position":[[135,11]]},"3009":{"position":[[307,11]]},"3011":{"position":[[1032,10]]},"3013":{"position":[[194,11]]},"3065":{"position":[[317,11]]},"3067":{"position":[[336,10]]},"3069":{"position":[[95,11]]},"3079":{"position":[[288,11]]},"3081":{"position":[[275,10]]},"3083":{"position":[[70,11]]}}}],["get",{"_index":21,"t":{"2829":{"position":[[289,4]]}}}],["get(key",{"_index":27,"t":{"2829":{"position":[[377,7]]},"2837":{"position":[[53,7]]},"2851":{"position":[[53,7]]},"2865":{"position":[[53,7]]},"2879":{"position":[[50,7]]},"2893":{"position":[[53,7]]},"2907":{"position":[[54,7]]},"2921":{"position":[[53,7]]},"2935":{"position":[[53,7]]},"2949":{"position":[[53,7]]},"2963":{"position":[[53,7]]},"2977":{"position":[[53,7]]},"2991":{"position":[[53,7]]},"3005":{"position":[[53,7]]},"3019":{"position":[[53,7]]},"3033":{"position":[[53,7]]},"3047":{"position":[[53,7]]},"3061":{"position":[[53,7]]},"3075":{"position":[[53,7]]}}}],["github.com//:@127.0.0.1:6379/:@localhost:6379/:@tcp(:)// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/etcd_v1.x.x/arangodb/","h":"#installation","p":3089},{"i":3098,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/arangodb/","h":"#examples","p":3089},{"i":3100,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/arangodb/","h":"#config","p":3089},{"i":3102,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/arangodb/","h":"#default-config","p":3089},{"i":3104,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/etcd_v1.x.x/azureblob/","h":"","p":3103},{"i":3106,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/azureblob/","h":"#table-of-contents","p":3103},{"i":3108,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/azureblob/","h":"#signatures","p":3103},{"i":3110,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/etcd_v1.x.x/azureblob/","h":"#installation","p":3103},{"i":3112,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/etcd_v1.x.x/azureblob/","h":"#examples","p":3103},{"i":3114,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/etcd_v1.x.x/azureblob/","h":"#config","p":3103},{"i":3116,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/etcd_v1.x.x/azureblob/","h":"#default-config","p":3103},{"i":3118,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/etcd_v1.x.x/badger/","h":"","p":3117},{"i":3120,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/badger/","h":"#table-of-contents","p":3117},{"i":3122,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/badger/","h":"#signatures","p":3117},{"i":3124,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/etcd_v1.x.x/badger/","h":"#installation","p":3117},{"i":3126,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/badger/","h":"#examples","p":3117},{"i":3128,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/etcd_v1.x.x/badger/","h":"#config","p":3117},{"i":3130,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/etcd_v1.x.x/badger/","h":"#default-config","p":3117},{"i":3132,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/etcd_v1.x.x/bbolt/","h":"","p":3131},{"i":3134,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/bbolt/","h":"#table-of-contents","p":3131},{"i":3136,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/bbolt/","h":"#signatures","p":3131},{"i":3138,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/etcd_v1.x.x/bbolt/","h":"#installation","p":3131},{"i":3140,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/etcd_v1.x.x/bbolt/","h":"#examples","p":3131},{"i":3142,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/etcd_v1.x.x/bbolt/","h":"#config","p":3131},{"i":3144,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/etcd_v1.x.x/bbolt/","h":"#default-config","p":3131},{"i":3146,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/etcd_v1.x.x/couchbase/","h":"","p":3145},{"i":3148,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/couchbase/","h":"#table-of-contents","p":3145},{"i":3150,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/etcd_v1.x.x/couchbase/","h":"#signatures","p":3145},{"i":3152,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/etcd_v1.x.x/couchbase/","h":"#installation","p":3145},{"i":3154,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/couchbase/","h":"#examples","p":3145},{"i":3156,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/couchbase/","h":"#config","p":3145},{"i":3158,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/couchbase/","h":"#default-config","p":3145},{"i":3160,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/etcd_v1.x.x/dynamodb/","h":"","p":3159},{"i":3162,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#table-of-contents","p":3159},{"i":3164,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#signatures","p":3159},{"i":3166,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#installation","p":3159},{"i":3168,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#examples","p":3159},{"i":3170,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#config","p":3159},{"i":3172,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/etcd_v1.x.x/dynamodb/","h":"#default-config","p":3159},{"i":3174,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/etcd_v1.x.x/etcd/","h":"","p":3173},{"i":3176,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/etcd/","h":"#table-of-contents","p":3173},{"i":3178,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/etcd/","h":"#signatures","p":3173},{"i":3180,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/etcd_v1.x.x/etcd/","h":"#installation","p":3173},{"i":3182,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/etcd_v1.x.x/etcd/","h":"#examples","p":3173},{"i":3184,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/etcd_v1.x.x/etcd/","h":"#config","p":3173},{"i":3186,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/etcd_v1.x.x/etcd/","h":"#default-config","p":3173},{"i":3188,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/etcd_v1.x.x/memcache/","h":"","p":3187},{"i":3190,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/memcache/","h":"#table-of-contents","p":3187},{"i":3192,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/memcache/","h":"#signatures","p":3187},{"i":3194,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/etcd_v1.x.x/memcache/","h":"#installation","p":3187},{"i":3196,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/etcd_v1.x.x/memcache/","h":"#examples","p":3187},{"i":3198,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/etcd_v1.x.x/memcache/","h":"#config","p":3187},{"i":3200,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/etcd_v1.x.x/memcache/","h":"#default-config","p":3187},{"i":3202,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/etcd_v1.x.x/memory/","h":"","p":3201},{"i":3204,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/memory/","h":"#table-of-contents","p":3201},{"i":3206,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/etcd_v1.x.x/memory/","h":"#signatures","p":3201},{"i":3208,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/etcd_v1.x.x/memory/","h":"#installation","p":3201},{"i":3210,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/memory/","h":"#examples","p":3201},{"i":3212,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/memory/","h":"#config","p":3201},{"i":3214,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/memory/","h":"#default-config","p":3201},{"i":3216,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/etcd_v1.x.x/mongodb/","h":"","p":3215},{"i":3218,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/mongodb/","h":"#table-of-contents","p":3215},{"i":3220,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/etcd_v1.x.x/mongodb/","h":"#signatures","p":3215},{"i":3222,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/etcd_v1.x.x/mongodb/","h":"#installation","p":3215},{"i":3224,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/etcd_v1.x.x/mongodb/","h":"#examples","p":3215},{"i":3226,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/etcd_v1.x.x/mongodb/","h":"#config","p":3215},{"i":3228,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/etcd_v1.x.x/mongodb/","h":"#default-config","p":3215},{"i":3230,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/etcd_v1.x.x/mssql/","h":"","p":3229},{"i":3232,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/mssql/","h":"#table-of-contents","p":3229},{"i":3234,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/mssql/","h":"#signatures","p":3229},{"i":3236,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/etcd_v1.x.x/mssql/","h":"#installation","p":3229},{"i":3238,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/mssql/","h":"#examples","p":3229},{"i":3240,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/etcd_v1.x.x/mssql/","h":"#config","p":3229},{"i":3242,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/etcd_v1.x.x/mssql/","h":"#default-config","p":3229},{"i":3244,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/etcd_v1.x.x/mysql/","h":"","p":3243},{"i":3246,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/mysql/","h":"#table-of-contents","p":3243},{"i":3248,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/mysql/","h":"#signatures","p":3243},{"i":3250,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/etcd_v1.x.x/mysql/","h":"#installation","p":3243},{"i":3252,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/mysql/","h":"#examples","p":3243},{"i":3254,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/mysql/","h":"#config","p":3243},{"i":3256,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/mysql/","h":"#default-config","p":3243},{"i":3258,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/etcd_v1.x.x/pebble/","h":"","p":3257},{"i":3260,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/pebble/","h":"#table-of-contents","p":3257},{"i":3262,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/pebble/","h":"#signatures","p":3257},{"i":3264,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/etcd_v1.x.x/pebble/","h":"#installation","p":3257},{"i":3266,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/etcd_v1.x.x/pebble/","h":"#examples","p":3257},{"i":3268,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/etcd_v1.x.x/pebble/","h":"#config","p":3257},{"i":3270,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/etcd_v1.x.x/pebble/","h":"#default-config","p":3257},{"i":3272,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/etcd_v1.x.x/postgres/","h":"","p":3271},{"i":3274,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/postgres/","h":"#table-of-contents","p":3271},{"i":3276,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/etcd_v1.x.x/postgres/","h":"#signatures","p":3271},{"i":3278,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/etcd_v1.x.x/postgres/","h":"#installation","p":3271},{"i":3280,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/postgres/","h":"#examples","p":3271},{"i":3282,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/postgres/","h":"#config","p":3271},{"i":3284,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/postgres/","h":"#default-config","p":3271},{"i":3286,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/etcd_v1.x.x/ristretto/","h":"","p":3285},{"i":3288,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/ristretto/","h":"#table-of-contents","p":3285},{"i":3290,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/etcd_v1.x.x/ristretto/","h":"#signatures","p":3285},{"i":3292,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/etcd_v1.x.x/ristretto/","h":"#installation","p":3285},{"i":3294,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/etcd_v1.x.x/ristretto/","h":"#examples","p":3285},{"i":3296,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/etcd_v1.x.x/ristretto/","h":"#config","p":3285},{"i":3298,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/etcd_v1.x.x/ristretto/","h":"#default-config","p":3285},{"i":3300,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/etcd_v1.x.x/s3/","h":"","p":3299},{"i":3302,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/s3/","h":"#table-of-contents","p":3299},{"i":3304,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/etcd_v1.x.x/s3/","h":"#signatures","p":3299},{"i":3306,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/etcd_v1.x.x/s3/","h":"#installation","p":3299},{"i":3308,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/etcd_v1.x.x/s3/","h":"#examples","p":3299},{"i":3310,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/etcd_v1.x.x/s3/","h":"#config","p":3299},{"i":3312,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/etcd_v1.x.x/s3/","h":"#default-config","p":3299},{"i":3314,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/etcd_v1.x.x/sqlite3/","h":"","p":3313},{"i":3316,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#table-of-contents","p":3313},{"i":3318,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#signatures","p":3313},{"i":3320,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#installation","p":3313},{"i":3322,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#examples","p":3313},{"i":3324,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#config","p":3313},{"i":3326,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/etcd_v1.x.x/sqlite3/","h":"#default-config","p":3313},{"i":3328,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/etcd_v1.x.x/redis/","h":"","p":3327},{"i":3330,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/etcd_v1.x.x/redis/","h":"#table-of-contents","p":3327},{"i":3332,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/etcd_v1.x.x/redis/","h":"#signatures","p":3327},{"i":3334,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/etcd_v1.x.x/redis/","h":"#installation","p":3327},{"i":3336,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/etcd_v1.x.x/redis/","h":"#examples","p":3327},{"i":3338,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/etcd_v1.x.x/redis/","h":"#config","p":3327},{"i":3340,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/etcd_v1.x.x/redis/","h":"#default-config","p":3327}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3086",[0,2.408,1,1.183,2,1.08,3,1.021,4,4.843,5,2.408,6,0.588,7,2.408,8,1.112,9,2.408,10,1.49,11,2.408,12,2.408,13,2.408,14,3.958,15,2.131,16,2.408,17,2.408,18,2.408,19,2.408,20,1.021,21,2.408,22,4.489,23,2.813,24,2.177,25,3.13,26,1.145,27,1.021,28,1.287,29,1.64,30,2.813,31,1.705,32,0.994,33,2.408,34,2.36,35,1.41,36,2.408,37,2.408,38,2.408,39,2.408,40,1.021,41,1.021,42,1.021,43,0.762,44,2.957,45,1.705,46,1.021,47,0.937,48,2.054,49,2.408,50,2.131,51,2.408,52,2.408,53,1.95,54,1.262]],["t/3088",[55,4.571,56,5.645,57,4.571,58,4.252,59,3.998,60,3.998,61,4.252,62,4.997,63,3.998,64,4.571,65,4.571,66,3.998,67,4.997,68,4.252,69,3.998,70,3.998,71,4.571]],["t/3090",[1,1.131,2,3.761,6,1.589,55,5.272,72,7.823]],["t/3092",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3094",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,82,4.122]],["t/3096",[3,2.17,55,4.143,66,3.623,74,1.45,83,2.112,84,2.112,85,2.23,86,5.116,87,2.733,88,2.23,89,2.17,90,2.23,91,2.17,92,2.17,93,1.45,94,2.17,95,2.23,96,2.23,97,2.23,98,2.23,99,2.23,100,4.529]],["t/3098",[1,1.032,6,1.04,8,1.967,10,1.493,32,2.452,47,0.824,76,0.458,77,0.824,93,1.683,100,3.771,101,2.589,102,1.857,103,1.857,104,1.91,105,1.807,106,4.26,107,1.857,108,4.26,109,1.759,110,3.45,111,1.91,112,3.45,113,1.444,114,2.721,115,1.628,116,1.234,117,1.714,118,1.589,119,1.514]],["t/3100",[8,1.194,10,1.657,20,1.097,23,1.69,26,1.947,28,1.672,34,1.58,43,0.819,44,1.58,47,0.792,76,0.199,77,1.406,109,2.097,110,2.095,111,1.836,112,2.095,113,1.388,114,3.244,115,0.989,116,0.749,117,1.041,118,0.965,119,0.919,120,1.128,121,2.416,122,2.074,123,3.355,124,1.735,125,1.457,126,2.305,127,2.074,128,2.074,129,1.311,130,1.311,131,1.404,132,1.58]],["t/3102",[6,1.283,8,2.427,10,1.41,47,1.017,76,0.405,109,2.171,110,4.256,111,2.357,112,4.256,113,1.782,114,3.357,115,2.009,116,1.523,117,2.114,118,1.96,119,1.868,123,2.427,133,3.96,134,2.292,135,2.292]],["t/3104",[1,1.268,87,2.117,136,5.15,137,5.15,138,5.817,139,5.15,140,5.817,141,5.817,142,4.382,143,5.817,144,5.817,145,4.12,146,5.817,147,5.817]],["t/3106",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3108",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,148,4.122]],["t/3110",[1,0.854,2,2.206,3,2.086,74,1.394,83,2.031,84,2.031,85,2.144,87,2.68,88,2.144,89,2.086,90,2.144,91,2.086,92,2.086,93,1.394,94,2.086,95,2.144,96,2.144,97,2.144,98,2.144,99,2.144,136,5.798,137,5.798,149,4.354]],["t/3112",[1,1.056,6,1.076,10,1.509,23,1.82,32,2.511,45,3.122,76,0.469,77,0.853,83,2.874,93,1.723,101,2.651,102,1.922,103,1.922,104,1.977,105,1.869,107,1.922,149,3.902,150,4.407,151,4.407,152,4.924,153,3.561,154,4.407]],["t/3114",[1,0.782,10,1.555,20,1.24,23,2.268,26,2.142,28,1.459,35,1.712,43,0.925,45,3.891,47,0.871,76,0.225,77,1.289,116,0.847,120,1.275,121,2.142,123,3.077,125,1.646,129,1.481,130,1.481,131,1.587,152,3.647,153,3.614,155,2.637,156,2.923,157,3.647,158,2.876,159,2.202,160,1.867,161,3.647,162,3.647,163,2.367,164,2.367,165,1.867,166,1.867,167,2.367,168,2.367,169,2.367,170,2.367,171,1.785,172,1.961]],["t/3116",[10,1.583,35,3.306,45,3.998,47,1.092,76,0.435,116,1.635,134,2.461,135,2.461,152,4.571,155,3.306,159,4.252,171,3.447,172,3.786]],["t/3118",[6,1.616,14,4.044,23,2.735,122,3.356,173,5.363,174,5.864,175,6.623]],["t/3120",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3122",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3124",[3,2.199,57,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,177,4.59]],["t/3126",[1,1.082,6,1.114,10,1.525,32,2.572,47,0.883,76,0.48,77,0.883,93,1.765,101,2.716,102,1.99,103,1.99,104,2.047,105,1.936,107,1.99,113,1.548,116,1.322,117,1.836,118,1.703,119,1.622,177,4.042,178,4.565,179,4.565,180,3.697]],["t/3128",[6,1.086,10,1.63,20,1.221,23,1.838,24,1.621,26,2.117,28,0.765,31,2.039,34,1.758,43,0.911,44,1.758,47,0.861,57,3.604,76,0.222,77,1.411,113,1.509,116,1.289,117,1.158,118,1.074,119,1.023,120,1.255,121,1.37,123,3.368,129,1.459,130,2.255,131,1.563,132,1.758,180,2.332,181,1.291,182,3.94,183,2.879,184,2.879,185,2.879,186,5.419,187,2.879,188,3.94,189,2.039]],["t/3130",[10,1.439,24,3.088,47,1.061,76,0.423,113,1.858,116,2.037,117,2.205,118,2.045,119,1.948,134,2.39,135,2.39,180,4.44,182,4.854,186,4.854,188,4.854,190,5.483]],["t/3132",[1,0.803,2,2.072,6,1.128,15,4.091,32,1.908,58,3.481,61,3.481,66,3.273,68,3.481,87,1.682,113,2.129,126,2.602,145,3.273,173,3.742,191,4.621,192,4.621,193,4.621,194,4.621,195,4.621,196,4.621,197,4.621,198,4.621,199,7.134,200,4.621,201,4.621,202,4.621,203,3.742,204,4.621,205,4.621]],["t/3134",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3136",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,206,4.122]],["t/3138",[3,2.199,58,3.906,70,3.673,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,207,4.59]],["t/3140",[1,1.1,6,1.141,10,1.49,32,2.615,47,0.905,76,0.488,77,0.905,93,1.795,101,2.761,102,2.039,103,2.039,104,2.098,105,1.984,107,2.039,113,1.585,116,1.355,207,4.141,208,4.677,209,4.677,210,4.677,211,3.566]],["t/3142",[1,0.516,10,1.629,20,1.259,23,1.226,26,2.168,28,1.211,43,0.94,47,0.881,53,2.404,58,2.237,76,0.428,77,1.298,113,1.88,115,1.135,116,1.32,119,1.055,120,1.294,121,1.412,123,3.098,129,1.504,130,2.309,131,1.611,158,2.911,189,2.103,211,3.123,212,2.237,213,2.628,214,2.628,215,2.969,216,2.969,217,2.628,218,2.969,219,2.628,220,2.969,221,2.969,222,2.628,223,2.628,224,2.404,225,2.628]],["t/3144",[10,1.501,47,1.031,76,0.532,77,1.031,113,1.807,115,2.037,116,2,119,1.894,134,2.324,135,3.01,158,3.404,211,3.001,213,4.718,222,4.718,225,4.718]],["t/3146",[1,1.192,2,3.077,6,1.674,59,4.86,226,6.861]],["t/3148",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3150",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,227,4.122]],["t/3152",[3,2.199,59,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,228,4.59]],["t/3154",[1,1.174,6,1.017,10,1.522,32,2.415,35,2.44,59,2.952,76,0.451,77,0.806,93,1.657,101,2.549,102,1.817,103,1.817,104,1.869,105,1.768,107,1.817,109,1.721,119,2.078,127,2.112,128,2.112,171,2.544,211,2.347,228,3.689,229,4.167,230,4.167,231,3.689,232,3.374,233,3.374,234,2.661]],["t/3156",[10,1.52,20,1.626,28,1.985,43,1.744,54,3.916,59,5.293,76,0.296,109,1.583,120,1.671,121,1.823,127,2.792,128,2.792,158,3.519,211,3.103,232,3.104,233,3.104,235,5.51,236,6.616,237,3.833,238,3.393]],["t/3158",[10,1.529,76,0.514,77,0.976,109,2.085,115,1.93,119,2.368,127,2.558,128,2.558,134,2.201,135,2.905,171,3.082,211,2.843,231,4.469,232,4.088,233,4.088,234,3.224,239,5.048,240,5.048]],["t/3160",[1,0.803,2,2.072,6,1.741,10,0.856,22,5.085,60,3.273,76,0.55,87,1.682,133,4.731,142,3.481,153,4.688,241,4.091,242,4.091,243,4.091,244,3.742,245,3.742,246,4.091,247,4.091,248,3.742,249,4.091,250,4.091,251,4.091]],["t/3162",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3164",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,252,4.122]],["t/3166",[3,2.199,60,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,253,4.59]],["t/3168",[1,1.244,6,1.378,10,1.458,32,2.331,60,3.998,93,1.6,101,3.123,102,2.461,103,2.461,104,2.531,105,2.394,253,4.997,254,5.645]],["t/3170",[6,0.491,10,1.55,14,2.039,20,0.854,23,1.13,25,1.63,26,2.036,28,1.022,30,0.831,31,1.425,45,1.425,47,0.389,50,0.993,60,3.528,75,0.831,76,0.155,77,1.069,83,0.463,84,0.463,91,0.476,92,0.476,105,1.974,107,0.489,115,0.429,116,0.583,120,0.877,121,0.533,123,2.433,125,0.631,129,0.568,130,1.02,131,0.609,132,0.685,145,1.425,153,2.252,155,1.179,157,0.908,158,0.716,160,0.716,161,1.63,162,1.63,163,0.908,164,0.908,165,0.716,166,0.716,167,0.908,168,0.908,169,0.908,170,0.908,171,0.685,172,0.752,181,2.83,203,0.908,211,0.631,217,0.993,223,1.782,244,1.63,245,1.63,255,1.516,256,2.012,257,1.121,258,1.121,259,1.121,260,1.121,261,1.121,262,1.121,263,1.121,264,1.121,265,1.121,266,1.121,267,1.121,268,2.738,269,2.012,270,1.121,271,1.121,272,3.846,273,1.121,274,2.424,275,3.339,276,3.846,277,1.782,278,2.012,279,2.012,280,2.012,281,2.012,282,2.012,283,2.012,284,2.012,285,2.012,286,2.012,287,3.339,288,3.339,289,2.012,290,2.012,291,2.012,292,2.012,293,2.012,294,2.012,295,2.012,296,1.782,297,0.993,298,2.424,299,1.782,300,1.121,301,1.121,302,2.012,303,1.782,304,1.121,305,0.845,306,1.121,307,1.121,308,1.121,309,1.121,310,0.993,311,1.121,312,1.121,313,1.121,314,0.993,315,0.993]],["t/3172",[10,1.303,47,1.061,76,0.423,115,2.096,116,1.588,134,2.39,135,2.39,153,4.118,171,3.348,172,3.678,181,2.459,274,4.854,277,6.225,297,4.854,298,4.854,316,5.483]],["t/3174",[1,1.171,2,3.023,6,1.645,61,6.017,317,6.74]],["t/3176",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3178",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,318,4.122]],["t/3180",[3,2.199,61,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,319,4.59]],["t/3182",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,155,2.88,319,4.354,320,4.918,321,4.918,322,4.354]],["t/3184",[10,1.532,20,1.807,28,1.816,43,1.348,54,2.232,76,0.328,120,1.857,127,3.464,128,3.464,153,2.495,155,3.478,158,2.721,305,3.209,323,3.45,324,3.017,325,5.257,326,4.26,327,4.26,328,4.206,329,4.474,330,4.26,331,4.26,332,3.45]],["t/3186",[10,1.583,24,3.179,76,0.435,84,2.331,119,2.006,127,2.86,128,2.86,134,2.461,135,2.461,155,3.306,322,4.997,325,4.997,329,4.252]],["t/3188",[1,1.192,2,3.077,6,1.674,62,6.074,333,6.861]],["t/3190",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3192",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,334,4.122]],["t/3194",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3196",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,126,2.77,336,4.918,337,4.918,338,4.918,339,4.918]],["t/3198",[10,1.622,20,1.891,23,1.841,26,2.916,28,1.185,47,1.186,76,0.344,77,1.186,116,1.292,120,1.944,123,2.83,126,3.451,129,2.259,130,2.259,181,2,323,3.611,340,4.459,341,4.459,342,4.459,343,4.459,344,3.947]],["t/3200",[10,1.465,76,0.511,126,3.73,134,2.888,135,2.888,344,5.864]],["t/3202",[1,1.236,2,3.192,63,5.041]],["t/3204",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3206",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,345,4.122]],["t/3208",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3210",[1,1.119,6,1.17,10,1.547,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,117,1.929,118,1.788,119,1.704,335,3.883,346,4.795,347,4.795]],["t/3212",[10,1.606,20,2.326,23,2.264,34,3.348,43,1.735,44,3.348,76,0.423,77,1.061,117,2.205,118,2.045,119,1.948,120,2.39,131,2.976,132,3.348]],["t/3214",[10,1.543,76,0.494,117,2.575,118,2.387,119,2.274,134,2.791,135,2.791]],["t/3216",[1,1.151,2,3.545,6,1.616,64,5.363,87,2.411,348,6.623]],["t/3218",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3220",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,349,4.122]],["t/3222",[3,2.199,64,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,350,4.59]],["t/3224",[1,0.924,6,1.298,8,2.455,10,1.5,28,0.97,32,2.591,47,1.029,54,1.912,76,0.484,77,0.706,93,1.778,101,2.319,102,1.591,103,1.591,104,1.637,105,1.548,107,2.319,109,1.507,111,1.637,113,1.803,114,3.397,115,2.033,116,1.541,350,3.231,351,3.65,352,5.318,353,1.791,354,2.955,355,1.981,356,3.65]],["t/3226",[6,0.994,8,1.186,10,1.656,14,1.569,20,1.09,23,1.061,26,1.937,28,1.857,47,0.788,54,1.346,76,0.198,77,1.402,109,2.088,111,1.826,113,1.38,114,2.6,115,0.982,116,0.744,120,1.12,121,2.406,122,2.562,123,3.347,124,1.724,125,1.447,126,2.293,127,2.063,128,2.063,129,1.302,130,1.302,160,1.641,181,1.152,328,1.82,353,1.261,354,2.081,355,1.395]],["t/3228",[8,2.606,10,1.458,47,1.092,76,0.435,109,2.331,111,2.531,113,1.913,114,3.605,115,2.158,116,1.635,134,2.461,135,2.461,353,2.77,354,4.571,355,3.063]],["t/3230",[1,1.171,2,3.023,6,1.645,65,5.458,357,6.74,358,6.74]],["t/3232",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3234",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3236",[3,2.199,65,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,360,4.59]],["t/3238",[1,0.887,6,1.246,8,1.594,10,1.534,28,0.917,32,2.509,47,0.988,54,1.809,76,0.468,77,0.668,93,1.722,101,2.226,102,1.505,103,1.505,104,1.548,105,1.464,107,2.226,109,1.425,111,1.548,113,1.17,115,1.32,116,1.479,117,2.054,118,1.904,119,1.814,181,1.548,353,1.694,355,1.873,360,3.056,361,3.452,362,5.105,363,2.795,364,2.445,365,2.445,366,3.452]],["t/3240",[1,0.35,6,0.815,8,0.93,10,1.66,14,1.23,20,0.854,23,1.38,26,1.59,28,1.821,34,1.23,43,0.637,44,1.23,47,0.646,54,1.751,76,0.33,77,1.403,109,1.768,111,1.498,113,1.133,115,0.77,116,0.583,117,0.81,118,0.751,119,0.716,120,0.878,121,2.371,122,2.17,123,3.348,124,1.351,125,1.134,126,1.882,127,1.693,128,1.693,129,1.021,130,1.021,131,1.093,132,1.23,160,1.286,181,1.92,189,1.427,224,1.631,248,2.706,328,1.427,353,0.988,355,1.093,363,1.631,364,1.427,365,1.427,367,1.783]],["t/3242",[8,2.394,10,1.486,47,1.003,76,0.4,109,2.141,111,2.325,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,1.842,134,2.261,135,2.261,181,2.325,353,2.544,355,2.814,363,4.199,364,3.673,365,3.673]],["t/3244",[1,1.131,2,2.92,6,1.589,66,4.611,87,2.369,368,6.51,369,5.764,370,6.51]],["t/3246",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3248",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3250",[3,2.199,66,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,371,4.59]],["t/3252",[1,0.769,6,1.322,8,1.319,10,1.563,28,0.759,32,2.518,47,1.047,54,2.319,76,0.47,77,0.553,93,1.728,101,1.929,102,1.246,103,1.246,104,1.282,105,1.212,107,2.361,109,1.18,111,1.282,113,0.969,115,1.092,116,1.569,117,2.178,118,2.019,119,1.924,122,3.09,181,1.282,353,1.402,355,1.551,369,2.53,371,2.53,372,2.858,373,5.415,374,2.314,375,4.425,376,2.858,377,2.858]],["t/3254",[6,1.094,8,0.993,10,1.653,14,2.153,20,0.912,23,1.456,24,1.211,26,1.678,28,1.726,34,1.313,43,0.681,44,1.313,47,0.682,54,1.127,76,0.166,77,1.398,109,1.851,111,1.581,113,1.195,115,0.822,116,0.623,117,0.865,118,0.802,119,0.764,120,0.937,121,2.133,122,2.901,123,3.337,124,1.442,125,1.211,126,1.986,127,1.787,128,1.787,129,1.09,130,1.09,131,1.167,132,1.313,160,2.252,181,2.01,328,2.498,353,1.055,355,1.914,359,1.62,374,1.741]],["t/3256",[8,2.461,10,1.501,47,1.031,76,0.411,109,2.201,111,2.39,113,1.807,115,2.037,116,1.544,117,2.144,118,1.988,119,1.894,134,2.324,135,2.324,181,2.39,353,2.615,355,2.893,374,4.316]],["t/3258",[6,1.645,14,4.115,23,2.783,122,3.415,173,5.458,378,6.74]],["t/3260",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3262",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3264",[3,2.034,26,2.281,67,5.7,74,1.359,83,1.98,84,1.98,85,2.09,87,2.646,88,2.09,89,2.034,90,2.807,91,2.034,92,2.034,93,1.359,94,2.034,95,2.09,96,2.09,97,2.09,98,2.09,99,2.09,142,3.612,145,3.396,203,3.883,379,4.795,380,4.245]],["t/3266",[1,1.119,6,1.17,10,1.503,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,122,2.43,212,3.612,380,4.245,381,4.795,382,4.795,383,3.883,384,3.883]],["t/3268",[10,1.607,20,2.034,24,2.7,28,1.274,76,0.37,77,1.245,113,1.625,120,2.09,121,2.281,122,2.43,123,3.356,212,3.612,238,4.245,310,5.7,383,3.883,384,3.883,385,4.795,386,4.795]],["t/3270",[10,1.435,76,0.494,122,3.244,134,2.791,135,2.791,212,4.823,383,5.184,384,5.184]],["t/3272",[1,1.192,2,3.077,6,1.674,68,5.169,387,6.861]],["t/3274",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3276",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,388,3.649]],["t/3278",[3,2.199,68,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,389,4.59]],["t/3280",[1,1.065,6,1.088,10,1.514,32,2.531,47,0.862,76,0.473,77,0.862,93,1.737,101,2.672,102,1.944,103,1.944,104,2,105,1.891,107,1.944,115,1.705,116,1.292,117,1.794,118,1.663,119,1.584,122,2.259,181,2,389,3.947,390,4.459,391,4.459,392,4.459]],["t/3282",[1,0.339,6,0.795,8,0.901,10,1.65,14,1.192,20,0.828,23,1.345,24,1.099,26,1.549,28,1.733,34,1.192,43,0.618,44,1.192,47,0.63,54,2.561,76,0.323,77,1.388,109,1.729,111,1.46,113,1.104,115,0.746,116,0.566,117,0.785,118,0.728,119,0.694,120,0.851,121,1.992,122,2.753,123,3.313,124,1.31,125,1.099,126,1.834,127,1.65,128,1.65,129,0.989,130,0.989,131,1.06,132,1.192,133,1.471,139,1.728,160,2.08,181,1.878,189,1.383,224,1.581,328,1.383,353,0.958,355,1.06,364,1.383,365,1.383,367,1.728,388,2.883,393,1.952,394,1.728]],["t/3284",[8,2.271,10,1.515,47,0.951,76,0.505,77,0.951,109,2.031,111,2.206,113,1.667,115,1.88,116,1.425,117,1.978,118,1.834,119,1.747,134,2.144,135,2.855,181,2.206,353,2.413,355,2.669,364,3.483,365,3.483,394,4.354]],["t/3286",[1,1.151,2,2.97,6,1.616,63,4.691,174,5.864,395,6.623,396,6.623]],["t/3288",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3290",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,397,4.122]],["t/3292",[3,2.199,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,398,6.782,399,4.59]],["t/3294",[1,0.957,6,0.935,10,1.548,23,2.275,32,2.275,76,0.425,77,0.741,93,1.562,101,2.402,102,1.671,103,1.671,104,1.719,105,1.626,107,1.671,165,2.448,166,3.519,234,2.448,399,3.393,400,3.833,401,3.833,402,3.104,403,3.393,404,3.393,405,3.393,406,3.393,407,3.104,408,3.393,409,3.393,410,3.393,411,3.393,412,3.104,413,3.393,414,3.104,415,3.393]],["t/3296",[10,1.496,20,2.009,23,2.637,76,0.365,120,2.064,165,3.024,166,4.078,296,6.396,402,5.17,404,4.192,405,4.192,406,4.192,407,5.17,409,4.192,410,4.192,411,4.192,412,5.17,414,3.834,415,4.192]],["t/3298",[10,1.479,76,0.449,134,2.536,135,2.536,234,4.662,402,4.71,403,5.15,407,4.71,408,5.15,412,4.71,413,5.15,416,5.817]],["t/3300",[1,0.813,2,2.098,6,1.752,22,5.128,70,3.313,76,0.554,87,1.702,133,4.77,142,3.524,153,4.708,241,4.141,242,4.141,243,4.141,244,3.787,245,3.787,246,4.141,247,4.141,248,3.787,249,4.141,250,4.141,251,4.141]],["t/3302",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3304",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,417,4.122]],["t/3306",[3,2.199,70,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,418,4.59]],["t/3308",[1,1.073,6,1.101,10,1.471,32,2.551,47,0.873,76,0.476,77,0.873,93,1.751,101,2.694,102,1.967,103,1.967,104,2.023,105,1.914,107,1.967,116,1.307,155,3.618,211,3.479,255,4.655,324,3.196,418,3.994,419,4.511,420,4.511]],["t/3310",[1,0.459,10,1.599,20,1.765,23,2.126,26,1.979,28,1.688,35,1.546,43,0.836,47,0.805,70,1.87,76,0.397,77,1.13,116,0.765,120,1.814,121,1.256,123,2.696,125,1.487,129,1.338,130,1.338,131,1.433,153,3.721,155,2.436,157,3.369,158,2.657,159,1.989,160,1.686,161,4.73,162,3.369,163,2.138,164,2.138,165,1.686,166,1.686,167,2.138,168,2.138,169,2.138,170,2.138,171,1.612,172,1.771,189,1.87,211,2.899,255,3.134,314,2.338,315,2.338]],["t/3312",[10,1.536,35,2.739,47,0.905,76,0.488,77,1.225,116,1.355,134,2.039,135,2.761,145,3.313,153,3.708,155,3.708,159,3.524,171,2.856,172,3.137,211,3.566,255,4.77,421,4.677,422,4.677,423,4.677]],["t/3314",[1,1.171,2,3.023,6,1.645,71,6.468,424,6.74]],["t/3316",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3318",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3320",[3,2.199,71,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,425,4.59]],["t/3322",[1,1.001,6,0.995,10,1.513,32,2.378,47,0.789,76,0.444,77,0.789,93,1.632,101,2.511,102,1.778,103,1.778,104,1.829,105,1.73,107,1.778,113,1.382,115,1.559,116,1.181,117,1.64,118,1.521,119,2.046,181,1.829,234,2.605,425,3.61,426,4.078,427,4.078,428,3.61,429,3.302,430,4.664,431,3.302,432,3.302]],["t/3324",[8,1.091,10,1.644,20,1.002,23,1.572,26,1.811,28,1.012,31,3.387,34,1.443,43,1.205,44,1.443,47,0.737,53,1.913,54,2.874,76,0.294,77,1.308,113,1.621,115,0.903,116,0.684,117,0.95,118,0.881,119,0.84,120,1.03,121,1.811,123,3.247,125,2.144,129,1.197,130,1.197,131,2.066,132,1.443,165,3.054,166,2.432,181,2.145,214,2.092,234,1.509,303,2.092,429,3.083,430,3.083,431,3.083,432,3.083,433,2.363,434,2.363,435,2.363,436,2.363,437,2.363]],["t/3326",[10,1.486,47,1.003,76,0.4,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,2.41,134,2.261,135,2.261,181,2.325,234,3.312,428,4.59,429,4.199,430,5.492,431,4.199,432,4.199]],["t/3328",[1,1.171,2,3.023,6,1.645,69,4.774,87,2.453,438,6.74]],["t/3330",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3332",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,439,4.122]],["t/3334",[3,2.199,69,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,440,4.59]],["t/3336",[1,0.627,6,0.54,10,1.605,24,2.033,25,1.792,32,2.575,35,1.296,47,0.884,69,3.737,76,0.278,77,0.428,89,0.938,93,1.495,94,0.938,101,1.574,102,0.965,103,0.965,105,1.94,107,0.965,109,0.914,111,0.992,113,0.75,116,1.325,118,0.825,121,1.052,123,1.021,127,1.121,128,1.121,236,1.959,299,1.959,305,3.975,324,3.239,329,1.667,332,1.792,353,1.086,440,1.959,441,2.212,442,5.813,443,1.792,444,2.923,445,1.792,446,1.959,447,2.212,448,1.792,449,2.212,450,2.923,451,3.61,452,2.212,453,2.212,454,3.61,455,2.212,456,2.212,457,2.212,458,3.61,459,2.212,460,2.212,461,2.212,462,2.212,463,2.212,464,3.61,465,2.212]],["t/3338",[6,0.381,10,1.649,20,0.662,23,0.645,24,0.879,26,1.281,28,1.704,31,1.908,35,0.914,47,0.521,54,1.861,69,1.106,75,0.645,76,0.274,77,1.377,81,0.662,109,1.745,111,1.593,113,1.204,114,0.997,116,0.452,118,0.582,120,0.681,121,1.281,122,1.365,123,3.347,124,1.047,125,2,126,2,127,1.8,128,1.8,129,0.791,130,0.791,165,0.997,166,0.997,219,1.382,305,1.176,323,1.264,324,2.516,329,2.029,332,1.264,353,0.766,414,1.264,443,1.264,444,1.264,445,1.264,448,2.181,450,1.264,466,1.561,467,1.561,468,1.561,469,1.561,470,1.561,471,1.561,472,2.694,473,1.561,474,1.561,475,1.561,476,1.561,477,1.561,478,1.561,479,1.561,480,3.145,481,1.561,482,1.561,483,1.561,484,1.561,485,2.385,486,2.385,487,1.561,488,1.561,489,1.561,490,1.561,491,1.561]],["t/3340",[10,1.622,24,2.511,28,1.185,35,2.611,47,0.862,76,0.344,109,1.841,111,2,113,1.511,116,1.292,118,1.663,127,2.259,128,2.259,134,1.944,135,1.944,324,3.158,353,2.188,443,3.611,444,3.611,445,3.611,446,3.947,448,3.611,450,3.611,480,3.947,485,3.947,486,3.947]]],"invertedIndex":[["",{"_index":10,"t":{"3086":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"3098":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"3100":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"3102":{"position":[[48,1],[173,1],[188,1]]},"3112":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"3114":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"3116":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"3126":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"3128":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"3130":{"position":[[18,1],[85,1],[203,1]]},"3140":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"3142":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"3144":{"position":[[0,2],[57,1],[126,1],[172,1]]},"3154":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"3156":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"3158":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"3160":{"position":[[302,4]]},"3168":{"position":[[134,2],[163,2],[196,2]]},"3170":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"3172":{"position":[[18,1],[193,1]]},"3182":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"3184":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"3186":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"3196":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"3198":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"3200":{"position":[[18,1],[56,1]]},"3210":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"3212":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"3214":{"position":[[18,1],[43,1],[58,1]]},"3224":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"3226":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"3228":{"position":[[18,1],[43,3],[141,1]]},"3238":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"3240":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"3242":{"position":[[18,1],[43,3],[150,1],[185,1]]},"3252":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"3254":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"3256":{"position":[[18,1],[43,3],[150,1],[165,1]]},"3266":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"3268":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"3270":{"position":[[18,1],[78,1]]},"3280":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"3282":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"3284":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"3294":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"3296":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"3298":{"position":[[18,1],[57,2],[97,1]]},"3308":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"3310":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"3312":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"3322":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"3324":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"3326":{"position":[[18,1],[110,1],[182,1],[197,1]]},"3336":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"3338":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"3340":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]}}}],["0",{"_index":35,"t":{"3086":{"position":[[492,1]]},"3114":{"position":[[251,1]]},"3116":{"position":[[86,2]]},"3154":{"position":[[341,2]]},"3310":{"position":[[201,1]]},"3312":{"position":[[274,2]]},"3336":{"position":[[325,2]]},"3338":{"position":[[402,1]]},"3340":{"position":[[106,2]]}}}],["1",{"_index":234,"t":{"3154":{"position":[[390,2]]},"3158":{"position":[[202,1]]},"3294":{"position":[[332,1]]},"3298":{"position":[[55,1],[94,2]]},"3322":{"position":[[402,1]]},"3324":{"position":[[839,1]]},"3326":{"position":[[180,1]]}}}],["1.14/1.15",{"_index":86,"t":{"3096":{"position":[[33,11]]}}}],["1.18",{"_index":143,"t":{"3104":{"position":[[82,4]]}}}],["10",{"_index":118,"t":{"3098":{"position":[[366,2]]},"3100":{"position":[[636,2]]},"3102":{"position":[[170,2]]},"3126":{"position":[[300,2]]},"3128":{"position":[[258,2]]},"3130":{"position":[[82,2]]},"3210":{"position":[[258,2]]},"3212":{"position":[[75,2]]},"3214":{"position":[[40,2]]},"3238":{"position":[[342,2],[567,2]]},"3240":{"position":[[860,2]]},"3242":{"position":[[147,2]]},"3252":{"position":[[342,2],[535,2],[749,2]]},"3254":{"position":[[875,2]]},"3256":{"position":[[147,2]]},"3280":{"position":[[319,2]]},"3282":{"position":[[1015,2]]},"3284":{"position":[[206,2]]},"3322":{"position":[[329,2]]},"3324":{"position":[[319,2]]},"3326":{"position":[[107,2]]},"3336":{"position":[[368,2]]},"3338":{"position":[[1456,2]]},"3340":{"position":[[149,2]]}}}],["100",{"_index":430,"t":{"3322":{"position":[[361,4],[380,4]]},"3324":{"position":[[585,4],[711,4]]},"3326":{"position":[[139,4],[158,4]]}}}],["10m",{"_index":406,"t":{"3294":{"position":[[316,6]]},"3296":{"position":[[73,6]]}}}],["123456",{"_index":240,"t":{"3158":{"position":[[120,9]]}}}],["127.0.0.1",{"_index":353,"t":{"3224":{"position":[[256,12]]},"3226":{"position":[[225,11]]},"3228":{"position":[[53,12]]},"3238":{"position":[[248,12]]},"3240":{"position":[[267,11]]},"3242":{"position":[[53,12]]},"3252":{"position":[[248,12]]},"3254":{"position":[[345,11]]},"3256":{"position":[[53,12]]},"3282":{"position":[[398,11]]},"3284":{"position":[[92,12]]},"3336":{"position":[[262,12]]},"3338":{"position":[[84,11]]},"3340":{"position":[[34,12]]}}}],["127.0.0.1:11211",{"_index":344,"t":{"3198":{"position":[[113,17]]},"3200":{"position":[[37,18]]}}}],["127.0.0.1:8091",{"_index":231,"t":{"3154":{"position":[[287,17]]},"3158":{"position":[[73,17]]}}}],["1433",{"_index":363,"t":{"3238":{"position":[[267,5]]},"3240":{"position":[[355,4]]},"3242":{"position":[[72,5]]}}}],["15",{"_index":302,"t":{"3170":{"position":[[2668,2],[2722,2]]}}}],["1e7",{"_index":403,"t":{"3294":{"position":[[271,4]]},"3298":{"position":[[41,4]]}}}],["1gb",{"_index":411,"t":{"3294":{"position":[[366,6]]},"3296":{"position":[[131,6]]}}}],["2",{"_index":84,"t":{"3096":{"position":[[26,1]]},"3110":{"position":[[43,1]]},"3124":{"position":[[24,1]]},"3138":{"position":[[23,1]]},"3152":{"position":[[27,1]]},"3166":{"position":[[26,1]]},"3170":{"position":[[175,3]]},"3180":{"position":[[22,1]]},"3186":{"position":[[80,1]]},"3194":{"position":[[24,1]]},"3208":{"position":[[24,1]]},"3222":{"position":[[25,1]]},"3236":{"position":[[23,1]]},"3250":{"position":[[23,1]]},"3264":{"position":[[24,1]]},"3278":{"position":[[26,1]]},"3292":{"position":[[27,1]]},"3306":{"position":[[20,1]]},"3320":{"position":[[25,1]]},"3334":{"position":[[23,1]]}}}],["25",{"_index":281,"t":{"3170":{"position":[[1341,2],[2037,2]]}}}],["27017",{"_index":354,"t":{"3224":{"position":[[275,6]]},"3226":{"position":[[313,5]]},"3228":{"position":[[72,6]]}}}],["3",{"_index":171,"t":{"3114":{"position":[[658,1]]},"3116":{"position":[[116,2]]},"3154":{"position":[[363,2]]},"3158":{"position":[[174,1]]},"3170":{"position":[[1010,1]]},"3172":{"position":[[93,2]]},"3310":{"position":[[613,1]]},"3312":{"position":[[255,2]]}}}],["30",{"_index":408,"t":{"3294":{"position":[[337,3]]},"3298":{"position":[[60,3]]}}}],["3306",{"_index":374,"t":{"3252":{"position":[[267,5]]},"3254":{"position":[[433,4]]},"3256":{"position":[[72,5]]}}}],["5",{"_index":277,"t":{"3170":{"position":[[1246,2],[1942,2]]},"3172":{"position":[[129,2],[152,2]]}}}],["5432",{"_index":394,"t":{"3282":{"position":[[486,4]]},"3284":{"position":[[111,5]]}}}],["60",{"_index":222,"t":{"3142":{"position":[[342,2]]},"3144":{"position":[[123,2]]}}}],["6379",{"_index":443,"t":{"3336":{"position":[[281,5]]},"3338":{"position":[[172,4]]},"3340":{"position":[[53,5]]}}}],["6380",{"_index":452,"t":{"3336":{"position":[[617,9]]}}}],["64",{"_index":413,"t":{"3294":{"position":[[386,3]]},"3298":{"position":[[77,3]]}}}],["8529",{"_index":112,"t":{"3098":{"position":[[286,5]]},"3100":{"position":[[179,4]]},"3102":{"position":[[90,5]]}}}],["_",{"_index":376,"t":{"3252":{"position":[[612,1]]}}}],["access",{"_index":162,"t":{"3114":{"position":[[422,6],[448,6]]},"3170":{"position":[[768,6],[794,6]]},"3310":{"position":[[371,6],[397,6]]}}}],["accesskey",{"_index":314,"t":{"3170":{"position":[[3096,9]]},"3310":{"position":[[659,9]]}}}],["account",{"_index":152,"t":{"3112":{"position":[[258,8],[320,8]]},"3114":{"position":[[32,7],[46,7]]},"3116":{"position":[[28,8]]}}}],["adaptor",{"_index":433,"t":{"3324":{"position":[[402,7]]}}}],["addr",{"_index":450,"t":{"3336":{"position":[[495,6],[592,6]]},"3338":{"position":[[794,5]]},"3340":{"position":[[177,6]]}}}],["address",{"_index":472,"t":{"3338":{"position":[[663,7],[699,10]]}}}],["admin",{"_index":239,"t":{"3158":{"position":[[101,8]]}}}],["allow",{"_index":265,"t":{"3170":{"position":[[415,6]]}}}],["along",{"_index":33,"t":{"3086":{"position":[[457,5]]}}}],["amount",{"_index":214,"t":{"3142":{"position":[[230,6]]},"3324":{"position":[[769,6]]}}}],["applic",{"_index":235,"t":{"3156":{"position":[[28,11],[108,11]]}}}],["arangodb",{"_index":55,"t":{"3088":{"position":[[0,8]]},"3090":{"position":[[2,8]]},"3096":{"position":[[0,8]]}}}],["arangodb.new",{"_index":106,"t":{"3098":{"position":[[172,14]]}}}],["arangodb.new(arangodb.config",{"_index":108,"t":{"3098":{"position":[[224,29]]}}}],["arangodb/go",{"_index":72,"t":{"3090":{"position":[[32,11],[55,11]]}}}],["attempt",{"_index":170,"t":{"3114":{"position":[[623,10]]},"3170":{"position":[[972,10]]},"3310":{"position":[[575,10]]}}}],["authent",{"_index":328,"t":{"3184":{"position":[[197,15],[259,15]]},"3226":{"position":[[81,14]]},"3240":{"position":[[123,14]]},"3254":{"position":[[69,14],[201,14]]},"3282":{"position":[[254,14]]}}}],["avail",{"_index":219,"t":{"3142":{"position":[[284,9]]},"3338":{"position":[[1481,9]]}}}],["aw",{"_index":161,"t":{"3114":{"position":[[418,3],[437,3]]},"3170":{"position":[[764,3],[783,3]]},"3310":{"position":[[98,3],[130,3],[367,3],[386,3]]}}}],["aws.bool(tru",{"_index":316,"t":{"3172":{"position":[[177,15]]}}}],["aws/aw",{"_index":241,"t":{"3160":{"position":[[32,7]]},"3300":{"position":[[26,7]]}}}],["aws/credenti",{"_index":246,"t":{"3160":{"position":[[154,19]]},"3300":{"position":[[148,19]]}}}],["aws_region",{"_index":263,"t":{"3170":{"position":[[283,13]]}}}],["awsdynamodb.cli",{"_index":252,"t":{"3164":{"position":[[285,19]]}}}],["azblob.cli",{"_index":148,"t":{"3108":{"position":[[288,14]]}}}],["azur",{"_index":136,"t":{"3104":{"position":[[0,5]]},"3110":{"position":[[0,5],[210,5]]}}}],["azureblob",{"_index":56,"t":{"3088":{"position":[[9,9]]}}}],["azureblob.new",{"_index":150,"t":{"3112":{"position":[[173,15]]}}}],["azureblob.new(azureblob.config",{"_index":151,"t":{"3112":{"position":[[226,31]]}}}],["badger",{"_index":57,"t":{"3088":{"position":[[19,6]]},"3124":{"position":[[0,6],[191,6]]},"3128":{"position":[[344,6],[487,6]]}}}],["badger.db",{"_index":176,"t":{"3122":{"position":[[288,10]]},"3262":{"position":[[288,10]]}}}],["badger.defaultoptions(\"./fiber.badg",{"_index":184,"t":{"3128":{"position":[[378,39]]}}}],["badger.defaultoptions(\"./fiber.badger\").withlogger(nil",{"_index":190,"t":{"3130":{"position":[[115,56]]}}}],["badger.logg",{"_index":187,"t":{"3128":{"position":[[532,13]]}}}],["badger.new",{"_index":178,"t":{"3126":{"position":[[170,12]]}}}],["badger.new(badger.config",{"_index":179,"t":{"3126":{"position":[[220,25]]}}}],["badger.opt",{"_index":185,"t":{"3128":{"position":[[432,14]]}}}],["badgeropt",{"_index":182,"t":{"3128":{"position":[[303,13],[418,13]]},"3130":{"position":[[100,14]]}}}],["bbolt",{"_index":58,"t":{"3088":{"position":[[26,5]]},"3132":{"position":[[2,5]]},"3138":{"position":[[0,5]]},"3142":{"position":[[137,5]]}}}],["bbolt.db",{"_index":206,"t":{"3136":{"position":[[288,9]]}}}],["bbolt.new",{"_index":208,"t":{"3140":{"position":[[169,11]]}}}],["bbolt.new(bbolt.config",{"_index":209,"t":{"3140":{"position":[[218,23]]}}}],["befor",{"_index":132,"t":{"3100":{"position":[[580,6]]},"3128":{"position":[[202,6]]},"3170":{"position":[[2921,6]]},"3212":{"position":[[29,6]]},"3240":{"position":[[804,6]]},"3254":{"position":[[819,6]]},"3282":{"position":[[959,6]]},"3324":{"position":[[263,6]]}}}],["blob",{"_index":137,"t":{"3104":{"position":[[6,4]]},"3110":{"position":[[6,4],[216,4]]}}}],["block",{"_index":300,"t":{"3170":{"position":[[2616,5]]}}}],["bolt",{"_index":192,"t":{"3132":{"position":[[44,4]]}}}],["bool",{"_index":130,"t":{"3100":{"position":[[567,4]]},"3114":{"position":[[388,4]]},"3128":{"position":[[189,4],[636,4]]},"3142":{"position":[[460,4],[557,4]]},"3170":{"position":[[1120,4],[3062,5]]},"3198":{"position":[[237,4]]},"3226":{"position":[[697,4]]},"3240":{"position":[[791,4]]},"3254":{"position":[[806,4]]},"3282":{"position":[[946,4]]},"3310":{"position":[[337,4]]},"3324":{"position":[[250,4]]},"3338":{"position":[[1275,4]]}}}],["bound",{"_index":395,"t":{"3286":{"position":[[9,5]]}}}],["bradfitz/gomemcach",{"_index":333,"t":{"3188":{"position":[[32,20]]}}}],["bucket",{"_index":211,"t":{"3140":{"position":[[270,7],[282,8]]},"3142":{"position":[[143,6],[198,6],[511,6]]},"3144":{"position":[[89,7]]},"3154":{"position":[[333,7]]},"3156":{"position":[[263,6],[284,6]]},"3158":{"position":[[130,7]]},"3170":{"position":[[1074,6]]},"3308":{"position":[[230,7],[242,6]]},"3310":{"position":[[69,6],[81,6],[291,6]]},"3312":{"position":[[32,7],[176,7]]}}}],["buffer",{"_index":415,"t":{"3294":{"position":[[416,7]]},"3296":{"position":[[190,7]]}}}],["bufferitem",{"_index":412,"t":{"3294":{"position":[[373,12]]},"3296":{"position":[[155,11],[198,11]]},"3298":{"position":[[64,12]]}}}],["byte",{"_index":29,"t":{"3086":{"position":[[393,8],[591,7]]},"3094":{"position":[[69,8],[123,7]]},"3108":{"position":[[69,8],[123,7]]},"3122":{"position":[[69,8],[123,7]]},"3136":{"position":[[69,8],[123,7]]},"3150":{"position":[[69,8],[123,7]]},"3164":{"position":[[66,8],[120,7]]},"3178":{"position":[[70,8],[124,7]]},"3192":{"position":[[69,8],[123,7]]},"3206":{"position":[[69,8],[123,7]]},"3220":{"position":[[69,8],[123,7]]},"3234":{"position":[[69,8],[123,7]]},"3248":{"position":[[69,8],[123,7]]},"3262":{"position":[[69,8],[123,7]]},"3276":{"position":[[69,8],[123,7]]},"3290":{"position":[[69,8],[123,7]]},"3304":{"position":[[69,8],[123,7]]},"3318":{"position":[[69,8],[123,7]]},"3332":{"position":[[69,8],[123,7]]}}}],["cach",{"_index":410,"t":{"3294":{"position":[[360,5]]},"3296":{"position":[[125,5]]}}}],["calcul",{"_index":286,"t":{"3170":{"position":[[1415,13],[2111,13]]}}}],["case",{"_index":308,"t":{"3170":{"position":[[2847,4]]}}}],["cer",{"_index":453,"t":{"3336":{"position":[[670,4]]}}}],["certif",{"_index":462,"t":{"3336":{"position":[[855,13]]}}}],["chu'",{"_index":197,"t":{"3132":{"position":[[97,5]]}}}],["clear",{"_index":129,"t":{"3100":{"position":[[480,6]]},"3114":{"position":[[304,6]]},"3128":{"position":[[107,6]]},"3142":{"position":[[474,6]]},"3170":{"position":[[1037,6]]},"3198":{"position":[[155,6]]},"3226":{"position":[[615,6]]},"3240":{"position":[[709,6]]},"3254":{"position":[[724,6]]},"3282":{"position":[[864,6]]},"3310":{"position":[[254,6]]},"3324":{"position":[[168,6]]},"3338":{"position":[[1188,6]]}}}],["client",{"_index":305,"t":{"3170":{"position":[[2810,6]]},"3184":{"position":[[308,6]]},"3336":{"position":[[428,6],[552,6],[642,6],[1025,6]]},"3338":{"position":[[932,7]]}}}],["client.key",{"_index":456,"t":{"3336":{"position":[[718,15]]}}}],["clientnam",{"_index":480,"t":{"3338":{"position":[[904,10],[948,11],[1013,10]]},"3340":{"position":[[212,11]]}}}],["clientv3.client",{"_index":318,"t":{"3178":{"position":[[289,16]]}}}],["close",{"_index":48,"t":{"3086":{"position":[[826,5],[832,6],[921,7]]},"3094":{"position":[[249,7]]},"3108":{"position":[[249,7]]},"3122":{"position":[[249,7]]},"3136":{"position":[[249,7]]},"3150":{"position":[[249,7]]},"3164":{"position":[[246,7]]},"3178":{"position":[[250,7]]},"3192":{"position":[[249,7]]},"3206":{"position":[[249,7]]},"3220":{"position":[[249,7]]},"3234":{"position":[[249,7]]},"3248":{"position":[[249,7]]},"3262":{"position":[[249,7]]},"3276":{"position":[[249,7]]},"3290":{"position":[[249,7]]},"3304":{"position":[[249,7]]},"3318":{"position":[[249,7]]},"3332":{"position":[[249,7]]}}}],["cloud",{"_index":141,"t":{"3104":{"position":[[66,6]]}}}],["cluster",{"_index":236,"t":{"3156":{"position":[[77,7],[157,7],[224,7],[345,7],[443,7]]},"3336":{"position":[[544,7]]}}}],["clustercli",{"_index":477,"t":{"3338":{"position":[[742,13]]}}}],["cockroachdb/pebbl",{"_index":378,"t":{"3258":{"position":[[26,18]]}}}],["collect",{"_index":114,"t":{"3098":{"position":[[311,11]]},"3100":{"position":[[394,10],[453,10],[517,10]]},"3102":{"position":[[115,11]]},"3224":{"position":[[301,11],[513,11]]},"3226":{"position":[[529,10],[588,10]]},"3228":{"position":[[98,11]]},"3338":{"position":[[1225,10]]}}}],["collector",{"_index":52,"t":{"3086":{"position":[[888,10]]}}}],["command",{"_index":483,"t":{"3338":{"position":[[960,7]]}}}],["commun",{"_index":11,"t":{"3086":{"position":[[139,13]]}}}],["config",{"_index":76,"t":{"3092":{"position":[[33,6],[48,6]]},"3094":{"position":[[16,10]]},"3098":{"position":[[156,6],[208,6]]},"3100":{"position":[[5,6]]},"3102":{"position":[[50,7]]},"3106":{"position":[[33,6],[48,6]]},"3108":{"position":[[16,10]]},"3112":{"position":[[157,6],[210,6]]},"3114":{"position":[[5,6]]},"3116":{"position":[[20,7]]},"3120":{"position":[[33,6],[48,6]]},"3122":{"position":[[16,10]]},"3126":{"position":[[154,6],[204,6]]},"3128":{"position":[[5,6]]},"3130":{"position":[[20,7]]},"3134":{"position":[[33,6],[48,6]]},"3136":{"position":[[16,10]]},"3140":{"position":[[153,6],[202,6]]},"3142":{"position":[[3,6],[22,6],[47,6]]},"3144":{"position":[[32,6],[59,7]]},"3148":{"position":[[33,6],[48,6]]},"3150":{"position":[[16,10]]},"3154":{"position":[[157,6],[233,6]]},"3156":{"position":[[5,6]]},"3158":{"position":[[32,6],[59,7]]},"3160":{"position":[[60,6],[199,6],[262,7]]},"3162":{"position":[[33,6],[48,6]]},"3164":{"position":[[16,7]]},"3170":{"position":[[5,6],[209,6]]},"3172":{"position":[[20,7]]},"3176":{"position":[[33,6],[48,6]]},"3178":{"position":[[16,10]]},"3182":{"position":[[152,6],[200,6]]},"3184":{"position":[[5,6]]},"3186":{"position":[[20,7]]},"3190":{"position":[[33,6],[48,6]]},"3192":{"position":[[16,10]]},"3196":{"position":[[156,6],[208,6]]},"3198":{"position":[[5,6]]},"3200":{"position":[[20,7]]},"3204":{"position":[[33,6],[48,6]]},"3206":{"position":[[16,10]]},"3210":{"position":[[154,6],[204,6]]},"3212":{"position":[[5,6]]},"3214":{"position":[[20,7]]},"3218":{"position":[[33,6],[48,6]]},"3220":{"position":[[16,10]]},"3224":{"position":[[155,6],[206,6],[368,6]]},"3226":{"position":[[5,6]]},"3228":{"position":[[20,7]]},"3232":{"position":[[33,6],[48,6]]},"3234":{"position":[[16,10]]},"3238":{"position":[[153,6],[202,6],[404,6]]},"3240":{"position":[[3,6],[22,6],[47,6]]},"3242":{"position":[[20,7]]},"3246":{"position":[[33,6],[48,6]]},"3248":{"position":[[16,10]]},"3252":{"position":[[153,6],[202,6],[384,6],[577,6]]},"3254":{"position":[[5,6]]},"3256":{"position":[[20,7]]},"3260":{"position":[[33,6],[48,6]]},"3262":{"position":[[16,10]]},"3266":{"position":[[154,6],[204,6]]},"3268":{"position":[[5,6]]},"3270":{"position":[[20,7]]},"3274":{"position":[[33,6],[48,6]]},"3276":{"position":[[16,10]]},"3280":{"position":[[159,6],[211,6]]},"3282":{"position":[[3,6],[22,6],[47,6]]},"3284":{"position":[[32,6],[59,7]]},"3288":{"position":[[33,6],[48,6]]},"3290":{"position":[[16,10]]},"3294":{"position":[[157,6],[210,6]]},"3296":{"position":[[5,6]]},"3298":{"position":[[20,7]]},"3300":{"position":[[54,6],[193,6],[256,7]]},"3302":{"position":[[33,6],[48,6]]},"3304":{"position":[[16,10]]},"3308":{"position":[[150,6],[196,6]]},"3310":{"position":[[3,6],[22,6],[47,6]]},"3312":{"position":[[141,6],[168,7]]},"3316":{"position":[[33,6],[48,6]]},"3318":{"position":[[16,10]]},"3322":{"position":[[155,6],[206,6]]},"3324":{"position":[[5,6],[418,6]]},"3326":{"position":[[20,7]]},"3330":{"position":[[33,6],[48,6]]},"3332":{"position":[[16,10]]},"3336":{"position":[[167,6],[216,6]]},"3338":{"position":[[5,6],[476,6],[1287,6]]},"3340":{"position":[[20,7]]}}}],["configdefault",{"_index":135,"t":{"3102":{"position":[[34,13]]},"3116":{"position":[[4,13]]},"3130":{"position":[[4,13]]},"3144":{"position":[[3,13],[43,13]]},"3158":{"position":[[3,13],[43,13]]},"3172":{"position":[[4,13]]},"3186":{"position":[[4,13]]},"3200":{"position":[[4,13]]},"3214":{"position":[[4,13]]},"3228":{"position":[[4,13]]},"3242":{"position":[[4,13]]},"3256":{"position":[[4,13]]},"3270":{"position":[[4,13]]},"3284":{"position":[[3,13],[43,13]]},"3298":{"position":[[4,13]]},"3312":{"position":[[112,13],[152,13]]},"3326":{"position":[[4,13]]},"3340":{"position":[[4,13]]}}}],["configur",{"_index":421,"t":{"3312":{"position":[[12,13]]}}}],["conn",{"_index":81,"t":{"3094":{"position":[[281,6]]},"3108":{"position":[[281,6]]},"3122":{"position":[[281,6]]},"3136":{"position":[[281,6]]},"3150":{"position":[[281,6]]},"3164":{"position":[[278,6]]},"3178":{"position":[[282,6]]},"3192":{"position":[[281,6]]},"3206":{"position":[[281,6]]},"3220":{"position":[[281,6]]},"3234":{"position":[[281,6]]},"3248":{"position":[[281,6]]},"3262":{"position":[[281,6]]},"3276":{"position":[[281,6]]},"3290":{"position":[[281,6]]},"3304":{"position":[[281,6]]},"3318":{"position":[[281,6]]},"3332":{"position":[[281,6]]},"3338":{"position":[[977,5]]}}}],["connect",{"_index":54,"t":{"3086":{"position":[[908,12]]},"3156":{"position":[[52,7],[132,7],[188,10],[273,7],[317,10]]},"3184":{"position":[[129,11]]},"3224":{"position":[[381,10]]},"3226":{"position":[[24,10]]},"3238":{"position":[[417,10]]},"3240":{"position":[[66,10],[926,10]]},"3252":{"position":[[397,10],[597,10]]},"3254":{"position":[[144,10]]},"3282":{"position":[[103,10],[128,10],[197,10],[792,10]]},"3324":{"position":[[517,11],[541,10],[655,11],[786,10]]},"3338":{"position":[[349,10],[1416,12],[1459,11]]}}}],["connectiontimeout",{"_index":232,"t":{"3154":{"position":[[344,18]]},"3156":{"position":[[353,17]]},"3158":{"position":[[155,18]]}}}],["connectionuri",{"_index":355,"t":{"3224":{"position":[[436,14]]},"3226":{"position":[[141,13]]},"3228":{"position":[[28,14]]},"3238":{"position":[[468,14]]},"3240":{"position":[[183,13]]},"3242":{"position":[[28,14]]},"3252":{"position":[[448,14]]},"3254":{"position":[[41,13],[261,13]]},"3256":{"position":[[28,14]]},"3282":{"position":[[314,13]]},"3284":{"position":[[67,14]]}}}],["connmaxlifetim",{"_index":432,"t":{"3322":{"position":[[385,16]]},"3324":{"position":[[736,15],[849,15]]},"3326":{"position":[[163,16]]}}}],["consol",{"_index":280,"t":{"3170":{"position":[[1329,8],[2025,8]]}}}],["contain",{"_index":45,"t":{"3086":{"position":[[718,7]]},"3112":{"position":[[275,10]]},"3114":{"position":[[64,9],[80,9],[341,10]]},"3116":{"position":[[41,10]]},"3170":{"position":[[542,9],[603,10]]}}}],["cost",{"_index":409,"t":{"3294":{"position":[[352,4]]},"3296":{"position":[[117,4]]}}}],["couchbas",{"_index":59,"t":{"3088":{"position":[[32,9]]},"3146":{"position":[[2,9]]},"3152":{"position":[[0,9],[194,9]]},"3154":{"position":[[203,9]]},"3156":{"position":[[67,9],[147,9],[214,9],[335,9],[433,9]]}}}],["couchbase.new",{"_index":229,"t":{"3154":{"position":[[173,15]]}}}],["couchbase.new(couchbase.config",{"_index":230,"t":{"3154":{"position":[[249,31]]}}}],["couchbase/gocb",{"_index":226,"t":{"3146":{"position":[[33,15]]}}}],["cpu",{"_index":489,"t":{"3338":{"position":[[1491,3]]}}}],["creat",{"_index":105,"t":{"3098":{"position":[[116,6]]},"3112":{"position":[[117,6]]},"3126":{"position":[[114,6]]},"3140":{"position":[[113,6]]},"3154":{"position":[[117,6]]},"3168":{"position":[[116,6]]},"3170":{"position":[[1217,7],[1301,8],[1913,7],[1997,8],[2558,7],[2641,8],[2933,8]]},"3182":{"position":[[112,6]]},"3196":{"position":[[116,6]]},"3210":{"position":[[114,6]]},"3224":{"position":[[115,6]]},"3238":{"position":[[113,6]]},"3252":{"position":[[113,6]]},"3266":{"position":[[114,6]]},"3280":{"position":[[119,6]]},"3294":{"position":[[117,6]]},"3308":{"position":[[110,6]]},"3322":{"position":[[115,6]]},"3336":{"position":[[121,6],[633,6],[1016,6]]}}}],["credenti",{"_index":153,"t":{"3112":{"position":[[294,12],[307,12]]},"3114":{"position":[[396,11],[501,13],[515,11],[527,11]]},"3160":{"position":[[77,11],[100,11],[216,11],[235,11],[290,11]]},"3170":{"position":[[742,11],[850,13],[864,11],[876,11],[3075,11]]},"3172":{"position":[[52,12],[65,14]]},"3184":{"position":[[322,12]]},"3300":{"position":[[71,11],[94,11],[210,11],[229,11],[284,11]]},"3310":{"position":[[345,11],[453,13],[467,11],[479,11],[638,11]]},"3312":{"position":[[214,12],[227,14]]}}}],["custom",{"_index":107,"t":{"3098":{"position":[[201,6]]},"3112":{"position":[[203,6]]},"3126":{"position":[[197,6]]},"3140":{"position":[[195,6]]},"3154":{"position":[[226,6]]},"3170":{"position":[[435,6]]},"3182":{"position":[[193,6]]},"3196":{"position":[[201,6]]},"3210":{"position":[[197,6]]},"3224":{"position":[[199,6],[361,6]]},"3238":{"position":[[195,6],[397,6]]},"3252":{"position":[[195,6],[377,6],[570,6]]},"3266":{"position":[[197,6]]},"3280":{"position":[[204,6]]},"3294":{"position":[[203,6]]},"3308":{"position":[[189,6]]},"3322":{"position":[[199,6]]},"3336":{"position":[[209,6]]}}}],["customendpoint",{"_index":264,"t":{"3170":{"position":[[400,14]]}}}],["darwin",{"_index":220,"t":{"3142":{"position":[[297,6]]}}}],["databas",{"_index":113,"t":{"3098":{"position":[[292,9]]},"3100":{"position":[[326,8],[375,8]]},"3102":{"position":[[96,9]]},"3126":{"position":[[246,9]]},"3128":{"position":[[24,8],[82,8]]},"3130":{"position":[[28,9]]},"3132":{"position":[[184,8],[232,8]]},"3140":{"position":[[242,9]]},"3142":{"position":[[66,8],[118,8],[390,8]]},"3144":{"position":[[67,9]]},"3224":{"position":[[282,9],[494,9]]},"3226":{"position":[[461,8],[510,8]]},"3228":{"position":[[79,9]]},"3238":{"position":[[273,9]]},"3240":{"position":[[565,8],[614,8]]},"3242":{"position":[[78,9]]},"3252":{"position":[[273,9]]},"3254":{"position":[[580,8],[629,8]]},"3256":{"position":[[78,9]]},"3268":{"position":[[24,8]]},"3282":{"position":[[633,8],[682,8]]},"3284":{"position":[[117,9]]},"3322":{"position":[[250,9]]},"3324":{"position":[[24,8],[73,8],[674,9]]},"3326":{"position":[[28,9]]},"3336":{"position":[[315,9]]},"3338":{"position":[[319,8],[404,8],[524,8]]},"3340":{"position":[[96,9]]}}}],["database/key",{"_index":13,"t":{"3086":{"position":[[168,12]]}}}],["database/sql",{"_index":368,"t":{"3244":{"position":[[29,12]]}}}],["db",{"_index":122,"t":{"3100":{"position":[[44,2],[133,2]]},"3118":{"position":[[17,2]]},"3226":{"position":[[53,3],[185,2],[267,2]]},"3240":{"position":[[95,3],[227,2],[309,2]]},"3252":{"position":[[594,2],[608,3],[715,3],[719,3]]},"3254":{"position":[[24,2],[130,2],[173,3],[305,2],[387,2]]},"3258":{"position":[[17,2]]},"3266":{"position":[[252,5]]},"3268":{"position":[[65,6]]},"3270":{"position":[[34,5]]},"3280":{"position":[[257,3]]},"3282":{"position":[[66,2],[177,2],[226,3],[358,2],[440,2]]},"3338":{"position":[[44,2],[126,2]]}}}],["dbpool",{"_index":392,"t":{"3280":{"position":[[261,7]]}}}],["default",{"_index":77,"t":{"3092":{"position":[[40,7]]},"3098":{"position":[[148,7]]},"3100":{"position":[[73,7],[168,7],[228,7],[293,7],[356,7],[426,7],[544,7],[625,7]]},"3106":{"position":[[40,7]]},"3112":{"position":[[149,7]]},"3114":{"position":[[131,8],[240,7],[365,7],[490,7],[647,7]]},"3120":{"position":[[40,7]]},"3126":{"position":[[146,7]]},"3128":{"position":[[54,7],[166,7],[247,7],[367,7],[464,7],[510,7],[609,7]]},"3134":{"position":[[40,7]]},"3140":{"position":[[145,7]]},"3142":{"position":[[96,7],[171,7],[331,7],[434,7],[534,7]]},"3144":{"position":[[24,7]]},"3148":{"position":[[40,7]]},"3154":{"position":[[149,7]]},"3158":{"position":[[24,7]]},"3162":{"position":[[40,7]]},"3170":{"position":[[374,9],[714,8],[839,7],[999,7],[1097,7],[1252,8],[1279,7],[1948,8],[1975,7],[3031,9]]},"3176":{"position":[[40,7]]},"3182":{"position":[[144,7]]},"3190":{"position":[[40,7]]},"3196":{"position":[[148,7]]},"3198":{"position":[[102,7],[214,7]]},"3204":{"position":[[40,7]]},"3210":{"position":[[146,7]]},"3212":{"position":[[64,7]]},"3218":{"position":[[40,7]]},"3224":{"position":[[147,7]]},"3226":{"position":[[127,7],[214,7],[302,7],[363,7],[428,7],[491,7],[561,7],[674,7]]},"3232":{"position":[[40,7]]},"3238":{"position":[[145,7]]},"3240":{"position":[[169,7],[256,7],[344,7],[404,7],[469,7],[532,7],[595,7],[660,7],[768,7],[849,7],[953,7]]},"3246":{"position":[[40,7]]},"3252":{"position":[[145,7]]},"3254":{"position":[[115,7],[247,7],[334,7],[422,7],[482,7],[547,7],[610,7],[675,7],[783,7],[864,7]]},"3260":{"position":[[40,7]]},"3266":{"position":[[146,7]]},"3268":{"position":[[54,7],[146,7]]},"3274":{"position":[[40,7]]},"3280":{"position":[[151,7]]},"3282":{"position":[[162,7],[300,7],[387,7],[475,7],[535,7],[600,7],[663,7],[728,7],[819,7],[923,7],[1004,7]]},"3284":{"position":[[24,7]]},"3288":{"position":[[40,7]]},"3294":{"position":[[149,7]]},"3302":{"position":[[40,7]]},"3308":{"position":[[142,7]]},"3310":{"position":[[190,7],[314,7],[442,7],[602,7]]},"3312":{"position":[[4,7],[133,7]]},"3316":{"position":[[40,7]]},"3322":{"position":[[147,7]]},"3324":{"position":[[54,7],[119,7],[227,7],[308,7],[574,7],[700,7],[828,7]]},"3330":{"position":[[40,7]]},"3336":{"position":[[159,7]]},"3338":{"position":[[73,7],[161,7],[221,7],[286,7],[391,7],[619,7],[772,7],[869,7],[999,7],[1067,7],[1141,7],[1252,7],[1351,7],[1445,7]]}}}],["defaultcost",{"_index":416,"t":{"3298":{"position":[[81,12]]}}}],["defin",{"_index":189,"t":{"3128":{"position":[[559,6]]},"3142":{"position":[[10,7]]},"3240":{"position":[[10,7]]},"3282":{"position":[[10,7]]},"3310":{"position":[[10,7]]}}}],["delet",{"_index":44,"t":{"3086":{"position":[[627,6],[634,7],[792,6]]},"3100":{"position":[[587,8]]},"3128":{"position":[[209,8]]},"3212":{"position":[[36,8]]},"3240":{"position":[[811,8]]},"3254":{"position":[[826,8]]},"3282":{"position":[[966,8]]},"3324":{"position":[[270,8]]}}}],["delete(key",{"_index":46,"t":{"3086":{"position":[[735,10]]},"3094":{"position":[[174,10]]},"3108":{"position":[[174,10]]},"3122":{"position":[[174,10]]},"3136":{"position":[[174,10]]},"3150":{"position":[[174,10]]},"3164":{"position":[[171,10]]},"3178":{"position":[[175,10]]},"3192":{"position":[[174,10]]},"3206":{"position":[[174,10]]},"3220":{"position":[[174,10]]},"3234":{"position":[[174,10]]},"3248":{"position":[[174,10]]},"3262":{"position":[[174,10]]},"3276":{"position":[[174,10]]},"3290":{"position":[[174,10]]},"3304":{"position":[[174,10]]},"3318":{"position":[[174,10]]},"3332":{"position":[[174,10]]}}}],["design",{"_index":5,"t":{"3086":{"position":[[62,8]]}}}],["develop",{"_index":288,"t":{"3170":{"position":[[1476,9],[1645,9],[2172,9],[2341,9]]}}}],["dgraph",{"_index":174,"t":{"3118":{"position":[[26,6]]},"3286":{"position":[[36,6]]}}}],["dialtimeout",{"_index":325,"t":{"3184":{"position":[[75,11],[141,11]]},"3186":{"position":[[67,12]]}}}],["didn't",{"_index":96,"t":{"3096":{"position":[[127,6]]},"3110":{"position":[[132,6]]},"3124":{"position":[[113,6]]},"3138":{"position":[[112,6]]},"3152":{"position":[[116,6]]},"3166":{"position":[[115,6]]},"3180":{"position":[[111,6]]},"3194":{"position":[[113,6]]},"3208":{"position":[[113,6]]},"3222":{"position":[[114,6]]},"3236":{"position":[[112,6]]},"3250":{"position":[[112,6]]},"3264":{"position":[[113,6]]},"3278":{"position":[[115,6]]},"3292":{"position":[[116,6]]},"3306":{"position":[[109,6]]},"3320":{"position":[[114,6]]},"3334":{"position":[[112,6]]}}}],["differ",{"_index":12,"t":{"3086":{"position":[[158,9]]}}}],["disabl",{"_index":365,"t":{"3238":{"position":[[369,10]]},"3240":{"position":[[964,9]]},"3242":{"position":[[174,10]]},"3282":{"position":[[830,9]]},"3284":{"position":[[169,10]]}}}],["divid",{"_index":340,"t":{"3198":{"position":[[36,7]]}}}],["docker",{"_index":269,"t":{"3170":{"position":[[535,6],[596,6]]}}}],["doesn't",{"_index":275,"t":{"3170":{"position":[[1192,7],[1888,7],[2534,7],[2702,7]]}}}],["don't",{"_index":203,"t":{"3132":{"position":[[211,5]]},"3170":{"position":[[2883,5]]},"3264":{"position":[[210,5]]}}}],["driver",{"_index":2,"t":{"3086":{"position":[[16,7]]},"3090":{"position":[[19,6],[44,6],[67,7]]},"3110":{"position":[[19,6]]},"3132":{"position":[[16,6]]},"3146":{"position":[[20,6]]},"3160":{"position":[[19,6]]},"3174":{"position":[[15,6]]},"3188":{"position":[[19,6]]},"3202":{"position":[[21,7]]},"3216":{"position":[[18,6],[48,7]]},"3230":{"position":[[16,6]]},"3244":{"position":[[16,6]]},"3272":{"position":[[19,6]]},"3286":{"position":[[23,6]]},"3300":{"position":[[13,6]]},"3314":{"position":[[18,6]]},"3328":{"position":[[16,6]]}}}],["driver.cli",{"_index":82,"t":{"3094":{"position":[[288,13]]}}}],["driver/mysql",{"_index":370,"t":{"3244":{"position":[[53,13]]}}}],["dure",{"_index":386,"t":{"3268":{"position":[[106,6]]}}}],["dynamodb",{"_index":60,"t":{"3088":{"position":[[42,8]]},"3160":{"position":[[2,8]]},"3166":{"position":[[0,8],[193,8]]},"3168":{"position":[[148,8]]},"3170":{"position":[[38,8],[326,8],[442,8],[518,9],[1467,8],[1636,8],[2163,8],[2332,8]]}}}],["dynamodb.new(dynamodb.config",{"_index":254,"t":{"3168":{"position":[[166,29]]}}}],["e.g",{"_index":260,"t":{"3170":{"position":[[161,4]]}}}],["each",{"_index":484,"t":{"3338":{"position":[[972,4]]}}}],["ec2",{"_index":247,"t":{"3160":{"position":[[177,3]]},"3300":{"position":[[171,3]]}}}],["effect",{"_index":469,"t":{"3338":{"position":[[541,7]]}}}],["empti",{"_index":37,"t":{"3086":{"position":[[518,5]]}}}],["enabl",{"_index":475,"t":{"3338":{"position":[[715,7]]}}}],["encount",{"_index":167,"t":{"3114":{"position":[[584,9]]},"3170":{"position":[[933,9]]},"3310":{"position":[[536,9]]}}}],["endpoint",{"_index":155,"t":{"3114":{"position":[[108,9],[191,8]]},"3116":{"position":[[56,9]]},"3170":{"position":[[459,9],[723,8]]},"3182":{"position":[[233,10]]},"3184":{"position":[[24,9],[53,9]]},"3186":{"position":[[28,10]]},"3308":{"position":[[255,9],[269,10]]},"3310":{"position":[[102,8],[111,8]]},"3312":{"position":[[52,8],[200,9]]}}}],["environ",{"_index":244,"t":{"3160":{"position":[[131,11]]},"3170":{"position":[[224,11],[261,11]]},"3300":{"position":[[125,11]]}}}],["err",{"_index":454,"t":{"3336":{"position":[[675,3],[737,3]]}}}],["error",{"_index":30,"t":{"3086":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"3094":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3108":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3122":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3136":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3150":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3164":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"3170":{"position":[[2737,5],[3002,7]]},"3178":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"3192":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3206":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3220":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3234":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3248":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3262":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3276":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3290":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3304":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3318":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3332":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]}}}],["especi",{"_index":266,"t":{"3170":{"position":[[480,10]]}}}],["establish",{"_index":327,"t":{"3184":{"position":[[117,9]]}}}],["etcd",{"_index":61,"t":{"3088":{"position":[[51,4]]},"3132":{"position":[[29,4]]},"3174":{"position":[[2,4],[28,4]]},"3180":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":320,"t":{"3182":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":321,"t":{"3182":{"position":[[216,16]]}}}],["exampl",{"_index":75,"t":{"3092":{"position":[[24,8]]},"3106":{"position":[[24,8]]},"3120":{"position":[[24,8]]},"3134":{"position":[[24,8]]},"3148":{"position":[[24,8]]},"3162":{"position":[[24,8]]},"3170":{"position":[[1407,7],[2103,7]]},"3176":{"position":[[24,8]]},"3190":{"position":[[24,8]]},"3204":{"position":[[24,8]]},"3218":{"position":[[24,8]]},"3232":{"position":[[24,8]]},"3246":{"position":[[24,8]]},"3260":{"position":[[24,8]]},"3274":{"position":[[24,8]]},"3288":{"position":[[24,8]]},"3302":{"position":[[24,8]]},"3316":{"position":[[24,8]]},"3330":{"position":[[24,8]]},"3338":{"position":[[555,8]]}}}],["execut",{"_index":481,"t":{"3338":{"position":[[920,7]]}}}],["exist",{"_index":26,"t":{"3086":{"position":[[371,5]]},"3100":{"position":[[491,8],[508,8]]},"3114":{"position":[[315,8],[332,8]]},"3128":{"position":[[118,8],[135,8]]},"3142":{"position":[[485,8],[502,8]]},"3170":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"3198":{"position":[[166,8],[183,8]]},"3226":{"position":[[626,8],[643,8]]},"3240":{"position":[[720,8],[737,8]]},"3254":{"position":[[735,8],[752,8]]},"3264":{"position":[[224,8]]},"3282":{"position":[[875,8],[892,8]]},"3310":{"position":[[265,8],[282,8]]},"3324":{"position":[[179,8],[196,8]]},"3338":{"position":[[1199,8],[1216,8]]}}}],["exp",{"_index":42,"t":{"3086":{"position":[[599,3]]},"3094":{"position":[[131,3]]},"3108":{"position":[[131,3]]},"3122":{"position":[[131,3]]},"3136":{"position":[[131,3]]},"3150":{"position":[[131,3]]},"3164":{"position":[[128,3]]},"3178":{"position":[[132,3]]},"3192":{"position":[[131,3]]},"3206":{"position":[[131,3]]},"3220":{"position":[[131,3]]},"3234":{"position":[[131,3]]},"3248":{"position":[[131,3]]},"3262":{"position":[[131,3]]},"3276":{"position":[[131,3]]},"3290":{"position":[[131,3]]},"3304":{"position":[[131,3]]},"3318":{"position":[[131,3]]},"3332":{"position":[[131,3]]}}}],["expir",{"_index":34,"t":{"3086":{"position":[[474,10],[503,11]]},"3100":{"position":[[596,7]]},"3128":{"position":[[218,7]]},"3212":{"position":[[45,7]]},"3240":{"position":[[820,7]]},"3254":{"position":[[835,7]]},"3282":{"position":[[975,7]]},"3324":{"position":[[279,7]]}}}],["fail",{"_index":326,"t":{"3184":{"position":[[106,7]]}}}],["failov",{"_index":447,"t":{"3336":{"position":[[419,8]]}}}],["failovercli",{"_index":476,"t":{"3338":{"position":[[723,14]]}}}],["failur",{"_index":169,"t":{"3114":{"position":[[604,8]]},"3170":{"position":[[953,8]]},"3310":{"position":[[556,8]]}}}],["fals",{"_index":116,"t":{"3098":{"position":[[347,6]]},"3100":{"position":[[555,5]]},"3102":{"position":[[151,6]]},"3114":{"position":[[376,5]]},"3116":{"position":[[96,6]]},"3126":{"position":[[281,6]]},"3128":{"position":[[177,5],[620,5]]},"3130":{"position":[[63,6],[196,6]]},"3140":{"position":[[298,6]]},"3142":{"position":[[445,5],[545,5]]},"3144":{"position":[[151,6],[165,6]]},"3170":{"position":[[1108,5],[2786,6]]},"3172":{"position":[[103,6]]},"3198":{"position":[[225,5]]},"3224":{"position":[[337,6],[549,6]]},"3226":{"position":[[685,5]]},"3228":{"position":[[134,6]]},"3238":{"position":[[323,6],[548,6]]},"3240":{"position":[[779,5]]},"3242":{"position":[[128,6]]},"3252":{"position":[[323,6],[516,6],[730,6]]},"3254":{"position":[[794,5]]},"3256":{"position":[[128,6]]},"3280":{"position":[[300,6]]},"3282":{"position":[[934,5]]},"3284":{"position":[[187,6]]},"3308":{"position":[[308,6]]},"3310":{"position":[[325,5]]},"3312":{"position":[[284,6]]},"3322":{"position":[[310,6]]},"3324":{"position":[[238,5]]},"3326":{"position":[[88,6]]},"3336":{"position":[[335,6],[1003,6],[1160,6]]},"3338":{"position":[[1263,5]]},"3340":{"position":[[116,6]]}}}],["fast",{"_index":173,"t":{"3118":{"position":[[2,4]]},"3132":{"position":[[165,5]]},"3258":{"position":[[2,4]]}}}],["fiber",{"_index":8,"t":{"3086":{"position":[[95,5]]},"3098":{"position":[[302,8]]},"3100":{"position":[[367,7]]},"3102":{"position":[[106,8]]},"3224":{"position":[[292,8],[504,8]]},"3226":{"position":[[502,7]]},"3228":{"position":[[89,8]]},"3238":{"position":[[283,8]]},"3240":{"position":[[606,7]]},"3242":{"position":[[88,8]]},"3252":{"position":[[283,8]]},"3254":{"position":[[621,7]]},"3256":{"position":[[88,8]]},"3282":{"position":[[674,7]]},"3284":{"position":[[127,8]]},"3324":{"position":[[65,7]]}}}],["fiber.badg",{"_index":180,"t":{"3126":{"position":[[256,17]]},"3128":{"position":[[65,16]]},"3130":{"position":[[38,17]]}}}],["fiber.db",{"_index":213,"t":{"3142":{"position":[[107,10]]},"3144":{"position":[[77,11]]}}}],["fiber.sqlite3",{"_index":428,"t":{"3322":{"position":[[260,18]]},"3326":{"position":[[38,18]]}}}],["fiber_storag",{"_index":115,"t":{"3098":{"position":[[323,16]]},"3100":{"position":[[437,15]]},"3102":{"position":[[127,16]]},"3142":{"position":[[182,15]]},"3144":{"position":[[97,16]]},"3158":{"position":[[138,16]]},"3170":{"position":[[354,16]]},"3172":{"position":[[35,16]]},"3224":{"position":[[313,16],[525,16]]},"3226":{"position":[[572,15]]},"3228":{"position":[[110,16]]},"3238":{"position":[[299,16]]},"3240":{"position":[[671,15]]},"3242":{"position":[[104,16]]},"3252":{"position":[[299,16]]},"3254":{"position":[[686,15]]},"3256":{"position":[[104,16]]},"3280":{"position":[[276,16]]},"3282":{"position":[[739,15]]},"3284":{"position":[[143,16]]},"3322":{"position":[[286,16]]},"3324":{"position":[[130,15]]},"3326":{"position":[[64,16]]}}}],["field",{"_index":133,"t":{"3102":{"position":[[23,6]]},"3160":{"position":[[67,6],[206,6]]},"3282":{"position":[[139,6]]},"3300":{"position":[[61,6],[200,6]]}}}],["file",{"_index":217,"t":{"3142":{"position":[[265,4]]},"3170":{"position":[[216,4]]}}}],["first",{"_index":95,"t":{"3096":{"position":[[114,5]]},"3110":{"position":[[119,5]]},"3124":{"position":[[100,5]]},"3138":{"position":[[99,5]]},"3152":{"position":[[103,5]]},"3166":{"position":[[102,5]]},"3180":{"position":[[98,5]]},"3194":{"position":[[100,5]]},"3208":{"position":[[100,5]]},"3222":{"position":[[101,5]]},"3236":{"position":[[99,5]]},"3250":{"position":[[99,5]]},"3264":{"position":[[100,5]]},"3278":{"position":[[102,5]]},"3292":{"position":[[103,5]]},"3306":{"position":[[96,5]]},"3320":{"position":[[101,5]]},"3334":{"position":[[99,5]]}}}],["follow",{"_index":103,"t":{"3098":{"position":[[89,9]]},"3112":{"position":[[90,9]]},"3126":{"position":[[87,9]]},"3140":{"position":[[86,9]]},"3154":{"position":[[90,9]]},"3168":{"position":[[89,9]]},"3182":{"position":[[85,9]]},"3196":{"position":[[89,9]]},"3210":{"position":[[87,9]]},"3224":{"position":[[88,9]]},"3238":{"position":[[86,9]]},"3252":{"position":[[86,9]]},"3266":{"position":[[87,9]]},"3280":{"position":[[92,9]]},"3294":{"position":[[90,9]]},"3308":{"position":[[83,9]]},"3322":{"position":[[88,9]]},"3336":{"position":[[100,9]]}}}],["format",{"_index":468,"t":{"3338":{"position":[[433,6]]}}}],["free",{"_index":284,"t":{"3170":{"position":[[1369,4],[2065,4]]}}}],["frequenc",{"_index":405,"t":{"3294":{"position":[[303,9]]},"3296":{"position":[[60,9]]}}}],["full",{"_index":204,"t":{"3132":{"position":[[227,4]]}}}],["func",{"_index":78,"t":{"3094":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3108":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3122":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3136":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3150":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3164":{"position":[[0,4],[32,4],[82,4],[153,4],[196,4],[228,4],[260,4]]},"3178":{"position":[[0,4],[36,4],[86,4],[157,4],[200,4],[232,4],[264,4]]},"3192":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3206":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3220":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3234":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3248":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3262":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3276":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3290":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3304":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3318":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3332":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]}}}],["garbag",{"_index":51,"t":{"3086":{"position":[[877,7]]}}}],["gcinterv",{"_index":117,"t":{"3098":{"position":[[354,11]]},"3100":{"position":[[653,10]]},"3102":{"position":[[158,11]]},"3126":{"position":[[288,11]]},"3128":{"position":[[275,10]]},"3130":{"position":[[70,11]]},"3210":{"position":[[246,11]]},"3212":{"position":[[92,10]]},"3214":{"position":[[28,11]]},"3238":{"position":[[330,11],[555,11]]},"3240":{"position":[[877,10]]},"3242":{"position":[[135,11]]},"3252":{"position":[[330,11],[523,11],[737,11]]},"3254":{"position":[[892,10]]},"3256":{"position":[[135,11]]},"3280":{"position":[[307,11]]},"3282":{"position":[[1032,10]]},"3284":{"position":[[194,11]]},"3322":{"position":[[317,11]]},"3324":{"position":[[336,10]]},"3326":{"position":[[95,11]]}}}],["get",{"_index":21,"t":{"3086":{"position":[[289,4]]}}}],["get(key",{"_index":27,"t":{"3086":{"position":[[377,7]]},"3094":{"position":[[53,7]]},"3108":{"position":[[53,7]]},"3122":{"position":[[53,7]]},"3136":{"position":[[53,7]]},"3150":{"position":[[53,7]]},"3164":{"position":[[50,7]]},"3178":{"position":[[54,7]]},"3192":{"position":[[53,7]]},"3206":{"position":[[53,7]]},"3220":{"position":[[53,7]]},"3234":{"position":[[53,7]]},"3248":{"position":[[53,7]]},"3262":{"position":[[53,7]]},"3276":{"position":[[53,7]]},"3290":{"position":[[53,7]]},"3304":{"position":[[53,7]]},"3318":{"position":[[53,7]]},"3332":{"position":[[53,7]]}}}],["github.com//:@127.0.0.1:6379/:@localhost:6379/:@tcp(:)/SQLite3 | Fiber - - + +
-
Version: etcd_v1.x.x

SQLite3

Release +

Version: etcd_v1.x.x

SQLite3

Release Discord Test Security -Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
- - +Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/index.html b/storage/index.html index a84fcba004a..a3ed659272a 100644 --- a/storage/index.html +++ b/storage/index.html @@ -1,18 +1,18 @@ - + -👋 Welcome | Fiber +👋 Welcome | Fiber - - + +
-
Version: memcache_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

- - +
Version: bbolt_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

+ + \ No newline at end of file diff --git a/storage/memcache/index.html b/storage/memcache/index.html index a27a9820c91..21532679174 100644 --- a/storage/memcache/index.html +++ b/storage/memcache/index.html @@ -1,22 +1,22 @@ - + -Memcache | Fiber +Memcache | Fiber - - + +
-
Version: memcache_v1.x.x

Memcache

Release +

Version: bbolt_v1.x.x

Memcache

Release Discord Test Security -Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
- - +Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
+ + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/arangodb/index.html b/storage/memcache_v1.x.x/arangodb/index.html new file mode 100644 index 00000000000..95f818d9bf1 --- /dev/null +++ b/storage/memcache_v1.x.x/arangodb/index.html @@ -0,0 +1,22 @@ + + + + + +ArangoDB | Fiber + + + + + + +
+
Version: memcache_v1.x.x

ArangoDB

Release +Discord +Test +Security +Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/azureblob/index.html b/storage/memcache_v1.x.x/azureblob/index.html new file mode 100644 index 00000000000..a036105ed22 --- /dev/null +++ b/storage/memcache_v1.x.x/azureblob/index.html @@ -0,0 +1,22 @@ + + + + + +Azure Blob | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Azure Blob

Release +Discord +Test +Security +Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/badger/index.html b/storage/memcache_v1.x.x/badger/index.html new file mode 100644 index 00000000000..17c6396d6ef --- /dev/null +++ b/storage/memcache_v1.x.x/badger/index.html @@ -0,0 +1,22 @@ + + + + + +Badger | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Badger

Release +Discord +Test +Security +Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/bbolt/index.html b/storage/memcache_v1.x.x/bbolt/index.html new file mode 100644 index 00000000000..1d9c4c7f092 --- /dev/null +++ b/storage/memcache_v1.x.x/bbolt/index.html @@ -0,0 +1,22 @@ + + + + + +Bbolt | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Bbolt

Release +Discord +Test +Security +Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/couchbase/index.html b/storage/memcache_v1.x.x/couchbase/index.html new file mode 100644 index 00000000000..0ea90f42d8d --- /dev/null +++ b/storage/memcache_v1.x.x/couchbase/index.html @@ -0,0 +1,22 @@ + + + + + +Couchbase | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Couchbase

Release +Discord +Test +Security +Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/dynamodb/index.html b/storage/memcache_v1.x.x/dynamodb/index.html new file mode 100644 index 00000000000..6732bb175c9 --- /dev/null +++ b/storage/memcache_v1.x.x/dynamodb/index.html @@ -0,0 +1,22 @@ + + + + + +DynamoDB | Fiber + + + + + + +
+
Version: memcache_v1.x.x

DynamoDB

Release +Discord +Test +Security +Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/etcd/index.html b/storage/memcache_v1.x.x/etcd/index.html new file mode 100644 index 00000000000..5bdd7985ddf --- /dev/null +++ b/storage/memcache_v1.x.x/etcd/index.html @@ -0,0 +1,22 @@ + + + + + +Etcd | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Etcd

Release +Discord +Test +Security +Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/index.html b/storage/memcache_v1.x.x/index.html new file mode 100644 index 00000000000..cf3221e53e2 --- /dev/null +++ b/storage/memcache_v1.x.x/index.html @@ -0,0 +1,18 @@ + + + + + +👋 Welcome | Fiber + + + + + + +
+
Version: memcache_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/memcache/index.html b/storage/memcache_v1.x.x/memcache/index.html new file mode 100644 index 00000000000..1f0a137e760 --- /dev/null +++ b/storage/memcache_v1.x.x/memcache/index.html @@ -0,0 +1,22 @@ + + + + + +Memcache | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Memcache

Release +Discord +Test +Security +Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/memory/index.html b/storage/memcache_v1.x.x/memory/index.html new file mode 100644 index 00000000000..5430363350c --- /dev/null +++ b/storage/memcache_v1.x.x/memory/index.html @@ -0,0 +1,22 @@ + + + + + +Memory | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Memory

Release +Discord +Test +Security +Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/mongodb/index.html b/storage/memcache_v1.x.x/mongodb/index.html new file mode 100644 index 00000000000..2806b1eb39f --- /dev/null +++ b/storage/memcache_v1.x.x/mongodb/index.html @@ -0,0 +1,22 @@ + + + + + +MongoDB | Fiber + + + + + + +
+
Version: memcache_v1.x.x

MongoDB

Release +Discord +Test +Security +Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/mssql/index.html b/storage/memcache_v1.x.x/mssql/index.html new file mode 100644 index 00000000000..356e0c8d6fa --- /dev/null +++ b/storage/memcache_v1.x.x/mssql/index.html @@ -0,0 +1,22 @@ + + + + + +MSSQL | Fiber + + + + + + +
+
Version: memcache_v1.x.x

MSSQL

Release +Discord +Test +Security +Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/mysql/index.html b/storage/memcache_v1.x.x/mysql/index.html new file mode 100644 index 00000000000..2fa566cce86 --- /dev/null +++ b/storage/memcache_v1.x.x/mysql/index.html @@ -0,0 +1,22 @@ + + + + + +MySQL | Fiber + + + + + + +
+
Version: memcache_v1.x.x

MySQL

Release +Discord +Test +Security +Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/pebble/index.html b/storage/memcache_v1.x.x/pebble/index.html new file mode 100644 index 00000000000..76811e3d133 --- /dev/null +++ b/storage/memcache_v1.x.x/pebble/index.html @@ -0,0 +1,22 @@ + + + + + +Pebble | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Pebble

Release +Discord +Test +Security +Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/postgres/index.html b/storage/memcache_v1.x.x/postgres/index.html new file mode 100644 index 00000000000..6382c5a734b --- /dev/null +++ b/storage/memcache_v1.x.x/postgres/index.html @@ -0,0 +1,22 @@ + + + + + +Postgres | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Postgres

Release +Discord +Test +Security +Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/redis/index.html b/storage/memcache_v1.x.x/redis/index.html new file mode 100644 index 00000000000..0646f1adbeb --- /dev/null +++ b/storage/memcache_v1.x.x/redis/index.html @@ -0,0 +1,22 @@ + + + + + +Redis | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Redis

Release +Discord +Test +Security +Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/ristretto/index.html b/storage/memcache_v1.x.x/ristretto/index.html new file mode 100644 index 00000000000..f6557d411fe --- /dev/null +++ b/storage/memcache_v1.x.x/ristretto/index.html @@ -0,0 +1,22 @@ + + + + + +Ristretto | Fiber + + + + + + +
+
Version: memcache_v1.x.x

Ristretto

Release +Discord +Test +Security +Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/s3/index.html b/storage/memcache_v1.x.x/s3/index.html new file mode 100644 index 00000000000..051fc7a7707 --- /dev/null +++ b/storage/memcache_v1.x.x/s3/index.html @@ -0,0 +1,22 @@ + + + + + +S3 | Fiber + + + + + + +
+
Version: memcache_v1.x.x

S3

Release +Discord +Test +Security +Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
+ + + + \ No newline at end of file diff --git a/storage/memcache_v1.x.x/search-index.json b/storage/memcache_v1.x.x/search-index.json new file mode 100644 index 00000000000..69e4e90fc08 --- /dev/null +++ b/storage/memcache_v1.x.x/search-index.json @@ -0,0 +1 @@ +[{"documents":[{"i":2827,"t":"👋 Welcome","u":"/storage/memcache_v1.x.x/","b":[]},{"i":2832,"t":"ArangoDB","u":"/storage/memcache_v1.x.x/arangodb/","b":[]},{"i":2846,"t":"Azure Blob","u":"/storage/memcache_v1.x.x/azureblob/","b":[]},{"i":2860,"t":"Badger","u":"/storage/memcache_v1.x.x/badger/","b":[]},{"i":2874,"t":"Bbolt","u":"/storage/memcache_v1.x.x/bbolt/","b":[]},{"i":2888,"t":"Couchbase","u":"/storage/memcache_v1.x.x/couchbase/","b":[]},{"i":2902,"t":"DynamoDB","u":"/storage/memcache_v1.x.x/dynamodb/","b":[]},{"i":2916,"t":"Etcd","u":"/storage/memcache_v1.x.x/etcd/","b":[]},{"i":2930,"t":"Memcache","u":"/storage/memcache_v1.x.x/memcache/","b":[]},{"i":2944,"t":"Memory","u":"/storage/memcache_v1.x.x/memory/","b":[]},{"i":2958,"t":"MongoDB","u":"/storage/memcache_v1.x.x/mongodb/","b":[]},{"i":2972,"t":"MSSQL","u":"/storage/memcache_v1.x.x/mssql/","b":[]},{"i":2986,"t":"MySQL","u":"/storage/memcache_v1.x.x/mysql/","b":[]},{"i":3000,"t":"Pebble","u":"/storage/memcache_v1.x.x/pebble/","b":[]},{"i":3014,"t":"Postgres","u":"/storage/memcache_v1.x.x/postgres/","b":[]},{"i":3028,"t":"Redis","u":"/storage/memcache_v1.x.x/redis/","b":[]},{"i":3042,"t":"Ristretto","u":"/storage/memcache_v1.x.x/ristretto/","b":[]},{"i":3056,"t":"S3","u":"/storage/memcache_v1.x.x/s3/","b":[]},{"i":3070,"t":"SQLite3","u":"/storage/memcache_v1.x.x/sqlite3/","b":[]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2827",[0,1.946,1,1.946]],["t/2832",[2,2.695]],["t/2846",[3,1.946,4,1.946]],["t/2860",[5,2.695]],["t/2874",[6,2.695]],["t/2888",[7,2.695]],["t/2902",[8,2.695]],["t/2916",[9,2.695]],["t/2930",[10,2.695]],["t/2944",[11,2.695]],["t/2958",[12,2.695]],["t/2972",[13,2.695]],["t/2986",[14,2.695]],["t/3000",[15,2.695]],["t/3014",[16,2.695]],["t/3028",[17,2.695]],["t/3042",[18,2.695]],["t/3056",[19,2.695]],["t/3070",[20,2.695]]],"invertedIndex":[["",{"_index":0,"t":{"2827":{"position":[[0,2]]}}}],["arangodb",{"_index":2,"t":{"2832":{"position":[[0,8]]}}}],["azur",{"_index":3,"t":{"2846":{"position":[[0,5]]}}}],["badger",{"_index":5,"t":{"2860":{"position":[[0,6]]}}}],["bbolt",{"_index":6,"t":{"2874":{"position":[[0,5]]}}}],["blob",{"_index":4,"t":{"2846":{"position":[[6,4]]}}}],["couchbas",{"_index":7,"t":{"2888":{"position":[[0,9]]}}}],["dynamodb",{"_index":8,"t":{"2902":{"position":[[0,8]]}}}],["etcd",{"_index":9,"t":{"2916":{"position":[[0,4]]}}}],["memcach",{"_index":10,"t":{"2930":{"position":[[0,8]]}}}],["memori",{"_index":11,"t":{"2944":{"position":[[0,6]]}}}],["mongodb",{"_index":12,"t":{"2958":{"position":[[0,7]]}}}],["mssql",{"_index":13,"t":{"2972":{"position":[[0,5]]}}}],["mysql",{"_index":14,"t":{"2986":{"position":[[0,5]]}}}],["pebbl",{"_index":15,"t":{"3000":{"position":[[0,6]]}}}],["postgr",{"_index":16,"t":{"3014":{"position":[[0,8]]}}}],["redi",{"_index":17,"t":{"3028":{"position":[[0,5]]}}}],["ristretto",{"_index":18,"t":{"3042":{"position":[[0,9]]}}}],["s3",{"_index":19,"t":{"3056":{"position":[[0,2]]}}}],["sqlite3",{"_index":20,"t":{"3070":{"position":[[0,7]]}}}],["welcom",{"_index":1,"t":{"2827":{"position":[[3,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":2828,"t":"📦 Storage","u":"/storage/memcache_v1.x.x/","h":"","p":2827},{"i":2830,"t":"📑 Storage Implementations","u":"/storage/memcache_v1.x.x/","h":"#-storage-implementations","p":2827},{"i":2834,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/arangodb/","h":"#table-of-contents","p":2832},{"i":2836,"t":"Signatures","u":"/storage/memcache_v1.x.x/arangodb/","h":"#signatures","p":2832},{"i":2838,"t":"Installation","u":"/storage/memcache_v1.x.x/arangodb/","h":"#installation","p":2832},{"i":2840,"t":"Examples","u":"/storage/memcache_v1.x.x/arangodb/","h":"#examples","p":2832},{"i":2842,"t":"Config","u":"/storage/memcache_v1.x.x/arangodb/","h":"#config","p":2832},{"i":2844,"t":"Default Config","u":"/storage/memcache_v1.x.x/arangodb/","h":"#default-config","p":2832},{"i":2848,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/azureblob/","h":"#table-of-contents","p":2846},{"i":2850,"t":"Signatures","u":"/storage/memcache_v1.x.x/azureblob/","h":"#signatures","p":2846},{"i":2852,"t":"Installation","u":"/storage/memcache_v1.x.x/azureblob/","h":"#installation","p":2846},{"i":2854,"t":"Examples","u":"/storage/memcache_v1.x.x/azureblob/","h":"#examples","p":2846},{"i":2856,"t":"Config","u":"/storage/memcache_v1.x.x/azureblob/","h":"#config","p":2846},{"i":2858,"t":"Default Config","u":"/storage/memcache_v1.x.x/azureblob/","h":"#default-config","p":2846},{"i":2862,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/badger/","h":"#table-of-contents","p":2860},{"i":2864,"t":"Signatures","u":"/storage/memcache_v1.x.x/badger/","h":"#signatures","p":2860},{"i":2866,"t":"Installation","u":"/storage/memcache_v1.x.x/badger/","h":"#installation","p":2860},{"i":2868,"t":"Examples","u":"/storage/memcache_v1.x.x/badger/","h":"#examples","p":2860},{"i":2870,"t":"Config","u":"/storage/memcache_v1.x.x/badger/","h":"#config","p":2860},{"i":2872,"t":"Default Config","u":"/storage/memcache_v1.x.x/badger/","h":"#default-config","p":2860},{"i":2876,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/bbolt/","h":"#table-of-contents","p":2874},{"i":2878,"t":"Signatures","u":"/storage/memcache_v1.x.x/bbolt/","h":"#signatures","p":2874},{"i":2880,"t":"Installation","u":"/storage/memcache_v1.x.x/bbolt/","h":"#installation","p":2874},{"i":2882,"t":"Examples","u":"/storage/memcache_v1.x.x/bbolt/","h":"#examples","p":2874},{"i":2884,"t":"Config","u":"/storage/memcache_v1.x.x/bbolt/","h":"#config","p":2874},{"i":2886,"t":"Default Config","u":"/storage/memcache_v1.x.x/bbolt/","h":"#default-config","p":2874},{"i":2890,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/couchbase/","h":"#table-of-contents","p":2888},{"i":2892,"t":"Signatures","u":"/storage/memcache_v1.x.x/couchbase/","h":"#signatures","p":2888},{"i":2894,"t":"Installation","u":"/storage/memcache_v1.x.x/couchbase/","h":"#installation","p":2888},{"i":2896,"t":"Examples","u":"/storage/memcache_v1.x.x/couchbase/","h":"#examples","p":2888},{"i":2898,"t":"Config","u":"/storage/memcache_v1.x.x/couchbase/","h":"#config","p":2888},{"i":2900,"t":"Default Config","u":"/storage/memcache_v1.x.x/couchbase/","h":"#default-config","p":2888},{"i":2904,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#table-of-contents","p":2902},{"i":2906,"t":"Signatures","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#signatures","p":2902},{"i":2908,"t":"Installation","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#installation","p":2902},{"i":2910,"t":"Examples","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#examples","p":2902},{"i":2912,"t":"Config","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#config","p":2902},{"i":2914,"t":"Default Config","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#default-config","p":2902},{"i":2918,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/etcd/","h":"#table-of-contents","p":2916},{"i":2920,"t":"Signatures","u":"/storage/memcache_v1.x.x/etcd/","h":"#signatures","p":2916},{"i":2922,"t":"Installation","u":"/storage/memcache_v1.x.x/etcd/","h":"#installation","p":2916},{"i":2924,"t":"Examples","u":"/storage/memcache_v1.x.x/etcd/","h":"#examples","p":2916},{"i":2926,"t":"Config","u":"/storage/memcache_v1.x.x/etcd/","h":"#config","p":2916},{"i":2928,"t":"Default Config","u":"/storage/memcache_v1.x.x/etcd/","h":"#default-config","p":2916},{"i":2932,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/memcache/","h":"#table-of-contents","p":2930},{"i":2934,"t":"Signatures","u":"/storage/memcache_v1.x.x/memcache/","h":"#signatures","p":2930},{"i":2936,"t":"Installation","u":"/storage/memcache_v1.x.x/memcache/","h":"#installation","p":2930},{"i":2938,"t":"Examples","u":"/storage/memcache_v1.x.x/memcache/","h":"#examples","p":2930},{"i":2940,"t":"Config","u":"/storage/memcache_v1.x.x/memcache/","h":"#config","p":2930},{"i":2942,"t":"Default Config","u":"/storage/memcache_v1.x.x/memcache/","h":"#default-config","p":2930},{"i":2946,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/memory/","h":"#table-of-contents","p":2944},{"i":2948,"t":"Signatures","u":"/storage/memcache_v1.x.x/memory/","h":"#signatures","p":2944},{"i":2950,"t":"Installation","u":"/storage/memcache_v1.x.x/memory/","h":"#installation","p":2944},{"i":2952,"t":"Examples","u":"/storage/memcache_v1.x.x/memory/","h":"#examples","p":2944},{"i":2954,"t":"Config","u":"/storage/memcache_v1.x.x/memory/","h":"#config","p":2944},{"i":2956,"t":"Default Config","u":"/storage/memcache_v1.x.x/memory/","h":"#default-config","p":2944},{"i":2960,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/mongodb/","h":"#table-of-contents","p":2958},{"i":2962,"t":"Signatures","u":"/storage/memcache_v1.x.x/mongodb/","h":"#signatures","p":2958},{"i":2964,"t":"Installation","u":"/storage/memcache_v1.x.x/mongodb/","h":"#installation","p":2958},{"i":2966,"t":"Examples","u":"/storage/memcache_v1.x.x/mongodb/","h":"#examples","p":2958},{"i":2968,"t":"Config","u":"/storage/memcache_v1.x.x/mongodb/","h":"#config","p":2958},{"i":2970,"t":"Default Config","u":"/storage/memcache_v1.x.x/mongodb/","h":"#default-config","p":2958},{"i":2974,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/mssql/","h":"#table-of-contents","p":2972},{"i":2976,"t":"Signatures","u":"/storage/memcache_v1.x.x/mssql/","h":"#signatures","p":2972},{"i":2978,"t":"Installation","u":"/storage/memcache_v1.x.x/mssql/","h":"#installation","p":2972},{"i":2980,"t":"Examples","u":"/storage/memcache_v1.x.x/mssql/","h":"#examples","p":2972},{"i":2982,"t":"Config","u":"/storage/memcache_v1.x.x/mssql/","h":"#config","p":2972},{"i":2984,"t":"Default Config","u":"/storage/memcache_v1.x.x/mssql/","h":"#default-config","p":2972},{"i":2988,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/mysql/","h":"#table-of-contents","p":2986},{"i":2990,"t":"Signatures","u":"/storage/memcache_v1.x.x/mysql/","h":"#signatures","p":2986},{"i":2992,"t":"Installation","u":"/storage/memcache_v1.x.x/mysql/","h":"#installation","p":2986},{"i":2994,"t":"Examples","u":"/storage/memcache_v1.x.x/mysql/","h":"#examples","p":2986},{"i":2996,"t":"Config","u":"/storage/memcache_v1.x.x/mysql/","h":"#config","p":2986},{"i":2998,"t":"Default Config","u":"/storage/memcache_v1.x.x/mysql/","h":"#default-config","p":2986},{"i":3002,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/pebble/","h":"#table-of-contents","p":3000},{"i":3004,"t":"Signatures","u":"/storage/memcache_v1.x.x/pebble/","h":"#signatures","p":3000},{"i":3006,"t":"Installation","u":"/storage/memcache_v1.x.x/pebble/","h":"#installation","p":3000},{"i":3008,"t":"Examples","u":"/storage/memcache_v1.x.x/pebble/","h":"#examples","p":3000},{"i":3010,"t":"Config","u":"/storage/memcache_v1.x.x/pebble/","h":"#config","p":3000},{"i":3012,"t":"Default Config","u":"/storage/memcache_v1.x.x/pebble/","h":"#default-config","p":3000},{"i":3016,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/postgres/","h":"#table-of-contents","p":3014},{"i":3018,"t":"Signatures","u":"/storage/memcache_v1.x.x/postgres/","h":"#signatures","p":3014},{"i":3020,"t":"Installation","u":"/storage/memcache_v1.x.x/postgres/","h":"#installation","p":3014},{"i":3022,"t":"Examples","u":"/storage/memcache_v1.x.x/postgres/","h":"#examples","p":3014},{"i":3024,"t":"Config","u":"/storage/memcache_v1.x.x/postgres/","h":"#config","p":3014},{"i":3026,"t":"Default Config","u":"/storage/memcache_v1.x.x/postgres/","h":"#default-config","p":3014},{"i":3030,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/redis/","h":"#table-of-contents","p":3028},{"i":3032,"t":"Signatures","u":"/storage/memcache_v1.x.x/redis/","h":"#signatures","p":3028},{"i":3034,"t":"Installation","u":"/storage/memcache_v1.x.x/redis/","h":"#installation","p":3028},{"i":3036,"t":"Examples","u":"/storage/memcache_v1.x.x/redis/","h":"#examples","p":3028},{"i":3038,"t":"Config","u":"/storage/memcache_v1.x.x/redis/","h":"#config","p":3028},{"i":3040,"t":"Default Config","u":"/storage/memcache_v1.x.x/redis/","h":"#default-config","p":3028},{"i":3044,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/ristretto/","h":"#table-of-contents","p":3042},{"i":3046,"t":"Signatures","u":"/storage/memcache_v1.x.x/ristretto/","h":"#signatures","p":3042},{"i":3048,"t":"Installation","u":"/storage/memcache_v1.x.x/ristretto/","h":"#installation","p":3042},{"i":3050,"t":"Examples","u":"/storage/memcache_v1.x.x/ristretto/","h":"#examples","p":3042},{"i":3052,"t":"Config","u":"/storage/memcache_v1.x.x/ristretto/","h":"#config","p":3042},{"i":3054,"t":"Default Config","u":"/storage/memcache_v1.x.x/ristretto/","h":"#default-config","p":3042},{"i":3058,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/s3/","h":"#table-of-contents","p":3056},{"i":3060,"t":"Signatures","u":"/storage/memcache_v1.x.x/s3/","h":"#signatures","p":3056},{"i":3062,"t":"Installation","u":"/storage/memcache_v1.x.x/s3/","h":"#installation","p":3056},{"i":3064,"t":"Examples","u":"/storage/memcache_v1.x.x/s3/","h":"#examples","p":3056},{"i":3066,"t":"Config","u":"/storage/memcache_v1.x.x/s3/","h":"#config","p":3056},{"i":3068,"t":"Default Config","u":"/storage/memcache_v1.x.x/s3/","h":"#default-config","p":3056},{"i":3072,"t":"Table of Contents","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#table-of-contents","p":3070},{"i":3074,"t":"Signatures","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#signatures","p":3070},{"i":3076,"t":"Installation","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#installation","p":3070},{"i":3078,"t":"Examples","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#examples","p":3070},{"i":3080,"t":"Config","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#config","p":3070},{"i":3082,"t":"Default Config","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#default-config","p":3070}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2828",[0,3.174,1,3.174]],["t/2830",[0,2.534,1,2.534,2,2.875]],["t/2834",[3,1.499,4,1.499]],["t/2836",[5,2.007]],["t/2838",[6,2.007]],["t/2840",[7,2.007]],["t/2842",[8,1.246]],["t/2844",[8,0.931,9,1.499]],["t/2848",[3,1.499,4,1.499]],["t/2850",[5,2.007]],["t/2852",[6,2.007]],["t/2854",[7,2.007]],["t/2856",[8,1.246]],["t/2858",[8,0.931,9,1.499]],["t/2862",[3,1.499,4,1.499]],["t/2864",[5,2.007]],["t/2866",[6,2.007]],["t/2868",[7,2.007]],["t/2870",[8,1.246]],["t/2872",[8,0.931,9,1.499]],["t/2876",[3,1.499,4,1.499]],["t/2878",[5,2.007]],["t/2880",[6,2.007]],["t/2882",[7,2.007]],["t/2884",[8,1.246]],["t/2886",[8,0.931,9,1.499]],["t/2890",[3,1.499,4,1.499]],["t/2892",[5,2.007]],["t/2894",[6,2.007]],["t/2896",[7,2.007]],["t/2898",[8,1.246]],["t/2900",[8,0.931,9,1.499]],["t/2904",[3,1.499,4,1.499]],["t/2906",[5,2.007]],["t/2908",[6,2.007]],["t/2910",[7,2.007]],["t/2912",[8,1.246]],["t/2914",[8,0.931,9,1.499]],["t/2918",[3,1.499,4,1.499]],["t/2920",[5,2.007]],["t/2922",[6,2.007]],["t/2924",[7,2.007]],["t/2926",[8,1.246]],["t/2928",[8,0.931,9,1.499]],["t/2932",[3,1.499,4,1.499]],["t/2934",[5,2.007]],["t/2936",[6,2.007]],["t/2938",[7,2.007]],["t/2940",[8,1.246]],["t/2942",[8,0.931,9,1.499]],["t/2946",[3,1.499,4,1.499]],["t/2948",[5,2.007]],["t/2950",[6,2.007]],["t/2952",[7,2.007]],["t/2954",[8,1.246]],["t/2956",[8,0.931,9,1.499]],["t/2960",[3,1.499,4,1.499]],["t/2962",[5,2.007]],["t/2964",[6,2.007]],["t/2966",[7,2.007]],["t/2968",[8,1.246]],["t/2970",[8,0.931,9,1.499]],["t/2974",[3,1.499,4,1.499]],["t/2976",[5,2.007]],["t/2978",[6,2.007]],["t/2980",[7,2.007]],["t/2982",[8,1.246]],["t/2984",[8,0.931,9,1.499]],["t/2988",[3,1.499,4,1.499]],["t/2990",[5,2.007]],["t/2992",[6,2.007]],["t/2994",[7,2.007]],["t/2996",[8,1.246]],["t/2998",[8,0.931,9,1.499]],["t/3002",[3,1.499,4,1.499]],["t/3004",[5,2.007]],["t/3006",[6,2.007]],["t/3008",[7,2.007]],["t/3010",[8,1.246]],["t/3012",[8,0.931,9,1.499]],["t/3016",[3,1.499,4,1.499]],["t/3018",[5,2.007]],["t/3020",[6,2.007]],["t/3022",[7,2.007]],["t/3024",[8,1.246]],["t/3026",[8,0.931,9,1.499]],["t/3030",[3,1.499,4,1.499]],["t/3032",[5,2.007]],["t/3034",[6,2.007]],["t/3036",[7,2.007]],["t/3038",[8,1.246]],["t/3040",[8,0.931,9,1.499]],["t/3044",[3,1.499,4,1.499]],["t/3046",[5,2.007]],["t/3048",[6,2.007]],["t/3050",[7,2.007]],["t/3052",[8,1.246]],["t/3054",[8,0.931,9,1.499]],["t/3058",[3,1.499,4,1.499]],["t/3060",[5,2.007]],["t/3062",[6,2.007]],["t/3064",[7,2.007]],["t/3066",[8,1.246]],["t/3068",[8,0.931,9,1.499]],["t/3072",[3,1.499,4,1.499]],["t/3074",[5,2.007]],["t/3076",[6,2.007]],["t/3078",[7,2.007]],["t/3080",[8,1.246]],["t/3082",[8,0.931,9,1.499]]],"invertedIndex":[["",{"_index":0,"t":{"2828":{"position":[[0,2]]},"2830":{"position":[[0,2]]}}}],["config",{"_index":8,"t":{"2842":{"position":[[0,6]]},"2844":{"position":[[8,6]]},"2856":{"position":[[0,6]]},"2858":{"position":[[8,6]]},"2870":{"position":[[0,6]]},"2872":{"position":[[8,6]]},"2884":{"position":[[0,6]]},"2886":{"position":[[8,6]]},"2898":{"position":[[0,6]]},"2900":{"position":[[8,6]]},"2912":{"position":[[0,6]]},"2914":{"position":[[8,6]]},"2926":{"position":[[0,6]]},"2928":{"position":[[8,6]]},"2940":{"position":[[0,6]]},"2942":{"position":[[8,6]]},"2954":{"position":[[0,6]]},"2956":{"position":[[8,6]]},"2968":{"position":[[0,6]]},"2970":{"position":[[8,6]]},"2982":{"position":[[0,6]]},"2984":{"position":[[8,6]]},"2996":{"position":[[0,6]]},"2998":{"position":[[8,6]]},"3010":{"position":[[0,6]]},"3012":{"position":[[8,6]]},"3024":{"position":[[0,6]]},"3026":{"position":[[8,6]]},"3038":{"position":[[0,6]]},"3040":{"position":[[8,6]]},"3052":{"position":[[0,6]]},"3054":{"position":[[8,6]]},"3066":{"position":[[0,6]]},"3068":{"position":[[8,6]]},"3080":{"position":[[0,6]]},"3082":{"position":[[8,6]]}}}],["content",{"_index":4,"t":{"2834":{"position":[[9,8]]},"2848":{"position":[[9,8]]},"2862":{"position":[[9,8]]},"2876":{"position":[[9,8]]},"2890":{"position":[[9,8]]},"2904":{"position":[[9,8]]},"2918":{"position":[[9,8]]},"2932":{"position":[[9,8]]},"2946":{"position":[[9,8]]},"2960":{"position":[[9,8]]},"2974":{"position":[[9,8]]},"2988":{"position":[[9,8]]},"3002":{"position":[[9,8]]},"3016":{"position":[[9,8]]},"3030":{"position":[[9,8]]},"3044":{"position":[[9,8]]},"3058":{"position":[[9,8]]},"3072":{"position":[[9,8]]}}}],["default",{"_index":9,"t":{"2844":{"position":[[0,7]]},"2858":{"position":[[0,7]]},"2872":{"position":[[0,7]]},"2886":{"position":[[0,7]]},"2900":{"position":[[0,7]]},"2914":{"position":[[0,7]]},"2928":{"position":[[0,7]]},"2942":{"position":[[0,7]]},"2956":{"position":[[0,7]]},"2970":{"position":[[0,7]]},"2984":{"position":[[0,7]]},"2998":{"position":[[0,7]]},"3012":{"position":[[0,7]]},"3026":{"position":[[0,7]]},"3040":{"position":[[0,7]]},"3054":{"position":[[0,7]]},"3068":{"position":[[0,7]]},"3082":{"position":[[0,7]]}}}],["exampl",{"_index":7,"t":{"2840":{"position":[[0,8]]},"2854":{"position":[[0,8]]},"2868":{"position":[[0,8]]},"2882":{"position":[[0,8]]},"2896":{"position":[[0,8]]},"2910":{"position":[[0,8]]},"2924":{"position":[[0,8]]},"2938":{"position":[[0,8]]},"2952":{"position":[[0,8]]},"2966":{"position":[[0,8]]},"2980":{"position":[[0,8]]},"2994":{"position":[[0,8]]},"3008":{"position":[[0,8]]},"3022":{"position":[[0,8]]},"3036":{"position":[[0,8]]},"3050":{"position":[[0,8]]},"3064":{"position":[[0,8]]},"3078":{"position":[[0,8]]}}}],["implement",{"_index":2,"t":{"2830":{"position":[[11,15]]}}}],["instal",{"_index":6,"t":{"2838":{"position":[[0,12]]},"2852":{"position":[[0,12]]},"2866":{"position":[[0,12]]},"2880":{"position":[[0,12]]},"2894":{"position":[[0,12]]},"2908":{"position":[[0,12]]},"2922":{"position":[[0,12]]},"2936":{"position":[[0,12]]},"2950":{"position":[[0,12]]},"2964":{"position":[[0,12]]},"2978":{"position":[[0,12]]},"2992":{"position":[[0,12]]},"3006":{"position":[[0,12]]},"3020":{"position":[[0,12]]},"3034":{"position":[[0,12]]},"3048":{"position":[[0,12]]},"3062":{"position":[[0,12]]},"3076":{"position":[[0,12]]}}}],["signatur",{"_index":5,"t":{"2836":{"position":[[0,10]]},"2850":{"position":[[0,10]]},"2864":{"position":[[0,10]]},"2878":{"position":[[0,10]]},"2892":{"position":[[0,10]]},"2906":{"position":[[0,10]]},"2920":{"position":[[0,10]]},"2934":{"position":[[0,10]]},"2948":{"position":[[0,10]]},"2962":{"position":[[0,10]]},"2976":{"position":[[0,10]]},"2990":{"position":[[0,10]]},"3004":{"position":[[0,10]]},"3018":{"position":[[0,10]]},"3032":{"position":[[0,10]]},"3046":{"position":[[0,10]]},"3060":{"position":[[0,10]]},"3074":{"position":[[0,10]]}}}],["storag",{"_index":1,"t":{"2828":{"position":[[3,7]]},"2830":{"position":[[3,7]]}}}],["tabl",{"_index":3,"t":{"2834":{"position":[[0,5]]},"2848":{"position":[[0,5]]},"2862":{"position":[[0,5]]},"2876":{"position":[[0,5]]},"2890":{"position":[[0,5]]},"2904":{"position":[[0,5]]},"2918":{"position":[[0,5]]},"2932":{"position":[[0,5]]},"2946":{"position":[[0,5]]},"2960":{"position":[[0,5]]},"2974":{"position":[[0,5]]},"2988":{"position":[[0,5]]},"3002":{"position":[[0,5]]},"3016":{"position":[[0,5]]},"3030":{"position":[[0,5]]},"3044":{"position":[[0,5]]},"3058":{"position":[[0,5]]},"3072":{"position":[[0,5]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":2829,"t":"Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares. // Storage interface for communicating with different database/key-value // providers. Visit https://github.com/gofiber/storage for more info. type Storage interface { // Get gets the value for the given key. // `nil, nil` is returned when the key does not exist Get(key string) ([]byte, error) // Set stores the given value for the given key along // with an expiration value, 0 means no expiration. // Empty key or value will be ignored without an error. Set(key string, val []byte, exp time.Duration) error // Delete deletes the value for the given key. // It returns no error if the storage does not contain the key, Delete(key string) error // Reset resets the storage and delete all keys. Reset() error // Close closes the storage and will stop any running garbage // collectors and open connections. Close() error }","s":"📦 Storage","u":"/storage/memcache_v1.x.x/","h":"","p":2827},{"i":2831,"t":"ArangoDB AzureBlob Badger Bbolt Couchbase DynamoDB Etcd Memcache Memory MongoDB MSSQL MySQL Pebble Postgres Redis S3 SQLite3","s":"📑 Storage Implementations","u":"/storage/memcache_v1.x.x/","h":"#-storage-implementations","p":2827},{"i":2833,"t":"A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.","s":"ArangoDB","u":"/storage/memcache_v1.x.x/arangodb/","h":"","p":2832},{"i":2835,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/arangodb/","h":"#table-of-contents","p":2832},{"i":2837,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() driver.Client","s":"Signatures","u":"/storage/memcache_v1.x.x/arangodb/","h":"#signatures","p":2832},{"i":2839,"t":"ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/memcache_v1.x.x/arangodb/","h":"#installation","p":2832},{"i":2841,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/memcache_v1.x.x/arangodb/","h":"#examples","p":2832},{"i":2843,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/memcache_v1.x.x/arangodb/","h":"#config","p":2832},{"i":2845,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/memcache_v1.x.x/arangodb/","h":"#default-config","p":2832},{"i":2847,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/memcache_v1.x.x/azureblob/","h":"","p":2846},{"i":2849,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/azureblob/","h":"#table-of-contents","p":2846},{"i":2851,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/memcache_v1.x.x/azureblob/","h":"#signatures","p":2846},{"i":2853,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/memcache_v1.x.x/azureblob/","h":"#installation","p":2846},{"i":2855,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/memcache_v1.x.x/azureblob/","h":"#examples","p":2846},{"i":2857,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/memcache_v1.x.x/azureblob/","h":"#config","p":2846},{"i":2859,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/memcache_v1.x.x/azureblob/","h":"#default-config","p":2846},{"i":2861,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/memcache_v1.x.x/badger/","h":"","p":2860},{"i":2863,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/badger/","h":"#table-of-contents","p":2860},{"i":2865,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/memcache_v1.x.x/badger/","h":"#signatures","p":2860},{"i":2867,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/memcache_v1.x.x/badger/","h":"#installation","p":2860},{"i":2869,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/memcache_v1.x.x/badger/","h":"#examples","p":2860},{"i":2871,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/memcache_v1.x.x/badger/","h":"#config","p":2860},{"i":2873,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/memcache_v1.x.x/badger/","h":"#default-config","p":2860},{"i":2875,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/memcache_v1.x.x/bbolt/","h":"","p":2874},{"i":2877,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/bbolt/","h":"#table-of-contents","p":2874},{"i":2879,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/memcache_v1.x.x/bbolt/","h":"#signatures","p":2874},{"i":2881,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/memcache_v1.x.x/bbolt/","h":"#installation","p":2874},{"i":2883,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/memcache_v1.x.x/bbolt/","h":"#examples","p":2874},{"i":2885,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/memcache_v1.x.x/bbolt/","h":"#config","p":2874},{"i":2887,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/memcache_v1.x.x/bbolt/","h":"#default-config","p":2874},{"i":2889,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/memcache_v1.x.x/couchbase/","h":"","p":2888},{"i":2891,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/couchbase/","h":"#table-of-contents","p":2888},{"i":2893,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/memcache_v1.x.x/couchbase/","h":"#signatures","p":2888},{"i":2895,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/memcache_v1.x.x/couchbase/","h":"#installation","p":2888},{"i":2897,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/memcache_v1.x.x/couchbase/","h":"#examples","p":2888},{"i":2899,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/memcache_v1.x.x/couchbase/","h":"#config","p":2888},{"i":2901,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/memcache_v1.x.x/couchbase/","h":"#default-config","p":2888},{"i":2903,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/memcache_v1.x.x/dynamodb/","h":"","p":2902},{"i":2905,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#table-of-contents","p":2902},{"i":2907,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#signatures","p":2902},{"i":2909,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#installation","p":2902},{"i":2911,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#examples","p":2902},{"i":2913,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#config","p":2902},{"i":2915,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/memcache_v1.x.x/dynamodb/","h":"#default-config","p":2902},{"i":2917,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/memcache_v1.x.x/etcd/","h":"","p":2916},{"i":2919,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/etcd/","h":"#table-of-contents","p":2916},{"i":2921,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/memcache_v1.x.x/etcd/","h":"#signatures","p":2916},{"i":2923,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/memcache_v1.x.x/etcd/","h":"#installation","p":2916},{"i":2925,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/memcache_v1.x.x/etcd/","h":"#examples","p":2916},{"i":2927,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/memcache_v1.x.x/etcd/","h":"#config","p":2916},{"i":2929,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/memcache_v1.x.x/etcd/","h":"#default-config","p":2916},{"i":2931,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/memcache_v1.x.x/memcache/","h":"","p":2930},{"i":2933,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/memcache/","h":"#table-of-contents","p":2930},{"i":2935,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/memcache_v1.x.x/memcache/","h":"#signatures","p":2930},{"i":2937,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/memcache_v1.x.x/memcache/","h":"#installation","p":2930},{"i":2939,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/memcache_v1.x.x/memcache/","h":"#examples","p":2930},{"i":2941,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/memcache_v1.x.x/memcache/","h":"#config","p":2930},{"i":2943,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/memcache_v1.x.x/memcache/","h":"#default-config","p":2930},{"i":2945,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/memcache_v1.x.x/memory/","h":"","p":2944},{"i":2947,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/memory/","h":"#table-of-contents","p":2944},{"i":2949,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/memcache_v1.x.x/memory/","h":"#signatures","p":2944},{"i":2951,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/memcache_v1.x.x/memory/","h":"#installation","p":2944},{"i":2953,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/memcache_v1.x.x/memory/","h":"#examples","p":2944},{"i":2955,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/memcache_v1.x.x/memory/","h":"#config","p":2944},{"i":2957,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/memcache_v1.x.x/memory/","h":"#default-config","p":2944},{"i":2959,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/memcache_v1.x.x/mongodb/","h":"","p":2958},{"i":2961,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/mongodb/","h":"#table-of-contents","p":2958},{"i":2963,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/memcache_v1.x.x/mongodb/","h":"#signatures","p":2958},{"i":2965,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/memcache_v1.x.x/mongodb/","h":"#installation","p":2958},{"i":2967,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/memcache_v1.x.x/mongodb/","h":"#examples","p":2958},{"i":2969,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/memcache_v1.x.x/mongodb/","h":"#config","p":2958},{"i":2971,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/memcache_v1.x.x/mongodb/","h":"#default-config","p":2958},{"i":2973,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/memcache_v1.x.x/mssql/","h":"","p":2972},{"i":2975,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/mssql/","h":"#table-of-contents","p":2972},{"i":2977,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/memcache_v1.x.x/mssql/","h":"#signatures","p":2972},{"i":2979,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/memcache_v1.x.x/mssql/","h":"#installation","p":2972},{"i":2981,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/memcache_v1.x.x/mssql/","h":"#examples","p":2972},{"i":2983,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/memcache_v1.x.x/mssql/","h":"#config","p":2972},{"i":2985,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/memcache_v1.x.x/mssql/","h":"#default-config","p":2972},{"i":2987,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/memcache_v1.x.x/mysql/","h":"","p":2986},{"i":2989,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/mysql/","h":"#table-of-contents","p":2986},{"i":2991,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/memcache_v1.x.x/mysql/","h":"#signatures","p":2986},{"i":2993,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/memcache_v1.x.x/mysql/","h":"#installation","p":2986},{"i":2995,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/memcache_v1.x.x/mysql/","h":"#examples","p":2986},{"i":2997,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/memcache_v1.x.x/mysql/","h":"#config","p":2986},{"i":2999,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/memcache_v1.x.x/mysql/","h":"#default-config","p":2986},{"i":3001,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/memcache_v1.x.x/pebble/","h":"","p":3000},{"i":3003,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/pebble/","h":"#table-of-contents","p":3000},{"i":3005,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/memcache_v1.x.x/pebble/","h":"#signatures","p":3000},{"i":3007,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/memcache_v1.x.x/pebble/","h":"#installation","p":3000},{"i":3009,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/memcache_v1.x.x/pebble/","h":"#examples","p":3000},{"i":3011,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/memcache_v1.x.x/pebble/","h":"#config","p":3000},{"i":3013,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/memcache_v1.x.x/pebble/","h":"#default-config","p":3000},{"i":3015,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/memcache_v1.x.x/postgres/","h":"","p":3014},{"i":3017,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/postgres/","h":"#table-of-contents","p":3014},{"i":3019,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/memcache_v1.x.x/postgres/","h":"#signatures","p":3014},{"i":3021,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/memcache_v1.x.x/postgres/","h":"#installation","p":3014},{"i":3023,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/memcache_v1.x.x/postgres/","h":"#examples","p":3014},{"i":3025,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/memcache_v1.x.x/postgres/","h":"#config","p":3014},{"i":3027,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/memcache_v1.x.x/postgres/","h":"#default-config","p":3014},{"i":3029,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/memcache_v1.x.x/redis/","h":"","p":3028},{"i":3031,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/redis/","h":"#table-of-contents","p":3028},{"i":3033,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/memcache_v1.x.x/redis/","h":"#signatures","p":3028},{"i":3035,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/memcache_v1.x.x/redis/","h":"#installation","p":3028},{"i":3037,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/memcache_v1.x.x/redis/","h":"#examples","p":3028},{"i":3039,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/memcache_v1.x.x/redis/","h":"#config","p":3028},{"i":3041,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/memcache_v1.x.x/redis/","h":"#default-config","p":3028},{"i":3043,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/memcache_v1.x.x/ristretto/","h":"","p":3042},{"i":3045,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/ristretto/","h":"#table-of-contents","p":3042},{"i":3047,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/memcache_v1.x.x/ristretto/","h":"#signatures","p":3042},{"i":3049,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/memcache_v1.x.x/ristretto/","h":"#installation","p":3042},{"i":3051,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/memcache_v1.x.x/ristretto/","h":"#examples","p":3042},{"i":3053,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/memcache_v1.x.x/ristretto/","h":"#config","p":3042},{"i":3055,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/memcache_v1.x.x/ristretto/","h":"#default-config","p":3042},{"i":3057,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/memcache_v1.x.x/s3/","h":"","p":3056},{"i":3059,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/s3/","h":"#table-of-contents","p":3056},{"i":3061,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/memcache_v1.x.x/s3/","h":"#signatures","p":3056},{"i":3063,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/memcache_v1.x.x/s3/","h":"#installation","p":3056},{"i":3065,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/memcache_v1.x.x/s3/","h":"#examples","p":3056},{"i":3067,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/memcache_v1.x.x/s3/","h":"#config","p":3056},{"i":3069,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/memcache_v1.x.x/s3/","h":"#default-config","p":3056},{"i":3071,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/memcache_v1.x.x/sqlite3/","h":"","p":3070},{"i":3073,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#table-of-contents","p":3070},{"i":3075,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#signatures","p":3070},{"i":3077,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#installation","p":3070},{"i":3079,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#examples","p":3070},{"i":3081,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#config","p":3070},{"i":3083,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/memcache_v1.x.x/sqlite3/","h":"#default-config","p":3070}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/2829",[0,2.408,1,1.183,2,1.08,3,1.021,4,4.843,5,2.408,6,0.588,7,2.408,8,1.112,9,2.408,10,1.49,11,2.408,12,2.408,13,2.408,14,3.958,15,2.131,16,2.408,17,2.408,18,2.408,19,2.408,20,1.021,21,2.408,22,4.489,23,2.813,24,2.177,25,3.13,26,1.145,27,1.021,28,1.287,29,1.64,30,2.813,31,1.705,32,0.994,33,2.408,34,2.36,35,1.41,36,2.408,37,2.408,38,2.408,39,2.408,40,1.021,41,1.021,42,1.021,43,0.762,44,2.957,45,1.705,46,1.021,47,0.937,48,2.054,49,2.408,50,2.131,51,2.408,52,2.408,53,1.95,54,1.262]],["t/2831",[55,4.571,56,5.645,57,4.571,58,4.252,59,3.998,60,3.998,61,4.252,62,4.997,63,3.998,64,4.571,65,4.571,66,3.998,67,4.997,68,4.252,69,3.998,70,3.998,71,4.571]],["t/2833",[1,1.131,2,3.761,6,1.589,55,5.272,72,7.823]],["t/2835",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2837",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,82,4.122]],["t/2839",[3,2.17,55,4.143,66,3.623,74,1.45,83,2.112,84,2.112,85,2.23,86,5.116,87,2.733,88,2.23,89,2.17,90,2.23,91,2.17,92,2.17,93,1.45,94,2.17,95,2.23,96,2.23,97,2.23,98,2.23,99,2.23,100,4.529]],["t/2841",[1,1.032,6,1.04,8,1.967,10,1.493,32,2.452,47,0.824,76,0.458,77,0.824,93,1.683,100,3.771,101,2.589,102,1.857,103,1.857,104,1.91,105,1.807,106,4.26,107,1.857,108,4.26,109,1.759,110,3.45,111,1.91,112,3.45,113,1.444,114,2.721,115,1.628,116,1.234,117,1.714,118,1.589,119,1.514]],["t/2843",[8,1.194,10,1.657,20,1.097,23,1.69,26,1.947,28,1.672,34,1.58,43,0.819,44,1.58,47,0.792,76,0.199,77,1.406,109,2.097,110,2.095,111,1.836,112,2.095,113,1.388,114,3.244,115,0.989,116,0.749,117,1.041,118,0.965,119,0.919,120,1.128,121,2.416,122,2.074,123,3.355,124,1.735,125,1.457,126,2.305,127,2.074,128,2.074,129,1.311,130,1.311,131,1.404,132,1.58]],["t/2845",[6,1.283,8,2.427,10,1.41,47,1.017,76,0.405,109,2.171,110,4.256,111,2.357,112,4.256,113,1.782,114,3.357,115,2.009,116,1.523,117,2.114,118,1.96,119,1.868,123,2.427,133,3.96,134,2.292,135,2.292]],["t/2847",[1,1.268,87,2.117,136,5.15,137,5.15,138,5.817,139,5.15,140,5.817,141,5.817,142,4.382,143,5.817,144,5.817,145,4.12,146,5.817,147,5.817]],["t/2849",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2851",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,148,4.122]],["t/2853",[1,0.854,2,2.206,3,2.086,74,1.394,83,2.031,84,2.031,85,2.144,87,2.68,88,2.144,89,2.086,90,2.144,91,2.086,92,2.086,93,1.394,94,2.086,95,2.144,96,2.144,97,2.144,98,2.144,99,2.144,136,5.798,137,5.798,149,4.354]],["t/2855",[1,1.056,6,1.076,10,1.509,23,1.82,32,2.511,45,3.122,76,0.469,77,0.853,83,2.874,93,1.723,101,2.651,102,1.922,103,1.922,104,1.977,105,1.869,107,1.922,149,3.902,150,4.407,151,4.407,152,4.924,153,3.561,154,4.407]],["t/2857",[1,0.782,10,1.555,20,1.24,23,2.268,26,2.142,28,1.459,35,1.712,43,0.925,45,3.891,47,0.871,76,0.225,77,1.289,116,0.847,120,1.275,121,2.142,123,3.077,125,1.646,129,1.481,130,1.481,131,1.587,152,3.647,153,3.614,155,2.637,156,2.923,157,3.647,158,2.876,159,2.202,160,1.867,161,3.647,162,3.647,163,2.367,164,2.367,165,1.867,166,1.867,167,2.367,168,2.367,169,2.367,170,2.367,171,1.785,172,1.961]],["t/2859",[10,1.583,35,3.306,45,3.998,47,1.092,76,0.435,116,1.635,134,2.461,135,2.461,152,4.571,155,3.306,159,4.252,171,3.447,172,3.786]],["t/2861",[6,1.616,14,4.044,23,2.735,122,3.356,173,5.363,174,5.864,175,6.623]],["t/2863",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2865",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/2867",[3,2.199,57,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,177,4.59]],["t/2869",[1,1.082,6,1.114,10,1.525,32,2.572,47,0.883,76,0.48,77,0.883,93,1.765,101,2.716,102,1.99,103,1.99,104,2.047,105,1.936,107,1.99,113,1.548,116,1.322,117,1.836,118,1.703,119,1.622,177,4.042,178,4.565,179,4.565,180,3.697]],["t/2871",[6,1.086,10,1.63,20,1.221,23,1.838,24,1.621,26,2.117,28,0.765,31,2.039,34,1.758,43,0.911,44,1.758,47,0.861,57,3.604,76,0.222,77,1.411,113,1.509,116,1.289,117,1.158,118,1.074,119,1.023,120,1.255,121,1.37,123,3.368,129,1.459,130,2.255,131,1.563,132,1.758,180,2.332,181,1.291,182,3.94,183,2.879,184,2.879,185,2.879,186,5.419,187,2.879,188,3.94,189,2.039]],["t/2873",[10,1.439,24,3.088,47,1.061,76,0.423,113,1.858,116,2.037,117,2.205,118,2.045,119,1.948,134,2.39,135,2.39,180,4.44,182,4.854,186,4.854,188,4.854,190,5.483]],["t/2875",[1,0.803,2,2.072,6,1.128,15,4.091,32,1.908,58,3.481,61,3.481,66,3.273,68,3.481,87,1.682,113,2.129,126,2.602,145,3.273,173,3.742,191,4.621,192,4.621,193,4.621,194,4.621,195,4.621,196,4.621,197,4.621,198,4.621,199,7.134,200,4.621,201,4.621,202,4.621,203,3.742,204,4.621,205,4.621]],["t/2877",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2879",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,206,4.122]],["t/2881",[3,2.199,58,3.906,70,3.673,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,207,4.59]],["t/2883",[1,1.1,6,1.141,10,1.49,32,2.615,47,0.905,76,0.488,77,0.905,93,1.795,101,2.761,102,2.039,103,2.039,104,2.098,105,1.984,107,2.039,113,1.585,116,1.355,207,4.141,208,4.677,209,4.677,210,4.677,211,3.566]],["t/2885",[1,0.516,10,1.629,20,1.259,23,1.226,26,2.168,28,1.211,43,0.94,47,0.881,53,2.404,58,2.237,76,0.428,77,1.298,113,1.88,115,1.135,116,1.32,119,1.055,120,1.294,121,1.412,123,3.098,129,1.504,130,2.309,131,1.611,158,2.911,189,2.103,211,3.123,212,2.237,213,2.628,214,2.628,215,2.969,216,2.969,217,2.628,218,2.969,219,2.628,220,2.969,221,2.969,222,2.628,223,2.628,224,2.404,225,2.628]],["t/2887",[10,1.501,47,1.031,76,0.532,77,1.031,113,1.807,115,2.037,116,2,119,1.894,134,2.324,135,3.01,158,3.404,211,3.001,213,4.718,222,4.718,225,4.718]],["t/2889",[1,1.192,2,3.077,6,1.674,59,4.86,226,6.861]],["t/2891",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2893",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,227,4.122]],["t/2895",[3,2.199,59,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,228,4.59]],["t/2897",[1,1.174,6,1.017,10,1.522,32,2.415,35,2.44,59,2.952,76,0.451,77,0.806,93,1.657,101,2.549,102,1.817,103,1.817,104,1.869,105,1.768,107,1.817,109,1.721,119,2.078,127,2.112,128,2.112,171,2.544,211,2.347,228,3.689,229,4.167,230,4.167,231,3.689,232,3.374,233,3.374,234,2.661]],["t/2899",[10,1.52,20,1.626,28,1.985,43,1.744,54,3.916,59,5.293,76,0.296,109,1.583,120,1.671,121,1.823,127,2.792,128,2.792,158,3.519,211,3.103,232,3.104,233,3.104,235,5.51,236,6.616,237,3.833,238,3.393]],["t/2901",[10,1.529,76,0.514,77,0.976,109,2.085,115,1.93,119,2.368,127,2.558,128,2.558,134,2.201,135,2.905,171,3.082,211,2.843,231,4.469,232,4.088,233,4.088,234,3.224,239,5.048,240,5.048]],["t/2903",[1,0.803,2,2.072,6,1.741,10,0.856,22,5.085,60,3.273,76,0.55,87,1.682,133,4.731,142,3.481,153,4.688,241,4.091,242,4.091,243,4.091,244,3.742,245,3.742,246,4.091,247,4.091,248,3.742,249,4.091,250,4.091,251,4.091]],["t/2905",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2907",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,252,4.122]],["t/2909",[3,2.199,60,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,253,4.59]],["t/2911",[1,1.244,6,1.378,10,1.458,32,2.331,60,3.998,93,1.6,101,3.123,102,2.461,103,2.461,104,2.531,105,2.394,253,4.997,254,5.645]],["t/2913",[6,0.491,10,1.55,14,2.039,20,0.854,23,1.13,25,1.63,26,2.036,28,1.022,30,0.831,31,1.425,45,1.425,47,0.389,50,0.993,60,3.528,75,0.831,76,0.155,77,1.069,83,0.463,84,0.463,91,0.476,92,0.476,105,1.974,107,0.489,115,0.429,116,0.583,120,0.877,121,0.533,123,2.433,125,0.631,129,0.568,130,1.02,131,0.609,132,0.685,145,1.425,153,2.252,155,1.179,157,0.908,158,0.716,160,0.716,161,1.63,162,1.63,163,0.908,164,0.908,165,0.716,166,0.716,167,0.908,168,0.908,169,0.908,170,0.908,171,0.685,172,0.752,181,2.83,203,0.908,211,0.631,217,0.993,223,1.782,244,1.63,245,1.63,255,1.516,256,2.012,257,1.121,258,1.121,259,1.121,260,1.121,261,1.121,262,1.121,263,1.121,264,1.121,265,1.121,266,1.121,267,1.121,268,2.738,269,2.012,270,1.121,271,1.121,272,3.846,273,1.121,274,2.424,275,3.339,276,3.846,277,1.782,278,2.012,279,2.012,280,2.012,281,2.012,282,2.012,283,2.012,284,2.012,285,2.012,286,2.012,287,3.339,288,3.339,289,2.012,290,2.012,291,2.012,292,2.012,293,2.012,294,2.012,295,2.012,296,1.782,297,0.993,298,2.424,299,1.782,300,1.121,301,1.121,302,2.012,303,1.782,304,1.121,305,0.845,306,1.121,307,1.121,308,1.121,309,1.121,310,0.993,311,1.121,312,1.121,313,1.121,314,0.993,315,0.993]],["t/2915",[10,1.303,47,1.061,76,0.423,115,2.096,116,1.588,134,2.39,135,2.39,153,4.118,171,3.348,172,3.678,181,2.459,274,4.854,277,6.225,297,4.854,298,4.854,316,5.483]],["t/2917",[1,1.171,2,3.023,6,1.645,61,6.017,317,6.74]],["t/2919",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2921",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,318,4.122]],["t/2923",[3,2.199,61,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,319,4.59]],["t/2925",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,155,2.88,319,4.354,320,4.918,321,4.918,322,4.354]],["t/2927",[10,1.532,20,1.807,28,1.816,43,1.348,54,2.232,76,0.328,120,1.857,127,3.464,128,3.464,153,2.495,155,3.478,158,2.721,305,3.209,323,3.45,324,3.017,325,5.257,326,4.26,327,4.26,328,4.206,329,4.474,330,4.26,331,4.26,332,3.45]],["t/2929",[10,1.583,24,3.179,76,0.435,84,2.331,119,2.006,127,2.86,128,2.86,134,2.461,135,2.461,155,3.306,322,4.997,325,4.997,329,4.252]],["t/2931",[1,1.192,2,3.077,6,1.674,62,6.074,333,6.861]],["t/2933",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2935",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,334,4.122]],["t/2937",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/2939",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,126,2.77,336,4.918,337,4.918,338,4.918,339,4.918]],["t/2941",[10,1.622,20,1.891,23,1.841,26,2.916,28,1.185,47,1.186,76,0.344,77,1.186,116,1.292,120,1.944,123,2.83,126,3.451,129,2.259,130,2.259,181,2,323,3.611,340,4.459,341,4.459,342,4.459,343,4.459,344,3.947]],["t/2943",[10,1.465,76,0.511,126,3.73,134,2.888,135,2.888,344,5.864]],["t/2945",[1,1.236,2,3.192,63,5.041]],["t/2947",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2949",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,345,4.122]],["t/2951",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/2953",[1,1.119,6,1.17,10,1.547,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,117,1.929,118,1.788,119,1.704,335,3.883,346,4.795,347,4.795]],["t/2955",[10,1.606,20,2.326,23,2.264,34,3.348,43,1.735,44,3.348,76,0.423,77,1.061,117,2.205,118,2.045,119,1.948,120,2.39,131,2.976,132,3.348]],["t/2957",[10,1.543,76,0.494,117,2.575,118,2.387,119,2.274,134,2.791,135,2.791]],["t/2959",[1,1.151,2,3.545,6,1.616,64,5.363,87,2.411,348,6.623]],["t/2961",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2963",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,349,4.122]],["t/2965",[3,2.199,64,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,350,4.59]],["t/2967",[1,0.924,6,1.298,8,2.455,10,1.5,28,0.97,32,2.591,47,1.029,54,1.912,76,0.484,77,0.706,93,1.778,101,2.319,102,1.591,103,1.591,104,1.637,105,1.548,107,2.319,109,1.507,111,1.637,113,1.803,114,3.397,115,2.033,116,1.541,350,3.231,351,3.65,352,5.318,353,1.791,354,2.955,355,1.981,356,3.65]],["t/2969",[6,0.994,8,1.186,10,1.656,14,1.569,20,1.09,23,1.061,26,1.937,28,1.857,47,0.788,54,1.346,76,0.198,77,1.402,109,2.088,111,1.826,113,1.38,114,2.6,115,0.982,116,0.744,120,1.12,121,2.406,122,2.562,123,3.347,124,1.724,125,1.447,126,2.293,127,2.063,128,2.063,129,1.302,130,1.302,160,1.641,181,1.152,328,1.82,353,1.261,354,2.081,355,1.395]],["t/2971",[8,2.606,10,1.458,47,1.092,76,0.435,109,2.331,111,2.531,113,1.913,114,3.605,115,2.158,116,1.635,134,2.461,135,2.461,353,2.77,354,4.571,355,3.063]],["t/2973",[1,1.171,2,3.023,6,1.645,65,5.458,357,6.74,358,6.74]],["t/2975",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2977",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/2979",[3,2.199,65,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,360,4.59]],["t/2981",[1,0.887,6,1.246,8,1.594,10,1.534,28,0.917,32,2.509,47,0.988,54,1.809,76,0.468,77,0.668,93,1.722,101,2.226,102,1.505,103,1.505,104,1.548,105,1.464,107,2.226,109,1.425,111,1.548,113,1.17,115,1.32,116,1.479,117,2.054,118,1.904,119,1.814,181,1.548,353,1.694,355,1.873,360,3.056,361,3.452,362,5.105,363,2.795,364,2.445,365,2.445,366,3.452]],["t/2983",[1,0.35,6,0.815,8,0.93,10,1.66,14,1.23,20,0.854,23,1.38,26,1.59,28,1.821,34,1.23,43,0.637,44,1.23,47,0.646,54,1.751,76,0.33,77,1.403,109,1.768,111,1.498,113,1.133,115,0.77,116,0.583,117,0.81,118,0.751,119,0.716,120,0.878,121,2.371,122,2.17,123,3.348,124,1.351,125,1.134,126,1.882,127,1.693,128,1.693,129,1.021,130,1.021,131,1.093,132,1.23,160,1.286,181,1.92,189,1.427,224,1.631,248,2.706,328,1.427,353,0.988,355,1.093,363,1.631,364,1.427,365,1.427,367,1.783]],["t/2985",[8,2.394,10,1.486,47,1.003,76,0.4,109,2.141,111,2.325,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,1.842,134,2.261,135,2.261,181,2.325,353,2.544,355,2.814,363,4.199,364,3.673,365,3.673]],["t/2987",[1,1.131,2,2.92,6,1.589,66,4.611,87,2.369,368,6.51,369,5.764,370,6.51]],["t/2989",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/2991",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/2993",[3,2.199,66,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,371,4.59]],["t/2995",[1,0.769,6,1.322,8,1.319,10,1.563,28,0.759,32,2.518,47,1.047,54,2.319,76,0.47,77,0.553,93,1.728,101,1.929,102,1.246,103,1.246,104,1.282,105,1.212,107,2.361,109,1.18,111,1.282,113,0.969,115,1.092,116,1.569,117,2.178,118,2.019,119,1.924,122,3.09,181,1.282,353,1.402,355,1.551,369,2.53,371,2.53,372,2.858,373,5.415,374,2.314,375,4.425,376,2.858,377,2.858]],["t/2997",[6,1.094,8,0.993,10,1.653,14,2.153,20,0.912,23,1.456,24,1.211,26,1.678,28,1.726,34,1.313,43,0.681,44,1.313,47,0.682,54,1.127,76,0.166,77,1.398,109,1.851,111,1.581,113,1.195,115,0.822,116,0.623,117,0.865,118,0.802,119,0.764,120,0.937,121,2.133,122,2.901,123,3.337,124,1.442,125,1.211,126,1.986,127,1.787,128,1.787,129,1.09,130,1.09,131,1.167,132,1.313,160,2.252,181,2.01,328,2.498,353,1.055,355,1.914,359,1.62,374,1.741]],["t/2999",[8,2.461,10,1.501,47,1.031,76,0.411,109,2.201,111,2.39,113,1.807,115,2.037,116,1.544,117,2.144,118,1.988,119,1.894,134,2.324,135,2.324,181,2.39,353,2.615,355,2.893,374,4.316]],["t/3001",[6,1.645,14,4.115,23,2.783,122,3.415,173,5.458,378,6.74]],["t/3003",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3005",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3007",[3,2.034,26,2.281,67,5.7,74,1.359,83,1.98,84,1.98,85,2.09,87,2.646,88,2.09,89,2.034,90,2.807,91,2.034,92,2.034,93,1.359,94,2.034,95,2.09,96,2.09,97,2.09,98,2.09,99,2.09,142,3.612,145,3.396,203,3.883,379,4.795,380,4.245]],["t/3009",[1,1.119,6,1.17,10,1.503,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,122,2.43,212,3.612,380,4.245,381,4.795,382,4.795,383,3.883,384,3.883]],["t/3011",[10,1.607,20,2.034,24,2.7,28,1.274,76,0.37,77,1.245,113,1.625,120,2.09,121,2.281,122,2.43,123,3.356,212,3.612,238,4.245,310,5.7,383,3.883,384,3.883,385,4.795,386,4.795]],["t/3013",[10,1.435,76,0.494,122,3.244,134,2.791,135,2.791,212,4.823,383,5.184,384,5.184]],["t/3015",[1,1.192,2,3.077,6,1.674,68,5.169,387,6.861]],["t/3017",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3019",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,388,3.649]],["t/3021",[3,2.199,68,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,389,4.59]],["t/3023",[1,1.065,6,1.088,10,1.514,32,2.531,47,0.862,76,0.473,77,0.862,93,1.737,101,2.672,102,1.944,103,1.944,104,2,105,1.891,107,1.944,115,1.705,116,1.292,117,1.794,118,1.663,119,1.584,122,2.259,181,2,389,3.947,390,4.459,391,4.459,392,4.459]],["t/3025",[1,0.339,6,0.795,8,0.901,10,1.65,14,1.192,20,0.828,23,1.345,24,1.099,26,1.549,28,1.733,34,1.192,43,0.618,44,1.192,47,0.63,54,2.561,76,0.323,77,1.388,109,1.729,111,1.46,113,1.104,115,0.746,116,0.566,117,0.785,118,0.728,119,0.694,120,0.851,121,1.992,122,2.753,123,3.313,124,1.31,125,1.099,126,1.834,127,1.65,128,1.65,129,0.989,130,0.989,131,1.06,132,1.192,133,1.471,139,1.728,160,2.08,181,1.878,189,1.383,224,1.581,328,1.383,353,0.958,355,1.06,364,1.383,365,1.383,367,1.728,388,2.883,393,1.952,394,1.728]],["t/3027",[8,2.271,10,1.515,47,0.951,76,0.505,77,0.951,109,2.031,111,2.206,113,1.667,115,1.88,116,1.425,117,1.978,118,1.834,119,1.747,134,2.144,135,2.855,181,2.206,353,2.413,355,2.669,364,3.483,365,3.483,394,4.354]],["t/3029",[1,1.171,2,3.023,6,1.645,69,4.774,87,2.453,395,6.74]],["t/3031",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3033",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,396,4.122]],["t/3035",[3,2.199,69,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,397,4.59]],["t/3037",[1,0.627,6,0.54,10,1.605,24,2.033,25,1.792,32,2.575,35,1.296,47,0.884,69,3.737,76,0.278,77,0.428,89,0.938,93,1.495,94,0.938,101,1.574,102,0.965,103,0.965,105,1.94,107,0.965,109,0.914,111,0.992,113,0.75,116,1.325,118,0.825,121,1.052,123,1.021,127,1.121,128,1.121,236,1.959,299,1.959,305,3.975,324,3.239,329,1.667,332,1.792,353,1.086,397,1.959,398,2.212,399,5.813,400,1.792,401,2.923,402,1.792,403,1.959,404,2.212,405,1.792,406,2.212,407,2.923,408,3.61,409,2.212,410,2.212,411,3.61,412,2.212,413,2.212,414,2.212,415,3.61,416,2.212,417,2.212,418,2.212,419,2.212,420,2.212,421,3.61,422,2.212]],["t/3039",[6,0.381,10,1.649,20,0.662,23,0.645,24,0.879,26,1.281,28,1.704,31,1.908,35,0.914,47,0.521,54,1.861,69,1.106,75,0.645,76,0.274,77,1.377,81,0.662,109,1.745,111,1.593,113,1.204,114,0.997,116,0.452,118,0.582,120,0.681,121,1.281,122,1.365,123,3.347,124,1.047,125,2,126,2,127,1.8,128,1.8,129,0.791,130,0.791,165,0.997,166,0.997,219,1.382,305,1.176,323,1.264,324,2.516,329,2.029,332,1.264,353,0.766,400,1.264,401,1.264,402,1.264,405,2.181,407,1.264,423,1.561,424,1.561,425,1.561,426,1.561,427,1.561,428,1.561,429,2.694,430,1.561,431,1.561,432,1.561,433,1.561,434,1.561,435,1.561,436,1.561,437,3.145,438,1.561,439,1.561,440,1.561,441,1.561,442,2.385,443,2.385,444,1.561,445,1.561,446,1.264,447,1.561,448,1.561,449,1.561]],["t/3041",[10,1.622,24,2.511,28,1.185,35,2.611,47,0.862,76,0.344,109,1.841,111,2,113,1.511,116,1.292,118,1.663,127,2.259,128,2.259,134,1.944,135,1.944,324,3.158,353,2.188,400,3.611,401,3.611,402,3.611,403,3.947,405,3.611,407,3.611,437,3.947,442,3.947,443,3.947]],["t/3043",[1,1.151,2,2.97,6,1.616,63,4.691,174,5.864,450,6.623,451,6.623]],["t/3045",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3047",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,452,4.122]],["t/3049",[3,2.199,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,453,6.782,454,4.59]],["t/3051",[1,0.957,6,0.935,10,1.548,23,2.275,32,2.275,76,0.425,77,0.741,93,1.562,101,2.402,102,1.671,103,1.671,104,1.719,105,1.626,107,1.671,165,2.448,166,3.519,234,2.448,446,3.104,454,3.393,455,3.833,456,3.833,457,3.104,458,3.393,459,3.393,460,3.393,461,3.393,462,3.104,463,3.393,464,3.393,465,3.393,466,3.393,467,3.104,468,3.393,469,3.393]],["t/3053",[10,1.496,20,2.009,23,2.637,76,0.365,120,2.064,165,3.024,166,4.078,296,6.396,446,3.834,457,5.17,459,4.192,460,4.192,461,4.192,462,5.17,464,4.192,465,4.192,466,4.192,467,5.17,469,4.192]],["t/3055",[10,1.479,76,0.449,134,2.536,135,2.536,234,4.662,457,4.71,458,5.15,462,4.71,463,5.15,467,4.71,468,5.15,470,5.817]],["t/3057",[1,0.813,2,2.098,6,1.752,22,5.128,70,3.313,76,0.554,87,1.702,133,4.77,142,3.524,153,4.708,241,4.141,242,4.141,243,4.141,244,3.787,245,3.787,246,4.141,247,4.141,248,3.787,249,4.141,250,4.141,251,4.141]],["t/3059",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3061",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,471,4.122]],["t/3063",[3,2.199,70,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,472,4.59]],["t/3065",[1,1.073,6,1.101,10,1.471,32,2.551,47,0.873,76,0.476,77,0.873,93,1.751,101,2.694,102,1.967,103,1.967,104,2.023,105,1.914,107,1.967,116,1.307,155,3.618,211,3.479,255,4.655,324,3.196,472,3.994,473,4.511,474,4.511]],["t/3067",[1,0.459,10,1.599,20,1.765,23,2.126,26,1.979,28,1.688,35,1.546,43,0.836,47,0.805,70,1.87,76,0.397,77,1.13,116,0.765,120,1.814,121,1.256,123,2.696,125,1.487,129,1.338,130,1.338,131,1.433,153,3.721,155,2.436,157,3.369,158,2.657,159,1.989,160,1.686,161,4.73,162,3.369,163,2.138,164,2.138,165,1.686,166,1.686,167,2.138,168,2.138,169,2.138,170,2.138,171,1.612,172,1.771,189,1.87,211,2.899,255,3.134,314,2.338,315,2.338]],["t/3069",[10,1.536,35,2.739,47,0.905,76,0.488,77,1.225,116,1.355,134,2.039,135,2.761,145,3.313,153,3.708,155,3.708,159,3.524,171,2.856,172,3.137,211,3.566,255,4.77,475,4.677,476,4.677,477,4.677]],["t/3071",[1,1.171,2,3.023,6,1.645,71,6.468,478,6.74]],["t/3073",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3075",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3077",[3,2.199,71,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,479,4.59]],["t/3079",[1,1.001,6,0.995,10,1.513,32,2.378,47,0.789,76,0.444,77,0.789,93,1.632,101,2.511,102,1.778,103,1.778,104,1.829,105,1.73,107,1.778,113,1.382,115,1.559,116,1.181,117,1.64,118,1.521,119,2.046,181,1.829,234,2.605,479,3.61,480,4.078,481,4.078,482,3.61,483,3.302,484,4.664,485,3.302,486,3.302]],["t/3081",[8,1.091,10,1.644,20,1.002,23,1.572,26,1.811,28,1.012,31,3.387,34,1.443,43,1.205,44,1.443,47,0.737,53,1.913,54,2.874,76,0.294,77,1.308,113,1.621,115,0.903,116,0.684,117,0.95,118,0.881,119,0.84,120,1.03,121,1.811,123,3.247,125,2.144,129,1.197,130,1.197,131,2.066,132,1.443,165,3.054,166,2.432,181,2.145,214,2.092,234,1.509,303,2.092,483,3.083,484,3.083,485,3.083,486,3.083,487,2.363,488,2.363,489,2.363,490,2.363,491,2.363]],["t/3083",[10,1.486,47,1.003,76,0.4,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,2.41,134,2.261,135,2.261,181,2.325,234,3.312,482,4.59,483,4.199,484,5.492,485,4.199,486,4.199]]],"invertedIndex":[["",{"_index":10,"t":{"2829":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"2841":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"2843":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"2845":{"position":[[48,1],[173,1],[188,1]]},"2855":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"2857":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"2859":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"2869":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"2871":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"2873":{"position":[[18,1],[85,1],[203,1]]},"2883":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"2885":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"2887":{"position":[[0,2],[57,1],[126,1],[172,1]]},"2897":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"2899":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"2901":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"2903":{"position":[[302,4]]},"2911":{"position":[[134,2],[163,2],[196,2]]},"2913":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"2915":{"position":[[18,1],[193,1]]},"2925":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"2927":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"2929":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"2939":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"2941":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"2943":{"position":[[18,1],[56,1]]},"2953":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"2955":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"2957":{"position":[[18,1],[43,1],[58,1]]},"2967":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"2969":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"2971":{"position":[[18,1],[43,3],[141,1]]},"2981":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"2983":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"2985":{"position":[[18,1],[43,3],[150,1],[185,1]]},"2995":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"2997":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"2999":{"position":[[18,1],[43,3],[150,1],[165,1]]},"3009":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"3011":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"3013":{"position":[[18,1],[78,1]]},"3023":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"3025":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"3027":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"3037":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"3039":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"3041":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]},"3051":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"3053":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"3055":{"position":[[18,1],[57,2],[97,1]]},"3065":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"3067":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"3069":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"3079":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"3081":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"3083":{"position":[[18,1],[110,1],[182,1],[197,1]]}}}],["0",{"_index":35,"t":{"2829":{"position":[[492,1]]},"2857":{"position":[[251,1]]},"2859":{"position":[[86,2]]},"2897":{"position":[[341,2]]},"3037":{"position":[[325,2]]},"3039":{"position":[[402,1]]},"3041":{"position":[[106,2]]},"3067":{"position":[[201,1]]},"3069":{"position":[[274,2]]}}}],["1",{"_index":234,"t":{"2897":{"position":[[390,2]]},"2901":{"position":[[202,1]]},"3051":{"position":[[332,1]]},"3055":{"position":[[55,1],[94,2]]},"3079":{"position":[[402,1]]},"3081":{"position":[[839,1]]},"3083":{"position":[[180,1]]}}}],["1.14/1.15",{"_index":86,"t":{"2839":{"position":[[33,11]]}}}],["1.18",{"_index":143,"t":{"2847":{"position":[[82,4]]}}}],["10",{"_index":118,"t":{"2841":{"position":[[366,2]]},"2843":{"position":[[636,2]]},"2845":{"position":[[170,2]]},"2869":{"position":[[300,2]]},"2871":{"position":[[258,2]]},"2873":{"position":[[82,2]]},"2953":{"position":[[258,2]]},"2955":{"position":[[75,2]]},"2957":{"position":[[40,2]]},"2981":{"position":[[342,2],[567,2]]},"2983":{"position":[[860,2]]},"2985":{"position":[[147,2]]},"2995":{"position":[[342,2],[535,2],[749,2]]},"2997":{"position":[[875,2]]},"2999":{"position":[[147,2]]},"3023":{"position":[[319,2]]},"3025":{"position":[[1015,2]]},"3027":{"position":[[206,2]]},"3037":{"position":[[368,2]]},"3039":{"position":[[1456,2]]},"3041":{"position":[[149,2]]},"3079":{"position":[[329,2]]},"3081":{"position":[[319,2]]},"3083":{"position":[[107,2]]}}}],["100",{"_index":484,"t":{"3079":{"position":[[361,4],[380,4]]},"3081":{"position":[[585,4],[711,4]]},"3083":{"position":[[139,4],[158,4]]}}}],["10m",{"_index":461,"t":{"3051":{"position":[[316,6]]},"3053":{"position":[[73,6]]}}}],["123456",{"_index":240,"t":{"2901":{"position":[[120,9]]}}}],["127.0.0.1",{"_index":353,"t":{"2967":{"position":[[256,12]]},"2969":{"position":[[225,11]]},"2971":{"position":[[53,12]]},"2981":{"position":[[248,12]]},"2983":{"position":[[267,11]]},"2985":{"position":[[53,12]]},"2995":{"position":[[248,12]]},"2997":{"position":[[345,11]]},"2999":{"position":[[53,12]]},"3025":{"position":[[398,11]]},"3027":{"position":[[92,12]]},"3037":{"position":[[262,12]]},"3039":{"position":[[84,11]]},"3041":{"position":[[34,12]]}}}],["127.0.0.1:11211",{"_index":344,"t":{"2941":{"position":[[113,17]]},"2943":{"position":[[37,18]]}}}],["127.0.0.1:8091",{"_index":231,"t":{"2897":{"position":[[287,17]]},"2901":{"position":[[73,17]]}}}],["1433",{"_index":363,"t":{"2981":{"position":[[267,5]]},"2983":{"position":[[355,4]]},"2985":{"position":[[72,5]]}}}],["15",{"_index":302,"t":{"2913":{"position":[[2668,2],[2722,2]]}}}],["1e7",{"_index":458,"t":{"3051":{"position":[[271,4]]},"3055":{"position":[[41,4]]}}}],["1gb",{"_index":466,"t":{"3051":{"position":[[366,6]]},"3053":{"position":[[131,6]]}}}],["2",{"_index":84,"t":{"2839":{"position":[[26,1]]},"2853":{"position":[[43,1]]},"2867":{"position":[[24,1]]},"2881":{"position":[[23,1]]},"2895":{"position":[[27,1]]},"2909":{"position":[[26,1]]},"2913":{"position":[[175,3]]},"2923":{"position":[[22,1]]},"2929":{"position":[[80,1]]},"2937":{"position":[[24,1]]},"2951":{"position":[[24,1]]},"2965":{"position":[[25,1]]},"2979":{"position":[[23,1]]},"2993":{"position":[[23,1]]},"3007":{"position":[[24,1]]},"3021":{"position":[[26,1]]},"3035":{"position":[[23,1]]},"3049":{"position":[[27,1]]},"3063":{"position":[[20,1]]},"3077":{"position":[[25,1]]}}}],["25",{"_index":281,"t":{"2913":{"position":[[1341,2],[2037,2]]}}}],["27017",{"_index":354,"t":{"2967":{"position":[[275,6]]},"2969":{"position":[[313,5]]},"2971":{"position":[[72,6]]}}}],["3",{"_index":171,"t":{"2857":{"position":[[658,1]]},"2859":{"position":[[116,2]]},"2897":{"position":[[363,2]]},"2901":{"position":[[174,1]]},"2913":{"position":[[1010,1]]},"2915":{"position":[[93,2]]},"3067":{"position":[[613,1]]},"3069":{"position":[[255,2]]}}}],["30",{"_index":463,"t":{"3051":{"position":[[337,3]]},"3055":{"position":[[60,3]]}}}],["3306",{"_index":374,"t":{"2995":{"position":[[267,5]]},"2997":{"position":[[433,4]]},"2999":{"position":[[72,5]]}}}],["5",{"_index":277,"t":{"2913":{"position":[[1246,2],[1942,2]]},"2915":{"position":[[129,2],[152,2]]}}}],["5432",{"_index":394,"t":{"3025":{"position":[[486,4]]},"3027":{"position":[[111,5]]}}}],["60",{"_index":222,"t":{"2885":{"position":[[342,2]]},"2887":{"position":[[123,2]]}}}],["6379",{"_index":400,"t":{"3037":{"position":[[281,5]]},"3039":{"position":[[172,4]]},"3041":{"position":[[53,5]]}}}],["6380",{"_index":409,"t":{"3037":{"position":[[617,9]]}}}],["64",{"_index":468,"t":{"3051":{"position":[[386,3]]},"3055":{"position":[[77,3]]}}}],["8529",{"_index":112,"t":{"2841":{"position":[[286,5]]},"2843":{"position":[[179,4]]},"2845":{"position":[[90,5]]}}}],["_",{"_index":376,"t":{"2995":{"position":[[612,1]]}}}],["access",{"_index":162,"t":{"2857":{"position":[[422,6],[448,6]]},"2913":{"position":[[768,6],[794,6]]},"3067":{"position":[[371,6],[397,6]]}}}],["accesskey",{"_index":314,"t":{"2913":{"position":[[3096,9]]},"3067":{"position":[[659,9]]}}}],["account",{"_index":152,"t":{"2855":{"position":[[258,8],[320,8]]},"2857":{"position":[[32,7],[46,7]]},"2859":{"position":[[28,8]]}}}],["adaptor",{"_index":487,"t":{"3081":{"position":[[402,7]]}}}],["addr",{"_index":407,"t":{"3037":{"position":[[495,6],[592,6]]},"3039":{"position":[[794,5]]},"3041":{"position":[[177,6]]}}}],["address",{"_index":429,"t":{"3039":{"position":[[663,7],[699,10]]}}}],["admin",{"_index":239,"t":{"2901":{"position":[[101,8]]}}}],["allow",{"_index":265,"t":{"2913":{"position":[[415,6]]}}}],["along",{"_index":33,"t":{"2829":{"position":[[457,5]]}}}],["amount",{"_index":214,"t":{"2885":{"position":[[230,6]]},"3081":{"position":[[769,6]]}}}],["applic",{"_index":235,"t":{"2899":{"position":[[28,11],[108,11]]}}}],["arangodb",{"_index":55,"t":{"2831":{"position":[[0,8]]},"2833":{"position":[[2,8]]},"2839":{"position":[[0,8]]}}}],["arangodb.new",{"_index":106,"t":{"2841":{"position":[[172,14]]}}}],["arangodb.new(arangodb.config",{"_index":108,"t":{"2841":{"position":[[224,29]]}}}],["arangodb/go",{"_index":72,"t":{"2833":{"position":[[32,11],[55,11]]}}}],["attempt",{"_index":170,"t":{"2857":{"position":[[623,10]]},"2913":{"position":[[972,10]]},"3067":{"position":[[575,10]]}}}],["authent",{"_index":328,"t":{"2927":{"position":[[197,15],[259,15]]},"2969":{"position":[[81,14]]},"2983":{"position":[[123,14]]},"2997":{"position":[[69,14],[201,14]]},"3025":{"position":[[254,14]]}}}],["avail",{"_index":219,"t":{"2885":{"position":[[284,9]]},"3039":{"position":[[1481,9]]}}}],["aw",{"_index":161,"t":{"2857":{"position":[[418,3],[437,3]]},"2913":{"position":[[764,3],[783,3]]},"3067":{"position":[[98,3],[130,3],[367,3],[386,3]]}}}],["aws.bool(tru",{"_index":316,"t":{"2915":{"position":[[177,15]]}}}],["aws/aw",{"_index":241,"t":{"2903":{"position":[[32,7]]},"3057":{"position":[[26,7]]}}}],["aws/credenti",{"_index":246,"t":{"2903":{"position":[[154,19]]},"3057":{"position":[[148,19]]}}}],["aws_region",{"_index":263,"t":{"2913":{"position":[[283,13]]}}}],["awsdynamodb.cli",{"_index":252,"t":{"2907":{"position":[[285,19]]}}}],["azblob.cli",{"_index":148,"t":{"2851":{"position":[[288,14]]}}}],["azur",{"_index":136,"t":{"2847":{"position":[[0,5]]},"2853":{"position":[[0,5],[210,5]]}}}],["azureblob",{"_index":56,"t":{"2831":{"position":[[9,9]]}}}],["azureblob.new",{"_index":150,"t":{"2855":{"position":[[173,15]]}}}],["azureblob.new(azureblob.config",{"_index":151,"t":{"2855":{"position":[[226,31]]}}}],["badger",{"_index":57,"t":{"2831":{"position":[[19,6]]},"2867":{"position":[[0,6],[191,6]]},"2871":{"position":[[344,6],[487,6]]}}}],["badger.db",{"_index":176,"t":{"2865":{"position":[[288,10]]},"3005":{"position":[[288,10]]}}}],["badger.defaultoptions(\"./fiber.badg",{"_index":184,"t":{"2871":{"position":[[378,39]]}}}],["badger.defaultoptions(\"./fiber.badger\").withlogger(nil",{"_index":190,"t":{"2873":{"position":[[115,56]]}}}],["badger.logg",{"_index":187,"t":{"2871":{"position":[[532,13]]}}}],["badger.new",{"_index":178,"t":{"2869":{"position":[[170,12]]}}}],["badger.new(badger.config",{"_index":179,"t":{"2869":{"position":[[220,25]]}}}],["badger.opt",{"_index":185,"t":{"2871":{"position":[[432,14]]}}}],["badgeropt",{"_index":182,"t":{"2871":{"position":[[303,13],[418,13]]},"2873":{"position":[[100,14]]}}}],["bbolt",{"_index":58,"t":{"2831":{"position":[[26,5]]},"2875":{"position":[[2,5]]},"2881":{"position":[[0,5]]},"2885":{"position":[[137,5]]}}}],["bbolt.db",{"_index":206,"t":{"2879":{"position":[[288,9]]}}}],["bbolt.new",{"_index":208,"t":{"2883":{"position":[[169,11]]}}}],["bbolt.new(bbolt.config",{"_index":209,"t":{"2883":{"position":[[218,23]]}}}],["befor",{"_index":132,"t":{"2843":{"position":[[580,6]]},"2871":{"position":[[202,6]]},"2913":{"position":[[2921,6]]},"2955":{"position":[[29,6]]},"2983":{"position":[[804,6]]},"2997":{"position":[[819,6]]},"3025":{"position":[[959,6]]},"3081":{"position":[[263,6]]}}}],["blob",{"_index":137,"t":{"2847":{"position":[[6,4]]},"2853":{"position":[[6,4],[216,4]]}}}],["block",{"_index":300,"t":{"2913":{"position":[[2616,5]]}}}],["bolt",{"_index":192,"t":{"2875":{"position":[[44,4]]}}}],["bool",{"_index":130,"t":{"2843":{"position":[[567,4]]},"2857":{"position":[[388,4]]},"2871":{"position":[[189,4],[636,4]]},"2885":{"position":[[460,4],[557,4]]},"2913":{"position":[[1120,4],[3062,5]]},"2941":{"position":[[237,4]]},"2969":{"position":[[697,4]]},"2983":{"position":[[791,4]]},"2997":{"position":[[806,4]]},"3025":{"position":[[946,4]]},"3039":{"position":[[1275,4]]},"3067":{"position":[[337,4]]},"3081":{"position":[[250,4]]}}}],["bound",{"_index":450,"t":{"3043":{"position":[[9,5]]}}}],["bradfitz/gomemcach",{"_index":333,"t":{"2931":{"position":[[32,20]]}}}],["bucket",{"_index":211,"t":{"2883":{"position":[[270,7],[282,8]]},"2885":{"position":[[143,6],[198,6],[511,6]]},"2887":{"position":[[89,7]]},"2897":{"position":[[333,7]]},"2899":{"position":[[263,6],[284,6]]},"2901":{"position":[[130,7]]},"2913":{"position":[[1074,6]]},"3065":{"position":[[230,7],[242,6]]},"3067":{"position":[[69,6],[81,6],[291,6]]},"3069":{"position":[[32,7],[176,7]]}}}],["buffer",{"_index":469,"t":{"3051":{"position":[[416,7]]},"3053":{"position":[[190,7]]}}}],["bufferitem",{"_index":467,"t":{"3051":{"position":[[373,12]]},"3053":{"position":[[155,11],[198,11]]},"3055":{"position":[[64,12]]}}}],["byte",{"_index":29,"t":{"2829":{"position":[[393,8],[591,7]]},"2837":{"position":[[69,8],[123,7]]},"2851":{"position":[[69,8],[123,7]]},"2865":{"position":[[69,8],[123,7]]},"2879":{"position":[[69,8],[123,7]]},"2893":{"position":[[69,8],[123,7]]},"2907":{"position":[[66,8],[120,7]]},"2921":{"position":[[70,8],[124,7]]},"2935":{"position":[[69,8],[123,7]]},"2949":{"position":[[69,8],[123,7]]},"2963":{"position":[[69,8],[123,7]]},"2977":{"position":[[69,8],[123,7]]},"2991":{"position":[[69,8],[123,7]]},"3005":{"position":[[69,8],[123,7]]},"3019":{"position":[[69,8],[123,7]]},"3033":{"position":[[69,8],[123,7]]},"3047":{"position":[[69,8],[123,7]]},"3061":{"position":[[69,8],[123,7]]},"3075":{"position":[[69,8],[123,7]]}}}],["cach",{"_index":465,"t":{"3051":{"position":[[360,5]]},"3053":{"position":[[125,5]]}}}],["calcul",{"_index":286,"t":{"2913":{"position":[[1415,13],[2111,13]]}}}],["case",{"_index":308,"t":{"2913":{"position":[[2847,4]]}}}],["cer",{"_index":410,"t":{"3037":{"position":[[670,4]]}}}],["certif",{"_index":419,"t":{"3037":{"position":[[855,13]]}}}],["chu'",{"_index":197,"t":{"2875":{"position":[[97,5]]}}}],["clear",{"_index":129,"t":{"2843":{"position":[[480,6]]},"2857":{"position":[[304,6]]},"2871":{"position":[[107,6]]},"2885":{"position":[[474,6]]},"2913":{"position":[[1037,6]]},"2941":{"position":[[155,6]]},"2969":{"position":[[615,6]]},"2983":{"position":[[709,6]]},"2997":{"position":[[724,6]]},"3025":{"position":[[864,6]]},"3039":{"position":[[1188,6]]},"3067":{"position":[[254,6]]},"3081":{"position":[[168,6]]}}}],["client",{"_index":305,"t":{"2913":{"position":[[2810,6]]},"2927":{"position":[[308,6]]},"3037":{"position":[[428,6],[552,6],[642,6],[1025,6]]},"3039":{"position":[[932,7]]}}}],["client.key",{"_index":413,"t":{"3037":{"position":[[718,15]]}}}],["clientnam",{"_index":437,"t":{"3039":{"position":[[904,10],[948,11],[1013,10]]},"3041":{"position":[[212,11]]}}}],["clientv3.client",{"_index":318,"t":{"2921":{"position":[[289,16]]}}}],["close",{"_index":48,"t":{"2829":{"position":[[826,5],[832,6],[921,7]]},"2837":{"position":[[249,7]]},"2851":{"position":[[249,7]]},"2865":{"position":[[249,7]]},"2879":{"position":[[249,7]]},"2893":{"position":[[249,7]]},"2907":{"position":[[246,7]]},"2921":{"position":[[250,7]]},"2935":{"position":[[249,7]]},"2949":{"position":[[249,7]]},"2963":{"position":[[249,7]]},"2977":{"position":[[249,7]]},"2991":{"position":[[249,7]]},"3005":{"position":[[249,7]]},"3019":{"position":[[249,7]]},"3033":{"position":[[249,7]]},"3047":{"position":[[249,7]]},"3061":{"position":[[249,7]]},"3075":{"position":[[249,7]]}}}],["cloud",{"_index":141,"t":{"2847":{"position":[[66,6]]}}}],["cluster",{"_index":236,"t":{"2899":{"position":[[77,7],[157,7],[224,7],[345,7],[443,7]]},"3037":{"position":[[544,7]]}}}],["clustercli",{"_index":434,"t":{"3039":{"position":[[742,13]]}}}],["cockroachdb/pebbl",{"_index":378,"t":{"3001":{"position":[[26,18]]}}}],["collect",{"_index":114,"t":{"2841":{"position":[[311,11]]},"2843":{"position":[[394,10],[453,10],[517,10]]},"2845":{"position":[[115,11]]},"2967":{"position":[[301,11],[513,11]]},"2969":{"position":[[529,10],[588,10]]},"2971":{"position":[[98,11]]},"3039":{"position":[[1225,10]]}}}],["collector",{"_index":52,"t":{"2829":{"position":[[888,10]]}}}],["command",{"_index":440,"t":{"3039":{"position":[[960,7]]}}}],["commun",{"_index":11,"t":{"2829":{"position":[[139,13]]}}}],["config",{"_index":76,"t":{"2835":{"position":[[33,6],[48,6]]},"2837":{"position":[[16,10]]},"2841":{"position":[[156,6],[208,6]]},"2843":{"position":[[5,6]]},"2845":{"position":[[50,7]]},"2849":{"position":[[33,6],[48,6]]},"2851":{"position":[[16,10]]},"2855":{"position":[[157,6],[210,6]]},"2857":{"position":[[5,6]]},"2859":{"position":[[20,7]]},"2863":{"position":[[33,6],[48,6]]},"2865":{"position":[[16,10]]},"2869":{"position":[[154,6],[204,6]]},"2871":{"position":[[5,6]]},"2873":{"position":[[20,7]]},"2877":{"position":[[33,6],[48,6]]},"2879":{"position":[[16,10]]},"2883":{"position":[[153,6],[202,6]]},"2885":{"position":[[3,6],[22,6],[47,6]]},"2887":{"position":[[32,6],[59,7]]},"2891":{"position":[[33,6],[48,6]]},"2893":{"position":[[16,10]]},"2897":{"position":[[157,6],[233,6]]},"2899":{"position":[[5,6]]},"2901":{"position":[[32,6],[59,7]]},"2903":{"position":[[60,6],[199,6],[262,7]]},"2905":{"position":[[33,6],[48,6]]},"2907":{"position":[[16,7]]},"2913":{"position":[[5,6],[209,6]]},"2915":{"position":[[20,7]]},"2919":{"position":[[33,6],[48,6]]},"2921":{"position":[[16,10]]},"2925":{"position":[[152,6],[200,6]]},"2927":{"position":[[5,6]]},"2929":{"position":[[20,7]]},"2933":{"position":[[33,6],[48,6]]},"2935":{"position":[[16,10]]},"2939":{"position":[[156,6],[208,6]]},"2941":{"position":[[5,6]]},"2943":{"position":[[20,7]]},"2947":{"position":[[33,6],[48,6]]},"2949":{"position":[[16,10]]},"2953":{"position":[[154,6],[204,6]]},"2955":{"position":[[5,6]]},"2957":{"position":[[20,7]]},"2961":{"position":[[33,6],[48,6]]},"2963":{"position":[[16,10]]},"2967":{"position":[[155,6],[206,6],[368,6]]},"2969":{"position":[[5,6]]},"2971":{"position":[[20,7]]},"2975":{"position":[[33,6],[48,6]]},"2977":{"position":[[16,10]]},"2981":{"position":[[153,6],[202,6],[404,6]]},"2983":{"position":[[3,6],[22,6],[47,6]]},"2985":{"position":[[20,7]]},"2989":{"position":[[33,6],[48,6]]},"2991":{"position":[[16,10]]},"2995":{"position":[[153,6],[202,6],[384,6],[577,6]]},"2997":{"position":[[5,6]]},"2999":{"position":[[20,7]]},"3003":{"position":[[33,6],[48,6]]},"3005":{"position":[[16,10]]},"3009":{"position":[[154,6],[204,6]]},"3011":{"position":[[5,6]]},"3013":{"position":[[20,7]]},"3017":{"position":[[33,6],[48,6]]},"3019":{"position":[[16,10]]},"3023":{"position":[[159,6],[211,6]]},"3025":{"position":[[3,6],[22,6],[47,6]]},"3027":{"position":[[32,6],[59,7]]},"3031":{"position":[[33,6],[48,6]]},"3033":{"position":[[16,10]]},"3037":{"position":[[167,6],[216,6]]},"3039":{"position":[[5,6],[476,6],[1287,6]]},"3041":{"position":[[20,7]]},"3045":{"position":[[33,6],[48,6]]},"3047":{"position":[[16,10]]},"3051":{"position":[[157,6],[210,6]]},"3053":{"position":[[5,6]]},"3055":{"position":[[20,7]]},"3057":{"position":[[54,6],[193,6],[256,7]]},"3059":{"position":[[33,6],[48,6]]},"3061":{"position":[[16,10]]},"3065":{"position":[[150,6],[196,6]]},"3067":{"position":[[3,6],[22,6],[47,6]]},"3069":{"position":[[141,6],[168,7]]},"3073":{"position":[[33,6],[48,6]]},"3075":{"position":[[16,10]]},"3079":{"position":[[155,6],[206,6]]},"3081":{"position":[[5,6],[418,6]]},"3083":{"position":[[20,7]]}}}],["configdefault",{"_index":135,"t":{"2845":{"position":[[34,13]]},"2859":{"position":[[4,13]]},"2873":{"position":[[4,13]]},"2887":{"position":[[3,13],[43,13]]},"2901":{"position":[[3,13],[43,13]]},"2915":{"position":[[4,13]]},"2929":{"position":[[4,13]]},"2943":{"position":[[4,13]]},"2957":{"position":[[4,13]]},"2971":{"position":[[4,13]]},"2985":{"position":[[4,13]]},"2999":{"position":[[4,13]]},"3013":{"position":[[4,13]]},"3027":{"position":[[3,13],[43,13]]},"3041":{"position":[[4,13]]},"3055":{"position":[[4,13]]},"3069":{"position":[[112,13],[152,13]]},"3083":{"position":[[4,13]]}}}],["configur",{"_index":475,"t":{"3069":{"position":[[12,13]]}}}],["conn",{"_index":81,"t":{"2837":{"position":[[281,6]]},"2851":{"position":[[281,6]]},"2865":{"position":[[281,6]]},"2879":{"position":[[281,6]]},"2893":{"position":[[281,6]]},"2907":{"position":[[278,6]]},"2921":{"position":[[282,6]]},"2935":{"position":[[281,6]]},"2949":{"position":[[281,6]]},"2963":{"position":[[281,6]]},"2977":{"position":[[281,6]]},"2991":{"position":[[281,6]]},"3005":{"position":[[281,6]]},"3019":{"position":[[281,6]]},"3033":{"position":[[281,6]]},"3039":{"position":[[977,5]]},"3047":{"position":[[281,6]]},"3061":{"position":[[281,6]]},"3075":{"position":[[281,6]]}}}],["connect",{"_index":54,"t":{"2829":{"position":[[908,12]]},"2899":{"position":[[52,7],[132,7],[188,10],[273,7],[317,10]]},"2927":{"position":[[129,11]]},"2967":{"position":[[381,10]]},"2969":{"position":[[24,10]]},"2981":{"position":[[417,10]]},"2983":{"position":[[66,10],[926,10]]},"2995":{"position":[[397,10],[597,10]]},"2997":{"position":[[144,10]]},"3025":{"position":[[103,10],[128,10],[197,10],[792,10]]},"3039":{"position":[[349,10],[1416,12],[1459,11]]},"3081":{"position":[[517,11],[541,10],[655,11],[786,10]]}}}],["connectiontimeout",{"_index":232,"t":{"2897":{"position":[[344,18]]},"2899":{"position":[[353,17]]},"2901":{"position":[[155,18]]}}}],["connectionuri",{"_index":355,"t":{"2967":{"position":[[436,14]]},"2969":{"position":[[141,13]]},"2971":{"position":[[28,14]]},"2981":{"position":[[468,14]]},"2983":{"position":[[183,13]]},"2985":{"position":[[28,14]]},"2995":{"position":[[448,14]]},"2997":{"position":[[41,13],[261,13]]},"2999":{"position":[[28,14]]},"3025":{"position":[[314,13]]},"3027":{"position":[[67,14]]}}}],["connmaxlifetim",{"_index":486,"t":{"3079":{"position":[[385,16]]},"3081":{"position":[[736,15],[849,15]]},"3083":{"position":[[163,16]]}}}],["consol",{"_index":280,"t":{"2913":{"position":[[1329,8],[2025,8]]}}}],["contain",{"_index":45,"t":{"2829":{"position":[[718,7]]},"2855":{"position":[[275,10]]},"2857":{"position":[[64,9],[80,9],[341,10]]},"2859":{"position":[[41,10]]},"2913":{"position":[[542,9],[603,10]]}}}],["cost",{"_index":464,"t":{"3051":{"position":[[352,4]]},"3053":{"position":[[117,4]]}}}],["couchbas",{"_index":59,"t":{"2831":{"position":[[32,9]]},"2889":{"position":[[2,9]]},"2895":{"position":[[0,9],[194,9]]},"2897":{"position":[[203,9]]},"2899":{"position":[[67,9],[147,9],[214,9],[335,9],[433,9]]}}}],["couchbase.new",{"_index":229,"t":{"2897":{"position":[[173,15]]}}}],["couchbase.new(couchbase.config",{"_index":230,"t":{"2897":{"position":[[249,31]]}}}],["couchbase/gocb",{"_index":226,"t":{"2889":{"position":[[33,15]]}}}],["cpu",{"_index":447,"t":{"3039":{"position":[[1491,3]]}}}],["creat",{"_index":105,"t":{"2841":{"position":[[116,6]]},"2855":{"position":[[117,6]]},"2869":{"position":[[114,6]]},"2883":{"position":[[113,6]]},"2897":{"position":[[117,6]]},"2911":{"position":[[116,6]]},"2913":{"position":[[1217,7],[1301,8],[1913,7],[1997,8],[2558,7],[2641,8],[2933,8]]},"2925":{"position":[[112,6]]},"2939":{"position":[[116,6]]},"2953":{"position":[[114,6]]},"2967":{"position":[[115,6]]},"2981":{"position":[[113,6]]},"2995":{"position":[[113,6]]},"3009":{"position":[[114,6]]},"3023":{"position":[[119,6]]},"3037":{"position":[[121,6],[633,6],[1016,6]]},"3051":{"position":[[117,6]]},"3065":{"position":[[110,6]]},"3079":{"position":[[115,6]]}}}],["credenti",{"_index":153,"t":{"2855":{"position":[[294,12],[307,12]]},"2857":{"position":[[396,11],[501,13],[515,11],[527,11]]},"2903":{"position":[[77,11],[100,11],[216,11],[235,11],[290,11]]},"2913":{"position":[[742,11],[850,13],[864,11],[876,11],[3075,11]]},"2915":{"position":[[52,12],[65,14]]},"2927":{"position":[[322,12]]},"3057":{"position":[[71,11],[94,11],[210,11],[229,11],[284,11]]},"3067":{"position":[[345,11],[453,13],[467,11],[479,11],[638,11]]},"3069":{"position":[[214,12],[227,14]]}}}],["custom",{"_index":107,"t":{"2841":{"position":[[201,6]]},"2855":{"position":[[203,6]]},"2869":{"position":[[197,6]]},"2883":{"position":[[195,6]]},"2897":{"position":[[226,6]]},"2913":{"position":[[435,6]]},"2925":{"position":[[193,6]]},"2939":{"position":[[201,6]]},"2953":{"position":[[197,6]]},"2967":{"position":[[199,6],[361,6]]},"2981":{"position":[[195,6],[397,6]]},"2995":{"position":[[195,6],[377,6],[570,6]]},"3009":{"position":[[197,6]]},"3023":{"position":[[204,6]]},"3037":{"position":[[209,6]]},"3051":{"position":[[203,6]]},"3065":{"position":[[189,6]]},"3079":{"position":[[199,6]]}}}],["customendpoint",{"_index":264,"t":{"2913":{"position":[[400,14]]}}}],["darwin",{"_index":220,"t":{"2885":{"position":[[297,6]]}}}],["databas",{"_index":113,"t":{"2841":{"position":[[292,9]]},"2843":{"position":[[326,8],[375,8]]},"2845":{"position":[[96,9]]},"2869":{"position":[[246,9]]},"2871":{"position":[[24,8],[82,8]]},"2873":{"position":[[28,9]]},"2875":{"position":[[184,8],[232,8]]},"2883":{"position":[[242,9]]},"2885":{"position":[[66,8],[118,8],[390,8]]},"2887":{"position":[[67,9]]},"2967":{"position":[[282,9],[494,9]]},"2969":{"position":[[461,8],[510,8]]},"2971":{"position":[[79,9]]},"2981":{"position":[[273,9]]},"2983":{"position":[[565,8],[614,8]]},"2985":{"position":[[78,9]]},"2995":{"position":[[273,9]]},"2997":{"position":[[580,8],[629,8]]},"2999":{"position":[[78,9]]},"3011":{"position":[[24,8]]},"3025":{"position":[[633,8],[682,8]]},"3027":{"position":[[117,9]]},"3037":{"position":[[315,9]]},"3039":{"position":[[319,8],[404,8],[524,8]]},"3041":{"position":[[96,9]]},"3079":{"position":[[250,9]]},"3081":{"position":[[24,8],[73,8],[674,9]]},"3083":{"position":[[28,9]]}}}],["database/key",{"_index":13,"t":{"2829":{"position":[[168,12]]}}}],["database/sql",{"_index":368,"t":{"2987":{"position":[[29,12]]}}}],["db",{"_index":122,"t":{"2843":{"position":[[44,2],[133,2]]},"2861":{"position":[[17,2]]},"2969":{"position":[[53,3],[185,2],[267,2]]},"2983":{"position":[[95,3],[227,2],[309,2]]},"2995":{"position":[[594,2],[608,3],[715,3],[719,3]]},"2997":{"position":[[24,2],[130,2],[173,3],[305,2],[387,2]]},"3001":{"position":[[17,2]]},"3009":{"position":[[252,5]]},"3011":{"position":[[65,6]]},"3013":{"position":[[34,5]]},"3023":{"position":[[257,3]]},"3025":{"position":[[66,2],[177,2],[226,3],[358,2],[440,2]]},"3039":{"position":[[44,2],[126,2]]}}}],["dbpool",{"_index":392,"t":{"3023":{"position":[[261,7]]}}}],["default",{"_index":77,"t":{"2835":{"position":[[40,7]]},"2841":{"position":[[148,7]]},"2843":{"position":[[73,7],[168,7],[228,7],[293,7],[356,7],[426,7],[544,7],[625,7]]},"2849":{"position":[[40,7]]},"2855":{"position":[[149,7]]},"2857":{"position":[[131,8],[240,7],[365,7],[490,7],[647,7]]},"2863":{"position":[[40,7]]},"2869":{"position":[[146,7]]},"2871":{"position":[[54,7],[166,7],[247,7],[367,7],[464,7],[510,7],[609,7]]},"2877":{"position":[[40,7]]},"2883":{"position":[[145,7]]},"2885":{"position":[[96,7],[171,7],[331,7],[434,7],[534,7]]},"2887":{"position":[[24,7]]},"2891":{"position":[[40,7]]},"2897":{"position":[[149,7]]},"2901":{"position":[[24,7]]},"2905":{"position":[[40,7]]},"2913":{"position":[[374,9],[714,8],[839,7],[999,7],[1097,7],[1252,8],[1279,7],[1948,8],[1975,7],[3031,9]]},"2919":{"position":[[40,7]]},"2925":{"position":[[144,7]]},"2933":{"position":[[40,7]]},"2939":{"position":[[148,7]]},"2941":{"position":[[102,7],[214,7]]},"2947":{"position":[[40,7]]},"2953":{"position":[[146,7]]},"2955":{"position":[[64,7]]},"2961":{"position":[[40,7]]},"2967":{"position":[[147,7]]},"2969":{"position":[[127,7],[214,7],[302,7],[363,7],[428,7],[491,7],[561,7],[674,7]]},"2975":{"position":[[40,7]]},"2981":{"position":[[145,7]]},"2983":{"position":[[169,7],[256,7],[344,7],[404,7],[469,7],[532,7],[595,7],[660,7],[768,7],[849,7],[953,7]]},"2989":{"position":[[40,7]]},"2995":{"position":[[145,7]]},"2997":{"position":[[115,7],[247,7],[334,7],[422,7],[482,7],[547,7],[610,7],[675,7],[783,7],[864,7]]},"3003":{"position":[[40,7]]},"3009":{"position":[[146,7]]},"3011":{"position":[[54,7],[146,7]]},"3017":{"position":[[40,7]]},"3023":{"position":[[151,7]]},"3025":{"position":[[162,7],[300,7],[387,7],[475,7],[535,7],[600,7],[663,7],[728,7],[819,7],[923,7],[1004,7]]},"3027":{"position":[[24,7]]},"3031":{"position":[[40,7]]},"3037":{"position":[[159,7]]},"3039":{"position":[[73,7],[161,7],[221,7],[286,7],[391,7],[619,7],[772,7],[869,7],[999,7],[1067,7],[1141,7],[1252,7],[1351,7],[1445,7]]},"3045":{"position":[[40,7]]},"3051":{"position":[[149,7]]},"3059":{"position":[[40,7]]},"3065":{"position":[[142,7]]},"3067":{"position":[[190,7],[314,7],[442,7],[602,7]]},"3069":{"position":[[4,7],[133,7]]},"3073":{"position":[[40,7]]},"3079":{"position":[[147,7]]},"3081":{"position":[[54,7],[119,7],[227,7],[308,7],[574,7],[700,7],[828,7]]}}}],["defaultcost",{"_index":470,"t":{"3055":{"position":[[81,12]]}}}],["defin",{"_index":189,"t":{"2871":{"position":[[559,6]]},"2885":{"position":[[10,7]]},"2983":{"position":[[10,7]]},"3025":{"position":[[10,7]]},"3067":{"position":[[10,7]]}}}],["delet",{"_index":44,"t":{"2829":{"position":[[627,6],[634,7],[792,6]]},"2843":{"position":[[587,8]]},"2871":{"position":[[209,8]]},"2955":{"position":[[36,8]]},"2983":{"position":[[811,8]]},"2997":{"position":[[826,8]]},"3025":{"position":[[966,8]]},"3081":{"position":[[270,8]]}}}],["delete(key",{"_index":46,"t":{"2829":{"position":[[735,10]]},"2837":{"position":[[174,10]]},"2851":{"position":[[174,10]]},"2865":{"position":[[174,10]]},"2879":{"position":[[174,10]]},"2893":{"position":[[174,10]]},"2907":{"position":[[171,10]]},"2921":{"position":[[175,10]]},"2935":{"position":[[174,10]]},"2949":{"position":[[174,10]]},"2963":{"position":[[174,10]]},"2977":{"position":[[174,10]]},"2991":{"position":[[174,10]]},"3005":{"position":[[174,10]]},"3019":{"position":[[174,10]]},"3033":{"position":[[174,10]]},"3047":{"position":[[174,10]]},"3061":{"position":[[174,10]]},"3075":{"position":[[174,10]]}}}],["design",{"_index":5,"t":{"2829":{"position":[[62,8]]}}}],["develop",{"_index":288,"t":{"2913":{"position":[[1476,9],[1645,9],[2172,9],[2341,9]]}}}],["dgraph",{"_index":174,"t":{"2861":{"position":[[26,6]]},"3043":{"position":[[36,6]]}}}],["dialtimeout",{"_index":325,"t":{"2927":{"position":[[75,11],[141,11]]},"2929":{"position":[[67,12]]}}}],["didn't",{"_index":96,"t":{"2839":{"position":[[127,6]]},"2853":{"position":[[132,6]]},"2867":{"position":[[113,6]]},"2881":{"position":[[112,6]]},"2895":{"position":[[116,6]]},"2909":{"position":[[115,6]]},"2923":{"position":[[111,6]]},"2937":{"position":[[113,6]]},"2951":{"position":[[113,6]]},"2965":{"position":[[114,6]]},"2979":{"position":[[112,6]]},"2993":{"position":[[112,6]]},"3007":{"position":[[113,6]]},"3021":{"position":[[115,6]]},"3035":{"position":[[112,6]]},"3049":{"position":[[116,6]]},"3063":{"position":[[109,6]]},"3077":{"position":[[114,6]]}}}],["differ",{"_index":12,"t":{"2829":{"position":[[158,9]]}}}],["disabl",{"_index":365,"t":{"2981":{"position":[[369,10]]},"2983":{"position":[[964,9]]},"2985":{"position":[[174,10]]},"3025":{"position":[[830,9]]},"3027":{"position":[[169,10]]}}}],["divid",{"_index":340,"t":{"2941":{"position":[[36,7]]}}}],["docker",{"_index":269,"t":{"2913":{"position":[[535,6],[596,6]]}}}],["doesn't",{"_index":275,"t":{"2913":{"position":[[1192,7],[1888,7],[2534,7],[2702,7]]}}}],["don't",{"_index":203,"t":{"2875":{"position":[[211,5]]},"2913":{"position":[[2883,5]]},"3007":{"position":[[210,5]]}}}],["driver",{"_index":2,"t":{"2829":{"position":[[16,7]]},"2833":{"position":[[19,6],[44,6],[67,7]]},"2853":{"position":[[19,6]]},"2875":{"position":[[16,6]]},"2889":{"position":[[20,6]]},"2903":{"position":[[19,6]]},"2917":{"position":[[15,6]]},"2931":{"position":[[19,6]]},"2945":{"position":[[21,7]]},"2959":{"position":[[18,6],[48,7]]},"2973":{"position":[[16,6]]},"2987":{"position":[[16,6]]},"3015":{"position":[[19,6]]},"3029":{"position":[[16,6]]},"3043":{"position":[[23,6]]},"3057":{"position":[[13,6]]},"3071":{"position":[[18,6]]}}}],["driver.cli",{"_index":82,"t":{"2837":{"position":[[288,13]]}}}],["driver/mysql",{"_index":370,"t":{"2987":{"position":[[53,13]]}}}],["dure",{"_index":386,"t":{"3011":{"position":[[106,6]]}}}],["dynamodb",{"_index":60,"t":{"2831":{"position":[[42,8]]},"2903":{"position":[[2,8]]},"2909":{"position":[[0,8],[193,8]]},"2911":{"position":[[148,8]]},"2913":{"position":[[38,8],[326,8],[442,8],[518,9],[1467,8],[1636,8],[2163,8],[2332,8]]}}}],["dynamodb.new(dynamodb.config",{"_index":254,"t":{"2911":{"position":[[166,29]]}}}],["e.g",{"_index":260,"t":{"2913":{"position":[[161,4]]}}}],["each",{"_index":441,"t":{"3039":{"position":[[972,4]]}}}],["ec2",{"_index":247,"t":{"2903":{"position":[[177,3]]},"3057":{"position":[[171,3]]}}}],["effect",{"_index":426,"t":{"3039":{"position":[[541,7]]}}}],["empti",{"_index":37,"t":{"2829":{"position":[[518,5]]}}}],["enabl",{"_index":432,"t":{"3039":{"position":[[715,7]]}}}],["encount",{"_index":167,"t":{"2857":{"position":[[584,9]]},"2913":{"position":[[933,9]]},"3067":{"position":[[536,9]]}}}],["endpoint",{"_index":155,"t":{"2857":{"position":[[108,9],[191,8]]},"2859":{"position":[[56,9]]},"2913":{"position":[[459,9],[723,8]]},"2925":{"position":[[233,10]]},"2927":{"position":[[24,9],[53,9]]},"2929":{"position":[[28,10]]},"3065":{"position":[[255,9],[269,10]]},"3067":{"position":[[102,8],[111,8]]},"3069":{"position":[[52,8],[200,9]]}}}],["environ",{"_index":244,"t":{"2903":{"position":[[131,11]]},"2913":{"position":[[224,11],[261,11]]},"3057":{"position":[[125,11]]}}}],["err",{"_index":411,"t":{"3037":{"position":[[675,3],[737,3]]}}}],["error",{"_index":30,"t":{"2829":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"2837":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2851":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2865":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2879":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2893":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2907":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"2913":{"position":[[2737,5],[3002,7]]},"2921":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"2935":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2949":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2963":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2977":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"2991":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3005":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3019":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3033":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3047":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3061":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3075":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]}}}],["especi",{"_index":266,"t":{"2913":{"position":[[480,10]]}}}],["establish",{"_index":327,"t":{"2927":{"position":[[117,9]]}}}],["etcd",{"_index":61,"t":{"2831":{"position":[[51,4]]},"2875":{"position":[[29,4]]},"2917":{"position":[[2,4],[28,4]]},"2923":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":320,"t":{"2925":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":321,"t":{"2925":{"position":[[216,16]]}}}],["exampl",{"_index":75,"t":{"2835":{"position":[[24,8]]},"2849":{"position":[[24,8]]},"2863":{"position":[[24,8]]},"2877":{"position":[[24,8]]},"2891":{"position":[[24,8]]},"2905":{"position":[[24,8]]},"2913":{"position":[[1407,7],[2103,7]]},"2919":{"position":[[24,8]]},"2933":{"position":[[24,8]]},"2947":{"position":[[24,8]]},"2961":{"position":[[24,8]]},"2975":{"position":[[24,8]]},"2989":{"position":[[24,8]]},"3003":{"position":[[24,8]]},"3017":{"position":[[24,8]]},"3031":{"position":[[24,8]]},"3039":{"position":[[555,8]]},"3045":{"position":[[24,8]]},"3059":{"position":[[24,8]]},"3073":{"position":[[24,8]]}}}],["execut",{"_index":438,"t":{"3039":{"position":[[920,7]]}}}],["exist",{"_index":26,"t":{"2829":{"position":[[371,5]]},"2843":{"position":[[491,8],[508,8]]},"2857":{"position":[[315,8],[332,8]]},"2871":{"position":[[118,8],[135,8]]},"2885":{"position":[[485,8],[502,8]]},"2913":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"2941":{"position":[[166,8],[183,8]]},"2969":{"position":[[626,8],[643,8]]},"2983":{"position":[[720,8],[737,8]]},"2997":{"position":[[735,8],[752,8]]},"3007":{"position":[[224,8]]},"3025":{"position":[[875,8],[892,8]]},"3039":{"position":[[1199,8],[1216,8]]},"3067":{"position":[[265,8],[282,8]]},"3081":{"position":[[179,8],[196,8]]}}}],["exp",{"_index":42,"t":{"2829":{"position":[[599,3]]},"2837":{"position":[[131,3]]},"2851":{"position":[[131,3]]},"2865":{"position":[[131,3]]},"2879":{"position":[[131,3]]},"2893":{"position":[[131,3]]},"2907":{"position":[[128,3]]},"2921":{"position":[[132,3]]},"2935":{"position":[[131,3]]},"2949":{"position":[[131,3]]},"2963":{"position":[[131,3]]},"2977":{"position":[[131,3]]},"2991":{"position":[[131,3]]},"3005":{"position":[[131,3]]},"3019":{"position":[[131,3]]},"3033":{"position":[[131,3]]},"3047":{"position":[[131,3]]},"3061":{"position":[[131,3]]},"3075":{"position":[[131,3]]}}}],["expir",{"_index":34,"t":{"2829":{"position":[[474,10],[503,11]]},"2843":{"position":[[596,7]]},"2871":{"position":[[218,7]]},"2955":{"position":[[45,7]]},"2983":{"position":[[820,7]]},"2997":{"position":[[835,7]]},"3025":{"position":[[975,7]]},"3081":{"position":[[279,7]]}}}],["fail",{"_index":326,"t":{"2927":{"position":[[106,7]]}}}],["failov",{"_index":404,"t":{"3037":{"position":[[419,8]]}}}],["failovercli",{"_index":433,"t":{"3039":{"position":[[723,14]]}}}],["failur",{"_index":169,"t":{"2857":{"position":[[604,8]]},"2913":{"position":[[953,8]]},"3067":{"position":[[556,8]]}}}],["fals",{"_index":116,"t":{"2841":{"position":[[347,6]]},"2843":{"position":[[555,5]]},"2845":{"position":[[151,6]]},"2857":{"position":[[376,5]]},"2859":{"position":[[96,6]]},"2869":{"position":[[281,6]]},"2871":{"position":[[177,5],[620,5]]},"2873":{"position":[[63,6],[196,6]]},"2883":{"position":[[298,6]]},"2885":{"position":[[445,5],[545,5]]},"2887":{"position":[[151,6],[165,6]]},"2913":{"position":[[1108,5],[2786,6]]},"2915":{"position":[[103,6]]},"2941":{"position":[[225,5]]},"2967":{"position":[[337,6],[549,6]]},"2969":{"position":[[685,5]]},"2971":{"position":[[134,6]]},"2981":{"position":[[323,6],[548,6]]},"2983":{"position":[[779,5]]},"2985":{"position":[[128,6]]},"2995":{"position":[[323,6],[516,6],[730,6]]},"2997":{"position":[[794,5]]},"2999":{"position":[[128,6]]},"3023":{"position":[[300,6]]},"3025":{"position":[[934,5]]},"3027":{"position":[[187,6]]},"3037":{"position":[[335,6],[1003,6],[1160,6]]},"3039":{"position":[[1263,5]]},"3041":{"position":[[116,6]]},"3065":{"position":[[308,6]]},"3067":{"position":[[325,5]]},"3069":{"position":[[284,6]]},"3079":{"position":[[310,6]]},"3081":{"position":[[238,5]]},"3083":{"position":[[88,6]]}}}],["fast",{"_index":173,"t":{"2861":{"position":[[2,4]]},"2875":{"position":[[165,5]]},"3001":{"position":[[2,4]]}}}],["fiber",{"_index":8,"t":{"2829":{"position":[[95,5]]},"2841":{"position":[[302,8]]},"2843":{"position":[[367,7]]},"2845":{"position":[[106,8]]},"2967":{"position":[[292,8],[504,8]]},"2969":{"position":[[502,7]]},"2971":{"position":[[89,8]]},"2981":{"position":[[283,8]]},"2983":{"position":[[606,7]]},"2985":{"position":[[88,8]]},"2995":{"position":[[283,8]]},"2997":{"position":[[621,7]]},"2999":{"position":[[88,8]]},"3025":{"position":[[674,7]]},"3027":{"position":[[127,8]]},"3081":{"position":[[65,7]]}}}],["fiber.badg",{"_index":180,"t":{"2869":{"position":[[256,17]]},"2871":{"position":[[65,16]]},"2873":{"position":[[38,17]]}}}],["fiber.db",{"_index":213,"t":{"2885":{"position":[[107,10]]},"2887":{"position":[[77,11]]}}}],["fiber.sqlite3",{"_index":482,"t":{"3079":{"position":[[260,18]]},"3083":{"position":[[38,18]]}}}],["fiber_storag",{"_index":115,"t":{"2841":{"position":[[323,16]]},"2843":{"position":[[437,15]]},"2845":{"position":[[127,16]]},"2885":{"position":[[182,15]]},"2887":{"position":[[97,16]]},"2901":{"position":[[138,16]]},"2913":{"position":[[354,16]]},"2915":{"position":[[35,16]]},"2967":{"position":[[313,16],[525,16]]},"2969":{"position":[[572,15]]},"2971":{"position":[[110,16]]},"2981":{"position":[[299,16]]},"2983":{"position":[[671,15]]},"2985":{"position":[[104,16]]},"2995":{"position":[[299,16]]},"2997":{"position":[[686,15]]},"2999":{"position":[[104,16]]},"3023":{"position":[[276,16]]},"3025":{"position":[[739,15]]},"3027":{"position":[[143,16]]},"3079":{"position":[[286,16]]},"3081":{"position":[[130,15]]},"3083":{"position":[[64,16]]}}}],["field",{"_index":133,"t":{"2845":{"position":[[23,6]]},"2903":{"position":[[67,6],[206,6]]},"3025":{"position":[[139,6]]},"3057":{"position":[[61,6],[200,6]]}}}],["file",{"_index":217,"t":{"2885":{"position":[[265,4]]},"2913":{"position":[[216,4]]}}}],["first",{"_index":95,"t":{"2839":{"position":[[114,5]]},"2853":{"position":[[119,5]]},"2867":{"position":[[100,5]]},"2881":{"position":[[99,5]]},"2895":{"position":[[103,5]]},"2909":{"position":[[102,5]]},"2923":{"position":[[98,5]]},"2937":{"position":[[100,5]]},"2951":{"position":[[100,5]]},"2965":{"position":[[101,5]]},"2979":{"position":[[99,5]]},"2993":{"position":[[99,5]]},"3007":{"position":[[100,5]]},"3021":{"position":[[102,5]]},"3035":{"position":[[99,5]]},"3049":{"position":[[103,5]]},"3063":{"position":[[96,5]]},"3077":{"position":[[101,5]]}}}],["follow",{"_index":103,"t":{"2841":{"position":[[89,9]]},"2855":{"position":[[90,9]]},"2869":{"position":[[87,9]]},"2883":{"position":[[86,9]]},"2897":{"position":[[90,9]]},"2911":{"position":[[89,9]]},"2925":{"position":[[85,9]]},"2939":{"position":[[89,9]]},"2953":{"position":[[87,9]]},"2967":{"position":[[88,9]]},"2981":{"position":[[86,9]]},"2995":{"position":[[86,9]]},"3009":{"position":[[87,9]]},"3023":{"position":[[92,9]]},"3037":{"position":[[100,9]]},"3051":{"position":[[90,9]]},"3065":{"position":[[83,9]]},"3079":{"position":[[88,9]]}}}],["format",{"_index":425,"t":{"3039":{"position":[[433,6]]}}}],["free",{"_index":284,"t":{"2913":{"position":[[1369,4],[2065,4]]}}}],["frequenc",{"_index":460,"t":{"3051":{"position":[[303,9]]},"3053":{"position":[[60,9]]}}}],["full",{"_index":204,"t":{"2875":{"position":[[227,4]]}}}],["func",{"_index":78,"t":{"2837":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2851":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2865":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2879":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2893":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2907":{"position":[[0,4],[32,4],[82,4],[153,4],[196,4],[228,4],[260,4]]},"2921":{"position":[[0,4],[36,4],[86,4],[157,4],[200,4],[232,4],[264,4]]},"2935":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2949":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2963":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2977":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"2991":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3005":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3019":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3033":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3047":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3061":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3075":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]}}}],["garbag",{"_index":51,"t":{"2829":{"position":[[877,7]]}}}],["gcinterv",{"_index":117,"t":{"2841":{"position":[[354,11]]},"2843":{"position":[[653,10]]},"2845":{"position":[[158,11]]},"2869":{"position":[[288,11]]},"2871":{"position":[[275,10]]},"2873":{"position":[[70,11]]},"2953":{"position":[[246,11]]},"2955":{"position":[[92,10]]},"2957":{"position":[[28,11]]},"2981":{"position":[[330,11],[555,11]]},"2983":{"position":[[877,10]]},"2985":{"position":[[135,11]]},"2995":{"position":[[330,11],[523,11],[737,11]]},"2997":{"position":[[892,10]]},"2999":{"position":[[135,11]]},"3023":{"position":[[307,11]]},"3025":{"position":[[1032,10]]},"3027":{"position":[[194,11]]},"3079":{"position":[[317,11]]},"3081":{"position":[[336,10]]},"3083":{"position":[[95,11]]}}}],["get",{"_index":21,"t":{"2829":{"position":[[289,4]]}}}],["get(key",{"_index":27,"t":{"2829":{"position":[[377,7]]},"2837":{"position":[[53,7]]},"2851":{"position":[[53,7]]},"2865":{"position":[[53,7]]},"2879":{"position":[[53,7]]},"2893":{"position":[[53,7]]},"2907":{"position":[[50,7]]},"2921":{"position":[[54,7]]},"2935":{"position":[[53,7]]},"2949":{"position":[[53,7]]},"2963":{"position":[[53,7]]},"2977":{"position":[[53,7]]},"2991":{"position":[[53,7]]},"3005":{"position":[[53,7]]},"3019":{"position":[[53,7]]},"3033":{"position":[[53,7]]},"3047":{"position":[[53,7]]},"3061":{"position":[[53,7]]},"3075":{"position":[[53,7]]}}}],["github.com//:@127.0.0.1:6379/:@localhost:6379/:@tcp(:)/ + + + + +SQLite3 | Fiber + + + + + + +
+
Version: memcache_v1.x.x

SQLite3

Release +Discord +Test +Security +Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
+ + + + \ No newline at end of file diff --git a/storage/memory/index.html b/storage/memory/index.html index 9829eb113df..b09a6ccfaea 100644 --- a/storage/memory/index.html +++ b/storage/memory/index.html @@ -1,22 +1,22 @@ - + -Memory | Fiber +Memory | Fiber - - + +
-
Version: memcache_v1.x.x

Memory

Release +

Version: bbolt_v1.x.x

Memory

Release Discord Test Security -Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
- - +Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/mongodb/index.html b/storage/mongodb/index.html index 5445cc2a447..dd6652ff9a5 100644 --- a/storage/mongodb/index.html +++ b/storage/mongodb/index.html @@ -1,22 +1,22 @@ - + -MongoDB | Fiber +MongoDB | Fiber - - + +
-
Version: memcache_v1.x.x

MongoDB

Release +

Version: bbolt_v1.x.x

MongoDB

Release Discord Test Security -Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
- - +Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/mssql/index.html b/storage/mssql/index.html index bbba5b1ccce..5e31655ece8 100644 --- a/storage/mssql/index.html +++ b/storage/mssql/index.html @@ -1,22 +1,22 @@ - + -MSSQL | Fiber +MSSQL | Fiber - - + +
-
Version: memcache_v1.x.x

MSSQL

Release +

Version: bbolt_v1.x.x

MSSQL

Release Discord Test Security -Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
- - +Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
+ + \ No newline at end of file diff --git a/storage/mysql/index.html b/storage/mysql/index.html index 9a1c3f0bc74..8a3c50a3fa8 100644 --- a/storage/mysql/index.html +++ b/storage/mysql/index.html @@ -1,22 +1,22 @@ - + -MySQL | Fiber +MySQL | Fiber - - + +
-
Version: memcache_v1.x.x

MySQL

Release +

Version: bbolt_v1.x.x

MySQL

Release Discord Test Security -Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/arangodb/index.html b/storage/mysql_v1.x.x/arangodb/index.html index 19409d26a67..8ccdb418e01 100644 --- a/storage/mysql_v1.x.x/arangodb/index.html +++ b/storage/mysql_v1.x.x/arangodb/index.html @@ -6,17 +6,17 @@ ArangoDB | Fiber - - + +
-
Version: mysql_v1.x.x

ArangoDB

Release +

Version: mysql_v1.x.x

ArangoDB

Release Discord Test Security -Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/azureblob/index.html b/storage/mysql_v1.x.x/azureblob/index.html index 5ec99c67981..556d85da1fc 100644 --- a/storage/mysql_v1.x.x/azureblob/index.html +++ b/storage/mysql_v1.x.x/azureblob/index.html @@ -6,17 +6,17 @@ Azure Blob | Fiber - - + +
-
Version: mysql_v1.x.x

Azure Blob

Release +

Version: mysql_v1.x.x

Azure Blob

Release Discord Test Security -Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
- - +Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/badger/index.html b/storage/mysql_v1.x.x/badger/index.html index 6e4ed397e15..0e9cd172547 100644 --- a/storage/mysql_v1.x.x/badger/index.html +++ b/storage/mysql_v1.x.x/badger/index.html @@ -6,17 +6,17 @@ Badger | Fiber - - + +
-
Version: mysql_v1.x.x

Badger

Release +

Version: mysql_v1.x.x

Badger

Release Discord Test Security -Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
- - +Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/bbolt/index.html b/storage/mysql_v1.x.x/bbolt/index.html index d98761a7693..2275d09a8c1 100644 --- a/storage/mysql_v1.x.x/bbolt/index.html +++ b/storage/mysql_v1.x.x/bbolt/index.html @@ -6,17 +6,17 @@ Bbolt | Fiber - - + +
-
Version: mysql_v1.x.x

Bbolt

Release +

Version: mysql_v1.x.x

Bbolt

Release Discord Test Security -Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
- - +Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/couchbase/index.html b/storage/mysql_v1.x.x/couchbase/index.html index 20c1a5b2731..140b057fa32 100644 --- a/storage/mysql_v1.x.x/couchbase/index.html +++ b/storage/mysql_v1.x.x/couchbase/index.html @@ -6,17 +6,17 @@ Couchbase | Fiber - - + +
-
Version: mysql_v1.x.x

Couchbase

Release +

Version: mysql_v1.x.x

Couchbase

Release Discord Test Security -Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
- - +Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/dynamodb/index.html b/storage/mysql_v1.x.x/dynamodb/index.html index 0776eecd22e..315cfc6b8de 100644 --- a/storage/mysql_v1.x.x/dynamodb/index.html +++ b/storage/mysql_v1.x.x/dynamodb/index.html @@ -6,17 +6,17 @@ DynamoDB | Fiber - - + +
-
Version: mysql_v1.x.x

DynamoDB

Release +

Version: mysql_v1.x.x

DynamoDB

Release Discord Test Security -Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
- - +Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/etcd/index.html b/storage/mysql_v1.x.x/etcd/index.html index 04e04b9c37f..b6ede7c5995 100644 --- a/storage/mysql_v1.x.x/etcd/index.html +++ b/storage/mysql_v1.x.x/etcd/index.html @@ -6,17 +6,17 @@ Etcd | Fiber - - + +
-
Version: mysql_v1.x.x

Etcd

Release +

Version: mysql_v1.x.x

Etcd

Release Discord Test Security -Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
- - +Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/index.html b/storage/mysql_v1.x.x/index.html index 634bacfe147..f2e3a4bcccb 100644 --- a/storage/mysql_v1.x.x/index.html +++ b/storage/mysql_v1.x.x/index.html @@ -6,13 +6,13 @@ 👋 Welcome | Fiber - - + +
-
Version: mysql_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

- - +
Version: mysql_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/memcache/index.html b/storage/mysql_v1.x.x/memcache/index.html index 98bc0a0e92d..a3bdd01203f 100644 --- a/storage/mysql_v1.x.x/memcache/index.html +++ b/storage/mysql_v1.x.x/memcache/index.html @@ -6,17 +6,17 @@ Memcache | Fiber - - + +
-
Version: mysql_v1.x.x

Memcache

Release +

Version: mysql_v1.x.x

Memcache

Release Discord Test Security -Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
- - +Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/memory/index.html b/storage/mysql_v1.x.x/memory/index.html index 92c4d73fcdd..1ba2871e9ac 100644 --- a/storage/mysql_v1.x.x/memory/index.html +++ b/storage/mysql_v1.x.x/memory/index.html @@ -6,17 +6,17 @@ Memory | Fiber - - + +
-
Version: mysql_v1.x.x

Memory

Release +

Version: mysql_v1.x.x

Memory

Release Discord Test Security -Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
- - +Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/mongodb/index.html b/storage/mysql_v1.x.x/mongodb/index.html index c66ba92c594..30a87522cf4 100644 --- a/storage/mysql_v1.x.x/mongodb/index.html +++ b/storage/mysql_v1.x.x/mongodb/index.html @@ -6,17 +6,17 @@ MongoDB | Fiber - - + +
-
Version: mysql_v1.x.x

MongoDB

Release +

Version: mysql_v1.x.x

MongoDB

Release Discord Test Security -Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
- - +Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/mssql/index.html b/storage/mysql_v1.x.x/mssql/index.html index 6a87c741b3e..27006dd9647 100644 --- a/storage/mysql_v1.x.x/mssql/index.html +++ b/storage/mysql_v1.x.x/mssql/index.html @@ -6,17 +6,17 @@ MSSQL | Fiber - - + +
-
Version: mysql_v1.x.x

MSSQL

Release +

Version: mysql_v1.x.x

MSSQL

Release Discord Test Security -Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
- - +Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/mysql/index.html b/storage/mysql_v1.x.x/mysql/index.html index ae12fdbf464..65abb8495ec 100644 --- a/storage/mysql_v1.x.x/mysql/index.html +++ b/storage/mysql_v1.x.x/mysql/index.html @@ -6,17 +6,17 @@ MySQL | Fiber - - + +
-
Version: mysql_v1.x.x

MySQL

Release +

Version: mysql_v1.x.x

MySQL

Release Discord Test Security -Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/pebble/index.html b/storage/mysql_v1.x.x/pebble/index.html index 51a79175e34..b3743d5f269 100644 --- a/storage/mysql_v1.x.x/pebble/index.html +++ b/storage/mysql_v1.x.x/pebble/index.html @@ -6,17 +6,17 @@ Pebble | Fiber - - + +
-
Version: mysql_v1.x.x

Pebble

Release +

Version: mysql_v1.x.x

Pebble

Release Discord Test Security -Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
- - +Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/postgres/index.html b/storage/mysql_v1.x.x/postgres/index.html index 26e4dd56cea..8c1428dcade 100644 --- a/storage/mysql_v1.x.x/postgres/index.html +++ b/storage/mysql_v1.x.x/postgres/index.html @@ -6,17 +6,17 @@ Postgres | Fiber - - + +
-
Version: mysql_v1.x.x

Postgres

Release +

Version: mysql_v1.x.x

Postgres

Release Discord Test Security -Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/redis/index.html b/storage/mysql_v1.x.x/redis/index.html index cbcb549ef58..6b55536d532 100644 --- a/storage/mysql_v1.x.x/redis/index.html +++ b/storage/mysql_v1.x.x/redis/index.html @@ -6,17 +6,17 @@ Redis | Fiber - - + +
-
Version: mysql_v1.x.x

Redis

Release +

Version: mysql_v1.x.x

Redis

Release Discord Test Security -Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
- - +Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/ristretto/index.html b/storage/mysql_v1.x.x/ristretto/index.html index fd334315b5f..9b23a330d93 100644 --- a/storage/mysql_v1.x.x/ristretto/index.html +++ b/storage/mysql_v1.x.x/ristretto/index.html @@ -6,17 +6,17 @@ Ristretto | Fiber - - + +
-
Version: mysql_v1.x.x

Ristretto

Release +

Version: mysql_v1.x.x

Ristretto

Release Discord Test Security -Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
- - +Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/s3/index.html b/storage/mysql_v1.x.x/s3/index.html index 625da72e955..58a0cc9ae99 100644 --- a/storage/mysql_v1.x.x/s3/index.html +++ b/storage/mysql_v1.x.x/s3/index.html @@ -6,17 +6,17 @@ S3 | Fiber - - + +
-
Version: mysql_v1.x.x

S3

Release +

Version: mysql_v1.x.x

S3

Release Discord Test Security -Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
- - +Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/mysql_v1.x.x/search-index.json b/storage/mysql_v1.x.x/search-index.json index b8f13aa2a46..82c9d85241c 100644 --- a/storage/mysql_v1.x.x/search-index.json +++ b/storage/mysql_v1.x.x/search-index.json @@ -1 +1 @@ -[{"documents":[{"i":3084,"t":"👋 Welcome","u":"/storage/mysql_v1.x.x/","b":[]},{"i":3089,"t":"ArangoDB","u":"/storage/mysql_v1.x.x/arangodb/","b":[]},{"i":3103,"t":"Azure Blob","u":"/storage/mysql_v1.x.x/azureblob/","b":[]},{"i":3117,"t":"Badger","u":"/storage/mysql_v1.x.x/badger/","b":[]},{"i":3131,"t":"Bbolt","u":"/storage/mysql_v1.x.x/bbolt/","b":[]},{"i":3145,"t":"Couchbase","u":"/storage/mysql_v1.x.x/couchbase/","b":[]},{"i":3159,"t":"DynamoDB","u":"/storage/mysql_v1.x.x/dynamodb/","b":[]},{"i":3173,"t":"Etcd","u":"/storage/mysql_v1.x.x/etcd/","b":[]},{"i":3187,"t":"Memcache","u":"/storage/mysql_v1.x.x/memcache/","b":[]},{"i":3201,"t":"Memory","u":"/storage/mysql_v1.x.x/memory/","b":[]},{"i":3215,"t":"MongoDB","u":"/storage/mysql_v1.x.x/mongodb/","b":[]},{"i":3229,"t":"MSSQL","u":"/storage/mysql_v1.x.x/mssql/","b":[]},{"i":3243,"t":"MySQL","u":"/storage/mysql_v1.x.x/mysql/","b":[]},{"i":3257,"t":"Pebble","u":"/storage/mysql_v1.x.x/pebble/","b":[]},{"i":3271,"t":"Postgres","u":"/storage/mysql_v1.x.x/postgres/","b":[]},{"i":3285,"t":"Redis","u":"/storage/mysql_v1.x.x/redis/","b":[]},{"i":3299,"t":"Ristretto","u":"/storage/mysql_v1.x.x/ristretto/","b":[]},{"i":3313,"t":"S3","u":"/storage/mysql_v1.x.x/s3/","b":[]},{"i":3327,"t":"SQLite3","u":"/storage/mysql_v1.x.x/sqlite3/","b":[]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3084",[0,1.946,1,1.946]],["t/3089",[2,2.695]],["t/3103",[3,1.946,4,1.946]],["t/3117",[5,2.695]],["t/3131",[6,2.695]],["t/3145",[7,2.695]],["t/3159",[8,2.695]],["t/3173",[9,2.695]],["t/3187",[10,2.695]],["t/3201",[11,2.695]],["t/3215",[12,2.695]],["t/3229",[13,2.695]],["t/3243",[14,2.695]],["t/3257",[15,2.695]],["t/3271",[16,2.695]],["t/3285",[17,2.695]],["t/3299",[18,2.695]],["t/3313",[19,2.695]],["t/3327",[20,2.695]]],"invertedIndex":[["",{"_index":0,"t":{"3084":{"position":[[0,2]]}}}],["arangodb",{"_index":2,"t":{"3089":{"position":[[0,8]]}}}],["azur",{"_index":3,"t":{"3103":{"position":[[0,5]]}}}],["badger",{"_index":5,"t":{"3117":{"position":[[0,6]]}}}],["bbolt",{"_index":6,"t":{"3131":{"position":[[0,5]]}}}],["blob",{"_index":4,"t":{"3103":{"position":[[6,4]]}}}],["couchbas",{"_index":7,"t":{"3145":{"position":[[0,9]]}}}],["dynamodb",{"_index":8,"t":{"3159":{"position":[[0,8]]}}}],["etcd",{"_index":9,"t":{"3173":{"position":[[0,4]]}}}],["memcach",{"_index":10,"t":{"3187":{"position":[[0,8]]}}}],["memori",{"_index":11,"t":{"3201":{"position":[[0,6]]}}}],["mongodb",{"_index":12,"t":{"3215":{"position":[[0,7]]}}}],["mssql",{"_index":13,"t":{"3229":{"position":[[0,5]]}}}],["mysql",{"_index":14,"t":{"3243":{"position":[[0,5]]}}}],["pebbl",{"_index":15,"t":{"3257":{"position":[[0,6]]}}}],["postgr",{"_index":16,"t":{"3271":{"position":[[0,8]]}}}],["redi",{"_index":17,"t":{"3285":{"position":[[0,5]]}}}],["ristretto",{"_index":18,"t":{"3299":{"position":[[0,9]]}}}],["s3",{"_index":19,"t":{"3313":{"position":[[0,2]]}}}],["sqlite3",{"_index":20,"t":{"3327":{"position":[[0,7]]}}}],["welcom",{"_index":1,"t":{"3084":{"position":[[3,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3085,"t":"📦 Storage","u":"/storage/mysql_v1.x.x/","h":"","p":3084},{"i":3087,"t":"📑 Storage Implementations","u":"/storage/mysql_v1.x.x/","h":"#-storage-implementations","p":3084},{"i":3091,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/arangodb/","h":"#table-of-contents","p":3089},{"i":3093,"t":"Signatures","u":"/storage/mysql_v1.x.x/arangodb/","h":"#signatures","p":3089},{"i":3095,"t":"Installation","u":"/storage/mysql_v1.x.x/arangodb/","h":"#installation","p":3089},{"i":3097,"t":"Examples","u":"/storage/mysql_v1.x.x/arangodb/","h":"#examples","p":3089},{"i":3099,"t":"Config","u":"/storage/mysql_v1.x.x/arangodb/","h":"#config","p":3089},{"i":3101,"t":"Default Config","u":"/storage/mysql_v1.x.x/arangodb/","h":"#default-config","p":3089},{"i":3105,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/azureblob/","h":"#table-of-contents","p":3103},{"i":3107,"t":"Signatures","u":"/storage/mysql_v1.x.x/azureblob/","h":"#signatures","p":3103},{"i":3109,"t":"Installation","u":"/storage/mysql_v1.x.x/azureblob/","h":"#installation","p":3103},{"i":3111,"t":"Examples","u":"/storage/mysql_v1.x.x/azureblob/","h":"#examples","p":3103},{"i":3113,"t":"Config","u":"/storage/mysql_v1.x.x/azureblob/","h":"#config","p":3103},{"i":3115,"t":"Default Config","u":"/storage/mysql_v1.x.x/azureblob/","h":"#default-config","p":3103},{"i":3119,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/badger/","h":"#table-of-contents","p":3117},{"i":3121,"t":"Signatures","u":"/storage/mysql_v1.x.x/badger/","h":"#signatures","p":3117},{"i":3123,"t":"Installation","u":"/storage/mysql_v1.x.x/badger/","h":"#installation","p":3117},{"i":3125,"t":"Examples","u":"/storage/mysql_v1.x.x/badger/","h":"#examples","p":3117},{"i":3127,"t":"Config","u":"/storage/mysql_v1.x.x/badger/","h":"#config","p":3117},{"i":3129,"t":"Default Config","u":"/storage/mysql_v1.x.x/badger/","h":"#default-config","p":3117},{"i":3133,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/bbolt/","h":"#table-of-contents","p":3131},{"i":3135,"t":"Signatures","u":"/storage/mysql_v1.x.x/bbolt/","h":"#signatures","p":3131},{"i":3137,"t":"Installation","u":"/storage/mysql_v1.x.x/bbolt/","h":"#installation","p":3131},{"i":3139,"t":"Examples","u":"/storage/mysql_v1.x.x/bbolt/","h":"#examples","p":3131},{"i":3141,"t":"Config","u":"/storage/mysql_v1.x.x/bbolt/","h":"#config","p":3131},{"i":3143,"t":"Default Config","u":"/storage/mysql_v1.x.x/bbolt/","h":"#default-config","p":3131},{"i":3147,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/couchbase/","h":"#table-of-contents","p":3145},{"i":3149,"t":"Signatures","u":"/storage/mysql_v1.x.x/couchbase/","h":"#signatures","p":3145},{"i":3151,"t":"Installation","u":"/storage/mysql_v1.x.x/couchbase/","h":"#installation","p":3145},{"i":3153,"t":"Examples","u":"/storage/mysql_v1.x.x/couchbase/","h":"#examples","p":3145},{"i":3155,"t":"Config","u":"/storage/mysql_v1.x.x/couchbase/","h":"#config","p":3145},{"i":3157,"t":"Default Config","u":"/storage/mysql_v1.x.x/couchbase/","h":"#default-config","p":3145},{"i":3161,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#table-of-contents","p":3159},{"i":3163,"t":"Signatures","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#signatures","p":3159},{"i":3165,"t":"Installation","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#installation","p":3159},{"i":3167,"t":"Examples","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#examples","p":3159},{"i":3169,"t":"Config","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#config","p":3159},{"i":3171,"t":"Default Config","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#default-config","p":3159},{"i":3175,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/etcd/","h":"#table-of-contents","p":3173},{"i":3177,"t":"Signatures","u":"/storage/mysql_v1.x.x/etcd/","h":"#signatures","p":3173},{"i":3179,"t":"Installation","u":"/storage/mysql_v1.x.x/etcd/","h":"#installation","p":3173},{"i":3181,"t":"Examples","u":"/storage/mysql_v1.x.x/etcd/","h":"#examples","p":3173},{"i":3183,"t":"Config","u":"/storage/mysql_v1.x.x/etcd/","h":"#config","p":3173},{"i":3185,"t":"Default Config","u":"/storage/mysql_v1.x.x/etcd/","h":"#default-config","p":3173},{"i":3189,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/memcache/","h":"#table-of-contents","p":3187},{"i":3191,"t":"Signatures","u":"/storage/mysql_v1.x.x/memcache/","h":"#signatures","p":3187},{"i":3193,"t":"Installation","u":"/storage/mysql_v1.x.x/memcache/","h":"#installation","p":3187},{"i":3195,"t":"Examples","u":"/storage/mysql_v1.x.x/memcache/","h":"#examples","p":3187},{"i":3197,"t":"Config","u":"/storage/mysql_v1.x.x/memcache/","h":"#config","p":3187},{"i":3199,"t":"Default Config","u":"/storage/mysql_v1.x.x/memcache/","h":"#default-config","p":3187},{"i":3203,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/memory/","h":"#table-of-contents","p":3201},{"i":3205,"t":"Signatures","u":"/storage/mysql_v1.x.x/memory/","h":"#signatures","p":3201},{"i":3207,"t":"Installation","u":"/storage/mysql_v1.x.x/memory/","h":"#installation","p":3201},{"i":3209,"t":"Examples","u":"/storage/mysql_v1.x.x/memory/","h":"#examples","p":3201},{"i":3211,"t":"Config","u":"/storage/mysql_v1.x.x/memory/","h":"#config","p":3201},{"i":3213,"t":"Default Config","u":"/storage/mysql_v1.x.x/memory/","h":"#default-config","p":3201},{"i":3217,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/mongodb/","h":"#table-of-contents","p":3215},{"i":3219,"t":"Signatures","u":"/storage/mysql_v1.x.x/mongodb/","h":"#signatures","p":3215},{"i":3221,"t":"Installation","u":"/storage/mysql_v1.x.x/mongodb/","h":"#installation","p":3215},{"i":3223,"t":"Examples","u":"/storage/mysql_v1.x.x/mongodb/","h":"#examples","p":3215},{"i":3225,"t":"Config","u":"/storage/mysql_v1.x.x/mongodb/","h":"#config","p":3215},{"i":3227,"t":"Default Config","u":"/storage/mysql_v1.x.x/mongodb/","h":"#default-config","p":3215},{"i":3231,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/mssql/","h":"#table-of-contents","p":3229},{"i":3233,"t":"Signatures","u":"/storage/mysql_v1.x.x/mssql/","h":"#signatures","p":3229},{"i":3235,"t":"Installation","u":"/storage/mysql_v1.x.x/mssql/","h":"#installation","p":3229},{"i":3237,"t":"Examples","u":"/storage/mysql_v1.x.x/mssql/","h":"#examples","p":3229},{"i":3239,"t":"Config","u":"/storage/mysql_v1.x.x/mssql/","h":"#config","p":3229},{"i":3241,"t":"Default Config","u":"/storage/mysql_v1.x.x/mssql/","h":"#default-config","p":3229},{"i":3245,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/mysql/","h":"#table-of-contents","p":3243},{"i":3247,"t":"Signatures","u":"/storage/mysql_v1.x.x/mysql/","h":"#signatures","p":3243},{"i":3249,"t":"Installation","u":"/storage/mysql_v1.x.x/mysql/","h":"#installation","p":3243},{"i":3251,"t":"Examples","u":"/storage/mysql_v1.x.x/mysql/","h":"#examples","p":3243},{"i":3253,"t":"Config","u":"/storage/mysql_v1.x.x/mysql/","h":"#config","p":3243},{"i":3255,"t":"Default Config","u":"/storage/mysql_v1.x.x/mysql/","h":"#default-config","p":3243},{"i":3259,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/pebble/","h":"#table-of-contents","p":3257},{"i":3261,"t":"Signatures","u":"/storage/mysql_v1.x.x/pebble/","h":"#signatures","p":3257},{"i":3263,"t":"Installation","u":"/storage/mysql_v1.x.x/pebble/","h":"#installation","p":3257},{"i":3265,"t":"Examples","u":"/storage/mysql_v1.x.x/pebble/","h":"#examples","p":3257},{"i":3267,"t":"Config","u":"/storage/mysql_v1.x.x/pebble/","h":"#config","p":3257},{"i":3269,"t":"Default Config","u":"/storage/mysql_v1.x.x/pebble/","h":"#default-config","p":3257},{"i":3273,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/postgres/","h":"#table-of-contents","p":3271},{"i":3275,"t":"Signatures","u":"/storage/mysql_v1.x.x/postgres/","h":"#signatures","p":3271},{"i":3277,"t":"Installation","u":"/storage/mysql_v1.x.x/postgres/","h":"#installation","p":3271},{"i":3279,"t":"Examples","u":"/storage/mysql_v1.x.x/postgres/","h":"#examples","p":3271},{"i":3281,"t":"Config","u":"/storage/mysql_v1.x.x/postgres/","h":"#config","p":3271},{"i":3283,"t":"Default Config","u":"/storage/mysql_v1.x.x/postgres/","h":"#default-config","p":3271},{"i":3287,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/redis/","h":"#table-of-contents","p":3285},{"i":3289,"t":"Signatures","u":"/storage/mysql_v1.x.x/redis/","h":"#signatures","p":3285},{"i":3291,"t":"Installation","u":"/storage/mysql_v1.x.x/redis/","h":"#installation","p":3285},{"i":3293,"t":"Examples","u":"/storage/mysql_v1.x.x/redis/","h":"#examples","p":3285},{"i":3295,"t":"Config","u":"/storage/mysql_v1.x.x/redis/","h":"#config","p":3285},{"i":3297,"t":"Default Config","u":"/storage/mysql_v1.x.x/redis/","h":"#default-config","p":3285},{"i":3301,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/ristretto/","h":"#table-of-contents","p":3299},{"i":3303,"t":"Signatures","u":"/storage/mysql_v1.x.x/ristretto/","h":"#signatures","p":3299},{"i":3305,"t":"Installation","u":"/storage/mysql_v1.x.x/ristretto/","h":"#installation","p":3299},{"i":3307,"t":"Examples","u":"/storage/mysql_v1.x.x/ristretto/","h":"#examples","p":3299},{"i":3309,"t":"Config","u":"/storage/mysql_v1.x.x/ristretto/","h":"#config","p":3299},{"i":3311,"t":"Default Config","u":"/storage/mysql_v1.x.x/ristretto/","h":"#default-config","p":3299},{"i":3315,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/s3/","h":"#table-of-contents","p":3313},{"i":3317,"t":"Signatures","u":"/storage/mysql_v1.x.x/s3/","h":"#signatures","p":3313},{"i":3319,"t":"Installation","u":"/storage/mysql_v1.x.x/s3/","h":"#installation","p":3313},{"i":3321,"t":"Examples","u":"/storage/mysql_v1.x.x/s3/","h":"#examples","p":3313},{"i":3323,"t":"Config","u":"/storage/mysql_v1.x.x/s3/","h":"#config","p":3313},{"i":3325,"t":"Default Config","u":"/storage/mysql_v1.x.x/s3/","h":"#default-config","p":3313},{"i":3329,"t":"Table of Contents","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#table-of-contents","p":3327},{"i":3331,"t":"Signatures","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#signatures","p":3327},{"i":3333,"t":"Installation","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#installation","p":3327},{"i":3335,"t":"Examples","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#examples","p":3327},{"i":3337,"t":"Config","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#config","p":3327},{"i":3339,"t":"Default Config","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#default-config","p":3327}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3085",[0,3.174,1,3.174]],["t/3087",[0,2.534,1,2.534,2,2.875]],["t/3091",[3,1.499,4,1.499]],["t/3093",[5,2.007]],["t/3095",[6,2.007]],["t/3097",[7,2.007]],["t/3099",[8,1.246]],["t/3101",[8,0.931,9,1.499]],["t/3105",[3,1.499,4,1.499]],["t/3107",[5,2.007]],["t/3109",[6,2.007]],["t/3111",[7,2.007]],["t/3113",[8,1.246]],["t/3115",[8,0.931,9,1.499]],["t/3119",[3,1.499,4,1.499]],["t/3121",[5,2.007]],["t/3123",[6,2.007]],["t/3125",[7,2.007]],["t/3127",[8,1.246]],["t/3129",[8,0.931,9,1.499]],["t/3133",[3,1.499,4,1.499]],["t/3135",[5,2.007]],["t/3137",[6,2.007]],["t/3139",[7,2.007]],["t/3141",[8,1.246]],["t/3143",[8,0.931,9,1.499]],["t/3147",[3,1.499,4,1.499]],["t/3149",[5,2.007]],["t/3151",[6,2.007]],["t/3153",[7,2.007]],["t/3155",[8,1.246]],["t/3157",[8,0.931,9,1.499]],["t/3161",[3,1.499,4,1.499]],["t/3163",[5,2.007]],["t/3165",[6,2.007]],["t/3167",[7,2.007]],["t/3169",[8,1.246]],["t/3171",[8,0.931,9,1.499]],["t/3175",[3,1.499,4,1.499]],["t/3177",[5,2.007]],["t/3179",[6,2.007]],["t/3181",[7,2.007]],["t/3183",[8,1.246]],["t/3185",[8,0.931,9,1.499]],["t/3189",[3,1.499,4,1.499]],["t/3191",[5,2.007]],["t/3193",[6,2.007]],["t/3195",[7,2.007]],["t/3197",[8,1.246]],["t/3199",[8,0.931,9,1.499]],["t/3203",[3,1.499,4,1.499]],["t/3205",[5,2.007]],["t/3207",[6,2.007]],["t/3209",[7,2.007]],["t/3211",[8,1.246]],["t/3213",[8,0.931,9,1.499]],["t/3217",[3,1.499,4,1.499]],["t/3219",[5,2.007]],["t/3221",[6,2.007]],["t/3223",[7,2.007]],["t/3225",[8,1.246]],["t/3227",[8,0.931,9,1.499]],["t/3231",[3,1.499,4,1.499]],["t/3233",[5,2.007]],["t/3235",[6,2.007]],["t/3237",[7,2.007]],["t/3239",[8,1.246]],["t/3241",[8,0.931,9,1.499]],["t/3245",[3,1.499,4,1.499]],["t/3247",[5,2.007]],["t/3249",[6,2.007]],["t/3251",[7,2.007]],["t/3253",[8,1.246]],["t/3255",[8,0.931,9,1.499]],["t/3259",[3,1.499,4,1.499]],["t/3261",[5,2.007]],["t/3263",[6,2.007]],["t/3265",[7,2.007]],["t/3267",[8,1.246]],["t/3269",[8,0.931,9,1.499]],["t/3273",[3,1.499,4,1.499]],["t/3275",[5,2.007]],["t/3277",[6,2.007]],["t/3279",[7,2.007]],["t/3281",[8,1.246]],["t/3283",[8,0.931,9,1.499]],["t/3287",[3,1.499,4,1.499]],["t/3289",[5,2.007]],["t/3291",[6,2.007]],["t/3293",[7,2.007]],["t/3295",[8,1.246]],["t/3297",[8,0.931,9,1.499]],["t/3301",[3,1.499,4,1.499]],["t/3303",[5,2.007]],["t/3305",[6,2.007]],["t/3307",[7,2.007]],["t/3309",[8,1.246]],["t/3311",[8,0.931,9,1.499]],["t/3315",[3,1.499,4,1.499]],["t/3317",[5,2.007]],["t/3319",[6,2.007]],["t/3321",[7,2.007]],["t/3323",[8,1.246]],["t/3325",[8,0.931,9,1.499]],["t/3329",[3,1.499,4,1.499]],["t/3331",[5,2.007]],["t/3333",[6,2.007]],["t/3335",[7,2.007]],["t/3337",[8,1.246]],["t/3339",[8,0.931,9,1.499]]],"invertedIndex":[["",{"_index":0,"t":{"3085":{"position":[[0,2]]},"3087":{"position":[[0,2]]}}}],["config",{"_index":8,"t":{"3099":{"position":[[0,6]]},"3101":{"position":[[8,6]]},"3113":{"position":[[0,6]]},"3115":{"position":[[8,6]]},"3127":{"position":[[0,6]]},"3129":{"position":[[8,6]]},"3141":{"position":[[0,6]]},"3143":{"position":[[8,6]]},"3155":{"position":[[0,6]]},"3157":{"position":[[8,6]]},"3169":{"position":[[0,6]]},"3171":{"position":[[8,6]]},"3183":{"position":[[0,6]]},"3185":{"position":[[8,6]]},"3197":{"position":[[0,6]]},"3199":{"position":[[8,6]]},"3211":{"position":[[0,6]]},"3213":{"position":[[8,6]]},"3225":{"position":[[0,6]]},"3227":{"position":[[8,6]]},"3239":{"position":[[0,6]]},"3241":{"position":[[8,6]]},"3253":{"position":[[0,6]]},"3255":{"position":[[8,6]]},"3267":{"position":[[0,6]]},"3269":{"position":[[8,6]]},"3281":{"position":[[0,6]]},"3283":{"position":[[8,6]]},"3295":{"position":[[0,6]]},"3297":{"position":[[8,6]]},"3309":{"position":[[0,6]]},"3311":{"position":[[8,6]]},"3323":{"position":[[0,6]]},"3325":{"position":[[8,6]]},"3337":{"position":[[0,6]]},"3339":{"position":[[8,6]]}}}],["content",{"_index":4,"t":{"3091":{"position":[[9,8]]},"3105":{"position":[[9,8]]},"3119":{"position":[[9,8]]},"3133":{"position":[[9,8]]},"3147":{"position":[[9,8]]},"3161":{"position":[[9,8]]},"3175":{"position":[[9,8]]},"3189":{"position":[[9,8]]},"3203":{"position":[[9,8]]},"3217":{"position":[[9,8]]},"3231":{"position":[[9,8]]},"3245":{"position":[[9,8]]},"3259":{"position":[[9,8]]},"3273":{"position":[[9,8]]},"3287":{"position":[[9,8]]},"3301":{"position":[[9,8]]},"3315":{"position":[[9,8]]},"3329":{"position":[[9,8]]}}}],["default",{"_index":9,"t":{"3101":{"position":[[0,7]]},"3115":{"position":[[0,7]]},"3129":{"position":[[0,7]]},"3143":{"position":[[0,7]]},"3157":{"position":[[0,7]]},"3171":{"position":[[0,7]]},"3185":{"position":[[0,7]]},"3199":{"position":[[0,7]]},"3213":{"position":[[0,7]]},"3227":{"position":[[0,7]]},"3241":{"position":[[0,7]]},"3255":{"position":[[0,7]]},"3269":{"position":[[0,7]]},"3283":{"position":[[0,7]]},"3297":{"position":[[0,7]]},"3311":{"position":[[0,7]]},"3325":{"position":[[0,7]]},"3339":{"position":[[0,7]]}}}],["exampl",{"_index":7,"t":{"3097":{"position":[[0,8]]},"3111":{"position":[[0,8]]},"3125":{"position":[[0,8]]},"3139":{"position":[[0,8]]},"3153":{"position":[[0,8]]},"3167":{"position":[[0,8]]},"3181":{"position":[[0,8]]},"3195":{"position":[[0,8]]},"3209":{"position":[[0,8]]},"3223":{"position":[[0,8]]},"3237":{"position":[[0,8]]},"3251":{"position":[[0,8]]},"3265":{"position":[[0,8]]},"3279":{"position":[[0,8]]},"3293":{"position":[[0,8]]},"3307":{"position":[[0,8]]},"3321":{"position":[[0,8]]},"3335":{"position":[[0,8]]}}}],["implement",{"_index":2,"t":{"3087":{"position":[[11,15]]}}}],["instal",{"_index":6,"t":{"3095":{"position":[[0,12]]},"3109":{"position":[[0,12]]},"3123":{"position":[[0,12]]},"3137":{"position":[[0,12]]},"3151":{"position":[[0,12]]},"3165":{"position":[[0,12]]},"3179":{"position":[[0,12]]},"3193":{"position":[[0,12]]},"3207":{"position":[[0,12]]},"3221":{"position":[[0,12]]},"3235":{"position":[[0,12]]},"3249":{"position":[[0,12]]},"3263":{"position":[[0,12]]},"3277":{"position":[[0,12]]},"3291":{"position":[[0,12]]},"3305":{"position":[[0,12]]},"3319":{"position":[[0,12]]},"3333":{"position":[[0,12]]}}}],["signatur",{"_index":5,"t":{"3093":{"position":[[0,10]]},"3107":{"position":[[0,10]]},"3121":{"position":[[0,10]]},"3135":{"position":[[0,10]]},"3149":{"position":[[0,10]]},"3163":{"position":[[0,10]]},"3177":{"position":[[0,10]]},"3191":{"position":[[0,10]]},"3205":{"position":[[0,10]]},"3219":{"position":[[0,10]]},"3233":{"position":[[0,10]]},"3247":{"position":[[0,10]]},"3261":{"position":[[0,10]]},"3275":{"position":[[0,10]]},"3289":{"position":[[0,10]]},"3303":{"position":[[0,10]]},"3317":{"position":[[0,10]]},"3331":{"position":[[0,10]]}}}],["storag",{"_index":1,"t":{"3085":{"position":[[3,7]]},"3087":{"position":[[3,7]]}}}],["tabl",{"_index":3,"t":{"3091":{"position":[[0,5]]},"3105":{"position":[[0,5]]},"3119":{"position":[[0,5]]},"3133":{"position":[[0,5]]},"3147":{"position":[[0,5]]},"3161":{"position":[[0,5]]},"3175":{"position":[[0,5]]},"3189":{"position":[[0,5]]},"3203":{"position":[[0,5]]},"3217":{"position":[[0,5]]},"3231":{"position":[[0,5]]},"3245":{"position":[[0,5]]},"3259":{"position":[[0,5]]},"3273":{"position":[[0,5]]},"3287":{"position":[[0,5]]},"3301":{"position":[[0,5]]},"3315":{"position":[[0,5]]},"3329":{"position":[[0,5]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3086,"t":"Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares. // Storage interface for communicating with different database/key-value // providers. Visit https://github.com/gofiber/storage for more info. type Storage interface { // Get gets the value for the given key. // `nil, nil` is returned when the key does not exist Get(key string) ([]byte, error) // Set stores the given value for the given key along // with an expiration value, 0 means no expiration. // Empty key or value will be ignored without an error. Set(key string, val []byte, exp time.Duration) error // Delete deletes the value for the given key. // It returns no error if the storage does not contain the key, Delete(key string) error // Reset resets the storage and delete all keys. Reset() error // Close closes the storage and will stop any running garbage // collectors and open connections. Close() error }","s":"📦 Storage","u":"/storage/mysql_v1.x.x/","h":"","p":3084},{"i":3088,"t":"ArangoDB AzureBlob Badger Bbolt Couchbase DynamoDB Etcd Memcache Memory MongoDB MSSQL MySQL Pebble Postgres Redis S3 SQLite3","s":"📑 Storage Implementations","u":"/storage/mysql_v1.x.x/","h":"#-storage-implementations","p":3084},{"i":3090,"t":"A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.","s":"ArangoDB","u":"/storage/mysql_v1.x.x/arangodb/","h":"","p":3089},{"i":3092,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/arangodb/","h":"#table-of-contents","p":3089},{"i":3094,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() driver.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/arangodb/","h":"#signatures","p":3089},{"i":3096,"t":"ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/mysql_v1.x.x/arangodb/","h":"#installation","p":3089},{"i":3098,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/arangodb/","h":"#examples","p":3089},{"i":3100,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/arangodb/","h":"#config","p":3089},{"i":3102,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/arangodb/","h":"#default-config","p":3089},{"i":3104,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/mysql_v1.x.x/azureblob/","h":"","p":3103},{"i":3106,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/azureblob/","h":"#table-of-contents","p":3103},{"i":3108,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/azureblob/","h":"#signatures","p":3103},{"i":3110,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/mysql_v1.x.x/azureblob/","h":"#installation","p":3103},{"i":3112,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/mysql_v1.x.x/azureblob/","h":"#examples","p":3103},{"i":3114,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/mysql_v1.x.x/azureblob/","h":"#config","p":3103},{"i":3116,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/mysql_v1.x.x/azureblob/","h":"#default-config","p":3103},{"i":3118,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/mysql_v1.x.x/badger/","h":"","p":3117},{"i":3120,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/badger/","h":"#table-of-contents","p":3117},{"i":3122,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/badger/","h":"#signatures","p":3117},{"i":3124,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/mysql_v1.x.x/badger/","h":"#installation","p":3117},{"i":3126,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/badger/","h":"#examples","p":3117},{"i":3128,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/mysql_v1.x.x/badger/","h":"#config","p":3117},{"i":3130,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/mysql_v1.x.x/badger/","h":"#default-config","p":3117},{"i":3132,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/mysql_v1.x.x/bbolt/","h":"","p":3131},{"i":3134,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/bbolt/","h":"#table-of-contents","p":3131},{"i":3136,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/bbolt/","h":"#signatures","p":3131},{"i":3138,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/mysql_v1.x.x/bbolt/","h":"#installation","p":3131},{"i":3140,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/mysql_v1.x.x/bbolt/","h":"#examples","p":3131},{"i":3142,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/mysql_v1.x.x/bbolt/","h":"#config","p":3131},{"i":3144,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/mysql_v1.x.x/bbolt/","h":"#default-config","p":3131},{"i":3146,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/mysql_v1.x.x/couchbase/","h":"","p":3145},{"i":3148,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/couchbase/","h":"#table-of-contents","p":3145},{"i":3150,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/mysql_v1.x.x/couchbase/","h":"#signatures","p":3145},{"i":3152,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/mysql_v1.x.x/couchbase/","h":"#installation","p":3145},{"i":3154,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/couchbase/","h":"#examples","p":3145},{"i":3156,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/couchbase/","h":"#config","p":3145},{"i":3158,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/couchbase/","h":"#default-config","p":3145},{"i":3160,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/mysql_v1.x.x/dynamodb/","h":"","p":3159},{"i":3162,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#table-of-contents","p":3159},{"i":3164,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#signatures","p":3159},{"i":3166,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#installation","p":3159},{"i":3168,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#examples","p":3159},{"i":3170,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#config","p":3159},{"i":3172,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#default-config","p":3159},{"i":3174,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/mysql_v1.x.x/etcd/","h":"","p":3173},{"i":3176,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/etcd/","h":"#table-of-contents","p":3173},{"i":3178,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/etcd/","h":"#signatures","p":3173},{"i":3180,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/mysql_v1.x.x/etcd/","h":"#installation","p":3173},{"i":3182,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/mysql_v1.x.x/etcd/","h":"#examples","p":3173},{"i":3184,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/mysql_v1.x.x/etcd/","h":"#config","p":3173},{"i":3186,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/mysql_v1.x.x/etcd/","h":"#default-config","p":3173},{"i":3188,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/mysql_v1.x.x/memcache/","h":"","p":3187},{"i":3190,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/memcache/","h":"#table-of-contents","p":3187},{"i":3192,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/memcache/","h":"#signatures","p":3187},{"i":3194,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/mysql_v1.x.x/memcache/","h":"#installation","p":3187},{"i":3196,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/mysql_v1.x.x/memcache/","h":"#examples","p":3187},{"i":3198,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/mysql_v1.x.x/memcache/","h":"#config","p":3187},{"i":3200,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/mysql_v1.x.x/memcache/","h":"#default-config","p":3187},{"i":3202,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/mysql_v1.x.x/memory/","h":"","p":3201},{"i":3204,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/memory/","h":"#table-of-contents","p":3201},{"i":3206,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/mysql_v1.x.x/memory/","h":"#signatures","p":3201},{"i":3208,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/mysql_v1.x.x/memory/","h":"#installation","p":3201},{"i":3210,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/memory/","h":"#examples","p":3201},{"i":3212,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/memory/","h":"#config","p":3201},{"i":3214,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/memory/","h":"#default-config","p":3201},{"i":3216,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/mysql_v1.x.x/mongodb/","h":"","p":3215},{"i":3218,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/mongodb/","h":"#table-of-contents","p":3215},{"i":3220,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/mysql_v1.x.x/mongodb/","h":"#signatures","p":3215},{"i":3222,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/mysql_v1.x.x/mongodb/","h":"#installation","p":3215},{"i":3224,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/mysql_v1.x.x/mongodb/","h":"#examples","p":3215},{"i":3226,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/mysql_v1.x.x/mongodb/","h":"#config","p":3215},{"i":3228,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/mysql_v1.x.x/mongodb/","h":"#default-config","p":3215},{"i":3230,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/mysql_v1.x.x/mssql/","h":"","p":3229},{"i":3232,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/mssql/","h":"#table-of-contents","p":3229},{"i":3234,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/mssql/","h":"#signatures","p":3229},{"i":3236,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/mysql_v1.x.x/mssql/","h":"#installation","p":3229},{"i":3238,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/mssql/","h":"#examples","p":3229},{"i":3240,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/mysql_v1.x.x/mssql/","h":"#config","p":3229},{"i":3242,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/mysql_v1.x.x/mssql/","h":"#default-config","p":3229},{"i":3244,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/mysql_v1.x.x/mysql/","h":"","p":3243},{"i":3246,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/mysql/","h":"#table-of-contents","p":3243},{"i":3248,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/mysql/","h":"#signatures","p":3243},{"i":3250,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/mysql_v1.x.x/mysql/","h":"#installation","p":3243},{"i":3252,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/mysql/","h":"#examples","p":3243},{"i":3254,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/mysql/","h":"#config","p":3243},{"i":3256,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/mysql/","h":"#default-config","p":3243},{"i":3258,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/mysql_v1.x.x/pebble/","h":"","p":3257},{"i":3260,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/pebble/","h":"#table-of-contents","p":3257},{"i":3262,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/pebble/","h":"#signatures","p":3257},{"i":3264,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/mysql_v1.x.x/pebble/","h":"#installation","p":3257},{"i":3266,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/mysql_v1.x.x/pebble/","h":"#examples","p":3257},{"i":3268,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/mysql_v1.x.x/pebble/","h":"#config","p":3257},{"i":3270,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/mysql_v1.x.x/pebble/","h":"#default-config","p":3257},{"i":3272,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/mysql_v1.x.x/postgres/","h":"","p":3271},{"i":3274,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/postgres/","h":"#table-of-contents","p":3271},{"i":3276,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/mysql_v1.x.x/postgres/","h":"#signatures","p":3271},{"i":3278,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/mysql_v1.x.x/postgres/","h":"#installation","p":3271},{"i":3280,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/postgres/","h":"#examples","p":3271},{"i":3282,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/postgres/","h":"#config","p":3271},{"i":3284,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/postgres/","h":"#default-config","p":3271},{"i":3286,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/mysql_v1.x.x/redis/","h":"","p":3285},{"i":3288,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/redis/","h":"#table-of-contents","p":3285},{"i":3290,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/mysql_v1.x.x/redis/","h":"#signatures","p":3285},{"i":3292,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/mysql_v1.x.x/redis/","h":"#installation","p":3285},{"i":3294,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/mysql_v1.x.x/redis/","h":"#examples","p":3285},{"i":3296,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/mysql_v1.x.x/redis/","h":"#config","p":3285},{"i":3298,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/mysql_v1.x.x/redis/","h":"#default-config","p":3285},{"i":3300,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/mysql_v1.x.x/ristretto/","h":"","p":3299},{"i":3302,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/ristretto/","h":"#table-of-contents","p":3299},{"i":3304,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/mysql_v1.x.x/ristretto/","h":"#signatures","p":3299},{"i":3306,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/mysql_v1.x.x/ristretto/","h":"#installation","p":3299},{"i":3308,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/mysql_v1.x.x/ristretto/","h":"#examples","p":3299},{"i":3310,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/mysql_v1.x.x/ristretto/","h":"#config","p":3299},{"i":3312,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/mysql_v1.x.x/ristretto/","h":"#default-config","p":3299},{"i":3314,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/mysql_v1.x.x/s3/","h":"","p":3313},{"i":3316,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/s3/","h":"#table-of-contents","p":3313},{"i":3318,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/s3/","h":"#signatures","p":3313},{"i":3320,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/mysql_v1.x.x/s3/","h":"#installation","p":3313},{"i":3322,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/mysql_v1.x.x/s3/","h":"#examples","p":3313},{"i":3324,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/mysql_v1.x.x/s3/","h":"#config","p":3313},{"i":3326,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/mysql_v1.x.x/s3/","h":"#default-config","p":3313},{"i":3328,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/mysql_v1.x.x/sqlite3/","h":"","p":3327},{"i":3330,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#table-of-contents","p":3327},{"i":3332,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#signatures","p":3327},{"i":3334,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#installation","p":3327},{"i":3336,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#examples","p":3327},{"i":3338,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#config","p":3327},{"i":3340,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#default-config","p":3327}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3086",[0,2.408,1,1.183,2,1.08,3,1.021,4,4.843,5,2.408,6,0.588,7,2.408,8,1.112,9,2.408,10,1.49,11,2.408,12,2.408,13,2.408,14,3.958,15,2.131,16,2.408,17,2.408,18,2.408,19,2.408,20,1.021,21,2.408,22,4.489,23,2.813,24,2.177,25,3.13,26,1.145,27,1.021,28,1.287,29,1.64,30,2.813,31,1.705,32,0.994,33,2.408,34,2.36,35,1.41,36,2.408,37,2.408,38,2.408,39,2.408,40,1.021,41,1.021,42,1.021,43,0.762,44,2.957,45,1.705,46,1.021,47,0.937,48,2.054,49,2.408,50,2.131,51,2.408,52,2.408,53,1.95,54,1.262]],["t/3088",[55,4.571,56,5.645,57,4.571,58,4.252,59,3.998,60,3.998,61,4.252,62,4.997,63,3.998,64,4.571,65,4.571,66,3.998,67,4.997,68,4.252,69,3.998,70,3.998,71,4.571]],["t/3090",[1,1.131,2,3.761,6,1.589,55,5.272,72,7.823]],["t/3092",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3094",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,82,4.122]],["t/3096",[3,2.17,55,4.143,66,3.623,74,1.45,83,2.112,84,2.112,85,2.23,86,5.116,87,2.733,88,2.23,89,2.17,90,2.23,91,2.17,92,2.17,93,1.45,94,2.17,95,2.23,96,2.23,97,2.23,98,2.23,99,2.23,100,4.529]],["t/3098",[1,1.032,6,1.04,8,1.967,10,1.493,32,2.452,47,0.824,76,0.458,77,0.824,93,1.683,100,3.771,101,2.589,102,1.857,103,1.857,104,1.91,105,1.807,106,4.26,107,1.857,108,4.26,109,1.759,110,3.45,111,1.91,112,3.45,113,1.444,114,2.721,115,1.628,116,1.234,117,1.714,118,1.589,119,1.514]],["t/3100",[8,1.194,10,1.657,20,1.097,23,1.69,26,1.947,28,1.672,34,1.58,43,0.819,44,1.58,47,0.792,76,0.199,77,1.406,109,2.097,110,2.095,111,1.836,112,2.095,113,1.388,114,3.244,115,0.989,116,0.749,117,1.041,118,0.965,119,0.919,120,1.128,121,2.416,122,2.074,123,3.355,124,1.735,125,1.457,126,2.305,127,2.074,128,2.074,129,1.311,130,1.311,131,1.404,132,1.58]],["t/3102",[6,1.283,8,2.427,10,1.41,47,1.017,76,0.405,109,2.171,110,4.256,111,2.357,112,4.256,113,1.782,114,3.357,115,2.009,116,1.523,117,2.114,118,1.96,119,1.868,123,2.427,133,3.96,134,2.292,135,2.292]],["t/3104",[1,1.268,87,2.117,136,5.15,137,5.15,138,5.817,139,5.15,140,5.817,141,5.817,142,4.382,143,5.817,144,5.817,145,4.12,146,5.817,147,5.817]],["t/3106",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3108",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,148,4.122]],["t/3110",[1,0.854,2,2.206,3,2.086,74,1.394,83,2.031,84,2.031,85,2.144,87,2.68,88,2.144,89,2.086,90,2.144,91,2.086,92,2.086,93,1.394,94,2.086,95,2.144,96,2.144,97,2.144,98,2.144,99,2.144,136,5.798,137,5.798,149,4.354]],["t/3112",[1,1.056,6,1.076,10,1.509,23,1.82,32,2.511,45,3.122,76,0.469,77,0.853,83,2.874,93,1.723,101,2.651,102,1.922,103,1.922,104,1.977,105,1.869,107,1.922,149,3.902,150,4.407,151,4.407,152,4.924,153,3.561,154,4.407]],["t/3114",[1,0.782,10,1.555,20,1.24,23,2.268,26,2.142,28,1.459,35,1.712,43,0.925,45,3.891,47,0.871,76,0.225,77,1.289,116,0.847,120,1.275,121,2.142,123,3.077,125,1.646,129,1.481,130,1.481,131,1.587,152,3.647,153,3.614,155,2.637,156,2.923,157,3.647,158,2.876,159,2.202,160,1.867,161,3.647,162,3.647,163,2.367,164,2.367,165,1.867,166,1.867,167,2.367,168,2.367,169,2.367,170,2.367,171,1.785,172,1.961]],["t/3116",[10,1.583,35,3.306,45,3.998,47,1.092,76,0.435,116,1.635,134,2.461,135,2.461,152,4.571,155,3.306,159,4.252,171,3.447,172,3.786]],["t/3118",[6,1.616,14,4.044,23,2.735,122,3.356,173,5.363,174,5.864,175,6.623]],["t/3120",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3122",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3124",[3,2.199,57,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,177,4.59]],["t/3126",[1,1.082,6,1.114,10,1.525,32,2.572,47,0.883,76,0.48,77,0.883,93,1.765,101,2.716,102,1.99,103,1.99,104,2.047,105,1.936,107,1.99,113,1.548,116,1.322,117,1.836,118,1.703,119,1.622,177,4.042,178,4.565,179,4.565,180,3.697]],["t/3128",[6,1.086,10,1.63,20,1.221,23,1.838,24,1.621,26,2.117,28,0.765,31,2.039,34,1.758,43,0.911,44,1.758,47,0.861,57,3.604,76,0.222,77,1.411,113,1.509,116,1.289,117,1.158,118,1.074,119,1.023,120,1.255,121,1.37,123,3.368,129,1.459,130,2.255,131,1.563,132,1.758,180,2.332,181,1.291,182,3.94,183,2.879,184,2.879,185,2.879,186,5.419,187,2.879,188,3.94,189,2.039]],["t/3130",[10,1.439,24,3.088,47,1.061,76,0.423,113,1.858,116,2.037,117,2.205,118,2.045,119,1.948,134,2.39,135,2.39,180,4.44,182,4.854,186,4.854,188,4.854,190,5.483]],["t/3132",[1,0.803,2,2.072,6,1.128,15,4.091,32,1.908,58,3.481,61,3.481,66,3.273,68,3.481,87,1.682,113,2.129,126,2.602,145,3.273,173,3.742,191,4.621,192,4.621,193,4.621,194,4.621,195,4.621,196,4.621,197,4.621,198,4.621,199,7.134,200,4.621,201,4.621,202,4.621,203,3.742,204,4.621,205,4.621]],["t/3134",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3136",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,206,4.122]],["t/3138",[3,2.199,58,3.906,70,3.673,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,207,4.59]],["t/3140",[1,1.1,6,1.141,10,1.49,32,2.615,47,0.905,76,0.488,77,0.905,93,1.795,101,2.761,102,2.039,103,2.039,104,2.098,105,1.984,107,2.039,113,1.585,116,1.355,207,4.141,208,4.677,209,4.677,210,4.677,211,3.566]],["t/3142",[1,0.516,10,1.629,20,1.259,23,1.226,26,2.168,28,1.211,43,0.94,47,0.881,53,2.404,58,2.237,76,0.428,77,1.298,113,1.88,115,1.135,116,1.32,119,1.055,120,1.294,121,1.412,123,3.098,129,1.504,130,2.309,131,1.611,158,2.911,189,2.103,211,3.123,212,2.237,213,2.628,214,2.628,215,2.969,216,2.969,217,2.628,218,2.969,219,2.628,220,2.969,221,2.969,222,2.628,223,2.628,224,2.404,225,2.628]],["t/3144",[10,1.501,47,1.031,76,0.532,77,1.031,113,1.807,115,2.037,116,2,119,1.894,134,2.324,135,3.01,158,3.404,211,3.001,213,4.718,222,4.718,225,4.718]],["t/3146",[1,1.192,2,3.077,6,1.674,59,4.86,226,6.861]],["t/3148",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3150",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,227,4.122]],["t/3152",[3,2.199,59,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,228,4.59]],["t/3154",[1,1.174,6,1.017,10,1.522,32,2.415,35,2.44,59,2.952,76,0.451,77,0.806,93,1.657,101,2.549,102,1.817,103,1.817,104,1.869,105,1.768,107,1.817,109,1.721,119,2.078,127,2.112,128,2.112,171,2.544,211,2.347,228,3.689,229,4.167,230,4.167,231,3.689,232,3.374,233,3.374,234,2.661]],["t/3156",[10,1.52,20,1.626,28,1.985,43,1.744,54,3.916,59,5.293,76,0.296,109,1.583,120,1.671,121,1.823,127,2.792,128,2.792,158,3.519,211,3.103,232,3.104,233,3.104,235,5.51,236,6.616,237,3.833,238,3.393]],["t/3158",[10,1.529,76,0.514,77,0.976,109,2.085,115,1.93,119,2.368,127,2.558,128,2.558,134,2.201,135,2.905,171,3.082,211,2.843,231,4.469,232,4.088,233,4.088,234,3.224,239,5.048,240,5.048]],["t/3160",[1,0.803,2,2.072,6,1.741,10,0.856,22,5.085,60,3.273,76,0.55,87,1.682,133,4.731,142,3.481,153,4.688,241,4.091,242,4.091,243,4.091,244,3.742,245,3.742,246,4.091,247,4.091,248,3.742,249,4.091,250,4.091,251,4.091]],["t/3162",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3164",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,252,4.122]],["t/3166",[3,2.199,60,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,253,4.59]],["t/3168",[1,1.244,6,1.378,10,1.458,32,2.331,60,3.998,93,1.6,101,3.123,102,2.461,103,2.461,104,2.531,105,2.394,253,4.997,254,5.645]],["t/3170",[6,0.491,10,1.55,14,2.039,20,0.854,23,1.13,25,1.63,26,2.036,28,1.022,30,0.831,31,1.425,45,1.425,47,0.389,50,0.993,60,3.528,75,0.831,76,0.155,77,1.069,83,0.463,84,0.463,91,0.476,92,0.476,105,1.974,107,0.489,115,0.429,116,0.583,120,0.877,121,0.533,123,2.433,125,0.631,129,0.568,130,1.02,131,0.609,132,0.685,145,1.425,153,2.252,155,1.179,157,0.908,158,0.716,160,0.716,161,1.63,162,1.63,163,0.908,164,0.908,165,0.716,166,0.716,167,0.908,168,0.908,169,0.908,170,0.908,171,0.685,172,0.752,181,2.83,203,0.908,211,0.631,217,0.993,223,1.782,244,1.63,245,1.63,255,1.516,256,2.012,257,1.121,258,1.121,259,1.121,260,1.121,261,1.121,262,1.121,263,1.121,264,1.121,265,1.121,266,1.121,267,1.121,268,2.738,269,2.012,270,1.121,271,1.121,272,3.846,273,1.121,274,2.424,275,3.339,276,3.846,277,1.782,278,2.012,279,2.012,280,2.012,281,2.012,282,2.012,283,2.012,284,2.012,285,2.012,286,2.012,287,3.339,288,3.339,289,2.012,290,2.012,291,2.012,292,2.012,293,2.012,294,2.012,295,2.012,296,1.782,297,0.993,298,2.424,299,1.782,300,1.121,301,1.121,302,2.012,303,1.782,304,1.121,305,0.845,306,1.121,307,1.121,308,1.121,309,1.121,310,0.993,311,1.121,312,1.121,313,1.121,314,0.993,315,0.993]],["t/3172",[10,1.303,47,1.061,76,0.423,115,2.096,116,1.588,134,2.39,135,2.39,153,4.118,171,3.348,172,3.678,181,2.459,274,4.854,277,6.225,297,4.854,298,4.854,316,5.483]],["t/3174",[1,1.171,2,3.023,6,1.645,61,6.017,317,6.74]],["t/3176",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3178",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,318,4.122]],["t/3180",[3,2.199,61,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,319,4.59]],["t/3182",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,155,2.88,319,4.354,320,4.918,321,4.918,322,4.354]],["t/3184",[10,1.532,20,1.807,28,1.816,43,1.348,54,2.232,76,0.328,120,1.857,127,3.464,128,3.464,153,2.495,155,3.478,158,2.721,305,3.209,323,3.45,324,3.017,325,5.257,326,4.26,327,4.26,328,4.206,329,4.474,330,4.26,331,4.26,332,3.45]],["t/3186",[10,1.583,24,3.179,76,0.435,84,2.331,119,2.006,127,2.86,128,2.86,134,2.461,135,2.461,155,3.306,322,4.997,325,4.997,329,4.252]],["t/3188",[1,1.192,2,3.077,6,1.674,62,6.074,333,6.861]],["t/3190",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3192",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,334,4.122]],["t/3194",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3196",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,126,2.77,336,4.918,337,4.918,338,4.918,339,4.918]],["t/3198",[10,1.622,20,1.891,23,1.841,26,2.916,28,1.185,47,1.186,76,0.344,77,1.186,116,1.292,120,1.944,123,2.83,126,3.451,129,2.259,130,2.259,181,2,323,3.611,340,4.459,341,4.459,342,4.459,343,4.459,344,3.947]],["t/3200",[10,1.465,76,0.511,126,3.73,134,2.888,135,2.888,344,5.864]],["t/3202",[1,1.236,2,3.192,63,5.041]],["t/3204",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3206",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,345,4.122]],["t/3208",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3210",[1,1.119,6,1.17,10,1.547,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,117,1.929,118,1.788,119,1.704,335,3.883,346,4.795,347,4.795]],["t/3212",[10,1.606,20,2.326,23,2.264,34,3.348,43,1.735,44,3.348,76,0.423,77,1.061,117,2.205,118,2.045,119,1.948,120,2.39,131,2.976,132,3.348]],["t/3214",[10,1.543,76,0.494,117,2.575,118,2.387,119,2.274,134,2.791,135,2.791]],["t/3216",[1,1.151,2,3.545,6,1.616,64,5.363,87,2.411,348,6.623]],["t/3218",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3220",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,349,4.122]],["t/3222",[3,2.199,64,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,350,4.59]],["t/3224",[1,0.924,6,1.298,8,2.455,10,1.5,28,0.97,32,2.591,47,1.029,54,1.912,76,0.484,77,0.706,93,1.778,101,2.319,102,1.591,103,1.591,104,1.637,105,1.548,107,2.319,109,1.507,111,1.637,113,1.803,114,3.397,115,2.033,116,1.541,350,3.231,351,3.65,352,5.318,353,1.791,354,2.955,355,1.981,356,3.65]],["t/3226",[6,0.994,8,1.186,10,1.656,14,1.569,20,1.09,23,1.061,26,1.937,28,1.857,47,0.788,54,1.346,76,0.198,77,1.402,109,2.088,111,1.826,113,1.38,114,2.6,115,0.982,116,0.744,120,1.12,121,2.406,122,2.562,123,3.347,124,1.724,125,1.447,126,2.293,127,2.063,128,2.063,129,1.302,130,1.302,160,1.641,181,1.152,328,1.82,353,1.261,354,2.081,355,1.395]],["t/3228",[8,2.606,10,1.458,47,1.092,76,0.435,109,2.331,111,2.531,113,1.913,114,3.605,115,2.158,116,1.635,134,2.461,135,2.461,353,2.77,354,4.571,355,3.063]],["t/3230",[1,1.171,2,3.023,6,1.645,65,5.458,357,6.74,358,6.74]],["t/3232",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3234",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3236",[3,2.199,65,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,360,4.59]],["t/3238",[1,0.887,6,1.246,8,1.594,10,1.534,28,0.917,32,2.509,47,0.988,54,1.809,76,0.468,77,0.668,93,1.722,101,2.226,102,1.505,103,1.505,104,1.548,105,1.464,107,2.226,109,1.425,111,1.548,113,1.17,115,1.32,116,1.479,117,2.054,118,1.904,119,1.814,181,1.548,353,1.694,355,1.873,360,3.056,361,3.452,362,5.105,363,2.795,364,2.445,365,2.445,366,3.452]],["t/3240",[1,0.35,6,0.815,8,0.93,10,1.66,14,1.23,20,0.854,23,1.38,26,1.59,28,1.821,34,1.23,43,0.637,44,1.23,47,0.646,54,1.751,76,0.33,77,1.403,109,1.768,111,1.498,113,1.133,115,0.77,116,0.583,117,0.81,118,0.751,119,0.716,120,0.878,121,2.371,122,2.17,123,3.348,124,1.351,125,1.134,126,1.882,127,1.693,128,1.693,129,1.021,130,1.021,131,1.093,132,1.23,160,1.286,181,1.92,189,1.427,224,1.631,248,2.706,328,1.427,353,0.988,355,1.093,363,1.631,364,1.427,365,1.427,367,1.783]],["t/3242",[8,2.394,10,1.486,47,1.003,76,0.4,109,2.141,111,2.325,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,1.842,134,2.261,135,2.261,181,2.325,353,2.544,355,2.814,363,4.199,364,3.673,365,3.673]],["t/3244",[1,1.131,2,2.92,6,1.589,66,4.611,87,2.369,368,6.51,369,5.764,370,6.51]],["t/3246",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3248",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3250",[3,2.199,66,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,371,4.59]],["t/3252",[1,0.769,6,1.322,8,1.319,10,1.563,28,0.759,32,2.518,47,1.047,54,2.319,76,0.47,77,0.553,93,1.728,101,1.929,102,1.246,103,1.246,104,1.282,105,1.212,107,2.361,109,1.18,111,1.282,113,0.969,115,1.092,116,1.569,117,2.178,118,2.019,119,1.924,122,3.09,181,1.282,353,1.402,355,1.551,369,2.53,371,2.53,372,2.858,373,5.415,374,2.314,375,4.425,376,2.858,377,2.858]],["t/3254",[6,1.094,8,0.993,10,1.653,14,2.153,20,0.912,23,1.456,24,1.211,26,1.678,28,1.726,34,1.313,43,0.681,44,1.313,47,0.682,54,1.127,76,0.166,77,1.398,109,1.851,111,1.581,113,1.195,115,0.822,116,0.623,117,0.865,118,0.802,119,0.764,120,0.937,121,2.133,122,2.901,123,3.337,124,1.442,125,1.211,126,1.986,127,1.787,128,1.787,129,1.09,130,1.09,131,1.167,132,1.313,160,2.252,181,2.01,328,2.498,353,1.055,355,1.914,359,1.62,374,1.741]],["t/3256",[8,2.461,10,1.501,47,1.031,76,0.411,109,2.201,111,2.39,113,1.807,115,2.037,116,1.544,117,2.144,118,1.988,119,1.894,134,2.324,135,2.324,181,2.39,353,2.615,355,2.893,374,4.316]],["t/3258",[6,1.645,14,4.115,23,2.783,122,3.415,173,5.458,378,6.74]],["t/3260",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3262",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3264",[3,2.034,26,2.281,67,5.7,74,1.359,83,1.98,84,1.98,85,2.09,87,2.646,88,2.09,89,2.034,90,2.807,91,2.034,92,2.034,93,1.359,94,2.034,95,2.09,96,2.09,97,2.09,98,2.09,99,2.09,142,3.612,145,3.396,203,3.883,379,4.795,380,4.245]],["t/3266",[1,1.119,6,1.17,10,1.503,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,122,2.43,212,3.612,380,4.245,381,4.795,382,4.795,383,3.883,384,3.883]],["t/3268",[10,1.607,20,2.034,24,2.7,28,1.274,76,0.37,77,1.245,113,1.625,120,2.09,121,2.281,122,2.43,123,3.356,212,3.612,238,4.245,310,5.7,383,3.883,384,3.883,385,4.795,386,4.795]],["t/3270",[10,1.435,76,0.494,122,3.244,134,2.791,135,2.791,212,4.823,383,5.184,384,5.184]],["t/3272",[1,1.192,2,3.077,6,1.674,68,5.169,387,6.861]],["t/3274",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3276",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,388,3.649]],["t/3278",[3,2.199,68,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,389,4.59]],["t/3280",[1,1.065,6,1.088,10,1.514,32,2.531,47,0.862,76,0.473,77,0.862,93,1.737,101,2.672,102,1.944,103,1.944,104,2,105,1.891,107,1.944,115,1.705,116,1.292,117,1.794,118,1.663,119,1.584,122,2.259,181,2,389,3.947,390,4.459,391,4.459,392,4.459]],["t/3282",[1,0.339,6,0.795,8,0.901,10,1.65,14,1.192,20,0.828,23,1.345,24,1.099,26,1.549,28,1.733,34,1.192,43,0.618,44,1.192,47,0.63,54,2.561,76,0.323,77,1.388,109,1.729,111,1.46,113,1.104,115,0.746,116,0.566,117,0.785,118,0.728,119,0.694,120,0.851,121,1.992,122,2.753,123,3.313,124,1.31,125,1.099,126,1.834,127,1.65,128,1.65,129,0.989,130,0.989,131,1.06,132,1.192,133,1.471,139,1.728,160,2.08,181,1.878,189,1.383,224,1.581,328,1.383,353,0.958,355,1.06,364,1.383,365,1.383,367,1.728,388,2.883,393,1.952,394,1.728]],["t/3284",[8,2.271,10,1.515,47,0.951,76,0.505,77,0.951,109,2.031,111,2.206,113,1.667,115,1.88,116,1.425,117,1.978,118,1.834,119,1.747,134,2.144,135,2.855,181,2.206,353,2.413,355,2.669,364,3.483,365,3.483,394,4.354]],["t/3286",[1,1.171,2,3.023,6,1.645,69,4.774,87,2.453,395,6.74]],["t/3288",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3290",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,396,4.122]],["t/3292",[3,2.199,69,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,397,4.59]],["t/3294",[1,0.627,6,0.54,10,1.605,24,2.033,25,1.792,32,2.575,35,1.296,47,0.884,69,3.737,76,0.278,77,0.428,89,0.938,93,1.495,94,0.938,101,1.574,102,0.965,103,0.965,105,1.94,107,0.965,109,0.914,111,0.992,113,0.75,116,1.325,118,0.825,121,1.052,123,1.021,127,1.121,128,1.121,236,1.959,299,1.959,305,3.975,324,3.239,329,1.667,332,1.792,353,1.086,397,1.959,398,2.212,399,5.813,400,1.792,401,2.923,402,1.792,403,1.959,404,2.212,405,1.792,406,2.212,407,2.923,408,3.61,409,2.212,410,2.212,411,3.61,412,2.212,413,2.212,414,2.212,415,3.61,416,2.212,417,2.212,418,2.212,419,2.212,420,2.212,421,3.61,422,2.212]],["t/3296",[6,0.381,10,1.649,20,0.662,23,0.645,24,0.879,26,1.281,28,1.704,31,1.908,35,0.914,47,0.521,54,1.861,69,1.106,75,0.645,76,0.274,77,1.377,81,0.662,109,1.745,111,1.593,113,1.204,114,0.997,116,0.452,118,0.582,120,0.681,121,1.281,122,1.365,123,3.347,124,1.047,125,2,126,2,127,1.8,128,1.8,129,0.791,130,0.791,165,0.997,166,0.997,219,1.382,305,1.176,323,1.264,324,2.516,329,2.029,332,1.264,353,0.766,400,1.264,401,1.264,402,1.264,405,2.181,407,1.264,423,1.561,424,1.561,425,1.561,426,1.561,427,1.561,428,1.561,429,2.694,430,1.561,431,1.561,432,1.561,433,1.561,434,1.561,435,1.561,436,1.561,437,3.145,438,1.561,439,1.561,440,1.561,441,1.561,442,2.385,443,2.385,444,1.561,445,1.561,446,1.264,447,1.561,448,1.561,449,1.561]],["t/3298",[10,1.622,24,2.511,28,1.185,35,2.611,47,0.862,76,0.344,109,1.841,111,2,113,1.511,116,1.292,118,1.663,127,2.259,128,2.259,134,1.944,135,1.944,324,3.158,353,2.188,400,3.611,401,3.611,402,3.611,403,3.947,405,3.611,407,3.611,437,3.947,442,3.947,443,3.947]],["t/3300",[1,1.151,2,2.97,6,1.616,63,4.691,174,5.864,450,6.623,451,6.623]],["t/3302",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3304",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,452,4.122]],["t/3306",[3,2.199,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,453,6.782,454,4.59]],["t/3308",[1,0.957,6,0.935,10,1.548,23,2.275,32,2.275,76,0.425,77,0.741,93,1.562,101,2.402,102,1.671,103,1.671,104,1.719,105,1.626,107,1.671,165,2.448,166,3.519,234,2.448,446,3.104,454,3.393,455,3.833,456,3.833,457,3.104,458,3.393,459,3.393,460,3.393,461,3.393,462,3.104,463,3.393,464,3.393,465,3.393,466,3.393,467,3.104,468,3.393,469,3.393]],["t/3310",[10,1.496,20,2.009,23,2.637,76,0.365,120,2.064,165,3.024,166,4.078,296,6.396,446,3.834,457,5.17,459,4.192,460,4.192,461,4.192,462,5.17,464,4.192,465,4.192,466,4.192,467,5.17,469,4.192]],["t/3312",[10,1.479,76,0.449,134,2.536,135,2.536,234,4.662,457,4.71,458,5.15,462,4.71,463,5.15,467,4.71,468,5.15,470,5.817]],["t/3314",[1,0.813,2,2.098,6,1.752,22,5.128,70,3.313,76,0.554,87,1.702,133,4.77,142,3.524,153,4.708,241,4.141,242,4.141,243,4.141,244,3.787,245,3.787,246,4.141,247,4.141,248,3.787,249,4.141,250,4.141,251,4.141]],["t/3316",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3318",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,471,4.122]],["t/3320",[3,2.199,70,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,472,4.59]],["t/3322",[1,1.073,6,1.101,10,1.471,32,2.551,47,0.873,76,0.476,77,0.873,93,1.751,101,2.694,102,1.967,103,1.967,104,2.023,105,1.914,107,1.967,116,1.307,155,3.618,211,3.479,255,4.655,324,3.196,472,3.994,473,4.511,474,4.511]],["t/3324",[1,0.459,10,1.599,20,1.765,23,2.126,26,1.979,28,1.688,35,1.546,43,0.836,47,0.805,70,1.87,76,0.397,77,1.13,116,0.765,120,1.814,121,1.256,123,2.696,125,1.487,129,1.338,130,1.338,131,1.433,153,3.721,155,2.436,157,3.369,158,2.657,159,1.989,160,1.686,161,4.73,162,3.369,163,2.138,164,2.138,165,1.686,166,1.686,167,2.138,168,2.138,169,2.138,170,2.138,171,1.612,172,1.771,189,1.87,211,2.899,255,3.134,314,2.338,315,2.338]],["t/3326",[10,1.536,35,2.739,47,0.905,76,0.488,77,1.225,116,1.355,134,2.039,135,2.761,145,3.313,153,3.708,155,3.708,159,3.524,171,2.856,172,3.137,211,3.566,255,4.77,475,4.677,476,4.677,477,4.677]],["t/3328",[1,1.171,2,3.023,6,1.645,71,6.468,478,6.74]],["t/3330",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3332",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3334",[3,2.199,71,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,479,4.59]],["t/3336",[1,1.001,6,0.995,10,1.513,32,2.378,47,0.789,76,0.444,77,0.789,93,1.632,101,2.511,102,1.778,103,1.778,104,1.829,105,1.73,107,1.778,113,1.382,115,1.559,116,1.181,117,1.64,118,1.521,119,2.046,181,1.829,234,2.605,479,3.61,480,4.078,481,4.078,482,3.61,483,3.302,484,4.664,485,3.302,486,3.302]],["t/3338",[8,1.091,10,1.644,20,1.002,23,1.572,26,1.811,28,1.012,31,3.387,34,1.443,43,1.205,44,1.443,47,0.737,53,1.913,54,2.874,76,0.294,77,1.308,113,1.621,115,0.903,116,0.684,117,0.95,118,0.881,119,0.84,120,1.03,121,1.811,123,3.247,125,2.144,129,1.197,130,1.197,131,2.066,132,1.443,165,3.054,166,2.432,181,2.145,214,2.092,234,1.509,303,2.092,483,3.083,484,3.083,485,3.083,486,3.083,487,2.363,488,2.363,489,2.363,490,2.363,491,2.363]],["t/3340",[10,1.486,47,1.003,76,0.4,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,2.41,134,2.261,135,2.261,181,2.325,234,3.312,482,4.59,483,4.199,484,5.492,485,4.199,486,4.199]]],"invertedIndex":[["",{"_index":10,"t":{"3086":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"3098":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"3100":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"3102":{"position":[[48,1],[173,1],[188,1]]},"3112":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"3114":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"3116":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"3126":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"3128":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"3130":{"position":[[18,1],[85,1],[203,1]]},"3140":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"3142":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"3144":{"position":[[0,2],[57,1],[126,1],[172,1]]},"3154":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"3156":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"3158":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"3160":{"position":[[302,4]]},"3168":{"position":[[134,2],[163,2],[196,2]]},"3170":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"3172":{"position":[[18,1],[193,1]]},"3182":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"3184":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"3186":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"3196":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"3198":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"3200":{"position":[[18,1],[56,1]]},"3210":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"3212":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"3214":{"position":[[18,1],[43,1],[58,1]]},"3224":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"3226":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"3228":{"position":[[18,1],[43,3],[141,1]]},"3238":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"3240":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"3242":{"position":[[18,1],[43,3],[150,1],[185,1]]},"3252":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"3254":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"3256":{"position":[[18,1],[43,3],[150,1],[165,1]]},"3266":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"3268":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"3270":{"position":[[18,1],[78,1]]},"3280":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"3282":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"3284":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"3294":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"3296":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"3298":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]},"3308":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"3310":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"3312":{"position":[[18,1],[57,2],[97,1]]},"3322":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"3324":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"3326":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"3336":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"3338":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"3340":{"position":[[18,1],[110,1],[182,1],[197,1]]}}}],["0",{"_index":35,"t":{"3086":{"position":[[492,1]]},"3114":{"position":[[251,1]]},"3116":{"position":[[86,2]]},"3154":{"position":[[341,2]]},"3294":{"position":[[325,2]]},"3296":{"position":[[402,1]]},"3298":{"position":[[106,2]]},"3324":{"position":[[201,1]]},"3326":{"position":[[274,2]]}}}],["1",{"_index":234,"t":{"3154":{"position":[[390,2]]},"3158":{"position":[[202,1]]},"3308":{"position":[[332,1]]},"3312":{"position":[[55,1],[94,2]]},"3336":{"position":[[402,1]]},"3338":{"position":[[839,1]]},"3340":{"position":[[180,1]]}}}],["1.14/1.15",{"_index":86,"t":{"3096":{"position":[[33,11]]}}}],["1.18",{"_index":143,"t":{"3104":{"position":[[82,4]]}}}],["10",{"_index":118,"t":{"3098":{"position":[[366,2]]},"3100":{"position":[[636,2]]},"3102":{"position":[[170,2]]},"3126":{"position":[[300,2]]},"3128":{"position":[[258,2]]},"3130":{"position":[[82,2]]},"3210":{"position":[[258,2]]},"3212":{"position":[[75,2]]},"3214":{"position":[[40,2]]},"3238":{"position":[[342,2],[567,2]]},"3240":{"position":[[860,2]]},"3242":{"position":[[147,2]]},"3252":{"position":[[342,2],[535,2],[749,2]]},"3254":{"position":[[875,2]]},"3256":{"position":[[147,2]]},"3280":{"position":[[319,2]]},"3282":{"position":[[1015,2]]},"3284":{"position":[[206,2]]},"3294":{"position":[[368,2]]},"3296":{"position":[[1456,2]]},"3298":{"position":[[149,2]]},"3336":{"position":[[329,2]]},"3338":{"position":[[319,2]]},"3340":{"position":[[107,2]]}}}],["100",{"_index":484,"t":{"3336":{"position":[[361,4],[380,4]]},"3338":{"position":[[585,4],[711,4]]},"3340":{"position":[[139,4],[158,4]]}}}],["10m",{"_index":461,"t":{"3308":{"position":[[316,6]]},"3310":{"position":[[73,6]]}}}],["123456",{"_index":240,"t":{"3158":{"position":[[120,9]]}}}],["127.0.0.1",{"_index":353,"t":{"3224":{"position":[[256,12]]},"3226":{"position":[[225,11]]},"3228":{"position":[[53,12]]},"3238":{"position":[[248,12]]},"3240":{"position":[[267,11]]},"3242":{"position":[[53,12]]},"3252":{"position":[[248,12]]},"3254":{"position":[[345,11]]},"3256":{"position":[[53,12]]},"3282":{"position":[[398,11]]},"3284":{"position":[[92,12]]},"3294":{"position":[[262,12]]},"3296":{"position":[[84,11]]},"3298":{"position":[[34,12]]}}}],["127.0.0.1:11211",{"_index":344,"t":{"3198":{"position":[[113,17]]},"3200":{"position":[[37,18]]}}}],["127.0.0.1:8091",{"_index":231,"t":{"3154":{"position":[[287,17]]},"3158":{"position":[[73,17]]}}}],["1433",{"_index":363,"t":{"3238":{"position":[[267,5]]},"3240":{"position":[[355,4]]},"3242":{"position":[[72,5]]}}}],["15",{"_index":302,"t":{"3170":{"position":[[2668,2],[2722,2]]}}}],["1e7",{"_index":458,"t":{"3308":{"position":[[271,4]]},"3312":{"position":[[41,4]]}}}],["1gb",{"_index":466,"t":{"3308":{"position":[[366,6]]},"3310":{"position":[[131,6]]}}}],["2",{"_index":84,"t":{"3096":{"position":[[26,1]]},"3110":{"position":[[43,1]]},"3124":{"position":[[24,1]]},"3138":{"position":[[23,1]]},"3152":{"position":[[27,1]]},"3166":{"position":[[26,1]]},"3170":{"position":[[175,3]]},"3180":{"position":[[22,1]]},"3186":{"position":[[80,1]]},"3194":{"position":[[24,1]]},"3208":{"position":[[24,1]]},"3222":{"position":[[25,1]]},"3236":{"position":[[23,1]]},"3250":{"position":[[23,1]]},"3264":{"position":[[24,1]]},"3278":{"position":[[26,1]]},"3292":{"position":[[23,1]]},"3306":{"position":[[27,1]]},"3320":{"position":[[20,1]]},"3334":{"position":[[25,1]]}}}],["25",{"_index":281,"t":{"3170":{"position":[[1341,2],[2037,2]]}}}],["27017",{"_index":354,"t":{"3224":{"position":[[275,6]]},"3226":{"position":[[313,5]]},"3228":{"position":[[72,6]]}}}],["3",{"_index":171,"t":{"3114":{"position":[[658,1]]},"3116":{"position":[[116,2]]},"3154":{"position":[[363,2]]},"3158":{"position":[[174,1]]},"3170":{"position":[[1010,1]]},"3172":{"position":[[93,2]]},"3324":{"position":[[613,1]]},"3326":{"position":[[255,2]]}}}],["30",{"_index":463,"t":{"3308":{"position":[[337,3]]},"3312":{"position":[[60,3]]}}}],["3306",{"_index":374,"t":{"3252":{"position":[[267,5]]},"3254":{"position":[[433,4]]},"3256":{"position":[[72,5]]}}}],["5",{"_index":277,"t":{"3170":{"position":[[1246,2],[1942,2]]},"3172":{"position":[[129,2],[152,2]]}}}],["5432",{"_index":394,"t":{"3282":{"position":[[486,4]]},"3284":{"position":[[111,5]]}}}],["60",{"_index":222,"t":{"3142":{"position":[[342,2]]},"3144":{"position":[[123,2]]}}}],["6379",{"_index":400,"t":{"3294":{"position":[[281,5]]},"3296":{"position":[[172,4]]},"3298":{"position":[[53,5]]}}}],["6380",{"_index":409,"t":{"3294":{"position":[[617,9]]}}}],["64",{"_index":468,"t":{"3308":{"position":[[386,3]]},"3312":{"position":[[77,3]]}}}],["8529",{"_index":112,"t":{"3098":{"position":[[286,5]]},"3100":{"position":[[179,4]]},"3102":{"position":[[90,5]]}}}],["_",{"_index":376,"t":{"3252":{"position":[[612,1]]}}}],["access",{"_index":162,"t":{"3114":{"position":[[422,6],[448,6]]},"3170":{"position":[[768,6],[794,6]]},"3324":{"position":[[371,6],[397,6]]}}}],["accesskey",{"_index":314,"t":{"3170":{"position":[[3096,9]]},"3324":{"position":[[659,9]]}}}],["account",{"_index":152,"t":{"3112":{"position":[[258,8],[320,8]]},"3114":{"position":[[32,7],[46,7]]},"3116":{"position":[[28,8]]}}}],["adaptor",{"_index":487,"t":{"3338":{"position":[[402,7]]}}}],["addr",{"_index":407,"t":{"3294":{"position":[[495,6],[592,6]]},"3296":{"position":[[794,5]]},"3298":{"position":[[177,6]]}}}],["address",{"_index":429,"t":{"3296":{"position":[[663,7],[699,10]]}}}],["admin",{"_index":239,"t":{"3158":{"position":[[101,8]]}}}],["allow",{"_index":265,"t":{"3170":{"position":[[415,6]]}}}],["along",{"_index":33,"t":{"3086":{"position":[[457,5]]}}}],["amount",{"_index":214,"t":{"3142":{"position":[[230,6]]},"3338":{"position":[[769,6]]}}}],["applic",{"_index":235,"t":{"3156":{"position":[[28,11],[108,11]]}}}],["arangodb",{"_index":55,"t":{"3088":{"position":[[0,8]]},"3090":{"position":[[2,8]]},"3096":{"position":[[0,8]]}}}],["arangodb.new",{"_index":106,"t":{"3098":{"position":[[172,14]]}}}],["arangodb.new(arangodb.config",{"_index":108,"t":{"3098":{"position":[[224,29]]}}}],["arangodb/go",{"_index":72,"t":{"3090":{"position":[[32,11],[55,11]]}}}],["attempt",{"_index":170,"t":{"3114":{"position":[[623,10]]},"3170":{"position":[[972,10]]},"3324":{"position":[[575,10]]}}}],["authent",{"_index":328,"t":{"3184":{"position":[[197,15],[259,15]]},"3226":{"position":[[81,14]]},"3240":{"position":[[123,14]]},"3254":{"position":[[69,14],[201,14]]},"3282":{"position":[[254,14]]}}}],["avail",{"_index":219,"t":{"3142":{"position":[[284,9]]},"3296":{"position":[[1481,9]]}}}],["aw",{"_index":161,"t":{"3114":{"position":[[418,3],[437,3]]},"3170":{"position":[[764,3],[783,3]]},"3324":{"position":[[98,3],[130,3],[367,3],[386,3]]}}}],["aws.bool(tru",{"_index":316,"t":{"3172":{"position":[[177,15]]}}}],["aws/aw",{"_index":241,"t":{"3160":{"position":[[32,7]]},"3314":{"position":[[26,7]]}}}],["aws/credenti",{"_index":246,"t":{"3160":{"position":[[154,19]]},"3314":{"position":[[148,19]]}}}],["aws_region",{"_index":263,"t":{"3170":{"position":[[283,13]]}}}],["awsdynamodb.cli",{"_index":252,"t":{"3164":{"position":[[285,19]]}}}],["azblob.cli",{"_index":148,"t":{"3108":{"position":[[288,14]]}}}],["azur",{"_index":136,"t":{"3104":{"position":[[0,5]]},"3110":{"position":[[0,5],[210,5]]}}}],["azureblob",{"_index":56,"t":{"3088":{"position":[[9,9]]}}}],["azureblob.new",{"_index":150,"t":{"3112":{"position":[[173,15]]}}}],["azureblob.new(azureblob.config",{"_index":151,"t":{"3112":{"position":[[226,31]]}}}],["badger",{"_index":57,"t":{"3088":{"position":[[19,6]]},"3124":{"position":[[0,6],[191,6]]},"3128":{"position":[[344,6],[487,6]]}}}],["badger.db",{"_index":176,"t":{"3122":{"position":[[288,10]]},"3262":{"position":[[288,10]]}}}],["badger.defaultoptions(\"./fiber.badg",{"_index":184,"t":{"3128":{"position":[[378,39]]}}}],["badger.defaultoptions(\"./fiber.badger\").withlogger(nil",{"_index":190,"t":{"3130":{"position":[[115,56]]}}}],["badger.logg",{"_index":187,"t":{"3128":{"position":[[532,13]]}}}],["badger.new",{"_index":178,"t":{"3126":{"position":[[170,12]]}}}],["badger.new(badger.config",{"_index":179,"t":{"3126":{"position":[[220,25]]}}}],["badger.opt",{"_index":185,"t":{"3128":{"position":[[432,14]]}}}],["badgeropt",{"_index":182,"t":{"3128":{"position":[[303,13],[418,13]]},"3130":{"position":[[100,14]]}}}],["bbolt",{"_index":58,"t":{"3088":{"position":[[26,5]]},"3132":{"position":[[2,5]]},"3138":{"position":[[0,5]]},"3142":{"position":[[137,5]]}}}],["bbolt.db",{"_index":206,"t":{"3136":{"position":[[288,9]]}}}],["bbolt.new",{"_index":208,"t":{"3140":{"position":[[169,11]]}}}],["bbolt.new(bbolt.config",{"_index":209,"t":{"3140":{"position":[[218,23]]}}}],["befor",{"_index":132,"t":{"3100":{"position":[[580,6]]},"3128":{"position":[[202,6]]},"3170":{"position":[[2921,6]]},"3212":{"position":[[29,6]]},"3240":{"position":[[804,6]]},"3254":{"position":[[819,6]]},"3282":{"position":[[959,6]]},"3338":{"position":[[263,6]]}}}],["blob",{"_index":137,"t":{"3104":{"position":[[6,4]]},"3110":{"position":[[6,4],[216,4]]}}}],["block",{"_index":300,"t":{"3170":{"position":[[2616,5]]}}}],["bolt",{"_index":192,"t":{"3132":{"position":[[44,4]]}}}],["bool",{"_index":130,"t":{"3100":{"position":[[567,4]]},"3114":{"position":[[388,4]]},"3128":{"position":[[189,4],[636,4]]},"3142":{"position":[[460,4],[557,4]]},"3170":{"position":[[1120,4],[3062,5]]},"3198":{"position":[[237,4]]},"3226":{"position":[[697,4]]},"3240":{"position":[[791,4]]},"3254":{"position":[[806,4]]},"3282":{"position":[[946,4]]},"3296":{"position":[[1275,4]]},"3324":{"position":[[337,4]]},"3338":{"position":[[250,4]]}}}],["bound",{"_index":450,"t":{"3300":{"position":[[9,5]]}}}],["bradfitz/gomemcach",{"_index":333,"t":{"3188":{"position":[[32,20]]}}}],["bucket",{"_index":211,"t":{"3140":{"position":[[270,7],[282,8]]},"3142":{"position":[[143,6],[198,6],[511,6]]},"3144":{"position":[[89,7]]},"3154":{"position":[[333,7]]},"3156":{"position":[[263,6],[284,6]]},"3158":{"position":[[130,7]]},"3170":{"position":[[1074,6]]},"3322":{"position":[[230,7],[242,6]]},"3324":{"position":[[69,6],[81,6],[291,6]]},"3326":{"position":[[32,7],[176,7]]}}}],["buffer",{"_index":469,"t":{"3308":{"position":[[416,7]]},"3310":{"position":[[190,7]]}}}],["bufferitem",{"_index":467,"t":{"3308":{"position":[[373,12]]},"3310":{"position":[[155,11],[198,11]]},"3312":{"position":[[64,12]]}}}],["byte",{"_index":29,"t":{"3086":{"position":[[393,8],[591,7]]},"3094":{"position":[[69,8],[123,7]]},"3108":{"position":[[69,8],[123,7]]},"3122":{"position":[[69,8],[123,7]]},"3136":{"position":[[69,8],[123,7]]},"3150":{"position":[[69,8],[123,7]]},"3164":{"position":[[66,8],[120,7]]},"3178":{"position":[[70,8],[124,7]]},"3192":{"position":[[69,8],[123,7]]},"3206":{"position":[[69,8],[123,7]]},"3220":{"position":[[69,8],[123,7]]},"3234":{"position":[[69,8],[123,7]]},"3248":{"position":[[69,8],[123,7]]},"3262":{"position":[[69,8],[123,7]]},"3276":{"position":[[69,8],[123,7]]},"3290":{"position":[[69,8],[123,7]]},"3304":{"position":[[69,8],[123,7]]},"3318":{"position":[[69,8],[123,7]]},"3332":{"position":[[69,8],[123,7]]}}}],["cach",{"_index":465,"t":{"3308":{"position":[[360,5]]},"3310":{"position":[[125,5]]}}}],["calcul",{"_index":286,"t":{"3170":{"position":[[1415,13],[2111,13]]}}}],["case",{"_index":308,"t":{"3170":{"position":[[2847,4]]}}}],["cer",{"_index":410,"t":{"3294":{"position":[[670,4]]}}}],["certif",{"_index":419,"t":{"3294":{"position":[[855,13]]}}}],["chu'",{"_index":197,"t":{"3132":{"position":[[97,5]]}}}],["clear",{"_index":129,"t":{"3100":{"position":[[480,6]]},"3114":{"position":[[304,6]]},"3128":{"position":[[107,6]]},"3142":{"position":[[474,6]]},"3170":{"position":[[1037,6]]},"3198":{"position":[[155,6]]},"3226":{"position":[[615,6]]},"3240":{"position":[[709,6]]},"3254":{"position":[[724,6]]},"3282":{"position":[[864,6]]},"3296":{"position":[[1188,6]]},"3324":{"position":[[254,6]]},"3338":{"position":[[168,6]]}}}],["client",{"_index":305,"t":{"3170":{"position":[[2810,6]]},"3184":{"position":[[308,6]]},"3294":{"position":[[428,6],[552,6],[642,6],[1025,6]]},"3296":{"position":[[932,7]]}}}],["client.key",{"_index":413,"t":{"3294":{"position":[[718,15]]}}}],["clientnam",{"_index":437,"t":{"3296":{"position":[[904,10],[948,11],[1013,10]]},"3298":{"position":[[212,11]]}}}],["clientv3.client",{"_index":318,"t":{"3178":{"position":[[289,16]]}}}],["close",{"_index":48,"t":{"3086":{"position":[[826,5],[832,6],[921,7]]},"3094":{"position":[[249,7]]},"3108":{"position":[[249,7]]},"3122":{"position":[[249,7]]},"3136":{"position":[[249,7]]},"3150":{"position":[[249,7]]},"3164":{"position":[[246,7]]},"3178":{"position":[[250,7]]},"3192":{"position":[[249,7]]},"3206":{"position":[[249,7]]},"3220":{"position":[[249,7]]},"3234":{"position":[[249,7]]},"3248":{"position":[[249,7]]},"3262":{"position":[[249,7]]},"3276":{"position":[[249,7]]},"3290":{"position":[[249,7]]},"3304":{"position":[[249,7]]},"3318":{"position":[[249,7]]},"3332":{"position":[[249,7]]}}}],["cloud",{"_index":141,"t":{"3104":{"position":[[66,6]]}}}],["cluster",{"_index":236,"t":{"3156":{"position":[[77,7],[157,7],[224,7],[345,7],[443,7]]},"3294":{"position":[[544,7]]}}}],["clustercli",{"_index":434,"t":{"3296":{"position":[[742,13]]}}}],["cockroachdb/pebbl",{"_index":378,"t":{"3258":{"position":[[26,18]]}}}],["collect",{"_index":114,"t":{"3098":{"position":[[311,11]]},"3100":{"position":[[394,10],[453,10],[517,10]]},"3102":{"position":[[115,11]]},"3224":{"position":[[301,11],[513,11]]},"3226":{"position":[[529,10],[588,10]]},"3228":{"position":[[98,11]]},"3296":{"position":[[1225,10]]}}}],["collector",{"_index":52,"t":{"3086":{"position":[[888,10]]}}}],["command",{"_index":440,"t":{"3296":{"position":[[960,7]]}}}],["commun",{"_index":11,"t":{"3086":{"position":[[139,13]]}}}],["config",{"_index":76,"t":{"3092":{"position":[[33,6],[48,6]]},"3094":{"position":[[16,10]]},"3098":{"position":[[156,6],[208,6]]},"3100":{"position":[[5,6]]},"3102":{"position":[[50,7]]},"3106":{"position":[[33,6],[48,6]]},"3108":{"position":[[16,10]]},"3112":{"position":[[157,6],[210,6]]},"3114":{"position":[[5,6]]},"3116":{"position":[[20,7]]},"3120":{"position":[[33,6],[48,6]]},"3122":{"position":[[16,10]]},"3126":{"position":[[154,6],[204,6]]},"3128":{"position":[[5,6]]},"3130":{"position":[[20,7]]},"3134":{"position":[[33,6],[48,6]]},"3136":{"position":[[16,10]]},"3140":{"position":[[153,6],[202,6]]},"3142":{"position":[[3,6],[22,6],[47,6]]},"3144":{"position":[[32,6],[59,7]]},"3148":{"position":[[33,6],[48,6]]},"3150":{"position":[[16,10]]},"3154":{"position":[[157,6],[233,6]]},"3156":{"position":[[5,6]]},"3158":{"position":[[32,6],[59,7]]},"3160":{"position":[[60,6],[199,6],[262,7]]},"3162":{"position":[[33,6],[48,6]]},"3164":{"position":[[16,7]]},"3170":{"position":[[5,6],[209,6]]},"3172":{"position":[[20,7]]},"3176":{"position":[[33,6],[48,6]]},"3178":{"position":[[16,10]]},"3182":{"position":[[152,6],[200,6]]},"3184":{"position":[[5,6]]},"3186":{"position":[[20,7]]},"3190":{"position":[[33,6],[48,6]]},"3192":{"position":[[16,10]]},"3196":{"position":[[156,6],[208,6]]},"3198":{"position":[[5,6]]},"3200":{"position":[[20,7]]},"3204":{"position":[[33,6],[48,6]]},"3206":{"position":[[16,10]]},"3210":{"position":[[154,6],[204,6]]},"3212":{"position":[[5,6]]},"3214":{"position":[[20,7]]},"3218":{"position":[[33,6],[48,6]]},"3220":{"position":[[16,10]]},"3224":{"position":[[155,6],[206,6],[368,6]]},"3226":{"position":[[5,6]]},"3228":{"position":[[20,7]]},"3232":{"position":[[33,6],[48,6]]},"3234":{"position":[[16,10]]},"3238":{"position":[[153,6],[202,6],[404,6]]},"3240":{"position":[[3,6],[22,6],[47,6]]},"3242":{"position":[[20,7]]},"3246":{"position":[[33,6],[48,6]]},"3248":{"position":[[16,10]]},"3252":{"position":[[153,6],[202,6],[384,6],[577,6]]},"3254":{"position":[[5,6]]},"3256":{"position":[[20,7]]},"3260":{"position":[[33,6],[48,6]]},"3262":{"position":[[16,10]]},"3266":{"position":[[154,6],[204,6]]},"3268":{"position":[[5,6]]},"3270":{"position":[[20,7]]},"3274":{"position":[[33,6],[48,6]]},"3276":{"position":[[16,10]]},"3280":{"position":[[159,6],[211,6]]},"3282":{"position":[[3,6],[22,6],[47,6]]},"3284":{"position":[[32,6],[59,7]]},"3288":{"position":[[33,6],[48,6]]},"3290":{"position":[[16,10]]},"3294":{"position":[[167,6],[216,6]]},"3296":{"position":[[5,6],[476,6],[1287,6]]},"3298":{"position":[[20,7]]},"3302":{"position":[[33,6],[48,6]]},"3304":{"position":[[16,10]]},"3308":{"position":[[157,6],[210,6]]},"3310":{"position":[[5,6]]},"3312":{"position":[[20,7]]},"3314":{"position":[[54,6],[193,6],[256,7]]},"3316":{"position":[[33,6],[48,6]]},"3318":{"position":[[16,10]]},"3322":{"position":[[150,6],[196,6]]},"3324":{"position":[[3,6],[22,6],[47,6]]},"3326":{"position":[[141,6],[168,7]]},"3330":{"position":[[33,6],[48,6]]},"3332":{"position":[[16,10]]},"3336":{"position":[[155,6],[206,6]]},"3338":{"position":[[5,6],[418,6]]},"3340":{"position":[[20,7]]}}}],["configdefault",{"_index":135,"t":{"3102":{"position":[[34,13]]},"3116":{"position":[[4,13]]},"3130":{"position":[[4,13]]},"3144":{"position":[[3,13],[43,13]]},"3158":{"position":[[3,13],[43,13]]},"3172":{"position":[[4,13]]},"3186":{"position":[[4,13]]},"3200":{"position":[[4,13]]},"3214":{"position":[[4,13]]},"3228":{"position":[[4,13]]},"3242":{"position":[[4,13]]},"3256":{"position":[[4,13]]},"3270":{"position":[[4,13]]},"3284":{"position":[[3,13],[43,13]]},"3298":{"position":[[4,13]]},"3312":{"position":[[4,13]]},"3326":{"position":[[112,13],[152,13]]},"3340":{"position":[[4,13]]}}}],["configur",{"_index":475,"t":{"3326":{"position":[[12,13]]}}}],["conn",{"_index":81,"t":{"3094":{"position":[[281,6]]},"3108":{"position":[[281,6]]},"3122":{"position":[[281,6]]},"3136":{"position":[[281,6]]},"3150":{"position":[[281,6]]},"3164":{"position":[[278,6]]},"3178":{"position":[[282,6]]},"3192":{"position":[[281,6]]},"3206":{"position":[[281,6]]},"3220":{"position":[[281,6]]},"3234":{"position":[[281,6]]},"3248":{"position":[[281,6]]},"3262":{"position":[[281,6]]},"3276":{"position":[[281,6]]},"3290":{"position":[[281,6]]},"3296":{"position":[[977,5]]},"3304":{"position":[[281,6]]},"3318":{"position":[[281,6]]},"3332":{"position":[[281,6]]}}}],["connect",{"_index":54,"t":{"3086":{"position":[[908,12]]},"3156":{"position":[[52,7],[132,7],[188,10],[273,7],[317,10]]},"3184":{"position":[[129,11]]},"3224":{"position":[[381,10]]},"3226":{"position":[[24,10]]},"3238":{"position":[[417,10]]},"3240":{"position":[[66,10],[926,10]]},"3252":{"position":[[397,10],[597,10]]},"3254":{"position":[[144,10]]},"3282":{"position":[[103,10],[128,10],[197,10],[792,10]]},"3296":{"position":[[349,10],[1416,12],[1459,11]]},"3338":{"position":[[517,11],[541,10],[655,11],[786,10]]}}}],["connectiontimeout",{"_index":232,"t":{"3154":{"position":[[344,18]]},"3156":{"position":[[353,17]]},"3158":{"position":[[155,18]]}}}],["connectionuri",{"_index":355,"t":{"3224":{"position":[[436,14]]},"3226":{"position":[[141,13]]},"3228":{"position":[[28,14]]},"3238":{"position":[[468,14]]},"3240":{"position":[[183,13]]},"3242":{"position":[[28,14]]},"3252":{"position":[[448,14]]},"3254":{"position":[[41,13],[261,13]]},"3256":{"position":[[28,14]]},"3282":{"position":[[314,13]]},"3284":{"position":[[67,14]]}}}],["connmaxlifetim",{"_index":486,"t":{"3336":{"position":[[385,16]]},"3338":{"position":[[736,15],[849,15]]},"3340":{"position":[[163,16]]}}}],["consol",{"_index":280,"t":{"3170":{"position":[[1329,8],[2025,8]]}}}],["contain",{"_index":45,"t":{"3086":{"position":[[718,7]]},"3112":{"position":[[275,10]]},"3114":{"position":[[64,9],[80,9],[341,10]]},"3116":{"position":[[41,10]]},"3170":{"position":[[542,9],[603,10]]}}}],["cost",{"_index":464,"t":{"3308":{"position":[[352,4]]},"3310":{"position":[[117,4]]}}}],["couchbas",{"_index":59,"t":{"3088":{"position":[[32,9]]},"3146":{"position":[[2,9]]},"3152":{"position":[[0,9],[194,9]]},"3154":{"position":[[203,9]]},"3156":{"position":[[67,9],[147,9],[214,9],[335,9],[433,9]]}}}],["couchbase.new",{"_index":229,"t":{"3154":{"position":[[173,15]]}}}],["couchbase.new(couchbase.config",{"_index":230,"t":{"3154":{"position":[[249,31]]}}}],["couchbase/gocb",{"_index":226,"t":{"3146":{"position":[[33,15]]}}}],["cpu",{"_index":447,"t":{"3296":{"position":[[1491,3]]}}}],["creat",{"_index":105,"t":{"3098":{"position":[[116,6]]},"3112":{"position":[[117,6]]},"3126":{"position":[[114,6]]},"3140":{"position":[[113,6]]},"3154":{"position":[[117,6]]},"3168":{"position":[[116,6]]},"3170":{"position":[[1217,7],[1301,8],[1913,7],[1997,8],[2558,7],[2641,8],[2933,8]]},"3182":{"position":[[112,6]]},"3196":{"position":[[116,6]]},"3210":{"position":[[114,6]]},"3224":{"position":[[115,6]]},"3238":{"position":[[113,6]]},"3252":{"position":[[113,6]]},"3266":{"position":[[114,6]]},"3280":{"position":[[119,6]]},"3294":{"position":[[121,6],[633,6],[1016,6]]},"3308":{"position":[[117,6]]},"3322":{"position":[[110,6]]},"3336":{"position":[[115,6]]}}}],["credenti",{"_index":153,"t":{"3112":{"position":[[294,12],[307,12]]},"3114":{"position":[[396,11],[501,13],[515,11],[527,11]]},"3160":{"position":[[77,11],[100,11],[216,11],[235,11],[290,11]]},"3170":{"position":[[742,11],[850,13],[864,11],[876,11],[3075,11]]},"3172":{"position":[[52,12],[65,14]]},"3184":{"position":[[322,12]]},"3314":{"position":[[71,11],[94,11],[210,11],[229,11],[284,11]]},"3324":{"position":[[345,11],[453,13],[467,11],[479,11],[638,11]]},"3326":{"position":[[214,12],[227,14]]}}}],["custom",{"_index":107,"t":{"3098":{"position":[[201,6]]},"3112":{"position":[[203,6]]},"3126":{"position":[[197,6]]},"3140":{"position":[[195,6]]},"3154":{"position":[[226,6]]},"3170":{"position":[[435,6]]},"3182":{"position":[[193,6]]},"3196":{"position":[[201,6]]},"3210":{"position":[[197,6]]},"3224":{"position":[[199,6],[361,6]]},"3238":{"position":[[195,6],[397,6]]},"3252":{"position":[[195,6],[377,6],[570,6]]},"3266":{"position":[[197,6]]},"3280":{"position":[[204,6]]},"3294":{"position":[[209,6]]},"3308":{"position":[[203,6]]},"3322":{"position":[[189,6]]},"3336":{"position":[[199,6]]}}}],["customendpoint",{"_index":264,"t":{"3170":{"position":[[400,14]]}}}],["darwin",{"_index":220,"t":{"3142":{"position":[[297,6]]}}}],["databas",{"_index":113,"t":{"3098":{"position":[[292,9]]},"3100":{"position":[[326,8],[375,8]]},"3102":{"position":[[96,9]]},"3126":{"position":[[246,9]]},"3128":{"position":[[24,8],[82,8]]},"3130":{"position":[[28,9]]},"3132":{"position":[[184,8],[232,8]]},"3140":{"position":[[242,9]]},"3142":{"position":[[66,8],[118,8],[390,8]]},"3144":{"position":[[67,9]]},"3224":{"position":[[282,9],[494,9]]},"3226":{"position":[[461,8],[510,8]]},"3228":{"position":[[79,9]]},"3238":{"position":[[273,9]]},"3240":{"position":[[565,8],[614,8]]},"3242":{"position":[[78,9]]},"3252":{"position":[[273,9]]},"3254":{"position":[[580,8],[629,8]]},"3256":{"position":[[78,9]]},"3268":{"position":[[24,8]]},"3282":{"position":[[633,8],[682,8]]},"3284":{"position":[[117,9]]},"3294":{"position":[[315,9]]},"3296":{"position":[[319,8],[404,8],[524,8]]},"3298":{"position":[[96,9]]},"3336":{"position":[[250,9]]},"3338":{"position":[[24,8],[73,8],[674,9]]},"3340":{"position":[[28,9]]}}}],["database/key",{"_index":13,"t":{"3086":{"position":[[168,12]]}}}],["database/sql",{"_index":368,"t":{"3244":{"position":[[29,12]]}}}],["db",{"_index":122,"t":{"3100":{"position":[[44,2],[133,2]]},"3118":{"position":[[17,2]]},"3226":{"position":[[53,3],[185,2],[267,2]]},"3240":{"position":[[95,3],[227,2],[309,2]]},"3252":{"position":[[594,2],[608,3],[715,3],[719,3]]},"3254":{"position":[[24,2],[130,2],[173,3],[305,2],[387,2]]},"3258":{"position":[[17,2]]},"3266":{"position":[[252,5]]},"3268":{"position":[[65,6]]},"3270":{"position":[[34,5]]},"3280":{"position":[[257,3]]},"3282":{"position":[[66,2],[177,2],[226,3],[358,2],[440,2]]},"3296":{"position":[[44,2],[126,2]]}}}],["dbpool",{"_index":392,"t":{"3280":{"position":[[261,7]]}}}],["default",{"_index":77,"t":{"3092":{"position":[[40,7]]},"3098":{"position":[[148,7]]},"3100":{"position":[[73,7],[168,7],[228,7],[293,7],[356,7],[426,7],[544,7],[625,7]]},"3106":{"position":[[40,7]]},"3112":{"position":[[149,7]]},"3114":{"position":[[131,8],[240,7],[365,7],[490,7],[647,7]]},"3120":{"position":[[40,7]]},"3126":{"position":[[146,7]]},"3128":{"position":[[54,7],[166,7],[247,7],[367,7],[464,7],[510,7],[609,7]]},"3134":{"position":[[40,7]]},"3140":{"position":[[145,7]]},"3142":{"position":[[96,7],[171,7],[331,7],[434,7],[534,7]]},"3144":{"position":[[24,7]]},"3148":{"position":[[40,7]]},"3154":{"position":[[149,7]]},"3158":{"position":[[24,7]]},"3162":{"position":[[40,7]]},"3170":{"position":[[374,9],[714,8],[839,7],[999,7],[1097,7],[1252,8],[1279,7],[1948,8],[1975,7],[3031,9]]},"3176":{"position":[[40,7]]},"3182":{"position":[[144,7]]},"3190":{"position":[[40,7]]},"3196":{"position":[[148,7]]},"3198":{"position":[[102,7],[214,7]]},"3204":{"position":[[40,7]]},"3210":{"position":[[146,7]]},"3212":{"position":[[64,7]]},"3218":{"position":[[40,7]]},"3224":{"position":[[147,7]]},"3226":{"position":[[127,7],[214,7],[302,7],[363,7],[428,7],[491,7],[561,7],[674,7]]},"3232":{"position":[[40,7]]},"3238":{"position":[[145,7]]},"3240":{"position":[[169,7],[256,7],[344,7],[404,7],[469,7],[532,7],[595,7],[660,7],[768,7],[849,7],[953,7]]},"3246":{"position":[[40,7]]},"3252":{"position":[[145,7]]},"3254":{"position":[[115,7],[247,7],[334,7],[422,7],[482,7],[547,7],[610,7],[675,7],[783,7],[864,7]]},"3260":{"position":[[40,7]]},"3266":{"position":[[146,7]]},"3268":{"position":[[54,7],[146,7]]},"3274":{"position":[[40,7]]},"3280":{"position":[[151,7]]},"3282":{"position":[[162,7],[300,7],[387,7],[475,7],[535,7],[600,7],[663,7],[728,7],[819,7],[923,7],[1004,7]]},"3284":{"position":[[24,7]]},"3288":{"position":[[40,7]]},"3294":{"position":[[159,7]]},"3296":{"position":[[73,7],[161,7],[221,7],[286,7],[391,7],[619,7],[772,7],[869,7],[999,7],[1067,7],[1141,7],[1252,7],[1351,7],[1445,7]]},"3302":{"position":[[40,7]]},"3308":{"position":[[149,7]]},"3316":{"position":[[40,7]]},"3322":{"position":[[142,7]]},"3324":{"position":[[190,7],[314,7],[442,7],[602,7]]},"3326":{"position":[[4,7],[133,7]]},"3330":{"position":[[40,7]]},"3336":{"position":[[147,7]]},"3338":{"position":[[54,7],[119,7],[227,7],[308,7],[574,7],[700,7],[828,7]]}}}],["defaultcost",{"_index":470,"t":{"3312":{"position":[[81,12]]}}}],["defin",{"_index":189,"t":{"3128":{"position":[[559,6]]},"3142":{"position":[[10,7]]},"3240":{"position":[[10,7]]},"3282":{"position":[[10,7]]},"3324":{"position":[[10,7]]}}}],["delet",{"_index":44,"t":{"3086":{"position":[[627,6],[634,7],[792,6]]},"3100":{"position":[[587,8]]},"3128":{"position":[[209,8]]},"3212":{"position":[[36,8]]},"3240":{"position":[[811,8]]},"3254":{"position":[[826,8]]},"3282":{"position":[[966,8]]},"3338":{"position":[[270,8]]}}}],["delete(key",{"_index":46,"t":{"3086":{"position":[[735,10]]},"3094":{"position":[[174,10]]},"3108":{"position":[[174,10]]},"3122":{"position":[[174,10]]},"3136":{"position":[[174,10]]},"3150":{"position":[[174,10]]},"3164":{"position":[[171,10]]},"3178":{"position":[[175,10]]},"3192":{"position":[[174,10]]},"3206":{"position":[[174,10]]},"3220":{"position":[[174,10]]},"3234":{"position":[[174,10]]},"3248":{"position":[[174,10]]},"3262":{"position":[[174,10]]},"3276":{"position":[[174,10]]},"3290":{"position":[[174,10]]},"3304":{"position":[[174,10]]},"3318":{"position":[[174,10]]},"3332":{"position":[[174,10]]}}}],["design",{"_index":5,"t":{"3086":{"position":[[62,8]]}}}],["develop",{"_index":288,"t":{"3170":{"position":[[1476,9],[1645,9],[2172,9],[2341,9]]}}}],["dgraph",{"_index":174,"t":{"3118":{"position":[[26,6]]},"3300":{"position":[[36,6]]}}}],["dialtimeout",{"_index":325,"t":{"3184":{"position":[[75,11],[141,11]]},"3186":{"position":[[67,12]]}}}],["didn't",{"_index":96,"t":{"3096":{"position":[[127,6]]},"3110":{"position":[[132,6]]},"3124":{"position":[[113,6]]},"3138":{"position":[[112,6]]},"3152":{"position":[[116,6]]},"3166":{"position":[[115,6]]},"3180":{"position":[[111,6]]},"3194":{"position":[[113,6]]},"3208":{"position":[[113,6]]},"3222":{"position":[[114,6]]},"3236":{"position":[[112,6]]},"3250":{"position":[[112,6]]},"3264":{"position":[[113,6]]},"3278":{"position":[[115,6]]},"3292":{"position":[[112,6]]},"3306":{"position":[[116,6]]},"3320":{"position":[[109,6]]},"3334":{"position":[[114,6]]}}}],["differ",{"_index":12,"t":{"3086":{"position":[[158,9]]}}}],["disabl",{"_index":365,"t":{"3238":{"position":[[369,10]]},"3240":{"position":[[964,9]]},"3242":{"position":[[174,10]]},"3282":{"position":[[830,9]]},"3284":{"position":[[169,10]]}}}],["divid",{"_index":340,"t":{"3198":{"position":[[36,7]]}}}],["docker",{"_index":269,"t":{"3170":{"position":[[535,6],[596,6]]}}}],["doesn't",{"_index":275,"t":{"3170":{"position":[[1192,7],[1888,7],[2534,7],[2702,7]]}}}],["don't",{"_index":203,"t":{"3132":{"position":[[211,5]]},"3170":{"position":[[2883,5]]},"3264":{"position":[[210,5]]}}}],["driver",{"_index":2,"t":{"3086":{"position":[[16,7]]},"3090":{"position":[[19,6],[44,6],[67,7]]},"3110":{"position":[[19,6]]},"3132":{"position":[[16,6]]},"3146":{"position":[[20,6]]},"3160":{"position":[[19,6]]},"3174":{"position":[[15,6]]},"3188":{"position":[[19,6]]},"3202":{"position":[[21,7]]},"3216":{"position":[[18,6],[48,7]]},"3230":{"position":[[16,6]]},"3244":{"position":[[16,6]]},"3272":{"position":[[19,6]]},"3286":{"position":[[16,6]]},"3300":{"position":[[23,6]]},"3314":{"position":[[13,6]]},"3328":{"position":[[18,6]]}}}],["driver.cli",{"_index":82,"t":{"3094":{"position":[[288,13]]}}}],["driver/mysql",{"_index":370,"t":{"3244":{"position":[[53,13]]}}}],["dure",{"_index":386,"t":{"3268":{"position":[[106,6]]}}}],["dynamodb",{"_index":60,"t":{"3088":{"position":[[42,8]]},"3160":{"position":[[2,8]]},"3166":{"position":[[0,8],[193,8]]},"3168":{"position":[[148,8]]},"3170":{"position":[[38,8],[326,8],[442,8],[518,9],[1467,8],[1636,8],[2163,8],[2332,8]]}}}],["dynamodb.new(dynamodb.config",{"_index":254,"t":{"3168":{"position":[[166,29]]}}}],["e.g",{"_index":260,"t":{"3170":{"position":[[161,4]]}}}],["each",{"_index":441,"t":{"3296":{"position":[[972,4]]}}}],["ec2",{"_index":247,"t":{"3160":{"position":[[177,3]]},"3314":{"position":[[171,3]]}}}],["effect",{"_index":426,"t":{"3296":{"position":[[541,7]]}}}],["empti",{"_index":37,"t":{"3086":{"position":[[518,5]]}}}],["enabl",{"_index":432,"t":{"3296":{"position":[[715,7]]}}}],["encount",{"_index":167,"t":{"3114":{"position":[[584,9]]},"3170":{"position":[[933,9]]},"3324":{"position":[[536,9]]}}}],["endpoint",{"_index":155,"t":{"3114":{"position":[[108,9],[191,8]]},"3116":{"position":[[56,9]]},"3170":{"position":[[459,9],[723,8]]},"3182":{"position":[[233,10]]},"3184":{"position":[[24,9],[53,9]]},"3186":{"position":[[28,10]]},"3322":{"position":[[255,9],[269,10]]},"3324":{"position":[[102,8],[111,8]]},"3326":{"position":[[52,8],[200,9]]}}}],["environ",{"_index":244,"t":{"3160":{"position":[[131,11]]},"3170":{"position":[[224,11],[261,11]]},"3314":{"position":[[125,11]]}}}],["err",{"_index":411,"t":{"3294":{"position":[[675,3],[737,3]]}}}],["error",{"_index":30,"t":{"3086":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"3094":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3108":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3122":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3136":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3150":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3164":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"3170":{"position":[[2737,5],[3002,7]]},"3178":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"3192":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3206":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3220":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3234":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3248":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3262":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3276":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3290":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3304":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3318":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3332":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]}}}],["especi",{"_index":266,"t":{"3170":{"position":[[480,10]]}}}],["establish",{"_index":327,"t":{"3184":{"position":[[117,9]]}}}],["etcd",{"_index":61,"t":{"3088":{"position":[[51,4]]},"3132":{"position":[[29,4]]},"3174":{"position":[[2,4],[28,4]]},"3180":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":320,"t":{"3182":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":321,"t":{"3182":{"position":[[216,16]]}}}],["exampl",{"_index":75,"t":{"3092":{"position":[[24,8]]},"3106":{"position":[[24,8]]},"3120":{"position":[[24,8]]},"3134":{"position":[[24,8]]},"3148":{"position":[[24,8]]},"3162":{"position":[[24,8]]},"3170":{"position":[[1407,7],[2103,7]]},"3176":{"position":[[24,8]]},"3190":{"position":[[24,8]]},"3204":{"position":[[24,8]]},"3218":{"position":[[24,8]]},"3232":{"position":[[24,8]]},"3246":{"position":[[24,8]]},"3260":{"position":[[24,8]]},"3274":{"position":[[24,8]]},"3288":{"position":[[24,8]]},"3296":{"position":[[555,8]]},"3302":{"position":[[24,8]]},"3316":{"position":[[24,8]]},"3330":{"position":[[24,8]]}}}],["execut",{"_index":438,"t":{"3296":{"position":[[920,7]]}}}],["exist",{"_index":26,"t":{"3086":{"position":[[371,5]]},"3100":{"position":[[491,8],[508,8]]},"3114":{"position":[[315,8],[332,8]]},"3128":{"position":[[118,8],[135,8]]},"3142":{"position":[[485,8],[502,8]]},"3170":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"3198":{"position":[[166,8],[183,8]]},"3226":{"position":[[626,8],[643,8]]},"3240":{"position":[[720,8],[737,8]]},"3254":{"position":[[735,8],[752,8]]},"3264":{"position":[[224,8]]},"3282":{"position":[[875,8],[892,8]]},"3296":{"position":[[1199,8],[1216,8]]},"3324":{"position":[[265,8],[282,8]]},"3338":{"position":[[179,8],[196,8]]}}}],["exp",{"_index":42,"t":{"3086":{"position":[[599,3]]},"3094":{"position":[[131,3]]},"3108":{"position":[[131,3]]},"3122":{"position":[[131,3]]},"3136":{"position":[[131,3]]},"3150":{"position":[[131,3]]},"3164":{"position":[[128,3]]},"3178":{"position":[[132,3]]},"3192":{"position":[[131,3]]},"3206":{"position":[[131,3]]},"3220":{"position":[[131,3]]},"3234":{"position":[[131,3]]},"3248":{"position":[[131,3]]},"3262":{"position":[[131,3]]},"3276":{"position":[[131,3]]},"3290":{"position":[[131,3]]},"3304":{"position":[[131,3]]},"3318":{"position":[[131,3]]},"3332":{"position":[[131,3]]}}}],["expir",{"_index":34,"t":{"3086":{"position":[[474,10],[503,11]]},"3100":{"position":[[596,7]]},"3128":{"position":[[218,7]]},"3212":{"position":[[45,7]]},"3240":{"position":[[820,7]]},"3254":{"position":[[835,7]]},"3282":{"position":[[975,7]]},"3338":{"position":[[279,7]]}}}],["fail",{"_index":326,"t":{"3184":{"position":[[106,7]]}}}],["failov",{"_index":404,"t":{"3294":{"position":[[419,8]]}}}],["failovercli",{"_index":433,"t":{"3296":{"position":[[723,14]]}}}],["failur",{"_index":169,"t":{"3114":{"position":[[604,8]]},"3170":{"position":[[953,8]]},"3324":{"position":[[556,8]]}}}],["fals",{"_index":116,"t":{"3098":{"position":[[347,6]]},"3100":{"position":[[555,5]]},"3102":{"position":[[151,6]]},"3114":{"position":[[376,5]]},"3116":{"position":[[96,6]]},"3126":{"position":[[281,6]]},"3128":{"position":[[177,5],[620,5]]},"3130":{"position":[[63,6],[196,6]]},"3140":{"position":[[298,6]]},"3142":{"position":[[445,5],[545,5]]},"3144":{"position":[[151,6],[165,6]]},"3170":{"position":[[1108,5],[2786,6]]},"3172":{"position":[[103,6]]},"3198":{"position":[[225,5]]},"3224":{"position":[[337,6],[549,6]]},"3226":{"position":[[685,5]]},"3228":{"position":[[134,6]]},"3238":{"position":[[323,6],[548,6]]},"3240":{"position":[[779,5]]},"3242":{"position":[[128,6]]},"3252":{"position":[[323,6],[516,6],[730,6]]},"3254":{"position":[[794,5]]},"3256":{"position":[[128,6]]},"3280":{"position":[[300,6]]},"3282":{"position":[[934,5]]},"3284":{"position":[[187,6]]},"3294":{"position":[[335,6],[1003,6],[1160,6]]},"3296":{"position":[[1263,5]]},"3298":{"position":[[116,6]]},"3322":{"position":[[308,6]]},"3324":{"position":[[325,5]]},"3326":{"position":[[284,6]]},"3336":{"position":[[310,6]]},"3338":{"position":[[238,5]]},"3340":{"position":[[88,6]]}}}],["fast",{"_index":173,"t":{"3118":{"position":[[2,4]]},"3132":{"position":[[165,5]]},"3258":{"position":[[2,4]]}}}],["fiber",{"_index":8,"t":{"3086":{"position":[[95,5]]},"3098":{"position":[[302,8]]},"3100":{"position":[[367,7]]},"3102":{"position":[[106,8]]},"3224":{"position":[[292,8],[504,8]]},"3226":{"position":[[502,7]]},"3228":{"position":[[89,8]]},"3238":{"position":[[283,8]]},"3240":{"position":[[606,7]]},"3242":{"position":[[88,8]]},"3252":{"position":[[283,8]]},"3254":{"position":[[621,7]]},"3256":{"position":[[88,8]]},"3282":{"position":[[674,7]]},"3284":{"position":[[127,8]]},"3338":{"position":[[65,7]]}}}],["fiber.badg",{"_index":180,"t":{"3126":{"position":[[256,17]]},"3128":{"position":[[65,16]]},"3130":{"position":[[38,17]]}}}],["fiber.db",{"_index":213,"t":{"3142":{"position":[[107,10]]},"3144":{"position":[[77,11]]}}}],["fiber.sqlite3",{"_index":482,"t":{"3336":{"position":[[260,18]]},"3340":{"position":[[38,18]]}}}],["fiber_storag",{"_index":115,"t":{"3098":{"position":[[323,16]]},"3100":{"position":[[437,15]]},"3102":{"position":[[127,16]]},"3142":{"position":[[182,15]]},"3144":{"position":[[97,16]]},"3158":{"position":[[138,16]]},"3170":{"position":[[354,16]]},"3172":{"position":[[35,16]]},"3224":{"position":[[313,16],[525,16]]},"3226":{"position":[[572,15]]},"3228":{"position":[[110,16]]},"3238":{"position":[[299,16]]},"3240":{"position":[[671,15]]},"3242":{"position":[[104,16]]},"3252":{"position":[[299,16]]},"3254":{"position":[[686,15]]},"3256":{"position":[[104,16]]},"3280":{"position":[[276,16]]},"3282":{"position":[[739,15]]},"3284":{"position":[[143,16]]},"3336":{"position":[[286,16]]},"3338":{"position":[[130,15]]},"3340":{"position":[[64,16]]}}}],["field",{"_index":133,"t":{"3102":{"position":[[23,6]]},"3160":{"position":[[67,6],[206,6]]},"3282":{"position":[[139,6]]},"3314":{"position":[[61,6],[200,6]]}}}],["file",{"_index":217,"t":{"3142":{"position":[[265,4]]},"3170":{"position":[[216,4]]}}}],["first",{"_index":95,"t":{"3096":{"position":[[114,5]]},"3110":{"position":[[119,5]]},"3124":{"position":[[100,5]]},"3138":{"position":[[99,5]]},"3152":{"position":[[103,5]]},"3166":{"position":[[102,5]]},"3180":{"position":[[98,5]]},"3194":{"position":[[100,5]]},"3208":{"position":[[100,5]]},"3222":{"position":[[101,5]]},"3236":{"position":[[99,5]]},"3250":{"position":[[99,5]]},"3264":{"position":[[100,5]]},"3278":{"position":[[102,5]]},"3292":{"position":[[99,5]]},"3306":{"position":[[103,5]]},"3320":{"position":[[96,5]]},"3334":{"position":[[101,5]]}}}],["follow",{"_index":103,"t":{"3098":{"position":[[89,9]]},"3112":{"position":[[90,9]]},"3126":{"position":[[87,9]]},"3140":{"position":[[86,9]]},"3154":{"position":[[90,9]]},"3168":{"position":[[89,9]]},"3182":{"position":[[85,9]]},"3196":{"position":[[89,9]]},"3210":{"position":[[87,9]]},"3224":{"position":[[88,9]]},"3238":{"position":[[86,9]]},"3252":{"position":[[86,9]]},"3266":{"position":[[87,9]]},"3280":{"position":[[92,9]]},"3294":{"position":[[100,9]]},"3308":{"position":[[90,9]]},"3322":{"position":[[83,9]]},"3336":{"position":[[88,9]]}}}],["format",{"_index":425,"t":{"3296":{"position":[[433,6]]}}}],["free",{"_index":284,"t":{"3170":{"position":[[1369,4],[2065,4]]}}}],["frequenc",{"_index":460,"t":{"3308":{"position":[[303,9]]},"3310":{"position":[[60,9]]}}}],["full",{"_index":204,"t":{"3132":{"position":[[227,4]]}}}],["func",{"_index":78,"t":{"3094":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3108":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3122":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3136":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3150":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3164":{"position":[[0,4],[32,4],[82,4],[153,4],[196,4],[228,4],[260,4]]},"3178":{"position":[[0,4],[36,4],[86,4],[157,4],[200,4],[232,4],[264,4]]},"3192":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3206":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3220":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3234":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3248":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3262":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3276":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3290":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3304":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3318":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3332":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]}}}],["garbag",{"_index":51,"t":{"3086":{"position":[[877,7]]}}}],["gcinterv",{"_index":117,"t":{"3098":{"position":[[354,11]]},"3100":{"position":[[653,10]]},"3102":{"position":[[158,11]]},"3126":{"position":[[288,11]]},"3128":{"position":[[275,10]]},"3130":{"position":[[70,11]]},"3210":{"position":[[246,11]]},"3212":{"position":[[92,10]]},"3214":{"position":[[28,11]]},"3238":{"position":[[330,11],[555,11]]},"3240":{"position":[[877,10]]},"3242":{"position":[[135,11]]},"3252":{"position":[[330,11],[523,11],[737,11]]},"3254":{"position":[[892,10]]},"3256":{"position":[[135,11]]},"3280":{"position":[[307,11]]},"3282":{"position":[[1032,10]]},"3284":{"position":[[194,11]]},"3336":{"position":[[317,11]]},"3338":{"position":[[336,10]]},"3340":{"position":[[95,11]]}}}],["get",{"_index":21,"t":{"3086":{"position":[[289,4]]}}}],["get(key",{"_index":27,"t":{"3086":{"position":[[377,7]]},"3094":{"position":[[53,7]]},"3108":{"position":[[53,7]]},"3122":{"position":[[53,7]]},"3136":{"position":[[53,7]]},"3150":{"position":[[53,7]]},"3164":{"position":[[50,7]]},"3178":{"position":[[54,7]]},"3192":{"position":[[53,7]]},"3206":{"position":[[53,7]]},"3220":{"position":[[53,7]]},"3234":{"position":[[53,7]]},"3248":{"position":[[53,7]]},"3262":{"position":[[53,7]]},"3276":{"position":[[53,7]]},"3290":{"position":[[53,7]]},"3304":{"position":[[53,7]]},"3318":{"position":[[53,7]]},"3332":{"position":[[53,7]]}}}],["github.com//:@127.0.0.1:6379/:@localhost:6379/:@tcp(:)// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/mysql_v1.x.x/arangodb/","h":"#installation","p":3346},{"i":3355,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/arangodb/","h":"#examples","p":3346},{"i":3357,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/arangodb/","h":"#config","p":3346},{"i":3359,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/arangodb/","h":"#default-config","p":3346},{"i":3361,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/mysql_v1.x.x/azureblob/","h":"","p":3360},{"i":3363,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/azureblob/","h":"#table-of-contents","p":3360},{"i":3365,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/azureblob/","h":"#signatures","p":3360},{"i":3367,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/mysql_v1.x.x/azureblob/","h":"#installation","p":3360},{"i":3369,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/mysql_v1.x.x/azureblob/","h":"#examples","p":3360},{"i":3371,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/mysql_v1.x.x/azureblob/","h":"#config","p":3360},{"i":3373,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/mysql_v1.x.x/azureblob/","h":"#default-config","p":3360},{"i":3375,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/mysql_v1.x.x/badger/","h":"","p":3374},{"i":3377,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/badger/","h":"#table-of-contents","p":3374},{"i":3379,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/badger/","h":"#signatures","p":3374},{"i":3381,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/mysql_v1.x.x/badger/","h":"#installation","p":3374},{"i":3383,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/badger/","h":"#examples","p":3374},{"i":3385,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/mysql_v1.x.x/badger/","h":"#config","p":3374},{"i":3387,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/mysql_v1.x.x/badger/","h":"#default-config","p":3374},{"i":3389,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/mysql_v1.x.x/bbolt/","h":"","p":3388},{"i":3391,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/bbolt/","h":"#table-of-contents","p":3388},{"i":3393,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/bbolt/","h":"#signatures","p":3388},{"i":3395,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/mysql_v1.x.x/bbolt/","h":"#installation","p":3388},{"i":3397,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/mysql_v1.x.x/bbolt/","h":"#examples","p":3388},{"i":3399,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/mysql_v1.x.x/bbolt/","h":"#config","p":3388},{"i":3401,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/mysql_v1.x.x/bbolt/","h":"#default-config","p":3388},{"i":3403,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/mysql_v1.x.x/couchbase/","h":"","p":3402},{"i":3405,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/couchbase/","h":"#table-of-contents","p":3402},{"i":3407,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/mysql_v1.x.x/couchbase/","h":"#signatures","p":3402},{"i":3409,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/mysql_v1.x.x/couchbase/","h":"#installation","p":3402},{"i":3411,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/couchbase/","h":"#examples","p":3402},{"i":3413,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/couchbase/","h":"#config","p":3402},{"i":3415,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/couchbase/","h":"#default-config","p":3402},{"i":3417,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/mysql_v1.x.x/dynamodb/","h":"","p":3416},{"i":3419,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#table-of-contents","p":3416},{"i":3421,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#signatures","p":3416},{"i":3423,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#installation","p":3416},{"i":3425,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#examples","p":3416},{"i":3427,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#config","p":3416},{"i":3429,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/mysql_v1.x.x/dynamodb/","h":"#default-config","p":3416},{"i":3431,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/mysql_v1.x.x/etcd/","h":"","p":3430},{"i":3433,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/etcd/","h":"#table-of-contents","p":3430},{"i":3435,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/etcd/","h":"#signatures","p":3430},{"i":3437,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/mysql_v1.x.x/etcd/","h":"#installation","p":3430},{"i":3439,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/mysql_v1.x.x/etcd/","h":"#examples","p":3430},{"i":3441,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/mysql_v1.x.x/etcd/","h":"#config","p":3430},{"i":3443,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/mysql_v1.x.x/etcd/","h":"#default-config","p":3430},{"i":3445,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/mysql_v1.x.x/memcache/","h":"","p":3444},{"i":3447,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/memcache/","h":"#table-of-contents","p":3444},{"i":3449,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/memcache/","h":"#signatures","p":3444},{"i":3451,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/mysql_v1.x.x/memcache/","h":"#installation","p":3444},{"i":3453,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/mysql_v1.x.x/memcache/","h":"#examples","p":3444},{"i":3455,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/mysql_v1.x.x/memcache/","h":"#config","p":3444},{"i":3457,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/mysql_v1.x.x/memcache/","h":"#default-config","p":3444},{"i":3459,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/mysql_v1.x.x/memory/","h":"","p":3458},{"i":3461,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/memory/","h":"#table-of-contents","p":3458},{"i":3463,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/mysql_v1.x.x/memory/","h":"#signatures","p":3458},{"i":3465,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/mysql_v1.x.x/memory/","h":"#installation","p":3458},{"i":3467,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/memory/","h":"#examples","p":3458},{"i":3469,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/memory/","h":"#config","p":3458},{"i":3471,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/memory/","h":"#default-config","p":3458},{"i":3473,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/mysql_v1.x.x/mongodb/","h":"","p":3472},{"i":3475,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/mongodb/","h":"#table-of-contents","p":3472},{"i":3477,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/mysql_v1.x.x/mongodb/","h":"#signatures","p":3472},{"i":3479,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/mysql_v1.x.x/mongodb/","h":"#installation","p":3472},{"i":3481,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/mysql_v1.x.x/mongodb/","h":"#examples","p":3472},{"i":3483,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/mysql_v1.x.x/mongodb/","h":"#config","p":3472},{"i":3485,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/mysql_v1.x.x/mongodb/","h":"#default-config","p":3472},{"i":3487,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/mysql_v1.x.x/mssql/","h":"","p":3486},{"i":3489,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/mssql/","h":"#table-of-contents","p":3486},{"i":3491,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/mssql/","h":"#signatures","p":3486},{"i":3493,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/mysql_v1.x.x/mssql/","h":"#installation","p":3486},{"i":3495,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/mssql/","h":"#examples","p":3486},{"i":3497,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/mysql_v1.x.x/mssql/","h":"#config","p":3486},{"i":3499,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/mysql_v1.x.x/mssql/","h":"#default-config","p":3486},{"i":3501,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/mysql_v1.x.x/mysql/","h":"","p":3500},{"i":3503,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/mysql/","h":"#table-of-contents","p":3500},{"i":3505,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/mysql/","h":"#signatures","p":3500},{"i":3507,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/mysql_v1.x.x/mysql/","h":"#installation","p":3500},{"i":3509,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/mysql/","h":"#examples","p":3500},{"i":3511,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/mysql/","h":"#config","p":3500},{"i":3513,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/mysql/","h":"#default-config","p":3500},{"i":3515,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/mysql_v1.x.x/pebble/","h":"","p":3514},{"i":3517,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/pebble/","h":"#table-of-contents","p":3514},{"i":3519,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/pebble/","h":"#signatures","p":3514},{"i":3521,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/mysql_v1.x.x/pebble/","h":"#installation","p":3514},{"i":3523,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/mysql_v1.x.x/pebble/","h":"#examples","p":3514},{"i":3525,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/mysql_v1.x.x/pebble/","h":"#config","p":3514},{"i":3527,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/mysql_v1.x.x/pebble/","h":"#default-config","p":3514},{"i":3529,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/mysql_v1.x.x/postgres/","h":"","p":3528},{"i":3531,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/postgres/","h":"#table-of-contents","p":3528},{"i":3533,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/mysql_v1.x.x/postgres/","h":"#signatures","p":3528},{"i":3535,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/mysql_v1.x.x/postgres/","h":"#installation","p":3528},{"i":3537,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/postgres/","h":"#examples","p":3528},{"i":3539,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/postgres/","h":"#config","p":3528},{"i":3541,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/postgres/","h":"#default-config","p":3528},{"i":3543,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/mysql_v1.x.x/redis/","h":"","p":3542},{"i":3545,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/redis/","h":"#table-of-contents","p":3542},{"i":3547,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/mysql_v1.x.x/redis/","h":"#signatures","p":3542},{"i":3549,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/mysql_v1.x.x/redis/","h":"#installation","p":3542},{"i":3551,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/mysql_v1.x.x/redis/","h":"#examples","p":3542},{"i":3553,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/mysql_v1.x.x/redis/","h":"#config","p":3542},{"i":3555,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/mysql_v1.x.x/redis/","h":"#default-config","p":3542},{"i":3557,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/mysql_v1.x.x/ristretto/","h":"","p":3556},{"i":3559,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/ristretto/","h":"#table-of-contents","p":3556},{"i":3561,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/mysql_v1.x.x/ristretto/","h":"#signatures","p":3556},{"i":3563,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/mysql_v1.x.x/ristretto/","h":"#installation","p":3556},{"i":3565,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/mysql_v1.x.x/ristretto/","h":"#examples","p":3556},{"i":3567,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/mysql_v1.x.x/ristretto/","h":"#config","p":3556},{"i":3569,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/mysql_v1.x.x/ristretto/","h":"#default-config","p":3556},{"i":3571,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/mysql_v1.x.x/s3/","h":"","p":3570},{"i":3573,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/s3/","h":"#table-of-contents","p":3570},{"i":3575,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/mysql_v1.x.x/s3/","h":"#signatures","p":3570},{"i":3577,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/mysql_v1.x.x/s3/","h":"#installation","p":3570},{"i":3579,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/mysql_v1.x.x/s3/","h":"#examples","p":3570},{"i":3581,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/mysql_v1.x.x/s3/","h":"#config","p":3570},{"i":3583,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/mysql_v1.x.x/s3/","h":"#default-config","p":3570},{"i":3585,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/mysql_v1.x.x/sqlite3/","h":"","p":3584},{"i":3587,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#table-of-contents","p":3584},{"i":3589,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#signatures","p":3584},{"i":3591,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#installation","p":3584},{"i":3593,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#examples","p":3584},{"i":3595,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#config","p":3584},{"i":3597,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/mysql_v1.x.x/sqlite3/","h":"#default-config","p":3584}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3343",[0,2.408,1,1.183,2,1.08,3,1.021,4,4.843,5,2.408,6,0.588,7,2.408,8,1.112,9,2.408,10,1.49,11,2.408,12,2.408,13,2.408,14,3.958,15,2.131,16,2.408,17,2.408,18,2.408,19,2.408,20,1.021,21,2.408,22,4.489,23,2.813,24,2.177,25,3.13,26,1.145,27,1.021,28,1.287,29,1.64,30,2.813,31,1.705,32,0.994,33,2.408,34,2.36,35,1.41,36,2.408,37,2.408,38,2.408,39,2.408,40,1.021,41,1.021,42,1.021,43,0.762,44,2.957,45,1.705,46,1.021,47,0.937,48,2.054,49,2.408,50,2.131,51,2.408,52,2.408,53,1.95,54,1.262]],["t/3345",[55,4.571,56,5.645,57,4.571,58,4.252,59,3.998,60,3.998,61,4.252,62,4.997,63,3.998,64,4.571,65,4.571,66,3.998,67,4.997,68,4.252,69,3.998,70,3.998,71,4.571]],["t/3347",[1,1.131,2,3.761,6,1.589,55,5.272,72,7.823]],["t/3349",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3351",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,82,4.122]],["t/3353",[3,2.17,55,4.143,66,3.623,74,1.45,83,2.112,84,2.112,85,2.23,86,5.116,87,2.733,88,2.23,89,2.17,90,2.23,91,2.17,92,2.17,93,1.45,94,2.17,95,2.23,96,2.23,97,2.23,98,2.23,99,2.23,100,4.529]],["t/3355",[1,1.032,6,1.04,8,1.967,10,1.493,32,2.452,47,0.824,76,0.458,77,0.824,93,1.683,100,3.771,101,2.589,102,1.857,103,1.857,104,1.91,105,1.807,106,4.26,107,1.857,108,4.26,109,1.759,110,3.45,111,1.91,112,3.45,113,1.444,114,2.721,115,1.628,116,1.234,117,1.714,118,1.589,119,1.514]],["t/3357",[8,1.194,10,1.657,20,1.097,23,1.69,26,1.947,28,1.672,34,1.58,43,0.819,44,1.58,47,0.792,76,0.199,77,1.406,109,2.097,110,2.095,111,1.836,112,2.095,113,1.388,114,3.244,115,0.989,116,0.749,117,1.041,118,0.965,119,0.919,120,1.128,121,2.416,122,2.074,123,3.355,124,1.735,125,1.457,126,2.305,127,2.074,128,2.074,129,1.311,130,1.311,131,1.404,132,1.58]],["t/3359",[6,1.283,8,2.427,10,1.41,47,1.017,76,0.405,109,2.171,110,4.256,111,2.357,112,4.256,113,1.782,114,3.357,115,2.009,116,1.523,117,2.114,118,1.96,119,1.868,123,2.427,133,3.96,134,2.292,135,2.292]],["t/3361",[1,1.268,87,2.117,136,5.15,137,5.15,138,5.817,139,5.15,140,5.817,141,5.817,142,4.382,143,5.817,144,5.817,145,4.12,146,5.817,147,5.817]],["t/3363",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3365",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,148,4.122]],["t/3367",[1,0.854,2,2.206,3,2.086,74,1.394,83,2.031,84,2.031,85,2.144,87,2.68,88,2.144,89,2.086,90,2.144,91,2.086,92,2.086,93,1.394,94,2.086,95,2.144,96,2.144,97,2.144,98,2.144,99,2.144,136,5.798,137,5.798,149,4.354]],["t/3369",[1,1.056,6,1.076,10,1.509,23,1.82,32,2.511,45,3.122,76,0.469,77,0.853,83,2.874,93,1.723,101,2.651,102,1.922,103,1.922,104,1.977,105,1.869,107,1.922,149,3.902,150,4.407,151,4.407,152,4.924,153,3.561,154,4.407]],["t/3371",[1,0.782,10,1.555,20,1.24,23,2.268,26,2.142,28,1.459,35,1.712,43,0.925,45,3.891,47,0.871,76,0.225,77,1.289,116,0.847,120,1.275,121,2.142,123,3.077,125,1.646,129,1.481,130,1.481,131,1.587,152,3.647,153,3.614,155,2.637,156,2.923,157,3.647,158,2.876,159,2.202,160,1.867,161,3.647,162,3.647,163,2.367,164,2.367,165,1.867,166,1.867,167,2.367,168,2.367,169,2.367,170,2.367,171,1.785,172,1.961]],["t/3373",[10,1.583,35,3.306,45,3.998,47,1.092,76,0.435,116,1.635,134,2.461,135,2.461,152,4.571,155,3.306,159,4.252,171,3.447,172,3.786]],["t/3375",[6,1.616,14,4.044,23,2.735,122,3.356,173,5.363,174,5.864,175,6.623]],["t/3377",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3379",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3381",[3,2.199,57,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,177,4.59]],["t/3383",[1,1.082,6,1.114,10,1.525,32,2.572,47,0.883,76,0.48,77,0.883,93,1.765,101,2.716,102,1.99,103,1.99,104,2.047,105,1.936,107,1.99,113,1.548,116,1.322,117,1.836,118,1.703,119,1.622,177,4.042,178,4.565,179,4.565,180,3.697]],["t/3385",[6,1.086,10,1.63,20,1.221,23,1.838,24,1.621,26,2.117,28,0.765,31,2.039,34,1.758,43,0.911,44,1.758,47,0.861,57,3.604,76,0.222,77,1.411,113,1.509,116,1.289,117,1.158,118,1.074,119,1.023,120,1.255,121,1.37,123,3.368,129,1.459,130,2.255,131,1.563,132,1.758,180,2.332,181,1.291,182,3.94,183,2.879,184,2.879,185,2.879,186,5.419,187,2.879,188,3.94,189,2.039]],["t/3387",[10,1.439,24,3.088,47,1.061,76,0.423,113,1.858,116,2.037,117,2.205,118,2.045,119,1.948,134,2.39,135,2.39,180,4.44,182,4.854,186,4.854,188,4.854,190,5.483]],["t/3389",[1,0.803,2,2.072,6,1.128,15,4.091,32,1.908,58,3.481,61,3.481,66,3.273,68,3.481,87,1.682,113,2.129,126,2.602,145,3.273,173,3.742,191,4.621,192,4.621,193,4.621,194,4.621,195,4.621,196,4.621,197,4.621,198,4.621,199,7.134,200,4.621,201,4.621,202,4.621,203,3.742,204,4.621,205,4.621]],["t/3391",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3393",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,206,4.122]],["t/3395",[3,2.199,58,3.906,70,3.673,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,207,4.59]],["t/3397",[1,1.1,6,1.141,10,1.49,32,2.615,47,0.905,76,0.488,77,0.905,93,1.795,101,2.761,102,2.039,103,2.039,104,2.098,105,1.984,107,2.039,113,1.585,116,1.355,207,4.141,208,4.677,209,4.677,210,4.677,211,3.566]],["t/3399",[1,0.516,10,1.629,20,1.259,23,1.226,26,2.168,28,1.211,43,0.94,47,0.881,53,2.404,58,2.237,76,0.428,77,1.298,113,1.88,115,1.135,116,1.32,119,1.055,120,1.294,121,1.412,123,3.098,129,1.504,130,2.309,131,1.611,158,2.911,189,2.103,211,3.123,212,2.237,213,2.628,214,2.628,215,2.969,216,2.969,217,2.628,218,2.969,219,2.628,220,2.969,221,2.969,222,2.628,223,2.628,224,2.404,225,2.628]],["t/3401",[10,1.501,47,1.031,76,0.532,77,1.031,113,1.807,115,2.037,116,2,119,1.894,134,2.324,135,3.01,158,3.404,211,3.001,213,4.718,222,4.718,225,4.718]],["t/3403",[1,1.192,2,3.077,6,1.674,59,4.86,226,6.861]],["t/3405",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3407",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,227,4.122]],["t/3409",[3,2.199,59,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,228,4.59]],["t/3411",[1,1.174,6,1.017,10,1.522,32,2.415,35,2.44,59,2.952,76,0.451,77,0.806,93,1.657,101,2.549,102,1.817,103,1.817,104,1.869,105,1.768,107,1.817,109,1.721,119,2.078,127,2.112,128,2.112,171,2.544,211,2.347,228,3.689,229,4.167,230,4.167,231,3.689,232,3.374,233,3.374,234,2.661]],["t/3413",[10,1.52,20,1.626,28,1.985,43,1.744,54,3.916,59,5.293,76,0.296,109,1.583,120,1.671,121,1.823,127,2.792,128,2.792,158,3.519,211,3.103,232,3.104,233,3.104,235,5.51,236,6.616,237,3.833,238,3.393]],["t/3415",[10,1.529,76,0.514,77,0.976,109,2.085,115,1.93,119,2.368,127,2.558,128,2.558,134,2.201,135,2.905,171,3.082,211,2.843,231,4.469,232,4.088,233,4.088,234,3.224,239,5.048,240,5.048]],["t/3417",[1,0.803,2,2.072,6,1.741,10,0.856,22,5.085,60,3.273,76,0.55,87,1.682,133,4.731,142,3.481,153,4.688,241,4.091,242,4.091,243,4.091,244,3.742,245,3.742,246,4.091,247,4.091,248,3.742,249,4.091,250,4.091,251,4.091]],["t/3419",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3421",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,252,4.122]],["t/3423",[3,2.199,60,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,253,4.59]],["t/3425",[1,1.244,6,1.378,10,1.458,32,2.331,60,3.998,93,1.6,101,3.123,102,2.461,103,2.461,104,2.531,105,2.394,253,4.997,254,5.645]],["t/3427",[6,0.491,10,1.55,14,2.039,20,0.854,23,1.13,25,1.63,26,2.036,28,1.022,30,0.831,31,1.425,45,1.425,47,0.389,50,0.993,60,3.528,75,0.831,76,0.155,77,1.069,83,0.463,84,0.463,91,0.476,92,0.476,105,1.974,107,0.489,115,0.429,116,0.583,120,0.877,121,0.533,123,2.433,125,0.631,129,0.568,130,1.02,131,0.609,132,0.685,145,1.425,153,2.252,155,1.179,157,0.908,158,0.716,160,0.716,161,1.63,162,1.63,163,0.908,164,0.908,165,0.716,166,0.716,167,0.908,168,0.908,169,0.908,170,0.908,171,0.685,172,0.752,181,2.83,203,0.908,211,0.631,217,0.993,223,1.782,244,1.63,245,1.63,255,1.516,256,2.012,257,1.121,258,1.121,259,1.121,260,1.121,261,1.121,262,1.121,263,1.121,264,1.121,265,1.121,266,1.121,267,1.121,268,2.738,269,2.012,270,1.121,271,1.121,272,3.846,273,1.121,274,2.424,275,3.339,276,3.846,277,1.782,278,2.012,279,2.012,280,2.012,281,2.012,282,2.012,283,2.012,284,2.012,285,2.012,286,2.012,287,3.339,288,3.339,289,2.012,290,2.012,291,2.012,292,2.012,293,2.012,294,2.012,295,2.012,296,1.782,297,0.993,298,2.424,299,1.782,300,1.121,301,1.121,302,2.012,303,1.782,304,1.121,305,0.845,306,1.121,307,1.121,308,1.121,309,1.121,310,0.993,311,1.121,312,1.121,313,1.121,314,0.993,315,0.993]],["t/3429",[10,1.303,47,1.061,76,0.423,115,2.096,116,1.588,134,2.39,135,2.39,153,4.118,171,3.348,172,3.678,181,2.459,274,4.854,277,6.225,297,4.854,298,4.854,316,5.483]],["t/3431",[1,1.171,2,3.023,6,1.645,61,6.017,317,6.74]],["t/3433",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3435",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,318,4.122]],["t/3437",[3,2.199,61,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,319,4.59]],["t/3439",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,155,2.88,319,4.354,320,4.918,321,4.918,322,4.354]],["t/3441",[10,1.532,20,1.807,28,1.816,43,1.348,54,2.232,76,0.328,120,1.857,127,3.464,128,3.464,153,2.495,155,3.478,158,2.721,305,3.209,323,3.45,324,3.017,325,5.257,326,4.26,327,4.26,328,4.206,329,4.474,330,4.26,331,4.26,332,3.45]],["t/3443",[10,1.583,24,3.179,76,0.435,84,2.331,119,2.006,127,2.86,128,2.86,134,2.461,135,2.461,155,3.306,322,4.997,325,4.997,329,4.252]],["t/3445",[1,1.192,2,3.077,6,1.674,62,6.074,333,6.861]],["t/3447",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3449",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,334,4.122]],["t/3451",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3453",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,126,2.77,336,4.918,337,4.918,338,4.918,339,4.918]],["t/3455",[10,1.622,20,1.891,23,1.841,26,2.916,28,1.185,47,1.186,76,0.344,77,1.186,116,1.292,120,1.944,123,2.83,126,3.451,129,2.259,130,2.259,181,2,323,3.611,340,4.459,341,4.459,342,4.459,343,4.459,344,3.947]],["t/3457",[10,1.465,76,0.511,126,3.73,134,2.888,135,2.888,344,5.864]],["t/3459",[1,1.236,2,3.192,63,5.041]],["t/3461",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3463",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,345,4.122]],["t/3465",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3467",[1,1.119,6,1.17,10,1.547,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,117,1.929,118,1.788,119,1.704,335,3.883,346,4.795,347,4.795]],["t/3469",[10,1.606,20,2.326,23,2.264,34,3.348,43,1.735,44,3.348,76,0.423,77,1.061,117,2.205,118,2.045,119,1.948,120,2.39,131,2.976,132,3.348]],["t/3471",[10,1.543,76,0.494,117,2.575,118,2.387,119,2.274,134,2.791,135,2.791]],["t/3473",[1,1.151,2,3.545,6,1.616,64,5.363,87,2.411,348,6.623]],["t/3475",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3477",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,349,4.122]],["t/3479",[3,2.199,64,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,350,4.59]],["t/3481",[1,0.924,6,1.298,8,2.455,10,1.5,28,0.97,32,2.591,47,1.029,54,1.912,76,0.484,77,0.706,93,1.778,101,2.319,102,1.591,103,1.591,104,1.637,105,1.548,107,2.319,109,1.507,111,1.637,113,1.803,114,3.397,115,2.033,116,1.541,350,3.231,351,3.65,352,5.318,353,1.791,354,2.955,355,1.981,356,3.65]],["t/3483",[6,0.994,8,1.186,10,1.656,14,1.569,20,1.09,23,1.061,26,1.937,28,1.857,47,0.788,54,1.346,76,0.198,77,1.402,109,2.088,111,1.826,113,1.38,114,2.6,115,0.982,116,0.744,120,1.12,121,2.406,122,2.562,123,3.347,124,1.724,125,1.447,126,2.293,127,2.063,128,2.063,129,1.302,130,1.302,160,1.641,181,1.152,328,1.82,353,1.261,354,2.081,355,1.395]],["t/3485",[8,2.606,10,1.458,47,1.092,76,0.435,109,2.331,111,2.531,113,1.913,114,3.605,115,2.158,116,1.635,134,2.461,135,2.461,353,2.77,354,4.571,355,3.063]],["t/3487",[1,1.171,2,3.023,6,1.645,65,5.458,357,6.74,358,6.74]],["t/3489",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3491",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3493",[3,2.199,65,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,360,4.59]],["t/3495",[1,0.887,6,1.246,8,1.594,10,1.534,28,0.917,32,2.509,47,0.988,54,1.809,76,0.468,77,0.668,93,1.722,101,2.226,102,1.505,103,1.505,104,1.548,105,1.464,107,2.226,109,1.425,111,1.548,113,1.17,115,1.32,116,1.479,117,2.054,118,1.904,119,1.814,181,1.548,353,1.694,355,1.873,360,3.056,361,3.452,362,5.105,363,2.795,364,2.445,365,2.445,366,3.452]],["t/3497",[1,0.35,6,0.815,8,0.93,10,1.66,14,1.23,20,0.854,23,1.38,26,1.59,28,1.821,34,1.23,43,0.637,44,1.23,47,0.646,54,1.751,76,0.33,77,1.403,109,1.768,111,1.498,113,1.133,115,0.77,116,0.583,117,0.81,118,0.751,119,0.716,120,0.878,121,2.371,122,2.17,123,3.348,124,1.351,125,1.134,126,1.882,127,1.693,128,1.693,129,1.021,130,1.021,131,1.093,132,1.23,160,1.286,181,1.92,189,1.427,224,1.631,248,2.706,328,1.427,353,0.988,355,1.093,363,1.631,364,1.427,365,1.427,367,1.783]],["t/3499",[8,2.394,10,1.486,47,1.003,76,0.4,109,2.141,111,2.325,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,1.842,134,2.261,135,2.261,181,2.325,353,2.544,355,2.814,363,4.199,364,3.673,365,3.673]],["t/3501",[1,1.131,2,2.92,6,1.589,66,4.611,87,2.369,368,6.51,369,5.764,370,6.51]],["t/3503",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3505",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3507",[3,2.199,66,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,371,4.59]],["t/3509",[1,0.769,6,1.322,8,1.319,10,1.563,28,0.759,32,2.518,47,1.047,54,2.319,76,0.47,77,0.553,93,1.728,101,1.929,102,1.246,103,1.246,104,1.282,105,1.212,107,2.361,109,1.18,111,1.282,113,0.969,115,1.092,116,1.569,117,2.178,118,2.019,119,1.924,122,3.09,181,1.282,353,1.402,355,1.551,369,2.53,371,2.53,372,2.858,373,5.415,374,2.314,375,4.425,376,2.858,377,2.858]],["t/3511",[6,1.094,8,0.993,10,1.653,14,2.153,20,0.912,23,1.456,24,1.211,26,1.678,28,1.726,34,1.313,43,0.681,44,1.313,47,0.682,54,1.127,76,0.166,77,1.398,109,1.851,111,1.581,113,1.195,115,0.822,116,0.623,117,0.865,118,0.802,119,0.764,120,0.937,121,2.133,122,2.901,123,3.337,124,1.442,125,1.211,126,1.986,127,1.787,128,1.787,129,1.09,130,1.09,131,1.167,132,1.313,160,2.252,181,2.01,328,2.498,353,1.055,355,1.914,359,1.62,374,1.741]],["t/3513",[8,2.461,10,1.501,47,1.031,76,0.411,109,2.201,111,2.39,113,1.807,115,2.037,116,1.544,117,2.144,118,1.988,119,1.894,134,2.324,135,2.324,181,2.39,353,2.615,355,2.893,374,4.316]],["t/3515",[6,1.645,14,4.115,23,2.783,122,3.415,173,5.458,378,6.74]],["t/3517",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3519",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3521",[3,2.034,26,2.281,67,5.7,74,1.359,83,1.98,84,1.98,85,2.09,87,2.646,88,2.09,89,2.034,90,2.807,91,2.034,92,2.034,93,1.359,94,2.034,95,2.09,96,2.09,97,2.09,98,2.09,99,2.09,142,3.612,145,3.396,203,3.883,379,4.795,380,4.245]],["t/3523",[1,1.119,6,1.17,10,1.503,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,122,2.43,212,3.612,380,4.245,381,4.795,382,4.795,383,3.883,384,3.883]],["t/3525",[10,1.607,20,2.034,24,2.7,28,1.274,76,0.37,77,1.245,113,1.625,120,2.09,121,2.281,122,2.43,123,3.356,212,3.612,238,4.245,310,5.7,383,3.883,384,3.883,385,4.795,386,4.795]],["t/3527",[10,1.435,76,0.494,122,3.244,134,2.791,135,2.791,212,4.823,383,5.184,384,5.184]],["t/3529",[1,1.192,2,3.077,6,1.674,68,5.169,387,6.861]],["t/3531",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3533",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,388,3.649]],["t/3535",[3,2.199,68,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,389,4.59]],["t/3537",[1,1.065,6,1.088,10,1.514,32,2.531,47,0.862,76,0.473,77,0.862,93,1.737,101,2.672,102,1.944,103,1.944,104,2,105,1.891,107,1.944,115,1.705,116,1.292,117,1.794,118,1.663,119,1.584,122,2.259,181,2,389,3.947,390,4.459,391,4.459,392,4.459]],["t/3539",[1,0.339,6,0.795,8,0.901,10,1.65,14,1.192,20,0.828,23,1.345,24,1.099,26,1.549,28,1.733,34,1.192,43,0.618,44,1.192,47,0.63,54,2.561,76,0.323,77,1.388,109,1.729,111,1.46,113,1.104,115,0.746,116,0.566,117,0.785,118,0.728,119,0.694,120,0.851,121,1.992,122,2.753,123,3.313,124,1.31,125,1.099,126,1.834,127,1.65,128,1.65,129,0.989,130,0.989,131,1.06,132,1.192,133,1.471,139,1.728,160,2.08,181,1.878,189,1.383,224,1.581,328,1.383,353,0.958,355,1.06,364,1.383,365,1.383,367,1.728,388,2.883,393,1.952,394,1.728]],["t/3541",[8,2.271,10,1.515,47,0.951,76,0.505,77,0.951,109,2.031,111,2.206,113,1.667,115,1.88,116,1.425,117,1.978,118,1.834,119,1.747,134,2.144,135,2.855,181,2.206,353,2.413,355,2.669,364,3.483,365,3.483,394,4.354]],["t/3543",[1,1.171,2,3.023,6,1.645,69,4.774,87,2.453,395,6.74]],["t/3545",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3547",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,396,4.122]],["t/3549",[3,2.199,69,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,397,4.59]],["t/3551",[1,0.627,6,0.54,10,1.605,24,2.033,25,1.792,32,2.575,35,1.296,47,0.884,69,3.737,76,0.278,77,0.428,89,0.938,93,1.495,94,0.938,101,1.574,102,0.965,103,0.965,105,1.94,107,0.965,109,0.914,111,0.992,113,0.75,116,1.325,118,0.825,121,1.052,123,1.021,127,1.121,128,1.121,236,1.959,299,1.959,305,3.975,324,3.239,329,1.667,332,1.792,353,1.086,397,1.959,398,2.212,399,5.813,400,1.792,401,2.923,402,1.792,403,1.959,404,2.212,405,1.792,406,2.212,407,2.923,408,3.61,409,2.212,410,2.212,411,3.61,412,2.212,413,2.212,414,2.212,415,3.61,416,2.212,417,2.212,418,2.212,419,2.212,420,2.212,421,3.61,422,2.212]],["t/3553",[6,0.381,10,1.649,20,0.662,23,0.645,24,0.879,26,1.281,28,1.704,31,1.908,35,0.914,47,0.521,54,1.861,69,1.106,75,0.645,76,0.274,77,1.377,81,0.662,109,1.745,111,1.593,113,1.204,114,0.997,116,0.452,118,0.582,120,0.681,121,1.281,122,1.365,123,3.347,124,1.047,125,2,126,2,127,1.8,128,1.8,129,0.791,130,0.791,165,0.997,166,0.997,219,1.382,305,1.176,323,1.264,324,2.516,329,2.029,332,1.264,353,0.766,400,1.264,401,1.264,402,1.264,405,2.181,407,1.264,423,1.561,424,1.561,425,1.561,426,1.561,427,1.561,428,1.561,429,2.694,430,1.561,431,1.561,432,1.561,433,1.561,434,1.561,435,1.561,436,1.561,437,3.145,438,1.561,439,1.561,440,1.561,441,1.561,442,2.385,443,2.385,444,1.561,445,1.561,446,1.264,447,1.561,448,1.561,449,1.561]],["t/3555",[10,1.622,24,2.511,28,1.185,35,2.611,47,0.862,76,0.344,109,1.841,111,2,113,1.511,116,1.292,118,1.663,127,2.259,128,2.259,134,1.944,135,1.944,324,3.158,353,2.188,400,3.611,401,3.611,402,3.611,403,3.947,405,3.611,407,3.611,437,3.947,442,3.947,443,3.947]],["t/3557",[1,1.151,2,2.97,6,1.616,63,4.691,174,5.864,450,6.623,451,6.623]],["t/3559",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3561",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,452,4.122]],["t/3563",[3,2.199,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,453,6.782,454,4.59]],["t/3565",[1,0.957,6,0.935,10,1.548,23,2.275,32,2.275,76,0.425,77,0.741,93,1.562,101,2.402,102,1.671,103,1.671,104,1.719,105,1.626,107,1.671,165,2.448,166,3.519,234,2.448,446,3.104,454,3.393,455,3.833,456,3.833,457,3.104,458,3.393,459,3.393,460,3.393,461,3.393,462,3.104,463,3.393,464,3.393,465,3.393,466,3.393,467,3.104,468,3.393,469,3.393]],["t/3567",[10,1.496,20,2.009,23,2.637,76,0.365,120,2.064,165,3.024,166,4.078,296,6.396,446,3.834,457,5.17,459,4.192,460,4.192,461,4.192,462,5.17,464,4.192,465,4.192,466,4.192,467,5.17,469,4.192]],["t/3569",[10,1.479,76,0.449,134,2.536,135,2.536,234,4.662,457,4.71,458,5.15,462,4.71,463,5.15,467,4.71,468,5.15,470,5.817]],["t/3571",[1,0.813,2,2.098,6,1.752,22,5.128,70,3.313,76,0.554,87,1.702,133,4.77,142,3.524,153,4.708,241,4.141,242,4.141,243,4.141,244,3.787,245,3.787,246,4.141,247,4.141,248,3.787,249,4.141,250,4.141,251,4.141]],["t/3573",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3575",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,471,4.122]],["t/3577",[3,2.199,70,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,472,4.59]],["t/3579",[1,1.073,6,1.101,10,1.471,32,2.551,47,0.873,76,0.476,77,0.873,93,1.751,101,2.694,102,1.967,103,1.967,104,2.023,105,1.914,107,1.967,116,1.307,155,3.618,211,3.479,255,4.655,324,3.196,472,3.994,473,4.511,474,4.511]],["t/3581",[1,0.459,10,1.599,20,1.765,23,2.126,26,1.979,28,1.688,35,1.546,43,0.836,47,0.805,70,1.87,76,0.397,77,1.13,116,0.765,120,1.814,121,1.256,123,2.696,125,1.487,129,1.338,130,1.338,131,1.433,153,3.721,155,2.436,157,3.369,158,2.657,159,1.989,160,1.686,161,4.73,162,3.369,163,2.138,164,2.138,165,1.686,166,1.686,167,2.138,168,2.138,169,2.138,170,2.138,171,1.612,172,1.771,189,1.87,211,2.899,255,3.134,314,2.338,315,2.338]],["t/3583",[10,1.536,35,2.739,47,0.905,76,0.488,77,1.225,116,1.355,134,2.039,135,2.761,145,3.313,153,3.708,155,3.708,159,3.524,171,2.856,172,3.137,211,3.566,255,4.77,475,4.677,476,4.677,477,4.677]],["t/3585",[1,1.171,2,3.023,6,1.645,71,6.468,478,6.74]],["t/3587",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3589",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3591",[3,2.199,71,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,479,4.59]],["t/3593",[1,1.001,6,0.995,10,1.513,32,2.378,47,0.789,76,0.444,77,0.789,93,1.632,101,2.511,102,1.778,103,1.778,104,1.829,105,1.73,107,1.778,113,1.382,115,1.559,116,1.181,117,1.64,118,1.521,119,2.046,181,1.829,234,2.605,479,3.61,480,4.078,481,4.078,482,3.61,483,3.302,484,4.664,485,3.302,486,3.302]],["t/3595",[8,1.091,10,1.644,20,1.002,23,1.572,26,1.811,28,1.012,31,3.387,34,1.443,43,1.205,44,1.443,47,0.737,53,1.913,54,2.874,76,0.294,77,1.308,113,1.621,115,0.903,116,0.684,117,0.95,118,0.881,119,0.84,120,1.03,121,1.811,123,3.247,125,2.144,129,1.197,130,1.197,131,2.066,132,1.443,165,3.054,166,2.432,181,2.145,214,2.092,234,1.509,303,2.092,483,3.083,484,3.083,485,3.083,486,3.083,487,2.363,488,2.363,489,2.363,490,2.363,491,2.363]],["t/3597",[10,1.486,47,1.003,76,0.4,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,2.41,134,2.261,135,2.261,181,2.325,234,3.312,482,4.59,483,4.199,484,5.492,485,4.199,486,4.199]]],"invertedIndex":[["",{"_index":10,"t":{"3343":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"3355":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"3357":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"3359":{"position":[[48,1],[173,1],[188,1]]},"3369":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"3371":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"3373":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"3383":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"3385":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"3387":{"position":[[18,1],[85,1],[203,1]]},"3397":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"3399":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"3401":{"position":[[0,2],[57,1],[126,1],[172,1]]},"3411":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"3413":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"3415":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"3417":{"position":[[302,4]]},"3425":{"position":[[134,2],[163,2],[196,2]]},"3427":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"3429":{"position":[[18,1],[193,1]]},"3439":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"3441":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"3443":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"3453":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"3455":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"3457":{"position":[[18,1],[56,1]]},"3467":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"3469":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"3471":{"position":[[18,1],[43,1],[58,1]]},"3481":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"3483":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"3485":{"position":[[18,1],[43,3],[141,1]]},"3495":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"3497":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"3499":{"position":[[18,1],[43,3],[150,1],[185,1]]},"3509":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"3511":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"3513":{"position":[[18,1],[43,3],[150,1],[165,1]]},"3523":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"3525":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"3527":{"position":[[18,1],[78,1]]},"3537":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"3539":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"3541":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"3551":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"3553":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"3555":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]},"3565":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"3567":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"3569":{"position":[[18,1],[57,2],[97,1]]},"3579":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"3581":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"3583":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"3593":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"3595":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"3597":{"position":[[18,1],[110,1],[182,1],[197,1]]}}}],["0",{"_index":35,"t":{"3343":{"position":[[492,1]]},"3371":{"position":[[251,1]]},"3373":{"position":[[86,2]]},"3411":{"position":[[341,2]]},"3551":{"position":[[325,2]]},"3553":{"position":[[402,1]]},"3555":{"position":[[106,2]]},"3581":{"position":[[201,1]]},"3583":{"position":[[274,2]]}}}],["1",{"_index":234,"t":{"3411":{"position":[[390,2]]},"3415":{"position":[[202,1]]},"3565":{"position":[[332,1]]},"3569":{"position":[[55,1],[94,2]]},"3593":{"position":[[402,1]]},"3595":{"position":[[839,1]]},"3597":{"position":[[180,1]]}}}],["1.14/1.15",{"_index":86,"t":{"3353":{"position":[[33,11]]}}}],["1.18",{"_index":143,"t":{"3361":{"position":[[82,4]]}}}],["10",{"_index":118,"t":{"3355":{"position":[[366,2]]},"3357":{"position":[[636,2]]},"3359":{"position":[[170,2]]},"3383":{"position":[[300,2]]},"3385":{"position":[[258,2]]},"3387":{"position":[[82,2]]},"3467":{"position":[[258,2]]},"3469":{"position":[[75,2]]},"3471":{"position":[[40,2]]},"3495":{"position":[[342,2],[567,2]]},"3497":{"position":[[860,2]]},"3499":{"position":[[147,2]]},"3509":{"position":[[342,2],[535,2],[749,2]]},"3511":{"position":[[875,2]]},"3513":{"position":[[147,2]]},"3537":{"position":[[319,2]]},"3539":{"position":[[1015,2]]},"3541":{"position":[[206,2]]},"3551":{"position":[[368,2]]},"3553":{"position":[[1456,2]]},"3555":{"position":[[149,2]]},"3593":{"position":[[329,2]]},"3595":{"position":[[319,2]]},"3597":{"position":[[107,2]]}}}],["100",{"_index":484,"t":{"3593":{"position":[[361,4],[380,4]]},"3595":{"position":[[585,4],[711,4]]},"3597":{"position":[[139,4],[158,4]]}}}],["10m",{"_index":461,"t":{"3565":{"position":[[316,6]]},"3567":{"position":[[73,6]]}}}],["123456",{"_index":240,"t":{"3415":{"position":[[120,9]]}}}],["127.0.0.1",{"_index":353,"t":{"3481":{"position":[[256,12]]},"3483":{"position":[[225,11]]},"3485":{"position":[[53,12]]},"3495":{"position":[[248,12]]},"3497":{"position":[[267,11]]},"3499":{"position":[[53,12]]},"3509":{"position":[[248,12]]},"3511":{"position":[[345,11]]},"3513":{"position":[[53,12]]},"3539":{"position":[[398,11]]},"3541":{"position":[[92,12]]},"3551":{"position":[[262,12]]},"3553":{"position":[[84,11]]},"3555":{"position":[[34,12]]}}}],["127.0.0.1:11211",{"_index":344,"t":{"3455":{"position":[[113,17]]},"3457":{"position":[[37,18]]}}}],["127.0.0.1:8091",{"_index":231,"t":{"3411":{"position":[[287,17]]},"3415":{"position":[[73,17]]}}}],["1433",{"_index":363,"t":{"3495":{"position":[[267,5]]},"3497":{"position":[[355,4]]},"3499":{"position":[[72,5]]}}}],["15",{"_index":302,"t":{"3427":{"position":[[2668,2],[2722,2]]}}}],["1e7",{"_index":458,"t":{"3565":{"position":[[271,4]]},"3569":{"position":[[41,4]]}}}],["1gb",{"_index":466,"t":{"3565":{"position":[[366,6]]},"3567":{"position":[[131,6]]}}}],["2",{"_index":84,"t":{"3353":{"position":[[26,1]]},"3367":{"position":[[43,1]]},"3381":{"position":[[24,1]]},"3395":{"position":[[23,1]]},"3409":{"position":[[27,1]]},"3423":{"position":[[26,1]]},"3427":{"position":[[175,3]]},"3437":{"position":[[22,1]]},"3443":{"position":[[80,1]]},"3451":{"position":[[24,1]]},"3465":{"position":[[24,1]]},"3479":{"position":[[25,1]]},"3493":{"position":[[23,1]]},"3507":{"position":[[23,1]]},"3521":{"position":[[24,1]]},"3535":{"position":[[26,1]]},"3549":{"position":[[23,1]]},"3563":{"position":[[27,1]]},"3577":{"position":[[20,1]]},"3591":{"position":[[25,1]]}}}],["25",{"_index":281,"t":{"3427":{"position":[[1341,2],[2037,2]]}}}],["27017",{"_index":354,"t":{"3481":{"position":[[275,6]]},"3483":{"position":[[313,5]]},"3485":{"position":[[72,6]]}}}],["3",{"_index":171,"t":{"3371":{"position":[[658,1]]},"3373":{"position":[[116,2]]},"3411":{"position":[[363,2]]},"3415":{"position":[[174,1]]},"3427":{"position":[[1010,1]]},"3429":{"position":[[93,2]]},"3581":{"position":[[613,1]]},"3583":{"position":[[255,2]]}}}],["30",{"_index":463,"t":{"3565":{"position":[[337,3]]},"3569":{"position":[[60,3]]}}}],["3306",{"_index":374,"t":{"3509":{"position":[[267,5]]},"3511":{"position":[[433,4]]},"3513":{"position":[[72,5]]}}}],["5",{"_index":277,"t":{"3427":{"position":[[1246,2],[1942,2]]},"3429":{"position":[[129,2],[152,2]]}}}],["5432",{"_index":394,"t":{"3539":{"position":[[486,4]]},"3541":{"position":[[111,5]]}}}],["60",{"_index":222,"t":{"3399":{"position":[[342,2]]},"3401":{"position":[[123,2]]}}}],["6379",{"_index":400,"t":{"3551":{"position":[[281,5]]},"3553":{"position":[[172,4]]},"3555":{"position":[[53,5]]}}}],["6380",{"_index":409,"t":{"3551":{"position":[[617,9]]}}}],["64",{"_index":468,"t":{"3565":{"position":[[386,3]]},"3569":{"position":[[77,3]]}}}],["8529",{"_index":112,"t":{"3355":{"position":[[286,5]]},"3357":{"position":[[179,4]]},"3359":{"position":[[90,5]]}}}],["_",{"_index":376,"t":{"3509":{"position":[[612,1]]}}}],["access",{"_index":162,"t":{"3371":{"position":[[422,6],[448,6]]},"3427":{"position":[[768,6],[794,6]]},"3581":{"position":[[371,6],[397,6]]}}}],["accesskey",{"_index":314,"t":{"3427":{"position":[[3096,9]]},"3581":{"position":[[659,9]]}}}],["account",{"_index":152,"t":{"3369":{"position":[[258,8],[320,8]]},"3371":{"position":[[32,7],[46,7]]},"3373":{"position":[[28,8]]}}}],["adaptor",{"_index":487,"t":{"3595":{"position":[[402,7]]}}}],["addr",{"_index":407,"t":{"3551":{"position":[[495,6],[592,6]]},"3553":{"position":[[794,5]]},"3555":{"position":[[177,6]]}}}],["address",{"_index":429,"t":{"3553":{"position":[[663,7],[699,10]]}}}],["admin",{"_index":239,"t":{"3415":{"position":[[101,8]]}}}],["allow",{"_index":265,"t":{"3427":{"position":[[415,6]]}}}],["along",{"_index":33,"t":{"3343":{"position":[[457,5]]}}}],["amount",{"_index":214,"t":{"3399":{"position":[[230,6]]},"3595":{"position":[[769,6]]}}}],["applic",{"_index":235,"t":{"3413":{"position":[[28,11],[108,11]]}}}],["arangodb",{"_index":55,"t":{"3345":{"position":[[0,8]]},"3347":{"position":[[2,8]]},"3353":{"position":[[0,8]]}}}],["arangodb.new",{"_index":106,"t":{"3355":{"position":[[172,14]]}}}],["arangodb.new(arangodb.config",{"_index":108,"t":{"3355":{"position":[[224,29]]}}}],["arangodb/go",{"_index":72,"t":{"3347":{"position":[[32,11],[55,11]]}}}],["attempt",{"_index":170,"t":{"3371":{"position":[[623,10]]},"3427":{"position":[[972,10]]},"3581":{"position":[[575,10]]}}}],["authent",{"_index":328,"t":{"3441":{"position":[[197,15],[259,15]]},"3483":{"position":[[81,14]]},"3497":{"position":[[123,14]]},"3511":{"position":[[69,14],[201,14]]},"3539":{"position":[[254,14]]}}}],["avail",{"_index":219,"t":{"3399":{"position":[[284,9]]},"3553":{"position":[[1481,9]]}}}],["aw",{"_index":161,"t":{"3371":{"position":[[418,3],[437,3]]},"3427":{"position":[[764,3],[783,3]]},"3581":{"position":[[98,3],[130,3],[367,3],[386,3]]}}}],["aws.bool(tru",{"_index":316,"t":{"3429":{"position":[[177,15]]}}}],["aws/aw",{"_index":241,"t":{"3417":{"position":[[32,7]]},"3571":{"position":[[26,7]]}}}],["aws/credenti",{"_index":246,"t":{"3417":{"position":[[154,19]]},"3571":{"position":[[148,19]]}}}],["aws_region",{"_index":263,"t":{"3427":{"position":[[283,13]]}}}],["awsdynamodb.cli",{"_index":252,"t":{"3421":{"position":[[285,19]]}}}],["azblob.cli",{"_index":148,"t":{"3365":{"position":[[288,14]]}}}],["azur",{"_index":136,"t":{"3361":{"position":[[0,5]]},"3367":{"position":[[0,5],[210,5]]}}}],["azureblob",{"_index":56,"t":{"3345":{"position":[[9,9]]}}}],["azureblob.new",{"_index":150,"t":{"3369":{"position":[[173,15]]}}}],["azureblob.new(azureblob.config",{"_index":151,"t":{"3369":{"position":[[226,31]]}}}],["badger",{"_index":57,"t":{"3345":{"position":[[19,6]]},"3381":{"position":[[0,6],[191,6]]},"3385":{"position":[[344,6],[487,6]]}}}],["badger.db",{"_index":176,"t":{"3379":{"position":[[288,10]]},"3519":{"position":[[288,10]]}}}],["badger.defaultoptions(\"./fiber.badg",{"_index":184,"t":{"3385":{"position":[[378,39]]}}}],["badger.defaultoptions(\"./fiber.badger\").withlogger(nil",{"_index":190,"t":{"3387":{"position":[[115,56]]}}}],["badger.logg",{"_index":187,"t":{"3385":{"position":[[532,13]]}}}],["badger.new",{"_index":178,"t":{"3383":{"position":[[170,12]]}}}],["badger.new(badger.config",{"_index":179,"t":{"3383":{"position":[[220,25]]}}}],["badger.opt",{"_index":185,"t":{"3385":{"position":[[432,14]]}}}],["badgeropt",{"_index":182,"t":{"3385":{"position":[[303,13],[418,13]]},"3387":{"position":[[100,14]]}}}],["bbolt",{"_index":58,"t":{"3345":{"position":[[26,5]]},"3389":{"position":[[2,5]]},"3395":{"position":[[0,5]]},"3399":{"position":[[137,5]]}}}],["bbolt.db",{"_index":206,"t":{"3393":{"position":[[288,9]]}}}],["bbolt.new",{"_index":208,"t":{"3397":{"position":[[169,11]]}}}],["bbolt.new(bbolt.config",{"_index":209,"t":{"3397":{"position":[[218,23]]}}}],["befor",{"_index":132,"t":{"3357":{"position":[[580,6]]},"3385":{"position":[[202,6]]},"3427":{"position":[[2921,6]]},"3469":{"position":[[29,6]]},"3497":{"position":[[804,6]]},"3511":{"position":[[819,6]]},"3539":{"position":[[959,6]]},"3595":{"position":[[263,6]]}}}],["blob",{"_index":137,"t":{"3361":{"position":[[6,4]]},"3367":{"position":[[6,4],[216,4]]}}}],["block",{"_index":300,"t":{"3427":{"position":[[2616,5]]}}}],["bolt",{"_index":192,"t":{"3389":{"position":[[44,4]]}}}],["bool",{"_index":130,"t":{"3357":{"position":[[567,4]]},"3371":{"position":[[388,4]]},"3385":{"position":[[189,4],[636,4]]},"3399":{"position":[[460,4],[557,4]]},"3427":{"position":[[1120,4],[3062,5]]},"3455":{"position":[[237,4]]},"3483":{"position":[[697,4]]},"3497":{"position":[[791,4]]},"3511":{"position":[[806,4]]},"3539":{"position":[[946,4]]},"3553":{"position":[[1275,4]]},"3581":{"position":[[337,4]]},"3595":{"position":[[250,4]]}}}],["bound",{"_index":450,"t":{"3557":{"position":[[9,5]]}}}],["bradfitz/gomemcach",{"_index":333,"t":{"3445":{"position":[[32,20]]}}}],["bucket",{"_index":211,"t":{"3397":{"position":[[270,7],[282,8]]},"3399":{"position":[[143,6],[198,6],[511,6]]},"3401":{"position":[[89,7]]},"3411":{"position":[[333,7]]},"3413":{"position":[[263,6],[284,6]]},"3415":{"position":[[130,7]]},"3427":{"position":[[1074,6]]},"3579":{"position":[[230,7],[242,6]]},"3581":{"position":[[69,6],[81,6],[291,6]]},"3583":{"position":[[32,7],[176,7]]}}}],["buffer",{"_index":469,"t":{"3565":{"position":[[416,7]]},"3567":{"position":[[190,7]]}}}],["bufferitem",{"_index":467,"t":{"3565":{"position":[[373,12]]},"3567":{"position":[[155,11],[198,11]]},"3569":{"position":[[64,12]]}}}],["byte",{"_index":29,"t":{"3343":{"position":[[393,8],[591,7]]},"3351":{"position":[[69,8],[123,7]]},"3365":{"position":[[69,8],[123,7]]},"3379":{"position":[[69,8],[123,7]]},"3393":{"position":[[69,8],[123,7]]},"3407":{"position":[[69,8],[123,7]]},"3421":{"position":[[66,8],[120,7]]},"3435":{"position":[[70,8],[124,7]]},"3449":{"position":[[69,8],[123,7]]},"3463":{"position":[[69,8],[123,7]]},"3477":{"position":[[69,8],[123,7]]},"3491":{"position":[[69,8],[123,7]]},"3505":{"position":[[69,8],[123,7]]},"3519":{"position":[[69,8],[123,7]]},"3533":{"position":[[69,8],[123,7]]},"3547":{"position":[[69,8],[123,7]]},"3561":{"position":[[69,8],[123,7]]},"3575":{"position":[[69,8],[123,7]]},"3589":{"position":[[69,8],[123,7]]}}}],["cach",{"_index":465,"t":{"3565":{"position":[[360,5]]},"3567":{"position":[[125,5]]}}}],["calcul",{"_index":286,"t":{"3427":{"position":[[1415,13],[2111,13]]}}}],["case",{"_index":308,"t":{"3427":{"position":[[2847,4]]}}}],["cer",{"_index":410,"t":{"3551":{"position":[[670,4]]}}}],["certif",{"_index":419,"t":{"3551":{"position":[[855,13]]}}}],["chu'",{"_index":197,"t":{"3389":{"position":[[97,5]]}}}],["clear",{"_index":129,"t":{"3357":{"position":[[480,6]]},"3371":{"position":[[304,6]]},"3385":{"position":[[107,6]]},"3399":{"position":[[474,6]]},"3427":{"position":[[1037,6]]},"3455":{"position":[[155,6]]},"3483":{"position":[[615,6]]},"3497":{"position":[[709,6]]},"3511":{"position":[[724,6]]},"3539":{"position":[[864,6]]},"3553":{"position":[[1188,6]]},"3581":{"position":[[254,6]]},"3595":{"position":[[168,6]]}}}],["client",{"_index":305,"t":{"3427":{"position":[[2810,6]]},"3441":{"position":[[308,6]]},"3551":{"position":[[428,6],[552,6],[642,6],[1025,6]]},"3553":{"position":[[932,7]]}}}],["client.key",{"_index":413,"t":{"3551":{"position":[[718,15]]}}}],["clientnam",{"_index":437,"t":{"3553":{"position":[[904,10],[948,11],[1013,10]]},"3555":{"position":[[212,11]]}}}],["clientv3.client",{"_index":318,"t":{"3435":{"position":[[289,16]]}}}],["close",{"_index":48,"t":{"3343":{"position":[[826,5],[832,6],[921,7]]},"3351":{"position":[[249,7]]},"3365":{"position":[[249,7]]},"3379":{"position":[[249,7]]},"3393":{"position":[[249,7]]},"3407":{"position":[[249,7]]},"3421":{"position":[[246,7]]},"3435":{"position":[[250,7]]},"3449":{"position":[[249,7]]},"3463":{"position":[[249,7]]},"3477":{"position":[[249,7]]},"3491":{"position":[[249,7]]},"3505":{"position":[[249,7]]},"3519":{"position":[[249,7]]},"3533":{"position":[[249,7]]},"3547":{"position":[[249,7]]},"3561":{"position":[[249,7]]},"3575":{"position":[[249,7]]},"3589":{"position":[[249,7]]}}}],["cloud",{"_index":141,"t":{"3361":{"position":[[66,6]]}}}],["cluster",{"_index":236,"t":{"3413":{"position":[[77,7],[157,7],[224,7],[345,7],[443,7]]},"3551":{"position":[[544,7]]}}}],["clustercli",{"_index":434,"t":{"3553":{"position":[[742,13]]}}}],["cockroachdb/pebbl",{"_index":378,"t":{"3515":{"position":[[26,18]]}}}],["collect",{"_index":114,"t":{"3355":{"position":[[311,11]]},"3357":{"position":[[394,10],[453,10],[517,10]]},"3359":{"position":[[115,11]]},"3481":{"position":[[301,11],[513,11]]},"3483":{"position":[[529,10],[588,10]]},"3485":{"position":[[98,11]]},"3553":{"position":[[1225,10]]}}}],["collector",{"_index":52,"t":{"3343":{"position":[[888,10]]}}}],["command",{"_index":440,"t":{"3553":{"position":[[960,7]]}}}],["commun",{"_index":11,"t":{"3343":{"position":[[139,13]]}}}],["config",{"_index":76,"t":{"3349":{"position":[[33,6],[48,6]]},"3351":{"position":[[16,10]]},"3355":{"position":[[156,6],[208,6]]},"3357":{"position":[[5,6]]},"3359":{"position":[[50,7]]},"3363":{"position":[[33,6],[48,6]]},"3365":{"position":[[16,10]]},"3369":{"position":[[157,6],[210,6]]},"3371":{"position":[[5,6]]},"3373":{"position":[[20,7]]},"3377":{"position":[[33,6],[48,6]]},"3379":{"position":[[16,10]]},"3383":{"position":[[154,6],[204,6]]},"3385":{"position":[[5,6]]},"3387":{"position":[[20,7]]},"3391":{"position":[[33,6],[48,6]]},"3393":{"position":[[16,10]]},"3397":{"position":[[153,6],[202,6]]},"3399":{"position":[[3,6],[22,6],[47,6]]},"3401":{"position":[[32,6],[59,7]]},"3405":{"position":[[33,6],[48,6]]},"3407":{"position":[[16,10]]},"3411":{"position":[[157,6],[233,6]]},"3413":{"position":[[5,6]]},"3415":{"position":[[32,6],[59,7]]},"3417":{"position":[[60,6],[199,6],[262,7]]},"3419":{"position":[[33,6],[48,6]]},"3421":{"position":[[16,7]]},"3427":{"position":[[5,6],[209,6]]},"3429":{"position":[[20,7]]},"3433":{"position":[[33,6],[48,6]]},"3435":{"position":[[16,10]]},"3439":{"position":[[152,6],[200,6]]},"3441":{"position":[[5,6]]},"3443":{"position":[[20,7]]},"3447":{"position":[[33,6],[48,6]]},"3449":{"position":[[16,10]]},"3453":{"position":[[156,6],[208,6]]},"3455":{"position":[[5,6]]},"3457":{"position":[[20,7]]},"3461":{"position":[[33,6],[48,6]]},"3463":{"position":[[16,10]]},"3467":{"position":[[154,6],[204,6]]},"3469":{"position":[[5,6]]},"3471":{"position":[[20,7]]},"3475":{"position":[[33,6],[48,6]]},"3477":{"position":[[16,10]]},"3481":{"position":[[155,6],[206,6],[368,6]]},"3483":{"position":[[5,6]]},"3485":{"position":[[20,7]]},"3489":{"position":[[33,6],[48,6]]},"3491":{"position":[[16,10]]},"3495":{"position":[[153,6],[202,6],[404,6]]},"3497":{"position":[[3,6],[22,6],[47,6]]},"3499":{"position":[[20,7]]},"3503":{"position":[[33,6],[48,6]]},"3505":{"position":[[16,10]]},"3509":{"position":[[153,6],[202,6],[384,6],[577,6]]},"3511":{"position":[[5,6]]},"3513":{"position":[[20,7]]},"3517":{"position":[[33,6],[48,6]]},"3519":{"position":[[16,10]]},"3523":{"position":[[154,6],[204,6]]},"3525":{"position":[[5,6]]},"3527":{"position":[[20,7]]},"3531":{"position":[[33,6],[48,6]]},"3533":{"position":[[16,10]]},"3537":{"position":[[159,6],[211,6]]},"3539":{"position":[[3,6],[22,6],[47,6]]},"3541":{"position":[[32,6],[59,7]]},"3545":{"position":[[33,6],[48,6]]},"3547":{"position":[[16,10]]},"3551":{"position":[[167,6],[216,6]]},"3553":{"position":[[5,6],[476,6],[1287,6]]},"3555":{"position":[[20,7]]},"3559":{"position":[[33,6],[48,6]]},"3561":{"position":[[16,10]]},"3565":{"position":[[157,6],[210,6]]},"3567":{"position":[[5,6]]},"3569":{"position":[[20,7]]},"3571":{"position":[[54,6],[193,6],[256,7]]},"3573":{"position":[[33,6],[48,6]]},"3575":{"position":[[16,10]]},"3579":{"position":[[150,6],[196,6]]},"3581":{"position":[[3,6],[22,6],[47,6]]},"3583":{"position":[[141,6],[168,7]]},"3587":{"position":[[33,6],[48,6]]},"3589":{"position":[[16,10]]},"3593":{"position":[[155,6],[206,6]]},"3595":{"position":[[5,6],[418,6]]},"3597":{"position":[[20,7]]}}}],["configdefault",{"_index":135,"t":{"3359":{"position":[[34,13]]},"3373":{"position":[[4,13]]},"3387":{"position":[[4,13]]},"3401":{"position":[[3,13],[43,13]]},"3415":{"position":[[3,13],[43,13]]},"3429":{"position":[[4,13]]},"3443":{"position":[[4,13]]},"3457":{"position":[[4,13]]},"3471":{"position":[[4,13]]},"3485":{"position":[[4,13]]},"3499":{"position":[[4,13]]},"3513":{"position":[[4,13]]},"3527":{"position":[[4,13]]},"3541":{"position":[[3,13],[43,13]]},"3555":{"position":[[4,13]]},"3569":{"position":[[4,13]]},"3583":{"position":[[112,13],[152,13]]},"3597":{"position":[[4,13]]}}}],["configur",{"_index":475,"t":{"3583":{"position":[[12,13]]}}}],["conn",{"_index":81,"t":{"3351":{"position":[[281,6]]},"3365":{"position":[[281,6]]},"3379":{"position":[[281,6]]},"3393":{"position":[[281,6]]},"3407":{"position":[[281,6]]},"3421":{"position":[[278,6]]},"3435":{"position":[[282,6]]},"3449":{"position":[[281,6]]},"3463":{"position":[[281,6]]},"3477":{"position":[[281,6]]},"3491":{"position":[[281,6]]},"3505":{"position":[[281,6]]},"3519":{"position":[[281,6]]},"3533":{"position":[[281,6]]},"3547":{"position":[[281,6]]},"3553":{"position":[[977,5]]},"3561":{"position":[[281,6]]},"3575":{"position":[[281,6]]},"3589":{"position":[[281,6]]}}}],["connect",{"_index":54,"t":{"3343":{"position":[[908,12]]},"3413":{"position":[[52,7],[132,7],[188,10],[273,7],[317,10]]},"3441":{"position":[[129,11]]},"3481":{"position":[[381,10]]},"3483":{"position":[[24,10]]},"3495":{"position":[[417,10]]},"3497":{"position":[[66,10],[926,10]]},"3509":{"position":[[397,10],[597,10]]},"3511":{"position":[[144,10]]},"3539":{"position":[[103,10],[128,10],[197,10],[792,10]]},"3553":{"position":[[349,10],[1416,12],[1459,11]]},"3595":{"position":[[517,11],[541,10],[655,11],[786,10]]}}}],["connectiontimeout",{"_index":232,"t":{"3411":{"position":[[344,18]]},"3413":{"position":[[353,17]]},"3415":{"position":[[155,18]]}}}],["connectionuri",{"_index":355,"t":{"3481":{"position":[[436,14]]},"3483":{"position":[[141,13]]},"3485":{"position":[[28,14]]},"3495":{"position":[[468,14]]},"3497":{"position":[[183,13]]},"3499":{"position":[[28,14]]},"3509":{"position":[[448,14]]},"3511":{"position":[[41,13],[261,13]]},"3513":{"position":[[28,14]]},"3539":{"position":[[314,13]]},"3541":{"position":[[67,14]]}}}],["connmaxlifetim",{"_index":486,"t":{"3593":{"position":[[385,16]]},"3595":{"position":[[736,15],[849,15]]},"3597":{"position":[[163,16]]}}}],["consol",{"_index":280,"t":{"3427":{"position":[[1329,8],[2025,8]]}}}],["contain",{"_index":45,"t":{"3343":{"position":[[718,7]]},"3369":{"position":[[275,10]]},"3371":{"position":[[64,9],[80,9],[341,10]]},"3373":{"position":[[41,10]]},"3427":{"position":[[542,9],[603,10]]}}}],["cost",{"_index":464,"t":{"3565":{"position":[[352,4]]},"3567":{"position":[[117,4]]}}}],["couchbas",{"_index":59,"t":{"3345":{"position":[[32,9]]},"3403":{"position":[[2,9]]},"3409":{"position":[[0,9],[194,9]]},"3411":{"position":[[203,9]]},"3413":{"position":[[67,9],[147,9],[214,9],[335,9],[433,9]]}}}],["couchbase.new",{"_index":229,"t":{"3411":{"position":[[173,15]]}}}],["couchbase.new(couchbase.config",{"_index":230,"t":{"3411":{"position":[[249,31]]}}}],["couchbase/gocb",{"_index":226,"t":{"3403":{"position":[[33,15]]}}}],["cpu",{"_index":447,"t":{"3553":{"position":[[1491,3]]}}}],["creat",{"_index":105,"t":{"3355":{"position":[[116,6]]},"3369":{"position":[[117,6]]},"3383":{"position":[[114,6]]},"3397":{"position":[[113,6]]},"3411":{"position":[[117,6]]},"3425":{"position":[[116,6]]},"3427":{"position":[[1217,7],[1301,8],[1913,7],[1997,8],[2558,7],[2641,8],[2933,8]]},"3439":{"position":[[112,6]]},"3453":{"position":[[116,6]]},"3467":{"position":[[114,6]]},"3481":{"position":[[115,6]]},"3495":{"position":[[113,6]]},"3509":{"position":[[113,6]]},"3523":{"position":[[114,6]]},"3537":{"position":[[119,6]]},"3551":{"position":[[121,6],[633,6],[1016,6]]},"3565":{"position":[[117,6]]},"3579":{"position":[[110,6]]},"3593":{"position":[[115,6]]}}}],["credenti",{"_index":153,"t":{"3369":{"position":[[294,12],[307,12]]},"3371":{"position":[[396,11],[501,13],[515,11],[527,11]]},"3417":{"position":[[77,11],[100,11],[216,11],[235,11],[290,11]]},"3427":{"position":[[742,11],[850,13],[864,11],[876,11],[3075,11]]},"3429":{"position":[[52,12],[65,14]]},"3441":{"position":[[322,12]]},"3571":{"position":[[71,11],[94,11],[210,11],[229,11],[284,11]]},"3581":{"position":[[345,11],[453,13],[467,11],[479,11],[638,11]]},"3583":{"position":[[214,12],[227,14]]}}}],["custom",{"_index":107,"t":{"3355":{"position":[[201,6]]},"3369":{"position":[[203,6]]},"3383":{"position":[[197,6]]},"3397":{"position":[[195,6]]},"3411":{"position":[[226,6]]},"3427":{"position":[[435,6]]},"3439":{"position":[[193,6]]},"3453":{"position":[[201,6]]},"3467":{"position":[[197,6]]},"3481":{"position":[[199,6],[361,6]]},"3495":{"position":[[195,6],[397,6]]},"3509":{"position":[[195,6],[377,6],[570,6]]},"3523":{"position":[[197,6]]},"3537":{"position":[[204,6]]},"3551":{"position":[[209,6]]},"3565":{"position":[[203,6]]},"3579":{"position":[[189,6]]},"3593":{"position":[[199,6]]}}}],["customendpoint",{"_index":264,"t":{"3427":{"position":[[400,14]]}}}],["darwin",{"_index":220,"t":{"3399":{"position":[[297,6]]}}}],["databas",{"_index":113,"t":{"3355":{"position":[[292,9]]},"3357":{"position":[[326,8],[375,8]]},"3359":{"position":[[96,9]]},"3383":{"position":[[246,9]]},"3385":{"position":[[24,8],[82,8]]},"3387":{"position":[[28,9]]},"3389":{"position":[[184,8],[232,8]]},"3397":{"position":[[242,9]]},"3399":{"position":[[66,8],[118,8],[390,8]]},"3401":{"position":[[67,9]]},"3481":{"position":[[282,9],[494,9]]},"3483":{"position":[[461,8],[510,8]]},"3485":{"position":[[79,9]]},"3495":{"position":[[273,9]]},"3497":{"position":[[565,8],[614,8]]},"3499":{"position":[[78,9]]},"3509":{"position":[[273,9]]},"3511":{"position":[[580,8],[629,8]]},"3513":{"position":[[78,9]]},"3525":{"position":[[24,8]]},"3539":{"position":[[633,8],[682,8]]},"3541":{"position":[[117,9]]},"3551":{"position":[[315,9]]},"3553":{"position":[[319,8],[404,8],[524,8]]},"3555":{"position":[[96,9]]},"3593":{"position":[[250,9]]},"3595":{"position":[[24,8],[73,8],[674,9]]},"3597":{"position":[[28,9]]}}}],["database/key",{"_index":13,"t":{"3343":{"position":[[168,12]]}}}],["database/sql",{"_index":368,"t":{"3501":{"position":[[29,12]]}}}],["db",{"_index":122,"t":{"3357":{"position":[[44,2],[133,2]]},"3375":{"position":[[17,2]]},"3483":{"position":[[53,3],[185,2],[267,2]]},"3497":{"position":[[95,3],[227,2],[309,2]]},"3509":{"position":[[594,2],[608,3],[715,3],[719,3]]},"3511":{"position":[[24,2],[130,2],[173,3],[305,2],[387,2]]},"3515":{"position":[[17,2]]},"3523":{"position":[[252,5]]},"3525":{"position":[[65,6]]},"3527":{"position":[[34,5]]},"3537":{"position":[[257,3]]},"3539":{"position":[[66,2],[177,2],[226,3],[358,2],[440,2]]},"3553":{"position":[[44,2],[126,2]]}}}],["dbpool",{"_index":392,"t":{"3537":{"position":[[261,7]]}}}],["default",{"_index":77,"t":{"3349":{"position":[[40,7]]},"3355":{"position":[[148,7]]},"3357":{"position":[[73,7],[168,7],[228,7],[293,7],[356,7],[426,7],[544,7],[625,7]]},"3363":{"position":[[40,7]]},"3369":{"position":[[149,7]]},"3371":{"position":[[131,8],[240,7],[365,7],[490,7],[647,7]]},"3377":{"position":[[40,7]]},"3383":{"position":[[146,7]]},"3385":{"position":[[54,7],[166,7],[247,7],[367,7],[464,7],[510,7],[609,7]]},"3391":{"position":[[40,7]]},"3397":{"position":[[145,7]]},"3399":{"position":[[96,7],[171,7],[331,7],[434,7],[534,7]]},"3401":{"position":[[24,7]]},"3405":{"position":[[40,7]]},"3411":{"position":[[149,7]]},"3415":{"position":[[24,7]]},"3419":{"position":[[40,7]]},"3427":{"position":[[374,9],[714,8],[839,7],[999,7],[1097,7],[1252,8],[1279,7],[1948,8],[1975,7],[3031,9]]},"3433":{"position":[[40,7]]},"3439":{"position":[[144,7]]},"3447":{"position":[[40,7]]},"3453":{"position":[[148,7]]},"3455":{"position":[[102,7],[214,7]]},"3461":{"position":[[40,7]]},"3467":{"position":[[146,7]]},"3469":{"position":[[64,7]]},"3475":{"position":[[40,7]]},"3481":{"position":[[147,7]]},"3483":{"position":[[127,7],[214,7],[302,7],[363,7],[428,7],[491,7],[561,7],[674,7]]},"3489":{"position":[[40,7]]},"3495":{"position":[[145,7]]},"3497":{"position":[[169,7],[256,7],[344,7],[404,7],[469,7],[532,7],[595,7],[660,7],[768,7],[849,7],[953,7]]},"3503":{"position":[[40,7]]},"3509":{"position":[[145,7]]},"3511":{"position":[[115,7],[247,7],[334,7],[422,7],[482,7],[547,7],[610,7],[675,7],[783,7],[864,7]]},"3517":{"position":[[40,7]]},"3523":{"position":[[146,7]]},"3525":{"position":[[54,7],[146,7]]},"3531":{"position":[[40,7]]},"3537":{"position":[[151,7]]},"3539":{"position":[[162,7],[300,7],[387,7],[475,7],[535,7],[600,7],[663,7],[728,7],[819,7],[923,7],[1004,7]]},"3541":{"position":[[24,7]]},"3545":{"position":[[40,7]]},"3551":{"position":[[159,7]]},"3553":{"position":[[73,7],[161,7],[221,7],[286,7],[391,7],[619,7],[772,7],[869,7],[999,7],[1067,7],[1141,7],[1252,7],[1351,7],[1445,7]]},"3559":{"position":[[40,7]]},"3565":{"position":[[149,7]]},"3573":{"position":[[40,7]]},"3579":{"position":[[142,7]]},"3581":{"position":[[190,7],[314,7],[442,7],[602,7]]},"3583":{"position":[[4,7],[133,7]]},"3587":{"position":[[40,7]]},"3593":{"position":[[147,7]]},"3595":{"position":[[54,7],[119,7],[227,7],[308,7],[574,7],[700,7],[828,7]]}}}],["defaultcost",{"_index":470,"t":{"3569":{"position":[[81,12]]}}}],["defin",{"_index":189,"t":{"3385":{"position":[[559,6]]},"3399":{"position":[[10,7]]},"3497":{"position":[[10,7]]},"3539":{"position":[[10,7]]},"3581":{"position":[[10,7]]}}}],["delet",{"_index":44,"t":{"3343":{"position":[[627,6],[634,7],[792,6]]},"3357":{"position":[[587,8]]},"3385":{"position":[[209,8]]},"3469":{"position":[[36,8]]},"3497":{"position":[[811,8]]},"3511":{"position":[[826,8]]},"3539":{"position":[[966,8]]},"3595":{"position":[[270,8]]}}}],["delete(key",{"_index":46,"t":{"3343":{"position":[[735,10]]},"3351":{"position":[[174,10]]},"3365":{"position":[[174,10]]},"3379":{"position":[[174,10]]},"3393":{"position":[[174,10]]},"3407":{"position":[[174,10]]},"3421":{"position":[[171,10]]},"3435":{"position":[[175,10]]},"3449":{"position":[[174,10]]},"3463":{"position":[[174,10]]},"3477":{"position":[[174,10]]},"3491":{"position":[[174,10]]},"3505":{"position":[[174,10]]},"3519":{"position":[[174,10]]},"3533":{"position":[[174,10]]},"3547":{"position":[[174,10]]},"3561":{"position":[[174,10]]},"3575":{"position":[[174,10]]},"3589":{"position":[[174,10]]}}}],["design",{"_index":5,"t":{"3343":{"position":[[62,8]]}}}],["develop",{"_index":288,"t":{"3427":{"position":[[1476,9],[1645,9],[2172,9],[2341,9]]}}}],["dgraph",{"_index":174,"t":{"3375":{"position":[[26,6]]},"3557":{"position":[[36,6]]}}}],["dialtimeout",{"_index":325,"t":{"3441":{"position":[[75,11],[141,11]]},"3443":{"position":[[67,12]]}}}],["didn't",{"_index":96,"t":{"3353":{"position":[[127,6]]},"3367":{"position":[[132,6]]},"3381":{"position":[[113,6]]},"3395":{"position":[[112,6]]},"3409":{"position":[[116,6]]},"3423":{"position":[[115,6]]},"3437":{"position":[[111,6]]},"3451":{"position":[[113,6]]},"3465":{"position":[[113,6]]},"3479":{"position":[[114,6]]},"3493":{"position":[[112,6]]},"3507":{"position":[[112,6]]},"3521":{"position":[[113,6]]},"3535":{"position":[[115,6]]},"3549":{"position":[[112,6]]},"3563":{"position":[[116,6]]},"3577":{"position":[[109,6]]},"3591":{"position":[[114,6]]}}}],["differ",{"_index":12,"t":{"3343":{"position":[[158,9]]}}}],["disabl",{"_index":365,"t":{"3495":{"position":[[369,10]]},"3497":{"position":[[964,9]]},"3499":{"position":[[174,10]]},"3539":{"position":[[830,9]]},"3541":{"position":[[169,10]]}}}],["divid",{"_index":340,"t":{"3455":{"position":[[36,7]]}}}],["docker",{"_index":269,"t":{"3427":{"position":[[535,6],[596,6]]}}}],["doesn't",{"_index":275,"t":{"3427":{"position":[[1192,7],[1888,7],[2534,7],[2702,7]]}}}],["don't",{"_index":203,"t":{"3389":{"position":[[211,5]]},"3427":{"position":[[2883,5]]},"3521":{"position":[[210,5]]}}}],["driver",{"_index":2,"t":{"3343":{"position":[[16,7]]},"3347":{"position":[[19,6],[44,6],[67,7]]},"3367":{"position":[[19,6]]},"3389":{"position":[[16,6]]},"3403":{"position":[[20,6]]},"3417":{"position":[[19,6]]},"3431":{"position":[[15,6]]},"3445":{"position":[[19,6]]},"3459":{"position":[[21,7]]},"3473":{"position":[[18,6],[48,7]]},"3487":{"position":[[16,6]]},"3501":{"position":[[16,6]]},"3529":{"position":[[19,6]]},"3543":{"position":[[16,6]]},"3557":{"position":[[23,6]]},"3571":{"position":[[13,6]]},"3585":{"position":[[18,6]]}}}],["driver.cli",{"_index":82,"t":{"3351":{"position":[[288,13]]}}}],["driver/mysql",{"_index":370,"t":{"3501":{"position":[[53,13]]}}}],["dure",{"_index":386,"t":{"3525":{"position":[[106,6]]}}}],["dynamodb",{"_index":60,"t":{"3345":{"position":[[42,8]]},"3417":{"position":[[2,8]]},"3423":{"position":[[0,8],[193,8]]},"3425":{"position":[[148,8]]},"3427":{"position":[[38,8],[326,8],[442,8],[518,9],[1467,8],[1636,8],[2163,8],[2332,8]]}}}],["dynamodb.new(dynamodb.config",{"_index":254,"t":{"3425":{"position":[[166,29]]}}}],["e.g",{"_index":260,"t":{"3427":{"position":[[161,4]]}}}],["each",{"_index":441,"t":{"3553":{"position":[[972,4]]}}}],["ec2",{"_index":247,"t":{"3417":{"position":[[177,3]]},"3571":{"position":[[171,3]]}}}],["effect",{"_index":426,"t":{"3553":{"position":[[541,7]]}}}],["empti",{"_index":37,"t":{"3343":{"position":[[518,5]]}}}],["enabl",{"_index":432,"t":{"3553":{"position":[[715,7]]}}}],["encount",{"_index":167,"t":{"3371":{"position":[[584,9]]},"3427":{"position":[[933,9]]},"3581":{"position":[[536,9]]}}}],["endpoint",{"_index":155,"t":{"3371":{"position":[[108,9],[191,8]]},"3373":{"position":[[56,9]]},"3427":{"position":[[459,9],[723,8]]},"3439":{"position":[[233,10]]},"3441":{"position":[[24,9],[53,9]]},"3443":{"position":[[28,10]]},"3579":{"position":[[255,9],[269,10]]},"3581":{"position":[[102,8],[111,8]]},"3583":{"position":[[52,8],[200,9]]}}}],["environ",{"_index":244,"t":{"3417":{"position":[[131,11]]},"3427":{"position":[[224,11],[261,11]]},"3571":{"position":[[125,11]]}}}],["err",{"_index":411,"t":{"3551":{"position":[[675,3],[737,3]]}}}],["error",{"_index":30,"t":{"3343":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"3351":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3365":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3379":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3393":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3407":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3421":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"3427":{"position":[[2737,5],[3002,7]]},"3435":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"3449":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3463":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3477":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3491":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3505":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3519":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3533":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3547":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3561":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3575":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3589":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]}}}],["especi",{"_index":266,"t":{"3427":{"position":[[480,10]]}}}],["establish",{"_index":327,"t":{"3441":{"position":[[117,9]]}}}],["etcd",{"_index":61,"t":{"3345":{"position":[[51,4]]},"3389":{"position":[[29,4]]},"3431":{"position":[[2,4],[28,4]]},"3437":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":320,"t":{"3439":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":321,"t":{"3439":{"position":[[216,16]]}}}],["exampl",{"_index":75,"t":{"3349":{"position":[[24,8]]},"3363":{"position":[[24,8]]},"3377":{"position":[[24,8]]},"3391":{"position":[[24,8]]},"3405":{"position":[[24,8]]},"3419":{"position":[[24,8]]},"3427":{"position":[[1407,7],[2103,7]]},"3433":{"position":[[24,8]]},"3447":{"position":[[24,8]]},"3461":{"position":[[24,8]]},"3475":{"position":[[24,8]]},"3489":{"position":[[24,8]]},"3503":{"position":[[24,8]]},"3517":{"position":[[24,8]]},"3531":{"position":[[24,8]]},"3545":{"position":[[24,8]]},"3553":{"position":[[555,8]]},"3559":{"position":[[24,8]]},"3573":{"position":[[24,8]]},"3587":{"position":[[24,8]]}}}],["execut",{"_index":438,"t":{"3553":{"position":[[920,7]]}}}],["exist",{"_index":26,"t":{"3343":{"position":[[371,5]]},"3357":{"position":[[491,8],[508,8]]},"3371":{"position":[[315,8],[332,8]]},"3385":{"position":[[118,8],[135,8]]},"3399":{"position":[[485,8],[502,8]]},"3427":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"3455":{"position":[[166,8],[183,8]]},"3483":{"position":[[626,8],[643,8]]},"3497":{"position":[[720,8],[737,8]]},"3511":{"position":[[735,8],[752,8]]},"3521":{"position":[[224,8]]},"3539":{"position":[[875,8],[892,8]]},"3553":{"position":[[1199,8],[1216,8]]},"3581":{"position":[[265,8],[282,8]]},"3595":{"position":[[179,8],[196,8]]}}}],["exp",{"_index":42,"t":{"3343":{"position":[[599,3]]},"3351":{"position":[[131,3]]},"3365":{"position":[[131,3]]},"3379":{"position":[[131,3]]},"3393":{"position":[[131,3]]},"3407":{"position":[[131,3]]},"3421":{"position":[[128,3]]},"3435":{"position":[[132,3]]},"3449":{"position":[[131,3]]},"3463":{"position":[[131,3]]},"3477":{"position":[[131,3]]},"3491":{"position":[[131,3]]},"3505":{"position":[[131,3]]},"3519":{"position":[[131,3]]},"3533":{"position":[[131,3]]},"3547":{"position":[[131,3]]},"3561":{"position":[[131,3]]},"3575":{"position":[[131,3]]},"3589":{"position":[[131,3]]}}}],["expir",{"_index":34,"t":{"3343":{"position":[[474,10],[503,11]]},"3357":{"position":[[596,7]]},"3385":{"position":[[218,7]]},"3469":{"position":[[45,7]]},"3497":{"position":[[820,7]]},"3511":{"position":[[835,7]]},"3539":{"position":[[975,7]]},"3595":{"position":[[279,7]]}}}],["fail",{"_index":326,"t":{"3441":{"position":[[106,7]]}}}],["failov",{"_index":404,"t":{"3551":{"position":[[419,8]]}}}],["failovercli",{"_index":433,"t":{"3553":{"position":[[723,14]]}}}],["failur",{"_index":169,"t":{"3371":{"position":[[604,8]]},"3427":{"position":[[953,8]]},"3581":{"position":[[556,8]]}}}],["fals",{"_index":116,"t":{"3355":{"position":[[347,6]]},"3357":{"position":[[555,5]]},"3359":{"position":[[151,6]]},"3371":{"position":[[376,5]]},"3373":{"position":[[96,6]]},"3383":{"position":[[281,6]]},"3385":{"position":[[177,5],[620,5]]},"3387":{"position":[[63,6],[196,6]]},"3397":{"position":[[298,6]]},"3399":{"position":[[445,5],[545,5]]},"3401":{"position":[[151,6],[165,6]]},"3427":{"position":[[1108,5],[2786,6]]},"3429":{"position":[[103,6]]},"3455":{"position":[[225,5]]},"3481":{"position":[[337,6],[549,6]]},"3483":{"position":[[685,5]]},"3485":{"position":[[134,6]]},"3495":{"position":[[323,6],[548,6]]},"3497":{"position":[[779,5]]},"3499":{"position":[[128,6]]},"3509":{"position":[[323,6],[516,6],[730,6]]},"3511":{"position":[[794,5]]},"3513":{"position":[[128,6]]},"3537":{"position":[[300,6]]},"3539":{"position":[[934,5]]},"3541":{"position":[[187,6]]},"3551":{"position":[[335,6],[1003,6],[1160,6]]},"3553":{"position":[[1263,5]]},"3555":{"position":[[116,6]]},"3579":{"position":[[308,6]]},"3581":{"position":[[325,5]]},"3583":{"position":[[284,6]]},"3593":{"position":[[310,6]]},"3595":{"position":[[238,5]]},"3597":{"position":[[88,6]]}}}],["fast",{"_index":173,"t":{"3375":{"position":[[2,4]]},"3389":{"position":[[165,5]]},"3515":{"position":[[2,4]]}}}],["fiber",{"_index":8,"t":{"3343":{"position":[[95,5]]},"3355":{"position":[[302,8]]},"3357":{"position":[[367,7]]},"3359":{"position":[[106,8]]},"3481":{"position":[[292,8],[504,8]]},"3483":{"position":[[502,7]]},"3485":{"position":[[89,8]]},"3495":{"position":[[283,8]]},"3497":{"position":[[606,7]]},"3499":{"position":[[88,8]]},"3509":{"position":[[283,8]]},"3511":{"position":[[621,7]]},"3513":{"position":[[88,8]]},"3539":{"position":[[674,7]]},"3541":{"position":[[127,8]]},"3595":{"position":[[65,7]]}}}],["fiber.badg",{"_index":180,"t":{"3383":{"position":[[256,17]]},"3385":{"position":[[65,16]]},"3387":{"position":[[38,17]]}}}],["fiber.db",{"_index":213,"t":{"3399":{"position":[[107,10]]},"3401":{"position":[[77,11]]}}}],["fiber.sqlite3",{"_index":482,"t":{"3593":{"position":[[260,18]]},"3597":{"position":[[38,18]]}}}],["fiber_storag",{"_index":115,"t":{"3355":{"position":[[323,16]]},"3357":{"position":[[437,15]]},"3359":{"position":[[127,16]]},"3399":{"position":[[182,15]]},"3401":{"position":[[97,16]]},"3415":{"position":[[138,16]]},"3427":{"position":[[354,16]]},"3429":{"position":[[35,16]]},"3481":{"position":[[313,16],[525,16]]},"3483":{"position":[[572,15]]},"3485":{"position":[[110,16]]},"3495":{"position":[[299,16]]},"3497":{"position":[[671,15]]},"3499":{"position":[[104,16]]},"3509":{"position":[[299,16]]},"3511":{"position":[[686,15]]},"3513":{"position":[[104,16]]},"3537":{"position":[[276,16]]},"3539":{"position":[[739,15]]},"3541":{"position":[[143,16]]},"3593":{"position":[[286,16]]},"3595":{"position":[[130,15]]},"3597":{"position":[[64,16]]}}}],["field",{"_index":133,"t":{"3359":{"position":[[23,6]]},"3417":{"position":[[67,6],[206,6]]},"3539":{"position":[[139,6]]},"3571":{"position":[[61,6],[200,6]]}}}],["file",{"_index":217,"t":{"3399":{"position":[[265,4]]},"3427":{"position":[[216,4]]}}}],["first",{"_index":95,"t":{"3353":{"position":[[114,5]]},"3367":{"position":[[119,5]]},"3381":{"position":[[100,5]]},"3395":{"position":[[99,5]]},"3409":{"position":[[103,5]]},"3423":{"position":[[102,5]]},"3437":{"position":[[98,5]]},"3451":{"position":[[100,5]]},"3465":{"position":[[100,5]]},"3479":{"position":[[101,5]]},"3493":{"position":[[99,5]]},"3507":{"position":[[99,5]]},"3521":{"position":[[100,5]]},"3535":{"position":[[102,5]]},"3549":{"position":[[99,5]]},"3563":{"position":[[103,5]]},"3577":{"position":[[96,5]]},"3591":{"position":[[101,5]]}}}],["follow",{"_index":103,"t":{"3355":{"position":[[89,9]]},"3369":{"position":[[90,9]]},"3383":{"position":[[87,9]]},"3397":{"position":[[86,9]]},"3411":{"position":[[90,9]]},"3425":{"position":[[89,9]]},"3439":{"position":[[85,9]]},"3453":{"position":[[89,9]]},"3467":{"position":[[87,9]]},"3481":{"position":[[88,9]]},"3495":{"position":[[86,9]]},"3509":{"position":[[86,9]]},"3523":{"position":[[87,9]]},"3537":{"position":[[92,9]]},"3551":{"position":[[100,9]]},"3565":{"position":[[90,9]]},"3579":{"position":[[83,9]]},"3593":{"position":[[88,9]]}}}],["format",{"_index":425,"t":{"3553":{"position":[[433,6]]}}}],["free",{"_index":284,"t":{"3427":{"position":[[1369,4],[2065,4]]}}}],["frequenc",{"_index":460,"t":{"3565":{"position":[[303,9]]},"3567":{"position":[[60,9]]}}}],["full",{"_index":204,"t":{"3389":{"position":[[227,4]]}}}],["func",{"_index":78,"t":{"3351":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3365":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3379":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3393":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3407":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3421":{"position":[[0,4],[32,4],[82,4],[153,4],[196,4],[228,4],[260,4]]},"3435":{"position":[[0,4],[36,4],[86,4],[157,4],[200,4],[232,4],[264,4]]},"3449":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3463":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3477":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3491":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3505":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3519":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3533":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3547":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3561":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3575":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3589":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]}}}],["garbag",{"_index":51,"t":{"3343":{"position":[[877,7]]}}}],["gcinterv",{"_index":117,"t":{"3355":{"position":[[354,11]]},"3357":{"position":[[653,10]]},"3359":{"position":[[158,11]]},"3383":{"position":[[288,11]]},"3385":{"position":[[275,10]]},"3387":{"position":[[70,11]]},"3467":{"position":[[246,11]]},"3469":{"position":[[92,10]]},"3471":{"position":[[28,11]]},"3495":{"position":[[330,11],[555,11]]},"3497":{"position":[[877,10]]},"3499":{"position":[[135,11]]},"3509":{"position":[[330,11],[523,11],[737,11]]},"3511":{"position":[[892,10]]},"3513":{"position":[[135,11]]},"3537":{"position":[[307,11]]},"3539":{"position":[[1032,10]]},"3541":{"position":[[194,11]]},"3593":{"position":[[317,11]]},"3595":{"position":[[336,10]]},"3597":{"position":[[95,11]]}}}],["get",{"_index":21,"t":{"3343":{"position":[[289,4]]}}}],["get(key",{"_index":27,"t":{"3343":{"position":[[377,7]]},"3351":{"position":[[53,7]]},"3365":{"position":[[53,7]]},"3379":{"position":[[53,7]]},"3393":{"position":[[53,7]]},"3407":{"position":[[53,7]]},"3421":{"position":[[50,7]]},"3435":{"position":[[54,7]]},"3449":{"position":[[53,7]]},"3463":{"position":[[53,7]]},"3477":{"position":[[53,7]]},"3491":{"position":[[53,7]]},"3505":{"position":[[53,7]]},"3519":{"position":[[53,7]]},"3533":{"position":[[53,7]]},"3547":{"position":[[53,7]]},"3561":{"position":[[53,7]]},"3575":{"position":[[53,7]]},"3589":{"position":[[53,7]]}}}],["github.com//:@127.0.0.1:6379/:@localhost:6379/:@tcp(:)/SQLite3 | Fiber - - + +
-
Version: mysql_v1.x.x

SQLite3

Release +

Version: mysql_v1.x.x

SQLite3

Release Discord Test Security -Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
- - +Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/next/arangodb/index.html b/storage/next/arangodb/index.html index 7fbbb236a7c..90935999fe8 100644 --- a/storage/next/arangodb/index.html +++ b/storage/next/arangodb/index.html @@ -6,17 +6,17 @@ ArangoDB | Fiber - - + +
-
Version: Next

ArangoDB

Release +

Version: Next

ArangoDB

Release Discord Test Security -Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/next/azureblob/index.html b/storage/next/azureblob/index.html index a2b340a1390..761c3d3a5c0 100644 --- a/storage/next/azureblob/index.html +++ b/storage/next/azureblob/index.html @@ -6,17 +6,17 @@ Azure Blob | Fiber - - + +
-
Version: Next

Azure Blob

Release +

Version: Next

Azure Blob

Release Discord Test Security -Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
- - +Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
+ + \ No newline at end of file diff --git a/storage/next/badger/index.html b/storage/next/badger/index.html index edaa460f036..70e3e465aa7 100644 --- a/storage/next/badger/index.html +++ b/storage/next/badger/index.html @@ -6,17 +6,17 @@ Badger | Fiber - - + +
-
Version: Next

Badger

Release +

Version: Next

Badger

Release Discord Test Security -Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
- - +Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
+ + \ No newline at end of file diff --git a/storage/next/bbolt/index.html b/storage/next/bbolt/index.html index 7b1b21c16c6..06e0aae5183 100644 --- a/storage/next/bbolt/index.html +++ b/storage/next/bbolt/index.html @@ -6,17 +6,17 @@ Bbolt | Fiber - - + +
-
Version: Next

Bbolt

Release +

Version: Next

Bbolt

Release Discord Test Security -Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
- - +Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/next/couchbase/index.html b/storage/next/couchbase/index.html index 0f6a1f64999..7667ffda7fd 100644 --- a/storage/next/couchbase/index.html +++ b/storage/next/couchbase/index.html @@ -6,17 +6,17 @@ Couchbase | Fiber - - + +
-
Version: Next

Couchbase

Release +

Version: Next

Couchbase

Release Discord Test Security -Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
- - +Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/next/dynamodb/index.html b/storage/next/dynamodb/index.html index 858f83c8151..9bea907df5c 100644 --- a/storage/next/dynamodb/index.html +++ b/storage/next/dynamodb/index.html @@ -6,17 +6,17 @@ DynamoDB | Fiber - - + +
-
Version: Next

DynamoDB

Release +

Version: Next

DynamoDB

Release Discord Test Security -Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
- - +Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
+ + \ No newline at end of file diff --git a/storage/next/etcd/index.html b/storage/next/etcd/index.html index 04deed9318d..a0640b508da 100644 --- a/storage/next/etcd/index.html +++ b/storage/next/etcd/index.html @@ -6,17 +6,17 @@ Etcd | Fiber - - + +
-
Version: Next

Etcd

Release +

Version: Next

Etcd

Release Discord Test Security -Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
- - +Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
+ + \ No newline at end of file diff --git a/storage/next/index.html b/storage/next/index.html index bdc61bfaa39..835067fccc2 100644 --- a/storage/next/index.html +++ b/storage/next/index.html @@ -6,13 +6,13 @@ 👋 Welcome | Fiber - - + +
-
Version: Next

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

- - +
Version: Next

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

+ + \ No newline at end of file diff --git a/storage/next/memcache/index.html b/storage/next/memcache/index.html index 08ceca987eb..bcb7ab91a3e 100644 --- a/storage/next/memcache/index.html +++ b/storage/next/memcache/index.html @@ -6,17 +6,17 @@ Memcache | Fiber - - + +
-
Version: Next

Memcache

Release +

Version: Next

Memcache

Release Discord Test Security -Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
- - +Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
+ + \ No newline at end of file diff --git a/storage/next/memory/index.html b/storage/next/memory/index.html index 7e8c28d51fd..3b0ada4ad91 100644 --- a/storage/next/memory/index.html +++ b/storage/next/memory/index.html @@ -6,17 +6,17 @@ Memory | Fiber - - + +
-
Version: Next

Memory

Release +

Version: Next

Memory

Release Discord Test Security -Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
- - +Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/next/mongodb/index.html b/storage/next/mongodb/index.html index 3437aa65e69..a670d9b792a 100644 --- a/storage/next/mongodb/index.html +++ b/storage/next/mongodb/index.html @@ -6,17 +6,17 @@ MongoDB | Fiber - - + +
-
Version: Next

MongoDB

Release +

Version: Next

MongoDB

Release Discord Test Security -Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
- - +Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/next/mssql/index.html b/storage/next/mssql/index.html index 25021259a03..da994e424a3 100644 --- a/storage/next/mssql/index.html +++ b/storage/next/mssql/index.html @@ -6,17 +6,17 @@ MSSQL | Fiber - - + +
-
Version: Next

MSSQL

Release +

Version: Next

MSSQL

Release Discord Test Security -Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
- - +Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
+ + \ No newline at end of file diff --git a/storage/next/mysql/index.html b/storage/next/mysql/index.html index 62735473e7b..40fe241e787 100644 --- a/storage/next/mysql/index.html +++ b/storage/next/mysql/index.html @@ -6,17 +6,17 @@ MySQL | Fiber - - + +
-
Version: Next

MySQL

Release +

Version: Next

MySQL

Release Discord Test Security -Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/next/pebble/index.html b/storage/next/pebble/index.html index 818a805df81..884e3741155 100644 --- a/storage/next/pebble/index.html +++ b/storage/next/pebble/index.html @@ -6,17 +6,17 @@ Pebble | Fiber - - + +
-
Version: Next

Pebble

Release +

Version: Next

Pebble

Release Discord Test Security -Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
- - +Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
+ + \ No newline at end of file diff --git a/storage/next/postgres/index.html b/storage/next/postgres/index.html index 636e4dc2878..f3e293c3905 100644 --- a/storage/next/postgres/index.html +++ b/storage/next/postgres/index.html @@ -6,17 +6,17 @@ Postgres | Fiber - - + +
-
Version: Next

Postgres

Release +

Version: Next

Postgres

Release Discord Test Security -Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/next/redis/index.html b/storage/next/redis/index.html index 1cd2f9d9428..5d1e286946f 100644 --- a/storage/next/redis/index.html +++ b/storage/next/redis/index.html @@ -6,17 +6,17 @@ Redis | Fiber - - + +
-
Version: Next

Redis

Release +

Version: Next

Redis

Release Discord Test Security -Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
- - +Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
+ + \ No newline at end of file diff --git a/storage/next/ristretto/index.html b/storage/next/ristretto/index.html index 6e989243fd4..75b0f6aa1f8 100644 --- a/storage/next/ristretto/index.html +++ b/storage/next/ristretto/index.html @@ -6,17 +6,17 @@ Ristretto | Fiber - - + +
-
Version: Next

Ristretto

Release +

Version: Next

Ristretto

Release Discord Test Security -Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
- - +Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
+ + \ No newline at end of file diff --git a/storage/next/s3/index.html b/storage/next/s3/index.html index a5068027d30..b2de2ac8b66 100644 --- a/storage/next/s3/index.html +++ b/storage/next/s3/index.html @@ -6,17 +6,17 @@ S3 | Fiber - - + +
-
Version: Next

S3

Release +

Version: Next

S3

Release Discord Test Security -Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
- - +Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/next/sqlite3/index.html b/storage/next/sqlite3/index.html index 6c24fce92fe..5d92bb019be 100644 --- a/storage/next/sqlite3/index.html +++ b/storage/next/sqlite3/index.html @@ -6,17 +6,17 @@ SQLite3 | Fiber - - + +
-
Version: Next

SQLite3

Release +

Version: Next

SQLite3

Release Discord Test Security -Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
- - +Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/pebble/index.html b/storage/pebble/index.html index 06c30d2ad36..d12d541d73a 100644 --- a/storage/pebble/index.html +++ b/storage/pebble/index.html @@ -1,22 +1,22 @@ - + -Pebble | Fiber +Pebble | Fiber - - + +
-
Version: memcache_v1.x.x

Pebble

Release +

Version: bbolt_v1.x.x

Pebble

Release Discord Test Security -Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
- - +Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
+ + \ No newline at end of file diff --git a/storage/postgres/index.html b/storage/postgres/index.html index 47e115a523e..08bd3468a9e 100644 --- a/storage/postgres/index.html +++ b/storage/postgres/index.html @@ -1,22 +1,22 @@ - + -Postgres | Fiber +Postgres | Fiber - - + +
-
Version: memcache_v1.x.x

Postgres

Release +

Version: bbolt_v1.x.x

Postgres

Release Discord Test Security -Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/redis/index.html b/storage/redis/index.html index 88f1f19c8cd..126a5f02289 100644 --- a/storage/redis/index.html +++ b/storage/redis/index.html @@ -1,22 +1,22 @@ - + -Redis | Fiber +Redis | Fiber - - + +
-
Version: memcache_v1.x.x

Redis

Release +

Version: bbolt_v1.x.x

Redis

Release Discord Test Security -Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
- - +Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
+ + \ No newline at end of file diff --git a/storage/ristretto/index.html b/storage/ristretto/index.html index f66da319959..dae0cb108f6 100644 --- a/storage/ristretto/index.html +++ b/storage/ristretto/index.html @@ -1,22 +1,22 @@ - + -Ristretto | Fiber +Ristretto | Fiber - - + +
-
Version: memcache_v1.x.x

Ristretto

Release +

Version: bbolt_v1.x.x

Ristretto

Release Discord Test Security -Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
- - +Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/arangodb/index.html b/storage/ristretto_v1.x.x/arangodb/index.html index 44c18c65757..4dfb575c240 100644 --- a/storage/ristretto_v1.x.x/arangodb/index.html +++ b/storage/ristretto_v1.x.x/arangodb/index.html @@ -6,17 +6,17 @@ ArangoDB | Fiber - - + +
-
Version: ristretto_v1.x.x

ArangoDB

Release +

Version: ristretto_v1.x.x

ArangoDB

Release Discord Test Security -Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/azureblob/index.html b/storage/ristretto_v1.x.x/azureblob/index.html index 88c6ceaf62d..6d8bb111236 100644 --- a/storage/ristretto_v1.x.x/azureblob/index.html +++ b/storage/ristretto_v1.x.x/azureblob/index.html @@ -6,17 +6,17 @@ Azure Blob | Fiber - - + +
-
Version: ristretto_v1.x.x

Azure Blob

Release +

Version: ristretto_v1.x.x

Azure Blob

Release Discord Test Security -Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
- - +Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/badger/index.html b/storage/ristretto_v1.x.x/badger/index.html index 12ca8bcacde..17bd5f99c53 100644 --- a/storage/ristretto_v1.x.x/badger/index.html +++ b/storage/ristretto_v1.x.x/badger/index.html @@ -6,17 +6,17 @@ Badger | Fiber - - + +
-
Version: ristretto_v1.x.x

Badger

Release +

Version: ristretto_v1.x.x

Badger

Release Discord Test Security -Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
- - +Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/bbolt/index.html b/storage/ristretto_v1.x.x/bbolt/index.html index 738e4e8d345..40be9e76234 100644 --- a/storage/ristretto_v1.x.x/bbolt/index.html +++ b/storage/ristretto_v1.x.x/bbolt/index.html @@ -6,17 +6,17 @@ Bbolt | Fiber - - + +
-
Version: ristretto_v1.x.x

Bbolt

Release +

Version: ristretto_v1.x.x

Bbolt

Release Discord Test Security -Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
- - +Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/couchbase/index.html b/storage/ristretto_v1.x.x/couchbase/index.html index c6cea7e4eaf..f9b07ea11d1 100644 --- a/storage/ristretto_v1.x.x/couchbase/index.html +++ b/storage/ristretto_v1.x.x/couchbase/index.html @@ -6,17 +6,17 @@ Couchbase | Fiber - - + +
-
Version: ristretto_v1.x.x

Couchbase

Release +

Version: ristretto_v1.x.x

Couchbase

Release Discord Test Security -Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
- - +Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/dynamodb/index.html b/storage/ristretto_v1.x.x/dynamodb/index.html index 92c936c6924..89f2dede3a4 100644 --- a/storage/ristretto_v1.x.x/dynamodb/index.html +++ b/storage/ristretto_v1.x.x/dynamodb/index.html @@ -6,17 +6,17 @@ DynamoDB | Fiber - - + +
-
Version: ristretto_v1.x.x

DynamoDB

Release +

Version: ristretto_v1.x.x

DynamoDB

Release Discord Test Security -Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
- - +Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/etcd/index.html b/storage/ristretto_v1.x.x/etcd/index.html index 7fa79964544..3d07707cb1a 100644 --- a/storage/ristretto_v1.x.x/etcd/index.html +++ b/storage/ristretto_v1.x.x/etcd/index.html @@ -6,17 +6,17 @@ Etcd | Fiber - - + +
-
Version: ristretto_v1.x.x

Etcd

Release +

Version: ristretto_v1.x.x

Etcd

Release Discord Test Security -Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
- - +Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/index.html b/storage/ristretto_v1.x.x/index.html index 5d4609d0c06..b4878b1daf0 100644 --- a/storage/ristretto_v1.x.x/index.html +++ b/storage/ristretto_v1.x.x/index.html @@ -6,13 +6,13 @@ 👋 Welcome | Fiber - - + +
-
Version: ristretto_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

- - +
Version: ristretto_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/memcache/index.html b/storage/ristretto_v1.x.x/memcache/index.html index ddf323742b2..e516e6ad687 100644 --- a/storage/ristretto_v1.x.x/memcache/index.html +++ b/storage/ristretto_v1.x.x/memcache/index.html @@ -6,17 +6,17 @@ Memcache | Fiber - - + +
-
Version: ristretto_v1.x.x

Memcache

Release +

Version: ristretto_v1.x.x

Memcache

Release Discord Test Security -Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
- - +Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/memory/index.html b/storage/ristretto_v1.x.x/memory/index.html index 9ba4e8127f0..dfc3f22724f 100644 --- a/storage/ristretto_v1.x.x/memory/index.html +++ b/storage/ristretto_v1.x.x/memory/index.html @@ -6,17 +6,17 @@ Memory | Fiber - - + +
-
Version: ristretto_v1.x.x

Memory

Release +

Version: ristretto_v1.x.x

Memory

Release Discord Test Security -Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
- - +Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/mongodb/index.html b/storage/ristretto_v1.x.x/mongodb/index.html index fc4545e907e..75504f80142 100644 --- a/storage/ristretto_v1.x.x/mongodb/index.html +++ b/storage/ristretto_v1.x.x/mongodb/index.html @@ -6,17 +6,17 @@ MongoDB | Fiber - - + +
-
Version: ristretto_v1.x.x

MongoDB

Release +

Version: ristretto_v1.x.x

MongoDB

Release Discord Test Security -Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
- - +Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/mssql/index.html b/storage/ristretto_v1.x.x/mssql/index.html index 2041cde2e06..a2ec35f1513 100644 --- a/storage/ristretto_v1.x.x/mssql/index.html +++ b/storage/ristretto_v1.x.x/mssql/index.html @@ -6,17 +6,17 @@ MSSQL | Fiber - - + +
-
Version: ristretto_v1.x.x

MSSQL

Release +

Version: ristretto_v1.x.x

MSSQL

Release Discord Test Security -Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
- - +Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/mysql/index.html b/storage/ristretto_v1.x.x/mysql/index.html index 36ffa8160c3..4aab4bed04a 100644 --- a/storage/ristretto_v1.x.x/mysql/index.html +++ b/storage/ristretto_v1.x.x/mysql/index.html @@ -6,17 +6,17 @@ MySQL | Fiber - - + +
-
Version: ristretto_v1.x.x

MySQL

Release +

Version: ristretto_v1.x.x

MySQL

Release Discord Test Security -Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/pebble/index.html b/storage/ristretto_v1.x.x/pebble/index.html index 0aa3f2143a3..7b415d5de38 100644 --- a/storage/ristretto_v1.x.x/pebble/index.html +++ b/storage/ristretto_v1.x.x/pebble/index.html @@ -6,17 +6,17 @@ Pebble | Fiber - - + +
-
Version: ristretto_v1.x.x

Pebble

Release +

Version: ristretto_v1.x.x

Pebble

Release Discord Test Security -Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
- - +Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/postgres/index.html b/storage/ristretto_v1.x.x/postgres/index.html index 347b2fb9dee..1dc8cdf5c5b 100644 --- a/storage/ristretto_v1.x.x/postgres/index.html +++ b/storage/ristretto_v1.x.x/postgres/index.html @@ -6,17 +6,17 @@ Postgres | Fiber - - + +
-
Version: ristretto_v1.x.x

Postgres

Release +

Version: ristretto_v1.x.x

Postgres

Release Discord Test Security -Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/redis/index.html b/storage/ristretto_v1.x.x/redis/index.html index 3fb2c72753e..626efccebec 100644 --- a/storage/ristretto_v1.x.x/redis/index.html +++ b/storage/ristretto_v1.x.x/redis/index.html @@ -6,17 +6,17 @@ Redis | Fiber - - + +
-
Version: ristretto_v1.x.x

Redis

Release +

Version: ristretto_v1.x.x

Redis

Release Discord Test Security -Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
- - +Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/ristretto/index.html b/storage/ristretto_v1.x.x/ristretto/index.html index 6151f6a052d..4b68b3e7e4c 100644 --- a/storage/ristretto_v1.x.x/ristretto/index.html +++ b/storage/ristretto_v1.x.x/ristretto/index.html @@ -6,17 +6,17 @@ Ristretto | Fiber - - + +
-
Version: ristretto_v1.x.x

Ristretto

Release +

Version: ristretto_v1.x.x

Ristretto

Release Discord Test Security -Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
- - +Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/s3/index.html b/storage/ristretto_v1.x.x/s3/index.html index 14b12fdc763..54ca1367210 100644 --- a/storage/ristretto_v1.x.x/s3/index.html +++ b/storage/ristretto_v1.x.x/s3/index.html @@ -6,17 +6,17 @@ S3 | Fiber - - + +
-
Version: ristretto_v1.x.x

S3

Release +

Version: ristretto_v1.x.x

S3

Release Discord Test Security -Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
- - +Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/ristretto_v1.x.x/search-index.json b/storage/ristretto_v1.x.x/search-index.json index 4ef8abebdc2..d722defc41d 100644 --- a/storage/ristretto_v1.x.x/search-index.json +++ b/storage/ristretto_v1.x.x/search-index.json @@ -1 +1 @@ -[{"documents":[{"i":3341,"t":"👋 Welcome","u":"/storage/ristretto_v1.x.x/","b":[]},{"i":3346,"t":"ArangoDB","u":"/storage/ristretto_v1.x.x/arangodb/","b":[]},{"i":3360,"t":"Azure Blob","u":"/storage/ristretto_v1.x.x/azureblob/","b":[]},{"i":3374,"t":"Badger","u":"/storage/ristretto_v1.x.x/badger/","b":[]},{"i":3388,"t":"Bbolt","u":"/storage/ristretto_v1.x.x/bbolt/","b":[]},{"i":3402,"t":"Couchbase","u":"/storage/ristretto_v1.x.x/couchbase/","b":[]},{"i":3416,"t":"DynamoDB","u":"/storage/ristretto_v1.x.x/dynamodb/","b":[]},{"i":3430,"t":"Etcd","u":"/storage/ristretto_v1.x.x/etcd/","b":[]},{"i":3444,"t":"Memcache","u":"/storage/ristretto_v1.x.x/memcache/","b":[]},{"i":3458,"t":"Memory","u":"/storage/ristretto_v1.x.x/memory/","b":[]},{"i":3472,"t":"MongoDB","u":"/storage/ristretto_v1.x.x/mongodb/","b":[]},{"i":3486,"t":"MSSQL","u":"/storage/ristretto_v1.x.x/mssql/","b":[]},{"i":3500,"t":"MySQL","u":"/storage/ristretto_v1.x.x/mysql/","b":[]},{"i":3514,"t":"Pebble","u":"/storage/ristretto_v1.x.x/pebble/","b":[]},{"i":3528,"t":"Postgres","u":"/storage/ristretto_v1.x.x/postgres/","b":[]},{"i":3542,"t":"Redis","u":"/storage/ristretto_v1.x.x/redis/","b":[]},{"i":3556,"t":"Ristretto","u":"/storage/ristretto_v1.x.x/ristretto/","b":[]},{"i":3570,"t":"S3","u":"/storage/ristretto_v1.x.x/s3/","b":[]},{"i":3584,"t":"SQLite3","u":"/storage/ristretto_v1.x.x/sqlite3/","b":[]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3341",[0,1.946,1,1.946]],["t/3346",[2,2.695]],["t/3360",[3,1.946,4,1.946]],["t/3374",[5,2.695]],["t/3388",[6,2.695]],["t/3402",[7,2.695]],["t/3416",[8,2.695]],["t/3430",[9,2.695]],["t/3444",[10,2.695]],["t/3458",[11,2.695]],["t/3472",[12,2.695]],["t/3486",[13,2.695]],["t/3500",[14,2.695]],["t/3514",[15,2.695]],["t/3528",[16,2.695]],["t/3542",[17,2.695]],["t/3556",[18,2.695]],["t/3570",[19,2.695]],["t/3584",[20,2.695]]],"invertedIndex":[["",{"_index":0,"t":{"3341":{"position":[[0,2]]}}}],["arangodb",{"_index":2,"t":{"3346":{"position":[[0,8]]}}}],["azur",{"_index":3,"t":{"3360":{"position":[[0,5]]}}}],["badger",{"_index":5,"t":{"3374":{"position":[[0,6]]}}}],["bbolt",{"_index":6,"t":{"3388":{"position":[[0,5]]}}}],["blob",{"_index":4,"t":{"3360":{"position":[[6,4]]}}}],["couchbas",{"_index":7,"t":{"3402":{"position":[[0,9]]}}}],["dynamodb",{"_index":8,"t":{"3416":{"position":[[0,8]]}}}],["etcd",{"_index":9,"t":{"3430":{"position":[[0,4]]}}}],["memcach",{"_index":10,"t":{"3444":{"position":[[0,8]]}}}],["memori",{"_index":11,"t":{"3458":{"position":[[0,6]]}}}],["mongodb",{"_index":12,"t":{"3472":{"position":[[0,7]]}}}],["mssql",{"_index":13,"t":{"3486":{"position":[[0,5]]}}}],["mysql",{"_index":14,"t":{"3500":{"position":[[0,5]]}}}],["pebbl",{"_index":15,"t":{"3514":{"position":[[0,6]]}}}],["postgr",{"_index":16,"t":{"3528":{"position":[[0,8]]}}}],["redi",{"_index":17,"t":{"3542":{"position":[[0,5]]}}}],["ristretto",{"_index":18,"t":{"3556":{"position":[[0,9]]}}}],["s3",{"_index":19,"t":{"3570":{"position":[[0,2]]}}}],["sqlite3",{"_index":20,"t":{"3584":{"position":[[0,7]]}}}],["welcom",{"_index":1,"t":{"3341":{"position":[[3,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3342,"t":"📦 Storage","u":"/storage/ristretto_v1.x.x/","h":"","p":3341},{"i":3344,"t":"📑 Storage Implementations","u":"/storage/ristretto_v1.x.x/","h":"#-storage-implementations","p":3341},{"i":3348,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#table-of-contents","p":3346},{"i":3350,"t":"Signatures","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#signatures","p":3346},{"i":3352,"t":"Installation","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#installation","p":3346},{"i":3354,"t":"Examples","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#examples","p":3346},{"i":3356,"t":"Config","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#config","p":3346},{"i":3358,"t":"Default Config","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#default-config","p":3346},{"i":3362,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#table-of-contents","p":3360},{"i":3364,"t":"Signatures","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#signatures","p":3360},{"i":3366,"t":"Installation","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#installation","p":3360},{"i":3368,"t":"Examples","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#examples","p":3360},{"i":3370,"t":"Config","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#config","p":3360},{"i":3372,"t":"Default Config","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#default-config","p":3360},{"i":3376,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/badger/","h":"#table-of-contents","p":3374},{"i":3378,"t":"Signatures","u":"/storage/ristretto_v1.x.x/badger/","h":"#signatures","p":3374},{"i":3380,"t":"Installation","u":"/storage/ristretto_v1.x.x/badger/","h":"#installation","p":3374},{"i":3382,"t":"Examples","u":"/storage/ristretto_v1.x.x/badger/","h":"#examples","p":3374},{"i":3384,"t":"Config","u":"/storage/ristretto_v1.x.x/badger/","h":"#config","p":3374},{"i":3386,"t":"Default Config","u":"/storage/ristretto_v1.x.x/badger/","h":"#default-config","p":3374},{"i":3390,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#table-of-contents","p":3388},{"i":3392,"t":"Signatures","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#signatures","p":3388},{"i":3394,"t":"Installation","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#installation","p":3388},{"i":3396,"t":"Examples","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#examples","p":3388},{"i":3398,"t":"Config","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#config","p":3388},{"i":3400,"t":"Default Config","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#default-config","p":3388},{"i":3404,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#table-of-contents","p":3402},{"i":3406,"t":"Signatures","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#signatures","p":3402},{"i":3408,"t":"Installation","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#installation","p":3402},{"i":3410,"t":"Examples","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#examples","p":3402},{"i":3412,"t":"Config","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#config","p":3402},{"i":3414,"t":"Default Config","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#default-config","p":3402},{"i":3418,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#table-of-contents","p":3416},{"i":3420,"t":"Signatures","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#signatures","p":3416},{"i":3422,"t":"Installation","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#installation","p":3416},{"i":3424,"t":"Examples","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#examples","p":3416},{"i":3426,"t":"Config","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#config","p":3416},{"i":3428,"t":"Default Config","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#default-config","p":3416},{"i":3432,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/etcd/","h":"#table-of-contents","p":3430},{"i":3434,"t":"Signatures","u":"/storage/ristretto_v1.x.x/etcd/","h":"#signatures","p":3430},{"i":3436,"t":"Installation","u":"/storage/ristretto_v1.x.x/etcd/","h":"#installation","p":3430},{"i":3438,"t":"Examples","u":"/storage/ristretto_v1.x.x/etcd/","h":"#examples","p":3430},{"i":3440,"t":"Config","u":"/storage/ristretto_v1.x.x/etcd/","h":"#config","p":3430},{"i":3442,"t":"Default Config","u":"/storage/ristretto_v1.x.x/etcd/","h":"#default-config","p":3430},{"i":3446,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/memcache/","h":"#table-of-contents","p":3444},{"i":3448,"t":"Signatures","u":"/storage/ristretto_v1.x.x/memcache/","h":"#signatures","p":3444},{"i":3450,"t":"Installation","u":"/storage/ristretto_v1.x.x/memcache/","h":"#installation","p":3444},{"i":3452,"t":"Examples","u":"/storage/ristretto_v1.x.x/memcache/","h":"#examples","p":3444},{"i":3454,"t":"Config","u":"/storage/ristretto_v1.x.x/memcache/","h":"#config","p":3444},{"i":3456,"t":"Default Config","u":"/storage/ristretto_v1.x.x/memcache/","h":"#default-config","p":3444},{"i":3460,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/memory/","h":"#table-of-contents","p":3458},{"i":3462,"t":"Signatures","u":"/storage/ristretto_v1.x.x/memory/","h":"#signatures","p":3458},{"i":3464,"t":"Installation","u":"/storage/ristretto_v1.x.x/memory/","h":"#installation","p":3458},{"i":3466,"t":"Examples","u":"/storage/ristretto_v1.x.x/memory/","h":"#examples","p":3458},{"i":3468,"t":"Config","u":"/storage/ristretto_v1.x.x/memory/","h":"#config","p":3458},{"i":3470,"t":"Default Config","u":"/storage/ristretto_v1.x.x/memory/","h":"#default-config","p":3458},{"i":3474,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#table-of-contents","p":3472},{"i":3476,"t":"Signatures","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#signatures","p":3472},{"i":3478,"t":"Installation","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#installation","p":3472},{"i":3480,"t":"Examples","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#examples","p":3472},{"i":3482,"t":"Config","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#config","p":3472},{"i":3484,"t":"Default Config","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#default-config","p":3472},{"i":3488,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/mssql/","h":"#table-of-contents","p":3486},{"i":3490,"t":"Signatures","u":"/storage/ristretto_v1.x.x/mssql/","h":"#signatures","p":3486},{"i":3492,"t":"Installation","u":"/storage/ristretto_v1.x.x/mssql/","h":"#installation","p":3486},{"i":3494,"t":"Examples","u":"/storage/ristretto_v1.x.x/mssql/","h":"#examples","p":3486},{"i":3496,"t":"Config","u":"/storage/ristretto_v1.x.x/mssql/","h":"#config","p":3486},{"i":3498,"t":"Default Config","u":"/storage/ristretto_v1.x.x/mssql/","h":"#default-config","p":3486},{"i":3502,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/mysql/","h":"#table-of-contents","p":3500},{"i":3504,"t":"Signatures","u":"/storage/ristretto_v1.x.x/mysql/","h":"#signatures","p":3500},{"i":3506,"t":"Installation","u":"/storage/ristretto_v1.x.x/mysql/","h":"#installation","p":3500},{"i":3508,"t":"Examples","u":"/storage/ristretto_v1.x.x/mysql/","h":"#examples","p":3500},{"i":3510,"t":"Config","u":"/storage/ristretto_v1.x.x/mysql/","h":"#config","p":3500},{"i":3512,"t":"Default Config","u":"/storage/ristretto_v1.x.x/mysql/","h":"#default-config","p":3500},{"i":3516,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/pebble/","h":"#table-of-contents","p":3514},{"i":3518,"t":"Signatures","u":"/storage/ristretto_v1.x.x/pebble/","h":"#signatures","p":3514},{"i":3520,"t":"Installation","u":"/storage/ristretto_v1.x.x/pebble/","h":"#installation","p":3514},{"i":3522,"t":"Examples","u":"/storage/ristretto_v1.x.x/pebble/","h":"#examples","p":3514},{"i":3524,"t":"Config","u":"/storage/ristretto_v1.x.x/pebble/","h":"#config","p":3514},{"i":3526,"t":"Default Config","u":"/storage/ristretto_v1.x.x/pebble/","h":"#default-config","p":3514},{"i":3530,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/postgres/","h":"#table-of-contents","p":3528},{"i":3532,"t":"Signatures","u":"/storage/ristretto_v1.x.x/postgres/","h":"#signatures","p":3528},{"i":3534,"t":"Installation","u":"/storage/ristretto_v1.x.x/postgres/","h":"#installation","p":3528},{"i":3536,"t":"Examples","u":"/storage/ristretto_v1.x.x/postgres/","h":"#examples","p":3528},{"i":3538,"t":"Config","u":"/storage/ristretto_v1.x.x/postgres/","h":"#config","p":3528},{"i":3540,"t":"Default Config","u":"/storage/ristretto_v1.x.x/postgres/","h":"#default-config","p":3528},{"i":3544,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/redis/","h":"#table-of-contents","p":3542},{"i":3546,"t":"Signatures","u":"/storage/ristretto_v1.x.x/redis/","h":"#signatures","p":3542},{"i":3548,"t":"Installation","u":"/storage/ristretto_v1.x.x/redis/","h":"#installation","p":3542},{"i":3550,"t":"Examples","u":"/storage/ristretto_v1.x.x/redis/","h":"#examples","p":3542},{"i":3552,"t":"Config","u":"/storage/ristretto_v1.x.x/redis/","h":"#config","p":3542},{"i":3554,"t":"Default Config","u":"/storage/ristretto_v1.x.x/redis/","h":"#default-config","p":3542},{"i":3558,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#table-of-contents","p":3556},{"i":3560,"t":"Signatures","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#signatures","p":3556},{"i":3562,"t":"Installation","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#installation","p":3556},{"i":3564,"t":"Examples","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#examples","p":3556},{"i":3566,"t":"Config","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#config","p":3556},{"i":3568,"t":"Default Config","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#default-config","p":3556},{"i":3572,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/s3/","h":"#table-of-contents","p":3570},{"i":3574,"t":"Signatures","u":"/storage/ristretto_v1.x.x/s3/","h":"#signatures","p":3570},{"i":3576,"t":"Installation","u":"/storage/ristretto_v1.x.x/s3/","h":"#installation","p":3570},{"i":3578,"t":"Examples","u":"/storage/ristretto_v1.x.x/s3/","h":"#examples","p":3570},{"i":3580,"t":"Config","u":"/storage/ristretto_v1.x.x/s3/","h":"#config","p":3570},{"i":3582,"t":"Default Config","u":"/storage/ristretto_v1.x.x/s3/","h":"#default-config","p":3570},{"i":3586,"t":"Table of Contents","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#table-of-contents","p":3584},{"i":3588,"t":"Signatures","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#signatures","p":3584},{"i":3590,"t":"Installation","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#installation","p":3584},{"i":3592,"t":"Examples","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#examples","p":3584},{"i":3594,"t":"Config","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#config","p":3584},{"i":3596,"t":"Default Config","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#default-config","p":3584}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3342",[0,3.174,1,3.174]],["t/3344",[0,2.534,1,2.534,2,2.875]],["t/3348",[3,1.499,4,1.499]],["t/3350",[5,2.007]],["t/3352",[6,2.007]],["t/3354",[7,2.007]],["t/3356",[8,1.246]],["t/3358",[8,0.931,9,1.499]],["t/3362",[3,1.499,4,1.499]],["t/3364",[5,2.007]],["t/3366",[6,2.007]],["t/3368",[7,2.007]],["t/3370",[8,1.246]],["t/3372",[8,0.931,9,1.499]],["t/3376",[3,1.499,4,1.499]],["t/3378",[5,2.007]],["t/3380",[6,2.007]],["t/3382",[7,2.007]],["t/3384",[8,1.246]],["t/3386",[8,0.931,9,1.499]],["t/3390",[3,1.499,4,1.499]],["t/3392",[5,2.007]],["t/3394",[6,2.007]],["t/3396",[7,2.007]],["t/3398",[8,1.246]],["t/3400",[8,0.931,9,1.499]],["t/3404",[3,1.499,4,1.499]],["t/3406",[5,2.007]],["t/3408",[6,2.007]],["t/3410",[7,2.007]],["t/3412",[8,1.246]],["t/3414",[8,0.931,9,1.499]],["t/3418",[3,1.499,4,1.499]],["t/3420",[5,2.007]],["t/3422",[6,2.007]],["t/3424",[7,2.007]],["t/3426",[8,1.246]],["t/3428",[8,0.931,9,1.499]],["t/3432",[3,1.499,4,1.499]],["t/3434",[5,2.007]],["t/3436",[6,2.007]],["t/3438",[7,2.007]],["t/3440",[8,1.246]],["t/3442",[8,0.931,9,1.499]],["t/3446",[3,1.499,4,1.499]],["t/3448",[5,2.007]],["t/3450",[6,2.007]],["t/3452",[7,2.007]],["t/3454",[8,1.246]],["t/3456",[8,0.931,9,1.499]],["t/3460",[3,1.499,4,1.499]],["t/3462",[5,2.007]],["t/3464",[6,2.007]],["t/3466",[7,2.007]],["t/3468",[8,1.246]],["t/3470",[8,0.931,9,1.499]],["t/3474",[3,1.499,4,1.499]],["t/3476",[5,2.007]],["t/3478",[6,2.007]],["t/3480",[7,2.007]],["t/3482",[8,1.246]],["t/3484",[8,0.931,9,1.499]],["t/3488",[3,1.499,4,1.499]],["t/3490",[5,2.007]],["t/3492",[6,2.007]],["t/3494",[7,2.007]],["t/3496",[8,1.246]],["t/3498",[8,0.931,9,1.499]],["t/3502",[3,1.499,4,1.499]],["t/3504",[5,2.007]],["t/3506",[6,2.007]],["t/3508",[7,2.007]],["t/3510",[8,1.246]],["t/3512",[8,0.931,9,1.499]],["t/3516",[3,1.499,4,1.499]],["t/3518",[5,2.007]],["t/3520",[6,2.007]],["t/3522",[7,2.007]],["t/3524",[8,1.246]],["t/3526",[8,0.931,9,1.499]],["t/3530",[3,1.499,4,1.499]],["t/3532",[5,2.007]],["t/3534",[6,2.007]],["t/3536",[7,2.007]],["t/3538",[8,1.246]],["t/3540",[8,0.931,9,1.499]],["t/3544",[3,1.499,4,1.499]],["t/3546",[5,2.007]],["t/3548",[6,2.007]],["t/3550",[7,2.007]],["t/3552",[8,1.246]],["t/3554",[8,0.931,9,1.499]],["t/3558",[3,1.499,4,1.499]],["t/3560",[5,2.007]],["t/3562",[6,2.007]],["t/3564",[7,2.007]],["t/3566",[8,1.246]],["t/3568",[8,0.931,9,1.499]],["t/3572",[3,1.499,4,1.499]],["t/3574",[5,2.007]],["t/3576",[6,2.007]],["t/3578",[7,2.007]],["t/3580",[8,1.246]],["t/3582",[8,0.931,9,1.499]],["t/3586",[3,1.499,4,1.499]],["t/3588",[5,2.007]],["t/3590",[6,2.007]],["t/3592",[7,2.007]],["t/3594",[8,1.246]],["t/3596",[8,0.931,9,1.499]]],"invertedIndex":[["",{"_index":0,"t":{"3342":{"position":[[0,2]]},"3344":{"position":[[0,2]]}}}],["config",{"_index":8,"t":{"3356":{"position":[[0,6]]},"3358":{"position":[[8,6]]},"3370":{"position":[[0,6]]},"3372":{"position":[[8,6]]},"3384":{"position":[[0,6]]},"3386":{"position":[[8,6]]},"3398":{"position":[[0,6]]},"3400":{"position":[[8,6]]},"3412":{"position":[[0,6]]},"3414":{"position":[[8,6]]},"3426":{"position":[[0,6]]},"3428":{"position":[[8,6]]},"3440":{"position":[[0,6]]},"3442":{"position":[[8,6]]},"3454":{"position":[[0,6]]},"3456":{"position":[[8,6]]},"3468":{"position":[[0,6]]},"3470":{"position":[[8,6]]},"3482":{"position":[[0,6]]},"3484":{"position":[[8,6]]},"3496":{"position":[[0,6]]},"3498":{"position":[[8,6]]},"3510":{"position":[[0,6]]},"3512":{"position":[[8,6]]},"3524":{"position":[[0,6]]},"3526":{"position":[[8,6]]},"3538":{"position":[[0,6]]},"3540":{"position":[[8,6]]},"3552":{"position":[[0,6]]},"3554":{"position":[[8,6]]},"3566":{"position":[[0,6]]},"3568":{"position":[[8,6]]},"3580":{"position":[[0,6]]},"3582":{"position":[[8,6]]},"3594":{"position":[[0,6]]},"3596":{"position":[[8,6]]}}}],["content",{"_index":4,"t":{"3348":{"position":[[9,8]]},"3362":{"position":[[9,8]]},"3376":{"position":[[9,8]]},"3390":{"position":[[9,8]]},"3404":{"position":[[9,8]]},"3418":{"position":[[9,8]]},"3432":{"position":[[9,8]]},"3446":{"position":[[9,8]]},"3460":{"position":[[9,8]]},"3474":{"position":[[9,8]]},"3488":{"position":[[9,8]]},"3502":{"position":[[9,8]]},"3516":{"position":[[9,8]]},"3530":{"position":[[9,8]]},"3544":{"position":[[9,8]]},"3558":{"position":[[9,8]]},"3572":{"position":[[9,8]]},"3586":{"position":[[9,8]]}}}],["default",{"_index":9,"t":{"3358":{"position":[[0,7]]},"3372":{"position":[[0,7]]},"3386":{"position":[[0,7]]},"3400":{"position":[[0,7]]},"3414":{"position":[[0,7]]},"3428":{"position":[[0,7]]},"3442":{"position":[[0,7]]},"3456":{"position":[[0,7]]},"3470":{"position":[[0,7]]},"3484":{"position":[[0,7]]},"3498":{"position":[[0,7]]},"3512":{"position":[[0,7]]},"3526":{"position":[[0,7]]},"3540":{"position":[[0,7]]},"3554":{"position":[[0,7]]},"3568":{"position":[[0,7]]},"3582":{"position":[[0,7]]},"3596":{"position":[[0,7]]}}}],["exampl",{"_index":7,"t":{"3354":{"position":[[0,8]]},"3368":{"position":[[0,8]]},"3382":{"position":[[0,8]]},"3396":{"position":[[0,8]]},"3410":{"position":[[0,8]]},"3424":{"position":[[0,8]]},"3438":{"position":[[0,8]]},"3452":{"position":[[0,8]]},"3466":{"position":[[0,8]]},"3480":{"position":[[0,8]]},"3494":{"position":[[0,8]]},"3508":{"position":[[0,8]]},"3522":{"position":[[0,8]]},"3536":{"position":[[0,8]]},"3550":{"position":[[0,8]]},"3564":{"position":[[0,8]]},"3578":{"position":[[0,8]]},"3592":{"position":[[0,8]]}}}],["implement",{"_index":2,"t":{"3344":{"position":[[11,15]]}}}],["instal",{"_index":6,"t":{"3352":{"position":[[0,12]]},"3366":{"position":[[0,12]]},"3380":{"position":[[0,12]]},"3394":{"position":[[0,12]]},"3408":{"position":[[0,12]]},"3422":{"position":[[0,12]]},"3436":{"position":[[0,12]]},"3450":{"position":[[0,12]]},"3464":{"position":[[0,12]]},"3478":{"position":[[0,12]]},"3492":{"position":[[0,12]]},"3506":{"position":[[0,12]]},"3520":{"position":[[0,12]]},"3534":{"position":[[0,12]]},"3548":{"position":[[0,12]]},"3562":{"position":[[0,12]]},"3576":{"position":[[0,12]]},"3590":{"position":[[0,12]]}}}],["signatur",{"_index":5,"t":{"3350":{"position":[[0,10]]},"3364":{"position":[[0,10]]},"3378":{"position":[[0,10]]},"3392":{"position":[[0,10]]},"3406":{"position":[[0,10]]},"3420":{"position":[[0,10]]},"3434":{"position":[[0,10]]},"3448":{"position":[[0,10]]},"3462":{"position":[[0,10]]},"3476":{"position":[[0,10]]},"3490":{"position":[[0,10]]},"3504":{"position":[[0,10]]},"3518":{"position":[[0,10]]},"3532":{"position":[[0,10]]},"3546":{"position":[[0,10]]},"3560":{"position":[[0,10]]},"3574":{"position":[[0,10]]},"3588":{"position":[[0,10]]}}}],["storag",{"_index":1,"t":{"3342":{"position":[[3,7]]},"3344":{"position":[[3,7]]}}}],["tabl",{"_index":3,"t":{"3348":{"position":[[0,5]]},"3362":{"position":[[0,5]]},"3376":{"position":[[0,5]]},"3390":{"position":[[0,5]]},"3404":{"position":[[0,5]]},"3418":{"position":[[0,5]]},"3432":{"position":[[0,5]]},"3446":{"position":[[0,5]]},"3460":{"position":[[0,5]]},"3474":{"position":[[0,5]]},"3488":{"position":[[0,5]]},"3502":{"position":[[0,5]]},"3516":{"position":[[0,5]]},"3530":{"position":[[0,5]]},"3544":{"position":[[0,5]]},"3558":{"position":[[0,5]]},"3572":{"position":[[0,5]]},"3586":{"position":[[0,5]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3343,"t":"Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares. // Storage interface for communicating with different database/key-value // providers. Visit https://github.com/gofiber/storage for more info. type Storage interface { // Get gets the value for the given key. // `nil, nil` is returned when the key does not exist Get(key string) ([]byte, error) // Set stores the given value for the given key along // with an expiration value, 0 means no expiration. // Empty key or value will be ignored without an error. Set(key string, val []byte, exp time.Duration) error // Delete deletes the value for the given key. // It returns no error if the storage does not contain the key, Delete(key string) error // Reset resets the storage and delete all keys. Reset() error // Close closes the storage and will stop any running garbage // collectors and open connections. Close() error }","s":"📦 Storage","u":"/storage/ristretto_v1.x.x/","h":"","p":3341},{"i":3345,"t":"ArangoDB AzureBlob Badger Bbolt Couchbase DynamoDB Etcd Memcache Memory MongoDB MSSQL MySQL Pebble Postgres Redis S3 SQLite3","s":"📑 Storage Implementations","u":"/storage/ristretto_v1.x.x/","h":"#-storage-implementations","p":3341},{"i":3347,"t":"A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.","s":"ArangoDB","u":"/storage/ristretto_v1.x.x/arangodb/","h":"","p":3346},{"i":3349,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#table-of-contents","p":3346},{"i":3351,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() driver.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#signatures","p":3346},{"i":3353,"t":"ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#installation","p":3346},{"i":3355,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#examples","p":3346},{"i":3357,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#config","p":3346},{"i":3359,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#default-config","p":3346},{"i":3361,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/ristretto_v1.x.x/azureblob/","h":"","p":3360},{"i":3363,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#table-of-contents","p":3360},{"i":3365,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#signatures","p":3360},{"i":3367,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#installation","p":3360},{"i":3369,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#examples","p":3360},{"i":3371,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#config","p":3360},{"i":3373,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#default-config","p":3360},{"i":3375,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/ristretto_v1.x.x/badger/","h":"","p":3374},{"i":3377,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/badger/","h":"#table-of-contents","p":3374},{"i":3379,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/badger/","h":"#signatures","p":3374},{"i":3381,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/ristretto_v1.x.x/badger/","h":"#installation","p":3374},{"i":3383,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/badger/","h":"#examples","p":3374},{"i":3385,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/ristretto_v1.x.x/badger/","h":"#config","p":3374},{"i":3387,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/badger/","h":"#default-config","p":3374},{"i":3389,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/ristretto_v1.x.x/bbolt/","h":"","p":3388},{"i":3391,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#table-of-contents","p":3388},{"i":3393,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#signatures","p":3388},{"i":3395,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#installation","p":3388},{"i":3397,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#examples","p":3388},{"i":3399,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#config","p":3388},{"i":3401,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#default-config","p":3388},{"i":3403,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/ristretto_v1.x.x/couchbase/","h":"","p":3402},{"i":3405,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#table-of-contents","p":3402},{"i":3407,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#signatures","p":3402},{"i":3409,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#installation","p":3402},{"i":3411,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#examples","p":3402},{"i":3413,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#config","p":3402},{"i":3415,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#default-config","p":3402},{"i":3417,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"","p":3416},{"i":3419,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#table-of-contents","p":3416},{"i":3421,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#signatures","p":3416},{"i":3423,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#installation","p":3416},{"i":3425,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#examples","p":3416},{"i":3427,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#config","p":3416},{"i":3429,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#default-config","p":3416},{"i":3431,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/ristretto_v1.x.x/etcd/","h":"","p":3430},{"i":3433,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/etcd/","h":"#table-of-contents","p":3430},{"i":3435,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/etcd/","h":"#signatures","p":3430},{"i":3437,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/ristretto_v1.x.x/etcd/","h":"#installation","p":3430},{"i":3439,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/ristretto_v1.x.x/etcd/","h":"#examples","p":3430},{"i":3441,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/ristretto_v1.x.x/etcd/","h":"#config","p":3430},{"i":3443,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/etcd/","h":"#default-config","p":3430},{"i":3445,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/ristretto_v1.x.x/memcache/","h":"","p":3444},{"i":3447,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/memcache/","h":"#table-of-contents","p":3444},{"i":3449,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/memcache/","h":"#signatures","p":3444},{"i":3451,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/ristretto_v1.x.x/memcache/","h":"#installation","p":3444},{"i":3453,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/ristretto_v1.x.x/memcache/","h":"#examples","p":3444},{"i":3455,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/ristretto_v1.x.x/memcache/","h":"#config","p":3444},{"i":3457,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/ristretto_v1.x.x/memcache/","h":"#default-config","p":3444},{"i":3459,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/ristretto_v1.x.x/memory/","h":"","p":3458},{"i":3461,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/memory/","h":"#table-of-contents","p":3458},{"i":3463,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/ristretto_v1.x.x/memory/","h":"#signatures","p":3458},{"i":3465,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/ristretto_v1.x.x/memory/","h":"#installation","p":3458},{"i":3467,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/memory/","h":"#examples","p":3458},{"i":3469,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/memory/","h":"#config","p":3458},{"i":3471,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/memory/","h":"#default-config","p":3458},{"i":3473,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/ristretto_v1.x.x/mongodb/","h":"","p":3472},{"i":3475,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#table-of-contents","p":3472},{"i":3477,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#signatures","p":3472},{"i":3479,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#installation","p":3472},{"i":3481,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#examples","p":3472},{"i":3483,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#config","p":3472},{"i":3485,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#default-config","p":3472},{"i":3487,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/ristretto_v1.x.x/mssql/","h":"","p":3486},{"i":3489,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/mssql/","h":"#table-of-contents","p":3486},{"i":3491,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/mssql/","h":"#signatures","p":3486},{"i":3493,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/ristretto_v1.x.x/mssql/","h":"#installation","p":3486},{"i":3495,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/mssql/","h":"#examples","p":3486},{"i":3497,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/ristretto_v1.x.x/mssql/","h":"#config","p":3486},{"i":3499,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/ristretto_v1.x.x/mssql/","h":"#default-config","p":3486},{"i":3501,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/ristretto_v1.x.x/mysql/","h":"","p":3500},{"i":3503,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/mysql/","h":"#table-of-contents","p":3500},{"i":3505,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/mysql/","h":"#signatures","p":3500},{"i":3507,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/ristretto_v1.x.x/mysql/","h":"#installation","p":3500},{"i":3509,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/mysql/","h":"#examples","p":3500},{"i":3511,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/mysql/","h":"#config","p":3500},{"i":3513,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/mysql/","h":"#default-config","p":3500},{"i":3515,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/ristretto_v1.x.x/pebble/","h":"","p":3514},{"i":3517,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/pebble/","h":"#table-of-contents","p":3514},{"i":3519,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/pebble/","h":"#signatures","p":3514},{"i":3521,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/ristretto_v1.x.x/pebble/","h":"#installation","p":3514},{"i":3523,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/ristretto_v1.x.x/pebble/","h":"#examples","p":3514},{"i":3525,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/ristretto_v1.x.x/pebble/","h":"#config","p":3514},{"i":3527,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/pebble/","h":"#default-config","p":3514},{"i":3529,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/ristretto_v1.x.x/postgres/","h":"","p":3528},{"i":3531,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/postgres/","h":"#table-of-contents","p":3528},{"i":3533,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/ristretto_v1.x.x/postgres/","h":"#signatures","p":3528},{"i":3535,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/ristretto_v1.x.x/postgres/","h":"#installation","p":3528},{"i":3537,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/postgres/","h":"#examples","p":3528},{"i":3539,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/postgres/","h":"#config","p":3528},{"i":3541,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/postgres/","h":"#default-config","p":3528},{"i":3543,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/ristretto_v1.x.x/redis/","h":"","p":3542},{"i":3545,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/redis/","h":"#table-of-contents","p":3542},{"i":3547,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/ristretto_v1.x.x/redis/","h":"#signatures","p":3542},{"i":3549,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/ristretto_v1.x.x/redis/","h":"#installation","p":3542},{"i":3551,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/ristretto_v1.x.x/redis/","h":"#examples","p":3542},{"i":3553,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/ristretto_v1.x.x/redis/","h":"#config","p":3542},{"i":3555,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/ristretto_v1.x.x/redis/","h":"#default-config","p":3542},{"i":3557,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/ristretto_v1.x.x/ristretto/","h":"","p":3556},{"i":3559,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#table-of-contents","p":3556},{"i":3561,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#signatures","p":3556},{"i":3563,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#installation","p":3556},{"i":3565,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#examples","p":3556},{"i":3567,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#config","p":3556},{"i":3569,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#default-config","p":3556},{"i":3571,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/ristretto_v1.x.x/s3/","h":"","p":3570},{"i":3573,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/s3/","h":"#table-of-contents","p":3570},{"i":3575,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/s3/","h":"#signatures","p":3570},{"i":3577,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/ristretto_v1.x.x/s3/","h":"#installation","p":3570},{"i":3579,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/ristretto_v1.x.x/s3/","h":"#examples","p":3570},{"i":3581,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/ristretto_v1.x.x/s3/","h":"#config","p":3570},{"i":3583,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/s3/","h":"#default-config","p":3570},{"i":3585,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"","p":3584},{"i":3587,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#table-of-contents","p":3584},{"i":3589,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#signatures","p":3584},{"i":3591,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#installation","p":3584},{"i":3593,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#examples","p":3584},{"i":3595,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#config","p":3584},{"i":3597,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#default-config","p":3584}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3343",[0,2.408,1,1.183,2,1.08,3,1.021,4,4.843,5,2.408,6,0.588,7,2.408,8,1.112,9,2.408,10,1.49,11,2.408,12,2.408,13,2.408,14,3.958,15,2.131,16,2.408,17,2.408,18,2.408,19,2.408,20,1.021,21,2.408,22,4.489,23,2.813,24,2.177,25,3.13,26,1.145,27,1.021,28,1.287,29,1.64,30,2.813,31,1.705,32,0.994,33,2.408,34,2.36,35,1.41,36,2.408,37,2.408,38,2.408,39,2.408,40,1.021,41,1.021,42,1.021,43,0.762,44,2.957,45,1.705,46,1.021,47,0.937,48,2.054,49,2.408,50,2.131,51,2.408,52,2.408,53,1.95,54,1.262]],["t/3345",[55,4.571,56,5.645,57,4.571,58,4.252,59,3.998,60,3.998,61,4.252,62,4.997,63,3.998,64,4.571,65,4.571,66,3.998,67,4.997,68,4.252,69,3.998,70,3.998,71,4.571]],["t/3347",[1,1.131,2,3.761,6,1.589,55,5.272,72,7.823]],["t/3349",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3351",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,82,4.122]],["t/3353",[3,2.17,55,4.143,66,3.623,74,1.45,83,2.112,84,2.112,85,2.23,86,5.116,87,2.733,88,2.23,89,2.17,90,2.23,91,2.17,92,2.17,93,1.45,94,2.17,95,2.23,96,2.23,97,2.23,98,2.23,99,2.23,100,4.529]],["t/3355",[1,1.032,6,1.04,8,1.967,10,1.493,32,2.452,47,0.824,76,0.458,77,0.824,93,1.683,100,3.771,101,2.589,102,1.857,103,1.857,104,1.91,105,1.807,106,4.26,107,1.857,108,4.26,109,1.759,110,3.45,111,1.91,112,3.45,113,1.444,114,2.721,115,1.628,116,1.234,117,1.714,118,1.589,119,1.514]],["t/3357",[8,1.194,10,1.657,20,1.097,23,1.69,26,1.947,28,1.672,34,1.58,43,0.819,44,1.58,47,0.792,76,0.199,77,1.406,109,2.097,110,2.095,111,1.836,112,2.095,113,1.388,114,3.244,115,0.989,116,0.749,117,1.041,118,0.965,119,0.919,120,1.128,121,2.416,122,2.074,123,3.355,124,1.735,125,1.457,126,2.305,127,2.074,128,2.074,129,1.311,130,1.311,131,1.404,132,1.58]],["t/3359",[6,1.283,8,2.427,10,1.41,47,1.017,76,0.405,109,2.171,110,4.256,111,2.357,112,4.256,113,1.782,114,3.357,115,2.009,116,1.523,117,2.114,118,1.96,119,1.868,123,2.427,133,3.96,134,2.292,135,2.292]],["t/3361",[1,1.268,87,2.117,136,5.15,137,5.15,138,5.817,139,5.15,140,5.817,141,5.817,142,4.382,143,5.817,144,5.817,145,4.12,146,5.817,147,5.817]],["t/3363",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3365",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,148,4.122]],["t/3367",[1,0.854,2,2.206,3,2.086,74,1.394,83,2.031,84,2.031,85,2.144,87,2.68,88,2.144,89,2.086,90,2.144,91,2.086,92,2.086,93,1.394,94,2.086,95,2.144,96,2.144,97,2.144,98,2.144,99,2.144,136,5.798,137,5.798,149,4.354]],["t/3369",[1,1.056,6,1.076,10,1.509,23,1.82,32,2.511,45,3.122,76,0.469,77,0.853,83,2.874,93,1.723,101,2.651,102,1.922,103,1.922,104,1.977,105,1.869,107,1.922,149,3.902,150,4.407,151,4.407,152,4.924,153,3.561,154,4.407]],["t/3371",[1,0.782,10,1.555,20,1.24,23,2.268,26,2.142,28,1.459,35,1.712,43,0.925,45,3.891,47,0.871,76,0.225,77,1.289,116,0.847,120,1.275,121,2.142,123,3.077,125,1.646,129,1.481,130,1.481,131,1.587,152,3.647,153,3.614,155,2.637,156,2.923,157,3.647,158,2.876,159,2.202,160,1.867,161,3.647,162,3.647,163,2.367,164,2.367,165,1.867,166,1.867,167,2.367,168,2.367,169,2.367,170,2.367,171,1.785,172,1.961]],["t/3373",[10,1.583,35,3.306,45,3.998,47,1.092,76,0.435,116,1.635,134,2.461,135,2.461,152,4.571,155,3.306,159,4.252,171,3.447,172,3.786]],["t/3375",[6,1.616,14,4.044,23,2.735,122,3.356,173,5.363,174,5.864,175,6.623]],["t/3377",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3379",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3381",[3,2.199,57,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,177,4.59]],["t/3383",[1,1.082,6,1.114,10,1.525,32,2.572,47,0.883,76,0.48,77,0.883,93,1.765,101,2.716,102,1.99,103,1.99,104,2.047,105,1.936,107,1.99,113,1.548,116,1.322,117,1.836,118,1.703,119,1.622,177,4.042,178,4.565,179,4.565,180,3.697]],["t/3385",[6,1.086,10,1.63,20,1.221,23,1.838,24,1.621,26,2.117,28,0.765,31,2.039,34,1.758,43,0.911,44,1.758,47,0.861,57,3.604,76,0.222,77,1.411,113,1.509,116,1.289,117,1.158,118,1.074,119,1.023,120,1.255,121,1.37,123,3.368,129,1.459,130,2.255,131,1.563,132,1.758,180,2.332,181,1.291,182,3.94,183,2.879,184,2.879,185,2.879,186,5.419,187,2.879,188,3.94,189,2.039]],["t/3387",[10,1.439,24,3.088,47,1.061,76,0.423,113,1.858,116,2.037,117,2.205,118,2.045,119,1.948,134,2.39,135,2.39,180,4.44,182,4.854,186,4.854,188,4.854,190,5.483]],["t/3389",[1,0.803,2,2.072,6,1.128,15,4.091,32,1.908,58,3.481,61,3.481,66,3.273,68,3.481,87,1.682,113,2.129,126,2.602,145,3.273,173,3.742,191,4.621,192,4.621,193,4.621,194,4.621,195,4.621,196,4.621,197,4.621,198,4.621,199,7.134,200,4.621,201,4.621,202,4.621,203,3.742,204,4.621,205,4.621]],["t/3391",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3393",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,206,4.122]],["t/3395",[3,2.199,58,3.906,70,3.673,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,207,4.59]],["t/3397",[1,1.1,6,1.141,10,1.49,32,2.615,47,0.905,76,0.488,77,0.905,93,1.795,101,2.761,102,2.039,103,2.039,104,2.098,105,1.984,107,2.039,113,1.585,116,1.355,207,4.141,208,4.677,209,4.677,210,4.677,211,3.566]],["t/3399",[1,0.516,10,1.629,20,1.259,23,1.226,26,2.168,28,1.211,43,0.94,47,0.881,53,2.404,58,2.237,76,0.428,77,1.298,113,1.88,115,1.135,116,1.32,119,1.055,120,1.294,121,1.412,123,3.098,129,1.504,130,2.309,131,1.611,158,2.911,189,2.103,211,3.123,212,2.237,213,2.628,214,2.628,215,2.969,216,2.969,217,2.628,218,2.969,219,2.628,220,2.969,221,2.969,222,2.628,223,2.628,224,2.404,225,2.628]],["t/3401",[10,1.501,47,1.031,76,0.532,77,1.031,113,1.807,115,2.037,116,2,119,1.894,134,2.324,135,3.01,158,3.404,211,3.001,213,4.718,222,4.718,225,4.718]],["t/3403",[1,1.192,2,3.077,6,1.674,59,4.86,226,6.861]],["t/3405",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3407",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,227,4.122]],["t/3409",[3,2.199,59,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,228,4.59]],["t/3411",[1,1.174,6,1.017,10,1.522,32,2.415,35,2.44,59,2.952,76,0.451,77,0.806,93,1.657,101,2.549,102,1.817,103,1.817,104,1.869,105,1.768,107,1.817,109,1.721,119,2.078,127,2.112,128,2.112,171,2.544,211,2.347,228,3.689,229,4.167,230,4.167,231,3.689,232,3.374,233,3.374,234,2.661]],["t/3413",[10,1.52,20,1.626,28,1.985,43,1.744,54,3.916,59,5.293,76,0.296,109,1.583,120,1.671,121,1.823,127,2.792,128,2.792,158,3.519,211,3.103,232,3.104,233,3.104,235,5.51,236,6.616,237,3.833,238,3.393]],["t/3415",[10,1.529,76,0.514,77,0.976,109,2.085,115,1.93,119,2.368,127,2.558,128,2.558,134,2.201,135,2.905,171,3.082,211,2.843,231,4.469,232,4.088,233,4.088,234,3.224,239,5.048,240,5.048]],["t/3417",[1,0.803,2,2.072,6,1.741,10,0.856,22,5.085,60,3.273,76,0.55,87,1.682,133,4.731,142,3.481,153,4.688,241,4.091,242,4.091,243,4.091,244,3.742,245,3.742,246,4.091,247,4.091,248,3.742,249,4.091,250,4.091,251,4.091]],["t/3419",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3421",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,252,4.122]],["t/3423",[3,2.199,60,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,253,4.59]],["t/3425",[1,1.244,6,1.378,10,1.458,32,2.331,60,3.998,93,1.6,101,3.123,102,2.461,103,2.461,104,2.531,105,2.394,253,4.997,254,5.645]],["t/3427",[6,0.491,10,1.55,14,2.039,20,0.854,23,1.13,25,1.63,26,2.036,28,1.022,30,0.831,31,1.425,45,1.425,47,0.389,50,0.993,60,3.528,75,0.831,76,0.155,77,1.069,83,0.463,84,0.463,91,0.476,92,0.476,105,1.974,107,0.489,115,0.429,116,0.583,120,0.877,121,0.533,123,2.433,125,0.631,129,0.568,130,1.02,131,0.609,132,0.685,145,1.425,153,2.252,155,1.179,157,0.908,158,0.716,160,0.716,161,1.63,162,1.63,163,0.908,164,0.908,165,0.716,166,0.716,167,0.908,168,0.908,169,0.908,170,0.908,171,0.685,172,0.752,181,2.83,203,0.908,211,0.631,217,0.993,223,1.782,244,1.63,245,1.63,255,1.516,256,2.012,257,1.121,258,1.121,259,1.121,260,1.121,261,1.121,262,1.121,263,1.121,264,1.121,265,1.121,266,1.121,267,1.121,268,2.738,269,2.012,270,1.121,271,1.121,272,3.846,273,1.121,274,2.424,275,3.339,276,3.846,277,1.782,278,2.012,279,2.012,280,2.012,281,2.012,282,2.012,283,2.012,284,2.012,285,2.012,286,2.012,287,3.339,288,3.339,289,2.012,290,2.012,291,2.012,292,2.012,293,2.012,294,2.012,295,2.012,296,1.782,297,0.993,298,2.424,299,1.782,300,1.121,301,1.121,302,2.012,303,1.782,304,1.121,305,0.845,306,1.121,307,1.121,308,1.121,309,1.121,310,0.993,311,1.121,312,1.121,313,1.121,314,0.993,315,0.993]],["t/3429",[10,1.303,47,1.061,76,0.423,115,2.096,116,1.588,134,2.39,135,2.39,153,4.118,171,3.348,172,3.678,181,2.459,274,4.854,277,6.225,297,4.854,298,4.854,316,5.483]],["t/3431",[1,1.171,2,3.023,6,1.645,61,6.017,317,6.74]],["t/3433",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3435",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,318,4.122]],["t/3437",[3,2.199,61,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,319,4.59]],["t/3439",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,155,2.88,319,4.354,320,4.918,321,4.918,322,4.354]],["t/3441",[10,1.532,20,1.807,28,1.816,43,1.348,54,2.232,76,0.328,120,1.857,127,3.464,128,3.464,153,2.495,155,3.478,158,2.721,305,3.209,323,3.45,324,3.017,325,5.257,326,4.26,327,4.26,328,4.206,329,4.474,330,4.26,331,4.26,332,3.45]],["t/3443",[10,1.583,24,3.179,76,0.435,84,2.331,119,2.006,127,2.86,128,2.86,134,2.461,135,2.461,155,3.306,322,4.997,325,4.997,329,4.252]],["t/3445",[1,1.192,2,3.077,6,1.674,62,6.074,333,6.861]],["t/3447",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3449",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,334,4.122]],["t/3451",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3453",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,126,2.77,336,4.918,337,4.918,338,4.918,339,4.918]],["t/3455",[10,1.622,20,1.891,23,1.841,26,2.916,28,1.185,47,1.186,76,0.344,77,1.186,116,1.292,120,1.944,123,2.83,126,3.451,129,2.259,130,2.259,181,2,323,3.611,340,4.459,341,4.459,342,4.459,343,4.459,344,3.947]],["t/3457",[10,1.465,76,0.511,126,3.73,134,2.888,135,2.888,344,5.864]],["t/3459",[1,1.236,2,3.192,63,5.041]],["t/3461",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3463",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,345,4.122]],["t/3465",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3467",[1,1.119,6,1.17,10,1.547,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,117,1.929,118,1.788,119,1.704,335,3.883,346,4.795,347,4.795]],["t/3469",[10,1.606,20,2.326,23,2.264,34,3.348,43,1.735,44,3.348,76,0.423,77,1.061,117,2.205,118,2.045,119,1.948,120,2.39,131,2.976,132,3.348]],["t/3471",[10,1.543,76,0.494,117,2.575,118,2.387,119,2.274,134,2.791,135,2.791]],["t/3473",[1,1.151,2,3.545,6,1.616,64,5.363,87,2.411,348,6.623]],["t/3475",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3477",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,349,4.122]],["t/3479",[3,2.199,64,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,350,4.59]],["t/3481",[1,0.924,6,1.298,8,2.455,10,1.5,28,0.97,32,2.591,47,1.029,54,1.912,76,0.484,77,0.706,93,1.778,101,2.319,102,1.591,103,1.591,104,1.637,105,1.548,107,2.319,109,1.507,111,1.637,113,1.803,114,3.397,115,2.033,116,1.541,350,3.231,351,3.65,352,5.318,353,1.791,354,2.955,355,1.981,356,3.65]],["t/3483",[6,0.994,8,1.186,10,1.656,14,1.569,20,1.09,23,1.061,26,1.937,28,1.857,47,0.788,54,1.346,76,0.198,77,1.402,109,2.088,111,1.826,113,1.38,114,2.6,115,0.982,116,0.744,120,1.12,121,2.406,122,2.562,123,3.347,124,1.724,125,1.447,126,2.293,127,2.063,128,2.063,129,1.302,130,1.302,160,1.641,181,1.152,328,1.82,353,1.261,354,2.081,355,1.395]],["t/3485",[8,2.606,10,1.458,47,1.092,76,0.435,109,2.331,111,2.531,113,1.913,114,3.605,115,2.158,116,1.635,134,2.461,135,2.461,353,2.77,354,4.571,355,3.063]],["t/3487",[1,1.171,2,3.023,6,1.645,65,5.458,357,6.74,358,6.74]],["t/3489",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3491",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3493",[3,2.199,65,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,360,4.59]],["t/3495",[1,0.887,6,1.246,8,1.594,10,1.534,28,0.917,32,2.509,47,0.988,54,1.809,76,0.468,77,0.668,93,1.722,101,2.226,102,1.505,103,1.505,104,1.548,105,1.464,107,2.226,109,1.425,111,1.548,113,1.17,115,1.32,116,1.479,117,2.054,118,1.904,119,1.814,181,1.548,353,1.694,355,1.873,360,3.056,361,3.452,362,5.105,363,2.795,364,2.445,365,2.445,366,3.452]],["t/3497",[1,0.35,6,0.815,8,0.93,10,1.66,14,1.23,20,0.854,23,1.38,26,1.59,28,1.821,34,1.23,43,0.637,44,1.23,47,0.646,54,1.751,76,0.33,77,1.403,109,1.768,111,1.498,113,1.133,115,0.77,116,0.583,117,0.81,118,0.751,119,0.716,120,0.878,121,2.371,122,2.17,123,3.348,124,1.351,125,1.134,126,1.882,127,1.693,128,1.693,129,1.021,130,1.021,131,1.093,132,1.23,160,1.286,181,1.92,189,1.427,224,1.631,248,2.706,328,1.427,353,0.988,355,1.093,363,1.631,364,1.427,365,1.427,367,1.783]],["t/3499",[8,2.394,10,1.486,47,1.003,76,0.4,109,2.141,111,2.325,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,1.842,134,2.261,135,2.261,181,2.325,353,2.544,355,2.814,363,4.199,364,3.673,365,3.673]],["t/3501",[1,1.131,2,2.92,6,1.589,66,4.611,87,2.369,368,6.51,369,5.764,370,6.51]],["t/3503",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3505",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3507",[3,2.199,66,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,371,4.59]],["t/3509",[1,0.769,6,1.322,8,1.319,10,1.563,28,0.759,32,2.518,47,1.047,54,2.319,76,0.47,77,0.553,93,1.728,101,1.929,102,1.246,103,1.246,104,1.282,105,1.212,107,2.361,109,1.18,111,1.282,113,0.969,115,1.092,116,1.569,117,2.178,118,2.019,119,1.924,122,3.09,181,1.282,353,1.402,355,1.551,369,2.53,371,2.53,372,2.858,373,5.415,374,2.314,375,4.425,376,2.858,377,2.858]],["t/3511",[6,1.094,8,0.993,10,1.653,14,2.153,20,0.912,23,1.456,24,1.211,26,1.678,28,1.726,34,1.313,43,0.681,44,1.313,47,0.682,54,1.127,76,0.166,77,1.398,109,1.851,111,1.581,113,1.195,115,0.822,116,0.623,117,0.865,118,0.802,119,0.764,120,0.937,121,2.133,122,2.901,123,3.337,124,1.442,125,1.211,126,1.986,127,1.787,128,1.787,129,1.09,130,1.09,131,1.167,132,1.313,160,2.252,181,2.01,328,2.498,353,1.055,355,1.914,359,1.62,374,1.741]],["t/3513",[8,2.461,10,1.501,47,1.031,76,0.411,109,2.201,111,2.39,113,1.807,115,2.037,116,1.544,117,2.144,118,1.988,119,1.894,134,2.324,135,2.324,181,2.39,353,2.615,355,2.893,374,4.316]],["t/3515",[6,1.645,14,4.115,23,2.783,122,3.415,173,5.458,378,6.74]],["t/3517",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3519",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3521",[3,2.034,26,2.281,67,5.7,74,1.359,83,1.98,84,1.98,85,2.09,87,2.646,88,2.09,89,2.034,90,2.807,91,2.034,92,2.034,93,1.359,94,2.034,95,2.09,96,2.09,97,2.09,98,2.09,99,2.09,142,3.612,145,3.396,203,3.883,379,4.795,380,4.245]],["t/3523",[1,1.119,6,1.17,10,1.503,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,122,2.43,212,3.612,380,4.245,381,4.795,382,4.795,383,3.883,384,3.883]],["t/3525",[10,1.607,20,2.034,24,2.7,28,1.274,76,0.37,77,1.245,113,1.625,120,2.09,121,2.281,122,2.43,123,3.356,212,3.612,238,4.245,310,5.7,383,3.883,384,3.883,385,4.795,386,4.795]],["t/3527",[10,1.435,76,0.494,122,3.244,134,2.791,135,2.791,212,4.823,383,5.184,384,5.184]],["t/3529",[1,1.192,2,3.077,6,1.674,68,5.169,387,6.861]],["t/3531",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3533",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,388,3.649]],["t/3535",[3,2.199,68,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,389,4.59]],["t/3537",[1,1.065,6,1.088,10,1.514,32,2.531,47,0.862,76,0.473,77,0.862,93,1.737,101,2.672,102,1.944,103,1.944,104,2,105,1.891,107,1.944,115,1.705,116,1.292,117,1.794,118,1.663,119,1.584,122,2.259,181,2,389,3.947,390,4.459,391,4.459,392,4.459]],["t/3539",[1,0.339,6,0.795,8,0.901,10,1.65,14,1.192,20,0.828,23,1.345,24,1.099,26,1.549,28,1.733,34,1.192,43,0.618,44,1.192,47,0.63,54,2.561,76,0.323,77,1.388,109,1.729,111,1.46,113,1.104,115,0.746,116,0.566,117,0.785,118,0.728,119,0.694,120,0.851,121,1.992,122,2.753,123,3.313,124,1.31,125,1.099,126,1.834,127,1.65,128,1.65,129,0.989,130,0.989,131,1.06,132,1.192,133,1.471,139,1.728,160,2.08,181,1.878,189,1.383,224,1.581,328,1.383,353,0.958,355,1.06,364,1.383,365,1.383,367,1.728,388,2.883,393,1.952,394,1.728]],["t/3541",[8,2.271,10,1.515,47,0.951,76,0.505,77,0.951,109,2.031,111,2.206,113,1.667,115,1.88,116,1.425,117,1.978,118,1.834,119,1.747,134,2.144,135,2.855,181,2.206,353,2.413,355,2.669,364,3.483,365,3.483,394,4.354]],["t/3543",[1,1.171,2,3.023,6,1.645,69,4.774,87,2.453,395,6.74]],["t/3545",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3547",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,396,4.122]],["t/3549",[3,2.199,69,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,397,4.59]],["t/3551",[1,0.627,6,0.54,10,1.605,24,2.033,25,1.792,32,2.575,35,1.296,47,0.884,69,3.737,76,0.278,77,0.428,89,0.938,93,1.495,94,0.938,101,1.574,102,0.965,103,0.965,105,1.94,107,0.965,109,0.914,111,0.992,113,0.75,116,1.325,118,0.825,121,1.052,123,1.021,127,1.121,128,1.121,236,1.959,299,1.959,305,3.975,324,3.239,329,1.667,332,1.792,353,1.086,397,1.959,398,2.212,399,5.813,400,1.792,401,2.923,402,1.792,403,1.959,404,2.212,405,1.792,406,2.212,407,2.923,408,3.61,409,2.212,410,2.212,411,3.61,412,2.212,413,2.212,414,2.212,415,3.61,416,2.212,417,2.212,418,2.212,419,2.212,420,2.212,421,3.61,422,2.212]],["t/3553",[6,0.381,10,1.649,20,0.662,23,0.645,24,0.879,26,1.281,28,1.704,31,1.908,35,0.914,47,0.521,54,1.861,69,1.106,75,0.645,76,0.274,77,1.377,81,0.662,109,1.745,111,1.593,113,1.204,114,0.997,116,0.452,118,0.582,120,0.681,121,1.281,122,1.365,123,3.347,124,1.047,125,2,126,2,127,1.8,128,1.8,129,0.791,130,0.791,165,0.997,166,0.997,219,1.382,305,1.176,323,1.264,324,2.516,329,2.029,332,1.264,353,0.766,400,1.264,401,1.264,402,1.264,405,2.181,407,1.264,423,1.561,424,1.561,425,1.561,426,1.561,427,1.561,428,1.561,429,2.694,430,1.561,431,1.561,432,1.561,433,1.561,434,1.561,435,1.561,436,1.561,437,3.145,438,1.561,439,1.561,440,1.561,441,1.561,442,2.385,443,2.385,444,1.561,445,1.561,446,1.264,447,1.561,448,1.561,449,1.561]],["t/3555",[10,1.622,24,2.511,28,1.185,35,2.611,47,0.862,76,0.344,109,1.841,111,2,113,1.511,116,1.292,118,1.663,127,2.259,128,2.259,134,1.944,135,1.944,324,3.158,353,2.188,400,3.611,401,3.611,402,3.611,403,3.947,405,3.611,407,3.611,437,3.947,442,3.947,443,3.947]],["t/3557",[1,1.151,2,2.97,6,1.616,63,4.691,174,5.864,450,6.623,451,6.623]],["t/3559",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3561",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,452,4.122]],["t/3563",[3,2.199,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,453,6.782,454,4.59]],["t/3565",[1,0.957,6,0.935,10,1.548,23,2.275,32,2.275,76,0.425,77,0.741,93,1.562,101,2.402,102,1.671,103,1.671,104,1.719,105,1.626,107,1.671,165,2.448,166,3.519,234,2.448,446,3.104,454,3.393,455,3.833,456,3.833,457,3.104,458,3.393,459,3.393,460,3.393,461,3.393,462,3.104,463,3.393,464,3.393,465,3.393,466,3.393,467,3.104,468,3.393,469,3.393]],["t/3567",[10,1.496,20,2.009,23,2.637,76,0.365,120,2.064,165,3.024,166,4.078,296,6.396,446,3.834,457,5.17,459,4.192,460,4.192,461,4.192,462,5.17,464,4.192,465,4.192,466,4.192,467,5.17,469,4.192]],["t/3569",[10,1.479,76,0.449,134,2.536,135,2.536,234,4.662,457,4.71,458,5.15,462,4.71,463,5.15,467,4.71,468,5.15,470,5.817]],["t/3571",[1,0.813,2,2.098,6,1.752,22,5.128,70,3.313,76,0.554,87,1.702,133,4.77,142,3.524,153,4.708,241,4.141,242,4.141,243,4.141,244,3.787,245,3.787,246,4.141,247,4.141,248,3.787,249,4.141,250,4.141,251,4.141]],["t/3573",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3575",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,471,4.122]],["t/3577",[3,2.199,70,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,472,4.59]],["t/3579",[1,1.073,6,1.101,10,1.471,32,2.551,47,0.873,76,0.476,77,0.873,93,1.751,101,2.694,102,1.967,103,1.967,104,2.023,105,1.914,107,1.967,116,1.307,155,3.618,211,3.479,255,4.655,324,3.196,472,3.994,473,4.511,474,4.511]],["t/3581",[1,0.459,10,1.599,20,1.765,23,2.126,26,1.979,28,1.688,35,1.546,43,0.836,47,0.805,70,1.87,76,0.397,77,1.13,116,0.765,120,1.814,121,1.256,123,2.696,125,1.487,129,1.338,130,1.338,131,1.433,153,3.721,155,2.436,157,3.369,158,2.657,159,1.989,160,1.686,161,4.73,162,3.369,163,2.138,164,2.138,165,1.686,166,1.686,167,2.138,168,2.138,169,2.138,170,2.138,171,1.612,172,1.771,189,1.87,211,2.899,255,3.134,314,2.338,315,2.338]],["t/3583",[10,1.536,35,2.739,47,0.905,76,0.488,77,1.225,116,1.355,134,2.039,135,2.761,145,3.313,153,3.708,155,3.708,159,3.524,171,2.856,172,3.137,211,3.566,255,4.77,475,4.677,476,4.677,477,4.677]],["t/3585",[1,1.171,2,3.023,6,1.645,71,6.468,478,6.74]],["t/3587",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3589",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3591",[3,2.199,71,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,479,4.59]],["t/3593",[1,1.001,6,0.995,10,1.513,32,2.378,47,0.789,76,0.444,77,0.789,93,1.632,101,2.511,102,1.778,103,1.778,104,1.829,105,1.73,107,1.778,113,1.382,115,1.559,116,1.181,117,1.64,118,1.521,119,2.046,181,1.829,234,2.605,479,3.61,480,4.078,481,4.078,482,3.61,483,3.302,484,4.664,485,3.302,486,3.302]],["t/3595",[8,1.091,10,1.644,20,1.002,23,1.572,26,1.811,28,1.012,31,3.387,34,1.443,43,1.205,44,1.443,47,0.737,53,1.913,54,2.874,76,0.294,77,1.308,113,1.621,115,0.903,116,0.684,117,0.95,118,0.881,119,0.84,120,1.03,121,1.811,123,3.247,125,2.144,129,1.197,130,1.197,131,2.066,132,1.443,165,3.054,166,2.432,181,2.145,214,2.092,234,1.509,303,2.092,483,3.083,484,3.083,485,3.083,486,3.083,487,2.363,488,2.363,489,2.363,490,2.363,491,2.363]],["t/3597",[10,1.486,47,1.003,76,0.4,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,2.41,134,2.261,135,2.261,181,2.325,234,3.312,482,4.59,483,4.199,484,5.492,485,4.199,486,4.199]]],"invertedIndex":[["",{"_index":10,"t":{"3343":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"3355":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"3357":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"3359":{"position":[[48,1],[173,1],[188,1]]},"3369":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"3371":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"3373":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"3383":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"3385":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"3387":{"position":[[18,1],[85,1],[203,1]]},"3397":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"3399":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"3401":{"position":[[0,2],[57,1],[126,1],[172,1]]},"3411":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"3413":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"3415":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"3417":{"position":[[302,4]]},"3425":{"position":[[134,2],[163,2],[196,2]]},"3427":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"3429":{"position":[[18,1],[193,1]]},"3439":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"3441":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"3443":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"3453":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"3455":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"3457":{"position":[[18,1],[56,1]]},"3467":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"3469":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"3471":{"position":[[18,1],[43,1],[58,1]]},"3481":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"3483":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"3485":{"position":[[18,1],[43,3],[141,1]]},"3495":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"3497":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"3499":{"position":[[18,1],[43,3],[150,1],[185,1]]},"3509":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"3511":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"3513":{"position":[[18,1],[43,3],[150,1],[165,1]]},"3523":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"3525":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"3527":{"position":[[18,1],[78,1]]},"3537":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"3539":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"3541":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"3551":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"3553":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"3555":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]},"3565":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"3567":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"3569":{"position":[[18,1],[57,2],[97,1]]},"3579":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"3581":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"3583":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"3593":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"3595":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"3597":{"position":[[18,1],[110,1],[182,1],[197,1]]}}}],["0",{"_index":35,"t":{"3343":{"position":[[492,1]]},"3371":{"position":[[251,1]]},"3373":{"position":[[86,2]]},"3411":{"position":[[341,2]]},"3551":{"position":[[325,2]]},"3553":{"position":[[402,1]]},"3555":{"position":[[106,2]]},"3581":{"position":[[201,1]]},"3583":{"position":[[274,2]]}}}],["1",{"_index":234,"t":{"3411":{"position":[[390,2]]},"3415":{"position":[[202,1]]},"3565":{"position":[[332,1]]},"3569":{"position":[[55,1],[94,2]]},"3593":{"position":[[402,1]]},"3595":{"position":[[839,1]]},"3597":{"position":[[180,1]]}}}],["1.14/1.15",{"_index":86,"t":{"3353":{"position":[[33,11]]}}}],["1.18",{"_index":143,"t":{"3361":{"position":[[82,4]]}}}],["10",{"_index":118,"t":{"3355":{"position":[[366,2]]},"3357":{"position":[[636,2]]},"3359":{"position":[[170,2]]},"3383":{"position":[[300,2]]},"3385":{"position":[[258,2]]},"3387":{"position":[[82,2]]},"3467":{"position":[[258,2]]},"3469":{"position":[[75,2]]},"3471":{"position":[[40,2]]},"3495":{"position":[[342,2],[567,2]]},"3497":{"position":[[860,2]]},"3499":{"position":[[147,2]]},"3509":{"position":[[342,2],[535,2],[749,2]]},"3511":{"position":[[875,2]]},"3513":{"position":[[147,2]]},"3537":{"position":[[319,2]]},"3539":{"position":[[1015,2]]},"3541":{"position":[[206,2]]},"3551":{"position":[[368,2]]},"3553":{"position":[[1456,2]]},"3555":{"position":[[149,2]]},"3593":{"position":[[329,2]]},"3595":{"position":[[319,2]]},"3597":{"position":[[107,2]]}}}],["100",{"_index":484,"t":{"3593":{"position":[[361,4],[380,4]]},"3595":{"position":[[585,4],[711,4]]},"3597":{"position":[[139,4],[158,4]]}}}],["10m",{"_index":461,"t":{"3565":{"position":[[316,6]]},"3567":{"position":[[73,6]]}}}],["123456",{"_index":240,"t":{"3415":{"position":[[120,9]]}}}],["127.0.0.1",{"_index":353,"t":{"3481":{"position":[[256,12]]},"3483":{"position":[[225,11]]},"3485":{"position":[[53,12]]},"3495":{"position":[[248,12]]},"3497":{"position":[[267,11]]},"3499":{"position":[[53,12]]},"3509":{"position":[[248,12]]},"3511":{"position":[[345,11]]},"3513":{"position":[[53,12]]},"3539":{"position":[[398,11]]},"3541":{"position":[[92,12]]},"3551":{"position":[[262,12]]},"3553":{"position":[[84,11]]},"3555":{"position":[[34,12]]}}}],["127.0.0.1:11211",{"_index":344,"t":{"3455":{"position":[[113,17]]},"3457":{"position":[[37,18]]}}}],["127.0.0.1:8091",{"_index":231,"t":{"3411":{"position":[[287,17]]},"3415":{"position":[[73,17]]}}}],["1433",{"_index":363,"t":{"3495":{"position":[[267,5]]},"3497":{"position":[[355,4]]},"3499":{"position":[[72,5]]}}}],["15",{"_index":302,"t":{"3427":{"position":[[2668,2],[2722,2]]}}}],["1e7",{"_index":458,"t":{"3565":{"position":[[271,4]]},"3569":{"position":[[41,4]]}}}],["1gb",{"_index":466,"t":{"3565":{"position":[[366,6]]},"3567":{"position":[[131,6]]}}}],["2",{"_index":84,"t":{"3353":{"position":[[26,1]]},"3367":{"position":[[43,1]]},"3381":{"position":[[24,1]]},"3395":{"position":[[23,1]]},"3409":{"position":[[27,1]]},"3423":{"position":[[26,1]]},"3427":{"position":[[175,3]]},"3437":{"position":[[22,1]]},"3443":{"position":[[80,1]]},"3451":{"position":[[24,1]]},"3465":{"position":[[24,1]]},"3479":{"position":[[25,1]]},"3493":{"position":[[23,1]]},"3507":{"position":[[23,1]]},"3521":{"position":[[24,1]]},"3535":{"position":[[26,1]]},"3549":{"position":[[23,1]]},"3563":{"position":[[27,1]]},"3577":{"position":[[20,1]]},"3591":{"position":[[25,1]]}}}],["25",{"_index":281,"t":{"3427":{"position":[[1341,2],[2037,2]]}}}],["27017",{"_index":354,"t":{"3481":{"position":[[275,6]]},"3483":{"position":[[313,5]]},"3485":{"position":[[72,6]]}}}],["3",{"_index":171,"t":{"3371":{"position":[[658,1]]},"3373":{"position":[[116,2]]},"3411":{"position":[[363,2]]},"3415":{"position":[[174,1]]},"3427":{"position":[[1010,1]]},"3429":{"position":[[93,2]]},"3581":{"position":[[613,1]]},"3583":{"position":[[255,2]]}}}],["30",{"_index":463,"t":{"3565":{"position":[[337,3]]},"3569":{"position":[[60,3]]}}}],["3306",{"_index":374,"t":{"3509":{"position":[[267,5]]},"3511":{"position":[[433,4]]},"3513":{"position":[[72,5]]}}}],["5",{"_index":277,"t":{"3427":{"position":[[1246,2],[1942,2]]},"3429":{"position":[[129,2],[152,2]]}}}],["5432",{"_index":394,"t":{"3539":{"position":[[486,4]]},"3541":{"position":[[111,5]]}}}],["60",{"_index":222,"t":{"3399":{"position":[[342,2]]},"3401":{"position":[[123,2]]}}}],["6379",{"_index":400,"t":{"3551":{"position":[[281,5]]},"3553":{"position":[[172,4]]},"3555":{"position":[[53,5]]}}}],["6380",{"_index":409,"t":{"3551":{"position":[[617,9]]}}}],["64",{"_index":468,"t":{"3565":{"position":[[386,3]]},"3569":{"position":[[77,3]]}}}],["8529",{"_index":112,"t":{"3355":{"position":[[286,5]]},"3357":{"position":[[179,4]]},"3359":{"position":[[90,5]]}}}],["_",{"_index":376,"t":{"3509":{"position":[[612,1]]}}}],["access",{"_index":162,"t":{"3371":{"position":[[422,6],[448,6]]},"3427":{"position":[[768,6],[794,6]]},"3581":{"position":[[371,6],[397,6]]}}}],["accesskey",{"_index":314,"t":{"3427":{"position":[[3096,9]]},"3581":{"position":[[659,9]]}}}],["account",{"_index":152,"t":{"3369":{"position":[[258,8],[320,8]]},"3371":{"position":[[32,7],[46,7]]},"3373":{"position":[[28,8]]}}}],["adaptor",{"_index":487,"t":{"3595":{"position":[[402,7]]}}}],["addr",{"_index":407,"t":{"3551":{"position":[[495,6],[592,6]]},"3553":{"position":[[794,5]]},"3555":{"position":[[177,6]]}}}],["address",{"_index":429,"t":{"3553":{"position":[[663,7],[699,10]]}}}],["admin",{"_index":239,"t":{"3415":{"position":[[101,8]]}}}],["allow",{"_index":265,"t":{"3427":{"position":[[415,6]]}}}],["along",{"_index":33,"t":{"3343":{"position":[[457,5]]}}}],["amount",{"_index":214,"t":{"3399":{"position":[[230,6]]},"3595":{"position":[[769,6]]}}}],["applic",{"_index":235,"t":{"3413":{"position":[[28,11],[108,11]]}}}],["arangodb",{"_index":55,"t":{"3345":{"position":[[0,8]]},"3347":{"position":[[2,8]]},"3353":{"position":[[0,8]]}}}],["arangodb.new",{"_index":106,"t":{"3355":{"position":[[172,14]]}}}],["arangodb.new(arangodb.config",{"_index":108,"t":{"3355":{"position":[[224,29]]}}}],["arangodb/go",{"_index":72,"t":{"3347":{"position":[[32,11],[55,11]]}}}],["attempt",{"_index":170,"t":{"3371":{"position":[[623,10]]},"3427":{"position":[[972,10]]},"3581":{"position":[[575,10]]}}}],["authent",{"_index":328,"t":{"3441":{"position":[[197,15],[259,15]]},"3483":{"position":[[81,14]]},"3497":{"position":[[123,14]]},"3511":{"position":[[69,14],[201,14]]},"3539":{"position":[[254,14]]}}}],["avail",{"_index":219,"t":{"3399":{"position":[[284,9]]},"3553":{"position":[[1481,9]]}}}],["aw",{"_index":161,"t":{"3371":{"position":[[418,3],[437,3]]},"3427":{"position":[[764,3],[783,3]]},"3581":{"position":[[98,3],[130,3],[367,3],[386,3]]}}}],["aws.bool(tru",{"_index":316,"t":{"3429":{"position":[[177,15]]}}}],["aws/aw",{"_index":241,"t":{"3417":{"position":[[32,7]]},"3571":{"position":[[26,7]]}}}],["aws/credenti",{"_index":246,"t":{"3417":{"position":[[154,19]]},"3571":{"position":[[148,19]]}}}],["aws_region",{"_index":263,"t":{"3427":{"position":[[283,13]]}}}],["awsdynamodb.cli",{"_index":252,"t":{"3421":{"position":[[285,19]]}}}],["azblob.cli",{"_index":148,"t":{"3365":{"position":[[288,14]]}}}],["azur",{"_index":136,"t":{"3361":{"position":[[0,5]]},"3367":{"position":[[0,5],[210,5]]}}}],["azureblob",{"_index":56,"t":{"3345":{"position":[[9,9]]}}}],["azureblob.new",{"_index":150,"t":{"3369":{"position":[[173,15]]}}}],["azureblob.new(azureblob.config",{"_index":151,"t":{"3369":{"position":[[226,31]]}}}],["badger",{"_index":57,"t":{"3345":{"position":[[19,6]]},"3381":{"position":[[0,6],[191,6]]},"3385":{"position":[[344,6],[487,6]]}}}],["badger.db",{"_index":176,"t":{"3379":{"position":[[288,10]]},"3519":{"position":[[288,10]]}}}],["badger.defaultoptions(\"./fiber.badg",{"_index":184,"t":{"3385":{"position":[[378,39]]}}}],["badger.defaultoptions(\"./fiber.badger\").withlogger(nil",{"_index":190,"t":{"3387":{"position":[[115,56]]}}}],["badger.logg",{"_index":187,"t":{"3385":{"position":[[532,13]]}}}],["badger.new",{"_index":178,"t":{"3383":{"position":[[170,12]]}}}],["badger.new(badger.config",{"_index":179,"t":{"3383":{"position":[[220,25]]}}}],["badger.opt",{"_index":185,"t":{"3385":{"position":[[432,14]]}}}],["badgeropt",{"_index":182,"t":{"3385":{"position":[[303,13],[418,13]]},"3387":{"position":[[100,14]]}}}],["bbolt",{"_index":58,"t":{"3345":{"position":[[26,5]]},"3389":{"position":[[2,5]]},"3395":{"position":[[0,5]]},"3399":{"position":[[137,5]]}}}],["bbolt.db",{"_index":206,"t":{"3393":{"position":[[288,9]]}}}],["bbolt.new",{"_index":208,"t":{"3397":{"position":[[169,11]]}}}],["bbolt.new(bbolt.config",{"_index":209,"t":{"3397":{"position":[[218,23]]}}}],["befor",{"_index":132,"t":{"3357":{"position":[[580,6]]},"3385":{"position":[[202,6]]},"3427":{"position":[[2921,6]]},"3469":{"position":[[29,6]]},"3497":{"position":[[804,6]]},"3511":{"position":[[819,6]]},"3539":{"position":[[959,6]]},"3595":{"position":[[263,6]]}}}],["blob",{"_index":137,"t":{"3361":{"position":[[6,4]]},"3367":{"position":[[6,4],[216,4]]}}}],["block",{"_index":300,"t":{"3427":{"position":[[2616,5]]}}}],["bolt",{"_index":192,"t":{"3389":{"position":[[44,4]]}}}],["bool",{"_index":130,"t":{"3357":{"position":[[567,4]]},"3371":{"position":[[388,4]]},"3385":{"position":[[189,4],[636,4]]},"3399":{"position":[[460,4],[557,4]]},"3427":{"position":[[1120,4],[3062,5]]},"3455":{"position":[[237,4]]},"3483":{"position":[[697,4]]},"3497":{"position":[[791,4]]},"3511":{"position":[[806,4]]},"3539":{"position":[[946,4]]},"3553":{"position":[[1275,4]]},"3581":{"position":[[337,4]]},"3595":{"position":[[250,4]]}}}],["bound",{"_index":450,"t":{"3557":{"position":[[9,5]]}}}],["bradfitz/gomemcach",{"_index":333,"t":{"3445":{"position":[[32,20]]}}}],["bucket",{"_index":211,"t":{"3397":{"position":[[270,7],[282,8]]},"3399":{"position":[[143,6],[198,6],[511,6]]},"3401":{"position":[[89,7]]},"3411":{"position":[[333,7]]},"3413":{"position":[[263,6],[284,6]]},"3415":{"position":[[130,7]]},"3427":{"position":[[1074,6]]},"3579":{"position":[[230,7],[242,6]]},"3581":{"position":[[69,6],[81,6],[291,6]]},"3583":{"position":[[32,7],[176,7]]}}}],["buffer",{"_index":469,"t":{"3565":{"position":[[416,7]]},"3567":{"position":[[190,7]]}}}],["bufferitem",{"_index":467,"t":{"3565":{"position":[[373,12]]},"3567":{"position":[[155,11],[198,11]]},"3569":{"position":[[64,12]]}}}],["byte",{"_index":29,"t":{"3343":{"position":[[393,8],[591,7]]},"3351":{"position":[[69,8],[123,7]]},"3365":{"position":[[69,8],[123,7]]},"3379":{"position":[[69,8],[123,7]]},"3393":{"position":[[69,8],[123,7]]},"3407":{"position":[[69,8],[123,7]]},"3421":{"position":[[66,8],[120,7]]},"3435":{"position":[[70,8],[124,7]]},"3449":{"position":[[69,8],[123,7]]},"3463":{"position":[[69,8],[123,7]]},"3477":{"position":[[69,8],[123,7]]},"3491":{"position":[[69,8],[123,7]]},"3505":{"position":[[69,8],[123,7]]},"3519":{"position":[[69,8],[123,7]]},"3533":{"position":[[69,8],[123,7]]},"3547":{"position":[[69,8],[123,7]]},"3561":{"position":[[69,8],[123,7]]},"3575":{"position":[[69,8],[123,7]]},"3589":{"position":[[69,8],[123,7]]}}}],["cach",{"_index":465,"t":{"3565":{"position":[[360,5]]},"3567":{"position":[[125,5]]}}}],["calcul",{"_index":286,"t":{"3427":{"position":[[1415,13],[2111,13]]}}}],["case",{"_index":308,"t":{"3427":{"position":[[2847,4]]}}}],["cer",{"_index":410,"t":{"3551":{"position":[[670,4]]}}}],["certif",{"_index":419,"t":{"3551":{"position":[[855,13]]}}}],["chu'",{"_index":197,"t":{"3389":{"position":[[97,5]]}}}],["clear",{"_index":129,"t":{"3357":{"position":[[480,6]]},"3371":{"position":[[304,6]]},"3385":{"position":[[107,6]]},"3399":{"position":[[474,6]]},"3427":{"position":[[1037,6]]},"3455":{"position":[[155,6]]},"3483":{"position":[[615,6]]},"3497":{"position":[[709,6]]},"3511":{"position":[[724,6]]},"3539":{"position":[[864,6]]},"3553":{"position":[[1188,6]]},"3581":{"position":[[254,6]]},"3595":{"position":[[168,6]]}}}],["client",{"_index":305,"t":{"3427":{"position":[[2810,6]]},"3441":{"position":[[308,6]]},"3551":{"position":[[428,6],[552,6],[642,6],[1025,6]]},"3553":{"position":[[932,7]]}}}],["client.key",{"_index":413,"t":{"3551":{"position":[[718,15]]}}}],["clientnam",{"_index":437,"t":{"3553":{"position":[[904,10],[948,11],[1013,10]]},"3555":{"position":[[212,11]]}}}],["clientv3.client",{"_index":318,"t":{"3435":{"position":[[289,16]]}}}],["close",{"_index":48,"t":{"3343":{"position":[[826,5],[832,6],[921,7]]},"3351":{"position":[[249,7]]},"3365":{"position":[[249,7]]},"3379":{"position":[[249,7]]},"3393":{"position":[[249,7]]},"3407":{"position":[[249,7]]},"3421":{"position":[[246,7]]},"3435":{"position":[[250,7]]},"3449":{"position":[[249,7]]},"3463":{"position":[[249,7]]},"3477":{"position":[[249,7]]},"3491":{"position":[[249,7]]},"3505":{"position":[[249,7]]},"3519":{"position":[[249,7]]},"3533":{"position":[[249,7]]},"3547":{"position":[[249,7]]},"3561":{"position":[[249,7]]},"3575":{"position":[[249,7]]},"3589":{"position":[[249,7]]}}}],["cloud",{"_index":141,"t":{"3361":{"position":[[66,6]]}}}],["cluster",{"_index":236,"t":{"3413":{"position":[[77,7],[157,7],[224,7],[345,7],[443,7]]},"3551":{"position":[[544,7]]}}}],["clustercli",{"_index":434,"t":{"3553":{"position":[[742,13]]}}}],["cockroachdb/pebbl",{"_index":378,"t":{"3515":{"position":[[26,18]]}}}],["collect",{"_index":114,"t":{"3355":{"position":[[311,11]]},"3357":{"position":[[394,10],[453,10],[517,10]]},"3359":{"position":[[115,11]]},"3481":{"position":[[301,11],[513,11]]},"3483":{"position":[[529,10],[588,10]]},"3485":{"position":[[98,11]]},"3553":{"position":[[1225,10]]}}}],["collector",{"_index":52,"t":{"3343":{"position":[[888,10]]}}}],["command",{"_index":440,"t":{"3553":{"position":[[960,7]]}}}],["commun",{"_index":11,"t":{"3343":{"position":[[139,13]]}}}],["config",{"_index":76,"t":{"3349":{"position":[[33,6],[48,6]]},"3351":{"position":[[16,10]]},"3355":{"position":[[156,6],[208,6]]},"3357":{"position":[[5,6]]},"3359":{"position":[[50,7]]},"3363":{"position":[[33,6],[48,6]]},"3365":{"position":[[16,10]]},"3369":{"position":[[157,6],[210,6]]},"3371":{"position":[[5,6]]},"3373":{"position":[[20,7]]},"3377":{"position":[[33,6],[48,6]]},"3379":{"position":[[16,10]]},"3383":{"position":[[154,6],[204,6]]},"3385":{"position":[[5,6]]},"3387":{"position":[[20,7]]},"3391":{"position":[[33,6],[48,6]]},"3393":{"position":[[16,10]]},"3397":{"position":[[153,6],[202,6]]},"3399":{"position":[[3,6],[22,6],[47,6]]},"3401":{"position":[[32,6],[59,7]]},"3405":{"position":[[33,6],[48,6]]},"3407":{"position":[[16,10]]},"3411":{"position":[[157,6],[233,6]]},"3413":{"position":[[5,6]]},"3415":{"position":[[32,6],[59,7]]},"3417":{"position":[[60,6],[199,6],[262,7]]},"3419":{"position":[[33,6],[48,6]]},"3421":{"position":[[16,7]]},"3427":{"position":[[5,6],[209,6]]},"3429":{"position":[[20,7]]},"3433":{"position":[[33,6],[48,6]]},"3435":{"position":[[16,10]]},"3439":{"position":[[152,6],[200,6]]},"3441":{"position":[[5,6]]},"3443":{"position":[[20,7]]},"3447":{"position":[[33,6],[48,6]]},"3449":{"position":[[16,10]]},"3453":{"position":[[156,6],[208,6]]},"3455":{"position":[[5,6]]},"3457":{"position":[[20,7]]},"3461":{"position":[[33,6],[48,6]]},"3463":{"position":[[16,10]]},"3467":{"position":[[154,6],[204,6]]},"3469":{"position":[[5,6]]},"3471":{"position":[[20,7]]},"3475":{"position":[[33,6],[48,6]]},"3477":{"position":[[16,10]]},"3481":{"position":[[155,6],[206,6],[368,6]]},"3483":{"position":[[5,6]]},"3485":{"position":[[20,7]]},"3489":{"position":[[33,6],[48,6]]},"3491":{"position":[[16,10]]},"3495":{"position":[[153,6],[202,6],[404,6]]},"3497":{"position":[[3,6],[22,6],[47,6]]},"3499":{"position":[[20,7]]},"3503":{"position":[[33,6],[48,6]]},"3505":{"position":[[16,10]]},"3509":{"position":[[153,6],[202,6],[384,6],[577,6]]},"3511":{"position":[[5,6]]},"3513":{"position":[[20,7]]},"3517":{"position":[[33,6],[48,6]]},"3519":{"position":[[16,10]]},"3523":{"position":[[154,6],[204,6]]},"3525":{"position":[[5,6]]},"3527":{"position":[[20,7]]},"3531":{"position":[[33,6],[48,6]]},"3533":{"position":[[16,10]]},"3537":{"position":[[159,6],[211,6]]},"3539":{"position":[[3,6],[22,6],[47,6]]},"3541":{"position":[[32,6],[59,7]]},"3545":{"position":[[33,6],[48,6]]},"3547":{"position":[[16,10]]},"3551":{"position":[[167,6],[216,6]]},"3553":{"position":[[5,6],[476,6],[1287,6]]},"3555":{"position":[[20,7]]},"3559":{"position":[[33,6],[48,6]]},"3561":{"position":[[16,10]]},"3565":{"position":[[157,6],[210,6]]},"3567":{"position":[[5,6]]},"3569":{"position":[[20,7]]},"3571":{"position":[[54,6],[193,6],[256,7]]},"3573":{"position":[[33,6],[48,6]]},"3575":{"position":[[16,10]]},"3579":{"position":[[150,6],[196,6]]},"3581":{"position":[[3,6],[22,6],[47,6]]},"3583":{"position":[[141,6],[168,7]]},"3587":{"position":[[33,6],[48,6]]},"3589":{"position":[[16,10]]},"3593":{"position":[[155,6],[206,6]]},"3595":{"position":[[5,6],[418,6]]},"3597":{"position":[[20,7]]}}}],["configdefault",{"_index":135,"t":{"3359":{"position":[[34,13]]},"3373":{"position":[[4,13]]},"3387":{"position":[[4,13]]},"3401":{"position":[[3,13],[43,13]]},"3415":{"position":[[3,13],[43,13]]},"3429":{"position":[[4,13]]},"3443":{"position":[[4,13]]},"3457":{"position":[[4,13]]},"3471":{"position":[[4,13]]},"3485":{"position":[[4,13]]},"3499":{"position":[[4,13]]},"3513":{"position":[[4,13]]},"3527":{"position":[[4,13]]},"3541":{"position":[[3,13],[43,13]]},"3555":{"position":[[4,13]]},"3569":{"position":[[4,13]]},"3583":{"position":[[112,13],[152,13]]},"3597":{"position":[[4,13]]}}}],["configur",{"_index":475,"t":{"3583":{"position":[[12,13]]}}}],["conn",{"_index":81,"t":{"3351":{"position":[[281,6]]},"3365":{"position":[[281,6]]},"3379":{"position":[[281,6]]},"3393":{"position":[[281,6]]},"3407":{"position":[[281,6]]},"3421":{"position":[[278,6]]},"3435":{"position":[[282,6]]},"3449":{"position":[[281,6]]},"3463":{"position":[[281,6]]},"3477":{"position":[[281,6]]},"3491":{"position":[[281,6]]},"3505":{"position":[[281,6]]},"3519":{"position":[[281,6]]},"3533":{"position":[[281,6]]},"3547":{"position":[[281,6]]},"3553":{"position":[[977,5]]},"3561":{"position":[[281,6]]},"3575":{"position":[[281,6]]},"3589":{"position":[[281,6]]}}}],["connect",{"_index":54,"t":{"3343":{"position":[[908,12]]},"3413":{"position":[[52,7],[132,7],[188,10],[273,7],[317,10]]},"3441":{"position":[[129,11]]},"3481":{"position":[[381,10]]},"3483":{"position":[[24,10]]},"3495":{"position":[[417,10]]},"3497":{"position":[[66,10],[926,10]]},"3509":{"position":[[397,10],[597,10]]},"3511":{"position":[[144,10]]},"3539":{"position":[[103,10],[128,10],[197,10],[792,10]]},"3553":{"position":[[349,10],[1416,12],[1459,11]]},"3595":{"position":[[517,11],[541,10],[655,11],[786,10]]}}}],["connectiontimeout",{"_index":232,"t":{"3411":{"position":[[344,18]]},"3413":{"position":[[353,17]]},"3415":{"position":[[155,18]]}}}],["connectionuri",{"_index":355,"t":{"3481":{"position":[[436,14]]},"3483":{"position":[[141,13]]},"3485":{"position":[[28,14]]},"3495":{"position":[[468,14]]},"3497":{"position":[[183,13]]},"3499":{"position":[[28,14]]},"3509":{"position":[[448,14]]},"3511":{"position":[[41,13],[261,13]]},"3513":{"position":[[28,14]]},"3539":{"position":[[314,13]]},"3541":{"position":[[67,14]]}}}],["connmaxlifetim",{"_index":486,"t":{"3593":{"position":[[385,16]]},"3595":{"position":[[736,15],[849,15]]},"3597":{"position":[[163,16]]}}}],["consol",{"_index":280,"t":{"3427":{"position":[[1329,8],[2025,8]]}}}],["contain",{"_index":45,"t":{"3343":{"position":[[718,7]]},"3369":{"position":[[275,10]]},"3371":{"position":[[64,9],[80,9],[341,10]]},"3373":{"position":[[41,10]]},"3427":{"position":[[542,9],[603,10]]}}}],["cost",{"_index":464,"t":{"3565":{"position":[[352,4]]},"3567":{"position":[[117,4]]}}}],["couchbas",{"_index":59,"t":{"3345":{"position":[[32,9]]},"3403":{"position":[[2,9]]},"3409":{"position":[[0,9],[194,9]]},"3411":{"position":[[203,9]]},"3413":{"position":[[67,9],[147,9],[214,9],[335,9],[433,9]]}}}],["couchbase.new",{"_index":229,"t":{"3411":{"position":[[173,15]]}}}],["couchbase.new(couchbase.config",{"_index":230,"t":{"3411":{"position":[[249,31]]}}}],["couchbase/gocb",{"_index":226,"t":{"3403":{"position":[[33,15]]}}}],["cpu",{"_index":447,"t":{"3553":{"position":[[1491,3]]}}}],["creat",{"_index":105,"t":{"3355":{"position":[[116,6]]},"3369":{"position":[[117,6]]},"3383":{"position":[[114,6]]},"3397":{"position":[[113,6]]},"3411":{"position":[[117,6]]},"3425":{"position":[[116,6]]},"3427":{"position":[[1217,7],[1301,8],[1913,7],[1997,8],[2558,7],[2641,8],[2933,8]]},"3439":{"position":[[112,6]]},"3453":{"position":[[116,6]]},"3467":{"position":[[114,6]]},"3481":{"position":[[115,6]]},"3495":{"position":[[113,6]]},"3509":{"position":[[113,6]]},"3523":{"position":[[114,6]]},"3537":{"position":[[119,6]]},"3551":{"position":[[121,6],[633,6],[1016,6]]},"3565":{"position":[[117,6]]},"3579":{"position":[[110,6]]},"3593":{"position":[[115,6]]}}}],["credenti",{"_index":153,"t":{"3369":{"position":[[294,12],[307,12]]},"3371":{"position":[[396,11],[501,13],[515,11],[527,11]]},"3417":{"position":[[77,11],[100,11],[216,11],[235,11],[290,11]]},"3427":{"position":[[742,11],[850,13],[864,11],[876,11],[3075,11]]},"3429":{"position":[[52,12],[65,14]]},"3441":{"position":[[322,12]]},"3571":{"position":[[71,11],[94,11],[210,11],[229,11],[284,11]]},"3581":{"position":[[345,11],[453,13],[467,11],[479,11],[638,11]]},"3583":{"position":[[214,12],[227,14]]}}}],["custom",{"_index":107,"t":{"3355":{"position":[[201,6]]},"3369":{"position":[[203,6]]},"3383":{"position":[[197,6]]},"3397":{"position":[[195,6]]},"3411":{"position":[[226,6]]},"3427":{"position":[[435,6]]},"3439":{"position":[[193,6]]},"3453":{"position":[[201,6]]},"3467":{"position":[[197,6]]},"3481":{"position":[[199,6],[361,6]]},"3495":{"position":[[195,6],[397,6]]},"3509":{"position":[[195,6],[377,6],[570,6]]},"3523":{"position":[[197,6]]},"3537":{"position":[[204,6]]},"3551":{"position":[[209,6]]},"3565":{"position":[[203,6]]},"3579":{"position":[[189,6]]},"3593":{"position":[[199,6]]}}}],["customendpoint",{"_index":264,"t":{"3427":{"position":[[400,14]]}}}],["darwin",{"_index":220,"t":{"3399":{"position":[[297,6]]}}}],["databas",{"_index":113,"t":{"3355":{"position":[[292,9]]},"3357":{"position":[[326,8],[375,8]]},"3359":{"position":[[96,9]]},"3383":{"position":[[246,9]]},"3385":{"position":[[24,8],[82,8]]},"3387":{"position":[[28,9]]},"3389":{"position":[[184,8],[232,8]]},"3397":{"position":[[242,9]]},"3399":{"position":[[66,8],[118,8],[390,8]]},"3401":{"position":[[67,9]]},"3481":{"position":[[282,9],[494,9]]},"3483":{"position":[[461,8],[510,8]]},"3485":{"position":[[79,9]]},"3495":{"position":[[273,9]]},"3497":{"position":[[565,8],[614,8]]},"3499":{"position":[[78,9]]},"3509":{"position":[[273,9]]},"3511":{"position":[[580,8],[629,8]]},"3513":{"position":[[78,9]]},"3525":{"position":[[24,8]]},"3539":{"position":[[633,8],[682,8]]},"3541":{"position":[[117,9]]},"3551":{"position":[[315,9]]},"3553":{"position":[[319,8],[404,8],[524,8]]},"3555":{"position":[[96,9]]},"3593":{"position":[[250,9]]},"3595":{"position":[[24,8],[73,8],[674,9]]},"3597":{"position":[[28,9]]}}}],["database/key",{"_index":13,"t":{"3343":{"position":[[168,12]]}}}],["database/sql",{"_index":368,"t":{"3501":{"position":[[29,12]]}}}],["db",{"_index":122,"t":{"3357":{"position":[[44,2],[133,2]]},"3375":{"position":[[17,2]]},"3483":{"position":[[53,3],[185,2],[267,2]]},"3497":{"position":[[95,3],[227,2],[309,2]]},"3509":{"position":[[594,2],[608,3],[715,3],[719,3]]},"3511":{"position":[[24,2],[130,2],[173,3],[305,2],[387,2]]},"3515":{"position":[[17,2]]},"3523":{"position":[[252,5]]},"3525":{"position":[[65,6]]},"3527":{"position":[[34,5]]},"3537":{"position":[[257,3]]},"3539":{"position":[[66,2],[177,2],[226,3],[358,2],[440,2]]},"3553":{"position":[[44,2],[126,2]]}}}],["dbpool",{"_index":392,"t":{"3537":{"position":[[261,7]]}}}],["default",{"_index":77,"t":{"3349":{"position":[[40,7]]},"3355":{"position":[[148,7]]},"3357":{"position":[[73,7],[168,7],[228,7],[293,7],[356,7],[426,7],[544,7],[625,7]]},"3363":{"position":[[40,7]]},"3369":{"position":[[149,7]]},"3371":{"position":[[131,8],[240,7],[365,7],[490,7],[647,7]]},"3377":{"position":[[40,7]]},"3383":{"position":[[146,7]]},"3385":{"position":[[54,7],[166,7],[247,7],[367,7],[464,7],[510,7],[609,7]]},"3391":{"position":[[40,7]]},"3397":{"position":[[145,7]]},"3399":{"position":[[96,7],[171,7],[331,7],[434,7],[534,7]]},"3401":{"position":[[24,7]]},"3405":{"position":[[40,7]]},"3411":{"position":[[149,7]]},"3415":{"position":[[24,7]]},"3419":{"position":[[40,7]]},"3427":{"position":[[374,9],[714,8],[839,7],[999,7],[1097,7],[1252,8],[1279,7],[1948,8],[1975,7],[3031,9]]},"3433":{"position":[[40,7]]},"3439":{"position":[[144,7]]},"3447":{"position":[[40,7]]},"3453":{"position":[[148,7]]},"3455":{"position":[[102,7],[214,7]]},"3461":{"position":[[40,7]]},"3467":{"position":[[146,7]]},"3469":{"position":[[64,7]]},"3475":{"position":[[40,7]]},"3481":{"position":[[147,7]]},"3483":{"position":[[127,7],[214,7],[302,7],[363,7],[428,7],[491,7],[561,7],[674,7]]},"3489":{"position":[[40,7]]},"3495":{"position":[[145,7]]},"3497":{"position":[[169,7],[256,7],[344,7],[404,7],[469,7],[532,7],[595,7],[660,7],[768,7],[849,7],[953,7]]},"3503":{"position":[[40,7]]},"3509":{"position":[[145,7]]},"3511":{"position":[[115,7],[247,7],[334,7],[422,7],[482,7],[547,7],[610,7],[675,7],[783,7],[864,7]]},"3517":{"position":[[40,7]]},"3523":{"position":[[146,7]]},"3525":{"position":[[54,7],[146,7]]},"3531":{"position":[[40,7]]},"3537":{"position":[[151,7]]},"3539":{"position":[[162,7],[300,7],[387,7],[475,7],[535,7],[600,7],[663,7],[728,7],[819,7],[923,7],[1004,7]]},"3541":{"position":[[24,7]]},"3545":{"position":[[40,7]]},"3551":{"position":[[159,7]]},"3553":{"position":[[73,7],[161,7],[221,7],[286,7],[391,7],[619,7],[772,7],[869,7],[999,7],[1067,7],[1141,7],[1252,7],[1351,7],[1445,7]]},"3559":{"position":[[40,7]]},"3565":{"position":[[149,7]]},"3573":{"position":[[40,7]]},"3579":{"position":[[142,7]]},"3581":{"position":[[190,7],[314,7],[442,7],[602,7]]},"3583":{"position":[[4,7],[133,7]]},"3587":{"position":[[40,7]]},"3593":{"position":[[147,7]]},"3595":{"position":[[54,7],[119,7],[227,7],[308,7],[574,7],[700,7],[828,7]]}}}],["defaultcost",{"_index":470,"t":{"3569":{"position":[[81,12]]}}}],["defin",{"_index":189,"t":{"3385":{"position":[[559,6]]},"3399":{"position":[[10,7]]},"3497":{"position":[[10,7]]},"3539":{"position":[[10,7]]},"3581":{"position":[[10,7]]}}}],["delet",{"_index":44,"t":{"3343":{"position":[[627,6],[634,7],[792,6]]},"3357":{"position":[[587,8]]},"3385":{"position":[[209,8]]},"3469":{"position":[[36,8]]},"3497":{"position":[[811,8]]},"3511":{"position":[[826,8]]},"3539":{"position":[[966,8]]},"3595":{"position":[[270,8]]}}}],["delete(key",{"_index":46,"t":{"3343":{"position":[[735,10]]},"3351":{"position":[[174,10]]},"3365":{"position":[[174,10]]},"3379":{"position":[[174,10]]},"3393":{"position":[[174,10]]},"3407":{"position":[[174,10]]},"3421":{"position":[[171,10]]},"3435":{"position":[[175,10]]},"3449":{"position":[[174,10]]},"3463":{"position":[[174,10]]},"3477":{"position":[[174,10]]},"3491":{"position":[[174,10]]},"3505":{"position":[[174,10]]},"3519":{"position":[[174,10]]},"3533":{"position":[[174,10]]},"3547":{"position":[[174,10]]},"3561":{"position":[[174,10]]},"3575":{"position":[[174,10]]},"3589":{"position":[[174,10]]}}}],["design",{"_index":5,"t":{"3343":{"position":[[62,8]]}}}],["develop",{"_index":288,"t":{"3427":{"position":[[1476,9],[1645,9],[2172,9],[2341,9]]}}}],["dgraph",{"_index":174,"t":{"3375":{"position":[[26,6]]},"3557":{"position":[[36,6]]}}}],["dialtimeout",{"_index":325,"t":{"3441":{"position":[[75,11],[141,11]]},"3443":{"position":[[67,12]]}}}],["didn't",{"_index":96,"t":{"3353":{"position":[[127,6]]},"3367":{"position":[[132,6]]},"3381":{"position":[[113,6]]},"3395":{"position":[[112,6]]},"3409":{"position":[[116,6]]},"3423":{"position":[[115,6]]},"3437":{"position":[[111,6]]},"3451":{"position":[[113,6]]},"3465":{"position":[[113,6]]},"3479":{"position":[[114,6]]},"3493":{"position":[[112,6]]},"3507":{"position":[[112,6]]},"3521":{"position":[[113,6]]},"3535":{"position":[[115,6]]},"3549":{"position":[[112,6]]},"3563":{"position":[[116,6]]},"3577":{"position":[[109,6]]},"3591":{"position":[[114,6]]}}}],["differ",{"_index":12,"t":{"3343":{"position":[[158,9]]}}}],["disabl",{"_index":365,"t":{"3495":{"position":[[369,10]]},"3497":{"position":[[964,9]]},"3499":{"position":[[174,10]]},"3539":{"position":[[830,9]]},"3541":{"position":[[169,10]]}}}],["divid",{"_index":340,"t":{"3455":{"position":[[36,7]]}}}],["docker",{"_index":269,"t":{"3427":{"position":[[535,6],[596,6]]}}}],["doesn't",{"_index":275,"t":{"3427":{"position":[[1192,7],[1888,7],[2534,7],[2702,7]]}}}],["don't",{"_index":203,"t":{"3389":{"position":[[211,5]]},"3427":{"position":[[2883,5]]},"3521":{"position":[[210,5]]}}}],["driver",{"_index":2,"t":{"3343":{"position":[[16,7]]},"3347":{"position":[[19,6],[44,6],[67,7]]},"3367":{"position":[[19,6]]},"3389":{"position":[[16,6]]},"3403":{"position":[[20,6]]},"3417":{"position":[[19,6]]},"3431":{"position":[[15,6]]},"3445":{"position":[[19,6]]},"3459":{"position":[[21,7]]},"3473":{"position":[[18,6],[48,7]]},"3487":{"position":[[16,6]]},"3501":{"position":[[16,6]]},"3529":{"position":[[19,6]]},"3543":{"position":[[16,6]]},"3557":{"position":[[23,6]]},"3571":{"position":[[13,6]]},"3585":{"position":[[18,6]]}}}],["driver.cli",{"_index":82,"t":{"3351":{"position":[[288,13]]}}}],["driver/mysql",{"_index":370,"t":{"3501":{"position":[[53,13]]}}}],["dure",{"_index":386,"t":{"3525":{"position":[[106,6]]}}}],["dynamodb",{"_index":60,"t":{"3345":{"position":[[42,8]]},"3417":{"position":[[2,8]]},"3423":{"position":[[0,8],[193,8]]},"3425":{"position":[[148,8]]},"3427":{"position":[[38,8],[326,8],[442,8],[518,9],[1467,8],[1636,8],[2163,8],[2332,8]]}}}],["dynamodb.new(dynamodb.config",{"_index":254,"t":{"3425":{"position":[[166,29]]}}}],["e.g",{"_index":260,"t":{"3427":{"position":[[161,4]]}}}],["each",{"_index":441,"t":{"3553":{"position":[[972,4]]}}}],["ec2",{"_index":247,"t":{"3417":{"position":[[177,3]]},"3571":{"position":[[171,3]]}}}],["effect",{"_index":426,"t":{"3553":{"position":[[541,7]]}}}],["empti",{"_index":37,"t":{"3343":{"position":[[518,5]]}}}],["enabl",{"_index":432,"t":{"3553":{"position":[[715,7]]}}}],["encount",{"_index":167,"t":{"3371":{"position":[[584,9]]},"3427":{"position":[[933,9]]},"3581":{"position":[[536,9]]}}}],["endpoint",{"_index":155,"t":{"3371":{"position":[[108,9],[191,8]]},"3373":{"position":[[56,9]]},"3427":{"position":[[459,9],[723,8]]},"3439":{"position":[[233,10]]},"3441":{"position":[[24,9],[53,9]]},"3443":{"position":[[28,10]]},"3579":{"position":[[255,9],[269,10]]},"3581":{"position":[[102,8],[111,8]]},"3583":{"position":[[52,8],[200,9]]}}}],["environ",{"_index":244,"t":{"3417":{"position":[[131,11]]},"3427":{"position":[[224,11],[261,11]]},"3571":{"position":[[125,11]]}}}],["err",{"_index":411,"t":{"3551":{"position":[[675,3],[737,3]]}}}],["error",{"_index":30,"t":{"3343":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"3351":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3365":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3379":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3393":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3407":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3421":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"3427":{"position":[[2737,5],[3002,7]]},"3435":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"3449":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3463":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3477":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3491":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3505":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3519":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3533":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3547":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3561":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3575":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3589":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]}}}],["especi",{"_index":266,"t":{"3427":{"position":[[480,10]]}}}],["establish",{"_index":327,"t":{"3441":{"position":[[117,9]]}}}],["etcd",{"_index":61,"t":{"3345":{"position":[[51,4]]},"3389":{"position":[[29,4]]},"3431":{"position":[[2,4],[28,4]]},"3437":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":320,"t":{"3439":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":321,"t":{"3439":{"position":[[216,16]]}}}],["exampl",{"_index":75,"t":{"3349":{"position":[[24,8]]},"3363":{"position":[[24,8]]},"3377":{"position":[[24,8]]},"3391":{"position":[[24,8]]},"3405":{"position":[[24,8]]},"3419":{"position":[[24,8]]},"3427":{"position":[[1407,7],[2103,7]]},"3433":{"position":[[24,8]]},"3447":{"position":[[24,8]]},"3461":{"position":[[24,8]]},"3475":{"position":[[24,8]]},"3489":{"position":[[24,8]]},"3503":{"position":[[24,8]]},"3517":{"position":[[24,8]]},"3531":{"position":[[24,8]]},"3545":{"position":[[24,8]]},"3553":{"position":[[555,8]]},"3559":{"position":[[24,8]]},"3573":{"position":[[24,8]]},"3587":{"position":[[24,8]]}}}],["execut",{"_index":438,"t":{"3553":{"position":[[920,7]]}}}],["exist",{"_index":26,"t":{"3343":{"position":[[371,5]]},"3357":{"position":[[491,8],[508,8]]},"3371":{"position":[[315,8],[332,8]]},"3385":{"position":[[118,8],[135,8]]},"3399":{"position":[[485,8],[502,8]]},"3427":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"3455":{"position":[[166,8],[183,8]]},"3483":{"position":[[626,8],[643,8]]},"3497":{"position":[[720,8],[737,8]]},"3511":{"position":[[735,8],[752,8]]},"3521":{"position":[[224,8]]},"3539":{"position":[[875,8],[892,8]]},"3553":{"position":[[1199,8],[1216,8]]},"3581":{"position":[[265,8],[282,8]]},"3595":{"position":[[179,8],[196,8]]}}}],["exp",{"_index":42,"t":{"3343":{"position":[[599,3]]},"3351":{"position":[[131,3]]},"3365":{"position":[[131,3]]},"3379":{"position":[[131,3]]},"3393":{"position":[[131,3]]},"3407":{"position":[[131,3]]},"3421":{"position":[[128,3]]},"3435":{"position":[[132,3]]},"3449":{"position":[[131,3]]},"3463":{"position":[[131,3]]},"3477":{"position":[[131,3]]},"3491":{"position":[[131,3]]},"3505":{"position":[[131,3]]},"3519":{"position":[[131,3]]},"3533":{"position":[[131,3]]},"3547":{"position":[[131,3]]},"3561":{"position":[[131,3]]},"3575":{"position":[[131,3]]},"3589":{"position":[[131,3]]}}}],["expir",{"_index":34,"t":{"3343":{"position":[[474,10],[503,11]]},"3357":{"position":[[596,7]]},"3385":{"position":[[218,7]]},"3469":{"position":[[45,7]]},"3497":{"position":[[820,7]]},"3511":{"position":[[835,7]]},"3539":{"position":[[975,7]]},"3595":{"position":[[279,7]]}}}],["fail",{"_index":326,"t":{"3441":{"position":[[106,7]]}}}],["failov",{"_index":404,"t":{"3551":{"position":[[419,8]]}}}],["failovercli",{"_index":433,"t":{"3553":{"position":[[723,14]]}}}],["failur",{"_index":169,"t":{"3371":{"position":[[604,8]]},"3427":{"position":[[953,8]]},"3581":{"position":[[556,8]]}}}],["fals",{"_index":116,"t":{"3355":{"position":[[347,6]]},"3357":{"position":[[555,5]]},"3359":{"position":[[151,6]]},"3371":{"position":[[376,5]]},"3373":{"position":[[96,6]]},"3383":{"position":[[281,6]]},"3385":{"position":[[177,5],[620,5]]},"3387":{"position":[[63,6],[196,6]]},"3397":{"position":[[298,6]]},"3399":{"position":[[445,5],[545,5]]},"3401":{"position":[[151,6],[165,6]]},"3427":{"position":[[1108,5],[2786,6]]},"3429":{"position":[[103,6]]},"3455":{"position":[[225,5]]},"3481":{"position":[[337,6],[549,6]]},"3483":{"position":[[685,5]]},"3485":{"position":[[134,6]]},"3495":{"position":[[323,6],[548,6]]},"3497":{"position":[[779,5]]},"3499":{"position":[[128,6]]},"3509":{"position":[[323,6],[516,6],[730,6]]},"3511":{"position":[[794,5]]},"3513":{"position":[[128,6]]},"3537":{"position":[[300,6]]},"3539":{"position":[[934,5]]},"3541":{"position":[[187,6]]},"3551":{"position":[[335,6],[1003,6],[1160,6]]},"3553":{"position":[[1263,5]]},"3555":{"position":[[116,6]]},"3579":{"position":[[308,6]]},"3581":{"position":[[325,5]]},"3583":{"position":[[284,6]]},"3593":{"position":[[310,6]]},"3595":{"position":[[238,5]]},"3597":{"position":[[88,6]]}}}],["fast",{"_index":173,"t":{"3375":{"position":[[2,4]]},"3389":{"position":[[165,5]]},"3515":{"position":[[2,4]]}}}],["fiber",{"_index":8,"t":{"3343":{"position":[[95,5]]},"3355":{"position":[[302,8]]},"3357":{"position":[[367,7]]},"3359":{"position":[[106,8]]},"3481":{"position":[[292,8],[504,8]]},"3483":{"position":[[502,7]]},"3485":{"position":[[89,8]]},"3495":{"position":[[283,8]]},"3497":{"position":[[606,7]]},"3499":{"position":[[88,8]]},"3509":{"position":[[283,8]]},"3511":{"position":[[621,7]]},"3513":{"position":[[88,8]]},"3539":{"position":[[674,7]]},"3541":{"position":[[127,8]]},"3595":{"position":[[65,7]]}}}],["fiber.badg",{"_index":180,"t":{"3383":{"position":[[256,17]]},"3385":{"position":[[65,16]]},"3387":{"position":[[38,17]]}}}],["fiber.db",{"_index":213,"t":{"3399":{"position":[[107,10]]},"3401":{"position":[[77,11]]}}}],["fiber.sqlite3",{"_index":482,"t":{"3593":{"position":[[260,18]]},"3597":{"position":[[38,18]]}}}],["fiber_storag",{"_index":115,"t":{"3355":{"position":[[323,16]]},"3357":{"position":[[437,15]]},"3359":{"position":[[127,16]]},"3399":{"position":[[182,15]]},"3401":{"position":[[97,16]]},"3415":{"position":[[138,16]]},"3427":{"position":[[354,16]]},"3429":{"position":[[35,16]]},"3481":{"position":[[313,16],[525,16]]},"3483":{"position":[[572,15]]},"3485":{"position":[[110,16]]},"3495":{"position":[[299,16]]},"3497":{"position":[[671,15]]},"3499":{"position":[[104,16]]},"3509":{"position":[[299,16]]},"3511":{"position":[[686,15]]},"3513":{"position":[[104,16]]},"3537":{"position":[[276,16]]},"3539":{"position":[[739,15]]},"3541":{"position":[[143,16]]},"3593":{"position":[[286,16]]},"3595":{"position":[[130,15]]},"3597":{"position":[[64,16]]}}}],["field",{"_index":133,"t":{"3359":{"position":[[23,6]]},"3417":{"position":[[67,6],[206,6]]},"3539":{"position":[[139,6]]},"3571":{"position":[[61,6],[200,6]]}}}],["file",{"_index":217,"t":{"3399":{"position":[[265,4]]},"3427":{"position":[[216,4]]}}}],["first",{"_index":95,"t":{"3353":{"position":[[114,5]]},"3367":{"position":[[119,5]]},"3381":{"position":[[100,5]]},"3395":{"position":[[99,5]]},"3409":{"position":[[103,5]]},"3423":{"position":[[102,5]]},"3437":{"position":[[98,5]]},"3451":{"position":[[100,5]]},"3465":{"position":[[100,5]]},"3479":{"position":[[101,5]]},"3493":{"position":[[99,5]]},"3507":{"position":[[99,5]]},"3521":{"position":[[100,5]]},"3535":{"position":[[102,5]]},"3549":{"position":[[99,5]]},"3563":{"position":[[103,5]]},"3577":{"position":[[96,5]]},"3591":{"position":[[101,5]]}}}],["follow",{"_index":103,"t":{"3355":{"position":[[89,9]]},"3369":{"position":[[90,9]]},"3383":{"position":[[87,9]]},"3397":{"position":[[86,9]]},"3411":{"position":[[90,9]]},"3425":{"position":[[89,9]]},"3439":{"position":[[85,9]]},"3453":{"position":[[89,9]]},"3467":{"position":[[87,9]]},"3481":{"position":[[88,9]]},"3495":{"position":[[86,9]]},"3509":{"position":[[86,9]]},"3523":{"position":[[87,9]]},"3537":{"position":[[92,9]]},"3551":{"position":[[100,9]]},"3565":{"position":[[90,9]]},"3579":{"position":[[83,9]]},"3593":{"position":[[88,9]]}}}],["format",{"_index":425,"t":{"3553":{"position":[[433,6]]}}}],["free",{"_index":284,"t":{"3427":{"position":[[1369,4],[2065,4]]}}}],["frequenc",{"_index":460,"t":{"3565":{"position":[[303,9]]},"3567":{"position":[[60,9]]}}}],["full",{"_index":204,"t":{"3389":{"position":[[227,4]]}}}],["func",{"_index":78,"t":{"3351":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3365":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3379":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3393":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3407":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3421":{"position":[[0,4],[32,4],[82,4],[153,4],[196,4],[228,4],[260,4]]},"3435":{"position":[[0,4],[36,4],[86,4],[157,4],[200,4],[232,4],[264,4]]},"3449":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3463":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3477":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3491":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3505":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3519":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3533":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3547":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3561":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3575":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3589":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]}}}],["garbag",{"_index":51,"t":{"3343":{"position":[[877,7]]}}}],["gcinterv",{"_index":117,"t":{"3355":{"position":[[354,11]]},"3357":{"position":[[653,10]]},"3359":{"position":[[158,11]]},"3383":{"position":[[288,11]]},"3385":{"position":[[275,10]]},"3387":{"position":[[70,11]]},"3467":{"position":[[246,11]]},"3469":{"position":[[92,10]]},"3471":{"position":[[28,11]]},"3495":{"position":[[330,11],[555,11]]},"3497":{"position":[[877,10]]},"3499":{"position":[[135,11]]},"3509":{"position":[[330,11],[523,11],[737,11]]},"3511":{"position":[[892,10]]},"3513":{"position":[[135,11]]},"3537":{"position":[[307,11]]},"3539":{"position":[[1032,10]]},"3541":{"position":[[194,11]]},"3593":{"position":[[317,11]]},"3595":{"position":[[336,10]]},"3597":{"position":[[95,11]]}}}],["get",{"_index":21,"t":{"3343":{"position":[[289,4]]}}}],["get(key",{"_index":27,"t":{"3343":{"position":[[377,7]]},"3351":{"position":[[53,7]]},"3365":{"position":[[53,7]]},"3379":{"position":[[53,7]]},"3393":{"position":[[53,7]]},"3407":{"position":[[53,7]]},"3421":{"position":[[50,7]]},"3435":{"position":[[54,7]]},"3449":{"position":[[53,7]]},"3463":{"position":[[53,7]]},"3477":{"position":[[53,7]]},"3491":{"position":[[53,7]]},"3505":{"position":[[53,7]]},"3519":{"position":[[53,7]]},"3533":{"position":[[53,7]]},"3547":{"position":[[53,7]]},"3561":{"position":[[53,7]]},"3575":{"position":[[53,7]]},"3589":{"position":[[53,7]]}}}],["github.com//:@127.0.0.1:6379/:@localhost:6379/:@tcp(:)// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#installation","p":3603},{"i":3612,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#examples","p":3603},{"i":3614,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#config","p":3603},{"i":3616,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/arangodb/","h":"#default-config","p":3603},{"i":3618,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/ristretto_v1.x.x/azureblob/","h":"","p":3617},{"i":3620,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#table-of-contents","p":3617},{"i":3622,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#signatures","p":3617},{"i":3624,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#installation","p":3617},{"i":3626,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#examples","p":3617},{"i":3628,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#config","p":3617},{"i":3630,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/azureblob/","h":"#default-config","p":3617},{"i":3632,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/ristretto_v1.x.x/badger/","h":"","p":3631},{"i":3634,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/badger/","h":"#table-of-contents","p":3631},{"i":3636,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/badger/","h":"#signatures","p":3631},{"i":3638,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/ristretto_v1.x.x/badger/","h":"#installation","p":3631},{"i":3640,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/badger/","h":"#examples","p":3631},{"i":3642,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/ristretto_v1.x.x/badger/","h":"#config","p":3631},{"i":3644,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/badger/","h":"#default-config","p":3631},{"i":3646,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/ristretto_v1.x.x/bbolt/","h":"","p":3645},{"i":3648,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#table-of-contents","p":3645},{"i":3650,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#signatures","p":3645},{"i":3652,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#installation","p":3645},{"i":3654,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#examples","p":3645},{"i":3656,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#config","p":3645},{"i":3658,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/bbolt/","h":"#default-config","p":3645},{"i":3660,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/ristretto_v1.x.x/couchbase/","h":"","p":3659},{"i":3662,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#table-of-contents","p":3659},{"i":3664,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#signatures","p":3659},{"i":3666,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#installation","p":3659},{"i":3668,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#examples","p":3659},{"i":3670,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#config","p":3659},{"i":3672,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/couchbase/","h":"#default-config","p":3659},{"i":3674,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"","p":3673},{"i":3676,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#table-of-contents","p":3673},{"i":3678,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#signatures","p":3673},{"i":3680,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#installation","p":3673},{"i":3682,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#examples","p":3673},{"i":3684,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#config","p":3673},{"i":3686,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/ristretto_v1.x.x/dynamodb/","h":"#default-config","p":3673},{"i":3688,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/ristretto_v1.x.x/etcd/","h":"","p":3687},{"i":3690,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/etcd/","h":"#table-of-contents","p":3687},{"i":3692,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/etcd/","h":"#signatures","p":3687},{"i":3694,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/ristretto_v1.x.x/etcd/","h":"#installation","p":3687},{"i":3696,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/ristretto_v1.x.x/etcd/","h":"#examples","p":3687},{"i":3698,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/ristretto_v1.x.x/etcd/","h":"#config","p":3687},{"i":3700,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/etcd/","h":"#default-config","p":3687},{"i":3702,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/ristretto_v1.x.x/memcache/","h":"","p":3701},{"i":3704,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/memcache/","h":"#table-of-contents","p":3701},{"i":3706,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/memcache/","h":"#signatures","p":3701},{"i":3708,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/ristretto_v1.x.x/memcache/","h":"#installation","p":3701},{"i":3710,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/ristretto_v1.x.x/memcache/","h":"#examples","p":3701},{"i":3712,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/ristretto_v1.x.x/memcache/","h":"#config","p":3701},{"i":3714,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/ristretto_v1.x.x/memcache/","h":"#default-config","p":3701},{"i":3716,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/ristretto_v1.x.x/memory/","h":"","p":3715},{"i":3718,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/memory/","h":"#table-of-contents","p":3715},{"i":3720,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/ristretto_v1.x.x/memory/","h":"#signatures","p":3715},{"i":3722,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/ristretto_v1.x.x/memory/","h":"#installation","p":3715},{"i":3724,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/memory/","h":"#examples","p":3715},{"i":3726,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/memory/","h":"#config","p":3715},{"i":3728,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/memory/","h":"#default-config","p":3715},{"i":3730,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/ristretto_v1.x.x/mongodb/","h":"","p":3729},{"i":3732,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#table-of-contents","p":3729},{"i":3734,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#signatures","p":3729},{"i":3736,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#installation","p":3729},{"i":3738,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#examples","p":3729},{"i":3740,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#config","p":3729},{"i":3742,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/mongodb/","h":"#default-config","p":3729},{"i":3744,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/ristretto_v1.x.x/mssql/","h":"","p":3743},{"i":3746,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/mssql/","h":"#table-of-contents","p":3743},{"i":3748,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/mssql/","h":"#signatures","p":3743},{"i":3750,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/ristretto_v1.x.x/mssql/","h":"#installation","p":3743},{"i":3752,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/mssql/","h":"#examples","p":3743},{"i":3754,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/ristretto_v1.x.x/mssql/","h":"#config","p":3743},{"i":3756,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/ristretto_v1.x.x/mssql/","h":"#default-config","p":3743},{"i":3758,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/ristretto_v1.x.x/mysql/","h":"","p":3757},{"i":3760,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/mysql/","h":"#table-of-contents","p":3757},{"i":3762,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/mysql/","h":"#signatures","p":3757},{"i":3764,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/ristretto_v1.x.x/mysql/","h":"#installation","p":3757},{"i":3766,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/mysql/","h":"#examples","p":3757},{"i":3768,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/mysql/","h":"#config","p":3757},{"i":3770,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/mysql/","h":"#default-config","p":3757},{"i":3772,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/ristretto_v1.x.x/pebble/","h":"","p":3771},{"i":3774,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/pebble/","h":"#table-of-contents","p":3771},{"i":3776,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/pebble/","h":"#signatures","p":3771},{"i":3778,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/ristretto_v1.x.x/pebble/","h":"#installation","p":3771},{"i":3780,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/ristretto_v1.x.x/pebble/","h":"#examples","p":3771},{"i":3782,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/ristretto_v1.x.x/pebble/","h":"#config","p":3771},{"i":3784,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/pebble/","h":"#default-config","p":3771},{"i":3786,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/ristretto_v1.x.x/postgres/","h":"","p":3785},{"i":3788,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/postgres/","h":"#table-of-contents","p":3785},{"i":3790,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/ristretto_v1.x.x/postgres/","h":"#signatures","p":3785},{"i":3792,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/ristretto_v1.x.x/postgres/","h":"#installation","p":3785},{"i":3794,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/postgres/","h":"#examples","p":3785},{"i":3796,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/postgres/","h":"#config","p":3785},{"i":3798,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/postgres/","h":"#default-config","p":3785},{"i":3800,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/ristretto_v1.x.x/redis/","h":"","p":3799},{"i":3802,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/redis/","h":"#table-of-contents","p":3799},{"i":3804,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/ristretto_v1.x.x/redis/","h":"#signatures","p":3799},{"i":3806,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/ristretto_v1.x.x/redis/","h":"#installation","p":3799},{"i":3808,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/ristretto_v1.x.x/redis/","h":"#examples","p":3799},{"i":3810,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/ristretto_v1.x.x/redis/","h":"#config","p":3799},{"i":3812,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/ristretto_v1.x.x/redis/","h":"#default-config","p":3799},{"i":3814,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/ristretto_v1.x.x/ristretto/","h":"","p":3813},{"i":3816,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#table-of-contents","p":3813},{"i":3818,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#signatures","p":3813},{"i":3820,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#installation","p":3813},{"i":3822,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#examples","p":3813},{"i":3824,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#config","p":3813},{"i":3826,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/ristretto/","h":"#default-config","p":3813},{"i":3828,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/ristretto_v1.x.x/s3/","h":"","p":3827},{"i":3830,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/s3/","h":"#table-of-contents","p":3827},{"i":3832,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/ristretto_v1.x.x/s3/","h":"#signatures","p":3827},{"i":3834,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/ristretto_v1.x.x/s3/","h":"#installation","p":3827},{"i":3836,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/ristretto_v1.x.x/s3/","h":"#examples","p":3827},{"i":3838,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/ristretto_v1.x.x/s3/","h":"#config","p":3827},{"i":3840,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/s3/","h":"#default-config","p":3827},{"i":3842,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"","p":3841},{"i":3844,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#table-of-contents","p":3841},{"i":3846,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#signatures","p":3841},{"i":3848,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#installation","p":3841},{"i":3850,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#examples","p":3841},{"i":3852,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#config","p":3841},{"i":3854,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/ristretto_v1.x.x/sqlite3/","h":"#default-config","p":3841}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3600",[0,2.408,1,1.183,2,1.08,3,1.021,4,4.843,5,2.408,6,0.588,7,2.408,8,1.112,9,2.408,10,1.49,11,2.408,12,2.408,13,2.408,14,3.958,15,2.131,16,2.408,17,2.408,18,2.408,19,2.408,20,1.021,21,2.408,22,4.489,23,2.813,24,2.177,25,3.13,26,1.145,27,1.021,28,1.287,29,1.64,30,2.813,31,1.705,32,0.994,33,2.408,34,2.36,35,1.41,36,2.408,37,2.408,38,2.408,39,2.408,40,1.021,41,1.021,42,1.021,43,0.762,44,2.957,45,1.705,46,1.021,47,0.937,48,2.054,49,2.408,50,2.131,51,2.408,52,2.408,53,1.95,54,1.262]],["t/3602",[55,4.571,56,5.645,57,4.571,58,4.252,59,3.998,60,3.998,61,4.252,62,4.997,63,3.998,64,4.571,65,4.571,66,3.998,67,4.997,68,4.252,69,3.998,70,3.998,71,4.571]],["t/3604",[1,1.131,2,3.761,6,1.589,55,5.272,72,7.823]],["t/3606",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3608",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,82,4.122]],["t/3610",[3,2.17,55,4.143,66,3.623,74,1.45,83,2.112,84,2.112,85,2.23,86,5.116,87,2.733,88,2.23,89,2.17,90,2.23,91,2.17,92,2.17,93,1.45,94,2.17,95,2.23,96,2.23,97,2.23,98,2.23,99,2.23,100,4.529]],["t/3612",[1,1.032,6,1.04,8,1.967,10,1.493,32,2.452,47,0.824,76,0.458,77,0.824,93,1.683,100,3.771,101,2.589,102,1.857,103,1.857,104,1.91,105,1.807,106,4.26,107,1.857,108,4.26,109,1.759,110,3.45,111,1.91,112,3.45,113,1.444,114,2.721,115,1.628,116,1.234,117,1.714,118,1.589,119,1.514]],["t/3614",[8,1.194,10,1.657,20,1.097,23,1.69,26,1.947,28,1.672,34,1.58,43,0.819,44,1.58,47,0.792,76,0.199,77,1.406,109,2.097,110,2.095,111,1.836,112,2.095,113,1.388,114,3.244,115,0.989,116,0.749,117,1.041,118,0.965,119,0.919,120,1.128,121,2.416,122,2.074,123,3.355,124,1.735,125,1.457,126,2.305,127,2.074,128,2.074,129,1.311,130,1.311,131,1.404,132,1.58]],["t/3616",[6,1.283,8,2.427,10,1.41,47,1.017,76,0.405,109,2.171,110,4.256,111,2.357,112,4.256,113,1.782,114,3.357,115,2.009,116,1.523,117,2.114,118,1.96,119,1.868,123,2.427,133,3.96,134,2.292,135,2.292]],["t/3618",[1,1.268,87,2.117,136,5.15,137,5.15,138,5.817,139,5.15,140,5.817,141,5.817,142,4.382,143,5.817,144,5.817,145,4.12,146,5.817,147,5.817]],["t/3620",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3622",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,148,4.122]],["t/3624",[1,0.854,2,2.206,3,2.086,74,1.394,83,2.031,84,2.031,85,2.144,87,2.68,88,2.144,89,2.086,90,2.144,91,2.086,92,2.086,93,1.394,94,2.086,95,2.144,96,2.144,97,2.144,98,2.144,99,2.144,136,5.798,137,5.798,149,4.354]],["t/3626",[1,1.056,6,1.076,10,1.509,23,1.82,32,2.511,45,3.122,76,0.469,77,0.853,83,2.874,93,1.723,101,2.651,102,1.922,103,1.922,104,1.977,105,1.869,107,1.922,149,3.902,150,4.407,151,4.407,152,4.924,153,3.561,154,4.407]],["t/3628",[1,0.782,10,1.555,20,1.24,23,2.268,26,2.142,28,1.459,35,1.712,43,0.925,45,3.891,47,0.871,76,0.225,77,1.289,116,0.847,120,1.275,121,2.142,123,3.077,125,1.646,129,1.481,130,1.481,131,1.587,152,3.647,153,3.614,155,2.637,156,2.923,157,3.647,158,2.876,159,2.202,160,1.867,161,3.647,162,3.647,163,2.367,164,2.367,165,1.867,166,1.867,167,2.367,168,2.367,169,2.367,170,2.367,171,1.785,172,1.961]],["t/3630",[10,1.583,35,3.306,45,3.998,47,1.092,76,0.435,116,1.635,134,2.461,135,2.461,152,4.571,155,3.306,159,4.252,171,3.447,172,3.786]],["t/3632",[6,1.616,14,4.044,23,2.735,122,3.356,173,5.363,174,5.864,175,6.623]],["t/3634",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3636",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3638",[3,2.199,57,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,177,4.59]],["t/3640",[1,1.082,6,1.114,10,1.525,32,2.572,47,0.883,76,0.48,77,0.883,93,1.765,101,2.716,102,1.99,103,1.99,104,2.047,105,1.936,107,1.99,113,1.548,116,1.322,117,1.836,118,1.703,119,1.622,177,4.042,178,4.565,179,4.565,180,3.697]],["t/3642",[6,1.086,10,1.63,20,1.221,23,1.838,24,1.621,26,2.117,28,0.765,31,2.039,34,1.758,43,0.911,44,1.758,47,0.861,57,3.604,76,0.222,77,1.411,113,1.509,116,1.289,117,1.158,118,1.074,119,1.023,120,1.255,121,1.37,123,3.368,129,1.459,130,2.255,131,1.563,132,1.758,180,2.332,181,1.291,182,3.94,183,2.879,184,2.879,185,2.879,186,5.419,187,2.879,188,3.94,189,2.039]],["t/3644",[10,1.439,24,3.088,47,1.061,76,0.423,113,1.858,116,2.037,117,2.205,118,2.045,119,1.948,134,2.39,135,2.39,180,4.44,182,4.854,186,4.854,188,4.854,190,5.483]],["t/3646",[1,0.803,2,2.072,6,1.128,15,4.091,32,1.908,58,3.481,61,3.481,66,3.273,68,3.481,87,1.682,113,2.129,126,2.602,145,3.273,173,3.742,191,4.621,192,4.621,193,4.621,194,4.621,195,4.621,196,4.621,197,4.621,198,4.621,199,7.134,200,4.621,201,4.621,202,4.621,203,3.742,204,4.621,205,4.621]],["t/3648",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3650",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,206,4.122]],["t/3652",[3,2.199,58,3.906,70,3.673,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,207,4.59]],["t/3654",[1,1.1,6,1.141,10,1.49,32,2.615,47,0.905,76,0.488,77,0.905,93,1.795,101,2.761,102,2.039,103,2.039,104,2.098,105,1.984,107,2.039,113,1.585,116,1.355,207,4.141,208,4.677,209,4.677,210,4.677,211,3.566]],["t/3656",[1,0.516,10,1.629,20,1.259,23,1.226,26,2.168,28,1.211,43,0.94,47,0.881,53,2.404,58,2.237,76,0.428,77,1.298,113,1.88,115,1.135,116,1.32,119,1.055,120,1.294,121,1.412,123,3.098,129,1.504,130,2.309,131,1.611,158,2.911,189,2.103,211,3.123,212,2.237,213,2.628,214,2.628,215,2.969,216,2.969,217,2.628,218,2.969,219,2.628,220,2.969,221,2.969,222,2.628,223,2.628,224,2.404,225,2.628]],["t/3658",[10,1.501,47,1.031,76,0.532,77,1.031,113,1.807,115,2.037,116,2,119,1.894,134,2.324,135,3.01,158,3.404,211,3.001,213,4.718,222,4.718,225,4.718]],["t/3660",[1,1.192,2,3.077,6,1.674,59,4.86,226,6.861]],["t/3662",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3664",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,227,4.122]],["t/3666",[3,2.199,59,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,228,4.59]],["t/3668",[1,1.174,6,1.017,10,1.522,32,2.415,35,2.44,59,2.952,76,0.451,77,0.806,93,1.657,101,2.549,102,1.817,103,1.817,104,1.869,105,1.768,107,1.817,109,1.721,119,2.078,127,2.112,128,2.112,171,2.544,211,2.347,228,3.689,229,4.167,230,4.167,231,3.689,232,3.374,233,3.374,234,2.661]],["t/3670",[10,1.52,20,1.626,28,1.985,43,1.744,54,3.916,59,5.293,76,0.296,109,1.583,120,1.671,121,1.823,127,2.792,128,2.792,158,3.519,211,3.103,232,3.104,233,3.104,235,5.51,236,6.616,237,3.833,238,3.393]],["t/3672",[10,1.529,76,0.514,77,0.976,109,2.085,115,1.93,119,2.368,127,2.558,128,2.558,134,2.201,135,2.905,171,3.082,211,2.843,231,4.469,232,4.088,233,4.088,234,3.224,239,5.048,240,5.048]],["t/3674",[1,0.803,2,2.072,6,1.741,10,0.856,22,5.085,60,3.273,76,0.55,87,1.682,133,4.731,142,3.481,153,4.688,241,4.091,242,4.091,243,4.091,244,3.742,245,3.742,246,4.091,247,4.091,248,3.742,249,4.091,250,4.091,251,4.091]],["t/3676",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3678",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,252,4.122]],["t/3680",[3,2.199,60,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,253,4.59]],["t/3682",[1,1.244,6,1.378,10,1.458,32,2.331,60,3.998,93,1.6,101,3.123,102,2.461,103,2.461,104,2.531,105,2.394,253,4.997,254,5.645]],["t/3684",[6,0.491,10,1.55,14,2.039,20,0.854,23,1.13,25,1.63,26,2.036,28,1.022,30,0.831,31,1.425,45,1.425,47,0.389,50,0.993,60,3.528,75,0.831,76,0.155,77,1.069,83,0.463,84,0.463,91,0.476,92,0.476,105,1.974,107,0.489,115,0.429,116,0.583,120,0.877,121,0.533,123,2.433,125,0.631,129,0.568,130,1.02,131,0.609,132,0.685,145,1.425,153,2.252,155,1.179,157,0.908,158,0.716,160,0.716,161,1.63,162,1.63,163,0.908,164,0.908,165,0.716,166,0.716,167,0.908,168,0.908,169,0.908,170,0.908,171,0.685,172,0.752,181,2.83,203,0.908,211,0.631,217,0.993,223,1.782,244,1.63,245,1.63,255,1.516,256,2.012,257,1.121,258,1.121,259,1.121,260,1.121,261,1.121,262,1.121,263,1.121,264,1.121,265,1.121,266,1.121,267,1.121,268,2.738,269,2.012,270,1.121,271,1.121,272,3.846,273,1.121,274,2.424,275,3.339,276,3.846,277,1.782,278,2.012,279,2.012,280,2.012,281,2.012,282,2.012,283,2.012,284,2.012,285,2.012,286,2.012,287,3.339,288,3.339,289,2.012,290,2.012,291,2.012,292,2.012,293,2.012,294,2.012,295,2.012,296,1.782,297,0.993,298,2.424,299,1.782,300,1.121,301,1.121,302,2.012,303,1.782,304,1.121,305,0.845,306,1.121,307,1.121,308,1.121,309,1.121,310,0.993,311,1.121,312,1.121,313,1.121,314,0.993,315,0.993]],["t/3686",[10,1.303,47,1.061,76,0.423,115,2.096,116,1.588,134,2.39,135,2.39,153,4.118,171,3.348,172,3.678,181,2.459,274,4.854,277,6.225,297,4.854,298,4.854,316,5.483]],["t/3688",[1,1.171,2,3.023,6,1.645,61,6.017,317,6.74]],["t/3690",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3692",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,318,4.122]],["t/3694",[3,2.199,61,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,319,4.59]],["t/3696",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,155,2.88,319,4.354,320,4.918,321,4.918,322,4.354]],["t/3698",[10,1.532,20,1.807,28,1.816,43,1.348,54,2.232,76,0.328,120,1.857,127,3.464,128,3.464,153,2.495,155,3.478,158,2.721,305,3.209,323,3.45,324,3.017,325,5.257,326,4.26,327,4.26,328,4.206,329,4.474,330,4.26,331,4.26,332,3.45]],["t/3700",[10,1.583,24,3.179,76,0.435,84,2.331,119,2.006,127,2.86,128,2.86,134,2.461,135,2.461,155,3.306,322,4.997,325,4.997,329,4.252]],["t/3702",[1,1.192,2,3.077,6,1.674,62,6.074,333,6.861]],["t/3704",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3706",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,334,4.122]],["t/3708",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3710",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,126,2.77,336,4.918,337,4.918,338,4.918,339,4.918]],["t/3712",[10,1.622,20,1.891,23,1.841,26,2.916,28,1.185,47,1.186,76,0.344,77,1.186,116,1.292,120,1.944,123,2.83,126,3.451,129,2.259,130,2.259,181,2,323,3.611,340,4.459,341,4.459,342,4.459,343,4.459,344,3.947]],["t/3714",[10,1.465,76,0.511,126,3.73,134,2.888,135,2.888,344,5.864]],["t/3716",[1,1.236,2,3.192,63,5.041]],["t/3718",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3720",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,345,4.122]],["t/3722",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3724",[1,1.119,6,1.17,10,1.547,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,117,1.929,118,1.788,119,1.704,335,3.883,346,4.795,347,4.795]],["t/3726",[10,1.606,20,2.326,23,2.264,34,3.348,43,1.735,44,3.348,76,0.423,77,1.061,117,2.205,118,2.045,119,1.948,120,2.39,131,2.976,132,3.348]],["t/3728",[10,1.543,76,0.494,117,2.575,118,2.387,119,2.274,134,2.791,135,2.791]],["t/3730",[1,1.151,2,3.545,6,1.616,64,5.363,87,2.411,348,6.623]],["t/3732",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3734",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,349,4.122]],["t/3736",[3,2.199,64,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,350,4.59]],["t/3738",[1,0.924,6,1.298,8,2.455,10,1.5,28,0.97,32,2.591,47,1.029,54,1.912,76,0.484,77,0.706,93,1.778,101,2.319,102,1.591,103,1.591,104,1.637,105,1.548,107,2.319,109,1.507,111,1.637,113,1.803,114,3.397,115,2.033,116,1.541,350,3.231,351,3.65,352,5.318,353,1.791,354,2.955,355,1.981,356,3.65]],["t/3740",[6,0.994,8,1.186,10,1.656,14,1.569,20,1.09,23,1.061,26,1.937,28,1.857,47,0.788,54,1.346,76,0.198,77,1.402,109,2.088,111,1.826,113,1.38,114,2.6,115,0.982,116,0.744,120,1.12,121,2.406,122,2.562,123,3.347,124,1.724,125,1.447,126,2.293,127,2.063,128,2.063,129,1.302,130,1.302,160,1.641,181,1.152,328,1.82,353,1.261,354,2.081,355,1.395]],["t/3742",[8,2.606,10,1.458,47,1.092,76,0.435,109,2.331,111,2.531,113,1.913,114,3.605,115,2.158,116,1.635,134,2.461,135,2.461,353,2.77,354,4.571,355,3.063]],["t/3744",[1,1.171,2,3.023,6,1.645,65,5.458,357,6.74,358,6.74]],["t/3746",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3748",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3750",[3,2.199,65,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,360,4.59]],["t/3752",[1,0.887,6,1.246,8,1.594,10,1.534,28,0.917,32,2.509,47,0.988,54,1.809,76,0.468,77,0.668,93,1.722,101,2.226,102,1.505,103,1.505,104,1.548,105,1.464,107,2.226,109,1.425,111,1.548,113,1.17,115,1.32,116,1.479,117,2.054,118,1.904,119,1.814,181,1.548,353,1.694,355,1.873,360,3.056,361,3.452,362,5.105,363,2.795,364,2.445,365,2.445,366,3.452]],["t/3754",[1,0.35,6,0.815,8,0.93,10,1.66,14,1.23,20,0.854,23,1.38,26,1.59,28,1.821,34,1.23,43,0.637,44,1.23,47,0.646,54,1.751,76,0.33,77,1.403,109,1.768,111,1.498,113,1.133,115,0.77,116,0.583,117,0.81,118,0.751,119,0.716,120,0.878,121,2.371,122,2.17,123,3.348,124,1.351,125,1.134,126,1.882,127,1.693,128,1.693,129,1.021,130,1.021,131,1.093,132,1.23,160,1.286,181,1.92,189,1.427,224,1.631,248,2.706,328,1.427,353,0.988,355,1.093,363,1.631,364,1.427,365,1.427,367,1.783]],["t/3756",[8,2.394,10,1.486,47,1.003,76,0.4,109,2.141,111,2.325,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,1.842,134,2.261,135,2.261,181,2.325,353,2.544,355,2.814,363,4.199,364,3.673,365,3.673]],["t/3758",[1,1.131,2,2.92,6,1.589,66,4.611,87,2.369,368,6.51,369,5.764,370,6.51]],["t/3760",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3762",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3764",[3,2.199,66,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,371,4.59]],["t/3766",[1,0.769,6,1.322,8,1.319,10,1.563,28,0.759,32,2.518,47,1.047,54,2.319,76,0.47,77,0.553,93,1.728,101,1.929,102,1.246,103,1.246,104,1.282,105,1.212,107,2.361,109,1.18,111,1.282,113,0.969,115,1.092,116,1.569,117,2.178,118,2.019,119,1.924,122,3.09,181,1.282,353,1.402,355,1.551,369,2.53,371,2.53,372,2.858,373,5.415,374,2.314,375,4.425,376,2.858,377,2.858]],["t/3768",[6,1.094,8,0.993,10,1.653,14,2.153,20,0.912,23,1.456,24,1.211,26,1.678,28,1.726,34,1.313,43,0.681,44,1.313,47,0.682,54,1.127,76,0.166,77,1.398,109,1.851,111,1.581,113,1.195,115,0.822,116,0.623,117,0.865,118,0.802,119,0.764,120,0.937,121,2.133,122,2.901,123,3.337,124,1.442,125,1.211,126,1.986,127,1.787,128,1.787,129,1.09,130,1.09,131,1.167,132,1.313,160,2.252,181,2.01,328,2.498,353,1.055,355,1.914,359,1.62,374,1.741]],["t/3770",[8,2.461,10,1.501,47,1.031,76,0.411,109,2.201,111,2.39,113,1.807,115,2.037,116,1.544,117,2.144,118,1.988,119,1.894,134,2.324,135,2.324,181,2.39,353,2.615,355,2.893,374,4.316]],["t/3772",[6,1.645,14,4.115,23,2.783,122,3.415,173,5.458,378,6.74]],["t/3774",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3776",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3778",[3,2.034,26,2.281,67,5.7,74,1.359,83,1.98,84,1.98,85,2.09,87,2.646,88,2.09,89,2.034,90,2.807,91,2.034,92,2.034,93,1.359,94,2.034,95,2.09,96,2.09,97,2.09,98,2.09,99,2.09,142,3.612,145,3.396,203,3.883,379,4.795,380,4.245]],["t/3780",[1,1.119,6,1.17,10,1.503,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,122,2.43,212,3.612,380,4.245,381,4.795,382,4.795,383,3.883,384,3.883]],["t/3782",[10,1.607,20,2.034,24,2.7,28,1.274,76,0.37,77,1.245,113,1.625,120,2.09,121,2.281,122,2.43,123,3.356,212,3.612,238,4.245,310,5.7,383,3.883,384,3.883,385,4.795,386,4.795]],["t/3784",[10,1.435,76,0.494,122,3.244,134,2.791,135,2.791,212,4.823,383,5.184,384,5.184]],["t/3786",[1,1.192,2,3.077,6,1.674,68,5.169,387,6.861]],["t/3788",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3790",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,388,3.649]],["t/3792",[3,2.199,68,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,389,4.59]],["t/3794",[1,1.065,6,1.088,10,1.514,32,2.531,47,0.862,76,0.473,77,0.862,93,1.737,101,2.672,102,1.944,103,1.944,104,2,105,1.891,107,1.944,115,1.705,116,1.292,117,1.794,118,1.663,119,1.584,122,2.259,181,2,389,3.947,390,4.459,391,4.459,392,4.459]],["t/3796",[1,0.339,6,0.795,8,0.901,10,1.65,14,1.192,20,0.828,23,1.345,24,1.099,26,1.549,28,1.733,34,1.192,43,0.618,44,1.192,47,0.63,54,2.561,76,0.323,77,1.388,109,1.729,111,1.46,113,1.104,115,0.746,116,0.566,117,0.785,118,0.728,119,0.694,120,0.851,121,1.992,122,2.753,123,3.313,124,1.31,125,1.099,126,1.834,127,1.65,128,1.65,129,0.989,130,0.989,131,1.06,132,1.192,133,1.471,139,1.728,160,2.08,181,1.878,189,1.383,224,1.581,328,1.383,353,0.958,355,1.06,364,1.383,365,1.383,367,1.728,388,2.883,393,1.952,394,1.728]],["t/3798",[8,2.271,10,1.515,47,0.951,76,0.505,77,0.951,109,2.031,111,2.206,113,1.667,115,1.88,116,1.425,117,1.978,118,1.834,119,1.747,134,2.144,135,2.855,181,2.206,353,2.413,355,2.669,364,3.483,365,3.483,394,4.354]],["t/3800",[1,1.171,2,3.023,6,1.645,69,4.774,87,2.453,395,6.74]],["t/3802",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3804",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,396,4.122]],["t/3806",[3,2.199,69,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,397,4.59]],["t/3808",[1,0.627,6,0.54,10,1.605,24,2.033,25,1.792,32,2.575,35,1.296,47,0.884,69,3.737,76,0.278,77,0.428,89,0.938,93,1.495,94,0.938,101,1.574,102,0.965,103,0.965,105,1.94,107,0.965,109,0.914,111,0.992,113,0.75,116,1.325,118,0.825,121,1.052,123,1.021,127,1.121,128,1.121,236,1.959,299,1.959,305,3.975,324,3.239,329,1.667,332,1.792,353,1.086,397,1.959,398,2.212,399,5.813,400,1.792,401,2.923,402,1.792,403,1.959,404,2.212,405,1.792,406,2.212,407,2.923,408,3.61,409,2.212,410,2.212,411,3.61,412,2.212,413,2.212,414,2.212,415,3.61,416,2.212,417,2.212,418,2.212,419,2.212,420,2.212,421,3.61,422,2.212]],["t/3810",[6,0.381,10,1.649,20,0.662,23,0.645,24,0.879,26,1.281,28,1.704,31,1.908,35,0.914,47,0.521,54,1.861,69,1.106,75,0.645,76,0.274,77,1.377,81,0.662,109,1.745,111,1.593,113,1.204,114,0.997,116,0.452,118,0.582,120,0.681,121,1.281,122,1.365,123,3.347,124,1.047,125,2,126,2,127,1.8,128,1.8,129,0.791,130,0.791,165,0.997,166,0.997,219,1.382,305,1.176,323,1.264,324,2.516,329,2.029,332,1.264,353,0.766,400,1.264,401,1.264,402,1.264,405,2.181,407,1.264,423,1.561,424,1.561,425,1.561,426,1.561,427,1.561,428,1.561,429,2.694,430,1.561,431,1.561,432,1.561,433,1.561,434,1.561,435,1.561,436,1.561,437,3.145,438,1.561,439,1.561,440,1.561,441,1.561,442,2.385,443,2.385,444,1.561,445,1.561,446,1.264,447,1.561,448,1.561,449,1.561]],["t/3812",[10,1.622,24,2.511,28,1.185,35,2.611,47,0.862,76,0.344,109,1.841,111,2,113,1.511,116,1.292,118,1.663,127,2.259,128,2.259,134,1.944,135,1.944,324,3.158,353,2.188,400,3.611,401,3.611,402,3.611,403,3.947,405,3.611,407,3.611,437,3.947,442,3.947,443,3.947]],["t/3814",[1,1.151,2,2.97,6,1.616,63,4.691,174,5.864,450,6.623,451,6.623]],["t/3816",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3818",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,452,4.122]],["t/3820",[3,2.199,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,453,6.782,454,4.59]],["t/3822",[1,0.957,6,0.935,10,1.548,23,2.275,32,2.275,76,0.425,77,0.741,93,1.562,101,2.402,102,1.671,103,1.671,104,1.719,105,1.626,107,1.671,165,2.448,166,3.519,234,2.448,446,3.104,454,3.393,455,3.833,456,3.833,457,3.104,458,3.393,459,3.393,460,3.393,461,3.393,462,3.104,463,3.393,464,3.393,465,3.393,466,3.393,467,3.104,468,3.393,469,3.393]],["t/3824",[10,1.496,20,2.009,23,2.637,76,0.365,120,2.064,165,3.024,166,4.078,296,6.396,446,3.834,457,5.17,459,4.192,460,4.192,461,4.192,462,5.17,464,4.192,465,4.192,466,4.192,467,5.17,469,4.192]],["t/3826",[10,1.479,76,0.449,134,2.536,135,2.536,234,4.662,457,4.71,458,5.15,462,4.71,463,5.15,467,4.71,468,5.15,470,5.817]],["t/3828",[1,0.813,2,2.098,6,1.752,22,5.128,70,3.313,76,0.554,87,1.702,133,4.77,142,3.524,153,4.708,241,4.141,242,4.141,243,4.141,244,3.787,245,3.787,246,4.141,247,4.141,248,3.787,249,4.141,250,4.141,251,4.141]],["t/3830",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3832",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,471,4.122]],["t/3834",[3,2.199,70,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,472,4.59]],["t/3836",[1,1.073,6,1.101,10,1.471,32,2.551,47,0.873,76,0.476,77,0.873,93,1.751,101,2.694,102,1.967,103,1.967,104,2.023,105,1.914,107,1.967,116,1.307,155,3.618,211,3.479,255,4.655,324,3.196,472,3.994,473,4.511,474,4.511]],["t/3838",[1,0.459,10,1.599,20,1.765,23,2.126,26,1.979,28,1.688,35,1.546,43,0.836,47,0.805,70,1.87,76,0.397,77,1.13,116,0.765,120,1.814,121,1.256,123,2.696,125,1.487,129,1.338,130,1.338,131,1.433,153,3.721,155,2.436,157,3.369,158,2.657,159,1.989,160,1.686,161,4.73,162,3.369,163,2.138,164,2.138,165,1.686,166,1.686,167,2.138,168,2.138,169,2.138,170,2.138,171,1.612,172,1.771,189,1.87,211,2.899,255,3.134,314,2.338,315,2.338]],["t/3840",[10,1.536,35,2.739,47,0.905,76,0.488,77,1.225,116,1.355,134,2.039,135,2.761,145,3.313,153,3.708,155,3.708,159,3.524,171,2.856,172,3.137,211,3.566,255,4.77,475,4.677,476,4.677,477,4.677]],["t/3842",[1,1.171,2,3.023,6,1.645,71,6.468,478,6.74]],["t/3844",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3846",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/3848",[3,2.199,71,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,479,4.59]],["t/3850",[1,1.001,6,0.995,10,1.513,32,2.378,47,0.789,76,0.444,77,0.789,93,1.632,101,2.511,102,1.778,103,1.778,104,1.829,105,1.73,107,1.778,113,1.382,115,1.559,116,1.181,117,1.64,118,1.521,119,2.046,181,1.829,234,2.605,479,3.61,480,4.078,481,4.078,482,3.61,483,3.302,484,4.664,485,3.302,486,3.302]],["t/3852",[8,1.091,10,1.644,20,1.002,23,1.572,26,1.811,28,1.012,31,3.387,34,1.443,43,1.205,44,1.443,47,0.737,53,1.913,54,2.874,76,0.294,77,1.308,113,1.621,115,0.903,116,0.684,117,0.95,118,0.881,119,0.84,120,1.03,121,1.811,123,3.247,125,2.144,129,1.197,130,1.197,131,2.066,132,1.443,165,3.054,166,2.432,181,2.145,214,2.092,234,1.509,303,2.092,483,3.083,484,3.083,485,3.083,486,3.083,487,2.363,488,2.363,489,2.363,490,2.363,491,2.363]],["t/3854",[10,1.486,47,1.003,76,0.4,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,2.41,134,2.261,135,2.261,181,2.325,234,3.312,482,4.59,483,4.199,484,5.492,485,4.199,486,4.199]]],"invertedIndex":[["",{"_index":10,"t":{"3600":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"3612":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"3614":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"3616":{"position":[[48,1],[173,1],[188,1]]},"3626":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"3628":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"3630":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"3640":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"3642":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"3644":{"position":[[18,1],[85,1],[203,1]]},"3654":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"3656":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"3658":{"position":[[0,2],[57,1],[126,1],[172,1]]},"3668":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"3670":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"3672":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"3674":{"position":[[302,4]]},"3682":{"position":[[134,2],[163,2],[196,2]]},"3684":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"3686":{"position":[[18,1],[193,1]]},"3696":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"3698":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"3700":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"3710":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"3712":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"3714":{"position":[[18,1],[56,1]]},"3724":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"3726":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"3728":{"position":[[18,1],[43,1],[58,1]]},"3738":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"3740":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"3742":{"position":[[18,1],[43,3],[141,1]]},"3752":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"3754":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"3756":{"position":[[18,1],[43,3],[150,1],[185,1]]},"3766":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"3768":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"3770":{"position":[[18,1],[43,3],[150,1],[165,1]]},"3780":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"3782":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"3784":{"position":[[18,1],[78,1]]},"3794":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"3796":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"3798":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"3808":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"3810":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"3812":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]},"3822":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"3824":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"3826":{"position":[[18,1],[57,2],[97,1]]},"3836":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"3838":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"3840":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"3850":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"3852":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"3854":{"position":[[18,1],[110,1],[182,1],[197,1]]}}}],["0",{"_index":35,"t":{"3600":{"position":[[492,1]]},"3628":{"position":[[251,1]]},"3630":{"position":[[86,2]]},"3668":{"position":[[341,2]]},"3808":{"position":[[325,2]]},"3810":{"position":[[402,1]]},"3812":{"position":[[106,2]]},"3838":{"position":[[201,1]]},"3840":{"position":[[274,2]]}}}],["1",{"_index":234,"t":{"3668":{"position":[[390,2]]},"3672":{"position":[[202,1]]},"3822":{"position":[[332,1]]},"3826":{"position":[[55,1],[94,2]]},"3850":{"position":[[402,1]]},"3852":{"position":[[839,1]]},"3854":{"position":[[180,1]]}}}],["1.14/1.15",{"_index":86,"t":{"3610":{"position":[[33,11]]}}}],["1.18",{"_index":143,"t":{"3618":{"position":[[82,4]]}}}],["10",{"_index":118,"t":{"3612":{"position":[[366,2]]},"3614":{"position":[[636,2]]},"3616":{"position":[[170,2]]},"3640":{"position":[[300,2]]},"3642":{"position":[[258,2]]},"3644":{"position":[[82,2]]},"3724":{"position":[[258,2]]},"3726":{"position":[[75,2]]},"3728":{"position":[[40,2]]},"3752":{"position":[[342,2],[567,2]]},"3754":{"position":[[860,2]]},"3756":{"position":[[147,2]]},"3766":{"position":[[342,2],[535,2],[749,2]]},"3768":{"position":[[875,2]]},"3770":{"position":[[147,2]]},"3794":{"position":[[319,2]]},"3796":{"position":[[1015,2]]},"3798":{"position":[[206,2]]},"3808":{"position":[[368,2]]},"3810":{"position":[[1456,2]]},"3812":{"position":[[149,2]]},"3850":{"position":[[329,2]]},"3852":{"position":[[319,2]]},"3854":{"position":[[107,2]]}}}],["100",{"_index":484,"t":{"3850":{"position":[[361,4],[380,4]]},"3852":{"position":[[585,4],[711,4]]},"3854":{"position":[[139,4],[158,4]]}}}],["10m",{"_index":461,"t":{"3822":{"position":[[316,6]]},"3824":{"position":[[73,6]]}}}],["123456",{"_index":240,"t":{"3672":{"position":[[120,9]]}}}],["127.0.0.1",{"_index":353,"t":{"3738":{"position":[[256,12]]},"3740":{"position":[[225,11]]},"3742":{"position":[[53,12]]},"3752":{"position":[[248,12]]},"3754":{"position":[[267,11]]},"3756":{"position":[[53,12]]},"3766":{"position":[[248,12]]},"3768":{"position":[[345,11]]},"3770":{"position":[[53,12]]},"3796":{"position":[[398,11]]},"3798":{"position":[[92,12]]},"3808":{"position":[[262,12]]},"3810":{"position":[[84,11]]},"3812":{"position":[[34,12]]}}}],["127.0.0.1:11211",{"_index":344,"t":{"3712":{"position":[[113,17]]},"3714":{"position":[[37,18]]}}}],["127.0.0.1:8091",{"_index":231,"t":{"3668":{"position":[[287,17]]},"3672":{"position":[[73,17]]}}}],["1433",{"_index":363,"t":{"3752":{"position":[[267,5]]},"3754":{"position":[[355,4]]},"3756":{"position":[[72,5]]}}}],["15",{"_index":302,"t":{"3684":{"position":[[2668,2],[2722,2]]}}}],["1e7",{"_index":458,"t":{"3822":{"position":[[271,4]]},"3826":{"position":[[41,4]]}}}],["1gb",{"_index":466,"t":{"3822":{"position":[[366,6]]},"3824":{"position":[[131,6]]}}}],["2",{"_index":84,"t":{"3610":{"position":[[26,1]]},"3624":{"position":[[43,1]]},"3638":{"position":[[24,1]]},"3652":{"position":[[23,1]]},"3666":{"position":[[27,1]]},"3680":{"position":[[26,1]]},"3684":{"position":[[175,3]]},"3694":{"position":[[22,1]]},"3700":{"position":[[80,1]]},"3708":{"position":[[24,1]]},"3722":{"position":[[24,1]]},"3736":{"position":[[25,1]]},"3750":{"position":[[23,1]]},"3764":{"position":[[23,1]]},"3778":{"position":[[24,1]]},"3792":{"position":[[26,1]]},"3806":{"position":[[23,1]]},"3820":{"position":[[27,1]]},"3834":{"position":[[20,1]]},"3848":{"position":[[25,1]]}}}],["25",{"_index":281,"t":{"3684":{"position":[[1341,2],[2037,2]]}}}],["27017",{"_index":354,"t":{"3738":{"position":[[275,6]]},"3740":{"position":[[313,5]]},"3742":{"position":[[72,6]]}}}],["3",{"_index":171,"t":{"3628":{"position":[[658,1]]},"3630":{"position":[[116,2]]},"3668":{"position":[[363,2]]},"3672":{"position":[[174,1]]},"3684":{"position":[[1010,1]]},"3686":{"position":[[93,2]]},"3838":{"position":[[613,1]]},"3840":{"position":[[255,2]]}}}],["30",{"_index":463,"t":{"3822":{"position":[[337,3]]},"3826":{"position":[[60,3]]}}}],["3306",{"_index":374,"t":{"3766":{"position":[[267,5]]},"3768":{"position":[[433,4]]},"3770":{"position":[[72,5]]}}}],["5",{"_index":277,"t":{"3684":{"position":[[1246,2],[1942,2]]},"3686":{"position":[[129,2],[152,2]]}}}],["5432",{"_index":394,"t":{"3796":{"position":[[486,4]]},"3798":{"position":[[111,5]]}}}],["60",{"_index":222,"t":{"3656":{"position":[[342,2]]},"3658":{"position":[[123,2]]}}}],["6379",{"_index":400,"t":{"3808":{"position":[[281,5]]},"3810":{"position":[[172,4]]},"3812":{"position":[[53,5]]}}}],["6380",{"_index":409,"t":{"3808":{"position":[[617,9]]}}}],["64",{"_index":468,"t":{"3822":{"position":[[386,3]]},"3826":{"position":[[77,3]]}}}],["8529",{"_index":112,"t":{"3612":{"position":[[286,5]]},"3614":{"position":[[179,4]]},"3616":{"position":[[90,5]]}}}],["_",{"_index":376,"t":{"3766":{"position":[[612,1]]}}}],["access",{"_index":162,"t":{"3628":{"position":[[422,6],[448,6]]},"3684":{"position":[[768,6],[794,6]]},"3838":{"position":[[371,6],[397,6]]}}}],["accesskey",{"_index":314,"t":{"3684":{"position":[[3096,9]]},"3838":{"position":[[659,9]]}}}],["account",{"_index":152,"t":{"3626":{"position":[[258,8],[320,8]]},"3628":{"position":[[32,7],[46,7]]},"3630":{"position":[[28,8]]}}}],["adaptor",{"_index":487,"t":{"3852":{"position":[[402,7]]}}}],["addr",{"_index":407,"t":{"3808":{"position":[[495,6],[592,6]]},"3810":{"position":[[794,5]]},"3812":{"position":[[177,6]]}}}],["address",{"_index":429,"t":{"3810":{"position":[[663,7],[699,10]]}}}],["admin",{"_index":239,"t":{"3672":{"position":[[101,8]]}}}],["allow",{"_index":265,"t":{"3684":{"position":[[415,6]]}}}],["along",{"_index":33,"t":{"3600":{"position":[[457,5]]}}}],["amount",{"_index":214,"t":{"3656":{"position":[[230,6]]},"3852":{"position":[[769,6]]}}}],["applic",{"_index":235,"t":{"3670":{"position":[[28,11],[108,11]]}}}],["arangodb",{"_index":55,"t":{"3602":{"position":[[0,8]]},"3604":{"position":[[2,8]]},"3610":{"position":[[0,8]]}}}],["arangodb.new",{"_index":106,"t":{"3612":{"position":[[172,14]]}}}],["arangodb.new(arangodb.config",{"_index":108,"t":{"3612":{"position":[[224,29]]}}}],["arangodb/go",{"_index":72,"t":{"3604":{"position":[[32,11],[55,11]]}}}],["attempt",{"_index":170,"t":{"3628":{"position":[[623,10]]},"3684":{"position":[[972,10]]},"3838":{"position":[[575,10]]}}}],["authent",{"_index":328,"t":{"3698":{"position":[[197,15],[259,15]]},"3740":{"position":[[81,14]]},"3754":{"position":[[123,14]]},"3768":{"position":[[69,14],[201,14]]},"3796":{"position":[[254,14]]}}}],["avail",{"_index":219,"t":{"3656":{"position":[[284,9]]},"3810":{"position":[[1481,9]]}}}],["aw",{"_index":161,"t":{"3628":{"position":[[418,3],[437,3]]},"3684":{"position":[[764,3],[783,3]]},"3838":{"position":[[98,3],[130,3],[367,3],[386,3]]}}}],["aws.bool(tru",{"_index":316,"t":{"3686":{"position":[[177,15]]}}}],["aws/aw",{"_index":241,"t":{"3674":{"position":[[32,7]]},"3828":{"position":[[26,7]]}}}],["aws/credenti",{"_index":246,"t":{"3674":{"position":[[154,19]]},"3828":{"position":[[148,19]]}}}],["aws_region",{"_index":263,"t":{"3684":{"position":[[283,13]]}}}],["awsdynamodb.cli",{"_index":252,"t":{"3678":{"position":[[285,19]]}}}],["azblob.cli",{"_index":148,"t":{"3622":{"position":[[288,14]]}}}],["azur",{"_index":136,"t":{"3618":{"position":[[0,5]]},"3624":{"position":[[0,5],[210,5]]}}}],["azureblob",{"_index":56,"t":{"3602":{"position":[[9,9]]}}}],["azureblob.new",{"_index":150,"t":{"3626":{"position":[[173,15]]}}}],["azureblob.new(azureblob.config",{"_index":151,"t":{"3626":{"position":[[226,31]]}}}],["badger",{"_index":57,"t":{"3602":{"position":[[19,6]]},"3638":{"position":[[0,6],[191,6]]},"3642":{"position":[[344,6],[487,6]]}}}],["badger.db",{"_index":176,"t":{"3636":{"position":[[288,10]]},"3776":{"position":[[288,10]]}}}],["badger.defaultoptions(\"./fiber.badg",{"_index":184,"t":{"3642":{"position":[[378,39]]}}}],["badger.defaultoptions(\"./fiber.badger\").withlogger(nil",{"_index":190,"t":{"3644":{"position":[[115,56]]}}}],["badger.logg",{"_index":187,"t":{"3642":{"position":[[532,13]]}}}],["badger.new",{"_index":178,"t":{"3640":{"position":[[170,12]]}}}],["badger.new(badger.config",{"_index":179,"t":{"3640":{"position":[[220,25]]}}}],["badger.opt",{"_index":185,"t":{"3642":{"position":[[432,14]]}}}],["badgeropt",{"_index":182,"t":{"3642":{"position":[[303,13],[418,13]]},"3644":{"position":[[100,14]]}}}],["bbolt",{"_index":58,"t":{"3602":{"position":[[26,5]]},"3646":{"position":[[2,5]]},"3652":{"position":[[0,5]]},"3656":{"position":[[137,5]]}}}],["bbolt.db",{"_index":206,"t":{"3650":{"position":[[288,9]]}}}],["bbolt.new",{"_index":208,"t":{"3654":{"position":[[169,11]]}}}],["bbolt.new(bbolt.config",{"_index":209,"t":{"3654":{"position":[[218,23]]}}}],["befor",{"_index":132,"t":{"3614":{"position":[[580,6]]},"3642":{"position":[[202,6]]},"3684":{"position":[[2921,6]]},"3726":{"position":[[29,6]]},"3754":{"position":[[804,6]]},"3768":{"position":[[819,6]]},"3796":{"position":[[959,6]]},"3852":{"position":[[263,6]]}}}],["blob",{"_index":137,"t":{"3618":{"position":[[6,4]]},"3624":{"position":[[6,4],[216,4]]}}}],["block",{"_index":300,"t":{"3684":{"position":[[2616,5]]}}}],["bolt",{"_index":192,"t":{"3646":{"position":[[44,4]]}}}],["bool",{"_index":130,"t":{"3614":{"position":[[567,4]]},"3628":{"position":[[388,4]]},"3642":{"position":[[189,4],[636,4]]},"3656":{"position":[[460,4],[557,4]]},"3684":{"position":[[1120,4],[3062,5]]},"3712":{"position":[[237,4]]},"3740":{"position":[[697,4]]},"3754":{"position":[[791,4]]},"3768":{"position":[[806,4]]},"3796":{"position":[[946,4]]},"3810":{"position":[[1275,4]]},"3838":{"position":[[337,4]]},"3852":{"position":[[250,4]]}}}],["bound",{"_index":450,"t":{"3814":{"position":[[9,5]]}}}],["bradfitz/gomemcach",{"_index":333,"t":{"3702":{"position":[[32,20]]}}}],["bucket",{"_index":211,"t":{"3654":{"position":[[270,7],[282,8]]},"3656":{"position":[[143,6],[198,6],[511,6]]},"3658":{"position":[[89,7]]},"3668":{"position":[[333,7]]},"3670":{"position":[[263,6],[284,6]]},"3672":{"position":[[130,7]]},"3684":{"position":[[1074,6]]},"3836":{"position":[[230,7],[242,6]]},"3838":{"position":[[69,6],[81,6],[291,6]]},"3840":{"position":[[32,7],[176,7]]}}}],["buffer",{"_index":469,"t":{"3822":{"position":[[416,7]]},"3824":{"position":[[190,7]]}}}],["bufferitem",{"_index":467,"t":{"3822":{"position":[[373,12]]},"3824":{"position":[[155,11],[198,11]]},"3826":{"position":[[64,12]]}}}],["byte",{"_index":29,"t":{"3600":{"position":[[393,8],[591,7]]},"3608":{"position":[[69,8],[123,7]]},"3622":{"position":[[69,8],[123,7]]},"3636":{"position":[[69,8],[123,7]]},"3650":{"position":[[69,8],[123,7]]},"3664":{"position":[[69,8],[123,7]]},"3678":{"position":[[66,8],[120,7]]},"3692":{"position":[[70,8],[124,7]]},"3706":{"position":[[69,8],[123,7]]},"3720":{"position":[[69,8],[123,7]]},"3734":{"position":[[69,8],[123,7]]},"3748":{"position":[[69,8],[123,7]]},"3762":{"position":[[69,8],[123,7]]},"3776":{"position":[[69,8],[123,7]]},"3790":{"position":[[69,8],[123,7]]},"3804":{"position":[[69,8],[123,7]]},"3818":{"position":[[69,8],[123,7]]},"3832":{"position":[[69,8],[123,7]]},"3846":{"position":[[69,8],[123,7]]}}}],["cach",{"_index":465,"t":{"3822":{"position":[[360,5]]},"3824":{"position":[[125,5]]}}}],["calcul",{"_index":286,"t":{"3684":{"position":[[1415,13],[2111,13]]}}}],["case",{"_index":308,"t":{"3684":{"position":[[2847,4]]}}}],["cer",{"_index":410,"t":{"3808":{"position":[[670,4]]}}}],["certif",{"_index":419,"t":{"3808":{"position":[[855,13]]}}}],["chu'",{"_index":197,"t":{"3646":{"position":[[97,5]]}}}],["clear",{"_index":129,"t":{"3614":{"position":[[480,6]]},"3628":{"position":[[304,6]]},"3642":{"position":[[107,6]]},"3656":{"position":[[474,6]]},"3684":{"position":[[1037,6]]},"3712":{"position":[[155,6]]},"3740":{"position":[[615,6]]},"3754":{"position":[[709,6]]},"3768":{"position":[[724,6]]},"3796":{"position":[[864,6]]},"3810":{"position":[[1188,6]]},"3838":{"position":[[254,6]]},"3852":{"position":[[168,6]]}}}],["client",{"_index":305,"t":{"3684":{"position":[[2810,6]]},"3698":{"position":[[308,6]]},"3808":{"position":[[428,6],[552,6],[642,6],[1025,6]]},"3810":{"position":[[932,7]]}}}],["client.key",{"_index":413,"t":{"3808":{"position":[[718,15]]}}}],["clientnam",{"_index":437,"t":{"3810":{"position":[[904,10],[948,11],[1013,10]]},"3812":{"position":[[212,11]]}}}],["clientv3.client",{"_index":318,"t":{"3692":{"position":[[289,16]]}}}],["close",{"_index":48,"t":{"3600":{"position":[[826,5],[832,6],[921,7]]},"3608":{"position":[[249,7]]},"3622":{"position":[[249,7]]},"3636":{"position":[[249,7]]},"3650":{"position":[[249,7]]},"3664":{"position":[[249,7]]},"3678":{"position":[[246,7]]},"3692":{"position":[[250,7]]},"3706":{"position":[[249,7]]},"3720":{"position":[[249,7]]},"3734":{"position":[[249,7]]},"3748":{"position":[[249,7]]},"3762":{"position":[[249,7]]},"3776":{"position":[[249,7]]},"3790":{"position":[[249,7]]},"3804":{"position":[[249,7]]},"3818":{"position":[[249,7]]},"3832":{"position":[[249,7]]},"3846":{"position":[[249,7]]}}}],["cloud",{"_index":141,"t":{"3618":{"position":[[66,6]]}}}],["cluster",{"_index":236,"t":{"3670":{"position":[[77,7],[157,7],[224,7],[345,7],[443,7]]},"3808":{"position":[[544,7]]}}}],["clustercli",{"_index":434,"t":{"3810":{"position":[[742,13]]}}}],["cockroachdb/pebbl",{"_index":378,"t":{"3772":{"position":[[26,18]]}}}],["collect",{"_index":114,"t":{"3612":{"position":[[311,11]]},"3614":{"position":[[394,10],[453,10],[517,10]]},"3616":{"position":[[115,11]]},"3738":{"position":[[301,11],[513,11]]},"3740":{"position":[[529,10],[588,10]]},"3742":{"position":[[98,11]]},"3810":{"position":[[1225,10]]}}}],["collector",{"_index":52,"t":{"3600":{"position":[[888,10]]}}}],["command",{"_index":440,"t":{"3810":{"position":[[960,7]]}}}],["commun",{"_index":11,"t":{"3600":{"position":[[139,13]]}}}],["config",{"_index":76,"t":{"3606":{"position":[[33,6],[48,6]]},"3608":{"position":[[16,10]]},"3612":{"position":[[156,6],[208,6]]},"3614":{"position":[[5,6]]},"3616":{"position":[[50,7]]},"3620":{"position":[[33,6],[48,6]]},"3622":{"position":[[16,10]]},"3626":{"position":[[157,6],[210,6]]},"3628":{"position":[[5,6]]},"3630":{"position":[[20,7]]},"3634":{"position":[[33,6],[48,6]]},"3636":{"position":[[16,10]]},"3640":{"position":[[154,6],[204,6]]},"3642":{"position":[[5,6]]},"3644":{"position":[[20,7]]},"3648":{"position":[[33,6],[48,6]]},"3650":{"position":[[16,10]]},"3654":{"position":[[153,6],[202,6]]},"3656":{"position":[[3,6],[22,6],[47,6]]},"3658":{"position":[[32,6],[59,7]]},"3662":{"position":[[33,6],[48,6]]},"3664":{"position":[[16,10]]},"3668":{"position":[[157,6],[233,6]]},"3670":{"position":[[5,6]]},"3672":{"position":[[32,6],[59,7]]},"3674":{"position":[[60,6],[199,6],[262,7]]},"3676":{"position":[[33,6],[48,6]]},"3678":{"position":[[16,7]]},"3684":{"position":[[5,6],[209,6]]},"3686":{"position":[[20,7]]},"3690":{"position":[[33,6],[48,6]]},"3692":{"position":[[16,10]]},"3696":{"position":[[152,6],[200,6]]},"3698":{"position":[[5,6]]},"3700":{"position":[[20,7]]},"3704":{"position":[[33,6],[48,6]]},"3706":{"position":[[16,10]]},"3710":{"position":[[156,6],[208,6]]},"3712":{"position":[[5,6]]},"3714":{"position":[[20,7]]},"3718":{"position":[[33,6],[48,6]]},"3720":{"position":[[16,10]]},"3724":{"position":[[154,6],[204,6]]},"3726":{"position":[[5,6]]},"3728":{"position":[[20,7]]},"3732":{"position":[[33,6],[48,6]]},"3734":{"position":[[16,10]]},"3738":{"position":[[155,6],[206,6],[368,6]]},"3740":{"position":[[5,6]]},"3742":{"position":[[20,7]]},"3746":{"position":[[33,6],[48,6]]},"3748":{"position":[[16,10]]},"3752":{"position":[[153,6],[202,6],[404,6]]},"3754":{"position":[[3,6],[22,6],[47,6]]},"3756":{"position":[[20,7]]},"3760":{"position":[[33,6],[48,6]]},"3762":{"position":[[16,10]]},"3766":{"position":[[153,6],[202,6],[384,6],[577,6]]},"3768":{"position":[[5,6]]},"3770":{"position":[[20,7]]},"3774":{"position":[[33,6],[48,6]]},"3776":{"position":[[16,10]]},"3780":{"position":[[154,6],[204,6]]},"3782":{"position":[[5,6]]},"3784":{"position":[[20,7]]},"3788":{"position":[[33,6],[48,6]]},"3790":{"position":[[16,10]]},"3794":{"position":[[159,6],[211,6]]},"3796":{"position":[[3,6],[22,6],[47,6]]},"3798":{"position":[[32,6],[59,7]]},"3802":{"position":[[33,6],[48,6]]},"3804":{"position":[[16,10]]},"3808":{"position":[[167,6],[216,6]]},"3810":{"position":[[5,6],[476,6],[1287,6]]},"3812":{"position":[[20,7]]},"3816":{"position":[[33,6],[48,6]]},"3818":{"position":[[16,10]]},"3822":{"position":[[157,6],[210,6]]},"3824":{"position":[[5,6]]},"3826":{"position":[[20,7]]},"3828":{"position":[[54,6],[193,6],[256,7]]},"3830":{"position":[[33,6],[48,6]]},"3832":{"position":[[16,10]]},"3836":{"position":[[150,6],[196,6]]},"3838":{"position":[[3,6],[22,6],[47,6]]},"3840":{"position":[[141,6],[168,7]]},"3844":{"position":[[33,6],[48,6]]},"3846":{"position":[[16,10]]},"3850":{"position":[[155,6],[206,6]]},"3852":{"position":[[5,6],[418,6]]},"3854":{"position":[[20,7]]}}}],["configdefault",{"_index":135,"t":{"3616":{"position":[[34,13]]},"3630":{"position":[[4,13]]},"3644":{"position":[[4,13]]},"3658":{"position":[[3,13],[43,13]]},"3672":{"position":[[3,13],[43,13]]},"3686":{"position":[[4,13]]},"3700":{"position":[[4,13]]},"3714":{"position":[[4,13]]},"3728":{"position":[[4,13]]},"3742":{"position":[[4,13]]},"3756":{"position":[[4,13]]},"3770":{"position":[[4,13]]},"3784":{"position":[[4,13]]},"3798":{"position":[[3,13],[43,13]]},"3812":{"position":[[4,13]]},"3826":{"position":[[4,13]]},"3840":{"position":[[112,13],[152,13]]},"3854":{"position":[[4,13]]}}}],["configur",{"_index":475,"t":{"3840":{"position":[[12,13]]}}}],["conn",{"_index":81,"t":{"3608":{"position":[[281,6]]},"3622":{"position":[[281,6]]},"3636":{"position":[[281,6]]},"3650":{"position":[[281,6]]},"3664":{"position":[[281,6]]},"3678":{"position":[[278,6]]},"3692":{"position":[[282,6]]},"3706":{"position":[[281,6]]},"3720":{"position":[[281,6]]},"3734":{"position":[[281,6]]},"3748":{"position":[[281,6]]},"3762":{"position":[[281,6]]},"3776":{"position":[[281,6]]},"3790":{"position":[[281,6]]},"3804":{"position":[[281,6]]},"3810":{"position":[[977,5]]},"3818":{"position":[[281,6]]},"3832":{"position":[[281,6]]},"3846":{"position":[[281,6]]}}}],["connect",{"_index":54,"t":{"3600":{"position":[[908,12]]},"3670":{"position":[[52,7],[132,7],[188,10],[273,7],[317,10]]},"3698":{"position":[[129,11]]},"3738":{"position":[[381,10]]},"3740":{"position":[[24,10]]},"3752":{"position":[[417,10]]},"3754":{"position":[[66,10],[926,10]]},"3766":{"position":[[397,10],[597,10]]},"3768":{"position":[[144,10]]},"3796":{"position":[[103,10],[128,10],[197,10],[792,10]]},"3810":{"position":[[349,10],[1416,12],[1459,11]]},"3852":{"position":[[517,11],[541,10],[655,11],[786,10]]}}}],["connectiontimeout",{"_index":232,"t":{"3668":{"position":[[344,18]]},"3670":{"position":[[353,17]]},"3672":{"position":[[155,18]]}}}],["connectionuri",{"_index":355,"t":{"3738":{"position":[[436,14]]},"3740":{"position":[[141,13]]},"3742":{"position":[[28,14]]},"3752":{"position":[[468,14]]},"3754":{"position":[[183,13]]},"3756":{"position":[[28,14]]},"3766":{"position":[[448,14]]},"3768":{"position":[[41,13],[261,13]]},"3770":{"position":[[28,14]]},"3796":{"position":[[314,13]]},"3798":{"position":[[67,14]]}}}],["connmaxlifetim",{"_index":486,"t":{"3850":{"position":[[385,16]]},"3852":{"position":[[736,15],[849,15]]},"3854":{"position":[[163,16]]}}}],["consol",{"_index":280,"t":{"3684":{"position":[[1329,8],[2025,8]]}}}],["contain",{"_index":45,"t":{"3600":{"position":[[718,7]]},"3626":{"position":[[275,10]]},"3628":{"position":[[64,9],[80,9],[341,10]]},"3630":{"position":[[41,10]]},"3684":{"position":[[542,9],[603,10]]}}}],["cost",{"_index":464,"t":{"3822":{"position":[[352,4]]},"3824":{"position":[[117,4]]}}}],["couchbas",{"_index":59,"t":{"3602":{"position":[[32,9]]},"3660":{"position":[[2,9]]},"3666":{"position":[[0,9],[194,9]]},"3668":{"position":[[203,9]]},"3670":{"position":[[67,9],[147,9],[214,9],[335,9],[433,9]]}}}],["couchbase.new",{"_index":229,"t":{"3668":{"position":[[173,15]]}}}],["couchbase.new(couchbase.config",{"_index":230,"t":{"3668":{"position":[[249,31]]}}}],["couchbase/gocb",{"_index":226,"t":{"3660":{"position":[[33,15]]}}}],["cpu",{"_index":447,"t":{"3810":{"position":[[1491,3]]}}}],["creat",{"_index":105,"t":{"3612":{"position":[[116,6]]},"3626":{"position":[[117,6]]},"3640":{"position":[[114,6]]},"3654":{"position":[[113,6]]},"3668":{"position":[[117,6]]},"3682":{"position":[[116,6]]},"3684":{"position":[[1217,7],[1301,8],[1913,7],[1997,8],[2558,7],[2641,8],[2933,8]]},"3696":{"position":[[112,6]]},"3710":{"position":[[116,6]]},"3724":{"position":[[114,6]]},"3738":{"position":[[115,6]]},"3752":{"position":[[113,6]]},"3766":{"position":[[113,6]]},"3780":{"position":[[114,6]]},"3794":{"position":[[119,6]]},"3808":{"position":[[121,6],[633,6],[1016,6]]},"3822":{"position":[[117,6]]},"3836":{"position":[[110,6]]},"3850":{"position":[[115,6]]}}}],["credenti",{"_index":153,"t":{"3626":{"position":[[294,12],[307,12]]},"3628":{"position":[[396,11],[501,13],[515,11],[527,11]]},"3674":{"position":[[77,11],[100,11],[216,11],[235,11],[290,11]]},"3684":{"position":[[742,11],[850,13],[864,11],[876,11],[3075,11]]},"3686":{"position":[[52,12],[65,14]]},"3698":{"position":[[322,12]]},"3828":{"position":[[71,11],[94,11],[210,11],[229,11],[284,11]]},"3838":{"position":[[345,11],[453,13],[467,11],[479,11],[638,11]]},"3840":{"position":[[214,12],[227,14]]}}}],["custom",{"_index":107,"t":{"3612":{"position":[[201,6]]},"3626":{"position":[[203,6]]},"3640":{"position":[[197,6]]},"3654":{"position":[[195,6]]},"3668":{"position":[[226,6]]},"3684":{"position":[[435,6]]},"3696":{"position":[[193,6]]},"3710":{"position":[[201,6]]},"3724":{"position":[[197,6]]},"3738":{"position":[[199,6],[361,6]]},"3752":{"position":[[195,6],[397,6]]},"3766":{"position":[[195,6],[377,6],[570,6]]},"3780":{"position":[[197,6]]},"3794":{"position":[[204,6]]},"3808":{"position":[[209,6]]},"3822":{"position":[[203,6]]},"3836":{"position":[[189,6]]},"3850":{"position":[[199,6]]}}}],["customendpoint",{"_index":264,"t":{"3684":{"position":[[400,14]]}}}],["darwin",{"_index":220,"t":{"3656":{"position":[[297,6]]}}}],["databas",{"_index":113,"t":{"3612":{"position":[[292,9]]},"3614":{"position":[[326,8],[375,8]]},"3616":{"position":[[96,9]]},"3640":{"position":[[246,9]]},"3642":{"position":[[24,8],[82,8]]},"3644":{"position":[[28,9]]},"3646":{"position":[[184,8],[232,8]]},"3654":{"position":[[242,9]]},"3656":{"position":[[66,8],[118,8],[390,8]]},"3658":{"position":[[67,9]]},"3738":{"position":[[282,9],[494,9]]},"3740":{"position":[[461,8],[510,8]]},"3742":{"position":[[79,9]]},"3752":{"position":[[273,9]]},"3754":{"position":[[565,8],[614,8]]},"3756":{"position":[[78,9]]},"3766":{"position":[[273,9]]},"3768":{"position":[[580,8],[629,8]]},"3770":{"position":[[78,9]]},"3782":{"position":[[24,8]]},"3796":{"position":[[633,8],[682,8]]},"3798":{"position":[[117,9]]},"3808":{"position":[[315,9]]},"3810":{"position":[[319,8],[404,8],[524,8]]},"3812":{"position":[[96,9]]},"3850":{"position":[[250,9]]},"3852":{"position":[[24,8],[73,8],[674,9]]},"3854":{"position":[[28,9]]}}}],["database/key",{"_index":13,"t":{"3600":{"position":[[168,12]]}}}],["database/sql",{"_index":368,"t":{"3758":{"position":[[29,12]]}}}],["db",{"_index":122,"t":{"3614":{"position":[[44,2],[133,2]]},"3632":{"position":[[17,2]]},"3740":{"position":[[53,3],[185,2],[267,2]]},"3754":{"position":[[95,3],[227,2],[309,2]]},"3766":{"position":[[594,2],[608,3],[715,3],[719,3]]},"3768":{"position":[[24,2],[130,2],[173,3],[305,2],[387,2]]},"3772":{"position":[[17,2]]},"3780":{"position":[[252,5]]},"3782":{"position":[[65,6]]},"3784":{"position":[[34,5]]},"3794":{"position":[[257,3]]},"3796":{"position":[[66,2],[177,2],[226,3],[358,2],[440,2]]},"3810":{"position":[[44,2],[126,2]]}}}],["dbpool",{"_index":392,"t":{"3794":{"position":[[261,7]]}}}],["default",{"_index":77,"t":{"3606":{"position":[[40,7]]},"3612":{"position":[[148,7]]},"3614":{"position":[[73,7],[168,7],[228,7],[293,7],[356,7],[426,7],[544,7],[625,7]]},"3620":{"position":[[40,7]]},"3626":{"position":[[149,7]]},"3628":{"position":[[131,8],[240,7],[365,7],[490,7],[647,7]]},"3634":{"position":[[40,7]]},"3640":{"position":[[146,7]]},"3642":{"position":[[54,7],[166,7],[247,7],[367,7],[464,7],[510,7],[609,7]]},"3648":{"position":[[40,7]]},"3654":{"position":[[145,7]]},"3656":{"position":[[96,7],[171,7],[331,7],[434,7],[534,7]]},"3658":{"position":[[24,7]]},"3662":{"position":[[40,7]]},"3668":{"position":[[149,7]]},"3672":{"position":[[24,7]]},"3676":{"position":[[40,7]]},"3684":{"position":[[374,9],[714,8],[839,7],[999,7],[1097,7],[1252,8],[1279,7],[1948,8],[1975,7],[3031,9]]},"3690":{"position":[[40,7]]},"3696":{"position":[[144,7]]},"3704":{"position":[[40,7]]},"3710":{"position":[[148,7]]},"3712":{"position":[[102,7],[214,7]]},"3718":{"position":[[40,7]]},"3724":{"position":[[146,7]]},"3726":{"position":[[64,7]]},"3732":{"position":[[40,7]]},"3738":{"position":[[147,7]]},"3740":{"position":[[127,7],[214,7],[302,7],[363,7],[428,7],[491,7],[561,7],[674,7]]},"3746":{"position":[[40,7]]},"3752":{"position":[[145,7]]},"3754":{"position":[[169,7],[256,7],[344,7],[404,7],[469,7],[532,7],[595,7],[660,7],[768,7],[849,7],[953,7]]},"3760":{"position":[[40,7]]},"3766":{"position":[[145,7]]},"3768":{"position":[[115,7],[247,7],[334,7],[422,7],[482,7],[547,7],[610,7],[675,7],[783,7],[864,7]]},"3774":{"position":[[40,7]]},"3780":{"position":[[146,7]]},"3782":{"position":[[54,7],[146,7]]},"3788":{"position":[[40,7]]},"3794":{"position":[[151,7]]},"3796":{"position":[[162,7],[300,7],[387,7],[475,7],[535,7],[600,7],[663,7],[728,7],[819,7],[923,7],[1004,7]]},"3798":{"position":[[24,7]]},"3802":{"position":[[40,7]]},"3808":{"position":[[159,7]]},"3810":{"position":[[73,7],[161,7],[221,7],[286,7],[391,7],[619,7],[772,7],[869,7],[999,7],[1067,7],[1141,7],[1252,7],[1351,7],[1445,7]]},"3816":{"position":[[40,7]]},"3822":{"position":[[149,7]]},"3830":{"position":[[40,7]]},"3836":{"position":[[142,7]]},"3838":{"position":[[190,7],[314,7],[442,7],[602,7]]},"3840":{"position":[[4,7],[133,7]]},"3844":{"position":[[40,7]]},"3850":{"position":[[147,7]]},"3852":{"position":[[54,7],[119,7],[227,7],[308,7],[574,7],[700,7],[828,7]]}}}],["defaultcost",{"_index":470,"t":{"3826":{"position":[[81,12]]}}}],["defin",{"_index":189,"t":{"3642":{"position":[[559,6]]},"3656":{"position":[[10,7]]},"3754":{"position":[[10,7]]},"3796":{"position":[[10,7]]},"3838":{"position":[[10,7]]}}}],["delet",{"_index":44,"t":{"3600":{"position":[[627,6],[634,7],[792,6]]},"3614":{"position":[[587,8]]},"3642":{"position":[[209,8]]},"3726":{"position":[[36,8]]},"3754":{"position":[[811,8]]},"3768":{"position":[[826,8]]},"3796":{"position":[[966,8]]},"3852":{"position":[[270,8]]}}}],["delete(key",{"_index":46,"t":{"3600":{"position":[[735,10]]},"3608":{"position":[[174,10]]},"3622":{"position":[[174,10]]},"3636":{"position":[[174,10]]},"3650":{"position":[[174,10]]},"3664":{"position":[[174,10]]},"3678":{"position":[[171,10]]},"3692":{"position":[[175,10]]},"3706":{"position":[[174,10]]},"3720":{"position":[[174,10]]},"3734":{"position":[[174,10]]},"3748":{"position":[[174,10]]},"3762":{"position":[[174,10]]},"3776":{"position":[[174,10]]},"3790":{"position":[[174,10]]},"3804":{"position":[[174,10]]},"3818":{"position":[[174,10]]},"3832":{"position":[[174,10]]},"3846":{"position":[[174,10]]}}}],["design",{"_index":5,"t":{"3600":{"position":[[62,8]]}}}],["develop",{"_index":288,"t":{"3684":{"position":[[1476,9],[1645,9],[2172,9],[2341,9]]}}}],["dgraph",{"_index":174,"t":{"3632":{"position":[[26,6]]},"3814":{"position":[[36,6]]}}}],["dialtimeout",{"_index":325,"t":{"3698":{"position":[[75,11],[141,11]]},"3700":{"position":[[67,12]]}}}],["didn't",{"_index":96,"t":{"3610":{"position":[[127,6]]},"3624":{"position":[[132,6]]},"3638":{"position":[[113,6]]},"3652":{"position":[[112,6]]},"3666":{"position":[[116,6]]},"3680":{"position":[[115,6]]},"3694":{"position":[[111,6]]},"3708":{"position":[[113,6]]},"3722":{"position":[[113,6]]},"3736":{"position":[[114,6]]},"3750":{"position":[[112,6]]},"3764":{"position":[[112,6]]},"3778":{"position":[[113,6]]},"3792":{"position":[[115,6]]},"3806":{"position":[[112,6]]},"3820":{"position":[[116,6]]},"3834":{"position":[[109,6]]},"3848":{"position":[[114,6]]}}}],["differ",{"_index":12,"t":{"3600":{"position":[[158,9]]}}}],["disabl",{"_index":365,"t":{"3752":{"position":[[369,10]]},"3754":{"position":[[964,9]]},"3756":{"position":[[174,10]]},"3796":{"position":[[830,9]]},"3798":{"position":[[169,10]]}}}],["divid",{"_index":340,"t":{"3712":{"position":[[36,7]]}}}],["docker",{"_index":269,"t":{"3684":{"position":[[535,6],[596,6]]}}}],["doesn't",{"_index":275,"t":{"3684":{"position":[[1192,7],[1888,7],[2534,7],[2702,7]]}}}],["don't",{"_index":203,"t":{"3646":{"position":[[211,5]]},"3684":{"position":[[2883,5]]},"3778":{"position":[[210,5]]}}}],["driver",{"_index":2,"t":{"3600":{"position":[[16,7]]},"3604":{"position":[[19,6],[44,6],[67,7]]},"3624":{"position":[[19,6]]},"3646":{"position":[[16,6]]},"3660":{"position":[[20,6]]},"3674":{"position":[[19,6]]},"3688":{"position":[[15,6]]},"3702":{"position":[[19,6]]},"3716":{"position":[[21,7]]},"3730":{"position":[[18,6],[48,7]]},"3744":{"position":[[16,6]]},"3758":{"position":[[16,6]]},"3786":{"position":[[19,6]]},"3800":{"position":[[16,6]]},"3814":{"position":[[23,6]]},"3828":{"position":[[13,6]]},"3842":{"position":[[18,6]]}}}],["driver.cli",{"_index":82,"t":{"3608":{"position":[[288,13]]}}}],["driver/mysql",{"_index":370,"t":{"3758":{"position":[[53,13]]}}}],["dure",{"_index":386,"t":{"3782":{"position":[[106,6]]}}}],["dynamodb",{"_index":60,"t":{"3602":{"position":[[42,8]]},"3674":{"position":[[2,8]]},"3680":{"position":[[0,8],[193,8]]},"3682":{"position":[[148,8]]},"3684":{"position":[[38,8],[326,8],[442,8],[518,9],[1467,8],[1636,8],[2163,8],[2332,8]]}}}],["dynamodb.new(dynamodb.config",{"_index":254,"t":{"3682":{"position":[[166,29]]}}}],["e.g",{"_index":260,"t":{"3684":{"position":[[161,4]]}}}],["each",{"_index":441,"t":{"3810":{"position":[[972,4]]}}}],["ec2",{"_index":247,"t":{"3674":{"position":[[177,3]]},"3828":{"position":[[171,3]]}}}],["effect",{"_index":426,"t":{"3810":{"position":[[541,7]]}}}],["empti",{"_index":37,"t":{"3600":{"position":[[518,5]]}}}],["enabl",{"_index":432,"t":{"3810":{"position":[[715,7]]}}}],["encount",{"_index":167,"t":{"3628":{"position":[[584,9]]},"3684":{"position":[[933,9]]},"3838":{"position":[[536,9]]}}}],["endpoint",{"_index":155,"t":{"3628":{"position":[[108,9],[191,8]]},"3630":{"position":[[56,9]]},"3684":{"position":[[459,9],[723,8]]},"3696":{"position":[[233,10]]},"3698":{"position":[[24,9],[53,9]]},"3700":{"position":[[28,10]]},"3836":{"position":[[255,9],[269,10]]},"3838":{"position":[[102,8],[111,8]]},"3840":{"position":[[52,8],[200,9]]}}}],["environ",{"_index":244,"t":{"3674":{"position":[[131,11]]},"3684":{"position":[[224,11],[261,11]]},"3828":{"position":[[125,11]]}}}],["err",{"_index":411,"t":{"3808":{"position":[[675,3],[737,3]]}}}],["error",{"_index":30,"t":{"3600":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"3608":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3622":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3636":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3650":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3664":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3678":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"3684":{"position":[[2737,5],[3002,7]]},"3692":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"3706":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3720":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3734":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3748":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3762":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3776":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3790":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3804":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3818":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3832":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3846":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]}}}],["especi",{"_index":266,"t":{"3684":{"position":[[480,10]]}}}],["establish",{"_index":327,"t":{"3698":{"position":[[117,9]]}}}],["etcd",{"_index":61,"t":{"3602":{"position":[[51,4]]},"3646":{"position":[[29,4]]},"3688":{"position":[[2,4],[28,4]]},"3694":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":320,"t":{"3696":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":321,"t":{"3696":{"position":[[216,16]]}}}],["exampl",{"_index":75,"t":{"3606":{"position":[[24,8]]},"3620":{"position":[[24,8]]},"3634":{"position":[[24,8]]},"3648":{"position":[[24,8]]},"3662":{"position":[[24,8]]},"3676":{"position":[[24,8]]},"3684":{"position":[[1407,7],[2103,7]]},"3690":{"position":[[24,8]]},"3704":{"position":[[24,8]]},"3718":{"position":[[24,8]]},"3732":{"position":[[24,8]]},"3746":{"position":[[24,8]]},"3760":{"position":[[24,8]]},"3774":{"position":[[24,8]]},"3788":{"position":[[24,8]]},"3802":{"position":[[24,8]]},"3810":{"position":[[555,8]]},"3816":{"position":[[24,8]]},"3830":{"position":[[24,8]]},"3844":{"position":[[24,8]]}}}],["execut",{"_index":438,"t":{"3810":{"position":[[920,7]]}}}],["exist",{"_index":26,"t":{"3600":{"position":[[371,5]]},"3614":{"position":[[491,8],[508,8]]},"3628":{"position":[[315,8],[332,8]]},"3642":{"position":[[118,8],[135,8]]},"3656":{"position":[[485,8],[502,8]]},"3684":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"3712":{"position":[[166,8],[183,8]]},"3740":{"position":[[626,8],[643,8]]},"3754":{"position":[[720,8],[737,8]]},"3768":{"position":[[735,8],[752,8]]},"3778":{"position":[[224,8]]},"3796":{"position":[[875,8],[892,8]]},"3810":{"position":[[1199,8],[1216,8]]},"3838":{"position":[[265,8],[282,8]]},"3852":{"position":[[179,8],[196,8]]}}}],["exp",{"_index":42,"t":{"3600":{"position":[[599,3]]},"3608":{"position":[[131,3]]},"3622":{"position":[[131,3]]},"3636":{"position":[[131,3]]},"3650":{"position":[[131,3]]},"3664":{"position":[[131,3]]},"3678":{"position":[[128,3]]},"3692":{"position":[[132,3]]},"3706":{"position":[[131,3]]},"3720":{"position":[[131,3]]},"3734":{"position":[[131,3]]},"3748":{"position":[[131,3]]},"3762":{"position":[[131,3]]},"3776":{"position":[[131,3]]},"3790":{"position":[[131,3]]},"3804":{"position":[[131,3]]},"3818":{"position":[[131,3]]},"3832":{"position":[[131,3]]},"3846":{"position":[[131,3]]}}}],["expir",{"_index":34,"t":{"3600":{"position":[[474,10],[503,11]]},"3614":{"position":[[596,7]]},"3642":{"position":[[218,7]]},"3726":{"position":[[45,7]]},"3754":{"position":[[820,7]]},"3768":{"position":[[835,7]]},"3796":{"position":[[975,7]]},"3852":{"position":[[279,7]]}}}],["fail",{"_index":326,"t":{"3698":{"position":[[106,7]]}}}],["failov",{"_index":404,"t":{"3808":{"position":[[419,8]]}}}],["failovercli",{"_index":433,"t":{"3810":{"position":[[723,14]]}}}],["failur",{"_index":169,"t":{"3628":{"position":[[604,8]]},"3684":{"position":[[953,8]]},"3838":{"position":[[556,8]]}}}],["fals",{"_index":116,"t":{"3612":{"position":[[347,6]]},"3614":{"position":[[555,5]]},"3616":{"position":[[151,6]]},"3628":{"position":[[376,5]]},"3630":{"position":[[96,6]]},"3640":{"position":[[281,6]]},"3642":{"position":[[177,5],[620,5]]},"3644":{"position":[[63,6],[196,6]]},"3654":{"position":[[298,6]]},"3656":{"position":[[445,5],[545,5]]},"3658":{"position":[[151,6],[165,6]]},"3684":{"position":[[1108,5],[2786,6]]},"3686":{"position":[[103,6]]},"3712":{"position":[[225,5]]},"3738":{"position":[[337,6],[549,6]]},"3740":{"position":[[685,5]]},"3742":{"position":[[134,6]]},"3752":{"position":[[323,6],[548,6]]},"3754":{"position":[[779,5]]},"3756":{"position":[[128,6]]},"3766":{"position":[[323,6],[516,6],[730,6]]},"3768":{"position":[[794,5]]},"3770":{"position":[[128,6]]},"3794":{"position":[[300,6]]},"3796":{"position":[[934,5]]},"3798":{"position":[[187,6]]},"3808":{"position":[[335,6],[1003,6],[1160,6]]},"3810":{"position":[[1263,5]]},"3812":{"position":[[116,6]]},"3836":{"position":[[308,6]]},"3838":{"position":[[325,5]]},"3840":{"position":[[284,6]]},"3850":{"position":[[310,6]]},"3852":{"position":[[238,5]]},"3854":{"position":[[88,6]]}}}],["fast",{"_index":173,"t":{"3632":{"position":[[2,4]]},"3646":{"position":[[165,5]]},"3772":{"position":[[2,4]]}}}],["fiber",{"_index":8,"t":{"3600":{"position":[[95,5]]},"3612":{"position":[[302,8]]},"3614":{"position":[[367,7]]},"3616":{"position":[[106,8]]},"3738":{"position":[[292,8],[504,8]]},"3740":{"position":[[502,7]]},"3742":{"position":[[89,8]]},"3752":{"position":[[283,8]]},"3754":{"position":[[606,7]]},"3756":{"position":[[88,8]]},"3766":{"position":[[283,8]]},"3768":{"position":[[621,7]]},"3770":{"position":[[88,8]]},"3796":{"position":[[674,7]]},"3798":{"position":[[127,8]]},"3852":{"position":[[65,7]]}}}],["fiber.badg",{"_index":180,"t":{"3640":{"position":[[256,17]]},"3642":{"position":[[65,16]]},"3644":{"position":[[38,17]]}}}],["fiber.db",{"_index":213,"t":{"3656":{"position":[[107,10]]},"3658":{"position":[[77,11]]}}}],["fiber.sqlite3",{"_index":482,"t":{"3850":{"position":[[260,18]]},"3854":{"position":[[38,18]]}}}],["fiber_storag",{"_index":115,"t":{"3612":{"position":[[323,16]]},"3614":{"position":[[437,15]]},"3616":{"position":[[127,16]]},"3656":{"position":[[182,15]]},"3658":{"position":[[97,16]]},"3672":{"position":[[138,16]]},"3684":{"position":[[354,16]]},"3686":{"position":[[35,16]]},"3738":{"position":[[313,16],[525,16]]},"3740":{"position":[[572,15]]},"3742":{"position":[[110,16]]},"3752":{"position":[[299,16]]},"3754":{"position":[[671,15]]},"3756":{"position":[[104,16]]},"3766":{"position":[[299,16]]},"3768":{"position":[[686,15]]},"3770":{"position":[[104,16]]},"3794":{"position":[[276,16]]},"3796":{"position":[[739,15]]},"3798":{"position":[[143,16]]},"3850":{"position":[[286,16]]},"3852":{"position":[[130,15]]},"3854":{"position":[[64,16]]}}}],["field",{"_index":133,"t":{"3616":{"position":[[23,6]]},"3674":{"position":[[67,6],[206,6]]},"3796":{"position":[[139,6]]},"3828":{"position":[[61,6],[200,6]]}}}],["file",{"_index":217,"t":{"3656":{"position":[[265,4]]},"3684":{"position":[[216,4]]}}}],["first",{"_index":95,"t":{"3610":{"position":[[114,5]]},"3624":{"position":[[119,5]]},"3638":{"position":[[100,5]]},"3652":{"position":[[99,5]]},"3666":{"position":[[103,5]]},"3680":{"position":[[102,5]]},"3694":{"position":[[98,5]]},"3708":{"position":[[100,5]]},"3722":{"position":[[100,5]]},"3736":{"position":[[101,5]]},"3750":{"position":[[99,5]]},"3764":{"position":[[99,5]]},"3778":{"position":[[100,5]]},"3792":{"position":[[102,5]]},"3806":{"position":[[99,5]]},"3820":{"position":[[103,5]]},"3834":{"position":[[96,5]]},"3848":{"position":[[101,5]]}}}],["follow",{"_index":103,"t":{"3612":{"position":[[89,9]]},"3626":{"position":[[90,9]]},"3640":{"position":[[87,9]]},"3654":{"position":[[86,9]]},"3668":{"position":[[90,9]]},"3682":{"position":[[89,9]]},"3696":{"position":[[85,9]]},"3710":{"position":[[89,9]]},"3724":{"position":[[87,9]]},"3738":{"position":[[88,9]]},"3752":{"position":[[86,9]]},"3766":{"position":[[86,9]]},"3780":{"position":[[87,9]]},"3794":{"position":[[92,9]]},"3808":{"position":[[100,9]]},"3822":{"position":[[90,9]]},"3836":{"position":[[83,9]]},"3850":{"position":[[88,9]]}}}],["format",{"_index":425,"t":{"3810":{"position":[[433,6]]}}}],["free",{"_index":284,"t":{"3684":{"position":[[1369,4],[2065,4]]}}}],["frequenc",{"_index":460,"t":{"3822":{"position":[[303,9]]},"3824":{"position":[[60,9]]}}}],["full",{"_index":204,"t":{"3646":{"position":[[227,4]]}}}],["func",{"_index":78,"t":{"3608":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3622":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3636":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3650":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3664":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3678":{"position":[[0,4],[32,4],[82,4],[153,4],[196,4],[228,4],[260,4]]},"3692":{"position":[[0,4],[36,4],[86,4],[157,4],[200,4],[232,4],[264,4]]},"3706":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3720":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3734":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3748":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3762":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3776":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3790":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3804":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3818":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3832":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3846":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]}}}],["garbag",{"_index":51,"t":{"3600":{"position":[[877,7]]}}}],["gcinterv",{"_index":117,"t":{"3612":{"position":[[354,11]]},"3614":{"position":[[653,10]]},"3616":{"position":[[158,11]]},"3640":{"position":[[288,11]]},"3642":{"position":[[275,10]]},"3644":{"position":[[70,11]]},"3724":{"position":[[246,11]]},"3726":{"position":[[92,10]]},"3728":{"position":[[28,11]]},"3752":{"position":[[330,11],[555,11]]},"3754":{"position":[[877,10]]},"3756":{"position":[[135,11]]},"3766":{"position":[[330,11],[523,11],[737,11]]},"3768":{"position":[[892,10]]},"3770":{"position":[[135,11]]},"3794":{"position":[[307,11]]},"3796":{"position":[[1032,10]]},"3798":{"position":[[194,11]]},"3850":{"position":[[317,11]]},"3852":{"position":[[336,10]]},"3854":{"position":[[95,11]]}}}],["get",{"_index":21,"t":{"3600":{"position":[[289,4]]}}}],["get(key",{"_index":27,"t":{"3600":{"position":[[377,7]]},"3608":{"position":[[53,7]]},"3622":{"position":[[53,7]]},"3636":{"position":[[53,7]]},"3650":{"position":[[53,7]]},"3664":{"position":[[53,7]]},"3678":{"position":[[50,7]]},"3692":{"position":[[54,7]]},"3706":{"position":[[53,7]]},"3720":{"position":[[53,7]]},"3734":{"position":[[53,7]]},"3748":{"position":[[53,7]]},"3762":{"position":[[53,7]]},"3776":{"position":[[53,7]]},"3790":{"position":[[53,7]]},"3804":{"position":[[53,7]]},"3818":{"position":[[53,7]]},"3832":{"position":[[53,7]]},"3846":{"position":[[53,7]]}}}],["github.com//:@127.0.0.1:6379/:@localhost:6379/:@tcp(:)/SQLite3 | Fiber - - + +
-
Version: ristretto_v1.x.x

SQLite3

Release +

Version: ristretto_v1.x.x

SQLite3

Release Discord Test Security -Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
- - +Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/s3/index.html b/storage/s3/index.html index 0f77457299f..ca48f338dd4 100644 --- a/storage/s3/index.html +++ b/storage/s3/index.html @@ -1,22 +1,22 @@ - + -S3 | Fiber +S3 | Fiber - - + +
-
Version: memcache_v1.x.x

S3

Release +

Version: bbolt_v1.x.x

S3

Release Discord Test Security -Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
- - +Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3/index.html b/storage/sqlite3/index.html index b81bb858376..29a05cd3d8c 100644 --- a/storage/sqlite3/index.html +++ b/storage/sqlite3/index.html @@ -1,22 +1,22 @@ - + -SQLite3 | Fiber +SQLite3 | Fiber - - + +
-
Version: memcache_v1.x.x

SQLite3

Release +

Version: bbolt_v1.x.x

SQLite3

Release Discord Test Security -Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
- - +Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/arangodb/index.html b/storage/sqlite3_v1.x.x/arangodb/index.html index 9a8cafae88c..90db6538ed2 100644 --- a/storage/sqlite3_v1.x.x/arangodb/index.html +++ b/storage/sqlite3_v1.x.x/arangodb/index.html @@ -6,17 +6,17 @@ ArangoDB | Fiber - - + +
-
Version: sqlite3_v1.x.x

ArangoDB

Release +

Version: sqlite3_v1.x.x

ArangoDB

Release Discord Test Security -Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() driver.Client

Installation

ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/arangodb

Examples

Import the storage package.

import "github.com/gofiber/storage/arangodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := arangodb.New()

// Initialize custom config
store := arangodb.New(arangodb.Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "http://127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 8529
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing collection
//
// Optional. Default is false
Reset bool
// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

Used only for optional fields

var ConfigDefault = Config{
Host: "http://127.0.0.1",
Port: 8529,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/azureblob/index.html b/storage/sqlite3_v1.x.x/azureblob/index.html index 640579e01c2..6bd3c96fde8 100644 --- a/storage/sqlite3_v1.x.x/azureblob/index.html +++ b/storage/sqlite3_v1.x.x/azureblob/index.html @@ -6,17 +6,17 @@ Azure Blob | Fiber - - + +
-
Version: sqlite3_v1.x.x

Azure Blob

Release +

Version: sqlite3_v1.x.x

Azure Blob

Release Discord Test Security -Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
- - +Linter

Azure Blob storage is Microsoft's object storage solution for the cloud.

NOTE: Go 1.18 or later is required. Source: link

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *azblob.Client

Installation

Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the azure blob implementation:

go get github.com/gofiber/storage/azureblob

Examples

Import the storage package.

import "github.com/gofiber/storage/azureblob"

You can use the following possibilities to create a storage:

// Initialize default config
store := azureblob.New()

// Initialize custom config
store := azureblob.New(azureblob.Config{
Account: "test",
Container: "test",
Credentials: Credentials{
Account: "test",
Key: "YXp1cml0ZWtleQo=",
},
})

Config

type Config struct {
// Storage account name.
Account string
// Container name.
Container string
// Storage endpoint.
// Optional. Default: "https://STORAGEACCOUNTNAME.blob.core.windows.net"
Endpoint string
// Request timeout.
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration
// Reset clears any existing keys in existing container.
// Optional. Default is false
Reset bool
// Credentials overrides AWS access key and AWS secret access key. Not recommended.
// Optional. Default is Credentials{}
Credentials Credentials
// The maximum number of times requests that encounter retryable failures should be attempted.
// Optional. Default is 3
MaxAttempts int
}

Default Config

var ConfigDefault = Config{
Account: "",
Container: "",
Endpoint: "",
RequestTimeout: 0,
Reset: false,
MaxAttempts: 3,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/badger/index.html b/storage/sqlite3_v1.x.x/badger/index.html index 311d636122f..63e2b5dfbf7 100644 --- a/storage/sqlite3_v1.x.x/badger/index.html +++ b/storage/sqlite3_v1.x.x/badger/index.html @@ -6,17 +6,17 @@ Badger | Fiber - - + +
-
Version: sqlite3_v1.x.x

Badger

Release +

Version: sqlite3_v1.x.x

Badger

Release Discord Test Security -Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
- - +Linter

A fast key-value DB using dgraph-io/badger

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the badger implementation:

go get github.com/gofiber/storage/badger

Examples

Import the storage package.

import "github.com/gofiber/storage/badger"

You can use the following possibilities to create a storage:

// Initialize default config
store := badger.New()

// Initialize custom config
store := badger.New(badger.Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./fiber.badger"
Database string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// BadgerOptions is a way to set options in badger
//
// Optional. Default is badger.DefaultOptions("./fiber.badger")
BadgerOptions badger.Options

// Logger is the default logger used by badger
//
// Optional. Default is nil
Logger badger.Logger

// UseLogger define if any logger will be used
//
// Optional. Default is false
UseLogger bool
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.badger",
Reset: false,
GCInterval: 10 * time.Second,
BadgerOptions: badger.DefaultOptions("./fiber.badger").WithLogger(nil),
Logger: nil,
UseLogger: false,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/bbolt/index.html b/storage/sqlite3_v1.x.x/bbolt/index.html index 6dd15e15ed6..3b2120d3bd6 100644 --- a/storage/sqlite3_v1.x.x/bbolt/index.html +++ b/storage/sqlite3_v1.x.x/bbolt/index.html @@ -6,17 +6,17 @@ Bbolt | Fiber - - + +
-
Version: sqlite3_v1.x.x

Bbolt

Release +

Version: sqlite3_v1.x.x

Bbolt

Release Discord Test Security -Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
- - +Linter

A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *bbolt.DB

Installation

Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/bbolt

Examples

Import the storage package.

import "github.com/gofiber/storage/bbolt"

You can use the following possibilities to create a storage:

// Initialize default config
store := bbolt.New()

// Initialize custom config
store := bbolt.New(bbolt.Config{
Database: "my_database.db",
Bucket: "my-bucket",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// Database path
//
// Optional. Default is "fiber.db"
Database string

// Bbolt bucket name
//
// Optional. Default is "fiber_storage"
Bucket string

// Timeout is the amount of time to wait to obtain a file lock.
// Only available on Darwin and Linux.
//
// Optional. Default is 60 * time.Second.
Timeout time.Duration

// Open database in read-only mode.
//
// Optional. Default is false
ReadOnly bool

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Database: "fiber.db",
Bucket: "fiber_storage",
Timeout: 60 * time.Second,
ReadOnly: false,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/couchbase/index.html b/storage/sqlite3_v1.x.x/couchbase/index.html index 81d2a30f906..e5afc4d526e 100644 --- a/storage/sqlite3_v1.x.x/couchbase/index.html +++ b/storage/sqlite3_v1.x.x/couchbase/index.html @@ -6,17 +6,17 @@ Couchbase | Fiber - - + +
-
Version: sqlite3_v1.x.x

Couchbase

Release +

Version: sqlite3_v1.x.x

Couchbase

Release Discord Test Security -Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
- - +Linter

A Couchbase storage driver using couchbase/gocb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *gocb.Cluster

Installation

Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the Couchbase implementation:

go get github.com/gofiber/storage/couchbase

Examples

Import the storage package.

import "github.com/gofiber/storage/couchbase"

You can use the following possibilities to create a storage:

// Initialize default config
store := couchbase.New()

// Initialize Couchbase storage with custom config
store := couchbase.New(couchbase.Config{
Host: "127.0.0.1:8091",
Username: "",
Password: "",
Bucket: 0,
ConnectionTimeout: 3* time.Second,
KVTimeout: 1* time.Second,
})

Config

type Config struct {
// The application username to Connect to the Couchbase cluster
Username string
// The application password to Connect to the Couchbase cluster
Password string
// The connection string for the Couchbase cluster
Host string
// The name of the bucket to Connect to
Bucket string
// The timeout for connecting to the Couchbase cluster
ConnectionTimeout time.Duration
// The timeout for performing operations on the Couchbase cluster
KVTimeout time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
Host: "127.0.0.1:8091",
Username: "admin",
Password: "123456",
Bucket: "fiber_storage",
ConnectionTimeout: 3 * time.Second,
KVTimeout: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/dynamodb/index.html b/storage/sqlite3_v1.x.x/dynamodb/index.html index 3655dceafbb..f4b00b5b39a 100644 --- a/storage/sqlite3_v1.x.x/dynamodb/index.html +++ b/storage/sqlite3_v1.x.x/dynamodb/index.html @@ -6,17 +6,17 @@ DynamoDB | Fiber - - + +
-
Version: sqlite3_v1.x.x

DynamoDB

Release +

Version: sqlite3_v1.x.x

DynamoDB

Release Discord Test Security -Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
- - +Linter

A DynamoDB storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

....

Table of Contents

Signatures

func New(config Config) Storage


func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *awsdynamodb.Client

Installation

DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the dynamodb implementation:

go get github.com/gofiber/storage/dynamodb

Examples

Import the storage package.

import "github.com/gofiber/storage/dynamodb"

You can use the following possibilities to create a storage:

// Initialize dynamodb
store := dynamodb.New(dynamodb.Config{

})

Config

type Config struct {
// Region of the DynamoDB service you want to use.
// Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region.
// E.g. "us-west-2".
// Optional (read from shared config file or environment variable if not set).
// Environment variable: "AWS_REGION".
Region string

// Name of the DynamoDB table.
// Optional ("fiber_storage" by default).
Table string

// CustomEndpoint allows you to set a custom DynamoDB service endpoint.
// This is especially useful if you're running a "DynamoDB local" Docker container for local testing.
// Typical value for the Docker container: "http://localhost:8000".
// See https://hub.docker.com/r/amazon/dynamodb-local/.
// Optional ("" by default)
Endpoint string

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
ReadCapacityUnits int64

// ReadCapacityUnits of the table.
// Only required when the table doesn't exist yet and is created by gokv.
// Optional (5 by default, which is the same default value as when creating a table in the web console)
// 25 RCUs are included in the free tier (across all tables).
// For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput.
// For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput.
WriteCapacityUnits int64

// If the table doesn't exist yet, gokv creates it.
// If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds.
// If the table still doesn't exist after 15 seconds, an error is returned.
// If WaitForTableCreation is false, gokv returns the client immediately.
// In the latter case you need to make sure that you don't read from or write to the table before it's created,
// because otherwise you will get ResourceNotFoundException errors.
// Optional (true by default).
WaitForTableCreation *bool
}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

var ConfigDefault = Config{
Table: "fiber_storage",
Credentials: Credentials{},
MaxAttempts: 3,
Reset: false,
ReadCapacityUnits: 5,
WriteCapacityUnits: 5,
WaitForTableCreation: aws.Bool(true),
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/etcd/index.html b/storage/sqlite3_v1.x.x/etcd/index.html index 6d06cb53dbb..b516dfa0fa5 100644 --- a/storage/sqlite3_v1.x.x/etcd/index.html +++ b/storage/sqlite3_v1.x.x/etcd/index.html @@ -6,17 +6,17 @@ Etcd | Fiber - - + +
-
Version: sqlite3_v1.x.x

Etcd

Release +

Version: sqlite3_v1.x.x

Etcd

Release Discord Test Security -Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
- - +Linter

A Etcd storage driver using etcd-io/etcd.

Table of Contents

Signatures

func New(config ...Config) *Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *clientv3.Client

Installation

Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the etcd implementation:

go get github.com/gofiber/storage/etcd

Examples

Import the storage package.

import "github.com/gofiber/storage/etcd"

You can use the following possibilities to create a storage:

// Initialize default config
store := etcd.New()

// Initialize custom config
store := etcd.New(Config{
Endpoints: []string{"localhost:2379"},
})

Config

type Config struct {
// Endpoints is a list of URLs.
Endpoints []string
// DialTimeout is the timeout for failing to establish a connection.
DialTimeout time.Duration
// Username is a username for authentication.
Username string
// Password is a password for authentication.
Password string
// TLS holds the client secure credentials, if any.
TLS *tls.Config
}

Default Config

var ConfigDefault = Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: 2 * time.Second,
Username: "",
Password: "",
TLS: nil,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/index.html b/storage/sqlite3_v1.x.x/index.html index 4f1c40ac318..90d4ec7e8a3 100644 --- a/storage/sqlite3_v1.x.x/index.html +++ b/storage/sqlite3_v1.x.x/index.html @@ -6,13 +6,13 @@ 👋 Welcome | Fiber - - + +
-
Version: sqlite3_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

- - +
Version: sqlite3_v1.x.x

👋 Welcome

FiberFiber

📦 Storage

Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares.

// Storage interface for communicating with different database/key-value
// providers. Visit https://github.com/gofiber/storage for more info.
type Storage interface {
// Get gets the value for the given key.
// `nil, nil` is returned when the key does not exist
Get(key string) ([]byte, error)

// Set stores the given value for the given key along
// with an expiration value, 0 means no expiration.
// Empty key or value will be ignored without an error.
Set(key string, val []byte, exp time.Duration) error

// Delete deletes the value for the given key.
// It returns no error if the storage does not contain the key,
Delete(key string) error

// Reset resets the storage and delete all keys.
Reset() error

// Close closes the storage and will stop any running garbage
// collectors and open connections.
Close() error
}

📑 Storage Implementations

+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/memcache/index.html b/storage/sqlite3_v1.x.x/memcache/index.html index d266958b8fe..9647e0f81a5 100644 --- a/storage/sqlite3_v1.x.x/memcache/index.html +++ b/storage/sqlite3_v1.x.x/memcache/index.html @@ -6,17 +6,17 @@ Memcache | Fiber - - + +
-
Version: sqlite3_v1.x.x

Memcache

Release +

Version: sqlite3_v1.x.x

Memcache

Release Discord Test Security -Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
- - +Linter

A Memcache storage driver using bradfitz/gomemcache.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mc.Client

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memcache"

You can use the following possibilities to create a storage:

// Initialize default config
store := memcache.New()

// Initialize custom config
store := memcache.New(memcache.Config{
Servers: "localhost:11211",
})

Config

type Config struct {
// Server list divided by ,
// i.e. server1:11211, server2:11212
//
// Optional. Default is "127.0.0.1:11211"
Servers string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
Servers: "127.0.0.1:11211",
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/memory/index.html b/storage/sqlite3_v1.x.x/memory/index.html index dd89c0967d9..5df999c52c5 100644 --- a/storage/sqlite3_v1.x.x/memory/index.html +++ b/storage/sqlite3_v1.x.x/memory/index.html @@ -6,17 +6,17 @@ Memory | Fiber - - + +
-
Version: sqlite3_v1.x.x

Memory

Release +

Version: sqlite3_v1.x.x

Memory

Release Discord Test Security -Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
- - +Linter

An in-memory storage driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() map[string]entry

Installation

Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the memory implementation:

go get github.com/gofiber/storage/memory

Examples

Import the storage package.

import "github.com/gofiber/storage/memory"

You can use the following possibilities to create a storage:

// Initialize default config
store := memory.New()

// Initialize custom config
store := memory.New(memory.Config{
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/mongodb/index.html b/storage/sqlite3_v1.x.x/mongodb/index.html index f5c2fde5022..7bea5228bce 100644 --- a/storage/sqlite3_v1.x.x/mongodb/index.html +++ b/storage/sqlite3_v1.x.x/mongodb/index.html @@ -6,17 +6,17 @@ MongoDB | Fiber - - + +
-
Version: sqlite3_v1.x.x

MongoDB

Release +

Version: sqlite3_v1.x.x

MongoDB

Release Discord Test Security -Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
- - +Linter

A MongoDB storage driver using mongodb/mongo-go-driver.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *mongo.Database

Installation

MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mongodb implementation:

go get github.com/gofiber/storage/mongodb

Examples

Import the storage package.

import "github.com/gofiber/storage/mongodb"

You can use the following possibilities to create a storage:

// Initialize default config
store := mongodb.New()

// Initialize custom config
store := mongodb.New(mongodb.Config{
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

// Initialize custom config using connection string
store := mongodb.New(mongodb.Config{
ConnectionURI: "mongodb://user:password@127.0.0.1:27017",
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
})

Config

type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 27017
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Collection name
//
// Optional. Default is "fiber_storage"
Collection string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 27017,
Database: "fiber",
Collection: "fiber_storage",
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/mssql/index.html b/storage/sqlite3_v1.x.x/mssql/index.html index ae803fcb714..9db27fb45da 100644 --- a/storage/sqlite3_v1.x.x/mssql/index.html +++ b/storage/sqlite3_v1.x.x/mssql/index.html @@ -6,17 +6,17 @@ MSSQL | Fiber - - + +
-
Version: sqlite3_v1.x.x

MSSQL

Release +

Version: sqlite3_v1.x.x

MSSQL

Release Discord Test Security -Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
- - +Linter

A MSSQL storage driver using microsoft/go-mssqldb.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mssql implementation:

go get github.com/gofiber/storage/mssql

Examples

Import the storage package.

import "github.com/gofiber/storage/mssql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mssql.New()

// Initialize custom config
store := mssql.New(mssql.Config{
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
})

// Initialize custom config using connection string
store := mssql.New(mssql.Config{
ConnectionURI: "sqlserver://user:password@localhost:1433?database=fiber"
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 1433
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Instance name
//
// Optional. Default is ""
Instance string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// The SSL mode for the connection
//
// Optional. Default is "disable"
SslMode string
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 1433,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
SslMode: "disable",
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/mysql/index.html b/storage/sqlite3_v1.x.x/mysql/index.html index dc05382a1a1..40849116888 100644 --- a/storage/sqlite3_v1.x.x/mysql/index.html +++ b/storage/sqlite3_v1.x.x/mysql/index.html @@ -6,17 +6,17 @@ MySQL | Fiber - - + +
-
Version: sqlite3_v1.x.x

MySQL

Release +

Version: sqlite3_v1.x.x

MySQL

Release Discord Test Security -Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A MySQL storage driver using database/sql and go-sql-driver/mysql.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the mysql implementation:

go get github.com/gofiber/storage/mysql

Examples

Import the storage package.

import "github.com/gofiber/storage/mysql"

You can use the following possibilities to create a storage:

// Initialize default config
store := mysql.New()

// Initialize custom config
store := mysql.New(mysql.Config{
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using connection string
store := mysql.New(mysql.Config{
ConnectionURI: "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>"
Reset: false,
GCInterval: 10 * time.Second,
})

// Initialize custom config using sql db connection
db, _ := sql.Open("mysql", "<username>:<pw>@tcp(<HOST>:<port>)/<dbname>")
store := mysql.New(mysql.Config{
Db: db,
Reset: false,
GCInterval: 10 * time.Second,
})

Config

type Config struct {
// DB Will override ConnectionURI and all other authentication values if used
//
// Optional. Default is nil
Db *sql.DB

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 3306
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 3306,
Database: "fiber",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/pebble/index.html b/storage/sqlite3_v1.x.x/pebble/index.html index 8793e995e92..62572617841 100644 --- a/storage/sqlite3_v1.x.x/pebble/index.html +++ b/storage/sqlite3_v1.x.x/pebble/index.html @@ -6,17 +6,17 @@ Pebble | Fiber - - + +
-
Version: sqlite3_v1.x.x

Pebble

Release +

Version: sqlite3_v1.x.x

Pebble

Release Discord Test Security -Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
- - +Linter

A fast key-value DB using cockroachdb/pebble

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *badger.DB

Installation

Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

Note: This step is only required if you don't have an existing module.

And then install the Pebble implementation:

go get github.com/gofiber/storage/pebble

Examples

Import the storage package.

import "github.com/gofiber/storage/pebble"

You can use the following possibilities to create a storage:

// Initialize default config
store := pebble.New()

// Initialize custom config
store := pebble.New(pebble.Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
})

Config

type Config struct {
// Database name
//
// Optional. Default is "./db"
Path string

// Pass write options during write operations
//
// Optional. Default is nil
WriteOptions &pebble.WriteOptions{}
}

Default Config

var ConfigDefault = Config{
Path: "db",
WriteOptions: &pebble.WriteOptions{},
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/postgres/index.html b/storage/sqlite3_v1.x.x/postgres/index.html index 3b8ee6e372a..d4178bc3fe2 100644 --- a/storage/sqlite3_v1.x.x/postgres/index.html +++ b/storage/sqlite3_v1.x.x/postgres/index.html @@ -6,17 +6,17 @@ Postgres | Fiber - - + +
-
Version: sqlite3_v1.x.x

Postgres

Release +

Version: sqlite3_v1.x.x

Postgres

Release Discord Test Security -Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
- - +Linter

A Postgres storage driver using jackc/pgx.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *pgxpool.Pool

Installation

Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the postgres implementation:

go get github.com/gofiber/storage/postgres/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/postgres/v2"

You can use the following possibilities to create a storage:

// Initialize default config
store := postgres.New()

// Initialize custom config
store := postgres.New(postgres.Config{
Db: dbPool,
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
})

Config

// Config defines the config for storage.
type Config struct {
// DB pgxpool.Pool object will override connection uri and other connection fields
//
// Optional. Default is nil
DB *pgxpool.Pool

// Connection string to use for DB. Will override all other authentication values if used
//
// Optional. Default is ""
ConnectionURI string

// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 5432
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// The SSL mode for the connection
//
// Optional. Default is "disable"
SSLMode string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration
}

Default Config

// ConfigDefault is the default config
var ConfigDefault = Config{
ConnectionURI: "",
Host: "127.0.0.1",
Port: 5432,
Database: "fiber",
Table: "fiber_storage",
SSLMode: "disable",
Reset: false,
GCInterval: 10 * time.Second,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/redis/index.html b/storage/sqlite3_v1.x.x/redis/index.html index 7c47c4ad269..0577dd1019c 100644 --- a/storage/sqlite3_v1.x.x/redis/index.html +++ b/storage/sqlite3_v1.x.x/redis/index.html @@ -6,17 +6,17 @@ Redis | Fiber - - + +
-
Version: sqlite3_v1.x.x

Redis

Release +

Version: sqlite3_v1.x.x

Redis

Release Discord Test Security -Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
- - +Linter

A Redis storage driver using go-redis/redis.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() redis.UniversalClient

Installation

Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the redis implementation:

go get github.com/gofiber/storage/redis/v2

Examples

Import the storage package.

import "github.com/gofiber/storage/redis/v2"

You can use the one of the following options to create a Redis Storage:

// Initialize default config
store := redis.New()

// Initialize custom config
store := redis.New(redis.Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
})

// Initialize Redis Failover Client
store := redis.New(redis.Config{
MasterName: "master-name",
Addrs: []string{":6379"},
})

// Initialize Redis Cluster Client
store := redis.New(redis.Config{
Addrs: []string{":6379", ":6380"},
})

// Create a client with support for TLS
cer, err := tls.LoadX509KeyPair("./client.crt", "./client.key")
if err != nil {
log.Println(err)
return
}
tlsCfg := &tls.Config{
MinVersion: tls.VersionTLS12,
InsecureSkipVerify: true,
Certificates: []tls.Certificate{cer},
}
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
TLSConfig: tlsCfg,
Reset: false,
})

// Create a client with a Redis URL with all information.
store = redis.New(redis.Config{
URL: "redis://<user>:<pass>@127.0.0.1:6379/<db>",
Reset: false,
})

Config

type Config struct {
// Host name where the DB is hosted
//
// Optional. Default is "127.0.0.1"
Host string

// Port where the DB is listening on
//
// Optional. Default is 6379
Port int

// Server username
//
// Optional. Default is ""
Username string

// Server password
//
// Optional. Default is ""
Password string

// Database to be selected after connecting to the server.
//
// Optional. Default is 0
Database int

// URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
//
// Example: redis://<user>:<pass>@localhost:6379/<db>
// Optional. Default is ""
URL string

// Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient
//
// Optional. Default is []string{}
Addrs []string

// MasterName is the sentinel master's name
//
// Optional. Default is ""
MasterName string

// ClientName will execute the `CLIENT SETNAME ClientName` command for each conn.
//
// Optional. Default is ""
ClientName string

// SentinelUsername
//
// Optional. Default is ""
SentinelUsername string

// SentinelPassword
//
// Optional. Default is ""
SentinelPassword string

// Reset clears any existing keys in existing Collection
//
// Optional. Default is false
Reset bool

// TLS Config to use. When set TLS will be negotiated.
//
// Optional. Default is nil
TLSConfig *tls.Config

// Maximum number of socket connections.
//
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
PoolSize int
}

Default Config

var ConfigDefault = Config{
Host: "127.0.0.1",
Port: 6379,
Username: "",
Password: "",
URL: "",
Database: 0,
Reset: false,
TLSConfig: nil,
PoolSize: 10 * runtime.GOMAXPROCS(0),
Addrs: []string{},
MasterName: "",
ClientName: "",
SentinelUsername: "",
SentinelPassword: "",
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/ristretto/index.html b/storage/sqlite3_v1.x.x/ristretto/index.html index 984e48880d4..8484d4e40b7 100644 --- a/storage/sqlite3_v1.x.x/ristretto/index.html +++ b/storage/sqlite3_v1.x.x/ristretto/index.html @@ -6,17 +6,17 @@ Ristretto | Fiber - - + +
-
Version: sqlite3_v1.x.x

Ristretto

Release +

Version: sqlite3_v1.x.x

Ristretto

Release Discord Test Security -Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
- - +Linter

A Memory-bound storage driver using dgraph-io/ristretto.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *ristretto.Cache

Installation

Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the ristretto implementation:

go get github.com/gofiber/storage/ristretto

Examples

Import the storage package.

import "github.com/gofiber/storage/ristretto"

You can use the following possibilities to create a storage:

// Initialize default config
store := ristretto.New()

// Initialize custom config
store := ristretto.New(ristretto.Config{
NumCounters: 1e7, // number of keys to track frequency of (10M).
MaxCost: 1 << 30, // maximum cost of cache (1GB).
BufferItems: 64, // number of keys per Get buffer.
})

Config

type Config struct {
// NumCounters number of keys to track frequency of (10M).
NumCounters int64

// MaxCost maximum cost of cache (1GB).
MaxCost int64

// BufferItems number of keys per Get buffer.
BufferItems int64
}

Default Config

var ConfigDefault = Config{
NumCounters: 1e7,
MaxCost: 1 << 30,
BufferItems: 64,
DefaultCost: 1,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/s3/index.html b/storage/sqlite3_v1.x.x/s3/index.html index b065e2b957e..51a10792977 100644 --- a/storage/sqlite3_v1.x.x/s3/index.html +++ b/storage/sqlite3_v1.x.x/s3/index.html @@ -6,17 +6,17 @@ S3 | Fiber - - + +
-
Version: sqlite3_v1.x.x

S3

Release +

Version: sqlite3_v1.x.x

S3

Release Discord Test Security -Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
- - +Linter

A S3 storage driver using aws/aws-sdk-go-v2.

Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *s3.Client

Installation

S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the s3 implementation:

go get github.com/gofiber/storage/s3

Examples

Import the storage package.

import "github.com/gofiber/storage/s3"

You can use the following possibilities to create a storage:

// Initialize default config
store := s3.New()

// Initialize custom config
store := s3.New(s3.Config{
Bucket: "my-bucket-url",
Endpoint: "my-endpoint",
Region: "my-region",
Reset: false,
})

Config

// Config defines the config for storage.
type Config struct {
// S3 bucket name
Bucket string

// AWS endpoint
Endpoint string

// AWS region
Region string

// Request timeout
//
// Optional. Default is 0 (no timeout)
RequestTimeout time.Duration

// Reset clears any existing keys in existing Bucket
//
// Optional. Default is false
Reset bool

// Credentials overrides AWS access key and AWS secret access key. Not recommended.
//
// Optional. Default is Credentials{}
Credentials Credentials

// The maximum number of times requests that encounter retryable failures should be attempted.
//
// Optional. Default is 3
MaxAttempts int

}

type Credentials struct {
AccessKey string
SecretAccessKey string
}

Default Config

The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten:

// ConfigDefault is the default config
var ConfigDefault = Config{
Bucket: "",
Region: "",
Endpoint: "",
Credentials: Credentials{},
MaxAttempts: 3,
RequestTimeout: 0,
Reset: false,
}
+ + \ No newline at end of file diff --git a/storage/sqlite3_v1.x.x/search-index.json b/storage/sqlite3_v1.x.x/search-index.json index 5e796e773e1..c572c038cd3 100644 --- a/storage/sqlite3_v1.x.x/search-index.json +++ b/storage/sqlite3_v1.x.x/search-index.json @@ -1 +1 @@ -[{"documents":[{"i":3598,"t":"👋 Welcome","u":"/storage/sqlite3_v1.x.x/","b":[]},{"i":3603,"t":"Badger","u":"/storage/sqlite3_v1.x.x/badger/","b":[]},{"i":3617,"t":"ArangoDB","u":"/storage/sqlite3_v1.x.x/arangodb/","b":[]},{"i":3631,"t":"Bbolt","u":"/storage/sqlite3_v1.x.x/bbolt/","b":[]},{"i":3645,"t":"Azure Blob","u":"/storage/sqlite3_v1.x.x/azureblob/","b":[]},{"i":3659,"t":"Couchbase","u":"/storage/sqlite3_v1.x.x/couchbase/","b":[]},{"i":3673,"t":"DynamoDB","u":"/storage/sqlite3_v1.x.x/dynamodb/","b":[]},{"i":3687,"t":"Etcd","u":"/storage/sqlite3_v1.x.x/etcd/","b":[]},{"i":3701,"t":"Memcache","u":"/storage/sqlite3_v1.x.x/memcache/","b":[]},{"i":3715,"t":"Memory","u":"/storage/sqlite3_v1.x.x/memory/","b":[]},{"i":3729,"t":"MongoDB","u":"/storage/sqlite3_v1.x.x/mongodb/","b":[]},{"i":3743,"t":"MSSQL","u":"/storage/sqlite3_v1.x.x/mssql/","b":[]},{"i":3757,"t":"MySQL","u":"/storage/sqlite3_v1.x.x/mysql/","b":[]},{"i":3771,"t":"Pebble","u":"/storage/sqlite3_v1.x.x/pebble/","b":[]},{"i":3785,"t":"Postgres","u":"/storage/sqlite3_v1.x.x/postgres/","b":[]},{"i":3799,"t":"Redis","u":"/storage/sqlite3_v1.x.x/redis/","b":[]},{"i":3813,"t":"Ristretto","u":"/storage/sqlite3_v1.x.x/ristretto/","b":[]},{"i":3827,"t":"S3","u":"/storage/sqlite3_v1.x.x/s3/","b":[]},{"i":3841,"t":"SQLite3","u":"/storage/sqlite3_v1.x.x/sqlite3/","b":[]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3598",[0,1.946,1,1.946]],["t/3603",[2,2.695]],["t/3617",[3,2.695]],["t/3631",[4,2.695]],["t/3645",[5,1.946,6,1.946]],["t/3659",[7,2.695]],["t/3673",[8,2.695]],["t/3687",[9,2.695]],["t/3701",[10,2.695]],["t/3715",[11,2.695]],["t/3729",[12,2.695]],["t/3743",[13,2.695]],["t/3757",[14,2.695]],["t/3771",[15,2.695]],["t/3785",[16,2.695]],["t/3799",[17,2.695]],["t/3813",[18,2.695]],["t/3827",[19,2.695]],["t/3841",[20,2.695]]],"invertedIndex":[["",{"_index":0,"t":{"3598":{"position":[[0,2]]}}}],["arangodb",{"_index":3,"t":{"3617":{"position":[[0,8]]}}}],["azur",{"_index":5,"t":{"3645":{"position":[[0,5]]}}}],["badger",{"_index":2,"t":{"3603":{"position":[[0,6]]}}}],["bbolt",{"_index":4,"t":{"3631":{"position":[[0,5]]}}}],["blob",{"_index":6,"t":{"3645":{"position":[[6,4]]}}}],["couchbas",{"_index":7,"t":{"3659":{"position":[[0,9]]}}}],["dynamodb",{"_index":8,"t":{"3673":{"position":[[0,8]]}}}],["etcd",{"_index":9,"t":{"3687":{"position":[[0,4]]}}}],["memcach",{"_index":10,"t":{"3701":{"position":[[0,8]]}}}],["memori",{"_index":11,"t":{"3715":{"position":[[0,6]]}}}],["mongodb",{"_index":12,"t":{"3729":{"position":[[0,7]]}}}],["mssql",{"_index":13,"t":{"3743":{"position":[[0,5]]}}}],["mysql",{"_index":14,"t":{"3757":{"position":[[0,5]]}}}],["pebbl",{"_index":15,"t":{"3771":{"position":[[0,6]]}}}],["postgr",{"_index":16,"t":{"3785":{"position":[[0,8]]}}}],["redi",{"_index":17,"t":{"3799":{"position":[[0,5]]}}}],["ristretto",{"_index":18,"t":{"3813":{"position":[[0,9]]}}}],["s3",{"_index":19,"t":{"3827":{"position":[[0,2]]}}}],["sqlite3",{"_index":20,"t":{"3841":{"position":[[0,7]]}}}],["welcom",{"_index":1,"t":{"3598":{"position":[[3,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3599,"t":"📦 Storage","u":"/storage/sqlite3_v1.x.x/","h":"","p":3598},{"i":3601,"t":"📑 Storage Implementations","u":"/storage/sqlite3_v1.x.x/","h":"#-storage-implementations","p":3598},{"i":3605,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/badger/","h":"#table-of-contents","p":3603},{"i":3607,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/badger/","h":"#signatures","p":3603},{"i":3609,"t":"Installation","u":"/storage/sqlite3_v1.x.x/badger/","h":"#installation","p":3603},{"i":3611,"t":"Examples","u":"/storage/sqlite3_v1.x.x/badger/","h":"#examples","p":3603},{"i":3613,"t":"Config","u":"/storage/sqlite3_v1.x.x/badger/","h":"#config","p":3603},{"i":3615,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/badger/","h":"#default-config","p":3603},{"i":3619,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#table-of-contents","p":3617},{"i":3621,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#signatures","p":3617},{"i":3623,"t":"Installation","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#installation","p":3617},{"i":3625,"t":"Examples","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#examples","p":3617},{"i":3627,"t":"Config","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#config","p":3617},{"i":3629,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#default-config","p":3617},{"i":3633,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#table-of-contents","p":3631},{"i":3635,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#signatures","p":3631},{"i":3637,"t":"Installation","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#installation","p":3631},{"i":3639,"t":"Examples","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#examples","p":3631},{"i":3641,"t":"Config","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#config","p":3631},{"i":3643,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#default-config","p":3631},{"i":3647,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#table-of-contents","p":3645},{"i":3649,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#signatures","p":3645},{"i":3651,"t":"Installation","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#installation","p":3645},{"i":3653,"t":"Examples","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#examples","p":3645},{"i":3655,"t":"Config","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#config","p":3645},{"i":3657,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#default-config","p":3645},{"i":3661,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#table-of-contents","p":3659},{"i":3663,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#signatures","p":3659},{"i":3665,"t":"Installation","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#installation","p":3659},{"i":3667,"t":"Examples","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#examples","p":3659},{"i":3669,"t":"Config","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#config","p":3659},{"i":3671,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#default-config","p":3659},{"i":3675,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#table-of-contents","p":3673},{"i":3677,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#signatures","p":3673},{"i":3679,"t":"Installation","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#installation","p":3673},{"i":3681,"t":"Examples","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#examples","p":3673},{"i":3683,"t":"Config","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#config","p":3673},{"i":3685,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#default-config","p":3673},{"i":3689,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#table-of-contents","p":3687},{"i":3691,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#signatures","p":3687},{"i":3693,"t":"Installation","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#installation","p":3687},{"i":3695,"t":"Examples","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#examples","p":3687},{"i":3697,"t":"Config","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#config","p":3687},{"i":3699,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#default-config","p":3687},{"i":3703,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#table-of-contents","p":3701},{"i":3705,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#signatures","p":3701},{"i":3707,"t":"Installation","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#installation","p":3701},{"i":3709,"t":"Examples","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#examples","p":3701},{"i":3711,"t":"Config","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#config","p":3701},{"i":3713,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#default-config","p":3701},{"i":3717,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/memory/","h":"#table-of-contents","p":3715},{"i":3719,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/memory/","h":"#signatures","p":3715},{"i":3721,"t":"Installation","u":"/storage/sqlite3_v1.x.x/memory/","h":"#installation","p":3715},{"i":3723,"t":"Examples","u":"/storage/sqlite3_v1.x.x/memory/","h":"#examples","p":3715},{"i":3725,"t":"Config","u":"/storage/sqlite3_v1.x.x/memory/","h":"#config","p":3715},{"i":3727,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/memory/","h":"#default-config","p":3715},{"i":3731,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#table-of-contents","p":3729},{"i":3733,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#signatures","p":3729},{"i":3735,"t":"Installation","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#installation","p":3729},{"i":3737,"t":"Examples","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#examples","p":3729},{"i":3739,"t":"Config","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#config","p":3729},{"i":3741,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#default-config","p":3729},{"i":3745,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#table-of-contents","p":3743},{"i":3747,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#signatures","p":3743},{"i":3749,"t":"Installation","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#installation","p":3743},{"i":3751,"t":"Examples","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#examples","p":3743},{"i":3753,"t":"Config","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#config","p":3743},{"i":3755,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#default-config","p":3743},{"i":3759,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#table-of-contents","p":3757},{"i":3761,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#signatures","p":3757},{"i":3763,"t":"Installation","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#installation","p":3757},{"i":3765,"t":"Examples","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#examples","p":3757},{"i":3767,"t":"Config","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#config","p":3757},{"i":3769,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#default-config","p":3757},{"i":3773,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#table-of-contents","p":3771},{"i":3775,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#signatures","p":3771},{"i":3777,"t":"Installation","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#installation","p":3771},{"i":3779,"t":"Examples","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#examples","p":3771},{"i":3781,"t":"Config","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#config","p":3771},{"i":3783,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#default-config","p":3771},{"i":3787,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#table-of-contents","p":3785},{"i":3789,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#signatures","p":3785},{"i":3791,"t":"Installation","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#installation","p":3785},{"i":3793,"t":"Examples","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#examples","p":3785},{"i":3795,"t":"Config","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#config","p":3785},{"i":3797,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#default-config","p":3785},{"i":3801,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/redis/","h":"#table-of-contents","p":3799},{"i":3803,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/redis/","h":"#signatures","p":3799},{"i":3805,"t":"Installation","u":"/storage/sqlite3_v1.x.x/redis/","h":"#installation","p":3799},{"i":3807,"t":"Examples","u":"/storage/sqlite3_v1.x.x/redis/","h":"#examples","p":3799},{"i":3809,"t":"Config","u":"/storage/sqlite3_v1.x.x/redis/","h":"#config","p":3799},{"i":3811,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/redis/","h":"#default-config","p":3799},{"i":3815,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#table-of-contents","p":3813},{"i":3817,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#signatures","p":3813},{"i":3819,"t":"Installation","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#installation","p":3813},{"i":3821,"t":"Examples","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#examples","p":3813},{"i":3823,"t":"Config","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#config","p":3813},{"i":3825,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#default-config","p":3813},{"i":3829,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/s3/","h":"#table-of-contents","p":3827},{"i":3831,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/s3/","h":"#signatures","p":3827},{"i":3833,"t":"Installation","u":"/storage/sqlite3_v1.x.x/s3/","h":"#installation","p":3827},{"i":3835,"t":"Examples","u":"/storage/sqlite3_v1.x.x/s3/","h":"#examples","p":3827},{"i":3837,"t":"Config","u":"/storage/sqlite3_v1.x.x/s3/","h":"#config","p":3827},{"i":3839,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/s3/","h":"#default-config","p":3827},{"i":3843,"t":"Table of Contents","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#table-of-contents","p":3841},{"i":3845,"t":"Signatures","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#signatures","p":3841},{"i":3847,"t":"Installation","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#installation","p":3841},{"i":3849,"t":"Examples","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#examples","p":3841},{"i":3851,"t":"Config","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#config","p":3841},{"i":3853,"t":"Default Config","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#default-config","p":3841}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3599",[0,3.174,1,3.174]],["t/3601",[0,2.534,1,2.534,2,2.875]],["t/3605",[3,1.499,4,1.499]],["t/3607",[5,2.007]],["t/3609",[6,2.007]],["t/3611",[7,2.007]],["t/3613",[8,1.246]],["t/3615",[8,0.931,9,1.499]],["t/3619",[3,1.499,4,1.499]],["t/3621",[5,2.007]],["t/3623",[6,2.007]],["t/3625",[7,2.007]],["t/3627",[8,1.246]],["t/3629",[8,0.931,9,1.499]],["t/3633",[3,1.499,4,1.499]],["t/3635",[5,2.007]],["t/3637",[6,2.007]],["t/3639",[7,2.007]],["t/3641",[8,1.246]],["t/3643",[8,0.931,9,1.499]],["t/3647",[3,1.499,4,1.499]],["t/3649",[5,2.007]],["t/3651",[6,2.007]],["t/3653",[7,2.007]],["t/3655",[8,1.246]],["t/3657",[8,0.931,9,1.499]],["t/3661",[3,1.499,4,1.499]],["t/3663",[5,2.007]],["t/3665",[6,2.007]],["t/3667",[7,2.007]],["t/3669",[8,1.246]],["t/3671",[8,0.931,9,1.499]],["t/3675",[3,1.499,4,1.499]],["t/3677",[5,2.007]],["t/3679",[6,2.007]],["t/3681",[7,2.007]],["t/3683",[8,1.246]],["t/3685",[8,0.931,9,1.499]],["t/3689",[3,1.499,4,1.499]],["t/3691",[5,2.007]],["t/3693",[6,2.007]],["t/3695",[7,2.007]],["t/3697",[8,1.246]],["t/3699",[8,0.931,9,1.499]],["t/3703",[3,1.499,4,1.499]],["t/3705",[5,2.007]],["t/3707",[6,2.007]],["t/3709",[7,2.007]],["t/3711",[8,1.246]],["t/3713",[8,0.931,9,1.499]],["t/3717",[3,1.499,4,1.499]],["t/3719",[5,2.007]],["t/3721",[6,2.007]],["t/3723",[7,2.007]],["t/3725",[8,1.246]],["t/3727",[8,0.931,9,1.499]],["t/3731",[3,1.499,4,1.499]],["t/3733",[5,2.007]],["t/3735",[6,2.007]],["t/3737",[7,2.007]],["t/3739",[8,1.246]],["t/3741",[8,0.931,9,1.499]],["t/3745",[3,1.499,4,1.499]],["t/3747",[5,2.007]],["t/3749",[6,2.007]],["t/3751",[7,2.007]],["t/3753",[8,1.246]],["t/3755",[8,0.931,9,1.499]],["t/3759",[3,1.499,4,1.499]],["t/3761",[5,2.007]],["t/3763",[6,2.007]],["t/3765",[7,2.007]],["t/3767",[8,1.246]],["t/3769",[8,0.931,9,1.499]],["t/3773",[3,1.499,4,1.499]],["t/3775",[5,2.007]],["t/3777",[6,2.007]],["t/3779",[7,2.007]],["t/3781",[8,1.246]],["t/3783",[8,0.931,9,1.499]],["t/3787",[3,1.499,4,1.499]],["t/3789",[5,2.007]],["t/3791",[6,2.007]],["t/3793",[7,2.007]],["t/3795",[8,1.246]],["t/3797",[8,0.931,9,1.499]],["t/3801",[3,1.499,4,1.499]],["t/3803",[5,2.007]],["t/3805",[6,2.007]],["t/3807",[7,2.007]],["t/3809",[8,1.246]],["t/3811",[8,0.931,9,1.499]],["t/3815",[3,1.499,4,1.499]],["t/3817",[5,2.007]],["t/3819",[6,2.007]],["t/3821",[7,2.007]],["t/3823",[8,1.246]],["t/3825",[8,0.931,9,1.499]],["t/3829",[3,1.499,4,1.499]],["t/3831",[5,2.007]],["t/3833",[6,2.007]],["t/3835",[7,2.007]],["t/3837",[8,1.246]],["t/3839",[8,0.931,9,1.499]],["t/3843",[3,1.499,4,1.499]],["t/3845",[5,2.007]],["t/3847",[6,2.007]],["t/3849",[7,2.007]],["t/3851",[8,1.246]],["t/3853",[8,0.931,9,1.499]]],"invertedIndex":[["",{"_index":0,"t":{"3599":{"position":[[0,2]]},"3601":{"position":[[0,2]]}}}],["config",{"_index":8,"t":{"3613":{"position":[[0,6]]},"3615":{"position":[[8,6]]},"3627":{"position":[[0,6]]},"3629":{"position":[[8,6]]},"3641":{"position":[[0,6]]},"3643":{"position":[[8,6]]},"3655":{"position":[[0,6]]},"3657":{"position":[[8,6]]},"3669":{"position":[[0,6]]},"3671":{"position":[[8,6]]},"3683":{"position":[[0,6]]},"3685":{"position":[[8,6]]},"3697":{"position":[[0,6]]},"3699":{"position":[[8,6]]},"3711":{"position":[[0,6]]},"3713":{"position":[[8,6]]},"3725":{"position":[[0,6]]},"3727":{"position":[[8,6]]},"3739":{"position":[[0,6]]},"3741":{"position":[[8,6]]},"3753":{"position":[[0,6]]},"3755":{"position":[[8,6]]},"3767":{"position":[[0,6]]},"3769":{"position":[[8,6]]},"3781":{"position":[[0,6]]},"3783":{"position":[[8,6]]},"3795":{"position":[[0,6]]},"3797":{"position":[[8,6]]},"3809":{"position":[[0,6]]},"3811":{"position":[[8,6]]},"3823":{"position":[[0,6]]},"3825":{"position":[[8,6]]},"3837":{"position":[[0,6]]},"3839":{"position":[[8,6]]},"3851":{"position":[[0,6]]},"3853":{"position":[[8,6]]}}}],["content",{"_index":4,"t":{"3605":{"position":[[9,8]]},"3619":{"position":[[9,8]]},"3633":{"position":[[9,8]]},"3647":{"position":[[9,8]]},"3661":{"position":[[9,8]]},"3675":{"position":[[9,8]]},"3689":{"position":[[9,8]]},"3703":{"position":[[9,8]]},"3717":{"position":[[9,8]]},"3731":{"position":[[9,8]]},"3745":{"position":[[9,8]]},"3759":{"position":[[9,8]]},"3773":{"position":[[9,8]]},"3787":{"position":[[9,8]]},"3801":{"position":[[9,8]]},"3815":{"position":[[9,8]]},"3829":{"position":[[9,8]]},"3843":{"position":[[9,8]]}}}],["default",{"_index":9,"t":{"3615":{"position":[[0,7]]},"3629":{"position":[[0,7]]},"3643":{"position":[[0,7]]},"3657":{"position":[[0,7]]},"3671":{"position":[[0,7]]},"3685":{"position":[[0,7]]},"3699":{"position":[[0,7]]},"3713":{"position":[[0,7]]},"3727":{"position":[[0,7]]},"3741":{"position":[[0,7]]},"3755":{"position":[[0,7]]},"3769":{"position":[[0,7]]},"3783":{"position":[[0,7]]},"3797":{"position":[[0,7]]},"3811":{"position":[[0,7]]},"3825":{"position":[[0,7]]},"3839":{"position":[[0,7]]},"3853":{"position":[[0,7]]}}}],["exampl",{"_index":7,"t":{"3611":{"position":[[0,8]]},"3625":{"position":[[0,8]]},"3639":{"position":[[0,8]]},"3653":{"position":[[0,8]]},"3667":{"position":[[0,8]]},"3681":{"position":[[0,8]]},"3695":{"position":[[0,8]]},"3709":{"position":[[0,8]]},"3723":{"position":[[0,8]]},"3737":{"position":[[0,8]]},"3751":{"position":[[0,8]]},"3765":{"position":[[0,8]]},"3779":{"position":[[0,8]]},"3793":{"position":[[0,8]]},"3807":{"position":[[0,8]]},"3821":{"position":[[0,8]]},"3835":{"position":[[0,8]]},"3849":{"position":[[0,8]]}}}],["implement",{"_index":2,"t":{"3601":{"position":[[11,15]]}}}],["instal",{"_index":6,"t":{"3609":{"position":[[0,12]]},"3623":{"position":[[0,12]]},"3637":{"position":[[0,12]]},"3651":{"position":[[0,12]]},"3665":{"position":[[0,12]]},"3679":{"position":[[0,12]]},"3693":{"position":[[0,12]]},"3707":{"position":[[0,12]]},"3721":{"position":[[0,12]]},"3735":{"position":[[0,12]]},"3749":{"position":[[0,12]]},"3763":{"position":[[0,12]]},"3777":{"position":[[0,12]]},"3791":{"position":[[0,12]]},"3805":{"position":[[0,12]]},"3819":{"position":[[0,12]]},"3833":{"position":[[0,12]]},"3847":{"position":[[0,12]]}}}],["signatur",{"_index":5,"t":{"3607":{"position":[[0,10]]},"3621":{"position":[[0,10]]},"3635":{"position":[[0,10]]},"3649":{"position":[[0,10]]},"3663":{"position":[[0,10]]},"3677":{"position":[[0,10]]},"3691":{"position":[[0,10]]},"3705":{"position":[[0,10]]},"3719":{"position":[[0,10]]},"3733":{"position":[[0,10]]},"3747":{"position":[[0,10]]},"3761":{"position":[[0,10]]},"3775":{"position":[[0,10]]},"3789":{"position":[[0,10]]},"3803":{"position":[[0,10]]},"3817":{"position":[[0,10]]},"3831":{"position":[[0,10]]},"3845":{"position":[[0,10]]}}}],["storag",{"_index":1,"t":{"3599":{"position":[[3,7]]},"3601":{"position":[[3,7]]}}}],["tabl",{"_index":3,"t":{"3605":{"position":[[0,5]]},"3619":{"position":[[0,5]]},"3633":{"position":[[0,5]]},"3647":{"position":[[0,5]]},"3661":{"position":[[0,5]]},"3675":{"position":[[0,5]]},"3689":{"position":[[0,5]]},"3703":{"position":[[0,5]]},"3717":{"position":[[0,5]]},"3731":{"position":[[0,5]]},"3745":{"position":[[0,5]]},"3759":{"position":[[0,5]]},"3773":{"position":[[0,5]]},"3787":{"position":[[0,5]]},"3801":{"position":[[0,5]]},"3815":{"position":[[0,5]]},"3829":{"position":[[0,5]]},"3843":{"position":[[0,5]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3600,"t":"Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares. // Storage interface for communicating with different database/key-value // providers. Visit https://github.com/gofiber/storage for more info. type Storage interface { // Get gets the value for the given key. // `nil, nil` is returned when the key does not exist Get(key string) ([]byte, error) // Set stores the given value for the given key along // with an expiration value, 0 means no expiration. // Empty key or value will be ignored without an error. Set(key string, val []byte, exp time.Duration) error // Delete deletes the value for the given key. // It returns no error if the storage does not contain the key, Delete(key string) error // Reset resets the storage and delete all keys. Reset() error // Close closes the storage and will stop any running garbage // collectors and open connections. Close() error }","s":"📦 Storage","u":"/storage/sqlite3_v1.x.x/","h":"","p":3598},{"i":3602,"t":"ArangoDB AzureBlob Badger Bbolt Couchbase DynamoDB Etcd Memcache Memory MongoDB MSSQL MySQL Pebble Postgres Redis S3 SQLite3","s":"📑 Storage Implementations","u":"/storage/sqlite3_v1.x.x/","h":"#-storage-implementations","p":3598},{"i":3604,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/sqlite3_v1.x.x/badger/","h":"","p":3603},{"i":3606,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/badger/","h":"#table-of-contents","p":3603},{"i":3608,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/badger/","h":"#signatures","p":3603},{"i":3610,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/sqlite3_v1.x.x/badger/","h":"#installation","p":3603},{"i":3612,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/badger/","h":"#examples","p":3603},{"i":3614,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/sqlite3_v1.x.x/badger/","h":"#config","p":3603},{"i":3616,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/badger/","h":"#default-config","p":3603},{"i":3618,"t":"A ArangoDB storage driver using arangodb/go-driver and arangodb/go-driver.","s":"ArangoDB","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"","p":3617},{"i":3620,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#table-of-contents","p":3617},{"i":3622,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() driver.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#signatures","p":3617},{"i":3624,"t":"ArangoDB is tested on the 2 last (1.14/1.15) Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#installation","p":3617},{"i":3626,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#examples","p":3617},{"i":3628,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#config","p":3617},{"i":3630,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#default-config","p":3617},{"i":3632,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"","p":3631},{"i":3634,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#table-of-contents","p":3631},{"i":3636,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#signatures","p":3631},{"i":3638,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#installation","p":3631},{"i":3640,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#examples","p":3631},{"i":3642,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#config","p":3631},{"i":3644,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#default-config","p":3631},{"i":3646,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"","p":3645},{"i":3648,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#table-of-contents","p":3645},{"i":3650,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#signatures","p":3645},{"i":3652,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#installation","p":3645},{"i":3654,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#examples","p":3645},{"i":3656,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#config","p":3645},{"i":3658,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#default-config","p":3645},{"i":3660,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"","p":3659},{"i":3662,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#table-of-contents","p":3659},{"i":3664,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#signatures","p":3659},{"i":3666,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#installation","p":3659},{"i":3668,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#examples","p":3659},{"i":3670,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#config","p":3659},{"i":3672,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#default-config","p":3659},{"i":3674,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"","p":3673},{"i":3676,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#table-of-contents","p":3673},{"i":3678,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#signatures","p":3673},{"i":3680,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#installation","p":3673},{"i":3682,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#examples","p":3673},{"i":3684,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#config","p":3673},{"i":3686,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#default-config","p":3673},{"i":3688,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/sqlite3_v1.x.x/etcd/","h":"","p":3687},{"i":3690,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#table-of-contents","p":3687},{"i":3692,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#signatures","p":3687},{"i":3694,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#installation","p":3687},{"i":3696,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#examples","p":3687},{"i":3698,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#config","p":3687},{"i":3700,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#default-config","p":3687},{"i":3702,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/sqlite3_v1.x.x/memcache/","h":"","p":3701},{"i":3704,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#table-of-contents","p":3701},{"i":3706,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#signatures","p":3701},{"i":3708,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#installation","p":3701},{"i":3710,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#examples","p":3701},{"i":3712,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#config","p":3701},{"i":3714,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#default-config","p":3701},{"i":3716,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/sqlite3_v1.x.x/memory/","h":"","p":3715},{"i":3718,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/memory/","h":"#table-of-contents","p":3715},{"i":3720,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/sqlite3_v1.x.x/memory/","h":"#signatures","p":3715},{"i":3722,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/sqlite3_v1.x.x/memory/","h":"#installation","p":3715},{"i":3724,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/memory/","h":"#examples","p":3715},{"i":3726,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/memory/","h":"#config","p":3715},{"i":3728,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/memory/","h":"#default-config","p":3715},{"i":3730,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"","p":3729},{"i":3732,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#table-of-contents","p":3729},{"i":3734,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#signatures","p":3729},{"i":3736,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#installation","p":3729},{"i":3738,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#examples","p":3729},{"i":3740,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#config","p":3729},{"i":3742,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#default-config","p":3729},{"i":3744,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/sqlite3_v1.x.x/mssql/","h":"","p":3743},{"i":3746,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#table-of-contents","p":3743},{"i":3748,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#signatures","p":3743},{"i":3750,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#installation","p":3743},{"i":3752,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#examples","p":3743},{"i":3754,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#config","p":3743},{"i":3756,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#default-config","p":3743},{"i":3758,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/sqlite3_v1.x.x/mysql/","h":"","p":3757},{"i":3760,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#table-of-contents","p":3757},{"i":3762,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#signatures","p":3757},{"i":3764,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#installation","p":3757},{"i":3766,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#examples","p":3757},{"i":3768,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#config","p":3757},{"i":3770,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#default-config","p":3757},{"i":3772,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/sqlite3_v1.x.x/pebble/","h":"","p":3771},{"i":3774,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#table-of-contents","p":3771},{"i":3776,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#signatures","p":3771},{"i":3778,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#installation","p":3771},{"i":3780,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#examples","p":3771},{"i":3782,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#config","p":3771},{"i":3784,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#default-config","p":3771},{"i":3786,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/sqlite3_v1.x.x/postgres/","h":"","p":3785},{"i":3788,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#table-of-contents","p":3785},{"i":3790,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#signatures","p":3785},{"i":3792,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#installation","p":3785},{"i":3794,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#examples","p":3785},{"i":3796,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#config","p":3785},{"i":3798,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#default-config","p":3785},{"i":3800,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/sqlite3_v1.x.x/redis/","h":"","p":3799},{"i":3802,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/redis/","h":"#table-of-contents","p":3799},{"i":3804,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/sqlite3_v1.x.x/redis/","h":"#signatures","p":3799},{"i":3806,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/sqlite3_v1.x.x/redis/","h":"#installation","p":3799},{"i":3808,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/redis/","h":"#examples","p":3799},{"i":3810,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/sqlite3_v1.x.x/redis/","h":"#config","p":3799},{"i":3812,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/redis/","h":"#default-config","p":3799},{"i":3814,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"","p":3813},{"i":3816,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#table-of-contents","p":3813},{"i":3818,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#signatures","p":3813},{"i":3820,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#installation","p":3813},{"i":3822,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#examples","p":3813},{"i":3824,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#config","p":3813},{"i":3826,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#default-config","p":3813},{"i":3828,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/sqlite3_v1.x.x/s3/","h":"","p":3827},{"i":3830,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/s3/","h":"#table-of-contents","p":3827},{"i":3832,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/s3/","h":"#signatures","p":3827},{"i":3834,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/sqlite3_v1.x.x/s3/","h":"#installation","p":3827},{"i":3836,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/s3/","h":"#examples","p":3827},{"i":3838,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/sqlite3_v1.x.x/s3/","h":"#config","p":3827},{"i":3840,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/s3/","h":"#default-config","p":3827},{"i":3842,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"","p":3841},{"i":3844,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#table-of-contents","p":3841},{"i":3846,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#signatures","p":3841},{"i":3848,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#installation","p":3841},{"i":3850,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#examples","p":3841},{"i":3852,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#config","p":3841},{"i":3854,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#default-config","p":3841}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3600",[0,2.408,1,1.183,2,1.08,3,1.021,4,4.843,5,2.408,6,0.588,7,2.408,8,1.112,9,2.408,10,1.49,11,2.408,12,2.408,13,2.408,14,3.958,15,2.131,16,2.408,17,2.408,18,2.408,19,2.408,20,1.021,21,2.408,22,4.489,23,2.813,24,2.177,25,3.13,26,1.145,27,1.021,28,1.287,29,1.64,30,2.813,31,1.705,32,0.994,33,2.408,34,2.36,35,1.41,36,2.408,37,2.408,38,2.408,39,2.408,40,1.021,41,1.021,42,1.021,43,0.762,44,2.957,45,1.705,46,1.021,47,0.937,48,2.054,49,2.408,50,2.131,51,2.408,52,2.408,53,1.95,54,1.262]],["t/3602",[55,4.571,56,5.645,57,4.571,58,4.252,59,3.998,60,3.998,61,4.252,62,4.997,63,3.998,64,4.571,65,4.571,66,3.998,67,4.997,68,4.252,69,3.998,70,3.998,71,4.571]],["t/3604",[6,1.616,14,4.044,23,2.735,72,5.363,73,3.356,74,5.864,75,6.623]],["t/3606",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3608",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,85,3.649]],["t/3610",[3,2.199,57,5.492,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,102,4.59]],["t/3612",[1,1.082,6,1.114,10,1.525,32,2.572,47,0.883,79,0.48,80,0.883,95,1.765,102,4.042,103,2.716,104,1.99,105,1.99,106,2.047,107,1.936,108,4.565,109,1.99,110,4.565,111,1.548,112,3.697,113,1.322,114,1.836,115,1.703,116,1.622]],["t/3614",[6,1.086,10,1.63,20,1.221,23,1.838,24,1.621,26,2.117,28,0.765,31,2.039,34,1.758,43,0.911,44,1.758,47,0.861,57,3.604,79,0.222,80,1.411,111,1.509,112,2.332,113,1.289,114,1.158,115,1.074,116,1.023,117,1.255,118,1.37,119,3.368,120,1.459,121,1.291,122,2.255,123,1.563,124,1.758,125,3.94,126,2.879,127,2.879,128,2.879,129,5.419,130,2.879,131,3.94,132,2.039]],["t/3616",[10,1.439,24,3.088,47,1.061,79,0.423,111,1.858,112,4.44,113,2.037,114,2.205,115,2.045,116,1.948,125,4.854,129,4.854,131,4.854,133,2.39,134,2.39,135,5.483]],["t/3618",[1,1.131,2,3.761,6,1.589,55,5.272,136,7.823]],["t/3620",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3622",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,137,4.122]],["t/3624",[3,2.17,55,4.143,66,3.623,77,1.45,86,2.112,87,2.112,88,2.23,89,2.733,90,2.23,91,2.17,92,2.23,93,2.17,94,2.17,95,1.45,96,2.17,97,2.23,98,2.23,99,2.23,100,2.23,101,2.23,138,5.116,139,4.529]],["t/3626",[1,1.032,6,1.04,8,1.967,10,1.493,32,2.452,47,0.824,79,0.458,80,0.824,95,1.683,103,2.589,104,1.857,105,1.857,106,1.91,107,1.807,109,1.857,111,1.444,113,1.234,114,1.714,115,1.589,116,1.514,139,3.771,140,4.26,141,4.26,142,1.759,143,3.45,144,1.91,145,3.45,146,2.721,147,1.628]],["t/3628",[8,1.194,10,1.657,20,1.097,23,1.69,26,1.947,28,1.672,34,1.58,43,0.819,44,1.58,47,0.792,73,2.074,79,0.199,80,1.406,111,1.388,113,0.749,114,1.041,115,0.965,116,0.919,117,1.128,118,2.416,119,3.355,120,1.311,122,1.311,123,1.404,124,1.58,142,2.097,143,2.095,144,1.836,145,2.095,146,3.244,147,0.989,148,1.735,149,1.457,150,2.305,151,2.074,152,2.074]],["t/3630",[6,1.283,8,2.427,10,1.41,47,1.017,79,0.405,111,1.782,113,1.523,114,2.114,115,1.96,116,1.868,119,2.427,133,2.292,134,2.292,142,2.171,143,4.256,144,2.357,145,4.256,146,3.357,147,2.009,153,3.96]],["t/3632",[1,0.803,2,2.072,6,1.128,15,4.091,32,1.908,58,3.481,61,3.481,66,3.273,68,3.481,72,3.742,89,1.682,111,2.129,150,2.602,154,4.621,155,4.621,156,4.621,157,4.621,158,4.621,159,4.621,160,4.621,161,4.621,162,7.134,163,4.621,164,4.621,165,4.621,166,3.742,167,3.273,168,4.621,169,4.621]],["t/3634",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3636",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,170,4.122]],["t/3638",[3,2.199,58,3.906,70,3.673,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,171,4.59]],["t/3640",[1,1.1,6,1.141,10,1.49,32,2.615,47,0.905,79,0.488,80,0.905,95,1.795,103,2.761,104,2.039,105,2.039,106,2.098,107,1.984,109,2.039,111,1.585,113,1.355,171,4.141,172,4.677,173,4.677,174,4.677,175,3.566]],["t/3642",[1,0.516,10,1.629,20,1.259,23,1.226,26,2.168,28,1.211,43,0.94,47,0.881,53,2.404,58,2.237,79,0.428,80,1.298,111,1.88,113,1.32,116,1.055,117,1.294,118,1.412,119,3.098,120,1.504,122,2.309,123,1.611,132,2.103,147,1.135,175,3.123,176,2.237,177,2.628,178,2.911,179,2.628,180,2.969,181,2.969,182,2.628,183,2.969,184,2.628,185,2.969,186,2.969,187,2.628,188,2.628,189,2.404,190,2.628]],["t/3644",[10,1.501,47,1.031,79,0.532,80,1.031,111,1.807,113,2,116,1.894,133,2.324,134,3.01,147,2.037,175,3.001,177,4.718,178,3.404,187,4.718,190,4.718]],["t/3646",[1,1.268,89,2.117,167,4.12,191,5.15,192,5.15,193,5.817,194,5.15,195,5.817,196,5.817,197,4.382,198,5.817,199,5.817,200,5.817,201,5.817]],["t/3648",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3650",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,202,4.122]],["t/3652",[1,0.854,2,2.206,3,2.086,77,1.394,86,2.031,87,2.031,88,2.144,89,2.68,90,2.144,91,2.086,92,2.144,93,2.086,94,2.086,95,1.394,96,2.086,97,2.144,98,2.144,99,2.144,100,2.144,101,2.144,191,5.798,192,5.798,203,4.354]],["t/3654",[1,1.056,6,1.076,10,1.509,23,1.82,32,2.511,45,3.122,79,0.469,80,0.853,86,2.874,95,1.723,103,2.651,104,1.922,105,1.922,106,1.977,107,1.869,109,1.922,203,3.902,204,4.407,205,4.407,206,4.924,207,3.561,208,4.407]],["t/3656",[1,0.782,10,1.555,20,1.24,23,2.268,26,2.142,28,1.459,35,1.712,43,0.925,45,3.891,47,0.871,79,0.225,80,1.289,113,0.847,117,1.275,118,2.142,119,3.077,120,1.481,122,1.481,123,1.587,149,1.646,178,2.876,206,3.647,207,3.614,209,2.637,210,2.923,211,3.647,212,2.202,213,1.867,214,3.647,215,3.647,216,2.367,217,2.367,218,1.867,219,1.867,220,2.367,221,2.367,222,2.367,223,2.367,224,1.785,225,1.961]],["t/3658",[10,1.583,35,3.306,45,3.998,47,1.092,79,0.435,113,1.635,133,2.461,134,2.461,206,4.571,209,3.306,212,4.252,224,3.447,225,3.786]],["t/3660",[1,1.192,2,3.077,6,1.674,59,4.86,226,6.861]],["t/3662",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3664",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,227,4.122]],["t/3666",[3,2.199,59,4.804,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,228,4.59]],["t/3668",[1,1.174,6,1.017,10,1.522,32,2.415,35,2.44,59,2.952,79,0.451,80,0.806,95,1.657,103,2.549,104,1.817,105,1.817,106,1.869,107,1.768,109,1.817,116,2.078,142,1.721,151,2.112,152,2.112,175,2.347,224,2.544,228,3.689,229,4.167,230,4.167,231,3.689,232,3.374,233,3.374,234,2.661]],["t/3670",[10,1.52,20,1.626,28,1.985,43,1.744,54,3.916,59,5.293,79,0.296,117,1.671,118,1.823,142,1.583,151,2.792,152,2.792,175,3.103,178,3.519,232,3.104,233,3.104,235,5.51,236,6.616,237,3.833,238,3.393]],["t/3672",[10,1.529,79,0.514,80,0.976,116,2.368,133,2.201,134,2.905,142,2.085,147,1.93,151,2.558,152,2.558,175,2.843,224,3.082,231,4.469,232,4.088,233,4.088,234,3.224,239,5.048,240,5.048]],["t/3674",[1,0.803,2,2.072,6,1.741,10,0.856,22,5.085,60,3.273,79,0.55,89,1.682,153,4.731,197,3.481,207,4.688,241,4.091,242,4.091,243,4.091,244,3.742,245,3.742,246,4.091,247,4.091,248,3.742,249,4.091,250,4.091,251,4.091]],["t/3676",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3678",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,252,4.122]],["t/3680",[3,2.199,60,4.804,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,253,4.59]],["t/3682",[1,1.244,6,1.378,10,1.458,32,2.331,60,3.998,95,1.6,103,3.123,104,2.461,105,2.461,106,2.531,107,2.394,253,4.997,254,5.645]],["t/3684",[6,0.491,10,1.55,14,2.039,20,0.854,23,1.13,25,1.63,26,2.036,28,1.022,30,0.831,31,1.425,45,1.425,47,0.389,50,0.993,60,3.528,78,0.831,79,0.155,80,1.069,86,0.463,87,0.463,93,0.476,94,0.476,107,1.974,109,0.489,113,0.583,117,0.877,118,0.533,119,2.433,120,0.568,121,2.83,122,1.02,123,0.609,124,0.685,147,0.429,149,0.631,166,0.908,167,1.425,175,0.631,178,0.716,182,0.993,188,1.782,207,2.252,209,1.179,211,0.908,213,0.716,214,1.63,215,1.63,216,0.908,217,0.908,218,0.716,219,0.716,220,0.908,221,0.908,222,0.908,223,0.908,224,0.685,225,0.752,244,1.63,245,1.63,255,1.516,256,2.012,257,1.121,258,1.121,259,1.121,260,1.121,261,1.121,262,1.121,263,1.121,264,1.121,265,1.121,266,1.121,267,1.121,268,2.738,269,2.012,270,1.121,271,1.121,272,3.846,273,1.121,274,2.424,275,3.339,276,3.846,277,1.782,278,2.012,279,2.012,280,2.012,281,2.012,282,2.012,283,2.012,284,2.012,285,2.012,286,2.012,287,3.339,288,3.339,289,2.012,290,2.012,291,2.012,292,2.012,293,2.012,294,2.012,295,2.012,296,1.782,297,0.993,298,2.424,299,1.782,300,1.121,301,1.121,302,2.012,303,1.782,304,1.121,305,0.845,306,1.121,307,1.121,308,1.121,309,1.121,310,0.993,311,1.121,312,1.121,313,1.121,314,0.993,315,0.993]],["t/3686",[10,1.303,47,1.061,79,0.423,113,1.588,121,2.459,133,2.39,134,2.39,147,2.096,207,4.118,224,3.348,225,3.678,274,4.854,277,6.225,297,4.854,298,4.854,316,5.483]],["t/3688",[1,1.171,2,3.023,6,1.645,61,6.017,317,6.74]],["t/3690",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3692",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,318,4.122]],["t/3694",[3,2.199,61,5.109,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,319,4.59]],["t/3696",[1,1.138,6,1.2,10,1.515,32,2.704,79,0.505,80,0.951,95,1.856,103,2.855,104,2.144,105,2.144,106,2.206,107,2.086,109,2.144,209,2.88,319,4.354,320,4.918,321,4.918,322,4.354]],["t/3698",[10,1.532,20,1.807,28,1.816,43,1.348,54,2.232,79,0.328,117,1.857,151,3.464,152,3.464,178,2.721,207,2.495,209,3.478,305,3.209,323,3.45,324,3.017,325,5.257,326,4.26,327,4.26,328,4.206,329,4.474,330,4.26,331,4.26,332,3.45]],["t/3700",[10,1.583,24,3.179,79,0.435,87,2.331,116,2.006,133,2.461,134,2.461,151,2.86,152,2.86,209,3.306,322,4.997,325,4.997,329,4.252]],["t/3702",[1,1.192,2,3.077,6,1.674,62,6.074,333,6.861]],["t/3704",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3706",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,334,4.122]],["t/3708",[3,2.199,63,4.804,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,335,4.199]],["t/3710",[1,1.138,6,1.2,10,1.515,32,2.704,79,0.505,80,0.951,95,1.856,103,2.855,104,2.144,105,2.144,106,2.206,107,2.086,109,2.144,150,2.77,336,4.918,337,4.918,338,4.918,339,4.918]],["t/3712",[10,1.622,20,1.891,23,1.841,26,2.916,28,1.185,47,1.186,79,0.344,80,1.186,113,1.292,117,1.944,119,2.83,120,2.259,121,2,122,2.259,150,3.451,323,3.611,340,4.459,341,4.459,342,4.459,343,4.459,344,3.947]],["t/3714",[10,1.465,79,0.511,133,2.888,134,2.888,150,3.73,344,5.864]],["t/3716",[1,1.236,2,3.192,63,5.041]],["t/3718",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3720",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,345,4.122]],["t/3722",[3,2.199,63,4.804,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,335,4.199]],["t/3724",[1,1.119,6,1.17,10,1.547,32,2.659,79,0.496,80,0.927,95,1.825,103,2.807,104,2.09,105,2.09,106,2.15,107,2.034,109,2.09,114,1.929,115,1.788,116,1.704,335,3.883,346,4.795,347,4.795]],["t/3726",[10,1.606,20,2.326,23,2.264,34,3.348,43,1.735,44,3.348,79,0.423,80,1.061,114,2.205,115,2.045,116,1.948,117,2.39,123,2.976,124,3.348]],["t/3728",[10,1.543,79,0.494,114,2.575,115,2.387,116,2.274,133,2.791,134,2.791]],["t/3730",[1,1.151,2,3.545,6,1.616,64,5.363,89,2.411,348,6.623]],["t/3732",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3734",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,349,4.122]],["t/3736",[3,2.199,64,5.492,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,350,4.59]],["t/3738",[1,0.924,6,1.298,8,2.455,10,1.5,28,0.97,32,2.591,47,1.029,54,1.912,79,0.484,80,0.706,95,1.778,103,2.319,104,1.591,105,1.591,106,1.637,107,1.548,109,2.319,111,1.803,113,1.541,142,1.507,144,1.637,146,3.397,147,2.033,350,3.231,351,3.65,352,5.318,353,1.791,354,2.955,355,1.981,356,3.65]],["t/3740",[6,0.994,8,1.186,10,1.656,14,1.569,20,1.09,23,1.061,26,1.937,28,1.857,47,0.788,54,1.346,73,2.562,79,0.198,80,1.402,111,1.38,113,0.744,117,1.12,118,2.406,119,3.347,120,1.302,121,1.152,122,1.302,142,2.088,144,1.826,146,2.6,147,0.982,148,1.724,149,1.447,150,2.293,151,2.063,152,2.063,213,1.641,328,1.82,353,1.261,354,2.081,355,1.395]],["t/3742",[8,2.606,10,1.458,47,1.092,79,0.435,111,1.913,113,1.635,133,2.461,134,2.461,142,2.331,144,2.531,146,3.605,147,2.158,353,2.77,354,4.571,355,3.063]],["t/3744",[1,1.171,2,3.023,6,1.645,65,5.458,357,6.74,358,6.74]],["t/3746",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3748",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,359,3.105]],["t/3750",[3,2.199,65,5.492,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,360,4.59]],["t/3752",[1,0.887,6,1.246,8,1.594,10,1.534,28,0.917,32,2.509,47,0.988,54,1.809,79,0.468,80,0.668,95,1.722,103,2.226,104,1.505,105,1.505,106,1.548,107,1.464,109,2.226,111,1.17,113,1.479,114,2.054,115,1.904,116,1.814,121,1.548,142,1.425,144,1.548,147,1.32,353,1.694,355,1.873,360,3.056,361,3.452,362,5.105,363,2.795,364,2.445,365,2.445,366,3.452]],["t/3754",[1,0.35,6,0.815,8,0.93,10,1.66,14,1.23,20,0.854,23,1.38,26,1.59,28,1.821,34,1.23,43,0.637,44,1.23,47,0.646,54,1.751,73,2.17,79,0.33,80,1.403,111,1.133,113,0.583,114,0.81,115,0.751,116,0.716,117,0.878,118,2.371,119,3.348,120,1.021,121,1.92,122,1.021,123,1.093,124,1.23,132,1.427,142,1.768,144,1.498,147,0.77,148,1.351,149,1.134,150,1.882,151,1.693,152,1.693,189,1.631,213,1.286,248,2.706,328,1.427,353,0.988,355,1.093,363,1.631,364,1.427,365,1.427,367,1.783]],["t/3756",[8,2.394,10,1.486,47,1.003,79,0.4,111,1.758,113,1.502,114,2.086,115,1.934,116,1.842,121,2.325,133,2.261,134,2.261,142,2.141,144,2.325,147,1.982,353,2.544,355,2.814,363,4.199,364,3.673,365,3.673]],["t/3758",[1,1.131,2,2.92,6,1.589,66,4.611,89,2.369,368,6.51,369,5.764,370,6.51]],["t/3760",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3762",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,359,3.105]],["t/3764",[3,2.199,66,4.804,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,371,4.59]],["t/3766",[1,0.769,6,1.322,8,1.319,10,1.563,28,0.759,32,2.518,47,1.047,54,2.319,73,3.09,79,0.47,80,0.553,95,1.728,103,1.929,104,1.246,105,1.246,106,1.282,107,1.212,109,2.361,111,0.969,113,1.569,114,2.178,115,2.019,116,1.924,121,1.282,142,1.18,144,1.282,147,1.092,353,1.402,355,1.551,369,2.53,371,2.53,372,2.858,373,5.415,374,2.314,375,4.425,376,2.858,377,2.858]],["t/3768",[6,1.094,8,0.993,10,1.653,14,2.153,20,0.912,23,1.456,24,1.211,26,1.678,28,1.726,34,1.313,43,0.681,44,1.313,47,0.682,54,1.127,73,2.901,79,0.166,80,1.398,111,1.195,113,0.623,114,0.865,115,0.802,116,0.764,117,0.937,118,2.133,119,3.337,120,1.09,121,2.01,122,1.09,123,1.167,124,1.313,142,1.851,144,1.581,147,0.822,148,1.442,149,1.211,150,1.986,151,1.787,152,1.787,213,2.252,328,2.498,353,1.055,355,1.914,359,1.62,374,1.741]],["t/3770",[8,2.461,10,1.501,47,1.031,79,0.411,111,1.807,113,1.544,114,2.144,115,1.988,116,1.894,121,2.39,133,2.324,134,2.324,142,2.201,144,2.39,147,2.037,353,2.615,355,2.893,374,4.316]],["t/3772",[6,1.645,14,4.115,23,2.783,72,5.458,73,3.415,378,6.74]],["t/3774",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3776",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,85,3.649]],["t/3778",[3,2.034,26,2.281,67,5.7,77,1.359,86,1.98,87,1.98,88,2.09,89,2.646,90,2.09,91,2.034,92,2.807,93,2.034,94,2.034,95,1.359,96,2.034,97,2.09,98,2.09,99,2.09,100,2.09,101,2.09,166,3.883,167,3.396,197,3.612,379,4.795,380,4.245]],["t/3780",[1,1.119,6,1.17,10,1.503,32,2.659,73,2.43,79,0.496,80,0.927,95,1.825,103,2.807,104,2.09,105,2.09,106,2.15,107,2.034,109,2.09,176,3.612,380,4.245,381,4.795,382,4.795,383,3.883,384,3.883]],["t/3782",[10,1.607,20,2.034,24,2.7,28,1.274,73,2.43,79,0.37,80,1.245,111,1.625,117,2.09,118,2.281,119,3.356,176,3.612,238,4.245,310,5.7,383,3.883,384,3.883,385,4.795,386,4.795]],["t/3784",[10,1.435,73,3.244,79,0.494,133,2.791,134,2.791,176,4.823,383,5.184,384,5.184]],["t/3786",[1,1.192,2,3.077,6,1.674,68,5.169,387,6.861]],["t/3788",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3790",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,388,3.649]],["t/3792",[3,2.199,68,5.109,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,389,4.59]],["t/3794",[1,1.065,6,1.088,10,1.514,32,2.531,47,0.862,73,2.259,79,0.473,80,0.862,95,1.737,103,2.672,104,1.944,105,1.944,106,2,107,1.891,109,1.944,113,1.292,114,1.794,115,1.663,116,1.584,121,2,147,1.705,389,3.947,390,4.459,391,4.459,392,4.459]],["t/3796",[1,0.339,6,0.795,8,0.901,10,1.65,14,1.192,20,0.828,23,1.345,24,1.099,26,1.549,28,1.733,34,1.192,43,0.618,44,1.192,47,0.63,54,2.561,73,2.753,79,0.323,80,1.388,111,1.104,113,0.566,114,0.785,115,0.728,116,0.694,117,0.851,118,1.992,119,3.313,120,0.989,121,1.878,122,0.989,123,1.06,124,1.192,132,1.383,142,1.729,144,1.46,147,0.746,148,1.31,149,1.099,150,1.834,151,1.65,152,1.65,153,1.471,189,1.581,194,1.728,213,2.08,328,1.383,353,0.958,355,1.06,364,1.383,365,1.383,367,1.728,388,2.883,393,1.952,394,1.728]],["t/3798",[8,2.271,10,1.515,47,0.951,79,0.505,80,0.951,111,1.667,113,1.425,114,1.978,115,1.834,116,1.747,121,2.206,133,2.144,134,2.855,142,2.031,144,2.206,147,1.88,353,2.413,355,2.669,364,3.483,365,3.483,394,4.354]],["t/3800",[1,1.171,2,3.023,6,1.645,69,4.774,89,2.453,395,6.74]],["t/3802",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3804",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,396,4.122]],["t/3806",[3,2.199,69,4.804,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,397,4.59]],["t/3808",[1,0.627,6,0.54,10,1.605,24,2.033,25,1.792,32,2.575,35,1.296,47,0.884,69,3.737,79,0.278,80,0.428,91,0.938,95,1.495,96,0.938,103,1.574,104,0.965,105,0.965,107,1.94,109,0.965,111,0.75,113,1.325,115,0.825,118,1.052,119,1.021,142,0.914,144,0.992,151,1.121,152,1.121,236,1.959,299,1.959,305,3.975,324,3.239,329,1.667,332,1.792,353,1.086,397,1.959,398,2.212,399,5.813,400,1.792,401,2.923,402,1.792,403,1.959,404,2.212,405,1.792,406,2.212,407,2.923,408,3.61,409,2.212,410,2.212,411,3.61,412,2.212,413,2.212,414,2.212,415,3.61,416,2.212,417,2.212,418,2.212,419,2.212,420,2.212,421,3.61,422,2.212]],["t/3810",[6,0.381,10,1.649,20,0.662,23,0.645,24,0.879,26,1.281,28,1.704,31,1.908,35,0.914,47,0.521,54,1.861,69,1.106,73,1.365,78,0.645,79,0.274,80,1.377,84,0.662,111,1.204,113,0.452,115,0.582,117,0.681,118,1.281,119,3.347,120,0.791,122,0.791,142,1.745,144,1.593,146,0.997,148,1.047,149,2,150,2,151,1.8,152,1.8,184,1.382,218,0.997,219,0.997,305,1.176,323,1.264,324,2.516,329,2.029,332,1.264,353,0.766,400,1.264,401,1.264,402,1.264,405,2.181,407,1.264,423,1.561,424,1.561,425,1.561,426,1.561,427,1.561,428,1.561,429,2.694,430,1.561,431,1.561,432,1.561,433,1.561,434,1.561,435,1.561,436,1.561,437,3.145,438,1.561,439,1.561,440,1.561,441,1.561,442,2.385,443,2.385,444,1.561,445,1.561,446,1.264,447,1.561,448,1.561,449,1.561]],["t/3812",[10,1.622,24,2.511,28,1.185,35,2.611,47,0.862,79,0.344,111,1.511,113,1.292,115,1.663,133,1.944,134,1.944,142,1.841,144,2,151,2.259,152,2.259,324,3.158,353,2.188,400,3.611,401,3.611,402,3.611,403,3.947,405,3.611,407,3.611,437,3.947,442,3.947,443,3.947]],["t/3814",[1,1.151,2,2.97,6,1.616,63,4.691,74,5.864,450,6.623,451,6.623]],["t/3816",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3818",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,452,4.122]],["t/3820",[3,2.199,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,453,6.782,454,4.59]],["t/3822",[1,0.957,6,0.935,10,1.548,23,2.275,32,2.275,79,0.425,80,0.741,95,1.562,103,2.402,104,1.671,105,1.671,106,1.719,107,1.626,109,1.671,218,2.448,219,3.519,234,2.448,446,3.104,454,3.393,455,3.833,456,3.833,457,3.104,458,3.393,459,3.393,460,3.393,461,3.393,462,3.104,463,3.393,464,3.393,465,3.393,466,3.393,467,3.104,468,3.393,469,3.393]],["t/3824",[10,1.496,20,2.009,23,2.637,79,0.365,117,2.064,218,3.024,219,4.078,296,6.396,446,3.834,457,5.17,459,4.192,460,4.192,461,4.192,462,5.17,464,4.192,465,4.192,466,4.192,467,5.17,469,4.192]],["t/3826",[10,1.479,79,0.449,133,2.536,134,2.536,234,4.662,457,4.71,458,5.15,462,4.71,463,5.15,467,4.71,468,5.15,470,5.817]],["t/3828",[1,0.813,2,2.098,6,1.752,22,5.128,70,3.313,79,0.554,89,1.702,153,4.77,197,3.524,207,4.708,241,4.141,242,4.141,243,4.141,244,3.787,245,3.787,246,4.141,247,4.141,248,3.787,249,4.141,250,4.141,251,4.141]],["t/3830",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3832",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,471,4.122]],["t/3834",[3,2.199,70,4.804,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,472,4.59]],["t/3836",[1,1.073,6,1.101,10,1.471,32,2.551,47,0.873,79,0.476,80,0.873,95,1.751,103,2.694,104,1.967,105,1.967,106,2.023,107,1.914,109,1.967,113,1.307,175,3.479,209,3.618,255,4.655,324,3.196,472,3.994,473,4.511,474,4.511]],["t/3838",[1,0.459,10,1.599,20,1.765,23,2.126,26,1.979,28,1.688,35,1.546,43,0.836,47,0.805,70,1.87,79,0.397,80,1.13,113,0.765,117,1.814,118,1.256,119,2.696,120,1.338,122,1.338,123,1.433,132,1.87,149,1.487,175,2.899,178,2.657,207,3.721,209,2.436,211,3.369,212,1.989,213,1.686,214,4.73,215,3.369,216,2.138,217,2.138,218,1.686,219,1.686,220,2.138,221,2.138,222,2.138,223,2.138,224,1.612,225,1.771,255,3.134,314,2.338,315,2.338]],["t/3840",[10,1.536,35,2.739,47,0.905,79,0.488,80,1.225,113,1.355,133,2.039,134,2.761,167,3.313,175,3.566,207,3.708,209,3.708,212,3.524,224,2.856,225,3.137,255,4.77,475,4.677,476,4.677,477,4.677]],["t/3842",[1,1.171,2,3.023,6,1.645,71,6.468,478,6.74]],["t/3844",[76,2.939,77,1.91,78,2.783,79,0.616,80,1.304]],["t/3846",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,79,0.318,81,3.57,82,1.797,83,3.475,84,1.748,359,3.105]],["t/3848",[3,2.199,71,5.492,77,1.47,86,2.141,87,2.141,88,2.261,89,2.751,90,2.261,91,2.199,92,2.261,93,2.199,94,2.199,95,1.47,96,2.199,97,2.261,98,2.261,99,2.261,100,2.261,101,2.261,479,4.59]],["t/3850",[1,1.001,6,0.995,10,1.513,32,2.378,47,0.789,79,0.444,80,0.789,95,1.632,103,2.511,104,1.778,105,1.778,106,1.829,107,1.73,109,1.778,111,1.382,113,1.181,114,1.64,115,1.521,116,2.046,121,1.829,147,1.559,234,2.605,479,3.61,480,4.078,481,4.078,482,3.61,483,3.302,484,4.664,485,3.302,486,3.302]],["t/3852",[8,1.091,10,1.644,20,1.002,23,1.572,26,1.811,28,1.012,31,3.387,34,1.443,43,1.205,44,1.443,47,0.737,53,1.913,54,2.874,79,0.294,80,1.308,111,1.621,113,0.684,114,0.95,115,0.881,116,0.84,117,1.03,118,1.811,119,3.247,120,1.197,121,2.145,122,1.197,123,2.066,124,1.443,147,0.903,149,2.144,179,2.092,218,3.054,219,2.432,234,1.509,303,2.092,483,3.083,484,3.083,485,3.083,486,3.083,487,2.363,488,2.363,489,2.363,490,2.363,491,2.363]],["t/3854",[10,1.486,47,1.003,79,0.4,111,1.758,113,1.502,114,2.086,115,1.934,116,2.41,121,2.325,133,2.261,134,2.261,147,1.982,234,3.312,482,4.59,483,4.199,484,5.492,485,4.199,486,4.199]]],"invertedIndex":[["",{"_index":10,"t":{"3600":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"3612":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"3614":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"3616":{"position":[[18,1],[85,1],[203,1]]},"3626":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"3628":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"3630":{"position":[[48,1],[173,1],[188,1]]},"3640":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"3642":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"3644":{"position":[[0,2],[57,1],[126,1],[172,1]]},"3654":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"3656":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"3658":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"3668":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"3670":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"3672":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"3674":{"position":[[302,4]]},"3682":{"position":[[134,2],[163,2],[196,2]]},"3684":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"3686":{"position":[[18,1],[193,1]]},"3696":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"3698":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"3700":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"3710":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"3712":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"3714":{"position":[[18,1],[56,1]]},"3724":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"3726":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"3728":{"position":[[18,1],[43,1],[58,1]]},"3738":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"3740":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"3742":{"position":[[18,1],[43,3],[141,1]]},"3752":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"3754":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"3756":{"position":[[18,1],[43,3],[150,1],[185,1]]},"3766":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"3768":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"3770":{"position":[[18,1],[43,3],[150,1],[165,1]]},"3780":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"3782":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"3784":{"position":[[18,1],[78,1]]},"3794":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"3796":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"3798":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"3808":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"3810":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"3812":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]},"3822":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"3824":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"3826":{"position":[[18,1],[57,2],[97,1]]},"3836":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"3838":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"3840":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"3850":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"3852":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"3854":{"position":[[18,1],[110,1],[182,1],[197,1]]}}}],["0",{"_index":35,"t":{"3600":{"position":[[492,1]]},"3656":{"position":[[251,1]]},"3658":{"position":[[86,2]]},"3668":{"position":[[341,2]]},"3808":{"position":[[325,2]]},"3810":{"position":[[402,1]]},"3812":{"position":[[106,2]]},"3838":{"position":[[201,1]]},"3840":{"position":[[274,2]]}}}],["1",{"_index":234,"t":{"3668":{"position":[[390,2]]},"3672":{"position":[[202,1]]},"3822":{"position":[[332,1]]},"3826":{"position":[[55,1],[94,2]]},"3850":{"position":[[402,1]]},"3852":{"position":[[839,1]]},"3854":{"position":[[180,1]]}}}],["1.14/1.15",{"_index":138,"t":{"3624":{"position":[[33,11]]}}}],["1.18",{"_index":198,"t":{"3646":{"position":[[82,4]]}}}],["10",{"_index":115,"t":{"3612":{"position":[[300,2]]},"3614":{"position":[[258,2]]},"3616":{"position":[[82,2]]},"3626":{"position":[[366,2]]},"3628":{"position":[[636,2]]},"3630":{"position":[[170,2]]},"3724":{"position":[[258,2]]},"3726":{"position":[[75,2]]},"3728":{"position":[[40,2]]},"3752":{"position":[[342,2],[567,2]]},"3754":{"position":[[860,2]]},"3756":{"position":[[147,2]]},"3766":{"position":[[342,2],[535,2],[749,2]]},"3768":{"position":[[875,2]]},"3770":{"position":[[147,2]]},"3794":{"position":[[319,2]]},"3796":{"position":[[1015,2]]},"3798":{"position":[[206,2]]},"3808":{"position":[[368,2]]},"3810":{"position":[[1456,2]]},"3812":{"position":[[149,2]]},"3850":{"position":[[329,2]]},"3852":{"position":[[319,2]]},"3854":{"position":[[107,2]]}}}],["100",{"_index":484,"t":{"3850":{"position":[[361,4],[380,4]]},"3852":{"position":[[585,4],[711,4]]},"3854":{"position":[[139,4],[158,4]]}}}],["10m",{"_index":461,"t":{"3822":{"position":[[316,6]]},"3824":{"position":[[73,6]]}}}],["123456",{"_index":240,"t":{"3672":{"position":[[120,9]]}}}],["127.0.0.1",{"_index":353,"t":{"3738":{"position":[[256,12]]},"3740":{"position":[[225,11]]},"3742":{"position":[[53,12]]},"3752":{"position":[[248,12]]},"3754":{"position":[[267,11]]},"3756":{"position":[[53,12]]},"3766":{"position":[[248,12]]},"3768":{"position":[[345,11]]},"3770":{"position":[[53,12]]},"3796":{"position":[[398,11]]},"3798":{"position":[[92,12]]},"3808":{"position":[[262,12]]},"3810":{"position":[[84,11]]},"3812":{"position":[[34,12]]}}}],["127.0.0.1:11211",{"_index":344,"t":{"3712":{"position":[[113,17]]},"3714":{"position":[[37,18]]}}}],["127.0.0.1:8091",{"_index":231,"t":{"3668":{"position":[[287,17]]},"3672":{"position":[[73,17]]}}}],["1433",{"_index":363,"t":{"3752":{"position":[[267,5]]},"3754":{"position":[[355,4]]},"3756":{"position":[[72,5]]}}}],["15",{"_index":302,"t":{"3684":{"position":[[2668,2],[2722,2]]}}}],["1e7",{"_index":458,"t":{"3822":{"position":[[271,4]]},"3826":{"position":[[41,4]]}}}],["1gb",{"_index":466,"t":{"3822":{"position":[[366,6]]},"3824":{"position":[[131,6]]}}}],["2",{"_index":87,"t":{"3610":{"position":[[24,1]]},"3624":{"position":[[26,1]]},"3638":{"position":[[23,1]]},"3652":{"position":[[43,1]]},"3666":{"position":[[27,1]]},"3680":{"position":[[26,1]]},"3684":{"position":[[175,3]]},"3694":{"position":[[22,1]]},"3700":{"position":[[80,1]]},"3708":{"position":[[24,1]]},"3722":{"position":[[24,1]]},"3736":{"position":[[25,1]]},"3750":{"position":[[23,1]]},"3764":{"position":[[23,1]]},"3778":{"position":[[24,1]]},"3792":{"position":[[26,1]]},"3806":{"position":[[23,1]]},"3820":{"position":[[27,1]]},"3834":{"position":[[20,1]]},"3848":{"position":[[25,1]]}}}],["25",{"_index":281,"t":{"3684":{"position":[[1341,2],[2037,2]]}}}],["27017",{"_index":354,"t":{"3738":{"position":[[275,6]]},"3740":{"position":[[313,5]]},"3742":{"position":[[72,6]]}}}],["3",{"_index":224,"t":{"3656":{"position":[[658,1]]},"3658":{"position":[[116,2]]},"3668":{"position":[[363,2]]},"3672":{"position":[[174,1]]},"3684":{"position":[[1010,1]]},"3686":{"position":[[93,2]]},"3838":{"position":[[613,1]]},"3840":{"position":[[255,2]]}}}],["30",{"_index":463,"t":{"3822":{"position":[[337,3]]},"3826":{"position":[[60,3]]}}}],["3306",{"_index":374,"t":{"3766":{"position":[[267,5]]},"3768":{"position":[[433,4]]},"3770":{"position":[[72,5]]}}}],["5",{"_index":277,"t":{"3684":{"position":[[1246,2],[1942,2]]},"3686":{"position":[[129,2],[152,2]]}}}],["5432",{"_index":394,"t":{"3796":{"position":[[486,4]]},"3798":{"position":[[111,5]]}}}],["60",{"_index":187,"t":{"3642":{"position":[[342,2]]},"3644":{"position":[[123,2]]}}}],["6379",{"_index":400,"t":{"3808":{"position":[[281,5]]},"3810":{"position":[[172,4]]},"3812":{"position":[[53,5]]}}}],["6380",{"_index":409,"t":{"3808":{"position":[[617,9]]}}}],["64",{"_index":468,"t":{"3822":{"position":[[386,3]]},"3826":{"position":[[77,3]]}}}],["8529",{"_index":145,"t":{"3626":{"position":[[286,5]]},"3628":{"position":[[179,4]]},"3630":{"position":[[90,5]]}}}],["_",{"_index":376,"t":{"3766":{"position":[[612,1]]}}}],["access",{"_index":215,"t":{"3656":{"position":[[422,6],[448,6]]},"3684":{"position":[[768,6],[794,6]]},"3838":{"position":[[371,6],[397,6]]}}}],["accesskey",{"_index":314,"t":{"3684":{"position":[[3096,9]]},"3838":{"position":[[659,9]]}}}],["account",{"_index":206,"t":{"3654":{"position":[[258,8],[320,8]]},"3656":{"position":[[32,7],[46,7]]},"3658":{"position":[[28,8]]}}}],["adaptor",{"_index":487,"t":{"3852":{"position":[[402,7]]}}}],["addr",{"_index":407,"t":{"3808":{"position":[[495,6],[592,6]]},"3810":{"position":[[794,5]]},"3812":{"position":[[177,6]]}}}],["address",{"_index":429,"t":{"3810":{"position":[[663,7],[699,10]]}}}],["admin",{"_index":239,"t":{"3672":{"position":[[101,8]]}}}],["allow",{"_index":265,"t":{"3684":{"position":[[415,6]]}}}],["along",{"_index":33,"t":{"3600":{"position":[[457,5]]}}}],["amount",{"_index":179,"t":{"3642":{"position":[[230,6]]},"3852":{"position":[[769,6]]}}}],["applic",{"_index":235,"t":{"3670":{"position":[[28,11],[108,11]]}}}],["arangodb",{"_index":55,"t":{"3602":{"position":[[0,8]]},"3618":{"position":[[2,8]]},"3624":{"position":[[0,8]]}}}],["arangodb.new",{"_index":140,"t":{"3626":{"position":[[172,14]]}}}],["arangodb.new(arangodb.config",{"_index":141,"t":{"3626":{"position":[[224,29]]}}}],["arangodb/go",{"_index":136,"t":{"3618":{"position":[[32,11],[55,11]]}}}],["attempt",{"_index":223,"t":{"3656":{"position":[[623,10]]},"3684":{"position":[[972,10]]},"3838":{"position":[[575,10]]}}}],["authent",{"_index":328,"t":{"3698":{"position":[[197,15],[259,15]]},"3740":{"position":[[81,14]]},"3754":{"position":[[123,14]]},"3768":{"position":[[69,14],[201,14]]},"3796":{"position":[[254,14]]}}}],["avail",{"_index":184,"t":{"3642":{"position":[[284,9]]},"3810":{"position":[[1481,9]]}}}],["aw",{"_index":214,"t":{"3656":{"position":[[418,3],[437,3]]},"3684":{"position":[[764,3],[783,3]]},"3838":{"position":[[98,3],[130,3],[367,3],[386,3]]}}}],["aws.bool(tru",{"_index":316,"t":{"3686":{"position":[[177,15]]}}}],["aws/aw",{"_index":241,"t":{"3674":{"position":[[32,7]]},"3828":{"position":[[26,7]]}}}],["aws/credenti",{"_index":246,"t":{"3674":{"position":[[154,19]]},"3828":{"position":[[148,19]]}}}],["aws_region",{"_index":263,"t":{"3684":{"position":[[283,13]]}}}],["awsdynamodb.cli",{"_index":252,"t":{"3678":{"position":[[285,19]]}}}],["azblob.cli",{"_index":202,"t":{"3650":{"position":[[288,14]]}}}],["azur",{"_index":191,"t":{"3646":{"position":[[0,5]]},"3652":{"position":[[0,5],[210,5]]}}}],["azureblob",{"_index":56,"t":{"3602":{"position":[[9,9]]}}}],["azureblob.new",{"_index":204,"t":{"3654":{"position":[[173,15]]}}}],["azureblob.new(azureblob.config",{"_index":205,"t":{"3654":{"position":[[226,31]]}}}],["badger",{"_index":57,"t":{"3602":{"position":[[19,6]]},"3610":{"position":[[0,6],[191,6]]},"3614":{"position":[[344,6],[487,6]]}}}],["badger.db",{"_index":85,"t":{"3608":{"position":[[288,10]]},"3776":{"position":[[288,10]]}}}],["badger.defaultoptions(\"./fiber.badg",{"_index":127,"t":{"3614":{"position":[[378,39]]}}}],["badger.defaultoptions(\"./fiber.badger\").withlogger(nil",{"_index":135,"t":{"3616":{"position":[[115,56]]}}}],["badger.logg",{"_index":130,"t":{"3614":{"position":[[532,13]]}}}],["badger.new",{"_index":108,"t":{"3612":{"position":[[170,12]]}}}],["badger.new(badger.config",{"_index":110,"t":{"3612":{"position":[[220,25]]}}}],["badger.opt",{"_index":128,"t":{"3614":{"position":[[432,14]]}}}],["badgeropt",{"_index":125,"t":{"3614":{"position":[[303,13],[418,13]]},"3616":{"position":[[100,14]]}}}],["bbolt",{"_index":58,"t":{"3602":{"position":[[26,5]]},"3632":{"position":[[2,5]]},"3638":{"position":[[0,5]]},"3642":{"position":[[137,5]]}}}],["bbolt.db",{"_index":170,"t":{"3636":{"position":[[288,9]]}}}],["bbolt.new",{"_index":172,"t":{"3640":{"position":[[169,11]]}}}],["bbolt.new(bbolt.config",{"_index":173,"t":{"3640":{"position":[[218,23]]}}}],["befor",{"_index":124,"t":{"3614":{"position":[[202,6]]},"3628":{"position":[[580,6]]},"3684":{"position":[[2921,6]]},"3726":{"position":[[29,6]]},"3754":{"position":[[804,6]]},"3768":{"position":[[819,6]]},"3796":{"position":[[959,6]]},"3852":{"position":[[263,6]]}}}],["blob",{"_index":192,"t":{"3646":{"position":[[6,4]]},"3652":{"position":[[6,4],[216,4]]}}}],["block",{"_index":300,"t":{"3684":{"position":[[2616,5]]}}}],["bolt",{"_index":155,"t":{"3632":{"position":[[44,4]]}}}],["bool",{"_index":122,"t":{"3614":{"position":[[189,4],[636,4]]},"3628":{"position":[[567,4]]},"3642":{"position":[[460,4],[557,4]]},"3656":{"position":[[388,4]]},"3684":{"position":[[1120,4],[3062,5]]},"3712":{"position":[[237,4]]},"3740":{"position":[[697,4]]},"3754":{"position":[[791,4]]},"3768":{"position":[[806,4]]},"3796":{"position":[[946,4]]},"3810":{"position":[[1275,4]]},"3838":{"position":[[337,4]]},"3852":{"position":[[250,4]]}}}],["bound",{"_index":450,"t":{"3814":{"position":[[9,5]]}}}],["bradfitz/gomemcach",{"_index":333,"t":{"3702":{"position":[[32,20]]}}}],["bucket",{"_index":175,"t":{"3640":{"position":[[270,7],[282,8]]},"3642":{"position":[[143,6],[198,6],[511,6]]},"3644":{"position":[[89,7]]},"3668":{"position":[[333,7]]},"3670":{"position":[[263,6],[284,6]]},"3672":{"position":[[130,7]]},"3684":{"position":[[1074,6]]},"3836":{"position":[[230,7],[242,6]]},"3838":{"position":[[69,6],[81,6],[291,6]]},"3840":{"position":[[32,7],[176,7]]}}}],["buffer",{"_index":469,"t":{"3822":{"position":[[416,7]]},"3824":{"position":[[190,7]]}}}],["bufferitem",{"_index":467,"t":{"3822":{"position":[[373,12]]},"3824":{"position":[[155,11],[198,11]]},"3826":{"position":[[64,12]]}}}],["byte",{"_index":29,"t":{"3600":{"position":[[393,8],[591,7]]},"3608":{"position":[[69,8],[123,7]]},"3622":{"position":[[69,8],[123,7]]},"3636":{"position":[[69,8],[123,7]]},"3650":{"position":[[69,8],[123,7]]},"3664":{"position":[[69,8],[123,7]]},"3678":{"position":[[66,8],[120,7]]},"3692":{"position":[[70,8],[124,7]]},"3706":{"position":[[69,8],[123,7]]},"3720":{"position":[[69,8],[123,7]]},"3734":{"position":[[69,8],[123,7]]},"3748":{"position":[[69,8],[123,7]]},"3762":{"position":[[69,8],[123,7]]},"3776":{"position":[[69,8],[123,7]]},"3790":{"position":[[69,8],[123,7]]},"3804":{"position":[[69,8],[123,7]]},"3818":{"position":[[69,8],[123,7]]},"3832":{"position":[[69,8],[123,7]]},"3846":{"position":[[69,8],[123,7]]}}}],["cach",{"_index":465,"t":{"3822":{"position":[[360,5]]},"3824":{"position":[[125,5]]}}}],["calcul",{"_index":286,"t":{"3684":{"position":[[1415,13],[2111,13]]}}}],["case",{"_index":308,"t":{"3684":{"position":[[2847,4]]}}}],["cer",{"_index":410,"t":{"3808":{"position":[[670,4]]}}}],["certif",{"_index":419,"t":{"3808":{"position":[[855,13]]}}}],["chu'",{"_index":160,"t":{"3632":{"position":[[97,5]]}}}],["clear",{"_index":120,"t":{"3614":{"position":[[107,6]]},"3628":{"position":[[480,6]]},"3642":{"position":[[474,6]]},"3656":{"position":[[304,6]]},"3684":{"position":[[1037,6]]},"3712":{"position":[[155,6]]},"3740":{"position":[[615,6]]},"3754":{"position":[[709,6]]},"3768":{"position":[[724,6]]},"3796":{"position":[[864,6]]},"3810":{"position":[[1188,6]]},"3838":{"position":[[254,6]]},"3852":{"position":[[168,6]]}}}],["client",{"_index":305,"t":{"3684":{"position":[[2810,6]]},"3698":{"position":[[308,6]]},"3808":{"position":[[428,6],[552,6],[642,6],[1025,6]]},"3810":{"position":[[932,7]]}}}],["client.key",{"_index":413,"t":{"3808":{"position":[[718,15]]}}}],["clientnam",{"_index":437,"t":{"3810":{"position":[[904,10],[948,11],[1013,10]]},"3812":{"position":[[212,11]]}}}],["clientv3.client",{"_index":318,"t":{"3692":{"position":[[289,16]]}}}],["close",{"_index":48,"t":{"3600":{"position":[[826,5],[832,6],[921,7]]},"3608":{"position":[[249,7]]},"3622":{"position":[[249,7]]},"3636":{"position":[[249,7]]},"3650":{"position":[[249,7]]},"3664":{"position":[[249,7]]},"3678":{"position":[[246,7]]},"3692":{"position":[[250,7]]},"3706":{"position":[[249,7]]},"3720":{"position":[[249,7]]},"3734":{"position":[[249,7]]},"3748":{"position":[[249,7]]},"3762":{"position":[[249,7]]},"3776":{"position":[[249,7]]},"3790":{"position":[[249,7]]},"3804":{"position":[[249,7]]},"3818":{"position":[[249,7]]},"3832":{"position":[[249,7]]},"3846":{"position":[[249,7]]}}}],["cloud",{"_index":196,"t":{"3646":{"position":[[66,6]]}}}],["cluster",{"_index":236,"t":{"3670":{"position":[[77,7],[157,7],[224,7],[345,7],[443,7]]},"3808":{"position":[[544,7]]}}}],["clustercli",{"_index":434,"t":{"3810":{"position":[[742,13]]}}}],["cockroachdb/pebbl",{"_index":378,"t":{"3772":{"position":[[26,18]]}}}],["collect",{"_index":146,"t":{"3626":{"position":[[311,11]]},"3628":{"position":[[394,10],[453,10],[517,10]]},"3630":{"position":[[115,11]]},"3738":{"position":[[301,11],[513,11]]},"3740":{"position":[[529,10],[588,10]]},"3742":{"position":[[98,11]]},"3810":{"position":[[1225,10]]}}}],["collector",{"_index":52,"t":{"3600":{"position":[[888,10]]}}}],["command",{"_index":440,"t":{"3810":{"position":[[960,7]]}}}],["commun",{"_index":11,"t":{"3600":{"position":[[139,13]]}}}],["config",{"_index":79,"t":{"3606":{"position":[[33,6],[48,6]]},"3608":{"position":[[16,10]]},"3612":{"position":[[154,6],[204,6]]},"3614":{"position":[[5,6]]},"3616":{"position":[[20,7]]},"3620":{"position":[[33,6],[48,6]]},"3622":{"position":[[16,10]]},"3626":{"position":[[156,6],[208,6]]},"3628":{"position":[[5,6]]},"3630":{"position":[[50,7]]},"3634":{"position":[[33,6],[48,6]]},"3636":{"position":[[16,10]]},"3640":{"position":[[153,6],[202,6]]},"3642":{"position":[[3,6],[22,6],[47,6]]},"3644":{"position":[[32,6],[59,7]]},"3648":{"position":[[33,6],[48,6]]},"3650":{"position":[[16,10]]},"3654":{"position":[[157,6],[210,6]]},"3656":{"position":[[5,6]]},"3658":{"position":[[20,7]]},"3662":{"position":[[33,6],[48,6]]},"3664":{"position":[[16,10]]},"3668":{"position":[[157,6],[233,6]]},"3670":{"position":[[5,6]]},"3672":{"position":[[32,6],[59,7]]},"3674":{"position":[[60,6],[199,6],[262,7]]},"3676":{"position":[[33,6],[48,6]]},"3678":{"position":[[16,7]]},"3684":{"position":[[5,6],[209,6]]},"3686":{"position":[[20,7]]},"3690":{"position":[[33,6],[48,6]]},"3692":{"position":[[16,10]]},"3696":{"position":[[152,6],[200,6]]},"3698":{"position":[[5,6]]},"3700":{"position":[[20,7]]},"3704":{"position":[[33,6],[48,6]]},"3706":{"position":[[16,10]]},"3710":{"position":[[156,6],[208,6]]},"3712":{"position":[[5,6]]},"3714":{"position":[[20,7]]},"3718":{"position":[[33,6],[48,6]]},"3720":{"position":[[16,10]]},"3724":{"position":[[154,6],[204,6]]},"3726":{"position":[[5,6]]},"3728":{"position":[[20,7]]},"3732":{"position":[[33,6],[48,6]]},"3734":{"position":[[16,10]]},"3738":{"position":[[155,6],[206,6],[368,6]]},"3740":{"position":[[5,6]]},"3742":{"position":[[20,7]]},"3746":{"position":[[33,6],[48,6]]},"3748":{"position":[[16,10]]},"3752":{"position":[[153,6],[202,6],[404,6]]},"3754":{"position":[[3,6],[22,6],[47,6]]},"3756":{"position":[[20,7]]},"3760":{"position":[[33,6],[48,6]]},"3762":{"position":[[16,10]]},"3766":{"position":[[153,6],[202,6],[384,6],[577,6]]},"3768":{"position":[[5,6]]},"3770":{"position":[[20,7]]},"3774":{"position":[[33,6],[48,6]]},"3776":{"position":[[16,10]]},"3780":{"position":[[154,6],[204,6]]},"3782":{"position":[[5,6]]},"3784":{"position":[[20,7]]},"3788":{"position":[[33,6],[48,6]]},"3790":{"position":[[16,10]]},"3794":{"position":[[159,6],[211,6]]},"3796":{"position":[[3,6],[22,6],[47,6]]},"3798":{"position":[[32,6],[59,7]]},"3802":{"position":[[33,6],[48,6]]},"3804":{"position":[[16,10]]},"3808":{"position":[[167,6],[216,6]]},"3810":{"position":[[5,6],[476,6],[1287,6]]},"3812":{"position":[[20,7]]},"3816":{"position":[[33,6],[48,6]]},"3818":{"position":[[16,10]]},"3822":{"position":[[157,6],[210,6]]},"3824":{"position":[[5,6]]},"3826":{"position":[[20,7]]},"3828":{"position":[[54,6],[193,6],[256,7]]},"3830":{"position":[[33,6],[48,6]]},"3832":{"position":[[16,10]]},"3836":{"position":[[150,6],[196,6]]},"3838":{"position":[[3,6],[22,6],[47,6]]},"3840":{"position":[[141,6],[168,7]]},"3844":{"position":[[33,6],[48,6]]},"3846":{"position":[[16,10]]},"3850":{"position":[[155,6],[206,6]]},"3852":{"position":[[5,6],[418,6]]},"3854":{"position":[[20,7]]}}}],["configdefault",{"_index":134,"t":{"3616":{"position":[[4,13]]},"3630":{"position":[[34,13]]},"3644":{"position":[[3,13],[43,13]]},"3658":{"position":[[4,13]]},"3672":{"position":[[3,13],[43,13]]},"3686":{"position":[[4,13]]},"3700":{"position":[[4,13]]},"3714":{"position":[[4,13]]},"3728":{"position":[[4,13]]},"3742":{"position":[[4,13]]},"3756":{"position":[[4,13]]},"3770":{"position":[[4,13]]},"3784":{"position":[[4,13]]},"3798":{"position":[[3,13],[43,13]]},"3812":{"position":[[4,13]]},"3826":{"position":[[4,13]]},"3840":{"position":[[112,13],[152,13]]},"3854":{"position":[[4,13]]}}}],["configur",{"_index":475,"t":{"3840":{"position":[[12,13]]}}}],["conn",{"_index":84,"t":{"3608":{"position":[[281,6]]},"3622":{"position":[[281,6]]},"3636":{"position":[[281,6]]},"3650":{"position":[[281,6]]},"3664":{"position":[[281,6]]},"3678":{"position":[[278,6]]},"3692":{"position":[[282,6]]},"3706":{"position":[[281,6]]},"3720":{"position":[[281,6]]},"3734":{"position":[[281,6]]},"3748":{"position":[[281,6]]},"3762":{"position":[[281,6]]},"3776":{"position":[[281,6]]},"3790":{"position":[[281,6]]},"3804":{"position":[[281,6]]},"3810":{"position":[[977,5]]},"3818":{"position":[[281,6]]},"3832":{"position":[[281,6]]},"3846":{"position":[[281,6]]}}}],["connect",{"_index":54,"t":{"3600":{"position":[[908,12]]},"3670":{"position":[[52,7],[132,7],[188,10],[273,7],[317,10]]},"3698":{"position":[[129,11]]},"3738":{"position":[[381,10]]},"3740":{"position":[[24,10]]},"3752":{"position":[[417,10]]},"3754":{"position":[[66,10],[926,10]]},"3766":{"position":[[397,10],[597,10]]},"3768":{"position":[[144,10]]},"3796":{"position":[[103,10],[128,10],[197,10],[792,10]]},"3810":{"position":[[349,10],[1416,12],[1459,11]]},"3852":{"position":[[517,11],[541,10],[655,11],[786,10]]}}}],["connectiontimeout",{"_index":232,"t":{"3668":{"position":[[344,18]]},"3670":{"position":[[353,17]]},"3672":{"position":[[155,18]]}}}],["connectionuri",{"_index":355,"t":{"3738":{"position":[[436,14]]},"3740":{"position":[[141,13]]},"3742":{"position":[[28,14]]},"3752":{"position":[[468,14]]},"3754":{"position":[[183,13]]},"3756":{"position":[[28,14]]},"3766":{"position":[[448,14]]},"3768":{"position":[[41,13],[261,13]]},"3770":{"position":[[28,14]]},"3796":{"position":[[314,13]]},"3798":{"position":[[67,14]]}}}],["connmaxlifetim",{"_index":486,"t":{"3850":{"position":[[385,16]]},"3852":{"position":[[736,15],[849,15]]},"3854":{"position":[[163,16]]}}}],["consol",{"_index":280,"t":{"3684":{"position":[[1329,8],[2025,8]]}}}],["contain",{"_index":45,"t":{"3600":{"position":[[718,7]]},"3654":{"position":[[275,10]]},"3656":{"position":[[64,9],[80,9],[341,10]]},"3658":{"position":[[41,10]]},"3684":{"position":[[542,9],[603,10]]}}}],["cost",{"_index":464,"t":{"3822":{"position":[[352,4]]},"3824":{"position":[[117,4]]}}}],["couchbas",{"_index":59,"t":{"3602":{"position":[[32,9]]},"3660":{"position":[[2,9]]},"3666":{"position":[[0,9],[194,9]]},"3668":{"position":[[203,9]]},"3670":{"position":[[67,9],[147,9],[214,9],[335,9],[433,9]]}}}],["couchbase.new",{"_index":229,"t":{"3668":{"position":[[173,15]]}}}],["couchbase.new(couchbase.config",{"_index":230,"t":{"3668":{"position":[[249,31]]}}}],["couchbase/gocb",{"_index":226,"t":{"3660":{"position":[[33,15]]}}}],["cpu",{"_index":447,"t":{"3810":{"position":[[1491,3]]}}}],["creat",{"_index":107,"t":{"3612":{"position":[[114,6]]},"3626":{"position":[[116,6]]},"3640":{"position":[[113,6]]},"3654":{"position":[[117,6]]},"3668":{"position":[[117,6]]},"3682":{"position":[[116,6]]},"3684":{"position":[[1217,7],[1301,8],[1913,7],[1997,8],[2558,7],[2641,8],[2933,8]]},"3696":{"position":[[112,6]]},"3710":{"position":[[116,6]]},"3724":{"position":[[114,6]]},"3738":{"position":[[115,6]]},"3752":{"position":[[113,6]]},"3766":{"position":[[113,6]]},"3780":{"position":[[114,6]]},"3794":{"position":[[119,6]]},"3808":{"position":[[121,6],[633,6],[1016,6]]},"3822":{"position":[[117,6]]},"3836":{"position":[[110,6]]},"3850":{"position":[[115,6]]}}}],["credenti",{"_index":207,"t":{"3654":{"position":[[294,12],[307,12]]},"3656":{"position":[[396,11],[501,13],[515,11],[527,11]]},"3674":{"position":[[77,11],[100,11],[216,11],[235,11],[290,11]]},"3684":{"position":[[742,11],[850,13],[864,11],[876,11],[3075,11]]},"3686":{"position":[[52,12],[65,14]]},"3698":{"position":[[322,12]]},"3828":{"position":[[71,11],[94,11],[210,11],[229,11],[284,11]]},"3838":{"position":[[345,11],[453,13],[467,11],[479,11],[638,11]]},"3840":{"position":[[214,12],[227,14]]}}}],["custom",{"_index":109,"t":{"3612":{"position":[[197,6]]},"3626":{"position":[[201,6]]},"3640":{"position":[[195,6]]},"3654":{"position":[[203,6]]},"3668":{"position":[[226,6]]},"3684":{"position":[[435,6]]},"3696":{"position":[[193,6]]},"3710":{"position":[[201,6]]},"3724":{"position":[[197,6]]},"3738":{"position":[[199,6],[361,6]]},"3752":{"position":[[195,6],[397,6]]},"3766":{"position":[[195,6],[377,6],[570,6]]},"3780":{"position":[[197,6]]},"3794":{"position":[[204,6]]},"3808":{"position":[[209,6]]},"3822":{"position":[[203,6]]},"3836":{"position":[[189,6]]},"3850":{"position":[[199,6]]}}}],["customendpoint",{"_index":264,"t":{"3684":{"position":[[400,14]]}}}],["darwin",{"_index":185,"t":{"3642":{"position":[[297,6]]}}}],["databas",{"_index":111,"t":{"3612":{"position":[[246,9]]},"3614":{"position":[[24,8],[82,8]]},"3616":{"position":[[28,9]]},"3626":{"position":[[292,9]]},"3628":{"position":[[326,8],[375,8]]},"3630":{"position":[[96,9]]},"3632":{"position":[[184,8],[232,8]]},"3640":{"position":[[242,9]]},"3642":{"position":[[66,8],[118,8],[390,8]]},"3644":{"position":[[67,9]]},"3738":{"position":[[282,9],[494,9]]},"3740":{"position":[[461,8],[510,8]]},"3742":{"position":[[79,9]]},"3752":{"position":[[273,9]]},"3754":{"position":[[565,8],[614,8]]},"3756":{"position":[[78,9]]},"3766":{"position":[[273,9]]},"3768":{"position":[[580,8],[629,8]]},"3770":{"position":[[78,9]]},"3782":{"position":[[24,8]]},"3796":{"position":[[633,8],[682,8]]},"3798":{"position":[[117,9]]},"3808":{"position":[[315,9]]},"3810":{"position":[[319,8],[404,8],[524,8]]},"3812":{"position":[[96,9]]},"3850":{"position":[[250,9]]},"3852":{"position":[[24,8],[73,8],[674,9]]},"3854":{"position":[[28,9]]}}}],["database/key",{"_index":13,"t":{"3600":{"position":[[168,12]]}}}],["database/sql",{"_index":368,"t":{"3758":{"position":[[29,12]]}}}],["db",{"_index":73,"t":{"3604":{"position":[[17,2]]},"3628":{"position":[[44,2],[133,2]]},"3740":{"position":[[53,3],[185,2],[267,2]]},"3754":{"position":[[95,3],[227,2],[309,2]]},"3766":{"position":[[594,2],[608,3],[715,3],[719,3]]},"3768":{"position":[[24,2],[130,2],[173,3],[305,2],[387,2]]},"3772":{"position":[[17,2]]},"3780":{"position":[[252,5]]},"3782":{"position":[[65,6]]},"3784":{"position":[[34,5]]},"3794":{"position":[[257,3]]},"3796":{"position":[[66,2],[177,2],[226,3],[358,2],[440,2]]},"3810":{"position":[[44,2],[126,2]]}}}],["dbpool",{"_index":392,"t":{"3794":{"position":[[261,7]]}}}],["default",{"_index":80,"t":{"3606":{"position":[[40,7]]},"3612":{"position":[[146,7]]},"3614":{"position":[[54,7],[166,7],[247,7],[367,7],[464,7],[510,7],[609,7]]},"3620":{"position":[[40,7]]},"3626":{"position":[[148,7]]},"3628":{"position":[[73,7],[168,7],[228,7],[293,7],[356,7],[426,7],[544,7],[625,7]]},"3634":{"position":[[40,7]]},"3640":{"position":[[145,7]]},"3642":{"position":[[96,7],[171,7],[331,7],[434,7],[534,7]]},"3644":{"position":[[24,7]]},"3648":{"position":[[40,7]]},"3654":{"position":[[149,7]]},"3656":{"position":[[131,8],[240,7],[365,7],[490,7],[647,7]]},"3662":{"position":[[40,7]]},"3668":{"position":[[149,7]]},"3672":{"position":[[24,7]]},"3676":{"position":[[40,7]]},"3684":{"position":[[374,9],[714,8],[839,7],[999,7],[1097,7],[1252,8],[1279,7],[1948,8],[1975,7],[3031,9]]},"3690":{"position":[[40,7]]},"3696":{"position":[[144,7]]},"3704":{"position":[[40,7]]},"3710":{"position":[[148,7]]},"3712":{"position":[[102,7],[214,7]]},"3718":{"position":[[40,7]]},"3724":{"position":[[146,7]]},"3726":{"position":[[64,7]]},"3732":{"position":[[40,7]]},"3738":{"position":[[147,7]]},"3740":{"position":[[127,7],[214,7],[302,7],[363,7],[428,7],[491,7],[561,7],[674,7]]},"3746":{"position":[[40,7]]},"3752":{"position":[[145,7]]},"3754":{"position":[[169,7],[256,7],[344,7],[404,7],[469,7],[532,7],[595,7],[660,7],[768,7],[849,7],[953,7]]},"3760":{"position":[[40,7]]},"3766":{"position":[[145,7]]},"3768":{"position":[[115,7],[247,7],[334,7],[422,7],[482,7],[547,7],[610,7],[675,7],[783,7],[864,7]]},"3774":{"position":[[40,7]]},"3780":{"position":[[146,7]]},"3782":{"position":[[54,7],[146,7]]},"3788":{"position":[[40,7]]},"3794":{"position":[[151,7]]},"3796":{"position":[[162,7],[300,7],[387,7],[475,7],[535,7],[600,7],[663,7],[728,7],[819,7],[923,7],[1004,7]]},"3798":{"position":[[24,7]]},"3802":{"position":[[40,7]]},"3808":{"position":[[159,7]]},"3810":{"position":[[73,7],[161,7],[221,7],[286,7],[391,7],[619,7],[772,7],[869,7],[999,7],[1067,7],[1141,7],[1252,7],[1351,7],[1445,7]]},"3816":{"position":[[40,7]]},"3822":{"position":[[149,7]]},"3830":{"position":[[40,7]]},"3836":{"position":[[142,7]]},"3838":{"position":[[190,7],[314,7],[442,7],[602,7]]},"3840":{"position":[[4,7],[133,7]]},"3844":{"position":[[40,7]]},"3850":{"position":[[147,7]]},"3852":{"position":[[54,7],[119,7],[227,7],[308,7],[574,7],[700,7],[828,7]]}}}],["defaultcost",{"_index":470,"t":{"3826":{"position":[[81,12]]}}}],["defin",{"_index":132,"t":{"3614":{"position":[[559,6]]},"3642":{"position":[[10,7]]},"3754":{"position":[[10,7]]},"3796":{"position":[[10,7]]},"3838":{"position":[[10,7]]}}}],["delet",{"_index":44,"t":{"3600":{"position":[[627,6],[634,7],[792,6]]},"3614":{"position":[[209,8]]},"3628":{"position":[[587,8]]},"3726":{"position":[[36,8]]},"3754":{"position":[[811,8]]},"3768":{"position":[[826,8]]},"3796":{"position":[[966,8]]},"3852":{"position":[[270,8]]}}}],["delete(key",{"_index":46,"t":{"3600":{"position":[[735,10]]},"3608":{"position":[[174,10]]},"3622":{"position":[[174,10]]},"3636":{"position":[[174,10]]},"3650":{"position":[[174,10]]},"3664":{"position":[[174,10]]},"3678":{"position":[[171,10]]},"3692":{"position":[[175,10]]},"3706":{"position":[[174,10]]},"3720":{"position":[[174,10]]},"3734":{"position":[[174,10]]},"3748":{"position":[[174,10]]},"3762":{"position":[[174,10]]},"3776":{"position":[[174,10]]},"3790":{"position":[[174,10]]},"3804":{"position":[[174,10]]},"3818":{"position":[[174,10]]},"3832":{"position":[[174,10]]},"3846":{"position":[[174,10]]}}}],["design",{"_index":5,"t":{"3600":{"position":[[62,8]]}}}],["develop",{"_index":288,"t":{"3684":{"position":[[1476,9],[1645,9],[2172,9],[2341,9]]}}}],["dgraph",{"_index":74,"t":{"3604":{"position":[[26,6]]},"3814":{"position":[[36,6]]}}}],["dialtimeout",{"_index":325,"t":{"3698":{"position":[[75,11],[141,11]]},"3700":{"position":[[67,12]]}}}],["didn't",{"_index":98,"t":{"3610":{"position":[[113,6]]},"3624":{"position":[[127,6]]},"3638":{"position":[[112,6]]},"3652":{"position":[[132,6]]},"3666":{"position":[[116,6]]},"3680":{"position":[[115,6]]},"3694":{"position":[[111,6]]},"3708":{"position":[[113,6]]},"3722":{"position":[[113,6]]},"3736":{"position":[[114,6]]},"3750":{"position":[[112,6]]},"3764":{"position":[[112,6]]},"3778":{"position":[[113,6]]},"3792":{"position":[[115,6]]},"3806":{"position":[[112,6]]},"3820":{"position":[[116,6]]},"3834":{"position":[[109,6]]},"3848":{"position":[[114,6]]}}}],["differ",{"_index":12,"t":{"3600":{"position":[[158,9]]}}}],["disabl",{"_index":365,"t":{"3752":{"position":[[369,10]]},"3754":{"position":[[964,9]]},"3756":{"position":[[174,10]]},"3796":{"position":[[830,9]]},"3798":{"position":[[169,10]]}}}],["divid",{"_index":340,"t":{"3712":{"position":[[36,7]]}}}],["docker",{"_index":269,"t":{"3684":{"position":[[535,6],[596,6]]}}}],["doesn't",{"_index":275,"t":{"3684":{"position":[[1192,7],[1888,7],[2534,7],[2702,7]]}}}],["don't",{"_index":166,"t":{"3632":{"position":[[211,5]]},"3684":{"position":[[2883,5]]},"3778":{"position":[[210,5]]}}}],["driver",{"_index":2,"t":{"3600":{"position":[[16,7]]},"3618":{"position":[[19,6],[44,6],[67,7]]},"3632":{"position":[[16,6]]},"3652":{"position":[[19,6]]},"3660":{"position":[[20,6]]},"3674":{"position":[[19,6]]},"3688":{"position":[[15,6]]},"3702":{"position":[[19,6]]},"3716":{"position":[[21,7]]},"3730":{"position":[[18,6],[48,7]]},"3744":{"position":[[16,6]]},"3758":{"position":[[16,6]]},"3786":{"position":[[19,6]]},"3800":{"position":[[16,6]]},"3814":{"position":[[23,6]]},"3828":{"position":[[13,6]]},"3842":{"position":[[18,6]]}}}],["driver.cli",{"_index":137,"t":{"3622":{"position":[[288,13]]}}}],["driver/mysql",{"_index":370,"t":{"3758":{"position":[[53,13]]}}}],["dure",{"_index":386,"t":{"3782":{"position":[[106,6]]}}}],["dynamodb",{"_index":60,"t":{"3602":{"position":[[42,8]]},"3674":{"position":[[2,8]]},"3680":{"position":[[0,8],[193,8]]},"3682":{"position":[[148,8]]},"3684":{"position":[[38,8],[326,8],[442,8],[518,9],[1467,8],[1636,8],[2163,8],[2332,8]]}}}],["dynamodb.new(dynamodb.config",{"_index":254,"t":{"3682":{"position":[[166,29]]}}}],["e.g",{"_index":260,"t":{"3684":{"position":[[161,4]]}}}],["each",{"_index":441,"t":{"3810":{"position":[[972,4]]}}}],["ec2",{"_index":247,"t":{"3674":{"position":[[177,3]]},"3828":{"position":[[171,3]]}}}],["effect",{"_index":426,"t":{"3810":{"position":[[541,7]]}}}],["empti",{"_index":37,"t":{"3600":{"position":[[518,5]]}}}],["enabl",{"_index":432,"t":{"3810":{"position":[[715,7]]}}}],["encount",{"_index":220,"t":{"3656":{"position":[[584,9]]},"3684":{"position":[[933,9]]},"3838":{"position":[[536,9]]}}}],["endpoint",{"_index":209,"t":{"3656":{"position":[[108,9],[191,8]]},"3658":{"position":[[56,9]]},"3684":{"position":[[459,9],[723,8]]},"3696":{"position":[[233,10]]},"3698":{"position":[[24,9],[53,9]]},"3700":{"position":[[28,10]]},"3836":{"position":[[255,9],[269,10]]},"3838":{"position":[[102,8],[111,8]]},"3840":{"position":[[52,8],[200,9]]}}}],["environ",{"_index":244,"t":{"3674":{"position":[[131,11]]},"3684":{"position":[[224,11],[261,11]]},"3828":{"position":[[125,11]]}}}],["err",{"_index":411,"t":{"3808":{"position":[[675,3],[737,3]]}}}],["error",{"_index":30,"t":{"3600":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"3608":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3622":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3636":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3650":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3664":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3678":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"3684":{"position":[[2737,5],[3002,7]]},"3692":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"3706":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3720":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3734":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3748":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3762":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3776":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3790":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3804":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3818":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3832":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3846":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]}}}],["especi",{"_index":266,"t":{"3684":{"position":[[480,10]]}}}],["establish",{"_index":327,"t":{"3698":{"position":[[117,9]]}}}],["etcd",{"_index":61,"t":{"3602":{"position":[[51,4]]},"3632":{"position":[[29,4]]},"3688":{"position":[[2,4],[28,4]]},"3694":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":320,"t":{"3696":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":321,"t":{"3696":{"position":[[216,16]]}}}],["exampl",{"_index":78,"t":{"3606":{"position":[[24,8]]},"3620":{"position":[[24,8]]},"3634":{"position":[[24,8]]},"3648":{"position":[[24,8]]},"3662":{"position":[[24,8]]},"3676":{"position":[[24,8]]},"3684":{"position":[[1407,7],[2103,7]]},"3690":{"position":[[24,8]]},"3704":{"position":[[24,8]]},"3718":{"position":[[24,8]]},"3732":{"position":[[24,8]]},"3746":{"position":[[24,8]]},"3760":{"position":[[24,8]]},"3774":{"position":[[24,8]]},"3788":{"position":[[24,8]]},"3802":{"position":[[24,8]]},"3810":{"position":[[555,8]]},"3816":{"position":[[24,8]]},"3830":{"position":[[24,8]]},"3844":{"position":[[24,8]]}}}],["execut",{"_index":438,"t":{"3810":{"position":[[920,7]]}}}],["exist",{"_index":26,"t":{"3600":{"position":[[371,5]]},"3614":{"position":[[118,8],[135,8]]},"3628":{"position":[[491,8],[508,8]]},"3642":{"position":[[485,8],[502,8]]},"3656":{"position":[[315,8],[332,8]]},"3684":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"3712":{"position":[[166,8],[183,8]]},"3740":{"position":[[626,8],[643,8]]},"3754":{"position":[[720,8],[737,8]]},"3768":{"position":[[735,8],[752,8]]},"3778":{"position":[[224,8]]},"3796":{"position":[[875,8],[892,8]]},"3810":{"position":[[1199,8],[1216,8]]},"3838":{"position":[[265,8],[282,8]]},"3852":{"position":[[179,8],[196,8]]}}}],["exp",{"_index":42,"t":{"3600":{"position":[[599,3]]},"3608":{"position":[[131,3]]},"3622":{"position":[[131,3]]},"3636":{"position":[[131,3]]},"3650":{"position":[[131,3]]},"3664":{"position":[[131,3]]},"3678":{"position":[[128,3]]},"3692":{"position":[[132,3]]},"3706":{"position":[[131,3]]},"3720":{"position":[[131,3]]},"3734":{"position":[[131,3]]},"3748":{"position":[[131,3]]},"3762":{"position":[[131,3]]},"3776":{"position":[[131,3]]},"3790":{"position":[[131,3]]},"3804":{"position":[[131,3]]},"3818":{"position":[[131,3]]},"3832":{"position":[[131,3]]},"3846":{"position":[[131,3]]}}}],["expir",{"_index":34,"t":{"3600":{"position":[[474,10],[503,11]]},"3614":{"position":[[218,7]]},"3628":{"position":[[596,7]]},"3726":{"position":[[45,7]]},"3754":{"position":[[820,7]]},"3768":{"position":[[835,7]]},"3796":{"position":[[975,7]]},"3852":{"position":[[279,7]]}}}],["fail",{"_index":326,"t":{"3698":{"position":[[106,7]]}}}],["failov",{"_index":404,"t":{"3808":{"position":[[419,8]]}}}],["failovercli",{"_index":433,"t":{"3810":{"position":[[723,14]]}}}],["failur",{"_index":222,"t":{"3656":{"position":[[604,8]]},"3684":{"position":[[953,8]]},"3838":{"position":[[556,8]]}}}],["fals",{"_index":113,"t":{"3612":{"position":[[281,6]]},"3614":{"position":[[177,5],[620,5]]},"3616":{"position":[[63,6],[196,6]]},"3626":{"position":[[347,6]]},"3628":{"position":[[555,5]]},"3630":{"position":[[151,6]]},"3640":{"position":[[298,6]]},"3642":{"position":[[445,5],[545,5]]},"3644":{"position":[[151,6],[165,6]]},"3656":{"position":[[376,5]]},"3658":{"position":[[96,6]]},"3684":{"position":[[1108,5],[2786,6]]},"3686":{"position":[[103,6]]},"3712":{"position":[[225,5]]},"3738":{"position":[[337,6],[549,6]]},"3740":{"position":[[685,5]]},"3742":{"position":[[134,6]]},"3752":{"position":[[323,6],[548,6]]},"3754":{"position":[[779,5]]},"3756":{"position":[[128,6]]},"3766":{"position":[[323,6],[516,6],[730,6]]},"3768":{"position":[[794,5]]},"3770":{"position":[[128,6]]},"3794":{"position":[[300,6]]},"3796":{"position":[[934,5]]},"3798":{"position":[[187,6]]},"3808":{"position":[[335,6],[1003,6],[1160,6]]},"3810":{"position":[[1263,5]]},"3812":{"position":[[116,6]]},"3836":{"position":[[308,6]]},"3838":{"position":[[325,5]]},"3840":{"position":[[284,6]]},"3850":{"position":[[310,6]]},"3852":{"position":[[238,5]]},"3854":{"position":[[88,6]]}}}],["fast",{"_index":72,"t":{"3604":{"position":[[2,4]]},"3632":{"position":[[165,5]]},"3772":{"position":[[2,4]]}}}],["fiber",{"_index":8,"t":{"3600":{"position":[[95,5]]},"3626":{"position":[[302,8]]},"3628":{"position":[[367,7]]},"3630":{"position":[[106,8]]},"3738":{"position":[[292,8],[504,8]]},"3740":{"position":[[502,7]]},"3742":{"position":[[89,8]]},"3752":{"position":[[283,8]]},"3754":{"position":[[606,7]]},"3756":{"position":[[88,8]]},"3766":{"position":[[283,8]]},"3768":{"position":[[621,7]]},"3770":{"position":[[88,8]]},"3796":{"position":[[674,7]]},"3798":{"position":[[127,8]]},"3852":{"position":[[65,7]]}}}],["fiber.badg",{"_index":112,"t":{"3612":{"position":[[256,17]]},"3614":{"position":[[65,16]]},"3616":{"position":[[38,17]]}}}],["fiber.db",{"_index":177,"t":{"3642":{"position":[[107,10]]},"3644":{"position":[[77,11]]}}}],["fiber.sqlite3",{"_index":482,"t":{"3850":{"position":[[260,18]]},"3854":{"position":[[38,18]]}}}],["fiber_storag",{"_index":147,"t":{"3626":{"position":[[323,16]]},"3628":{"position":[[437,15]]},"3630":{"position":[[127,16]]},"3642":{"position":[[182,15]]},"3644":{"position":[[97,16]]},"3672":{"position":[[138,16]]},"3684":{"position":[[354,16]]},"3686":{"position":[[35,16]]},"3738":{"position":[[313,16],[525,16]]},"3740":{"position":[[572,15]]},"3742":{"position":[[110,16]]},"3752":{"position":[[299,16]]},"3754":{"position":[[671,15]]},"3756":{"position":[[104,16]]},"3766":{"position":[[299,16]]},"3768":{"position":[[686,15]]},"3770":{"position":[[104,16]]},"3794":{"position":[[276,16]]},"3796":{"position":[[739,15]]},"3798":{"position":[[143,16]]},"3850":{"position":[[286,16]]},"3852":{"position":[[130,15]]},"3854":{"position":[[64,16]]}}}],["field",{"_index":153,"t":{"3630":{"position":[[23,6]]},"3674":{"position":[[67,6],[206,6]]},"3796":{"position":[[139,6]]},"3828":{"position":[[61,6],[200,6]]}}}],["file",{"_index":182,"t":{"3642":{"position":[[265,4]]},"3684":{"position":[[216,4]]}}}],["first",{"_index":97,"t":{"3610":{"position":[[100,5]]},"3624":{"position":[[114,5]]},"3638":{"position":[[99,5]]},"3652":{"position":[[119,5]]},"3666":{"position":[[103,5]]},"3680":{"position":[[102,5]]},"3694":{"position":[[98,5]]},"3708":{"position":[[100,5]]},"3722":{"position":[[100,5]]},"3736":{"position":[[101,5]]},"3750":{"position":[[99,5]]},"3764":{"position":[[99,5]]},"3778":{"position":[[100,5]]},"3792":{"position":[[102,5]]},"3806":{"position":[[99,5]]},"3820":{"position":[[103,5]]},"3834":{"position":[[96,5]]},"3848":{"position":[[101,5]]}}}],["follow",{"_index":105,"t":{"3612":{"position":[[87,9]]},"3626":{"position":[[89,9]]},"3640":{"position":[[86,9]]},"3654":{"position":[[90,9]]},"3668":{"position":[[90,9]]},"3682":{"position":[[89,9]]},"3696":{"position":[[85,9]]},"3710":{"position":[[89,9]]},"3724":{"position":[[87,9]]},"3738":{"position":[[88,9]]},"3752":{"position":[[86,9]]},"3766":{"position":[[86,9]]},"3780":{"position":[[87,9]]},"3794":{"position":[[92,9]]},"3808":{"position":[[100,9]]},"3822":{"position":[[90,9]]},"3836":{"position":[[83,9]]},"3850":{"position":[[88,9]]}}}],["format",{"_index":425,"t":{"3810":{"position":[[433,6]]}}}],["free",{"_index":284,"t":{"3684":{"position":[[1369,4],[2065,4]]}}}],["frequenc",{"_index":460,"t":{"3822":{"position":[[303,9]]},"3824":{"position":[[60,9]]}}}],["full",{"_index":168,"t":{"3632":{"position":[[227,4]]}}}],["func",{"_index":81,"t":{"3608":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3622":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3636":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3650":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3664":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3678":{"position":[[0,4],[32,4],[82,4],[153,4],[196,4],[228,4],[260,4]]},"3692":{"position":[[0,4],[36,4],[86,4],[157,4],[200,4],[232,4],[264,4]]},"3706":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3720":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3734":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3748":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3762":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3776":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3790":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3804":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3818":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3832":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3846":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]}}}],["garbag",{"_index":51,"t":{"3600":{"position":[[877,7]]}}}],["gcinterv",{"_index":114,"t":{"3612":{"position":[[288,11]]},"3614":{"position":[[275,10]]},"3616":{"position":[[70,11]]},"3626":{"position":[[354,11]]},"3628":{"position":[[653,10]]},"3630":{"position":[[158,11]]},"3724":{"position":[[246,11]]},"3726":{"position":[[92,10]]},"3728":{"position":[[28,11]]},"3752":{"position":[[330,11],[555,11]]},"3754":{"position":[[877,10]]},"3756":{"position":[[135,11]]},"3766":{"position":[[330,11],[523,11],[737,11]]},"3768":{"position":[[892,10]]},"3770":{"position":[[135,11]]},"3794":{"position":[[307,11]]},"3796":{"position":[[1032,10]]},"3798":{"position":[[194,11]]},"3850":{"position":[[317,11]]},"3852":{"position":[[336,10]]},"3854":{"position":[[95,11]]}}}],["get",{"_index":21,"t":{"3600":{"position":[[289,4]]}}}],["get(key",{"_index":27,"t":{"3600":{"position":[[377,7]]},"3608":{"position":[[53,7]]},"3622":{"position":[[53,7]]},"3636":{"position":[[53,7]]},"3650":{"position":[[53,7]]},"3664":{"position":[[53,7]]},"3678":{"position":[[50,7]]},"3692":{"position":[[54,7]]},"3706":{"position":[[53,7]]},"3720":{"position":[[53,7]]},"3734":{"position":[[53,7]]},"3748":{"position":[[53,7]]},"3762":{"position":[[53,7]]},"3776":{"position":[[53,7]]},"3790":{"position":[[53,7]]},"3804":{"position":[[53,7]]},"3818":{"position":[[53,7]]},"3832":{"position":[[53,7]]},"3846":{"position":[[53,7]]}}}],["github.com//:@127.0.0.1:6379/:@localhost:6379/:@tcp(:)// And then install the mysql implementation: go get github.com/gofiber/storage/arangodb","s":"Installation","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#installation","p":3860},{"i":3869,"t":"Import the storage package. import \"github.com/gofiber/storage/arangodb\" You can use the following possibilities to create a storage: // Initialize default config store := arangodb.New() // Initialize custom config store := arangodb.New(arangodb.Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#examples","p":3860},{"i":3871,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"http://127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 8529 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing collection // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#config","p":3860},{"i":3873,"t":"Used only for optional fields var ConfigDefault = Config{ Host: \"http://127.0.0.1\", Port: 8529, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/arangodb/","h":"#default-config","p":3860},{"i":3875,"t":"Azure Blob storage is Microsoft's object storage solution for the cloud. NOTE: Go 1.18 or later is required. Source: link","s":"Azure Blob","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"","p":3874},{"i":3877,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#table-of-contents","p":3874},{"i":3879,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *azblob.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#signatures","p":3874},{"i":3881,"t":"Azure blob storage driver is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the azure blob implementation: go get github.com/gofiber/storage/azureblob","s":"Installation","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#installation","p":3874},{"i":3883,"t":"Import the storage package. import \"github.com/gofiber/storage/azureblob\" You can use the following possibilities to create a storage: // Initialize default config store := azureblob.New() // Initialize custom config store := azureblob.New(azureblob.Config{ Account: \"test\", Container: \"test\", Credentials: Credentials{ Account: \"test\", Key: \"YXp1cml0ZWtleQo=\", }, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#examples","p":3874},{"i":3885,"t":"type Config struct { // Storage account name. Account string // Container name. Container string // Storage endpoint. // Optional. Default: \"https://STORAGEACCOUNTNAME.blob.core.windows.net\" Endpoint string // Request timeout. // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing container. // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 3 MaxAttempts int }","s":"Config","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#config","p":3874},{"i":3887,"t":"var ConfigDefault = Config{ Account: \"\", Container: \"\", Endpoint: \"\", RequestTimeout: 0, Reset: false, MaxAttempts: 3, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/azureblob/","h":"#default-config","p":3874},{"i":3889,"t":"A fast key-value DB using dgraph-io/badger","s":"Badger","u":"/storage/sqlite3_v1.x.x/badger/","h":"","p":3888},{"i":3891,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/badger/","h":"#table-of-contents","p":3888},{"i":3893,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/badger/","h":"#signatures","p":3888},{"i":3895,"t":"Badger is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the badger implementation: go get github.com/gofiber/storage/badger","s":"Installation","u":"/storage/sqlite3_v1.x.x/badger/","h":"#installation","p":3888},{"i":3897,"t":"Import the storage package. import \"github.com/gofiber/storage/badger\" You can use the following possibilities to create a storage: // Initialize default config store := badger.New() // Initialize custom config store := badger.New(badger.Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/badger/","h":"#examples","p":3888},{"i":3899,"t":"type Config struct { // Database name // // Optional. Default is \"./fiber.badger\" Database string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // BadgerOptions is a way to set options in badger // // Optional. Default is badger.DefaultOptions(\"./fiber.badger\") BadgerOptions badger.Options // Logger is the default logger used by badger // // Optional. Default is nil Logger badger.Logger // UseLogger define if any logger will be used // // Optional. Default is false UseLogger bool }","s":"Config","u":"/storage/sqlite3_v1.x.x/badger/","h":"#config","p":3888},{"i":3901,"t":"var ConfigDefault = Config{ Database: \"./fiber.badger\", Reset: false, GCInterval: 10 * time.Second, BadgerOptions: badger.DefaultOptions(\"./fiber.badger\").WithLogger(nil), Logger: nil, UseLogger: false, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/badger/","h":"#default-config","p":3888},{"i":3903,"t":"A Bbolt storage driver using etcd-io/bbolt. Bolt is a pure Go key/value store inspired by Howard Chu's LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don't require a full database server such as Postgres or MySQL.","s":"Bbolt","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"","p":3902},{"i":3905,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#table-of-contents","p":3902},{"i":3907,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *bbolt.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#signatures","p":3902},{"i":3909,"t":"Bbolt is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/bbolt","s":"Installation","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#installation","p":3902},{"i":3911,"t":"Import the storage package. import \"github.com/gofiber/storage/bbolt\" You can use the following possibilities to create a storage: // Initialize default config store := bbolt.New() // Initialize custom config store := bbolt.New(bbolt.Config{ Database: \"my_database.db\", Bucket: \"my-bucket\", Reset: false, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#examples","p":3902},{"i":3913,"t":"// Config defines the config for storage. type Config struct { // Database path // // Optional. Default is \"fiber.db\" Database string // Bbolt bucket name // // Optional. Default is \"fiber_storage\" Bucket string // Timeout is the amount of time to wait to obtain a file lock. // Only available on Darwin and Linux. // // Optional. Default is 60 * time.Second. Timeout time.Duration // Open database in read-only mode. // // Optional. Default is false ReadOnly bool // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#config","p":3902},{"i":3915,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Database: \"fiber.db\", Bucket: \"fiber_storage\", Timeout: 60 * time.Second, ReadOnly: false, Reset: false, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/bbolt/","h":"#default-config","p":3902},{"i":3917,"t":"A Couchbase storage driver using couchbase/gocb.","s":"Couchbase","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"","p":3916},{"i":3919,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#table-of-contents","p":3916},{"i":3921,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *gocb.Cluster","s":"Signatures","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#signatures","p":3916},{"i":3923,"t":"Couchbase is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the Couchbase implementation: go get github.com/gofiber/storage/couchbase","s":"Installation","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#installation","p":3916},{"i":3925,"t":"Import the storage package. import \"github.com/gofiber/storage/couchbase\" You can use the following possibilities to create a storage: // Initialize default config store := couchbase.New() // Initialize Couchbase storage with custom config store := couchbase.New(couchbase.Config{ Host: \"127.0.0.1:8091\", Username: \"\", Password: \"\", Bucket: 0, ConnectionTimeout: 3* time.Second, KVTimeout: 1* time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#examples","p":3916},{"i":3927,"t":"type Config struct { // The application username to Connect to the Couchbase cluster Username string // The application password to Connect to the Couchbase cluster Password string // The connection string for the Couchbase cluster Host string // The name of the bucket to Connect to Bucket string // The timeout for connecting to the Couchbase cluster ConnectionTimeout time.Duration // The timeout for performing operations on the Couchbase cluster KVTimeout time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#config","p":3916},{"i":3929,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ Host: \"127.0.0.1:8091\", Username: \"admin\", Password: \"123456\", Bucket: \"fiber_storage\", ConnectionTimeout: 3 * time.Second, KVTimeout: 1 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/couchbase/","h":"#default-config","p":3916},{"i":3931,"t":"A DynamoDB storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials ....","s":"DynamoDB","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"","p":3930},{"i":3933,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#table-of-contents","p":3930},{"i":3935,"t":"func New(config Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *awsdynamodb.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#signatures","p":3930},{"i":3937,"t":"DynamoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the dynamodb implementation: go get github.com/gofiber/storage/dynamodb","s":"Installation","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#installation","p":3930},{"i":3939,"t":"Import the storage package. import \"github.com/gofiber/storage/dynamodb\" You can use the following possibilities to create a storage: // Initialize dynamodb store := dynamodb.New(dynamodb.Config{ })","s":"Examples","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#examples","p":3930},{"i":3941,"t":"type Config struct { // Region of the DynamoDB service you want to use. // Valid values: https://docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region. // E.g. \"us-west-2\". // Optional (read from shared config file or environment variable if not set). // Environment variable: \"AWS_REGION\". Region string // Name of the DynamoDB table. // Optional (\"fiber_storage\" by default). Table string // CustomEndpoint allows you to set a custom DynamoDB service endpoint. // This is especially useful if you're running a \"DynamoDB local\" Docker container for local testing. // Typical value for the Docker container: \"http://localhost:8000\". // See https://hub.docker.com/r/amazon/dynamodb-local/. // Optional (\"\" by default) Endpoint string // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. ReadCapacityUnits int64 // ReadCapacityUnits of the table. // Only required when the table doesn't exist yet and is created by gokv. // Optional (5 by default, which is the same default value as when creating a table in the web console) // 25 RCUs are included in the free tier (across all tables). // For example calculations, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/HowItWorks.ProvisionedThroughput. // For limits, see https://github.com/awsdocs/amazon-dynamodb-developer-guide/blob/c420420a59040c5b3dd44a6e59f7c9e55fc922ef/doc_source/Limits.md#capacity-units-and-provisioned-throughput.md#provisioned-throughput. WriteCapacityUnits int64 // If the table doesn't exist yet, gokv creates it. // If WaitForTableCreation is true, gokv will block until the table is created, with a timeout of 15 seconds. // If the table still doesn't exist after 15 seconds, an error is returned. // If WaitForTableCreation is false, gokv returns the client immediately. // In the latter case you need to make sure that you don't read from or write to the table before it's created, // because otherwise you will get ResourceNotFoundException errors. // Optional (true by default). WaitForTableCreation *bool } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#config","p":3930},{"i":3943,"t":"var ConfigDefault = Config{ Table: \"fiber_storage\", Credentials: Credentials{}, MaxAttempts: 3, Reset: false, ReadCapacityUnits: 5, WriteCapacityUnits: 5, WaitForTableCreation: aws.Bool(true), }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/dynamodb/","h":"#default-config","p":3930},{"i":3945,"t":"A Etcd storage driver using etcd-io/etcd.","s":"Etcd","u":"/storage/sqlite3_v1.x.x/etcd/","h":"","p":3944},{"i":3947,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#table-of-contents","p":3944},{"i":3949,"t":"func New(config ...Config) *Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *clientv3.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#signatures","p":3944},{"i":3951,"t":"Etcd is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the etcd implementation: go get github.com/gofiber/storage/etcd","s":"Installation","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#installation","p":3944},{"i":3953,"t":"Import the storage package. import \"github.com/gofiber/storage/etcd\" You can use the following possibilities to create a storage: // Initialize default config store := etcd.New() // Initialize custom config store := etcd.New(Config{ Endpoints: []string{\"localhost:2379\"}, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#examples","p":3944},{"i":3955,"t":"type Config struct { // Endpoints is a list of URLs. Endpoints []string // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration // Username is a username for authentication. Username string // Password is a password for authentication. Password string // TLS holds the client secure credentials, if any. TLS *tls.Config }","s":"Config","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#config","p":3944},{"i":3957,"t":"var ConfigDefault = Config{ Endpoints: []string{\"localhost:2379\"}, DialTimeout: 2 * time.Second, Username: \"\", Password: \"\", TLS: nil, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/etcd/","h":"#default-config","p":3944},{"i":3959,"t":"A Memcache storage driver using bradfitz/gomemcache.","s":"Memcache","u":"/storage/sqlite3_v1.x.x/memcache/","h":"","p":3958},{"i":3961,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#table-of-contents","p":3958},{"i":3963,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mc.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#signatures","p":3958},{"i":3965,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#installation","p":3958},{"i":3967,"t":"Import the storage package. import \"github.com/gofiber/storage/memcache\" You can use the following possibilities to create a storage: // Initialize default config store := memcache.New() // Initialize custom config store := memcache.New(memcache.Config{ Servers: \"localhost:11211\", })","s":"Examples","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#examples","p":3958},{"i":3969,"t":"type Config struct { // Server list divided by , // i.e. server1:11211, server2:11212 // // Optional. Default is \"127.0.0.1:11211\" Servers string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#config","p":3958},{"i":3971,"t":"var ConfigDefault = Config{ Servers: \"127.0.0.1:11211\", }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/memcache/","h":"#default-config","p":3958},{"i":3973,"t":"An in-memory storage driver.","s":"Memory","u":"/storage/sqlite3_v1.x.x/memory/","h":"","p":3972},{"i":3975,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/memory/","h":"#table-of-contents","p":3972},{"i":3977,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() map[string]entry","s":"Signatures","u":"/storage/sqlite3_v1.x.x/memory/","h":"#signatures","p":3972},{"i":3979,"t":"Memory is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the memory implementation: go get github.com/gofiber/storage/memory","s":"Installation","u":"/storage/sqlite3_v1.x.x/memory/","h":"#installation","p":3972},{"i":3981,"t":"Import the storage package. import \"github.com/gofiber/storage/memory\" You can use the following possibilities to create a storage: // Initialize default config store := memory.New() // Initialize custom config store := memory.New(memory.Config{ GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/memory/","h":"#examples","p":3972},{"i":3983,"t":"type Config struct { // Time before deleting expired keys // // Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/memory/","h":"#config","p":3972},{"i":3985,"t":"var ConfigDefault = Config{ GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/memory/","h":"#default-config","p":3972},{"i":3987,"t":"A MongoDB storage driver using mongodb/mongo-go-driver.","s":"MongoDB","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"","p":3986},{"i":3989,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#table-of-contents","p":3986},{"i":3991,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *mongo.Database","s":"Signatures","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#signatures","p":3986},{"i":3993,"t":"MongoDB is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mongodb implementation: go get github.com/gofiber/storage/mongodb","s":"Installation","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#installation","p":3986},{"i":3995,"t":"Import the storage package. import \"github.com/gofiber/storage/mongodb\" You can use the following possibilities to create a storage: // Initialize default config store := mongodb.New() // Initialize custom config store := mongodb.New(mongodb.Config{ Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }) // Initialize custom config using connection string store := mongodb.New(mongodb.Config{ ConnectionURI: \"mongodb://user:password@127.0.0.1:27017\", Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#examples","p":3986},{"i":3997,"t":"type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 27017 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Collection name // // Optional. Default is \"fiber_storage\" Collection string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool }","s":"Config","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#config","p":3986},{"i":3999,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 27017, Database: \"fiber\", Collection: \"fiber_storage\", Reset: false, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/mongodb/","h":"#default-config","p":3986},{"i":4001,"t":"A MSSQL storage driver using microsoft/go-mssqldb.","s":"MSSQL","u":"/storage/sqlite3_v1.x.x/mssql/","h":"","p":4000},{"i":4003,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#table-of-contents","p":4000},{"i":4005,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#signatures","p":4000},{"i":4007,"t":"MSSQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mssql implementation: go get github.com/gofiber/storage/mssql","s":"Installation","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#installation","p":4000},{"i":4009,"t":"Import the storage package. import \"github.com/gofiber/storage/mssql\" You can use the following possibilities to create a storage: // Initialize default config store := mssql.New() // Initialize custom config store := mssql.New(mssql.Config{ Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }) // Initialize custom config using connection string store := mssql.New(mssql.Config{ ConnectionURI: \"sqlserver://user:password@localhost:1433?database=fiber\" Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#examples","p":4000},{"i":4011,"t":"// Config defines the config for storage. type Config struct { // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 1433 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Instance name // // Optional. Default is \"\" Instance string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // The SSL mode for the connection // // Optional. Default is \"disable\" SslMode string }","s":"Config","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#config","p":4000},{"i":4013,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 1433, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, SslMode: \"disable\", }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/mssql/","h":"#default-config","p":4000},{"i":4015,"t":"A MySQL storage driver using database/sql and go-sql-driver/mysql.","s":"MySQL","u":"/storage/sqlite3_v1.x.x/mysql/","h":"","p":4014},{"i":4017,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#table-of-contents","p":4014},{"i":4019,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#signatures","p":4014},{"i":4021,"t":"MySQL is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the mysql implementation: go get github.com/gofiber/storage/mysql","s":"Installation","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#installation","p":4014},{"i":4023,"t":"Import the storage package. import \"github.com/gofiber/storage/mysql\" You can use the following possibilities to create a storage: // Initialize default config store := mysql.New() // Initialize custom config store := mysql.New(mysql.Config{ Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using connection string store := mysql.New(mysql.Config{ ConnectionURI: \":@tcp(:)/\" Reset: false, GCInterval: 10 * time.Second, }) // Initialize custom config using sql db connection db, _ := sql.Open(\"mysql\", \":@tcp(:)/\") store := mysql.New(mysql.Config{ Db: db, Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#examples","p":4014},{"i":4025,"t":"type Config struct { // DB Will override ConnectionURI and all other authentication values if used // // Optional. Default is nil Db *sql.DB // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 3306 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#config","p":4014},{"i":4027,"t":"var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 3306, Database: \"fiber\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/mysql/","h":"#default-config","p":4014},{"i":4029,"t":"A fast key-value DB using cockroachdb/pebble","s":"Pebble","u":"/storage/sqlite3_v1.x.x/pebble/","h":"","p":4028},{"i":4031,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#table-of-contents","p":4028},{"i":4033,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *badger.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#signatures","p":4028},{"i":4035,"t":"Pebble is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// Note: This step is only required if you don't have an existing module. And then install the Pebble implementation: go get github.com/gofiber/storage/pebble","s":"Installation","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#installation","p":4028},{"i":4037,"t":"Import the storage package. import \"github.com/gofiber/storage/pebble\" You can use the following possibilities to create a storage: // Initialize default config store := pebble.New() // Initialize custom config store := pebble.New(pebble.Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#examples","p":4028},{"i":4039,"t":"type Config struct { // Database name // // Optional. Default is \"./db\" Path string // Pass write options during write operations // // Optional. Default is nil WriteOptions &pebble.WriteOptions{} }","s":"Config","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#config","p":4028},{"i":4041,"t":"var ConfigDefault = Config{ Path: \"db\", WriteOptions: &pebble.WriteOptions{}, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/pebble/","h":"#default-config","p":4028},{"i":4043,"t":"A Postgres storage driver using jackc/pgx.","s":"Postgres","u":"/storage/sqlite3_v1.x.x/postgres/","h":"","p":4042},{"i":4045,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#table-of-contents","p":4042},{"i":4047,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *pgxpool.Pool","s":"Signatures","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#signatures","p":4042},{"i":4049,"t":"Postgres is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the postgres implementation: go get github.com/gofiber/storage/postgres/v2","s":"Installation","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#installation","p":4042},{"i":4051,"t":"Import the storage package. import \"github.com/gofiber/storage/postgres/v2\" You can use the following possibilities to create a storage: // Initialize default config store := postgres.New() // Initialize custom config store := postgres.New(postgres.Config{ Db: dbPool, Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#examples","p":4042},{"i":4053,"t":"// Config defines the config for storage. type Config struct { // DB pgxpool.Pool object will override connection uri and other connection fields // // Optional. Default is nil DB *pgxpool.Pool // Connection string to use for DB. Will override all other authentication values if used // // Optional. Default is \"\" ConnectionURI string // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 5432 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // The SSL mode for the connection // // Optional. Default is \"disable\" SSLMode string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#config","p":4042},{"i":4055,"t":"// ConfigDefault is the default config var ConfigDefault = Config{ ConnectionURI: \"\", Host: \"127.0.0.1\", Port: 5432, Database: \"fiber\", Table: \"fiber_storage\", SSLMode: \"disable\", Reset: false, GCInterval: 10 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/postgres/","h":"#default-config","p":4042},{"i":4057,"t":"A Redis storage driver using go-redis/redis.","s":"Redis","u":"/storage/sqlite3_v1.x.x/redis/","h":"","p":4056},{"i":4059,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/redis/","h":"#table-of-contents","p":4056},{"i":4061,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() redis.UniversalClient","s":"Signatures","u":"/storage/sqlite3_v1.x.x/redis/","h":"#signatures","p":4056},{"i":4063,"t":"Redis is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the redis implementation: go get github.com/gofiber/storage/redis/v2","s":"Installation","u":"/storage/sqlite3_v1.x.x/redis/","h":"#installation","p":4056},{"i":4065,"t":"Import the storage package. import \"github.com/gofiber/storage/redis/v2\" You can use the one of the following options to create a Redis Storage: // Initialize default config store := redis.New() // Initialize custom config store := redis.New(redis.Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), }) // Initialize Redis Failover Client store := redis.New(redis.Config{ MasterName: \"master-name\", Addrs: []string{\":6379\"}, }) // Initialize Redis Cluster Client store := redis.New(redis.Config{ Addrs: []string{\":6379\", \":6380\"}, }) // Create a client with support for TLS cer, err := tls.LoadX509KeyPair(\"./client.crt\", \"./client.key\") if err != nil { log.Println(err) return } tlsCfg := &tls.Config{ MinVersion: tls.VersionTLS12, InsecureSkipVerify: true, Certificates: []tls.Certificate{cer}, } store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", TLSConfig: tlsCfg, Reset: false, }) // Create a client with a Redis URL with all information. store = redis.New(redis.Config{ URL: \"redis://:@127.0.0.1:6379/\", Reset: false, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/redis/","h":"#examples","p":4056},{"i":4067,"t":"type Config struct { // Host name where the DB is hosted // // Optional. Default is \"127.0.0.1\" Host string // Port where the DB is listening on // // Optional. Default is 6379 Port int // Server username // // Optional. Default is \"\" Username string // Server password // // Optional. Default is \"\" Password string // Database to be selected after connecting to the server. // // Optional. Default is 0 Database int // URL standard format Redis URL. If this is set all other config options, Host, Port, Username, Password, Database have no effect. // // Example: redis://:@localhost:6379/ // Optional. Default is \"\" URL string // Either a single address or a seed list of host:port addresses, this enables FailoverClient and ClusterClient // // Optional. Default is []string{} Addrs []string // MasterName is the sentinel master's name // // Optional. Default is \"\" MasterName string // ClientName will execute the `CLIENT SETNAME ClientName` command for each conn. // // Optional. Default is \"\" ClientName string // SentinelUsername // // Optional. Default is \"\" SentinelUsername string // SentinelPassword // // Optional. Default is \"\" SentinelPassword string // Reset clears any existing keys in existing Collection // // Optional. Default is false Reset bool // TLS Config to use. When set TLS will be negotiated. // // Optional. Default is nil TLSConfig *tls.Config // Maximum number of socket connections. // // Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int }","s":"Config","u":"/storage/sqlite3_v1.x.x/redis/","h":"#config","p":4056},{"i":4069,"t":"var ConfigDefault = Config{ Host: \"127.0.0.1\", Port: 6379, Username: \"\", Password: \"\", URL: \"\", Database: 0, Reset: false, TLSConfig: nil, PoolSize: 10 * runtime.GOMAXPROCS(0), Addrs: []string{}, MasterName: \"\", ClientName: \"\", SentinelUsername: \"\", SentinelPassword: \"\", }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/redis/","h":"#default-config","p":4056},{"i":4071,"t":"A Memory-bound storage driver using dgraph-io/ristretto.","s":"Ristretto","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"","p":4070},{"i":4073,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#table-of-contents","p":4070},{"i":4075,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *ristretto.Cache","s":"Signatures","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#signatures","p":4070},{"i":4077,"t":"Ristretto is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the ristretto implementation: go get github.com/gofiber/storage/ristretto","s":"Installation","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#installation","p":4070},{"i":4079,"t":"Import the storage package. import \"github.com/gofiber/storage/ristretto\" You can use the following possibilities to create a storage: // Initialize default config store := ristretto.New() // Initialize custom config store := ristretto.New(ristretto.Config{ NumCounters: 1e7, // number of keys to track frequency of (10M). MaxCost: 1 << 30, // maximum cost of cache (1GB). BufferItems: 64, // number of keys per Get buffer. })","s":"Examples","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#examples","p":4070},{"i":4081,"t":"type Config struct { // NumCounters number of keys to track frequency of (10M). NumCounters int64 // MaxCost maximum cost of cache (1GB). MaxCost int64 // BufferItems number of keys per Get buffer. BufferItems int64 }","s":"Config","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#config","p":4070},{"i":4083,"t":"var ConfigDefault = Config{ NumCounters: 1e7, MaxCost: 1 << 30, BufferItems: 64, DefaultCost: 1, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/ristretto/","h":"#default-config","p":4070},{"i":4085,"t":"A S3 storage driver using aws/aws-sdk-go-v2. Note: If config fields of credentials not given, credentials are using from the environment variables, ~/.aws/credentials, or EC2 instance role. If config fields of credentials given, credentials are using from config. Look at: specifying credentials","s":"S3","u":"/storage/sqlite3_v1.x.x/s3/","h":"","p":4084},{"i":4087,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/s3/","h":"#table-of-contents","p":4084},{"i":4089,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *s3.Client","s":"Signatures","u":"/storage/sqlite3_v1.x.x/s3/","h":"#signatures","p":4084},{"i":4091,"t":"S3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the s3 implementation: go get github.com/gofiber/storage/s3","s":"Installation","u":"/storage/sqlite3_v1.x.x/s3/","h":"#installation","p":4084},{"i":4093,"t":"Import the storage package. import \"github.com/gofiber/storage/s3\" You can use the following possibilities to create a storage: // Initialize default config store := s3.New() // Initialize custom config store := s3.New(s3.Config{ Bucket: \"my-bucket-url\", Endpoint: \"my-endpoint\", Region: \"my-region\", Reset: false, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/s3/","h":"#examples","p":4084},{"i":4095,"t":"// Config defines the config for storage. type Config struct { // S3 bucket name Bucket string // AWS endpoint Endpoint string // AWS region Region string // Request timeout // // Optional. Default is 0 (no timeout) RequestTimeout time.Duration // Reset clears any existing keys in existing Bucket // // Optional. Default is false Reset bool // Credentials overrides AWS access key and AWS secret access key. Not recommended. // // Optional. Default is Credentials{} Credentials Credentials // The maximum number of times requests that encounter retryable failures should be attempted. // // Optional. Default is 3 MaxAttempts int } type Credentials struct { AccessKey string SecretAccessKey string }","s":"Config","u":"/storage/sqlite3_v1.x.x/s3/","h":"#config","p":4084},{"i":4097,"t":"The default configuration lacks Bucket, Region, and Endpoint which are all required and must be overwritten: // ConfigDefault is the default config var ConfigDefault = Config{ Bucket: \"\", Region: \"\", Endpoint: \"\", Credentials: Credentials{}, MaxAttempts: 3, RequestTimeout: 0, Reset: false, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/s3/","h":"#default-config","p":4084},{"i":4099,"t":"A SQLite3 storage driver using mattn/go-sqlite3.","s":"SQLite3","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"","p":4098},{"i":4101,"t":"Signatures Installation Examples Config Default Config","s":"Table of Contents","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#table-of-contents","p":4098},{"i":4103,"t":"func New(config ...Config) Storage func (s *Storage) Get(key string) ([]byte, error) func (s *Storage) Set(key string, val []byte, exp time.Duration) error func (s *Storage) Delete(key string) error func (s *Storage) Reset() error func (s *Storage) Close() error func (s *Storage) Conn() *sql.DB","s":"Signatures","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#signatures","p":4098},{"i":4105,"t":"SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: go mod init github.com// And then install the sqlite3 implementation: go get github.com/gofiber/storage/sqlite3","s":"Installation","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#installation","p":4098},{"i":4107,"t":"Import the storage package. import \"github.com/gofiber/storage/sqlite3\" You can use the following possibilities to create a storage: // Initialize default config store := sqlite3.New() // Initialize custom config store := sqlite3.New(sqlite3.Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, })","s":"Examples","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#examples","p":4098},{"i":4109,"t":"type Config struct { // Database name // // Optional. Default is \"fiber\" Database string // Table name // // Optional. Default is \"fiber_storage\" Table string // Reset clears any existing keys in existing Table // // Optional. Default is false Reset bool // Time before deleting expired keys // // Optional. Default is 10 * time.Second GCInterval time.Duration // ////////////////////////////////// // Adaptor related config options // // ////////////////////////////////// // MaxIdleConns sets the maximum number of connections in the idle connection pool. // // Optional. Default is 100. MaxIdleConns int // MaxOpenConns sets the maximum number of open connections to the database. // // Optional. Default is 100. MaxOpenConns int // ConnMaxLifetime sets the maximum amount of time a connection may be reused. // // Optional. Default is 1 second. ConnMaxLifetime time.Duration }","s":"Config","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#config","p":4098},{"i":4111,"t":"var ConfigDefault = Config{ Database: \"./fiber.sqlite3\", Table: \"fiber_storage\", Reset: false, GCInterval: 10 * time.Second, MaxOpenConns: 100, MaxIdleConns: 100, ConnMaxLifetime: 1 * time.Second, }","s":"Default Config","u":"/storage/sqlite3_v1.x.x/sqlite3/","h":"#default-config","p":4098}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3857",[0,2.408,1,1.183,2,1.08,3,1.021,4,4.843,5,2.408,6,0.588,7,2.408,8,1.112,9,2.408,10,1.49,11,2.408,12,2.408,13,2.408,14,3.958,15,2.131,16,2.408,17,2.408,18,2.408,19,2.408,20,1.021,21,2.408,22,4.489,23,2.813,24,2.177,25,3.13,26,1.145,27,1.021,28,1.287,29,1.64,30,2.813,31,1.705,32,0.994,33,2.408,34,2.36,35,1.41,36,2.408,37,2.408,38,2.408,39,2.408,40,1.021,41,1.021,42,1.021,43,0.762,44,2.957,45,1.705,46,1.021,47,0.937,48,2.054,49,2.408,50,2.131,51,2.408,52,2.408,53,1.95,54,1.262]],["t/3859",[55,4.571,56,5.645,57,4.571,58,4.252,59,3.998,60,3.998,61,4.252,62,4.997,63,3.998,64,4.571,65,4.571,66,3.998,67,4.997,68,4.252,69,3.998,70,3.998,71,4.571]],["t/3861",[1,1.131,2,3.761,6,1.589,55,5.272,72,7.823]],["t/3863",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3865",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,82,4.122]],["t/3867",[3,2.17,55,4.143,66,3.623,74,1.45,83,2.112,84,2.112,85,2.23,86,5.116,87,2.733,88,2.23,89,2.17,90,2.23,91,2.17,92,2.17,93,1.45,94,2.17,95,2.23,96,2.23,97,2.23,98,2.23,99,2.23,100,4.529]],["t/3869",[1,1.032,6,1.04,8,1.967,10,1.493,32,2.452,47,0.824,76,0.458,77,0.824,93,1.683,100,3.771,101,2.589,102,1.857,103,1.857,104,1.91,105,1.807,106,4.26,107,1.857,108,4.26,109,1.759,110,3.45,111,1.91,112,3.45,113,1.444,114,2.721,115,1.628,116,1.234,117,1.714,118,1.589,119,1.514]],["t/3871",[8,1.194,10,1.657,20,1.097,23,1.69,26,1.947,28,1.672,34,1.58,43,0.819,44,1.58,47,0.792,76,0.199,77,1.406,109,2.097,110,2.095,111,1.836,112,2.095,113,1.388,114,3.244,115,0.989,116,0.749,117,1.041,118,0.965,119,0.919,120,1.128,121,2.416,122,2.074,123,3.355,124,1.735,125,1.457,126,2.305,127,2.074,128,2.074,129,1.311,130,1.311,131,1.404,132,1.58]],["t/3873",[6,1.283,8,2.427,10,1.41,47,1.017,76,0.405,109,2.171,110,4.256,111,2.357,112,4.256,113,1.782,114,3.357,115,2.009,116,1.523,117,2.114,118,1.96,119,1.868,123,2.427,133,3.96,134,2.292,135,2.292]],["t/3875",[1,1.268,87,2.117,136,5.15,137,5.15,138,5.817,139,5.15,140,5.817,141,5.817,142,4.382,143,5.817,144,5.817,145,4.12,146,5.817,147,5.817]],["t/3877",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3879",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,148,4.122]],["t/3881",[1,0.854,2,2.206,3,2.086,74,1.394,83,2.031,84,2.031,85,2.144,87,2.68,88,2.144,89,2.086,90,2.144,91,2.086,92,2.086,93,1.394,94,2.086,95,2.144,96,2.144,97,2.144,98,2.144,99,2.144,136,5.798,137,5.798,149,4.354]],["t/3883",[1,1.056,6,1.076,10,1.509,23,1.82,32,2.511,45,3.122,76,0.469,77,0.853,83,2.874,93,1.723,101,2.651,102,1.922,103,1.922,104,1.977,105,1.869,107,1.922,149,3.902,150,4.407,151,4.407,152,4.924,153,3.561,154,4.407]],["t/3885",[1,0.782,10,1.555,20,1.24,23,2.268,26,2.142,28,1.459,35,1.712,43,0.925,45,3.891,47,0.871,76,0.225,77,1.289,116,0.847,120,1.275,121,2.142,123,3.077,125,1.646,129,1.481,130,1.481,131,1.587,152,3.647,153,3.614,155,2.637,156,2.923,157,3.647,158,2.876,159,2.202,160,1.867,161,3.647,162,3.647,163,2.367,164,2.367,165,1.867,166,1.867,167,2.367,168,2.367,169,2.367,170,2.367,171,1.785,172,1.961]],["t/3887",[10,1.583,35,3.306,45,3.998,47,1.092,76,0.435,116,1.635,134,2.461,135,2.461,152,4.571,155,3.306,159,4.252,171,3.447,172,3.786]],["t/3889",[6,1.616,14,4.044,23,2.735,122,3.356,173,5.363,174,5.864,175,6.623]],["t/3891",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3893",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/3895",[3,2.199,57,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,177,4.59]],["t/3897",[1,1.082,6,1.114,10,1.525,32,2.572,47,0.883,76,0.48,77,0.883,93,1.765,101,2.716,102,1.99,103,1.99,104,2.047,105,1.936,107,1.99,113,1.548,116,1.322,117,1.836,118,1.703,119,1.622,177,4.042,178,4.565,179,4.565,180,3.697]],["t/3899",[6,1.086,10,1.63,20,1.221,23,1.838,24,1.621,26,2.117,28,0.765,31,2.039,34,1.758,43,0.911,44,1.758,47,0.861,57,3.604,76,0.222,77,1.411,113,1.509,116,1.289,117,1.158,118,1.074,119,1.023,120,1.255,121,1.37,123,3.368,129,1.459,130,2.255,131,1.563,132,1.758,180,2.332,181,1.291,182,3.94,183,2.879,184,2.879,185,2.879,186,5.419,187,2.879,188,3.94,189,2.039]],["t/3901",[10,1.439,24,3.088,47,1.061,76,0.423,113,1.858,116,2.037,117,2.205,118,2.045,119,1.948,134,2.39,135,2.39,180,4.44,182,4.854,186,4.854,188,4.854,190,5.483]],["t/3903",[1,0.803,2,2.072,6,1.128,15,4.091,32,1.908,58,3.481,61,3.481,66,3.273,68,3.481,87,1.682,113,2.129,126,2.602,145,3.273,173,3.742,191,4.621,192,4.621,193,4.621,194,4.621,195,4.621,196,4.621,197,4.621,198,4.621,199,7.134,200,4.621,201,4.621,202,4.621,203,3.742,204,4.621,205,4.621]],["t/3905",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3907",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,206,4.122]],["t/3909",[3,2.199,58,3.906,70,3.673,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,207,4.59]],["t/3911",[1,1.1,6,1.141,10,1.49,32,2.615,47,0.905,76,0.488,77,0.905,93,1.795,101,2.761,102,2.039,103,2.039,104,2.098,105,1.984,107,2.039,113,1.585,116,1.355,207,4.141,208,4.677,209,4.677,210,4.677,211,3.566]],["t/3913",[1,0.516,10,1.629,20,1.259,23,1.226,26,2.168,28,1.211,43,0.94,47,0.881,53,2.404,58,2.237,76,0.428,77,1.298,113,1.88,115,1.135,116,1.32,119,1.055,120,1.294,121,1.412,123,3.098,129,1.504,130,2.309,131,1.611,158,2.911,189,2.103,211,3.123,212,2.237,213,2.628,214,2.628,215,2.969,216,2.969,217,2.628,218,2.969,219,2.628,220,2.969,221,2.969,222,2.628,223,2.628,224,2.404,225,2.628]],["t/3915",[10,1.501,47,1.031,76,0.532,77,1.031,113,1.807,115,2.037,116,2,119,1.894,134,2.324,135,3.01,158,3.404,211,3.001,213,4.718,222,4.718,225,4.718]],["t/3917",[1,1.192,2,3.077,6,1.674,59,4.86,226,6.861]],["t/3919",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3921",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,227,4.122]],["t/3923",[3,2.199,59,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,228,4.59]],["t/3925",[1,1.174,6,1.017,10,1.522,32,2.415,35,2.44,59,2.952,76,0.451,77,0.806,93,1.657,101,2.549,102,1.817,103,1.817,104,1.869,105,1.768,107,1.817,109,1.721,119,2.078,127,2.112,128,2.112,171,2.544,211,2.347,228,3.689,229,4.167,230,4.167,231,3.689,232,3.374,233,3.374,234,2.661]],["t/3927",[10,1.52,20,1.626,28,1.985,43,1.744,54,3.916,59,5.293,76,0.296,109,1.583,120,1.671,121,1.823,127,2.792,128,2.792,158,3.519,211,3.103,232,3.104,233,3.104,235,5.51,236,6.616,237,3.833,238,3.393]],["t/3929",[10,1.529,76,0.514,77,0.976,109,2.085,115,1.93,119,2.368,127,2.558,128,2.558,134,2.201,135,2.905,171,3.082,211,2.843,231,4.469,232,4.088,233,4.088,234,3.224,239,5.048,240,5.048]],["t/3931",[1,0.803,2,2.072,6,1.741,10,0.856,22,5.085,60,3.273,76,0.55,87,1.682,133,4.731,142,3.481,153,4.688,241,4.091,242,4.091,243,4.091,244,3.742,245,3.742,246,4.091,247,4.091,248,3.742,249,4.091,250,4.091,251,4.091]],["t/3933",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3935",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,252,4.122]],["t/3937",[3,2.199,60,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,253,4.59]],["t/3939",[1,1.244,6,1.378,10,1.458,32,2.331,60,3.998,93,1.6,101,3.123,102,2.461,103,2.461,104,2.531,105,2.394,253,4.997,254,5.645]],["t/3941",[6,0.491,10,1.55,14,2.039,20,0.854,23,1.13,25,1.63,26,2.036,28,1.022,30,0.831,31,1.425,45,1.425,47,0.389,50,0.993,60,3.528,75,0.831,76,0.155,77,1.069,83,0.463,84,0.463,91,0.476,92,0.476,105,1.974,107,0.489,115,0.429,116,0.583,120,0.877,121,0.533,123,2.433,125,0.631,129,0.568,130,1.02,131,0.609,132,0.685,145,1.425,153,2.252,155,1.179,157,0.908,158,0.716,160,0.716,161,1.63,162,1.63,163,0.908,164,0.908,165,0.716,166,0.716,167,0.908,168,0.908,169,0.908,170,0.908,171,0.685,172,0.752,181,2.83,203,0.908,211,0.631,217,0.993,223,1.782,244,1.63,245,1.63,255,1.516,256,2.012,257,1.121,258,1.121,259,1.121,260,1.121,261,1.121,262,1.121,263,1.121,264,1.121,265,1.121,266,1.121,267,1.121,268,2.738,269,2.012,270,1.121,271,1.121,272,3.846,273,1.121,274,2.424,275,3.339,276,3.846,277,1.782,278,2.012,279,2.012,280,2.012,281,2.012,282,2.012,283,2.012,284,2.012,285,2.012,286,2.012,287,3.339,288,3.339,289,2.012,290,2.012,291,2.012,292,2.012,293,2.012,294,2.012,295,2.012,296,1.782,297,0.993,298,2.424,299,1.782,300,1.121,301,1.121,302,2.012,303,1.782,304,1.121,305,0.845,306,1.121,307,1.121,308,1.121,309,1.121,310,0.993,311,1.121,312,1.121,313,1.121,314,0.993,315,0.993]],["t/3943",[10,1.303,47,1.061,76,0.423,115,2.096,116,1.588,134,2.39,135,2.39,153,4.118,171,3.348,172,3.678,181,2.459,274,4.854,277,6.225,297,4.854,298,4.854,316,5.483]],["t/3945",[1,1.171,2,3.023,6,1.645,61,6.017,317,6.74]],["t/3947",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3949",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,318,4.122]],["t/3951",[3,2.199,61,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,319,4.59]],["t/3953",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,155,2.88,319,4.354,320,4.918,321,4.918,322,4.354]],["t/3955",[10,1.532,20,1.807,28,1.816,43,1.348,54,2.232,76,0.328,120,1.857,127,3.464,128,3.464,153,2.495,155,3.478,158,2.721,305,3.209,323,3.45,324,3.017,325,5.257,326,4.26,327,4.26,328,4.206,329,4.474,330,4.26,331,4.26,332,3.45]],["t/3957",[10,1.583,24,3.179,76,0.435,84,2.331,119,2.006,127,2.86,128,2.86,134,2.461,135,2.461,155,3.306,322,4.997,325,4.997,329,4.252]],["t/3959",[1,1.192,2,3.077,6,1.674,62,6.074,333,6.861]],["t/3961",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3963",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,334,4.122]],["t/3965",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3967",[1,1.138,6,1.2,10,1.515,32,2.704,76,0.505,77,0.951,93,1.856,101,2.855,102,2.144,103,2.144,104,2.206,105,2.086,107,2.144,126,2.77,336,4.918,337,4.918,338,4.918,339,4.918]],["t/3969",[10,1.622,20,1.891,23,1.841,26,2.916,28,1.185,47,1.186,76,0.344,77,1.186,116,1.292,120,1.944,123,2.83,126,3.451,129,2.259,130,2.259,181,2,323,3.611,340,4.459,341,4.459,342,4.459,343,4.459,344,3.947]],["t/3971",[10,1.465,76,0.511,126,3.73,134,2.888,135,2.888,344,5.864]],["t/3973",[1,1.236,2,3.192,63,5.041]],["t/3975",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3977",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,345,4.122]],["t/3979",[3,2.199,63,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,335,4.199]],["t/3981",[1,1.119,6,1.17,10,1.547,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,117,1.929,118,1.788,119,1.704,335,3.883,346,4.795,347,4.795]],["t/3983",[10,1.606,20,2.326,23,2.264,34,3.348,43,1.735,44,3.348,76,0.423,77,1.061,117,2.205,118,2.045,119,1.948,120,2.39,131,2.976,132,3.348]],["t/3985",[10,1.543,76,0.494,117,2.575,118,2.387,119,2.274,134,2.791,135,2.791]],["t/3987",[1,1.151,2,3.545,6,1.616,64,5.363,87,2.411,348,6.623]],["t/3989",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/3991",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,349,4.122]],["t/3993",[3,2.199,64,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,350,4.59]],["t/3995",[1,0.924,6,1.298,8,2.455,10,1.5,28,0.97,32,2.591,47,1.029,54,1.912,76,0.484,77,0.706,93,1.778,101,2.319,102,1.591,103,1.591,104,1.637,105,1.548,107,2.319,109,1.507,111,1.637,113,1.803,114,3.397,115,2.033,116,1.541,350,3.231,351,3.65,352,5.318,353,1.791,354,2.955,355,1.981,356,3.65]],["t/3997",[6,0.994,8,1.186,10,1.656,14,1.569,20,1.09,23,1.061,26,1.937,28,1.857,47,0.788,54,1.346,76,0.198,77,1.402,109,2.088,111,1.826,113,1.38,114,2.6,115,0.982,116,0.744,120,1.12,121,2.406,122,2.562,123,3.347,124,1.724,125,1.447,126,2.293,127,2.063,128,2.063,129,1.302,130,1.302,160,1.641,181,1.152,328,1.82,353,1.261,354,2.081,355,1.395]],["t/3999",[8,2.606,10,1.458,47,1.092,76,0.435,109,2.331,111,2.531,113,1.913,114,3.605,115,2.158,116,1.635,134,2.461,135,2.461,353,2.77,354,4.571,355,3.063]],["t/4001",[1,1.171,2,3.023,6,1.645,65,5.458,357,6.74,358,6.74]],["t/4003",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/4005",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/4007",[3,2.199,65,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,360,4.59]],["t/4009",[1,0.887,6,1.246,8,1.594,10,1.534,28,0.917,32,2.509,47,0.988,54,1.809,76,0.468,77,0.668,93,1.722,101,2.226,102,1.505,103,1.505,104,1.548,105,1.464,107,2.226,109,1.425,111,1.548,113,1.17,115,1.32,116,1.479,117,2.054,118,1.904,119,1.814,181,1.548,353,1.694,355,1.873,360,3.056,361,3.452,362,5.105,363,2.795,364,2.445,365,2.445,366,3.452]],["t/4011",[1,0.35,6,0.815,8,0.93,10,1.66,14,1.23,20,0.854,23,1.38,26,1.59,28,1.821,34,1.23,43,0.637,44,1.23,47,0.646,54,1.751,76,0.33,77,1.403,109,1.768,111,1.498,113,1.133,115,0.77,116,0.583,117,0.81,118,0.751,119,0.716,120,0.878,121,2.371,122,2.17,123,3.348,124,1.351,125,1.134,126,1.882,127,1.693,128,1.693,129,1.021,130,1.021,131,1.093,132,1.23,160,1.286,181,1.92,189,1.427,224,1.631,248,2.706,328,1.427,353,0.988,355,1.093,363,1.631,364,1.427,365,1.427,367,1.783]],["t/4013",[8,2.394,10,1.486,47,1.003,76,0.4,109,2.141,111,2.325,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,1.842,134,2.261,135,2.261,181,2.325,353,2.544,355,2.814,363,4.199,364,3.673,365,3.673]],["t/4015",[1,1.131,2,2.92,6,1.589,66,4.611,87,2.369,368,6.51,369,5.764,370,6.51]],["t/4017",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/4019",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/4021",[3,2.199,66,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,371,4.59]],["t/4023",[1,0.769,6,1.322,8,1.319,10,1.563,28,0.759,32,2.518,47,1.047,54,2.319,76,0.47,77,0.553,93,1.728,101,1.929,102,1.246,103,1.246,104,1.282,105,1.212,107,2.361,109,1.18,111,1.282,113,0.969,115,1.092,116,1.569,117,2.178,118,2.019,119,1.924,122,3.09,181,1.282,353,1.402,355,1.551,369,2.53,371,2.53,372,2.858,373,5.415,374,2.314,375,4.425,376,2.858,377,2.858]],["t/4025",[6,1.094,8,0.993,10,1.653,14,2.153,20,0.912,23,1.456,24,1.211,26,1.678,28,1.726,34,1.313,43,0.681,44,1.313,47,0.682,54,1.127,76,0.166,77,1.398,109,1.851,111,1.581,113,1.195,115,0.822,116,0.623,117,0.865,118,0.802,119,0.764,120,0.937,121,2.133,122,2.901,123,3.337,124,1.442,125,1.211,126,1.986,127,1.787,128,1.787,129,1.09,130,1.09,131,1.167,132,1.313,160,2.252,181,2.01,328,2.498,353,1.055,355,1.914,359,1.62,374,1.741]],["t/4027",[8,2.461,10,1.501,47,1.031,76,0.411,109,2.201,111,2.39,113,1.807,115,2.037,116,1.544,117,2.144,118,1.988,119,1.894,134,2.324,135,2.324,181,2.39,353,2.615,355,2.893,374,4.316]],["t/4029",[6,1.645,14,4.115,23,2.783,122,3.415,173,5.458,378,6.74]],["t/4031",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/4033",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,176,3.649]],["t/4035",[3,2.034,26,2.281,67,5.7,74,1.359,83,1.98,84,1.98,85,2.09,87,2.646,88,2.09,89,2.034,90,2.807,91,2.034,92,2.034,93,1.359,94,2.034,95,2.09,96,2.09,97,2.09,98,2.09,99,2.09,142,3.612,145,3.396,203,3.883,379,4.795,380,4.245]],["t/4037",[1,1.119,6,1.17,10,1.503,32,2.659,76,0.496,77,0.927,93,1.825,101,2.807,102,2.09,103,2.09,104,2.15,105,2.034,107,2.09,122,2.43,212,3.612,380,4.245,381,4.795,382,4.795,383,3.883,384,3.883]],["t/4039",[10,1.607,20,2.034,24,2.7,28,1.274,76,0.37,77,1.245,113,1.625,120,2.09,121,2.281,122,2.43,123,3.356,212,3.612,238,4.245,310,5.7,383,3.883,384,3.883,385,4.795,386,4.795]],["t/4041",[10,1.435,76,0.494,122,3.244,134,2.791,135,2.791,212,4.823,383,5.184,384,5.184]],["t/4043",[1,1.192,2,3.077,6,1.674,68,5.169,387,6.861]],["t/4045",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/4047",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,388,3.649]],["t/4049",[3,2.199,68,5.109,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,389,4.59]],["t/4051",[1,1.065,6,1.088,10,1.514,32,2.531,47,0.862,76,0.473,77,0.862,93,1.737,101,2.672,102,1.944,103,1.944,104,2,105,1.891,107,1.944,115,1.705,116,1.292,117,1.794,118,1.663,119,1.584,122,2.259,181,2,389,3.947,390,4.459,391,4.459,392,4.459]],["t/4053",[1,0.339,6,0.795,8,0.901,10,1.65,14,1.192,20,0.828,23,1.345,24,1.099,26,1.549,28,1.733,34,1.192,43,0.618,44,1.192,47,0.63,54,2.561,76,0.323,77,1.388,109,1.729,111,1.46,113,1.104,115,0.746,116,0.566,117,0.785,118,0.728,119,0.694,120,0.851,121,1.992,122,2.753,123,3.313,124,1.31,125,1.099,126,1.834,127,1.65,128,1.65,129,0.989,130,0.989,131,1.06,132,1.192,133,1.471,139,1.728,160,2.08,181,1.878,189,1.383,224,1.581,328,1.383,353,0.958,355,1.06,364,1.383,365,1.383,367,1.728,388,2.883,393,1.952,394,1.728]],["t/4055",[8,2.271,10,1.515,47,0.951,76,0.505,77,0.951,109,2.031,111,2.206,113,1.667,115,1.88,116,1.425,117,1.978,118,1.834,119,1.747,134,2.144,135,2.855,181,2.206,353,2.413,355,2.669,364,3.483,365,3.483,394,4.354]],["t/4057",[1,1.171,2,3.023,6,1.645,69,4.774,87,2.453,395,6.74]],["t/4059",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/4061",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,396,4.122]],["t/4063",[3,2.199,69,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,397,4.59]],["t/4065",[1,0.627,6,0.54,10,1.605,24,2.033,25,1.792,32,2.575,35,1.296,47,0.884,69,3.737,76,0.278,77,0.428,89,0.938,93,1.495,94,0.938,101,1.574,102,0.965,103,0.965,105,1.94,107,0.965,109,0.914,111,0.992,113,0.75,116,1.325,118,0.825,121,1.052,123,1.021,127,1.121,128,1.121,236,1.959,299,1.959,305,3.975,324,3.239,329,1.667,332,1.792,353,1.086,397,1.959,398,2.212,399,5.813,400,1.792,401,2.923,402,1.792,403,1.959,404,2.212,405,1.792,406,2.212,407,2.923,408,3.61,409,2.212,410,2.212,411,3.61,412,2.212,413,2.212,414,2.212,415,3.61,416,2.212,417,2.212,418,2.212,419,2.212,420,2.212,421,3.61,422,2.212]],["t/4067",[6,0.381,10,1.649,20,0.662,23,0.645,24,0.879,26,1.281,28,1.704,31,1.908,35,0.914,47,0.521,54,1.861,69,1.106,75,0.645,76,0.274,77,1.377,81,0.662,109,1.745,111,1.593,113,1.204,114,0.997,116,0.452,118,0.582,120,0.681,121,1.281,122,1.365,123,3.347,124,1.047,125,2,126,2,127,1.8,128,1.8,129,0.791,130,0.791,165,0.997,166,0.997,219,1.382,305,1.176,323,1.264,324,2.516,329,2.029,332,1.264,353,0.766,400,1.264,401,1.264,402,1.264,405,2.181,407,1.264,423,1.561,424,1.561,425,1.561,426,1.561,427,1.561,428,1.561,429,2.694,430,1.561,431,1.561,432,1.561,433,1.561,434,1.561,435,1.561,436,1.561,437,3.145,438,1.561,439,1.561,440,1.561,441,1.561,442,2.385,443,2.385,444,1.561,445,1.561,446,1.264,447,1.561,448,1.561,449,1.561]],["t/4069",[10,1.622,24,2.511,28,1.185,35,2.611,47,0.862,76,0.344,109,1.841,111,2,113,1.511,116,1.292,118,1.663,127,2.259,128,2.259,134,1.944,135,1.944,324,3.158,353,2.188,400,3.611,401,3.611,402,3.611,403,3.947,405,3.611,407,3.611,437,3.947,442,3.947,443,3.947]],["t/4071",[1,1.151,2,2.97,6,1.616,63,4.691,174,5.864,450,6.623,451,6.623]],["t/4073",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/4075",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,452,4.122]],["t/4077",[3,2.199,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,453,6.782,454,4.59]],["t/4079",[1,0.957,6,0.935,10,1.548,23,2.275,32,2.275,76,0.425,77,0.741,93,1.562,101,2.402,102,1.671,103,1.671,104,1.719,105,1.626,107,1.671,165,2.448,166,3.519,234,2.448,446,3.104,454,3.393,455,3.833,456,3.833,457,3.104,458,3.393,459,3.393,460,3.393,461,3.393,462,3.104,463,3.393,464,3.393,465,3.393,466,3.393,467,3.104,468,3.393,469,3.393]],["t/4081",[10,1.496,20,2.009,23,2.637,76,0.365,120,2.064,165,3.024,166,4.078,296,6.396,446,3.834,457,5.17,459,4.192,460,4.192,461,4.192,462,5.17,464,4.192,465,4.192,466,4.192,467,5.17,469,4.192]],["t/4083",[10,1.479,76,0.449,134,2.536,135,2.536,234,4.662,457,4.71,458,5.15,462,4.71,463,5.15,467,4.71,468,5.15,470,5.817]],["t/4085",[1,0.813,2,2.098,6,1.752,22,5.128,70,3.313,76,0.554,87,1.702,133,4.77,142,3.524,153,4.708,241,4.141,242,4.141,243,4.141,244,3.787,245,3.787,246,4.141,247,4.141,248,3.787,249,4.141,250,4.141,251,4.141]],["t/4087",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/4089",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,471,4.122]],["t/4091",[3,2.199,70,4.804,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,472,4.59]],["t/4093",[1,1.073,6,1.101,10,1.471,32,2.551,47,0.873,76,0.476,77,0.873,93,1.751,101,2.694,102,1.967,103,1.967,104,2.023,105,1.914,107,1.967,116,1.307,155,3.618,211,3.479,255,4.655,324,3.196,472,3.994,473,4.511,474,4.511]],["t/4095",[1,0.459,10,1.599,20,1.765,23,2.126,26,1.979,28,1.688,35,1.546,43,0.836,47,0.805,70,1.87,76,0.397,77,1.13,116,0.765,120,1.814,121,1.256,123,2.696,125,1.487,129,1.338,130,1.338,131,1.433,153,3.721,155,2.436,157,3.369,158,2.657,159,1.989,160,1.686,161,4.73,162,3.369,163,2.138,164,2.138,165,1.686,166,1.686,167,2.138,168,2.138,169,2.138,170,2.138,171,1.612,172,1.771,189,1.87,211,2.899,255,3.134,314,2.338,315,2.338]],["t/4097",[10,1.536,35,2.739,47,0.905,76,0.488,77,1.225,116,1.355,134,2.039,135,2.761,145,3.313,153,3.708,155,3.708,159,3.524,171,2.856,172,3.137,211,3.566,255,4.77,475,4.677,476,4.677,477,4.677]],["t/4099",[1,1.171,2,3.023,6,1.645,71,6.468,478,6.74]],["t/4101",[73,2.939,74,1.91,75,2.783,76,0.616,77,1.304]],["t/4103",[1,1.423,27,1.748,28,1.784,29,2.461,30,3.173,40,1.748,41,1.748,42,1.748,43,1.305,46,1.748,47,0.797,48,1.748,76,0.318,78,3.57,79,1.797,80,3.475,81,1.748,359,3.105]],["t/4105",[3,2.199,71,5.492,74,1.47,83,2.141,84,2.141,85,2.261,87,2.751,88,2.261,89,2.199,90,2.261,91,2.199,92,2.199,93,1.47,94,2.199,95,2.261,96,2.261,97,2.261,98,2.261,99,2.261,479,4.59]],["t/4107",[1,1.001,6,0.995,10,1.513,32,2.378,47,0.789,76,0.444,77,0.789,93,1.632,101,2.511,102,1.778,103,1.778,104,1.829,105,1.73,107,1.778,113,1.382,115,1.559,116,1.181,117,1.64,118,1.521,119,2.046,181,1.829,234,2.605,479,3.61,480,4.078,481,4.078,482,3.61,483,3.302,484,4.664,485,3.302,486,3.302]],["t/4109",[8,1.091,10,1.644,20,1.002,23,1.572,26,1.811,28,1.012,31,3.387,34,1.443,43,1.205,44,1.443,47,0.737,53,1.913,54,2.874,76,0.294,77,1.308,113,1.621,115,0.903,116,0.684,117,0.95,118,0.881,119,0.84,120,1.03,121,1.811,123,3.247,125,2.144,129,1.197,130,1.197,131,2.066,132,1.443,165,3.054,166,2.432,181,2.145,214,2.092,234,1.509,303,2.092,483,3.083,484,3.083,485,3.083,486,3.083,487,2.363,488,2.363,489,2.363,490,2.363,491,2.363]],["t/4111",[10,1.486,47,1.003,76,0.4,113,1.758,115,1.982,116,1.502,117,2.086,118,1.934,119,2.41,134,2.261,135,2.261,181,2.325,234,3.312,482,4.59,483,4.199,484,5.492,485,4.199,486,4.199]]],"invertedIndex":[["",{"_index":10,"t":{"3857":{"position":[[114,2],[187,2],[280,1],[282,2],[323,2],[409,2],[463,2],[515,2],[624,2],[671,2],[760,2],[823,2],[885,2],[935,1]]},"3869":{"position":[[134,2],[169,2],[187,2],[221,2],[369,1],[384,2]]},"3871":{"position":[[19,1],[21,2],[57,2],[60,2],[115,2],[152,2],[155,2],[193,2],[212,2],[215,2],[239,2],[258,2],[277,2],[280,2],[304,2],[323,2],[340,2],[343,2],[391,2],[410,2],[413,2],[471,2],[528,2],[531,2],[572,2],[609,2],[612,2],[639,1],[678,1]]},"3873":{"position":[[48,1],[173,1],[188,1]]},"3883":{"position":[[135,2],[170,2],[189,2],[223,2],[362,2],[365,2]]},"3885":{"position":[[19,1],[21,2],[61,2],[97,2],[118,2],[207,2],[227,2],[295,2],[352,2],[393,2],[477,2],[539,2],[634,2],[676,1]]},"3887":{"position":[[18,1],[37,3],[52,3],[66,3],[119,1]]},"3897":{"position":[[132,2],[167,2],[183,2],[217,2],[303,1],[318,2]]},"3899":{"position":[[19,1],[21,2],[38,2],[41,2],[98,2],[150,2],[153,2],[194,2],[231,2],[234,2],[261,1],[300,2],[351,2],[354,2],[447,2],[494,2],[497,2],[546,2],[593,2],[596,2],[641,1]]},"3901":{"position":[[18,1],[85,1],[203,1]]},"3911":{"position":[[131,2],[166,2],[181,2],[215,2],[305,2]]},"3913":{"position":[[0,2],[61,1],[63,2],[80,2],[83,2],[134,2],[155,2],[158,2],[212,2],[276,2],[315,2],[318,2],[345,1],[382,2],[418,2],[421,2],[465,2],[518,2],[521,2],[562,1]]},"3915":{"position":[[0,2],[57,1],[126,1],[172,1]]},"3925":{"position":[[135,2],[170,2],[189,2],[246,2],[315,3],[329,3],[406,2]]},"3927":{"position":[[19,1],[21,2],[101,2],[181,2],[244,2],[298,2],[385,2],[475,1]]},"3929":{"position":[[0,2],[57,1],[176,1],[204,1],[219,1]]},"3931":{"position":[[302,4]]},"3939":{"position":[[134,2],[163,2],[196,2]]},"3941":{"position":[[19,1],[21,2],[72,2],[158,2],[179,2],[258,2],[311,2],[342,2],[397,2],[469,2],[571,2],[639,2],[695,2],[707,3],[739,2],[823,2],[826,2],[888,2],[983,2],[986,2],[1028,2],[1081,2],[1084,2],[1125,2],[1160,2],[1234,2],[1338,2],[1400,2],[1583,2],[1821,2],[1856,2],[1930,2],[2034,2],[2096,2],[2279,2],[2518,2],[2570,2],[2680,2],[2756,2],[2830,2],[2942,2],[3010,2],[3068,1],[3094,1],[3136,1]]},"3943":{"position":[[18,1],[193,1]]},"3953":{"position":[[130,2],[165,2],[179,2],[213,2],[272,2]]},"3955":{"position":[[19,1],[21,2],[72,2],[167,2],[229,2],[291,2],[359,1]]},"3957":{"position":[[18,1],[82,1],[107,3],[121,3],[135,1]]},"3967":{"position":[[134,2],[169,2],[187,2],[221,2],[282,2]]},"3969":{"position":[[19,1],[21,2],[47,1],[49,2],[86,2],[89,2],[146,2],[198,2],[201,2],[242,1]]},"3971":{"position":[[18,1],[56,1]]},"3981":{"position":[[132,2],[167,2],[183,2],[217,2],[261,1],[276,2]]},"3983":{"position":[[19,1],[21,2],[58,2],[61,2],[78,1],[117,1]]},"3985":{"position":[[18,1],[43,1],[58,1]]},"3995":{"position":[[133,2],[168,2],[185,2],[219,2],[344,2],[347,2],[405,2],[556,2]]},"3997":{"position":[[19,1],[21,2],[111,2],[114,2],[138,2],[162,2],[198,2],[201,2],[249,2],[286,2],[289,2],[328,2],[347,2],[350,2],[374,2],[393,2],[412,2],[415,2],[439,2],[458,2],[475,2],[478,2],[526,2],[545,2],[548,2],[606,2],[658,2],[661,2],[702,1]]},"3999":{"position":[[18,1],[43,3],[141,1]]},"4009":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[380,2],[383,2],[441,2],[570,1],[585,2]]},"4011":{"position":[[0,2],[61,1],[63,2],[153,2],[156,2],[180,2],[204,2],[240,2],[243,2],[291,2],[328,2],[331,2],[369,2],[388,2],[391,2],[415,2],[434,2],[453,2],[456,2],[480,2],[499,2],[516,2],[519,2],[543,2],[562,2],[579,2],[582,2],[630,2],[644,2],[647,2],[700,2],[752,2],[755,2],[796,2],[833,2],[836,2],[863,1],[902,2],[937,2],[940,2],[989,1]]},"4013":{"position":[[18,1],[43,3],[150,1],[185,1]]},"4023":{"position":[[131,2],[166,2],[181,2],[215,2],[345,1],[360,2],[363,2],[421,2],[538,1],[553,2],[556,2],[614,2],[688,2],[752,1],[767,2]]},"4025":{"position":[[19,1],[21,2],[99,2],[102,2],[141,2],[231,2],[234,2],[258,2],[282,2],[318,2],[321,2],[369,2],[406,2],[409,2],[447,2],[466,2],[469,2],[493,2],[512,2],[531,2],[534,2],[558,2],[577,2],[594,2],[597,2],[645,2],[659,2],[662,2],[715,2],[767,2],[770,2],[811,2],[848,2],[851,2],[878,1],[917,1]]},"4027":{"position":[[18,1],[43,3],[150,1],[165,1]]},"4037":{"position":[[132,2],[167,2],[183,2],[217,2],[296,2]]},"4039":{"position":[[19,1],[21,2],[38,2],[41,2],[84,2],[130,2],[133,2],[197,1]]},"4041":{"position":[[18,1],[78,1]]},"4051":{"position":[[137,2],[172,2],[190,2],[224,2],[322,1],[337,2]]},"4053":{"position":[[0,2],[61,1],[63,2],[146,2],[149,2],[194,2],[284,2],[287,2],[311,2],[335,2],[371,2],[374,2],[422,2],[459,2],[462,2],[500,2],[519,2],[522,2],[546,2],[565,2],[584,2],[587,2],[611,2],[630,2],[647,2],[650,2],[698,2],[712,2],[715,2],[768,2],[803,2],[806,2],[855,2],[907,2],[910,2],[951,2],[988,2],[991,2],[1018,1],[1057,1]]},"4055":{"position":[[0,2],[57,1],[82,3],[209,1],[224,1]]},"4065":{"position":[[145,2],[180,2],[195,2],[229,2],[297,3],[311,3],[371,1],[396,2],[399,2],[441,2],[521,2],[524,2],[565,2],[627,2],[630,2],[679,2],[741,2],[748,1],[774,1],[783,2],[893,1],[901,1],[1010,2],[1013,2],[1077,1],[1167,2]]},"4067":{"position":[[19,1],[21,2],[57,2],[60,2],[108,2],[145,2],[148,2],[186,2],[205,2],[208,2],[232,2],[251,2],[270,2],[273,2],[297,2],[316,2],[375,2],[378,2],[417,2],[549,2],[552,2],[606,2],[630,2],[644,2],[756,2],[759,2],[809,2],[853,2],[856,2],[880,2],[901,2],[983,2],[986,2],[1010,2],[1031,2],[1051,2],[1054,2],[1078,2],[1105,2],[1125,2],[1128,2],[1152,2],[1179,2],[1236,2],[1239,2],[1280,2],[1335,2],[1338,2],[1388,2],[1429,2],[1432,2],[1543,1]]},"4069":{"position":[[18,1],[69,3],[83,3],[92,3],[152,1],[208,3],[224,3],[246,3],[268,3],[272,1]]},"4079":{"position":[[135,2],[170,2],[189,2],[223,2],[276,2],[334,2],[341,2],[390,2],[424,2]]},"4081":{"position":[[19,1],[21,2],[98,2],[152,2],[216,1]]},"4083":{"position":[[18,1],[57,2],[97,1]]},"4093":{"position":[[128,2],[163,2],[175,2],[209,2],[315,2]]},"4095":{"position":[[0,2],[61,1],[63,2],[95,2],[127,2],[155,2],[174,2],[177,2],[245,2],[298,2],[301,2],[342,2],[426,2],[429,2],[491,2],[586,2],[589,2],[631,1],[657,1],[699,1]]},"4097":{"position":[[109,2],[166,1],[184,3],[196,3],[210,3],[291,1]]},"4107":{"position":[[133,2],[168,2],[185,2],[219,2],[332,1],[404,1],[419,2]]},"4109":{"position":[[19,1],[21,2],[38,2],[41,2],[89,2],[103,2],[106,2],[159,2],[211,2],[214,2],[255,2],[292,2],[295,2],[322,1],[361,2],[364,34],[399,2],[433,2],[436,2],[439,34],[474,2],[558,2],[561,2],[607,2],[684,2],[687,2],[733,2],[812,2],[815,2],[879,1]]},"4111":{"position":[[18,1],[110,1],[182,1],[197,1]]}}}],["0",{"_index":35,"t":{"3857":{"position":[[492,1]]},"3885":{"position":[[251,1]]},"3887":{"position":[[86,2]]},"3925":{"position":[[341,2]]},"4065":{"position":[[325,2]]},"4067":{"position":[[402,1]]},"4069":{"position":[[106,2]]},"4095":{"position":[[201,1]]},"4097":{"position":[[274,2]]}}}],["1",{"_index":234,"t":{"3925":{"position":[[390,2]]},"3929":{"position":[[202,1]]},"4079":{"position":[[332,1]]},"4083":{"position":[[55,1],[94,2]]},"4107":{"position":[[402,1]]},"4109":{"position":[[839,1]]},"4111":{"position":[[180,1]]}}}],["1.14/1.15",{"_index":86,"t":{"3867":{"position":[[33,11]]}}}],["1.18",{"_index":143,"t":{"3875":{"position":[[82,4]]}}}],["10",{"_index":118,"t":{"3869":{"position":[[366,2]]},"3871":{"position":[[636,2]]},"3873":{"position":[[170,2]]},"3897":{"position":[[300,2]]},"3899":{"position":[[258,2]]},"3901":{"position":[[82,2]]},"3981":{"position":[[258,2]]},"3983":{"position":[[75,2]]},"3985":{"position":[[40,2]]},"4009":{"position":[[342,2],[567,2]]},"4011":{"position":[[860,2]]},"4013":{"position":[[147,2]]},"4023":{"position":[[342,2],[535,2],[749,2]]},"4025":{"position":[[875,2]]},"4027":{"position":[[147,2]]},"4051":{"position":[[319,2]]},"4053":{"position":[[1015,2]]},"4055":{"position":[[206,2]]},"4065":{"position":[[368,2]]},"4067":{"position":[[1456,2]]},"4069":{"position":[[149,2]]},"4107":{"position":[[329,2]]},"4109":{"position":[[319,2]]},"4111":{"position":[[107,2]]}}}],["100",{"_index":484,"t":{"4107":{"position":[[361,4],[380,4]]},"4109":{"position":[[585,4],[711,4]]},"4111":{"position":[[139,4],[158,4]]}}}],["10m",{"_index":461,"t":{"4079":{"position":[[316,6]]},"4081":{"position":[[73,6]]}}}],["123456",{"_index":240,"t":{"3929":{"position":[[120,9]]}}}],["127.0.0.1",{"_index":353,"t":{"3995":{"position":[[256,12]]},"3997":{"position":[[225,11]]},"3999":{"position":[[53,12]]},"4009":{"position":[[248,12]]},"4011":{"position":[[267,11]]},"4013":{"position":[[53,12]]},"4023":{"position":[[248,12]]},"4025":{"position":[[345,11]]},"4027":{"position":[[53,12]]},"4053":{"position":[[398,11]]},"4055":{"position":[[92,12]]},"4065":{"position":[[262,12]]},"4067":{"position":[[84,11]]},"4069":{"position":[[34,12]]}}}],["127.0.0.1:11211",{"_index":344,"t":{"3969":{"position":[[113,17]]},"3971":{"position":[[37,18]]}}}],["127.0.0.1:8091",{"_index":231,"t":{"3925":{"position":[[287,17]]},"3929":{"position":[[73,17]]}}}],["1433",{"_index":363,"t":{"4009":{"position":[[267,5]]},"4011":{"position":[[355,4]]},"4013":{"position":[[72,5]]}}}],["15",{"_index":302,"t":{"3941":{"position":[[2668,2],[2722,2]]}}}],["1e7",{"_index":458,"t":{"4079":{"position":[[271,4]]},"4083":{"position":[[41,4]]}}}],["1gb",{"_index":466,"t":{"4079":{"position":[[366,6]]},"4081":{"position":[[131,6]]}}}],["2",{"_index":84,"t":{"3867":{"position":[[26,1]]},"3881":{"position":[[43,1]]},"3895":{"position":[[24,1]]},"3909":{"position":[[23,1]]},"3923":{"position":[[27,1]]},"3937":{"position":[[26,1]]},"3941":{"position":[[175,3]]},"3951":{"position":[[22,1]]},"3957":{"position":[[80,1]]},"3965":{"position":[[24,1]]},"3979":{"position":[[24,1]]},"3993":{"position":[[25,1]]},"4007":{"position":[[23,1]]},"4021":{"position":[[23,1]]},"4035":{"position":[[24,1]]},"4049":{"position":[[26,1]]},"4063":{"position":[[23,1]]},"4077":{"position":[[27,1]]},"4091":{"position":[[20,1]]},"4105":{"position":[[25,1]]}}}],["25",{"_index":281,"t":{"3941":{"position":[[1341,2],[2037,2]]}}}],["27017",{"_index":354,"t":{"3995":{"position":[[275,6]]},"3997":{"position":[[313,5]]},"3999":{"position":[[72,6]]}}}],["3",{"_index":171,"t":{"3885":{"position":[[658,1]]},"3887":{"position":[[116,2]]},"3925":{"position":[[363,2]]},"3929":{"position":[[174,1]]},"3941":{"position":[[1010,1]]},"3943":{"position":[[93,2]]},"4095":{"position":[[613,1]]},"4097":{"position":[[255,2]]}}}],["30",{"_index":463,"t":{"4079":{"position":[[337,3]]},"4083":{"position":[[60,3]]}}}],["3306",{"_index":374,"t":{"4023":{"position":[[267,5]]},"4025":{"position":[[433,4]]},"4027":{"position":[[72,5]]}}}],["5",{"_index":277,"t":{"3941":{"position":[[1246,2],[1942,2]]},"3943":{"position":[[129,2],[152,2]]}}}],["5432",{"_index":394,"t":{"4053":{"position":[[486,4]]},"4055":{"position":[[111,5]]}}}],["60",{"_index":222,"t":{"3913":{"position":[[342,2]]},"3915":{"position":[[123,2]]}}}],["6379",{"_index":400,"t":{"4065":{"position":[[281,5]]},"4067":{"position":[[172,4]]},"4069":{"position":[[53,5]]}}}],["6380",{"_index":409,"t":{"4065":{"position":[[617,9]]}}}],["64",{"_index":468,"t":{"4079":{"position":[[386,3]]},"4083":{"position":[[77,3]]}}}],["8529",{"_index":112,"t":{"3869":{"position":[[286,5]]},"3871":{"position":[[179,4]]},"3873":{"position":[[90,5]]}}}],["_",{"_index":376,"t":{"4023":{"position":[[612,1]]}}}],["access",{"_index":162,"t":{"3885":{"position":[[422,6],[448,6]]},"3941":{"position":[[768,6],[794,6]]},"4095":{"position":[[371,6],[397,6]]}}}],["accesskey",{"_index":314,"t":{"3941":{"position":[[3096,9]]},"4095":{"position":[[659,9]]}}}],["account",{"_index":152,"t":{"3883":{"position":[[258,8],[320,8]]},"3885":{"position":[[32,7],[46,7]]},"3887":{"position":[[28,8]]}}}],["adaptor",{"_index":487,"t":{"4109":{"position":[[402,7]]}}}],["addr",{"_index":407,"t":{"4065":{"position":[[495,6],[592,6]]},"4067":{"position":[[794,5]]},"4069":{"position":[[177,6]]}}}],["address",{"_index":429,"t":{"4067":{"position":[[663,7],[699,10]]}}}],["admin",{"_index":239,"t":{"3929":{"position":[[101,8]]}}}],["allow",{"_index":265,"t":{"3941":{"position":[[415,6]]}}}],["along",{"_index":33,"t":{"3857":{"position":[[457,5]]}}}],["amount",{"_index":214,"t":{"3913":{"position":[[230,6]]},"4109":{"position":[[769,6]]}}}],["applic",{"_index":235,"t":{"3927":{"position":[[28,11],[108,11]]}}}],["arangodb",{"_index":55,"t":{"3859":{"position":[[0,8]]},"3861":{"position":[[2,8]]},"3867":{"position":[[0,8]]}}}],["arangodb.new",{"_index":106,"t":{"3869":{"position":[[172,14]]}}}],["arangodb.new(arangodb.config",{"_index":108,"t":{"3869":{"position":[[224,29]]}}}],["arangodb/go",{"_index":72,"t":{"3861":{"position":[[32,11],[55,11]]}}}],["attempt",{"_index":170,"t":{"3885":{"position":[[623,10]]},"3941":{"position":[[972,10]]},"4095":{"position":[[575,10]]}}}],["authent",{"_index":328,"t":{"3955":{"position":[[197,15],[259,15]]},"3997":{"position":[[81,14]]},"4011":{"position":[[123,14]]},"4025":{"position":[[69,14],[201,14]]},"4053":{"position":[[254,14]]}}}],["avail",{"_index":219,"t":{"3913":{"position":[[284,9]]},"4067":{"position":[[1481,9]]}}}],["aw",{"_index":161,"t":{"3885":{"position":[[418,3],[437,3]]},"3941":{"position":[[764,3],[783,3]]},"4095":{"position":[[98,3],[130,3],[367,3],[386,3]]}}}],["aws.bool(tru",{"_index":316,"t":{"3943":{"position":[[177,15]]}}}],["aws/aw",{"_index":241,"t":{"3931":{"position":[[32,7]]},"4085":{"position":[[26,7]]}}}],["aws/credenti",{"_index":246,"t":{"3931":{"position":[[154,19]]},"4085":{"position":[[148,19]]}}}],["aws_region",{"_index":263,"t":{"3941":{"position":[[283,13]]}}}],["awsdynamodb.cli",{"_index":252,"t":{"3935":{"position":[[285,19]]}}}],["azblob.cli",{"_index":148,"t":{"3879":{"position":[[288,14]]}}}],["azur",{"_index":136,"t":{"3875":{"position":[[0,5]]},"3881":{"position":[[0,5],[210,5]]}}}],["azureblob",{"_index":56,"t":{"3859":{"position":[[9,9]]}}}],["azureblob.new",{"_index":150,"t":{"3883":{"position":[[173,15]]}}}],["azureblob.new(azureblob.config",{"_index":151,"t":{"3883":{"position":[[226,31]]}}}],["badger",{"_index":57,"t":{"3859":{"position":[[19,6]]},"3895":{"position":[[0,6],[191,6]]},"3899":{"position":[[344,6],[487,6]]}}}],["badger.db",{"_index":176,"t":{"3893":{"position":[[288,10]]},"4033":{"position":[[288,10]]}}}],["badger.defaultoptions(\"./fiber.badg",{"_index":184,"t":{"3899":{"position":[[378,39]]}}}],["badger.defaultoptions(\"./fiber.badger\").withlogger(nil",{"_index":190,"t":{"3901":{"position":[[115,56]]}}}],["badger.logg",{"_index":187,"t":{"3899":{"position":[[532,13]]}}}],["badger.new",{"_index":178,"t":{"3897":{"position":[[170,12]]}}}],["badger.new(badger.config",{"_index":179,"t":{"3897":{"position":[[220,25]]}}}],["badger.opt",{"_index":185,"t":{"3899":{"position":[[432,14]]}}}],["badgeropt",{"_index":182,"t":{"3899":{"position":[[303,13],[418,13]]},"3901":{"position":[[100,14]]}}}],["bbolt",{"_index":58,"t":{"3859":{"position":[[26,5]]},"3903":{"position":[[2,5]]},"3909":{"position":[[0,5]]},"3913":{"position":[[137,5]]}}}],["bbolt.db",{"_index":206,"t":{"3907":{"position":[[288,9]]}}}],["bbolt.new",{"_index":208,"t":{"3911":{"position":[[169,11]]}}}],["bbolt.new(bbolt.config",{"_index":209,"t":{"3911":{"position":[[218,23]]}}}],["befor",{"_index":132,"t":{"3871":{"position":[[580,6]]},"3899":{"position":[[202,6]]},"3941":{"position":[[2921,6]]},"3983":{"position":[[29,6]]},"4011":{"position":[[804,6]]},"4025":{"position":[[819,6]]},"4053":{"position":[[959,6]]},"4109":{"position":[[263,6]]}}}],["blob",{"_index":137,"t":{"3875":{"position":[[6,4]]},"3881":{"position":[[6,4],[216,4]]}}}],["block",{"_index":300,"t":{"3941":{"position":[[2616,5]]}}}],["bolt",{"_index":192,"t":{"3903":{"position":[[44,4]]}}}],["bool",{"_index":130,"t":{"3871":{"position":[[567,4]]},"3885":{"position":[[388,4]]},"3899":{"position":[[189,4],[636,4]]},"3913":{"position":[[460,4],[557,4]]},"3941":{"position":[[1120,4],[3062,5]]},"3969":{"position":[[237,4]]},"3997":{"position":[[697,4]]},"4011":{"position":[[791,4]]},"4025":{"position":[[806,4]]},"4053":{"position":[[946,4]]},"4067":{"position":[[1275,4]]},"4095":{"position":[[337,4]]},"4109":{"position":[[250,4]]}}}],["bound",{"_index":450,"t":{"4071":{"position":[[9,5]]}}}],["bradfitz/gomemcach",{"_index":333,"t":{"3959":{"position":[[32,20]]}}}],["bucket",{"_index":211,"t":{"3911":{"position":[[270,7],[282,8]]},"3913":{"position":[[143,6],[198,6],[511,6]]},"3915":{"position":[[89,7]]},"3925":{"position":[[333,7]]},"3927":{"position":[[263,6],[284,6]]},"3929":{"position":[[130,7]]},"3941":{"position":[[1074,6]]},"4093":{"position":[[230,7],[242,6]]},"4095":{"position":[[69,6],[81,6],[291,6]]},"4097":{"position":[[32,7],[176,7]]}}}],["buffer",{"_index":469,"t":{"4079":{"position":[[416,7]]},"4081":{"position":[[190,7]]}}}],["bufferitem",{"_index":467,"t":{"4079":{"position":[[373,12]]},"4081":{"position":[[155,11],[198,11]]},"4083":{"position":[[64,12]]}}}],["byte",{"_index":29,"t":{"3857":{"position":[[393,8],[591,7]]},"3865":{"position":[[69,8],[123,7]]},"3879":{"position":[[69,8],[123,7]]},"3893":{"position":[[69,8],[123,7]]},"3907":{"position":[[69,8],[123,7]]},"3921":{"position":[[69,8],[123,7]]},"3935":{"position":[[66,8],[120,7]]},"3949":{"position":[[70,8],[124,7]]},"3963":{"position":[[69,8],[123,7]]},"3977":{"position":[[69,8],[123,7]]},"3991":{"position":[[69,8],[123,7]]},"4005":{"position":[[69,8],[123,7]]},"4019":{"position":[[69,8],[123,7]]},"4033":{"position":[[69,8],[123,7]]},"4047":{"position":[[69,8],[123,7]]},"4061":{"position":[[69,8],[123,7]]},"4075":{"position":[[69,8],[123,7]]},"4089":{"position":[[69,8],[123,7]]},"4103":{"position":[[69,8],[123,7]]}}}],["cach",{"_index":465,"t":{"4079":{"position":[[360,5]]},"4081":{"position":[[125,5]]}}}],["calcul",{"_index":286,"t":{"3941":{"position":[[1415,13],[2111,13]]}}}],["case",{"_index":308,"t":{"3941":{"position":[[2847,4]]}}}],["cer",{"_index":410,"t":{"4065":{"position":[[670,4]]}}}],["certif",{"_index":419,"t":{"4065":{"position":[[855,13]]}}}],["chu'",{"_index":197,"t":{"3903":{"position":[[97,5]]}}}],["clear",{"_index":129,"t":{"3871":{"position":[[480,6]]},"3885":{"position":[[304,6]]},"3899":{"position":[[107,6]]},"3913":{"position":[[474,6]]},"3941":{"position":[[1037,6]]},"3969":{"position":[[155,6]]},"3997":{"position":[[615,6]]},"4011":{"position":[[709,6]]},"4025":{"position":[[724,6]]},"4053":{"position":[[864,6]]},"4067":{"position":[[1188,6]]},"4095":{"position":[[254,6]]},"4109":{"position":[[168,6]]}}}],["client",{"_index":305,"t":{"3941":{"position":[[2810,6]]},"3955":{"position":[[308,6]]},"4065":{"position":[[428,6],[552,6],[642,6],[1025,6]]},"4067":{"position":[[932,7]]}}}],["client.key",{"_index":413,"t":{"4065":{"position":[[718,15]]}}}],["clientnam",{"_index":437,"t":{"4067":{"position":[[904,10],[948,11],[1013,10]]},"4069":{"position":[[212,11]]}}}],["clientv3.client",{"_index":318,"t":{"3949":{"position":[[289,16]]}}}],["close",{"_index":48,"t":{"3857":{"position":[[826,5],[832,6],[921,7]]},"3865":{"position":[[249,7]]},"3879":{"position":[[249,7]]},"3893":{"position":[[249,7]]},"3907":{"position":[[249,7]]},"3921":{"position":[[249,7]]},"3935":{"position":[[246,7]]},"3949":{"position":[[250,7]]},"3963":{"position":[[249,7]]},"3977":{"position":[[249,7]]},"3991":{"position":[[249,7]]},"4005":{"position":[[249,7]]},"4019":{"position":[[249,7]]},"4033":{"position":[[249,7]]},"4047":{"position":[[249,7]]},"4061":{"position":[[249,7]]},"4075":{"position":[[249,7]]},"4089":{"position":[[249,7]]},"4103":{"position":[[249,7]]}}}],["cloud",{"_index":141,"t":{"3875":{"position":[[66,6]]}}}],["cluster",{"_index":236,"t":{"3927":{"position":[[77,7],[157,7],[224,7],[345,7],[443,7]]},"4065":{"position":[[544,7]]}}}],["clustercli",{"_index":434,"t":{"4067":{"position":[[742,13]]}}}],["cockroachdb/pebbl",{"_index":378,"t":{"4029":{"position":[[26,18]]}}}],["collect",{"_index":114,"t":{"3869":{"position":[[311,11]]},"3871":{"position":[[394,10],[453,10],[517,10]]},"3873":{"position":[[115,11]]},"3995":{"position":[[301,11],[513,11]]},"3997":{"position":[[529,10],[588,10]]},"3999":{"position":[[98,11]]},"4067":{"position":[[1225,10]]}}}],["collector",{"_index":52,"t":{"3857":{"position":[[888,10]]}}}],["command",{"_index":440,"t":{"4067":{"position":[[960,7]]}}}],["commun",{"_index":11,"t":{"3857":{"position":[[139,13]]}}}],["config",{"_index":76,"t":{"3863":{"position":[[33,6],[48,6]]},"3865":{"position":[[16,10]]},"3869":{"position":[[156,6],[208,6]]},"3871":{"position":[[5,6]]},"3873":{"position":[[50,7]]},"3877":{"position":[[33,6],[48,6]]},"3879":{"position":[[16,10]]},"3883":{"position":[[157,6],[210,6]]},"3885":{"position":[[5,6]]},"3887":{"position":[[20,7]]},"3891":{"position":[[33,6],[48,6]]},"3893":{"position":[[16,10]]},"3897":{"position":[[154,6],[204,6]]},"3899":{"position":[[5,6]]},"3901":{"position":[[20,7]]},"3905":{"position":[[33,6],[48,6]]},"3907":{"position":[[16,10]]},"3911":{"position":[[153,6],[202,6]]},"3913":{"position":[[3,6],[22,6],[47,6]]},"3915":{"position":[[32,6],[59,7]]},"3919":{"position":[[33,6],[48,6]]},"3921":{"position":[[16,10]]},"3925":{"position":[[157,6],[233,6]]},"3927":{"position":[[5,6]]},"3929":{"position":[[32,6],[59,7]]},"3931":{"position":[[60,6],[199,6],[262,7]]},"3933":{"position":[[33,6],[48,6]]},"3935":{"position":[[16,7]]},"3941":{"position":[[5,6],[209,6]]},"3943":{"position":[[20,7]]},"3947":{"position":[[33,6],[48,6]]},"3949":{"position":[[16,10]]},"3953":{"position":[[152,6],[200,6]]},"3955":{"position":[[5,6]]},"3957":{"position":[[20,7]]},"3961":{"position":[[33,6],[48,6]]},"3963":{"position":[[16,10]]},"3967":{"position":[[156,6],[208,6]]},"3969":{"position":[[5,6]]},"3971":{"position":[[20,7]]},"3975":{"position":[[33,6],[48,6]]},"3977":{"position":[[16,10]]},"3981":{"position":[[154,6],[204,6]]},"3983":{"position":[[5,6]]},"3985":{"position":[[20,7]]},"3989":{"position":[[33,6],[48,6]]},"3991":{"position":[[16,10]]},"3995":{"position":[[155,6],[206,6],[368,6]]},"3997":{"position":[[5,6]]},"3999":{"position":[[20,7]]},"4003":{"position":[[33,6],[48,6]]},"4005":{"position":[[16,10]]},"4009":{"position":[[153,6],[202,6],[404,6]]},"4011":{"position":[[3,6],[22,6],[47,6]]},"4013":{"position":[[20,7]]},"4017":{"position":[[33,6],[48,6]]},"4019":{"position":[[16,10]]},"4023":{"position":[[153,6],[202,6],[384,6],[577,6]]},"4025":{"position":[[5,6]]},"4027":{"position":[[20,7]]},"4031":{"position":[[33,6],[48,6]]},"4033":{"position":[[16,10]]},"4037":{"position":[[154,6],[204,6]]},"4039":{"position":[[5,6]]},"4041":{"position":[[20,7]]},"4045":{"position":[[33,6],[48,6]]},"4047":{"position":[[16,10]]},"4051":{"position":[[159,6],[211,6]]},"4053":{"position":[[3,6],[22,6],[47,6]]},"4055":{"position":[[32,6],[59,7]]},"4059":{"position":[[33,6],[48,6]]},"4061":{"position":[[16,10]]},"4065":{"position":[[167,6],[216,6]]},"4067":{"position":[[5,6],[476,6],[1287,6]]},"4069":{"position":[[20,7]]},"4073":{"position":[[33,6],[48,6]]},"4075":{"position":[[16,10]]},"4079":{"position":[[157,6],[210,6]]},"4081":{"position":[[5,6]]},"4083":{"position":[[20,7]]},"4085":{"position":[[54,6],[193,6],[256,7]]},"4087":{"position":[[33,6],[48,6]]},"4089":{"position":[[16,10]]},"4093":{"position":[[150,6],[196,6]]},"4095":{"position":[[3,6],[22,6],[47,6]]},"4097":{"position":[[141,6],[168,7]]},"4101":{"position":[[33,6],[48,6]]},"4103":{"position":[[16,10]]},"4107":{"position":[[155,6],[206,6]]},"4109":{"position":[[5,6],[418,6]]},"4111":{"position":[[20,7]]}}}],["configdefault",{"_index":135,"t":{"3873":{"position":[[34,13]]},"3887":{"position":[[4,13]]},"3901":{"position":[[4,13]]},"3915":{"position":[[3,13],[43,13]]},"3929":{"position":[[3,13],[43,13]]},"3943":{"position":[[4,13]]},"3957":{"position":[[4,13]]},"3971":{"position":[[4,13]]},"3985":{"position":[[4,13]]},"3999":{"position":[[4,13]]},"4013":{"position":[[4,13]]},"4027":{"position":[[4,13]]},"4041":{"position":[[4,13]]},"4055":{"position":[[3,13],[43,13]]},"4069":{"position":[[4,13]]},"4083":{"position":[[4,13]]},"4097":{"position":[[112,13],[152,13]]},"4111":{"position":[[4,13]]}}}],["configur",{"_index":475,"t":{"4097":{"position":[[12,13]]}}}],["conn",{"_index":81,"t":{"3865":{"position":[[281,6]]},"3879":{"position":[[281,6]]},"3893":{"position":[[281,6]]},"3907":{"position":[[281,6]]},"3921":{"position":[[281,6]]},"3935":{"position":[[278,6]]},"3949":{"position":[[282,6]]},"3963":{"position":[[281,6]]},"3977":{"position":[[281,6]]},"3991":{"position":[[281,6]]},"4005":{"position":[[281,6]]},"4019":{"position":[[281,6]]},"4033":{"position":[[281,6]]},"4047":{"position":[[281,6]]},"4061":{"position":[[281,6]]},"4067":{"position":[[977,5]]},"4075":{"position":[[281,6]]},"4089":{"position":[[281,6]]},"4103":{"position":[[281,6]]}}}],["connect",{"_index":54,"t":{"3857":{"position":[[908,12]]},"3927":{"position":[[52,7],[132,7],[188,10],[273,7],[317,10]]},"3955":{"position":[[129,11]]},"3995":{"position":[[381,10]]},"3997":{"position":[[24,10]]},"4009":{"position":[[417,10]]},"4011":{"position":[[66,10],[926,10]]},"4023":{"position":[[397,10],[597,10]]},"4025":{"position":[[144,10]]},"4053":{"position":[[103,10],[128,10],[197,10],[792,10]]},"4067":{"position":[[349,10],[1416,12],[1459,11]]},"4109":{"position":[[517,11],[541,10],[655,11],[786,10]]}}}],["connectiontimeout",{"_index":232,"t":{"3925":{"position":[[344,18]]},"3927":{"position":[[353,17]]},"3929":{"position":[[155,18]]}}}],["connectionuri",{"_index":355,"t":{"3995":{"position":[[436,14]]},"3997":{"position":[[141,13]]},"3999":{"position":[[28,14]]},"4009":{"position":[[468,14]]},"4011":{"position":[[183,13]]},"4013":{"position":[[28,14]]},"4023":{"position":[[448,14]]},"4025":{"position":[[41,13],[261,13]]},"4027":{"position":[[28,14]]},"4053":{"position":[[314,13]]},"4055":{"position":[[67,14]]}}}],["connmaxlifetim",{"_index":486,"t":{"4107":{"position":[[385,16]]},"4109":{"position":[[736,15],[849,15]]},"4111":{"position":[[163,16]]}}}],["consol",{"_index":280,"t":{"3941":{"position":[[1329,8],[2025,8]]}}}],["contain",{"_index":45,"t":{"3857":{"position":[[718,7]]},"3883":{"position":[[275,10]]},"3885":{"position":[[64,9],[80,9],[341,10]]},"3887":{"position":[[41,10]]},"3941":{"position":[[542,9],[603,10]]}}}],["cost",{"_index":464,"t":{"4079":{"position":[[352,4]]},"4081":{"position":[[117,4]]}}}],["couchbas",{"_index":59,"t":{"3859":{"position":[[32,9]]},"3917":{"position":[[2,9]]},"3923":{"position":[[0,9],[194,9]]},"3925":{"position":[[203,9]]},"3927":{"position":[[67,9],[147,9],[214,9],[335,9],[433,9]]}}}],["couchbase.new",{"_index":229,"t":{"3925":{"position":[[173,15]]}}}],["couchbase.new(couchbase.config",{"_index":230,"t":{"3925":{"position":[[249,31]]}}}],["couchbase/gocb",{"_index":226,"t":{"3917":{"position":[[33,15]]}}}],["cpu",{"_index":447,"t":{"4067":{"position":[[1491,3]]}}}],["creat",{"_index":105,"t":{"3869":{"position":[[116,6]]},"3883":{"position":[[117,6]]},"3897":{"position":[[114,6]]},"3911":{"position":[[113,6]]},"3925":{"position":[[117,6]]},"3939":{"position":[[116,6]]},"3941":{"position":[[1217,7],[1301,8],[1913,7],[1997,8],[2558,7],[2641,8],[2933,8]]},"3953":{"position":[[112,6]]},"3967":{"position":[[116,6]]},"3981":{"position":[[114,6]]},"3995":{"position":[[115,6]]},"4009":{"position":[[113,6]]},"4023":{"position":[[113,6]]},"4037":{"position":[[114,6]]},"4051":{"position":[[119,6]]},"4065":{"position":[[121,6],[633,6],[1016,6]]},"4079":{"position":[[117,6]]},"4093":{"position":[[110,6]]},"4107":{"position":[[115,6]]}}}],["credenti",{"_index":153,"t":{"3883":{"position":[[294,12],[307,12]]},"3885":{"position":[[396,11],[501,13],[515,11],[527,11]]},"3931":{"position":[[77,11],[100,11],[216,11],[235,11],[290,11]]},"3941":{"position":[[742,11],[850,13],[864,11],[876,11],[3075,11]]},"3943":{"position":[[52,12],[65,14]]},"3955":{"position":[[322,12]]},"4085":{"position":[[71,11],[94,11],[210,11],[229,11],[284,11]]},"4095":{"position":[[345,11],[453,13],[467,11],[479,11],[638,11]]},"4097":{"position":[[214,12],[227,14]]}}}],["custom",{"_index":107,"t":{"3869":{"position":[[201,6]]},"3883":{"position":[[203,6]]},"3897":{"position":[[197,6]]},"3911":{"position":[[195,6]]},"3925":{"position":[[226,6]]},"3941":{"position":[[435,6]]},"3953":{"position":[[193,6]]},"3967":{"position":[[201,6]]},"3981":{"position":[[197,6]]},"3995":{"position":[[199,6],[361,6]]},"4009":{"position":[[195,6],[397,6]]},"4023":{"position":[[195,6],[377,6],[570,6]]},"4037":{"position":[[197,6]]},"4051":{"position":[[204,6]]},"4065":{"position":[[209,6]]},"4079":{"position":[[203,6]]},"4093":{"position":[[189,6]]},"4107":{"position":[[199,6]]}}}],["customendpoint",{"_index":264,"t":{"3941":{"position":[[400,14]]}}}],["darwin",{"_index":220,"t":{"3913":{"position":[[297,6]]}}}],["databas",{"_index":113,"t":{"3869":{"position":[[292,9]]},"3871":{"position":[[326,8],[375,8]]},"3873":{"position":[[96,9]]},"3897":{"position":[[246,9]]},"3899":{"position":[[24,8],[82,8]]},"3901":{"position":[[28,9]]},"3903":{"position":[[184,8],[232,8]]},"3911":{"position":[[242,9]]},"3913":{"position":[[66,8],[118,8],[390,8]]},"3915":{"position":[[67,9]]},"3995":{"position":[[282,9],[494,9]]},"3997":{"position":[[461,8],[510,8]]},"3999":{"position":[[79,9]]},"4009":{"position":[[273,9]]},"4011":{"position":[[565,8],[614,8]]},"4013":{"position":[[78,9]]},"4023":{"position":[[273,9]]},"4025":{"position":[[580,8],[629,8]]},"4027":{"position":[[78,9]]},"4039":{"position":[[24,8]]},"4053":{"position":[[633,8],[682,8]]},"4055":{"position":[[117,9]]},"4065":{"position":[[315,9]]},"4067":{"position":[[319,8],[404,8],[524,8]]},"4069":{"position":[[96,9]]},"4107":{"position":[[250,9]]},"4109":{"position":[[24,8],[73,8],[674,9]]},"4111":{"position":[[28,9]]}}}],["database/key",{"_index":13,"t":{"3857":{"position":[[168,12]]}}}],["database/sql",{"_index":368,"t":{"4015":{"position":[[29,12]]}}}],["db",{"_index":122,"t":{"3871":{"position":[[44,2],[133,2]]},"3889":{"position":[[17,2]]},"3997":{"position":[[53,3],[185,2],[267,2]]},"4011":{"position":[[95,3],[227,2],[309,2]]},"4023":{"position":[[594,2],[608,3],[715,3],[719,3]]},"4025":{"position":[[24,2],[130,2],[173,3],[305,2],[387,2]]},"4029":{"position":[[17,2]]},"4037":{"position":[[252,5]]},"4039":{"position":[[65,6]]},"4041":{"position":[[34,5]]},"4051":{"position":[[257,3]]},"4053":{"position":[[66,2],[177,2],[226,3],[358,2],[440,2]]},"4067":{"position":[[44,2],[126,2]]}}}],["dbpool",{"_index":392,"t":{"4051":{"position":[[261,7]]}}}],["default",{"_index":77,"t":{"3863":{"position":[[40,7]]},"3869":{"position":[[148,7]]},"3871":{"position":[[73,7],[168,7],[228,7],[293,7],[356,7],[426,7],[544,7],[625,7]]},"3877":{"position":[[40,7]]},"3883":{"position":[[149,7]]},"3885":{"position":[[131,8],[240,7],[365,7],[490,7],[647,7]]},"3891":{"position":[[40,7]]},"3897":{"position":[[146,7]]},"3899":{"position":[[54,7],[166,7],[247,7],[367,7],[464,7],[510,7],[609,7]]},"3905":{"position":[[40,7]]},"3911":{"position":[[145,7]]},"3913":{"position":[[96,7],[171,7],[331,7],[434,7],[534,7]]},"3915":{"position":[[24,7]]},"3919":{"position":[[40,7]]},"3925":{"position":[[149,7]]},"3929":{"position":[[24,7]]},"3933":{"position":[[40,7]]},"3941":{"position":[[374,9],[714,8],[839,7],[999,7],[1097,7],[1252,8],[1279,7],[1948,8],[1975,7],[3031,9]]},"3947":{"position":[[40,7]]},"3953":{"position":[[144,7]]},"3961":{"position":[[40,7]]},"3967":{"position":[[148,7]]},"3969":{"position":[[102,7],[214,7]]},"3975":{"position":[[40,7]]},"3981":{"position":[[146,7]]},"3983":{"position":[[64,7]]},"3989":{"position":[[40,7]]},"3995":{"position":[[147,7]]},"3997":{"position":[[127,7],[214,7],[302,7],[363,7],[428,7],[491,7],[561,7],[674,7]]},"4003":{"position":[[40,7]]},"4009":{"position":[[145,7]]},"4011":{"position":[[169,7],[256,7],[344,7],[404,7],[469,7],[532,7],[595,7],[660,7],[768,7],[849,7],[953,7]]},"4017":{"position":[[40,7]]},"4023":{"position":[[145,7]]},"4025":{"position":[[115,7],[247,7],[334,7],[422,7],[482,7],[547,7],[610,7],[675,7],[783,7],[864,7]]},"4031":{"position":[[40,7]]},"4037":{"position":[[146,7]]},"4039":{"position":[[54,7],[146,7]]},"4045":{"position":[[40,7]]},"4051":{"position":[[151,7]]},"4053":{"position":[[162,7],[300,7],[387,7],[475,7],[535,7],[600,7],[663,7],[728,7],[819,7],[923,7],[1004,7]]},"4055":{"position":[[24,7]]},"4059":{"position":[[40,7]]},"4065":{"position":[[159,7]]},"4067":{"position":[[73,7],[161,7],[221,7],[286,7],[391,7],[619,7],[772,7],[869,7],[999,7],[1067,7],[1141,7],[1252,7],[1351,7],[1445,7]]},"4073":{"position":[[40,7]]},"4079":{"position":[[149,7]]},"4087":{"position":[[40,7]]},"4093":{"position":[[142,7]]},"4095":{"position":[[190,7],[314,7],[442,7],[602,7]]},"4097":{"position":[[4,7],[133,7]]},"4101":{"position":[[40,7]]},"4107":{"position":[[147,7]]},"4109":{"position":[[54,7],[119,7],[227,7],[308,7],[574,7],[700,7],[828,7]]}}}],["defaultcost",{"_index":470,"t":{"4083":{"position":[[81,12]]}}}],["defin",{"_index":189,"t":{"3899":{"position":[[559,6]]},"3913":{"position":[[10,7]]},"4011":{"position":[[10,7]]},"4053":{"position":[[10,7]]},"4095":{"position":[[10,7]]}}}],["delet",{"_index":44,"t":{"3857":{"position":[[627,6],[634,7],[792,6]]},"3871":{"position":[[587,8]]},"3899":{"position":[[209,8]]},"3983":{"position":[[36,8]]},"4011":{"position":[[811,8]]},"4025":{"position":[[826,8]]},"4053":{"position":[[966,8]]},"4109":{"position":[[270,8]]}}}],["delete(key",{"_index":46,"t":{"3857":{"position":[[735,10]]},"3865":{"position":[[174,10]]},"3879":{"position":[[174,10]]},"3893":{"position":[[174,10]]},"3907":{"position":[[174,10]]},"3921":{"position":[[174,10]]},"3935":{"position":[[171,10]]},"3949":{"position":[[175,10]]},"3963":{"position":[[174,10]]},"3977":{"position":[[174,10]]},"3991":{"position":[[174,10]]},"4005":{"position":[[174,10]]},"4019":{"position":[[174,10]]},"4033":{"position":[[174,10]]},"4047":{"position":[[174,10]]},"4061":{"position":[[174,10]]},"4075":{"position":[[174,10]]},"4089":{"position":[[174,10]]},"4103":{"position":[[174,10]]}}}],["design",{"_index":5,"t":{"3857":{"position":[[62,8]]}}}],["develop",{"_index":288,"t":{"3941":{"position":[[1476,9],[1645,9],[2172,9],[2341,9]]}}}],["dgraph",{"_index":174,"t":{"3889":{"position":[[26,6]]},"4071":{"position":[[36,6]]}}}],["dialtimeout",{"_index":325,"t":{"3955":{"position":[[75,11],[141,11]]},"3957":{"position":[[67,12]]}}}],["didn't",{"_index":96,"t":{"3867":{"position":[[127,6]]},"3881":{"position":[[132,6]]},"3895":{"position":[[113,6]]},"3909":{"position":[[112,6]]},"3923":{"position":[[116,6]]},"3937":{"position":[[115,6]]},"3951":{"position":[[111,6]]},"3965":{"position":[[113,6]]},"3979":{"position":[[113,6]]},"3993":{"position":[[114,6]]},"4007":{"position":[[112,6]]},"4021":{"position":[[112,6]]},"4035":{"position":[[113,6]]},"4049":{"position":[[115,6]]},"4063":{"position":[[112,6]]},"4077":{"position":[[116,6]]},"4091":{"position":[[109,6]]},"4105":{"position":[[114,6]]}}}],["differ",{"_index":12,"t":{"3857":{"position":[[158,9]]}}}],["disabl",{"_index":365,"t":{"4009":{"position":[[369,10]]},"4011":{"position":[[964,9]]},"4013":{"position":[[174,10]]},"4053":{"position":[[830,9]]},"4055":{"position":[[169,10]]}}}],["divid",{"_index":340,"t":{"3969":{"position":[[36,7]]}}}],["docker",{"_index":269,"t":{"3941":{"position":[[535,6],[596,6]]}}}],["doesn't",{"_index":275,"t":{"3941":{"position":[[1192,7],[1888,7],[2534,7],[2702,7]]}}}],["don't",{"_index":203,"t":{"3903":{"position":[[211,5]]},"3941":{"position":[[2883,5]]},"4035":{"position":[[210,5]]}}}],["driver",{"_index":2,"t":{"3857":{"position":[[16,7]]},"3861":{"position":[[19,6],[44,6],[67,7]]},"3881":{"position":[[19,6]]},"3903":{"position":[[16,6]]},"3917":{"position":[[20,6]]},"3931":{"position":[[19,6]]},"3945":{"position":[[15,6]]},"3959":{"position":[[19,6]]},"3973":{"position":[[21,7]]},"3987":{"position":[[18,6],[48,7]]},"4001":{"position":[[16,6]]},"4015":{"position":[[16,6]]},"4043":{"position":[[19,6]]},"4057":{"position":[[16,6]]},"4071":{"position":[[23,6]]},"4085":{"position":[[13,6]]},"4099":{"position":[[18,6]]}}}],["driver.cli",{"_index":82,"t":{"3865":{"position":[[288,13]]}}}],["driver/mysql",{"_index":370,"t":{"4015":{"position":[[53,13]]}}}],["dure",{"_index":386,"t":{"4039":{"position":[[106,6]]}}}],["dynamodb",{"_index":60,"t":{"3859":{"position":[[42,8]]},"3931":{"position":[[2,8]]},"3937":{"position":[[0,8],[193,8]]},"3939":{"position":[[148,8]]},"3941":{"position":[[38,8],[326,8],[442,8],[518,9],[1467,8],[1636,8],[2163,8],[2332,8]]}}}],["dynamodb.new(dynamodb.config",{"_index":254,"t":{"3939":{"position":[[166,29]]}}}],["e.g",{"_index":260,"t":{"3941":{"position":[[161,4]]}}}],["each",{"_index":441,"t":{"4067":{"position":[[972,4]]}}}],["ec2",{"_index":247,"t":{"3931":{"position":[[177,3]]},"4085":{"position":[[171,3]]}}}],["effect",{"_index":426,"t":{"4067":{"position":[[541,7]]}}}],["empti",{"_index":37,"t":{"3857":{"position":[[518,5]]}}}],["enabl",{"_index":432,"t":{"4067":{"position":[[715,7]]}}}],["encount",{"_index":167,"t":{"3885":{"position":[[584,9]]},"3941":{"position":[[933,9]]},"4095":{"position":[[536,9]]}}}],["endpoint",{"_index":155,"t":{"3885":{"position":[[108,9],[191,8]]},"3887":{"position":[[56,9]]},"3941":{"position":[[459,9],[723,8]]},"3953":{"position":[[233,10]]},"3955":{"position":[[24,9],[53,9]]},"3957":{"position":[[28,10]]},"4093":{"position":[[255,9],[269,10]]},"4095":{"position":[[102,8],[111,8]]},"4097":{"position":[[52,8],[200,9]]}}}],["environ",{"_index":244,"t":{"3931":{"position":[[131,11]]},"3941":{"position":[[224,11],[261,11]]},"4085":{"position":[[125,11]]}}}],["err",{"_index":411,"t":{"4065":{"position":[[675,3],[737,3]]}}}],["error",{"_index":30,"t":{"3857":{"position":[[402,6],[564,6],[618,5],[688,5],[754,5],[817,5],[929,5]]},"3865":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3879":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3893":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3907":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3921":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3935":{"position":[[75,6],[147,5],[190,5],[222,5],[254,5]]},"3941":{"position":[[2737,5],[3002,7]]},"3949":{"position":[[79,6],[151,5],[194,5],[226,5],[258,5]]},"3963":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3977":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"3991":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"4005":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"4019":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"4033":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"4047":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"4061":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"4075":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"4089":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]},"4103":{"position":[[78,6],[150,5],[193,5],[225,5],[257,5]]}}}],["especi",{"_index":266,"t":{"3941":{"position":[[480,10]]}}}],["establish",{"_index":327,"t":{"3955":{"position":[[117,9]]}}}],["etcd",{"_index":61,"t":{"3859":{"position":[[51,4]]},"3903":{"position":[[29,4]]},"3945":{"position":[[2,4],[28,4]]},"3951":{"position":[[0,4],[189,4]]}}}],["etcd.new",{"_index":320,"t":{"3953":{"position":[[168,10]]}}}],["etcd.new(config",{"_index":321,"t":{"3953":{"position":[[216,16]]}}}],["exampl",{"_index":75,"t":{"3863":{"position":[[24,8]]},"3877":{"position":[[24,8]]},"3891":{"position":[[24,8]]},"3905":{"position":[[24,8]]},"3919":{"position":[[24,8]]},"3933":{"position":[[24,8]]},"3941":{"position":[[1407,7],[2103,7]]},"3947":{"position":[[24,8]]},"3961":{"position":[[24,8]]},"3975":{"position":[[24,8]]},"3989":{"position":[[24,8]]},"4003":{"position":[[24,8]]},"4017":{"position":[[24,8]]},"4031":{"position":[[24,8]]},"4045":{"position":[[24,8]]},"4059":{"position":[[24,8]]},"4067":{"position":[[555,8]]},"4073":{"position":[[24,8]]},"4087":{"position":[[24,8]]},"4101":{"position":[[24,8]]}}}],["execut",{"_index":438,"t":{"4067":{"position":[[920,7]]}}}],["exist",{"_index":26,"t":{"3857":{"position":[[371,5]]},"3871":{"position":[[491,8],[508,8]]},"3885":{"position":[[315,8],[332,8]]},"3899":{"position":[[118,8],[135,8]]},"3913":{"position":[[485,8],[502,8]]},"3941":{"position":[[1048,8],[1065,8],[1200,5],[1896,5],[2542,5],[2710,5]]},"3969":{"position":[[166,8],[183,8]]},"3997":{"position":[[626,8],[643,8]]},"4011":{"position":[[720,8],[737,8]]},"4025":{"position":[[735,8],[752,8]]},"4035":{"position":[[224,8]]},"4053":{"position":[[875,8],[892,8]]},"4067":{"position":[[1199,8],[1216,8]]},"4095":{"position":[[265,8],[282,8]]},"4109":{"position":[[179,8],[196,8]]}}}],["exp",{"_index":42,"t":{"3857":{"position":[[599,3]]},"3865":{"position":[[131,3]]},"3879":{"position":[[131,3]]},"3893":{"position":[[131,3]]},"3907":{"position":[[131,3]]},"3921":{"position":[[131,3]]},"3935":{"position":[[128,3]]},"3949":{"position":[[132,3]]},"3963":{"position":[[131,3]]},"3977":{"position":[[131,3]]},"3991":{"position":[[131,3]]},"4005":{"position":[[131,3]]},"4019":{"position":[[131,3]]},"4033":{"position":[[131,3]]},"4047":{"position":[[131,3]]},"4061":{"position":[[131,3]]},"4075":{"position":[[131,3]]},"4089":{"position":[[131,3]]},"4103":{"position":[[131,3]]}}}],["expir",{"_index":34,"t":{"3857":{"position":[[474,10],[503,11]]},"3871":{"position":[[596,7]]},"3899":{"position":[[218,7]]},"3983":{"position":[[45,7]]},"4011":{"position":[[820,7]]},"4025":{"position":[[835,7]]},"4053":{"position":[[975,7]]},"4109":{"position":[[279,7]]}}}],["fail",{"_index":326,"t":{"3955":{"position":[[106,7]]}}}],["failov",{"_index":404,"t":{"4065":{"position":[[419,8]]}}}],["failovercli",{"_index":433,"t":{"4067":{"position":[[723,14]]}}}],["failur",{"_index":169,"t":{"3885":{"position":[[604,8]]},"3941":{"position":[[953,8]]},"4095":{"position":[[556,8]]}}}],["fals",{"_index":116,"t":{"3869":{"position":[[347,6]]},"3871":{"position":[[555,5]]},"3873":{"position":[[151,6]]},"3885":{"position":[[376,5]]},"3887":{"position":[[96,6]]},"3897":{"position":[[281,6]]},"3899":{"position":[[177,5],[620,5]]},"3901":{"position":[[63,6],[196,6]]},"3911":{"position":[[298,6]]},"3913":{"position":[[445,5],[545,5]]},"3915":{"position":[[151,6],[165,6]]},"3941":{"position":[[1108,5],[2786,6]]},"3943":{"position":[[103,6]]},"3969":{"position":[[225,5]]},"3995":{"position":[[337,6],[549,6]]},"3997":{"position":[[685,5]]},"3999":{"position":[[134,6]]},"4009":{"position":[[323,6],[548,6]]},"4011":{"position":[[779,5]]},"4013":{"position":[[128,6]]},"4023":{"position":[[323,6],[516,6],[730,6]]},"4025":{"position":[[794,5]]},"4027":{"position":[[128,6]]},"4051":{"position":[[300,6]]},"4053":{"position":[[934,5]]},"4055":{"position":[[187,6]]},"4065":{"position":[[335,6],[1003,6],[1160,6]]},"4067":{"position":[[1263,5]]},"4069":{"position":[[116,6]]},"4093":{"position":[[308,6]]},"4095":{"position":[[325,5]]},"4097":{"position":[[284,6]]},"4107":{"position":[[310,6]]},"4109":{"position":[[238,5]]},"4111":{"position":[[88,6]]}}}],["fast",{"_index":173,"t":{"3889":{"position":[[2,4]]},"3903":{"position":[[165,5]]},"4029":{"position":[[2,4]]}}}],["fiber",{"_index":8,"t":{"3857":{"position":[[95,5]]},"3869":{"position":[[302,8]]},"3871":{"position":[[367,7]]},"3873":{"position":[[106,8]]},"3995":{"position":[[292,8],[504,8]]},"3997":{"position":[[502,7]]},"3999":{"position":[[89,8]]},"4009":{"position":[[283,8]]},"4011":{"position":[[606,7]]},"4013":{"position":[[88,8]]},"4023":{"position":[[283,8]]},"4025":{"position":[[621,7]]},"4027":{"position":[[88,8]]},"4053":{"position":[[674,7]]},"4055":{"position":[[127,8]]},"4109":{"position":[[65,7]]}}}],["fiber.badg",{"_index":180,"t":{"3897":{"position":[[256,17]]},"3899":{"position":[[65,16]]},"3901":{"position":[[38,17]]}}}],["fiber.db",{"_index":213,"t":{"3913":{"position":[[107,10]]},"3915":{"position":[[77,11]]}}}],["fiber.sqlite3",{"_index":482,"t":{"4107":{"position":[[260,18]]},"4111":{"position":[[38,18]]}}}],["fiber_storag",{"_index":115,"t":{"3869":{"position":[[323,16]]},"3871":{"position":[[437,15]]},"3873":{"position":[[127,16]]},"3913":{"position":[[182,15]]},"3915":{"position":[[97,16]]},"3929":{"position":[[138,16]]},"3941":{"position":[[354,16]]},"3943":{"position":[[35,16]]},"3995":{"position":[[313,16],[525,16]]},"3997":{"position":[[572,15]]},"3999":{"position":[[110,16]]},"4009":{"position":[[299,16]]},"4011":{"position":[[671,15]]},"4013":{"position":[[104,16]]},"4023":{"position":[[299,16]]},"4025":{"position":[[686,15]]},"4027":{"position":[[104,16]]},"4051":{"position":[[276,16]]},"4053":{"position":[[739,15]]},"4055":{"position":[[143,16]]},"4107":{"position":[[286,16]]},"4109":{"position":[[130,15]]},"4111":{"position":[[64,16]]}}}],["field",{"_index":133,"t":{"3873":{"position":[[23,6]]},"3931":{"position":[[67,6],[206,6]]},"4053":{"position":[[139,6]]},"4085":{"position":[[61,6],[200,6]]}}}],["file",{"_index":217,"t":{"3913":{"position":[[265,4]]},"3941":{"position":[[216,4]]}}}],["first",{"_index":95,"t":{"3867":{"position":[[114,5]]},"3881":{"position":[[119,5]]},"3895":{"position":[[100,5]]},"3909":{"position":[[99,5]]},"3923":{"position":[[103,5]]},"3937":{"position":[[102,5]]},"3951":{"position":[[98,5]]},"3965":{"position":[[100,5]]},"3979":{"position":[[100,5]]},"3993":{"position":[[101,5]]},"4007":{"position":[[99,5]]},"4021":{"position":[[99,5]]},"4035":{"position":[[100,5]]},"4049":{"position":[[102,5]]},"4063":{"position":[[99,5]]},"4077":{"position":[[103,5]]},"4091":{"position":[[96,5]]},"4105":{"position":[[101,5]]}}}],["follow",{"_index":103,"t":{"3869":{"position":[[89,9]]},"3883":{"position":[[90,9]]},"3897":{"position":[[87,9]]},"3911":{"position":[[86,9]]},"3925":{"position":[[90,9]]},"3939":{"position":[[89,9]]},"3953":{"position":[[85,9]]},"3967":{"position":[[89,9]]},"3981":{"position":[[87,9]]},"3995":{"position":[[88,9]]},"4009":{"position":[[86,9]]},"4023":{"position":[[86,9]]},"4037":{"position":[[87,9]]},"4051":{"position":[[92,9]]},"4065":{"position":[[100,9]]},"4079":{"position":[[90,9]]},"4093":{"position":[[83,9]]},"4107":{"position":[[88,9]]}}}],["format",{"_index":425,"t":{"4067":{"position":[[433,6]]}}}],["free",{"_index":284,"t":{"3941":{"position":[[1369,4],[2065,4]]}}}],["frequenc",{"_index":460,"t":{"4079":{"position":[[303,9]]},"4081":{"position":[[60,9]]}}}],["full",{"_index":204,"t":{"3903":{"position":[[227,4]]}}}],["func",{"_index":78,"t":{"3865":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3879":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3893":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3907":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3921":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3935":{"position":[[0,4],[32,4],[82,4],[153,4],[196,4],[228,4],[260,4]]},"3949":{"position":[[0,4],[36,4],[86,4],[157,4],[200,4],[232,4],[264,4]]},"3963":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3977":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"3991":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"4005":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"4019":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"4033":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"4047":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"4061":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"4075":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"4089":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]},"4103":{"position":[[0,4],[35,4],[85,4],[156,4],[199,4],[231,4],[263,4]]}}}],["garbag",{"_index":51,"t":{"3857":{"position":[[877,7]]}}}],["gcinterv",{"_index":117,"t":{"3869":{"position":[[354,11]]},"3871":{"position":[[653,10]]},"3873":{"position":[[158,11]]},"3897":{"position":[[288,11]]},"3899":{"position":[[275,10]]},"3901":{"position":[[70,11]]},"3981":{"position":[[246,11]]},"3983":{"position":[[92,10]]},"3985":{"position":[[28,11]]},"4009":{"position":[[330,11],[555,11]]},"4011":{"position":[[877,10]]},"4013":{"position":[[135,11]]},"4023":{"position":[[330,11],[523,11],[737,11]]},"4025":{"position":[[892,10]]},"4027":{"position":[[135,11]]},"4051":{"position":[[307,11]]},"4053":{"position":[[1032,10]]},"4055":{"position":[[194,11]]},"4107":{"position":[[317,11]]},"4109":{"position":[[336,10]]},"4111":{"position":[[95,11]]}}}],["get",{"_index":21,"t":{"3857":{"position":[[289,4]]}}}],["get(key",{"_index":27,"t":{"3857":{"position":[[377,7]]},"3865":{"position":[[53,7]]},"3879":{"position":[[53,7]]},"3893":{"position":[[53,7]]},"3907":{"position":[[53,7]]},"3921":{"position":[[53,7]]},"3935":{"position":[[50,7]]},"3949":{"position":[[54,7]]},"3963":{"position":[[53,7]]},"3977":{"position":[[53,7]]},"3991":{"position":[[53,7]]},"4005":{"position":[[53,7]]},"4019":{"position":[[53,7]]},"4033":{"position":[[53,7]]},"4047":{"position":[[53,7]]},"4061":{"position":[[53,7]]},"4075":{"position":[[53,7]]},"4089":{"position":[[53,7]]},"4103":{"position":[[53,7]]}}}],["github.com//:@127.0.0.1:6379/:@localhost:6379/:@tcp(:)/SQLite3 | Fiber - - + +
-
Version: sqlite3_v1.x.x

SQLite3

Release +

Version: sqlite3_v1.x.x

SQLite3

Release Discord Test Security -Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
- - +Linter

A SQLite3 storage driver using mattn/go-sqlite3.

Table of Contents

Signatures

func New(config ...Config) Storage
func (s *Storage) Get(key string) ([]byte, error)
func (s *Storage) Set(key string, val []byte, exp time.Duration) error
func (s *Storage) Delete(key string) error
func (s *Storage) Reset() error
func (s *Storage) Close() error
func (s *Storage) Conn() *sql.DB

Installation

SQLite3 is tested on the 2 last Go versions with support for modules. So make sure to initialize one first if you didn't do that yet:

go mod init github.com/<user>/<repo>

And then install the sqlite3 implementation:

go get github.com/gofiber/storage/sqlite3

Examples

Import the storage package.

import "github.com/gofiber/storage/sqlite3"

You can use the following possibilities to create a storage:

// Initialize default config
store := sqlite3.New()

// Initialize custom config
store := sqlite3.New(sqlite3.Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
})

Config

type Config struct {
// Database name
//
// Optional. Default is "fiber"
Database string

// Table name
//
// Optional. Default is "fiber_storage"
Table string

// Reset clears any existing keys in existing Table
//
// Optional. Default is false
Reset bool

// Time before deleting expired keys
//
// Optional. Default is 10 * time.Second
GCInterval time.Duration

// //////////////////////////////////
// Adaptor related config options //
// //////////////////////////////////

// MaxIdleConns sets the maximum number of connections in the idle connection pool.
//
// Optional. Default is 100.
MaxIdleConns int

// MaxOpenConns sets the maximum number of open connections to the database.
//
// Optional. Default is 100.
MaxOpenConns int

// ConnMaxLifetime sets the maximum amount of time a connection may be reused.
//
// Optional. Default is 1 second.
ConnMaxLifetime time.Duration
}

Default Config

var ConfigDefault = Config{
Database: "./fiber.sqlite3",
Table: "fiber_storage",
Reset: false,
GCInterval: 10 * time.Second,
MaxOpenConns: 100,
MaxIdleConns: 100,
ConnMaxLifetime: 1 * time.Second,
}
+ + \ No newline at end of file diff --git a/sw.js b/sw.js index d5af3a74582..ba0f4b59761 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -(()=>{"use strict";var e={913:()=>{try{self["workbox:core:6.5.3"]&&_()}catch(e){}},977:()=>{try{self["workbox:precaching:6.5.3"]&&_()}catch(e){}},80:()=>{try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},873:()=>{try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function s(a){var n=t[a];if(void 0!==n)return n.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,s),i.exports}(()=>{s(913);const e=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},n=e=>[a.prefix,e,a.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||n(a.precache),r=e=>e||n(a.runtime);function c(e,t){const s=t();return e.waitUntil(s),s}s(977);const o="__WB_REVISION__";function h(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"==typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:a}=e;if(!a)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(a,location.href);return{cacheKey:e.href,url:e.href}}const n=new URL(a,location.href),i=new URL(a,location.href);return n.searchParams.set(o,s),{cacheKey:n.href,url:i.href}}class l{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class u{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null==t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}let f;async function d(e,s){let a=null;if(e.url){a=new URL(e.url).origin}if(a!==self.location.origin)throw new t("cross-origin-copy-response",{origin:a});const n=e.clone(),i={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=s?s(i):i,c=function(){if(void 0===f){const e=new Response("");if("body"in e)try{new Response(e.body),f=!0}catch(e){f=!1}f=!1}return f}()?n.body:await n.blob();return new Response(c,r)}function p(e,t){const s=new URL(e);for(const e of t)s.searchParams.delete(e);return s.href}class g{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const y=new Set;s(873);function w(e){return"string"==typeof e?new Request(e):e}class _{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new g,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let a=w(e);if("navigate"===a.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?a.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))a=await e({request:a.clone(),event:s})}catch(e){if(e instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:e.message})}const i=a.clone();try{let e;e=await fetch(a,"navigate"===a.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:i,response:e});return e}catch(e){throw n&&await this.runCallbacks("fetchDidFail",{error:e,event:s,originalRequest:n.clone(),request:i.clone()}),e}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=w(e);let s;const{cacheName:a,matchOptions:n}=this._strategy,i=await this.getCacheKey(t,"read"),r=Object.assign(Object.assign({},n),{cacheName:a});s=await caches.match(i,r);for(const e of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await e({cacheName:a,matchOptions:n,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(e,s){const a=w(e);var n;await(n=0,new Promise((e=>setTimeout(e,n))));const i=await this.getCacheKey(a,"write");if(!s)throw new t("cache-put-with-no-response",{url:(r=i.url,new URL(String(r),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var r;const c=await this._ensureResponseSafeToCache(s);if(!c)return!1;const{cacheName:o,matchOptions:h}=this._strategy,l=await self.caches.open(o),u=this.hasCallback("cacheDidUpdate"),f=u?await async function(e,t,s,a){const n=p(t.url,s);if(t.url===n)return e.match(t,a);const i=Object.assign(Object.assign({},a),{ignoreSearch:!0}),r=await e.keys(t,i);for(const t of r)if(n===p(t.url,s))return e.match(t,a)}(l,i.clone(),["__WB_REVISION__"],h):null;try{await l.put(i,u?c.clone():c)}catch(e){if(e instanceof Error)throw"QuotaExceededError"===e.name&&await async function(){for(const e of y)await e()}(),e}for(const e of this.iterateCallbacks("cacheDidUpdate"))await e({cacheName:o,oldResponse:f,newResponse:c.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let a=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))a=w(await e({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[s]=a}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"==typeof t[e]){const s=this._pluginStateMap.get(t),a=a=>{const n=Object.assign(Object.assign({},a),{state:s});return t[e](n)};yield a}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const e of this.iterateCallbacks("cacheWillUpdate"))if(t=await e({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class v{constructor(e={}){this.cacheName=r(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"==typeof e.request?new Request(e.request):e.request,a="params"in e?e.params:void 0,n=new _(this,{event:t,request:s,params:a}),i=this._getResponse(n,s,t);return[i,this._awaitComplete(i,n,s,t)]}async _getResponse(e,s,a){let n;await e.runCallbacks("handlerWillStart",{event:a,request:s});try{if(n=await this._handle(s,e),!n||"error"===n.type)throw new t("no-response",{url:s.url})}catch(t){if(t instanceof Error)for(const i of e.iterateCallbacks("handlerDidError"))if(n=await i({error:t,event:a,request:s}),n)break;if(!n)throw t}for(const t of e.iterateCallbacks("handlerWillRespond"))n=await t({event:a,request:s,response:n});return n}async _awaitComplete(e,t,s,a){let n,i;try{n=await e}catch(i){}try{await t.runCallbacks("handlerDidRespond",{event:a,request:s,response:n}),await t.doneWaiting()}catch(e){e instanceof Error&&(i=e)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:s,response:n,error:i}),t.destroy(),i)throw i}}class m extends v{constructor(e={}){e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(m.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let a;const n=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=n.integrity,i=e.integrity,r=!i||i===t;if(a=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?i||t:void 0})),t&&r&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await s.cachePut(e,a.clone());0}}return a}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const a=await s.fetch(e);if(!await s.cachePut(e,a.clone()))throw new t("bad-precaching-response",{url:e.url,status:a.status});return a}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,a]of this.plugins.entries())a!==m.copyRedirectedCacheableResponsesPlugin&&(a===m.defaultPrecacheCacheabilityPlugin&&(e=s),a.cacheWillUpdate&&t++);0===t?this.plugins.push(m.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}m.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},m.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await d(e):e};class R{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new m({cacheName:i(e),plugins:[...t,new u({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const a of e){"string"==typeof a?s.push(a):a&&void 0===a.revision&&s.push(a.url);const{cacheKey:e,url:n}=h(a),i="string"!=typeof a&&a.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:e});if("string"!=typeof a&&a.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==a.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(e,a.integrity)}if(this._urlsToCacheKeys.set(n,e),this._urlsToCacheModes.set(n,i),s.length>0){const e=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return c(e,(async()=>{const t=new l;this.strategy.plugins.push(t);for(const[t,s]of this._urlsToCacheKeys){const a=this._cacheKeysToIntegrities.get(s),n=this._urlsToCacheModes.get(t),i=new Request(t,{integrity:a,cache:n,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:i,event:e}))}const{updatedURLs:s,notUpdatedURLs:a}=t;return{updatedURLs:s,notUpdatedURLs:a}}))}activate(e){return c(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),a=[];for(const n of t)s.has(n.url)||(await e.delete(n),a.push(n.url));return{deletedURLs:a}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}s(80);(async()=>{const e=function(){const e=JSON.parse(new URLSearchParams(self.location.search).get("params"));return e.debug&&console.log("[Docusaurus-PWA][SW]: Service Worker params:",e),e}(),t=[{"revision":"7ecc36bd42522fd342085adf2802c97e","url":"-middleware/index.html"},{"revision":"78dc288ee445eae0d05fbe8730f498b0","url":"404.html"},{"revision":"3fab8f55a9c375c0b50e64f36b70b5ff","url":"api/app/index.html"},{"revision":"27398c333c9fab52a45f6e529a0cb497","url":"api/client/index.html"},{"revision":"dac1a973a3f47ec2c3c4affdb8b90119","url":"api/constants/index.html"},{"revision":"3076915e8b55dc791ba39f3725c7b2fd","url":"api/ctx/index.html"},{"revision":"69c7fc120f2c14b9abfa8a18d2b8b971","url":"api/fiber/index.html"},{"revision":"2943e1e3bb18b503c3c0ca61ff8bb6f0","url":"api/middleware/adaptor/index.html"},{"revision":"eb3b26f46c96bebc6dd6a652c9442632","url":"api/middleware/basicauth/index.html"},{"revision":"e831d5d91f670c8097a73fe11d2529c3","url":"api/middleware/cache/index.html"},{"revision":"b3d0cb85cdfc959da510242e1326f340","url":"api/middleware/compress/index.html"},{"revision":"5470a468c71877ecc9d4699e375c617c","url":"api/middleware/cors/index.html"},{"revision":"cd6e52f716181642f7e72fede345f93b","url":"api/middleware/csrf/index.html"},{"revision":"094ed6693de14f12c4e424635d1d8b7d","url":"api/middleware/earlydata/index.html"},{"revision":"c091b54cef6f9da092045315fb26e3d6","url":"api/middleware/encryptcookie/index.html"},{"revision":"7aab6d7f50b102bbfdc72ca1936e28eb","url":"api/middleware/envvar/index.html"},{"revision":"19a6d075d2dfbd8ea34427242abf4859","url":"api/middleware/etag/index.html"},{"revision":"f65328e5f367f350ded8403a2e0e2201","url":"api/middleware/expvar/index.html"},{"revision":"6a33b4bd3216cbdc41e1db2444d1f2a1","url":"api/middleware/favicon/index.html"},{"revision":"c546023318f0739ad95a4a560125ebd2","url":"api/middleware/filesystem/index.html"},{"revision":"8d3244e37b829cedfb6548e1b5a85b92","url":"api/middleware/helmet/index.html"},{"revision":"84a94cb09cae2eef77054d5f70a2cb8d","url":"api/middleware/idempotency/index.html"},{"revision":"cc88d22f9d279347ac4ad67999c936a4","url":"api/middleware/keyauth/index.html"},{"revision":"6c77c08e35636d1bf771a5aace3b4fd2","url":"api/middleware/limiter/index.html"},{"revision":"a664d3deb327e3ff4bd17fd0f8a7418f","url":"api/middleware/logger/index.html"},{"revision":"380d9c1047f27bff367f2c280396fbf9","url":"api/middleware/monitor/index.html"},{"revision":"8c4526c4f60bd8a2e7fdc8a4270ec459","url":"api/middleware/pprof/index.html"},{"revision":"0cb089d938b5907130e40e81895c7927","url":"api/middleware/proxy/index.html"},{"revision":"89e279b48221cda98787cd7ff20308a6","url":"api/middleware/recover/index.html"},{"revision":"0e7ece62745e060776a43fafad51de4a","url":"api/middleware/redirect/index.html"},{"revision":"65f7184e1cc5183f3eaaa1c8a2c17b42","url":"api/middleware/requestid/index.html"},{"revision":"783a0322706e07b4e0e8bb71ad581833","url":"api/middleware/rewrite/index.html"},{"revision":"e13605e66b9b3330675a623c2dc7af5c","url":"api/middleware/session/index.html"},{"revision":"5ea42625b4fca5a1606f58403c16f7a4","url":"api/middleware/skip/index.html"},{"revision":"08d22ea84f75e900bf5513403be98489","url":"api/middleware/timeout/index.html"},{"revision":"77b52446446c10575dfdd0da09869d5a","url":"assets/css/styles.28db50a2.css"},{"revision":"0ecaf8321036bfee78f8aae6bc5a20be","url":"assets/js/044897a3.d41a5bae.js"},{"revision":"a6dc35840be62a5b22638c34cd72bbff","url":"assets/js/0451c1a5.750dd9d1.js"},{"revision":"a2e52b05573190a2b772e2d07401deac","url":"assets/js/04b03e77.94bd55df.js"},{"revision":"5507abdaa08020b7c78bed6ad02391f6","url":"assets/js/04ddcfba.0aab97c4.js"},{"revision":"e82233622edb2be379b04d2d4fed23f7","url":"assets/js/054c93da.1a771626.js"},{"revision":"4ad4004d358c66a72fb69a730ae0ac93","url":"assets/js/05a04cc8.f70d38fb.js"},{"revision":"93090d3751c78e8d3a473a4e65d3a21d","url":"assets/js/06122e25.34f70c6a.js"},{"revision":"b268c2343e28691a6213b711f003d93f","url":"assets/js/068d482b.daeb7e0c.js"},{"revision":"6278f729f94405dfc25455941e1c36c1","url":"assets/js/069c048f.97d37f82.js"},{"revision":"1dc2a42d0e0a18faf05c5980667ff2a7","url":"assets/js/072282c6.23421e5e.js"},{"revision":"628e0e4424c908458438dc8c91a57ad2","url":"assets/js/077bad16.255dffdb.js"},{"revision":"643c43a6bb9bd59ccdf7e6ef9c8b171d","url":"assets/js/08224c27.8cea0f9b.js"},{"revision":"f11e036393a303a1ed388ce8ba51fe1c","url":"assets/js/09303bcf.588f7aa7.js"},{"revision":"babc876750f346507281e16b6d1ca7fa","url":"assets/js/09fe6722.87fad4b9.js"},{"revision":"e810367d5081f94a0a89caa9e4862cf1","url":"assets/js/0b4ecf95.8e634b0b.js"},{"revision":"6e6dc7bedbecbc8a04113ba0226b95e5","url":"assets/js/0c35ae3f.1def3328.js"},{"revision":"ad0d7c777d1bc62e7673b6a9e3002082","url":"assets/js/0eaa9332.6f0b8331.js"},{"revision":"cc6b0e7591050914e3ae06135f632dd4","url":"assets/js/0ed78b03.55dcae12.js"},{"revision":"2a64d6d22a9629bdae92a90fb24bf408","url":"assets/js/0f17a9fe.a4ab29b0.js"},{"revision":"e130e2350907568aff3e97936954a70c","url":"assets/js/0faeb6cb.ac01fd04.js"},{"revision":"cb48b994e0f3a149ec78579b34391c03","url":"assets/js/0fb7e018.79cb1452.js"},{"revision":"4b251adb62e2046d697d84d9f742a25f","url":"assets/js/105f1242.5fe7245c.js"},{"revision":"dee4bbbc5cf84145b0a4ed8103149ff7","url":"assets/js/117bedbe.e5d9cdb0.js"},{"revision":"3f46e4fa252b9ef65bf7c1152e9117ae","url":"assets/js/11ab8220.1528de5f.js"},{"revision":"ce5d09937127917338876ab9c361b004","url":"assets/js/12c533ea.11b0dd54.js"},{"revision":"7fd190e56cacf3698ef9ecd5cc0194c4","url":"assets/js/13fb3f7d.8d86f8c1.js"},{"revision":"138795e4f2bc9e74feb879cc0b440dcc","url":"assets/js/14a7e971.e7b22df4.js"},{"revision":"c826c3b5bd257df48dec890246fbf5d2","url":"assets/js/14eb3368.fabd9a92.js"},{"revision":"d57c6cd40eee80c3d1f30ad375a45dcb","url":"assets/js/1553f4e9.944c10f1.js"},{"revision":"3b7d21c1be5d6e623ca79c320fa17514","url":"assets/js/155ac106.42ea3161.js"},{"revision":"fc4cf6e2edaded4444bc6d1751a87b41","url":"assets/js/15d8a732.7f856e1d.js"},{"revision":"b91cb14f0c4a508907d636007c3ab26e","url":"assets/js/15eed0c8.175fbad5.js"},{"revision":"a3c102b4a1f90a613b1a9a74d886bd27","url":"assets/js/168749b0.fc20fca5.js"},{"revision":"b5215641e5ba13b88f131a5877dee458","url":"assets/js/169061e7.f8139a54.js"},{"revision":"9f64d72ef3dff26e3c910d8018a6da07","url":"assets/js/16a87a21.217d99f4.js"},{"revision":"49df0172a67e4aa3a0e8ac6ce08e97a8","url":"assets/js/176e278d.ca91b8b5.js"},{"revision":"077649d23306550d3000336837bdc8cc","url":"assets/js/17896441.5ae1596f.js"},{"revision":"93c7222c0920e8845da333ab71c090a7","url":"assets/js/187263b9.0358fff5.js"},{"revision":"39c819fcacb4b27264442fdbbe01d591","url":"assets/js/18fc6999.83952775.js"},{"revision":"fd3ed8b2430eeeb2f180881769ae515c","url":"assets/js/19323918.21060c17.js"},{"revision":"1293c92799bd8581b39f9bebae40310e","url":"assets/js/19e7c5f6.685bf749.js"},{"revision":"fa60900e9a110c22977b5d50adbc26f6","url":"assets/js/1a1f40ab.712763ce.js"},{"revision":"946483a0a3ac2b4384705570b08facde","url":"assets/js/1a4e3797.c58ef580.js"},{"revision":"357d0418a12a8133666ba4edfa4d83a0","url":"assets/js/1a56c576.83243328.js"},{"revision":"eeeee1c6b1cecaf3ad09781e21570d2b","url":"assets/js/1a6451b0.92f79cb3.js"},{"revision":"771f3c8b0dfd31f45919216970a32299","url":"assets/js/1af20617.fb88a6e2.js"},{"revision":"33536b71f401a15303fc852b46108ab0","url":"assets/js/1b545511.379a1697.js"},{"revision":"7083a23321976835930e03b6ba55d508","url":"assets/js/1be78505.ed99298b.js"},{"revision":"fa32fa1456ccc938933f3593acddd54d","url":"assets/js/1db45628.b3fe5fc9.js"},{"revision":"221bbfa55728a262ae3a020e405b37d5","url":"assets/js/1ed4c90d.a9dabf3a.js"},{"revision":"b9859dd33fcde3578cfba4d1c6b3c82f","url":"assets/js/201075ae.f977b0d0.js"},{"revision":"456bace18dee9d06f0f38c8ad701ab0a","url":"assets/js/20b2a36a.01b2f9ab.js"},{"revision":"58e979e768f14a7507efe68175c982ae","url":"assets/js/20e81fa7.ced70935.js"},{"revision":"eeb70d96f8b8c6436aa37c12b5443c45","url":"assets/js/2155a006.dcb97dd0.js"},{"revision":"3251ba8fdae26f6de16351e7455afd6b","url":"assets/js/216c2ff0.e423e04e.js"},{"revision":"8e1dd363850f0d838e690bec6c5ff3fc","url":"assets/js/21cbcfa4.39475d5c.js"},{"revision":"b31bfe760b6234cf837ce1690e8ecdb7","url":"assets/js/2244d875.5019532d.js"},{"revision":"b34d234d7b28fff183dfc3287964fd8b","url":"assets/js/22e714a5.10483d7d.js"},{"revision":"21f65e983e654a0b6825c9e4338f52e5","url":"assets/js/230.06e9bff8.js"},{"revision":"026dbd4759aee66e83e53496e140421b","url":"assets/js/2355813e.84a25580.js"},{"revision":"8278edc76fc3c4a2be3323fc17dc643c","url":"assets/js/247783bb.b20f80cc.js"},{"revision":"2900a0495e7f0f16691742565cd38e88","url":"assets/js/24847ea2.2672af45.js"},{"revision":"4ee8bcf768afecd558b3164a6aeedfe4","url":"assets/js/25e4f0d4.4a790ac6.js"},{"revision":"69e68bdfc56a7e87b4fe382d21121a3c","url":"assets/js/26257c43.854f03bd.js"},{"revision":"dcaba2e5b0fdff44278d9fa870493631","url":"assets/js/27998293.f43a25c2.js"},{"revision":"acfacf6e27749ac97276fc0422722b03","url":"assets/js/2804f106.402e40c2.js"},{"revision":"4a2b6160b0dd4a71f27ee064f9a59b1d","url":"assets/js/28f5790d.3079af64.js"},{"revision":"93cd4a3bb58677b4d5a5d05d442af873","url":"assets/js/2930693d.8d150ba8.js"},{"revision":"c409ce9be5f41947e78b9d8cee0cf2c5","url":"assets/js/29a5ee20.1bfedbc2.js"},{"revision":"ae256a9f3837ad2840024062cd117f7e","url":"assets/js/29b92cdb.233e09cd.js"},{"revision":"13cdfbc8913ec4e45acda8e1e25bfbff","url":"assets/js/2a83b683.0ca18764.js"},{"revision":"b7274fdfb1580ad6bd5801339b57f627","url":"assets/js/2ab216cb.26f9f83d.js"},{"revision":"43e1e0f64714adc834af0bf558044b6a","url":"assets/js/2b43107e.d9d13b52.js"},{"revision":"f9cb4d3eab9b293c6a0622ef711a6fa9","url":"assets/js/2bc33efd.c760cae1.js"},{"revision":"34846e1ead0c8011bfc3727d8ea93b7d","url":"assets/js/2d339dcd.2ed76047.js"},{"revision":"9e97b9266eeb727db382e6867bed691d","url":"assets/js/2f0b5b6c.588a4005.js"},{"revision":"3f8a612f3298b15ab50f72aca0f6d09e","url":"assets/js/2f70042d.0fb1d70d.js"},{"revision":"fbfef5d6218b2cba38ba2829ca3cf288","url":"assets/js/302308c6.ffcd529e.js"},{"revision":"b19fe86a619558e0d0d81d7eda7c50a0","url":"assets/js/30f87c66.f7f6fada.js"},{"revision":"2cbbbe52d50ed15930ba70ce73e92d92","url":"assets/js/3109af4c.9c5a997e.js"},{"revision":"924861f5409da21078b3e6e41f3ca325","url":"assets/js/32a09f8c.1436fb15.js"},{"revision":"5273e5edeb8d4f2b5ec3370897ce73f4","url":"assets/js/32e68b93.fd4d6362.js"},{"revision":"a81537ba98c66d6ae4b9b5d117f73b54","url":"assets/js/351af030.458607e1.js"},{"revision":"df85e59f683c0c99442c5554c7d7c221","url":"assets/js/354823c1.9918a004.js"},{"revision":"5b0b94cc6b0a257bb3dd6df152cfdd3b","url":"assets/js/354efaa7.255ca81b.js"},{"revision":"8e3b8f167516f6567f6ff34522196d4d","url":"assets/js/3719c62c.693effe3.js"},{"revision":"1177cde44d2e9ddd9c96cf34e143c15e","url":"assets/js/3724ddc1.618406a6.js"},{"revision":"a2cc7d5cd41ae68ed5d1ed7788be0ea4","url":"assets/js/37662bdc.cd41d3bc.js"},{"revision":"d06b618b857f15d6bb596bc1e4c05f32","url":"assets/js/37744159.1758ac5e.js"},{"revision":"97faf06710eca6d6d28cb7e4f98906d2","url":"assets/js/3a6391d4.4f580913.js"},{"revision":"d99038356807b35ade0e2aecdb9110d3","url":"assets/js/3b70e89f.93cc780c.js"},{"revision":"f5180d1dcaf6f7c852ad43208819611b","url":"assets/js/3d13e7fb.c248a747.js"},{"revision":"6eb6ce74d31ebb2463686177ca3b2bd0","url":"assets/js/3d2c31c0.300268cc.js"},{"revision":"d13a0b82e439e1243fdf336a7c1e84cb","url":"assets/js/4129286c.6024df0a.js"},{"revision":"8f194cf25086d19a99bb7dd7ec239a4d","url":"assets/js/41a4aef8.cf014c1c.js"},{"revision":"3cf7b6462bfbf2f41d702eb17673a426","url":"assets/js/41a8a410.11a8fa24.js"},{"revision":"a365372a23b3ce979dcf7c0ccf3da693","url":"assets/js/420bbee2.247cb8eb.js"},{"revision":"aa43a3e23b28de7154fffd12845edc3c","url":"assets/js/447fdb90.725bf4b3.js"},{"revision":"b33118074599494d700d8b051e32377f","url":"assets/js/45741516.e5688147.js"},{"revision":"ec6536177bd0caf986d515c04982a0de","url":"assets/js/46e18ecb.2382ce98.js"},{"revision":"31bdfca5cba1ba01c4f3e07cc556b73a","url":"assets/js/48aeac67.8734465c.js"},{"revision":"a6d92ddaab32de96f09ab4dff70d853c","url":"assets/js/48c6cc07.626c57bb.js"},{"revision":"d6193f99273950c54eb947401ad111a4","url":"assets/js/4972.091c56f5.js"},{"revision":"9258e53b609e307f9f812a3b4aa5a64a","url":"assets/js/4a6d765c.83439e14.js"},{"revision":"7f97bc734344694f99ac5456a5bc9fc8","url":"assets/js/4b0c4837.fb718049.js"},{"revision":"1212d6c80c2335af5f19e112a79e3c8c","url":"assets/js/4b47f78b.86e0014f.js"},{"revision":"bf973e9a160e2ef25a3d792117f48d31","url":"assets/js/4c57fea8.57c99d8b.js"},{"revision":"4aff4f60e59553fe6deec6b79fbf649d","url":"assets/js/4cd7d6c0.c6a80257.js"},{"revision":"b0f88d2af6e1b62ddd2f6e2a63813ed0","url":"assets/js/4e1e38be.9c4bf89f.js"},{"revision":"4ed6c21f74a9262a353cb36622a22133","url":"assets/js/4efb66e2.86de2a0d.js"},{"revision":"8115e05ee5c279fbf2621d81636ec75d","url":"assets/js/5086bf8b.09f5e366.js"},{"revision":"8a586a383e4e62a3235a9d462a349eb7","url":"assets/js/5131.8aadd48c.js"},{"revision":"1194db48a15792041e8c635b9745d588","url":"assets/js/52295632.b148ba4f.js"},{"revision":"72a2f6864b47d295b4832eb24514494f","url":"assets/js/5229ce75.86e107f0.js"},{"revision":"0933a70374cdd0535785868363a5598d","url":"assets/js/5283.0af36832.js"},{"revision":"1db7139270887fccf88a1866597bed62","url":"assets/js/5525.999d509e.js"},{"revision":"044d96b92b4962a27a30d3282495da62","url":"assets/js/56cc377d.8fad9853.js"},{"revision":"c3366e7cae707a0132442e9e14fe7469","url":"assets/js/59256a9c.1dcade72.js"},{"revision":"f50c7789cdd00bc1a8bc895205a2974d","url":"assets/js/5aebd6e8.232292b5.js"},{"revision":"4a3b887ab60ee1473e1c2fc4c76197b5","url":"assets/js/5f0d6a9f.860a40b7.js"},{"revision":"d7e7b73facdf26ba187e41879f8d7de7","url":"assets/js/5f49a855.836ed532.js"},{"revision":"afc2529d124e6ffa4b7af3177aa2c23c","url":"assets/js/60178aaa.0deb8b9a.js"},{"revision":"8fbe7948f81833f77f075847a90ad853","url":"assets/js/60c7cba8.4147280a.js"},{"revision":"687b32b24049f6f1357a311b47e3af4b","url":"assets/js/61265387.a05b84e3.js"},{"revision":"e9f1b777e9c4309263aec9edc71f332b","url":"assets/js/615fd3de.9c409b23.js"},{"revision":"29cefe1299c63ef9726eb1c5b05536c3","url":"assets/js/61f05610.4d9fa7b5.js"},{"revision":"78412f9d6f43c19a6096ed2626075ae3","url":"assets/js/6332.66f44b9d.js"},{"revision":"31065a46960829505f7256a713d62f45","url":"assets/js/65a2e3ff.8cb8b5c4.js"},{"revision":"2e4ca1f4a77705e2e243f143148cdae3","url":"assets/js/67e6ce42.de981432.js"},{"revision":"5e85d5b79b51cf8b9ffc9416a94abb33","url":"assets/js/683903ba.8a19fcce.js"},{"revision":"df1a5f71ebf2802eba65d745f31b3a45","url":"assets/js/69615979.6a8fffce.js"},{"revision":"1ef9c37ac7d1db6d46d17da7a1c6e271","url":"assets/js/696b59c8.060be796.js"},{"revision":"255438572177631940a30bed8f1ad586","url":"assets/js/696e1f87.9e6b4678.js"},{"revision":"15e294e261be9688c3a8b658b381894c","url":"assets/js/697acd1f.71709ac7.js"},{"revision":"7eca0286bb85601ee504dd546aa9dbfa","url":"assets/js/6a673416.7bb6ef88.js"},{"revision":"30d3e0bbeb06aa311224c542ecd55e39","url":"assets/js/6a9ae4f0.3dd85153.js"},{"revision":"17d5846390e80105867c7668948eaaf6","url":"assets/js/6b69f1ff.f2194375.js"},{"revision":"adc59b1f5edc816e89343b2793e82b18","url":"assets/js/6c633cee.5d525070.js"},{"revision":"9242071e81f4fd733b11306359abb7e1","url":"assets/js/6d7ca528.71c21c57.js"},{"revision":"af6649d03d73bae9a49ece13312f25f1","url":"assets/js/6e0f0a87.4641915d.js"},{"revision":"bb2588af8088e0676b91075c4e56a0d0","url":"assets/js/6ed73382.48bf0c60.js"},{"revision":"12a0512153b8bcb5aa3655513a77fca4","url":"assets/js/6f9f0f49.28341a86.js"},{"revision":"1fb9efebfa4b7223ac71e62f54d00d63","url":"assets/js/6fd96d3e.2854f33e.js"},{"revision":"bacef6bdd44dc071601258ce7daacd73","url":"assets/js/70908c7a.b8dbd88c.js"},{"revision":"da0e0b4487044627401e18d74228c6d6","url":"assets/js/70bddfb7.e85d5ddc.js"},{"revision":"3c0b85b68df1c4dbe8e3093cf9ac0db1","url":"assets/js/70e71bef.99f29036.js"},{"revision":"efe1c8480814e1ade1a4b6b3dbfbcbb5","url":"assets/js/71353d04.2257d31b.js"},{"revision":"e2d21dcf40cc72592d8cf7b8a5e85c92","url":"assets/js/714b2cfa.ca9f83a1.js"},{"revision":"2afa118960fbcb648e52bfcba1396b5d","url":"assets/js/71ec47b0.118d4fda.js"},{"revision":"36730c0e9cd8474a79d03f2ff5601752","url":"assets/js/7304b5d2.69e155e8.js"},{"revision":"74b3e31d827331085b41ee0d2ba2d0cb","url":"assets/js/7307607e.99cf9262.js"},{"revision":"38c60e886436368cfcebb1492e55d716","url":"assets/js/73b0bf71.d1189f2f.js"},{"revision":"a50ef498409777c62325d57f3d4ec487","url":"assets/js/7449d9ed.c3aabec4.js"},{"revision":"b82bcd07b690f3a37f59a3a636658bda","url":"assets/js/746fc7bc.f7e30157.js"},{"revision":"a516eec258fc9bcbfcfda7eee6cf3926","url":"assets/js/7494fa4d.02ec7ea9.js"},{"revision":"50457d95a60bd34e4273c535711fb2ed","url":"assets/js/74efe321.deefbb0c.js"},{"revision":"78f066efdcc18b47eb24a7fd24b44730","url":"assets/js/7506f0f5.68182e50.js"},{"revision":"5e05c079453cff2d145f2da99f34736e","url":"assets/js/75542ae5.79d4804f.js"},{"revision":"ce261b23f9ed702b83fbe63c51d0d324","url":"assets/js/7585ab27.2af6135f.js"},{"revision":"73dace791c5545abfd005552219e724d","url":"assets/js/78d978a7.3afe19aa.js"},{"revision":"96d1ef2fe41d085091421fcacaaeda00","url":"assets/js/7902b5a9.cb8d6b33.js"},{"revision":"ce70738b9ee2518b47504f52ae5d1484","url":"assets/js/79f166e2.7599cdcf.js"},{"revision":"bafcf8f14ce01f3d3abe5c5272b5d095","url":"assets/js/7a13331e.0299645a.js"},{"revision":"eaa0084137aadd7cab461b3869e6b313","url":"assets/js/7aea73af.3ee849e4.js"},{"revision":"c6ca9153a746da930b96eae6d2bb31d7","url":"assets/js/7b7083e7.ad82da80.js"},{"revision":"df12db9810fb04c5eb609ef961d0ff88","url":"assets/js/7bb2c503.ee98a6f4.js"},{"revision":"7c523bd6762f2f73401f65e392677b16","url":"assets/js/7c14e583.091e9712.js"},{"revision":"327b84b421dec3ecb7322885f6f05aff","url":"assets/js/7c17db79.b3135ed2.js"},{"revision":"f3b70f4caf18af772d2483ca43b2aeb3","url":"assets/js/7c3082c0.8fc42c70.js"},{"revision":"500fd107d23ceeacb9bf2c31ce533fe6","url":"assets/js/7c4da66f.b70496ba.js"},{"revision":"3048f80e92ff90712fe42f11416008e5","url":"assets/js/7d5a5238.d530d023.js"},{"revision":"4c11d914477a0e718f7a6a1a6ba0d78e","url":"assets/js/7d7ae710.88656bb9.js"},{"revision":"70977fdbaa91a883458f85b230eb9d09","url":"assets/js/7e307fec.d7edf2da.js"},{"revision":"8fac6691201b78c8938e29b9d8cecfaf","url":"assets/js/7e6c0027.08e31ba3.js"},{"revision":"6d86953c0bdf21dda33fed239846e2ae","url":"assets/js/8231ac58.22628d6e.js"},{"revision":"ee6bda0478f1af1bcbca8413e44f75a3","url":"assets/js/8285cac4.4eb76808.js"},{"revision":"f610b8d83e9652faa374aadc3dbf3473","url":"assets/js/82a52177.34138b5f.js"},{"revision":"b85e1f5cf0fbbbd0f26fb82998b39dbb","url":"assets/js/8443.f0fb2769.js"},{"revision":"39ca3eb945395c368386f2fca38b4cca","url":"assets/js/8498b8c7.1419c6c5.js"},{"revision":"288c48af51277a7860195e8ca4d5e3fb","url":"assets/js/84b126b5.8211f699.js"},{"revision":"de58fa65d014937571d11e051055b43e","url":"assets/js/85ea1211.f44724ea.js"},{"revision":"a28fdf9bbb987bde5f68d668b13817ff","url":"assets/js/8613e059.bf73af0c.js"},{"revision":"89fd5260375ed68622f52a168c1c4335","url":"assets/js/89af46e0.1ac92fb9.js"},{"revision":"112d7fe592125ed7a86e74d1a7c7a03a","url":"assets/js/89cfd5bc.f9a6d018.js"},{"revision":"577ea37e5ad0cb4d2e47916786f7412f","url":"assets/js/8a0a7bb8.6ece6c3a.js"},{"revision":"cc0481a19a722a3e512e19d855cf35a3","url":"assets/js/8a1c45d1.6601321a.js"},{"revision":"7f6cf7995b6a27f3309e501009af3f69","url":"assets/js/8d22f410.9c68d4b3.js"},{"revision":"1f546eba5e7e979bf7ce728c0a587a29","url":"assets/js/8e11eaf8.e1d2ffc1.js"},{"revision":"00ae21f022edd82d8259c0169195f953","url":"assets/js/8ec8555c.a08d8e48.js"},{"revision":"e9af5d1a9ec0b64053141de15172e679","url":"assets/js/8ffdbf67.b020ed39.js"},{"revision":"dfb55e8e2f167fb52fb5a6abf68e24a7","url":"assets/js/9150d950.53386647.js"},{"revision":"aa8e1237b5a335b3e1284a16caf2d847","url":"assets/js/9169002b.0e5a61b5.js"},{"revision":"a1211cf5a6d622fa1e090e4e5ae385e4","url":"assets/js/9226f6dc.f30749c7.js"},{"revision":"c2ce16ec23b13a46e4f5da7307efc804","url":"assets/js/924b993a.8922fc7f.js"},{"revision":"54cd9b28c67c442e4604441ed4388a23","url":"assets/js/93224b68.c69aad3f.js"},{"revision":"1a3a90bd22788e3b414c065f3aa8ab6d","url":"assets/js/935f2afb.e6ae511e.js"},{"revision":"9f405cb1b7cb35ea439c0ba0356225e6","url":"assets/js/947c06a8.fc7af47f.js"},{"revision":"a817fec3367b7ac5a876671091993302","url":"assets/js/94f6e99d.bd8556b9.js"},{"revision":"8393ae78c65399835f6b3ce7f8182fea","url":"assets/js/96b207bc.10d1331c.js"},{"revision":"943eb18a5aed007ea1cdd0703bffb0b0","url":"assets/js/96cc6114.2af3654d.js"},{"revision":"054a551f4a8cdb3b48d87b2cc27758a8","url":"assets/js/9717e045.2632411f.js"},{"revision":"09411cd297e27a13b91ab40d27e47568","url":"assets/js/97633019.630bb56f.js"},{"revision":"fd6b87121b92e3f98bf2104e566fb892","url":"assets/js/9846b930.e376aa57.js"},{"revision":"fa680c78c201662a42415f13f04a5757","url":"assets/js/98ce83f7.254e1966.js"},{"revision":"bfa83b473c7e84f9ea6ae254a4a92485","url":"assets/js/99be78a4.a2c4bac6.js"},{"revision":"b92d37951c3d4573f38cb1f9f5647ece","url":"assets/js/99c84a64.c1383574.js"},{"revision":"faf3c10d4044f229f6f47c7b2801d469","url":"assets/js/99d23504.e3ab0c90.js"},{"revision":"f502855b28171a563f52d6152b1f5fd0","url":"assets/js/9a4187db.ba4208ba.js"},{"revision":"542cf7c300053efb849783d8973c2ed4","url":"assets/js/9a57fc4d.f128743c.js"},{"revision":"a97429c79dcc99a6974415752808a921","url":"assets/js/9c153fbf.137ce857.js"},{"revision":"dd5926a67cdfaf1e608a120b5ddcea4f","url":"assets/js/9e834d3b.81b5adea.js"},{"revision":"6ac28e145660e385eab177f6882b417f","url":"assets/js/9edbfc07.630d1ea8.js"},{"revision":"4118592fb96aac6169827eab5c45f851","url":"assets/js/a1b139e6.9416e92b.js"},{"revision":"cdc363e512d7a25f7b10e5255ba60241","url":"assets/js/a4976c5b.2c9851cf.js"},{"revision":"cf0cc78a17a2affd9cdd116406f4a85d","url":"assets/js/a4f7be8a.62e6a2d6.js"},{"revision":"612906b6de2b6c39591e446dcb301ccd","url":"assets/js/a56e433f.812d60a4.js"},{"revision":"00b6613ba02862b9c85418ebce865885","url":"assets/js/a5750196.18528ba5.js"},{"revision":"7fed2e8d844bb52edd29172327275458","url":"assets/js/a623b5ef.b8189616.js"},{"revision":"91d061fb6cd3813110406582be73063e","url":"assets/js/a6514993.2bd28843.js"},{"revision":"acd8c3bd1596175728232f60cffbeacb","url":"assets/js/a7f3da21.4c345a06.js"},{"revision":"5e4ac45f6fcda79494b787f3d7dbe4c4","url":"assets/js/a900ff2e.6276868c.js"},{"revision":"0fa58bcea36f0389bed3955bfa914e0f","url":"assets/js/a935c7a9.8523643e.js"},{"revision":"d1f2a671278933971ecf029535c905d9","url":"assets/js/a947b58e.669929f7.js"},{"revision":"1a3fa03ada535415fadecbd28e00a05f","url":"assets/js/a98ab587.c944c61a.js"},{"revision":"b09c7589ef0604c53f7dbe3d168e70f6","url":"assets/js/aa5eb267.50ac22fe.js"},{"revision":"bb6954823e84f62c2658fc5adaf5b8b7","url":"assets/js/ab3885d7.d813e793.js"},{"revision":"1c524c551337f62d41f4a04197cecc12","url":"assets/js/ab6e749e.8eb57f22.js"},{"revision":"e2aaa7bdabdc3c02bccc07235b20d19a","url":"assets/js/aba14099.58522b9c.js"},{"revision":"ff3620758f10468935f20a2ff4f99426","url":"assets/js/ad1f3017.b92a6d42.js"},{"revision":"79cf9c4951009abb5fa61a0bffa6b27e","url":"assets/js/adc35084.b027cadd.js"},{"revision":"83c37f37b7ca4afdedb874a266a0de07","url":"assets/js/b1922553.3ed592be.js"},{"revision":"7fab42b9c6666da47e826c3a97274f3c","url":"assets/js/b52ca227.4c681a92.js"},{"revision":"e3987010dad3105594bedef119cf2b6b","url":"assets/js/b538e48b.bdd9c160.js"},{"revision":"467e7518e212214652ffa206329adda8","url":"assets/js/b63b0bf0.cb28f2c6.js"},{"revision":"9cf919a093273ebc899787b010dc21ad","url":"assets/js/b7304a30.60cd39f4.js"},{"revision":"fe33d9062595eb6b840fa1993ee9c8a1","url":"assets/js/b850f0cd.79acf226.js"},{"revision":"7ee68714cb9d3fa842de0d2ea4addcd4","url":"assets/js/ba473e3c.b4e77886.js"},{"revision":"bbf6cecc1dfc8b03eb61b1ae835f5782","url":"assets/js/ba862b2d.2998edc1.js"},{"revision":"ee5ef8f0a6dcf5852fe9709f880b68d0","url":"assets/js/bafae794.5bb6c3bd.js"},{"revision":"71a342df2e5136d35830e201d24b8b49","url":"assets/js/bcaa1a93.26aaf803.js"},{"revision":"0e0b8c71bd0b224bbe67951a4fbbd05c","url":"assets/js/bd4688e3.7f2e5cd7.js"},{"revision":"1048d5dd3c4a0e123de14deea0394ef9","url":"assets/js/bd6d307b.ac09a33d.js"},{"revision":"0a8941acaa1d5317ba33c1e1b1fadb15","url":"assets/js/bddcf50a.099f5978.js"},{"revision":"353322eb11371dcce8fe3cb1867d0844","url":"assets/js/be998fc8.24f32125.js"},{"revision":"a1dc8c03962e28ec50d285d0d49d7e89","url":"assets/js/beb9009d.179d0ec7.js"},{"revision":"c61be535d578d336a13a79b05cc7cab4","url":"assets/js/bfd76e57.f56959da.js"},{"revision":"6f5010ed84353fc5aa9f67c50106e0a2","url":"assets/js/c1787ca8.3420976d.js"},{"revision":"67f3e42d42ae588130b799e23d9ac039","url":"assets/js/c27716d9.3179c2d8.js"},{"revision":"4c8d43887b1387bbbee3e1915d7c29e9","url":"assets/js/c332dd74.c0ceae3b.js"},{"revision":"077fb47ba7a51ce2d3a8dc8e99dc0dd1","url":"assets/js/c6147012.7da9d7c4.js"},{"revision":"d85a2b667983511d1d6ae3fdfe034368","url":"assets/js/c664382c.35da96ef.js"},{"revision":"bd5d69f89b92c41c0ed36a23ab021a2f","url":"assets/js/c6d853a3.ecfccc8f.js"},{"revision":"3ed4fd23666603715ad44409e0435e7d","url":"assets/js/c866fba5.abd3b903.js"},{"revision":"72d729c094387baf8b0d80bb824e1414","url":"assets/js/c873f379.acd4a9c4.js"},{"revision":"b3a21c057128f836a410adabf9e7d087","url":"assets/js/c8fbcedd.8c40ff94.js"},{"revision":"1b8038663759da385ce005941187fc82","url":"assets/js/c921e1c5.e4498adc.js"},{"revision":"5fce636fdf7d6da45b1eec480065cb99","url":"assets/js/c932cba0.38ec4c02.js"},{"revision":"50e5ecfb1b39c2e12848741c150c5962","url":"assets/js/cb1fa44a.f99fb8bc.js"},{"revision":"ede2d0a95e8ef295e6c410aed085e7c0","url":"assets/js/cb364855.fc37ad6b.js"},{"revision":"e71ea2a4ef85d26a9dfe2a84eebba54f","url":"assets/js/cc119bd3.38ca8ba3.js"},{"revision":"73182dffc29d1d25f488760d62874236","url":"assets/js/cd01922d.e934f757.js"},{"revision":"0079288e74b00f84143d54bb37f951dc","url":"assets/js/ceb3afff.57d5d4ca.js"},{"revision":"ae2014fec727f668dc7af5febdfe640a","url":"assets/js/cef081d1.6c660d64.js"},{"revision":"1623ebca024f4103166beb194c595510","url":"assets/js/cf63ef8e.5c41a8ba.js"},{"revision":"507d8700eb59542ef942f48869a85c35","url":"assets/js/d0dc338f.d0ebc813.js"},{"revision":"38cb22cb7f94179e192a021d388c09a2","url":"assets/js/d0f011ad.b0255572.js"},{"revision":"bf73716862469003394c40564ec8a5c4","url":"assets/js/d13e591d.15b555f4.js"},{"revision":"736300665d56d339eb1936deb22609d4","url":"assets/js/d32d6269.f75a1b46.js"},{"revision":"f3e5479ed8dab083d9ab0635b9465ea0","url":"assets/js/d3f7bfd6.404c7591.js"},{"revision":"740ce0494180b02c956dcb3558e60f1e","url":"assets/js/d43c9f93.3673f409.js"},{"revision":"73d8972cb45709fa0dcc6642bf9c2fe4","url":"assets/js/d504ac29.733bd61f.js"},{"revision":"142ab635e22664b468b1298b7aa1ef1e","url":"assets/js/d56ded4a.cc4917eb.js"},{"revision":"6faf03d290a5b51e12673656d5261154","url":"assets/js/d615d254.a138935a.js"},{"revision":"ae08d374ed2edb3060fe728521e5b3dc","url":"assets/js/d8d851c4.981bc3f9.js"},{"revision":"547a50834dda3c457677b2aae2baecbc","url":"assets/js/d9c007a6.a4a42ad8.js"},{"revision":"04394f7635a611f0d7e681aa61db5d3f","url":"assets/js/da764669.b4d03f9c.js"},{"revision":"70e99a302f9acdda3b75df51ad077697","url":"assets/js/dae63fe7.f5d1769e.js"},{"revision":"392f7005a12c080861e7a186b01c3a67","url":"assets/js/dc18e77a.51642db9.js"},{"revision":"52bceb1d5053ff1aab1b0dfb74a38774","url":"assets/js/dc5e43eb.a41f6d39.js"},{"revision":"6e31c8eb68f4db747b014d9b114048ee","url":"assets/js/dd6e99a2.1ed7f518.js"},{"revision":"19306734efb09fc2b6b66c43a6097386","url":"assets/js/de9bd5d8.d6a4cf83.js"},{"revision":"5626d9388d1c5c536a779f0e60aad441","url":"assets/js/def1082f.7ad04fa7.js"},{"revision":"c6203f8a11f3fb46cca99a2953ba616e","url":"assets/js/df7efcc1.94f1ae98.js"},{"revision":"13edd9a0133e297fdfb39ca72f5139bb","url":"assets/js/dff2806d.261e7fe2.js"},{"revision":"f042c890825fc5f804b44b6f83ced508","url":"assets/js/e02ba15b.c6191062.js"},{"revision":"6771eef4f1bc6501b30ad4ebc64df96c","url":"assets/js/e04c764f.e660ade7.js"},{"revision":"fcf1dd8274428562e7cbbe4cda01b198","url":"assets/js/e1511284.ba4e634e.js"},{"revision":"80a1e92c91f5501a4d0b21ad0028561a","url":"assets/js/e2d36ca2.31ccb7e0.js"},{"revision":"e0e5fb0bd73a8d085e10c773a0e3b130","url":"assets/js/e359d859.a6b94952.js"},{"revision":"5c00bdfef8c933e0d360ef87ed753268","url":"assets/js/e484f7f1.62a36d13.js"},{"revision":"8894e4704f0a49d281ce46963a40990b","url":"assets/js/e4fc886a.07112693.js"},{"revision":"c04916260ad83c90978b1f73ba117674","url":"assets/js/e565f349.53cb0d48.js"},{"revision":"22cc9b786fbfd1adc59136a99d0d4529","url":"assets/js/e5e7af3c.18f6984f.js"},{"revision":"75f254fc5b34f5194fc89f656da172c7","url":"assets/js/e60d8fac.6374ae45.js"},{"revision":"e7b06ac88183b289d0fff1de467ba6fd","url":"assets/js/e75dbc73.9b219571.js"},{"revision":"89c237f44bb4534a14fd3a6d221bb8b5","url":"assets/js/e77f4328.aad33fc2.js"},{"revision":"8fc565df4bfe8dfd94be4489d5337644","url":"assets/js/e7e568e4.562a339d.js"},{"revision":"3b426ae07ad2579ed6d56819d0a7b416","url":"assets/js/e8d25167.6222d638.js"},{"revision":"4c9cf811f4e07b338122a8eda658c2e0","url":"assets/js/e983bddd.4bbb0382.js"},{"revision":"7919c3e8cfe5d65bd37e74f94f6df7c2","url":"assets/js/e986d0bf.541aab92.js"},{"revision":"f8579a8ffd35c3876ae5074a3b804b20","url":"assets/js/eb10f950.f724b47f.js"},{"revision":"639481b2493efe00e1940354b5e3099b","url":"assets/js/ec00c35b.09c3a901.js"},{"revision":"c6a74d1a00bce71bb2cb0f571e21f056","url":"assets/js/ec1940fc.dc4075ec.js"},{"revision":"9527ce0a5c93d588f676a801a193665c","url":"assets/js/ec4d7ded.f50f0947.js"},{"revision":"70078a406c769ec68318b8d8646418fe","url":"assets/js/ecaa11c6.5c19b668.js"},{"revision":"5c631351afa6e26ddeba31cc13b6800f","url":"assets/js/ee02910b.8d8a08f4.js"},{"revision":"ea19f0794530bc34c8ee075708e58bd9","url":"assets/js/ee5b964b.c0806191.js"},{"revision":"12a11ff51365af651a20493462639999","url":"assets/js/ef9e84de.9a2b1328.js"},{"revision":"5af6fb28acb92a7def4114d605f7112f","url":"assets/js/f283da07.8e8b8743.js"},{"revision":"15e8a9055b110173e5c4f43134de7867","url":"assets/js/f2e3e8e7.b5149708.js"},{"revision":"24a396bd1f39dd3691f100d380bc5679","url":"assets/js/f36dee5a.dd9319ac.js"},{"revision":"51d9b295fc96a607ee116d7b62256f52","url":"assets/js/f3a8b621.aeec68ca.js"},{"revision":"441d17799373d0b11af81bb610ee320f","url":"assets/js/f64f61d9.c121c5a8.js"},{"revision":"13d5670d3956bcf177ba2cf9800429a7","url":"assets/js/f6b14373.b0044fbb.js"},{"revision":"94b8315c957fd2f838302adaf20271e9","url":"assets/js/f740b2ca.d5ec4806.js"},{"revision":"1177889e64d37fc671149d51ace45606","url":"assets/js/f75a7727.05f3039f.js"},{"revision":"08fb2d6d34a0bf1d90493ccaa796ac67","url":"assets/js/f76c4255.d790bad1.js"},{"revision":"b8d6a214c0ca5f091bc60e5a09f2ae30","url":"assets/js/f7cef55a.5b9c7242.js"},{"revision":"8ffe8cf8fdd4b5d29ac651086be589a5","url":"assets/js/f848540b.51de89f6.js"},{"revision":"fa9792f21edb2ba2f4b23ca0e1a8c084","url":"assets/js/f89fe0d8.ff8ab58f.js"},{"revision":"5969564d2e0b5cfbf1710775bdb70c98","url":"assets/js/f8c23c5d.311a2871.js"},{"revision":"33dfbea111a9b5d459c83871b4dfd2e2","url":"assets/js/f9806908.92868f10.js"},{"revision":"fe53341dad430145c9cc6dd40a42a12c","url":"assets/js/f98ecc36.2849825a.js"},{"revision":"133dbab0be7189d55ab72d7643c14459","url":"assets/js/facb389b.59f8900d.js"},{"revision":"3d144983aa86080d3268f2980f717004","url":"assets/js/fb334fe2.5e11c311.js"},{"revision":"76c401409a5f94afec2d3d314e0b3e62","url":"assets/js/fba67bfa.796463ab.js"},{"revision":"1b7c7687d0e744ecf3ef82930b445972","url":"assets/js/fbe53b78.d7ecff38.js"},{"revision":"c41722dc5228692da8875904b73b8d96","url":"assets/js/fc2062ce.5d0f54c7.js"},{"revision":"537905881ebb1ec9a58148162f23443c","url":"assets/js/fc970c7f.e09a0de3.js"},{"revision":"7117c26121346cb8f4ee94c514f61b67","url":"assets/js/fc9ae7f5.a4d15a9c.js"},{"revision":"22db369fb268853b7878bdbd1e9e7e37","url":"assets/js/fdc7a41e.86bfdd01.js"},{"revision":"1bb6a828dd03c412bbb2e68c782bd92c","url":"assets/js/fe11e29a.25cd7915.js"},{"revision":"25aa56512f21209f85ea77940affc5ab","url":"assets/js/ff1d361f.4b70d0ec.js"},{"revision":"c8dae56b18bee88d06cd448030881f0e","url":"assets/js/ffe0a0fd.379b03a3.js"},{"revision":"daa3792f54b06f0e4b92c20c7c9a1879","url":"assets/js/main.436c06f5.js"},{"revision":"8d69b145cadcf7556d2c937f4eb770a4","url":"assets/js/runtime~main.7190ee48.js"},{"revision":"96dd170a1ac168e03db77da58c213b43","url":"category/-middleware/index.html"},{"revision":"bf2faec17af228454a6bdffd6ade956c","url":"category/api/index.html"},{"revision":"6ec218265aa40f612c81e87665af7faf","url":"category/extra/index.html"},{"revision":"70d3b198dcd78c506a381427da16d24c","url":"category/guide/index.html"},{"revision":"e89287b068ff311efac8e744daca03be","url":"contrib/casbin/index.html"},{"revision":"f526ae478a9906554addf921636de64c","url":"contrib/fiberi18n/index.html"},{"revision":"7872ce09b462893f473eb79fc38e245d","url":"contrib/fibernewrelic/index.html"},{"revision":"50f0325d2f23bb85732fc70a2b6ca197","url":"contrib/fibersentry_v1.x.x/casbin/index.html"},{"revision":"73dbc3846641e105a123cf7c0f737999","url":"contrib/fibersentry_v1.x.x/fiberi18n/index.html"},{"revision":"a061141da750a7ef516447eebce6ad3a","url":"contrib/fibersentry_v1.x.x/fibernewrelic/index.html"},{"revision":"188ebce0d17e628e9e0b513e2f512512","url":"contrib/fibersentry_v1.x.x/fibersentry/index.html"},{"revision":"6566567baed05cba7adbcef4dc022a8e","url":"contrib/fibersentry_v1.x.x/fiberzap/index.html"},{"revision":"84b8ca6882bcf94be117a1c844e9566d","url":"contrib/fibersentry_v1.x.x/fiberzerolog/index.html"},{"revision":"afbe323307317cc3955c855199acba80","url":"contrib/fibersentry_v1.x.x/index.html"},{"revision":"38f5e9b5eb58576729f6ced8870a2a66","url":"contrib/fibersentry_v1.x.x/jwt/index.html"},{"revision":"a62958cf83570e9f8dd2009cf6b22773","url":"contrib/fibersentry_v1.x.x/opafiber/index.html"},{"revision":"06d886721b81abab41bbd6f1c66644a1","url":"contrib/fibersentry_v1.x.x/otelfiber/example/index.html"},{"revision":"9fcc600a2fc11d6e5891a04c6af4a1e1","url":"contrib/fibersentry_v1.x.x/otelfiber/index.html"},{"revision":"e86e2819b97780a964486de451c34de8","url":"contrib/fibersentry_v1.x.x/paseto/index.html"},{"revision":"d57edce212e27b3b70ccb17148ea7453","url":"contrib/fibersentry_v1.x.x/search-index.json"},{"revision":"e1cd77fd3df32f436a421d3bc65982fb","url":"contrib/fibersentry_v1.x.x/swagger/index.html"},{"revision":"d14572b04df85ca9877d75560b0033d5","url":"contrib/fibersentry_v1.x.x/websocket/index.html"},{"revision":"8189465e5bf4a94e31a1803c85f85246","url":"contrib/fibersentry/index.html"},{"revision":"16e1c1758ca1c006d4712033cd41a761","url":"contrib/fiberzap/index.html"},{"revision":"4dfeb0d3b2294f5cb308063b57dc34e7","url":"contrib/fiberzerolog/index.html"},{"revision":"5335a43727f051c6f5b256a9f655b8de","url":"contrib/index.html"},{"revision":"ac9b1803a243d198fa484f2c6492a3ba","url":"contrib/jwt/index.html"},{"revision":"f73e5090d2ca4ecaf993df8cbff8b7ec","url":"contrib/next/casbin/index.html"},{"revision":"0892d669b7a380204e9c9c6f6a57d065","url":"contrib/next/fiberi18n/index.html"},{"revision":"96ee12bf63877f699f56995b89ae0a82","url":"contrib/next/fibernewrelic/index.html"},{"revision":"e4da30ef3f5c64d1c8a17cf2480c610c","url":"contrib/next/fibersentry/index.html"},{"revision":"b3acff11d5770a2e956880636c52743f","url":"contrib/next/fiberzap/index.html"},{"revision":"1752e6d11d237fb587ec5969eb10cbab","url":"contrib/next/fiberzerolog/index.html"},{"revision":"d32e10416013136d459eb2ccb8ba8c37","url":"contrib/next/index.html"},{"revision":"afa3d40ecc89f06359d4988ee5aa4836","url":"contrib/next/jwt/index.html"},{"revision":"60f76e06938967cc55a7e131c2170fd0","url":"contrib/next/opafiber/index.html"},{"revision":"71e4d708e25ae9299c7941dce3ee66fa","url":"contrib/next/otelfiber/example/index.html"},{"revision":"4e5e75a7cdcab8023e3fd8e3e54f72af","url":"contrib/next/otelfiber/index.html"},{"revision":"57be93828745136170a7891f5a88b95f","url":"contrib/next/paseto/index.html"},{"revision":"d8347d0bac8c107247315e9f7b177cf3","url":"contrib/next/search-index.json"},{"revision":"3f7bc4a20c2aa23efe034bc1699f717b","url":"contrib/next/swagger/index.html"},{"revision":"4760f26277003472277ada1c4e37ec7c","url":"contrib/next/websocket/index.html"},{"revision":"c6a7678518a47b15bcaf0512a9155e02","url":"contrib/opafiber/index.html"},{"revision":"c7d7ad963327924bf784fffd87f50a11","url":"contrib/otelfiber/example/index.html"},{"revision":"dc2e2df2e00302bb7cca6b5ea5f0ba0e","url":"contrib/otelfiber/index.html"},{"revision":"0c0ba9edeec3acfa1897c21d9346ed83","url":"contrib/paseto/index.html"},{"revision":"acb1084ee96a78d8e57cb0fae9e6cbc1","url":"contrib/swagger_v1.x.x/casbin/index.html"},{"revision":"9225ff73f939b67494d839056b32fa17","url":"contrib/swagger_v1.x.x/fiberi18n/index.html"},{"revision":"28b40b3c7bee43d3d7faded761aca84f","url":"contrib/swagger_v1.x.x/fibernewrelic/index.html"},{"revision":"23d7454ea3e4977de238f6da02f91f20","url":"contrib/swagger_v1.x.x/fibersentry/index.html"},{"revision":"fe3c823f872eff4d392e40fe84106f62","url":"contrib/swagger_v1.x.x/fiberzap/index.html"},{"revision":"e05bb8ea31f051fd3a8d41237d7e5ba9","url":"contrib/swagger_v1.x.x/fiberzerolog/index.html"},{"revision":"fd60572ea5de1eef98be93fd722b265d","url":"contrib/swagger_v1.x.x/index.html"},{"revision":"cdf194c668a67bb82d563971dc9cd370","url":"contrib/swagger_v1.x.x/jwt/index.html"},{"revision":"48b6fb6f6a4a8ee09700cd58e235e855","url":"contrib/swagger_v1.x.x/opafiber/index.html"},{"revision":"7564654d15e309a9e3a0967247e3eead","url":"contrib/swagger_v1.x.x/otelfiber/example/index.html"},{"revision":"c2cb010106e5c0728c13f09efca83106","url":"contrib/swagger_v1.x.x/otelfiber/index.html"},{"revision":"ce09716edd2279f12dbd3ea584fbcf8c","url":"contrib/swagger_v1.x.x/paseto/index.html"},{"revision":"8ed0065ea58fe2ee3c6c575088775403","url":"contrib/swagger_v1.x.x/search-index.json"},{"revision":"e27536a49009daddb906c05bf98b0b90","url":"contrib/swagger_v1.x.x/swagger/index.html"},{"revision":"def9e7e2620c4efa59845c1638699093","url":"contrib/swagger_v1.x.x/websocket/index.html"},{"revision":"ca1ab4c517c8fd3a95d028ac448479df","url":"contrib/swagger/index.html"},{"revision":"fa1c5272d1f9bf9515b0cf925d423ae8","url":"contrib/websocket/index.html"},{"revision":"b6e1edb92f0995eef46b84dc443d4bf4","url":"ctx/index.html"},{"revision":"fae2568737bffaa73dbe24d172d0da73","url":"extra/benchmarks/index.html"},{"revision":"301616f71fd3e50ab097d22c87cb512c","url":"extra/faq/index.html"},{"revision":"ef880ad44d2ede0cfcb6b26f72037082","url":"guide/error-handling/index.html"},{"revision":"1d4f63bb90a40d3d97147685a66f2fc1","url":"guide/faster-fiber/index.html"},{"revision":"dd7a54f3c8350e0f1c2beb42ce1cf16b","url":"guide/grouping/index.html"},{"revision":"672acc73ec5305a3fd91e26028572956","url":"guide/hooks/index.html"},{"revision":"d085b3ad44f2cf168d12a15f06879d60","url":"guide/routing/index.html"},{"revision":"482680f6f70b271cbfdff32ac8cc1b2e","url":"guide/templates/index.html"},{"revision":"6291705fa603b1f84de9cd6d1c5e44cd","url":"guide/validation/index.html"},{"revision":"15f15bd8f71fbcbc7496331c4bbd4f67","url":"index.html"},{"revision":"f42d1aef9f7789a8723990f4843b6f7a","url":"manifest.json"},{"revision":"d1cb911d10eb0489d5fe15b4f12285d6","url":"next/api/app/index.html"},{"revision":"7d9a4eccce27a92cd286941c216e36fe","url":"next/api/client/index.html"},{"revision":"ff41c14e5848140b7b2488dce042984e","url":"next/api/constants/index.html"},{"revision":"5f017b0baae947b4372cee9edf1c9138","url":"next/api/ctx/index.html"},{"revision":"93c2706bcff58b0b271a5e52ef806068","url":"next/api/fiber/index.html"},{"revision":"eac9649c62bda0a0b2eff0d594a7c4a6","url":"next/api/log/index.html"},{"revision":"f0b8caa64361a7ff79eb9d98c1a6ca8a","url":"next/api/middleware/adaptor/index.html"},{"revision":"74ab6e3a0072406dc9ff443cafbd6c31","url":"next/api/middleware/basicauth/index.html"},{"revision":"dda270dd4b07546b2a143e581b6d724d","url":"next/api/middleware/cache/index.html"},{"revision":"fba5ee37e709c5a97eefe7ee2a9bfa61","url":"next/api/middleware/compress/index.html"},{"revision":"1dfb260001dfb486967be7895e7ab26e","url":"next/api/middleware/cors/index.html"},{"revision":"6602532f8cb01b4910f210abc88f7173","url":"next/api/middleware/csrf/index.html"},{"revision":"9ad5060794e27d0be4d2d687354acd84","url":"next/api/middleware/earlydata/index.html"},{"revision":"287bc261f859f00c28c9bde0926fbdae","url":"next/api/middleware/encryptcookie/index.html"},{"revision":"4fd033ee3711597d585a2f47bc31ae44","url":"next/api/middleware/envvar/index.html"},{"revision":"768c943e5fd99b350425bb7ccc9b3b16","url":"next/api/middleware/etag/index.html"},{"revision":"11264a790eaa51ce23fb81f05b776574","url":"next/api/middleware/expvar/index.html"},{"revision":"1144ac77a07b0b575101e04a686860d0","url":"next/api/middleware/favicon/index.html"},{"revision":"7aa0d03b54a179629e492663456d1454","url":"next/api/middleware/filesystem/index.html"},{"revision":"3d3b7a248dac87e6db9bcf3c4bd935cc","url":"next/api/middleware/helmet/index.html"},{"revision":"49a9f7dd9bf422c5391b2351a9de7d60","url":"next/api/middleware/idempotency/index.html"},{"revision":"b40494e4a4e4932b328bc504a583233e","url":"next/api/middleware/keyauth/index.html"},{"revision":"48fdd97ef9de31e7f839fe66c060e145","url":"next/api/middleware/limiter/index.html"},{"revision":"064056dcedeed9753eba1875cbf6f3c5","url":"next/api/middleware/logger/index.html"},{"revision":"552c12b100cf7a4b71ae7517053164dd","url":"next/api/middleware/monitor/index.html"},{"revision":"9ce9b61fa137d74847cfd42836ee223e","url":"next/api/middleware/pprof/index.html"},{"revision":"09f0112c4cc4059eda81f98d5b5a6daf","url":"next/api/middleware/proxy/index.html"},{"revision":"3fbc55e5edcc8795579620c7811d9830","url":"next/api/middleware/recover/index.html"},{"revision":"6bc5397020cd51ee27a7911387e0dff2","url":"next/api/middleware/redirect/index.html"},{"revision":"d0a32d24ae2fdabb1faac19600fe525e","url":"next/api/middleware/requestid/index.html"},{"revision":"d9d9c543350508d12a87263b8dd9e9f9","url":"next/api/middleware/rewrite/index.html"},{"revision":"be29c5e6da8e5e5fbde17deeb6ad5669","url":"next/api/middleware/session/index.html"},{"revision":"eff7a6ced655637e14278e9dc8f5c0d0","url":"next/api/middleware/skip/index.html"},{"revision":"039171c93218636543a655a0cf4965a0","url":"next/api/middleware/timeout/index.html"},{"revision":"4db759e7e1a3c5b2f0bc1a4d0d0736b4","url":"next/category/-middleware/index.html"},{"revision":"ca1e1b723353f14e134693e05840feaf","url":"next/category/api/index.html"},{"revision":"0ac2e7d4a2fbd4444e1005155e99c545","url":"next/category/extra/index.html"},{"revision":"19baea0c6a858607468dfe302379210e","url":"next/category/guide/index.html"},{"revision":"eb930850e7ee17ebfe18971d0bfd1e34","url":"next/extra/benchmarks/index.html"},{"revision":"ddda83c0de10dfaaec14e04fc8768e4c","url":"next/extra/faq/index.html"},{"revision":"d320312fd26458b86b5f0b7d6bd67d13","url":"next/guide/error-handling/index.html"},{"revision":"b1876df5ba04f65867e97d7a27c779fd","url":"next/guide/faster-fiber/index.html"},{"revision":"ae38da0d1ade39a6726824e1fc073158","url":"next/guide/grouping/index.html"},{"revision":"1e03bb6d36d48b3fd90d41d1ddf16b8a","url":"next/guide/hooks/index.html"},{"revision":"4934a60b244e0f6555cb324e3afc2c8b","url":"next/guide/routing/index.html"},{"revision":"fc363c6b36988bb82e344dfb1a9afcfa","url":"next/guide/templates/index.html"},{"revision":"29fbcf21f5ea93b5bebb75a75235a6cc","url":"next/guide/validation/index.html"},{"revision":"74b807612578f43b12b849ef2ddc9c06","url":"next/index.html"},{"revision":"5ff99c8b1f0f98ec844b94f27aa38083","url":"next/partials/routing/route-handlers/index.html"},{"revision":"8538f53ecc01f3867073f2fe71115d79","url":"next/search-index.json"},{"revision":"3f0e2d46bc810cae674779b08bfb0890","url":"partials/routing/route-handlers/index.html"},{"revision":"356e031ffc88212f8de1807330821393","url":"routing/index.html"},{"revision":"f667dc6a152ac9550b2d501b86011832","url":"search-index.json"},{"revision":"3b31d98f84fb12713b035ba4d3f0a471","url":"search/index.html"},{"revision":"91daedb6a5bbd9793a2a1f88e0a61865","url":"storage/arangodb/index.html"},{"revision":"5ca2e43feb6dbae01bc2987a5e6ae74a","url":"storage/azureblob/index.html"},{"revision":"7b44c8a52e1694aaebb84ffeca1fa14f","url":"storage/badger/index.html"},{"revision":"554d4c220c06dbe76807ed10f7fecf62","url":"storage/bbolt/index.html"},{"revision":"ec72cf2d61b14a2c2142aeb542da7cb7","url":"storage/couchbase/index.html"},{"revision":"5c5541a4061682af81b4a45ceed1df5e","url":"storage/dynamodb/index.html"},{"revision":"cb8324a029da3709a06bbcdcc316b522","url":"storage/etcd_v1.x.x/arangodb/index.html"},{"revision":"a8413014a79f9c1f769b3b4948667e7a","url":"storage/etcd_v1.x.x/azureblob/index.html"},{"revision":"9a4d8aec667727d059f969245bfd1f1d","url":"storage/etcd_v1.x.x/badger/index.html"},{"revision":"ebbdd530306c80295fa1baacfcece380","url":"storage/etcd_v1.x.x/bbolt/index.html"},{"revision":"f9237d27d926e42386bb9dc1eae653d9","url":"storage/etcd_v1.x.x/couchbase/index.html"},{"revision":"282cd140ff2093849752d60b6e4e3694","url":"storage/etcd_v1.x.x/dynamodb/index.html"},{"revision":"5ad8ed1657a8e52fd03039dfc9f176ef","url":"storage/etcd_v1.x.x/etcd/index.html"},{"revision":"b5469bdafeb84ca147bb5f351fbccbcd","url":"storage/etcd_v1.x.x/index.html"},{"revision":"7b121d32cbaffe225e654a4722039b06","url":"storage/etcd_v1.x.x/memcache/index.html"},{"revision":"e39c829d9513b6becbe7e2709faf8682","url":"storage/etcd_v1.x.x/memory/index.html"},{"revision":"ae6caa8b3c06e8cddc51e7b6086ea98d","url":"storage/etcd_v1.x.x/mongodb/index.html"},{"revision":"7219f742f2fafbd01e7ab8cd21fe9eb2","url":"storage/etcd_v1.x.x/mssql/index.html"},{"revision":"f8a42a2990fb1a119e5d3293629e1368","url":"storage/etcd_v1.x.x/mysql/index.html"},{"revision":"cd404e315cf13005c3df8adfa52be0e5","url":"storage/etcd_v1.x.x/pebble/index.html"},{"revision":"13b535777c1cbfad3e5fb84fece3320c","url":"storage/etcd_v1.x.x/postgres/index.html"},{"revision":"d5f7e2bb04b44b934386939e04411e67","url":"storage/etcd_v1.x.x/redis/index.html"},{"revision":"e277a6c25bba9a1edee08d5e2aed4e30","url":"storage/etcd_v1.x.x/ristretto/index.html"},{"revision":"7199c80e4d4de84c74c228c0572bff06","url":"storage/etcd_v1.x.x/s3/index.html"},{"revision":"04f03d5676517b8664745dd004cda8a1","url":"storage/etcd_v1.x.x/search-index.json"},{"revision":"b7ee4e278e0eab338011696986187ac5","url":"storage/etcd_v1.x.x/sqlite3/index.html"},{"revision":"9625aa50e3ccb63331d9eabe2ad019dd","url":"storage/etcd/index.html"},{"revision":"f3b7a1c64223335ee71d76d5be0eda1a","url":"storage/index.html"},{"revision":"e721ace389cc3edee95fbadcd558639a","url":"storage/memcache/index.html"},{"revision":"7d8bf751df297d5a7c11b2e1c6b9ab27","url":"storage/memory/index.html"},{"revision":"1e87721207715be9cd4dddbf334a8474","url":"storage/mongodb/index.html"},{"revision":"cc75bc60bde7ce3603a3aa06db2c7936","url":"storage/mssql/index.html"},{"revision":"22e63e62714f618ed104b9b246a9f17a","url":"storage/mysql_v1.x.x/arangodb/index.html"},{"revision":"cf842c8d92f4f14a8c2659f081c1b113","url":"storage/mysql_v1.x.x/azureblob/index.html"},{"revision":"2c395869deeeda5c7306d1c9f2f52fdd","url":"storage/mysql_v1.x.x/badger/index.html"},{"revision":"3c06d8b9c42173cbe456f0844b877ed2","url":"storage/mysql_v1.x.x/bbolt/index.html"},{"revision":"448d1df1ba885610cfb09cb83b3bf1f4","url":"storage/mysql_v1.x.x/couchbase/index.html"},{"revision":"6756c8a48eba1956964675df4de8c80a","url":"storage/mysql_v1.x.x/dynamodb/index.html"},{"revision":"75ce75420625b74a107cda847f82582d","url":"storage/mysql_v1.x.x/etcd/index.html"},{"revision":"1f8bbdbd983addc58db6fe6767745067","url":"storage/mysql_v1.x.x/index.html"},{"revision":"7e3026c866e476e0f1b92ca5f108bd07","url":"storage/mysql_v1.x.x/memcache/index.html"},{"revision":"81f85f0a90a67848a2128d8a5f0da1af","url":"storage/mysql_v1.x.x/memory/index.html"},{"revision":"054a803d379bc999bc7ed46da5a6b3d0","url":"storage/mysql_v1.x.x/mongodb/index.html"},{"revision":"16118661fd72f5e1db71c90a9c76cbd4","url":"storage/mysql_v1.x.x/mssql/index.html"},{"revision":"27da65acc659ffcf9654639e659a6874","url":"storage/mysql_v1.x.x/mysql/index.html"},{"revision":"868b79e414c88783fbdbe625ce9ed738","url":"storage/mysql_v1.x.x/pebble/index.html"},{"revision":"f7af6b9a1845a71f00bf82679a1b4526","url":"storage/mysql_v1.x.x/postgres/index.html"},{"revision":"ddd03805bc0dc195269e07da08c853d1","url":"storage/mysql_v1.x.x/redis/index.html"},{"revision":"190477b6cc4babd6038ac6abd23e6e24","url":"storage/mysql_v1.x.x/ristretto/index.html"},{"revision":"82b8e4f9f0456dadb9eb28d7de1899f5","url":"storage/mysql_v1.x.x/s3/index.html"},{"revision":"dab11f6e06516353a0f2a794ca40c735","url":"storage/mysql_v1.x.x/search-index.json"},{"revision":"cc3a384cba9be695ccebfed4a8a7bb41","url":"storage/mysql_v1.x.x/sqlite3/index.html"},{"revision":"80ce328bf466e6558d7fead0d61448d6","url":"storage/mysql/index.html"},{"revision":"1ce06141915078f8659b2bb01b4ea666","url":"storage/next/arangodb/index.html"},{"revision":"759130c5ea1fd3b5c324046d7d78bbac","url":"storage/next/azureblob/index.html"},{"revision":"597b4f84ea60de16ab9e734d075b375a","url":"storage/next/badger/index.html"},{"revision":"ae790a475f7c5615d5e725eb8cecbb41","url":"storage/next/bbolt/index.html"},{"revision":"c1593c904f5c967daf197c829eeb6f1e","url":"storage/next/couchbase/index.html"},{"revision":"b062f17ec2dd9b4eacfb9b89e4195a35","url":"storage/next/dynamodb/index.html"},{"revision":"fcb45bf5c2486fbb308980bebdfd98e3","url":"storage/next/etcd/index.html"},{"revision":"1eca2587f3175a1105124a7a45dfe202","url":"storage/next/index.html"},{"revision":"2775f4f4ccf9fa992cd9c4b763a8032b","url":"storage/next/memcache/index.html"},{"revision":"3bf5e307bcbeab84a0fbe0c3d315dbb4","url":"storage/next/memory/index.html"},{"revision":"a96d1bc2268f615160c2464fd0d23af9","url":"storage/next/mongodb/index.html"},{"revision":"77513d5fbfc363e1caf186fe1e7a8a99","url":"storage/next/mssql/index.html"},{"revision":"316ae17e06656acb643ae470d9be7269","url":"storage/next/mysql/index.html"},{"revision":"18c84db8d24a22af57b50c11bab7e176","url":"storage/next/pebble/index.html"},{"revision":"57b6fdb426e1377c9a58a4b0f72eba5c","url":"storage/next/postgres/index.html"},{"revision":"c299729fd9caaea68e7782585fc9a1af","url":"storage/next/redis/index.html"},{"revision":"877ce0ed8d6d9201b308abca917e4b0a","url":"storage/next/ristretto/index.html"},{"revision":"9b35f6a8dc7845f664de5b00a059c1c9","url":"storage/next/s3/index.html"},{"revision":"f4c7224781a470377b9644b95451b7dc","url":"storage/next/search-index.json"},{"revision":"2452e720ecff72a030a04a59c6aa5a89","url":"storage/next/sqlite3/index.html"},{"revision":"9cf4dc165733ad914840baa8775f349b","url":"storage/pebble/index.html"},{"revision":"9b0beba5d3193e1bda91c6c395bed569","url":"storage/postgres/index.html"},{"revision":"987dd57305d83db49a1815233ddc6078","url":"storage/redis/index.html"},{"revision":"e8fc8f8714912c8e9e20f33fd0c89473","url":"storage/ristretto_v1.x.x/arangodb/index.html"},{"revision":"2a725da6280e704ec70724ba300d10a4","url":"storage/ristretto_v1.x.x/azureblob/index.html"},{"revision":"9b471612b16fe7c3a2b5fd09f9db1d12","url":"storage/ristretto_v1.x.x/badger/index.html"},{"revision":"8a9f95abbf4818c80c321f3e3a011ce1","url":"storage/ristretto_v1.x.x/bbolt/index.html"},{"revision":"d05e9a4c3b0bb100cebff943885f5c5f","url":"storage/ristretto_v1.x.x/couchbase/index.html"},{"revision":"bba09e1765aa6fcf19a35f217d153c20","url":"storage/ristretto_v1.x.x/dynamodb/index.html"},{"revision":"69dcf80bd27a615ba7a57e4db40a5fb1","url":"storage/ristretto_v1.x.x/etcd/index.html"},{"revision":"9c3886ffbd83854f401d176160d40eaf","url":"storage/ristretto_v1.x.x/index.html"},{"revision":"521af9ac520e95b6190c472f19451c03","url":"storage/ristretto_v1.x.x/memcache/index.html"},{"revision":"5c902ba9a8a881d6068d83dc4fbf3bdc","url":"storage/ristretto_v1.x.x/memory/index.html"},{"revision":"c7644d4a653a766ea1e0038e4123baf5","url":"storage/ristretto_v1.x.x/mongodb/index.html"},{"revision":"a4c3b8a1b22460a1d92d294262ef4756","url":"storage/ristretto_v1.x.x/mssql/index.html"},{"revision":"769a9686f4a0f1a80e85b3876f3d2d0a","url":"storage/ristretto_v1.x.x/mysql/index.html"},{"revision":"d71eed36f8dcf49cecee12ffa6502c76","url":"storage/ristretto_v1.x.x/pebble/index.html"},{"revision":"e41c38c3c3112b8cda7f0196a7cd6a05","url":"storage/ristretto_v1.x.x/postgres/index.html"},{"revision":"695ac76209a9af14f62d9efa60624aee","url":"storage/ristretto_v1.x.x/redis/index.html"},{"revision":"d43d834d9b9530b8ff94ce3f49313e41","url":"storage/ristretto_v1.x.x/ristretto/index.html"},{"revision":"83a5b5e0dbc6ce0441214f72a2c974ae","url":"storage/ristretto_v1.x.x/s3/index.html"},{"revision":"902d8c91081e8426aa9d1a04e060bcf4","url":"storage/ristretto_v1.x.x/search-index.json"},{"revision":"963409a629d804f6052b9fc97ff4a76c","url":"storage/ristretto_v1.x.x/sqlite3/index.html"},{"revision":"151e9a631c122f51053bd1bd030ff495","url":"storage/ristretto/index.html"},{"revision":"e75d92c07513fa9d9f4b015702fc61c1","url":"storage/s3/index.html"},{"revision":"d28e92127742c5e227c4fdb7fea484df","url":"storage/sqlite3_v1.x.x/arangodb/index.html"},{"revision":"fb1a0fe7da30305e4defc30ba4506542","url":"storage/sqlite3_v1.x.x/azureblob/index.html"},{"revision":"df5e976971df54f7ea9f31084e15dc2f","url":"storage/sqlite3_v1.x.x/badger/index.html"},{"revision":"25a6935d0202e54a862f4bd60d923054","url":"storage/sqlite3_v1.x.x/bbolt/index.html"},{"revision":"4d6c92bae27253033989adec548413d3","url":"storage/sqlite3_v1.x.x/couchbase/index.html"},{"revision":"4f994cce15ca8b90a4bc5bb37ce3df59","url":"storage/sqlite3_v1.x.x/dynamodb/index.html"},{"revision":"8b37b575fd9e710da49561dcdf39afd4","url":"storage/sqlite3_v1.x.x/etcd/index.html"},{"revision":"dd0c5243bf3512dba620b2af5275c072","url":"storage/sqlite3_v1.x.x/index.html"},{"revision":"6efc59f72210a721a8aec99e3bbf1280","url":"storage/sqlite3_v1.x.x/memcache/index.html"},{"revision":"a3c00beffadbaf593fbdf255bafc1ad2","url":"storage/sqlite3_v1.x.x/memory/index.html"},{"revision":"f83654f37885a96c752908c3c9373435","url":"storage/sqlite3_v1.x.x/mongodb/index.html"},{"revision":"5f5580e587f418afc14531e1660fccd6","url":"storage/sqlite3_v1.x.x/mssql/index.html"},{"revision":"324f918e0340a147396835a22acc1099","url":"storage/sqlite3_v1.x.x/mysql/index.html"},{"revision":"e3715f2af0360d387137b5f0b9d40e4d","url":"storage/sqlite3_v1.x.x/pebble/index.html"},{"revision":"4d9794fba5804502a58d38e36028d08d","url":"storage/sqlite3_v1.x.x/postgres/index.html"},{"revision":"cf6c8116268f0ad737d2ad690c947e54","url":"storage/sqlite3_v1.x.x/redis/index.html"},{"revision":"9edc5582c99869e94a199e35c4fffaaa","url":"storage/sqlite3_v1.x.x/ristretto/index.html"},{"revision":"73d9c8f1c1abbcfc97e4ee7a01fce16a","url":"storage/sqlite3_v1.x.x/s3/index.html"},{"revision":"794ce528635b47c818c9cd6d7efcb2c2","url":"storage/sqlite3_v1.x.x/search-index.json"},{"revision":"388ec4d2869fe86ab1cb9d3ec547ad5c","url":"storage/sqlite3_v1.x.x/sqlite3/index.html"},{"revision":"0f2c7ca3edd992dfbc5dc89388595aea","url":"storage/sqlite3/index.html"},{"revision":"83f820d8746c7f5d9d697ccb3c361091","url":"template/ace/index.html"},{"revision":"44981f246688a76111de63e701135b46","url":"template/amber/index.html"},{"revision":"6eb0b2cedd0c4fb4d156f0956dfdd272","url":"template/django/index.html"},{"revision":"5cda1474ffbe2e20cb836e398c3f88d2","url":"template/handlebars/index.html"},{"revision":"cc7072598e7f14b682fcdadbc6d65bb9","url":"template/html/index.html"},{"revision":"ce510f3868b910079f9ba5d87f660dc5","url":"template/html/TEMPLATES_CHEATSHEET/index.html"},{"revision":"65709b1562001a99cbf4b7de124d3f01","url":"template/index.html"},{"revision":"c5c5f653eb8c156cafd46d7fbda0bfe4","url":"template/jet/index.html"},{"revision":"0cf7baf6d796eb4c243c77eae9245490","url":"template/mustache/index.html"},{"revision":"418c8cd231289798ebc512990e643c79","url":"template/next/ace/index.html"},{"revision":"7dcfab01cea68f758a60f8fc1f369d23","url":"template/next/amber/index.html"},{"revision":"37bde8952f88b32d62e9fd22d465631e","url":"template/next/django/index.html"},{"revision":"591c859fbf3b886df39166b7488c65cd","url":"template/next/handlebars/index.html"},{"revision":"04e79b72af285699a4052b89e034a18c","url":"template/next/html/index.html"},{"revision":"2f0db15fd613d7c0d0bcf969b151ffeb","url":"template/next/html/TEMPLATES_CHEATSHEET/index.html"},{"revision":"523715a85db17667370e232de35d1c6d","url":"template/next/index.html"},{"revision":"8d2da9bbee844e8d2c34443e35449d04","url":"template/next/jet/index.html"},{"revision":"0d920c5341a1419101c7751b977e8bf8","url":"template/next/mustache/index.html"},{"revision":"cdc008d2a090db24c13fe70384946aa9","url":"template/next/pug/index.html"},{"revision":"c7bec98015aab38ec2ebc168deec3cd6","url":"template/next/search-index.json"},{"revision":"404d3669cfc640c406ef5ae74c04695b","url":"template/next/slim/index.html"},{"revision":"3182942dc515e6ab44bc41a70e429994","url":"template/pug/index.html"},{"revision":"cf1e858bf85fb2895637e2f5734ee140","url":"template/slim/index.html"},{"revision":"8084f2f83a2f477735ed11e2bf0e8213","url":"v/1.x/api/app/index.html"},{"revision":"08b749d0b0d95853310eb8d8cb6106d8","url":"v/1.x/api/ctx/index.html"},{"revision":"b785b5746370eebb99f2ee0869bd7c1a","url":"v/1.x/api/middleware/index.html"},{"revision":"ea032e7aa0080b3a208b1f36dd4b3e42","url":"v/1.x/category/api/index.html"},{"revision":"05f4a343184e6860b0ff5ee3d300a985","url":"v/1.x/category/guide/index.html"},{"revision":"43020c9060b711302b75140744628b1b","url":"v/1.x/category/misc/index.html"},{"revision":"6ed7cc0b075f329589b4401d334837af","url":"v/1.x/guide/error-handling/index.html"},{"revision":"36bb8767aaf25e55f7243dfbce1f06d1","url":"v/1.x/guide/grouping/index.html"},{"revision":"270595eab09ebe6d8ea33a90976c9797","url":"v/1.x/guide/routing/index.html"},{"revision":"46f9f665213c2a17baa88d4fb42bad58","url":"v/1.x/guide/templates/index.html"},{"revision":"a87db992f4d13bf4aa792129f43a42d9","url":"v/1.x/guide/validating/index.html"},{"revision":"4d5bf161ff11ab65805a05e165db85c0","url":"v/1.x/index.html"},{"revision":"060cd4ea1beb6b3a8224a6e8b6692d10","url":"v/1.x/misc/benchmarks/index.html"},{"revision":"27fe56b7b2ab21f8d3e02c0e09958cef","url":"v/1.x/misc/faq/index.html"},{"revision":"92b29f4fbd9193f5b8bf5dc977095b22","url":"v1.x/api/app/index.html"},{"revision":"995a20db122461be0d72b58c08119edd","url":"v1.x/api/ctx/index.html"},{"revision":"5e73b5616c79bf0249de04b1b78b4637","url":"v1.x/api/middleware/index.html"},{"revision":"8f6ebfe6274f7971d7a8e58d2390d4e9","url":"v1.x/category/api/index.html"},{"revision":"08d34101966611cd55eaec9cdb11c13b","url":"v1.x/category/guide/index.html"},{"revision":"c5e0b2d4921d6a0e81fb394a994fd2f8","url":"v1.x/category/misc/index.html"},{"revision":"d81bd68207f2393b3f176dddff85401c","url":"v1.x/guide/error-handling/index.html"},{"revision":"6b237c44b7043bb74ac46d38d944c42e","url":"v1.x/guide/grouping/index.html"},{"revision":"49a761ad4556165a4eb2885b84025042","url":"v1.x/guide/routing/index.html"},{"revision":"9d43dca5a1bf717da79b2aa82ac38d47","url":"v1.x/guide/templates/index.html"},{"revision":"06a342faa93a909e499a4c8eb2de04f0","url":"v1.x/guide/validating/index.html"},{"revision":"d96afb9bafa5940d3752f44cdc1d0ddb","url":"v1.x/index.html"},{"revision":"1ddfa2130afc90cc05627c011bf36bb1","url":"v1.x/misc/benchmarks/index.html"},{"revision":"29a7cd14aea431c77f54f4ac5c03489a","url":"v1.x/misc/faq/index.html"},{"revision":"847c2ed865fdde0d21b6b11011104a43","url":"v1.x/search-index.json"},{"revision":"a2d0b99576a1a51f46d2ee84ec167336","url":"assets/images/benchmark_alloc-dec96faa96e07bcec84f40a4dfc8d187.png"},{"revision":"a7a3e37e6499fcf3fa9d793fd24339b9","url":"assets/images/benchmark_latency-b67a470cf1b261c3092b80cbf42ef16b.png"},{"revision":"c5b05974efbe649f1fe9fcbf15a8ff82","url":"assets/images/benchmark-18e23fcf42afc7f5e12ea23aceb27885.png"},{"revision":"2cdc5220f6027f0106431ed9756ef0ff","url":"assets/images/benchmark-pipeline-b49cbb1db36293acdfb0e6c96d844e1a.png"},{"revision":"1276aea996275055bfbb406a62170931","url":"assets/images/concurrency_alloc-6f2d485576803f7de2fe0a1deca21a09.png"},{"revision":"56065bebf88e6d317d32fa056044ab49","url":"assets/images/concurrency_latency-5a223848a8bee8df21cc02451f0db2b6.png"},{"revision":"c16f8be0910b1d55e73abb3cf14fcc81","url":"assets/images/concurrency-1307e1d23c01a561a4b2a0f5bdd7e1bc.png"},{"revision":"52e02024a0fc9efdeb174fbd2cb5eaa8","url":"assets/images/concurrency-pipeline-b0d3c211d9c7cb5474fd191223a41241.png"},{"revision":"f8a5f57ca71eb1e0f38e676552ba8a0b","url":"assets/images/data_updates_express-2f55d1b0975ec391d29d823b48faf617.png"},{"revision":"ef41ee04899eb8d1a4a34acb4d7fc20a","url":"assets/images/data_updates-3be85c418d6971091854c5086af9ed10.png"},{"revision":"716cadd67372190364a5f07efbb477c2","url":"assets/images/graph-afbd400b1c3e1c6f137dae3cfc1890ce.svg"},{"revision":"7a707deb897d8b72d098d0ee46d3b44d","url":"assets/images/json_express-aa631b2de86808970aa4bb7c9c9d3edf.png"},{"revision":"0b57d54569e518d2112a0a515042ea63","url":"assets/images/json-62868f61b34e3790f3a8b3b52b1a3a3b.png"},{"revision":"316f574189fa0067fb53b53d020b193a","url":"assets/images/multiple_queries_express-ec4dc8013e85dc2a2fa4f5eeb55ce8dd.png"},{"revision":"b3beb07717c41c5e0f7561ae6c479fbf","url":"assets/images/multiple_queries-2c2e81674208b90b9aeb1cb791a3f0dc.png"},{"revision":"480e9b557cc822c532a998a2ed724bfc","url":"assets/images/plaintext_express-ef6522843412bb5b14b3c6b6a4f032de.png"},{"revision":"45bd9af55fba9dc062200831ac57c5e6","url":"assets/images/plaintext-e25d187f782d18fdd35b84e3d7c625eb.png"},{"revision":"5b4ee8112e04d79df5a0aa39acca791b","url":"assets/images/single_query_express-d8e41422b4f5c0a9496272e4a66a97c4.png"},{"revision":"8a5d82762f28eca9a722e75f3f12cff8","url":"assets/images/single_query-4f7782d3c3ff91e92ac27e382b09f6ac.png"},{"revision":"79a9ef885732dee2637157a4762faf7e","url":"assets/images/support-discord-baf5f38231088813dfbc3ccdc6966634.png"},{"revision":"a2d0b99576a1a51f46d2ee84ec167336","url":"img/benchmark_alloc.png"},{"revision":"a7a3e37e6499fcf3fa9d793fd24339b9","url":"img/benchmark_latency.png"},{"revision":"2cdc5220f6027f0106431ed9756ef0ff","url":"img/benchmark-pipeline.png"},{"revision":"c5b05974efbe649f1fe9fcbf15a8ff82","url":"img/benchmark.png"},{"revision":"1276aea996275055bfbb406a62170931","url":"img/concurrency_alloc.png"},{"revision":"56065bebf88e6d317d32fa056044ab49","url":"img/concurrency_latency.png"},{"revision":"52e02024a0fc9efdeb174fbd2cb5eaa8","url":"img/concurrency-pipeline.png"},{"revision":"c16f8be0910b1d55e73abb3cf14fcc81","url":"img/concurrency.png"},{"revision":"f8a5f57ca71eb1e0f38e676552ba8a0b","url":"img/data_updates_express.png"},{"revision":"ef41ee04899eb8d1a4a34acb4d7fc20a","url":"img/data_updates.png"},{"revision":"3b4420315b7baefee56d433e4c78f268","url":"img/favicon.png"},{"revision":"716cadd67372190364a5f07efbb477c2","url":"img/graph.svg"},{"revision":"354ea4a4bcaad920949e253d33683869","url":"img/icons/icon-192x192.png"},{"revision":"4039790fa05a5dc7e9259485b4324433","url":"img/icons/icon-256x256.png"},{"revision":"93b99bdaaad38831b46a296dfeab4863","url":"img/icons/icon-384x384.png"},{"revision":"096c82692efe3ec986ab2b4fc5d60aea","url":"img/icons/icon-512x512.png"},{"revision":"7a707deb897d8b72d098d0ee46d3b44d","url":"img/json_express.png"},{"revision":"0b57d54569e518d2112a0a515042ea63","url":"img/json.png"},{"revision":"171b53337ba05d4e62332e230f3c212b","url":"img/logo-dark.svg"},{"revision":"e2c2dc9b6b5f44183247f7c48d65ccef","url":"img/logo.svg"},{"revision":"316f574189fa0067fb53b53d020b193a","url":"img/multiple_queries_express.png"},{"revision":"b3beb07717c41c5e0f7561ae6c479fbf","url":"img/multiple_queries.png"},{"revision":"480e9b557cc822c532a998a2ed724bfc","url":"img/plaintext_express.png"},{"revision":"45bd9af55fba9dc062200831ac57c5e6","url":"img/plaintext.png"},{"revision":"5b4ee8112e04d79df5a0aa39acca791b","url":"img/single_query_express.png"},{"revision":"8a5d82762f28eca9a722e75f3f12cff8","url":"img/single_query.png"},{"revision":"79a9ef885732dee2637157a4762faf7e","url":"img/support-discord.png"}],s=new R({fallbackToNetwork:!0});e.offlineMode&&(s.addToCacheList(t),e.debug&&console.log("[Docusaurus-PWA][SW]: addToCacheList",{precacheManifest:t})),await async function(e){}(),self.addEventListener("install",(t=>{e.debug&&console.log("[Docusaurus-PWA][SW]: install event",{event:t}),t.waitUntil(s.install(t))})),self.addEventListener("activate",(t=>{e.debug&&console.log("[Docusaurus-PWA][SW]: activate event",{event:t}),t.waitUntil(s.activate(t))})),self.addEventListener("fetch",(async t=>{if(e.offlineMode){const a=t.request.url,n=function(e){const t=new URL(e,self.location.href);return t.origin!==self.location.origin?[]:(t.search="",t.hash="",[t.href,`${t.href}${t.pathname.endsWith("/")?"":"/"}index.html`])}(a);for(const i of n){const r=s.getCacheKeyForURL(i);if(r){const s=caches.match(r);e.debug&&console.log("[Docusaurus-PWA][SW]: serving cached asset",{requestURL:a,possibleURL:i,possibleURLs:n,cacheKey:r,cachedResponse:s}),t.respondWith(s);break}}}})),self.addEventListener("message",(async t=>{e.debug&&console.log("[Docusaurus-PWA][SW]: message event",{event:t});const s=t.data?.type;"SKIP_WAITING"===s&&self.skipWaiting()}))})()})()})(); \ No newline at end of file +(()=>{"use strict";var e={913:()=>{try{self["workbox:core:6.5.3"]&&_()}catch(e){}},977:()=>{try{self["workbox:precaching:6.5.3"]&&_()}catch(e){}},80:()=>{try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},873:()=>{try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function s(a){var n=t[a];if(void 0!==n)return n.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,s),i.exports}(()=>{s(913);const e=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},n=e=>[a.prefix,e,a.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||n(a.precache),r=e=>e||n(a.runtime);function c(e,t){const s=t();return e.waitUntil(s),s}s(977);const o="__WB_REVISION__";function h(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"==typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:a}=e;if(!a)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(a,location.href);return{cacheKey:e.href,url:e.href}}const n=new URL(a,location.href),i=new URL(a,location.href);return n.searchParams.set(o,s),{cacheKey:n.href,url:i.href}}class l{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class u{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null==t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}let f;async function d(e,s){let a=null;if(e.url){a=new URL(e.url).origin}if(a!==self.location.origin)throw new t("cross-origin-copy-response",{origin:a});const n=e.clone(),i={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=s?s(i):i,c=function(){if(void 0===f){const e=new Response("");if("body"in e)try{new Response(e.body),f=!0}catch(e){f=!1}f=!1}return f}()?n.body:await n.blob();return new Response(c,r)}function p(e,t){const s=new URL(e);for(const e of t)s.searchParams.delete(e);return s.href}class g{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const y=new Set;s(873);function w(e){return"string"==typeof e?new Request(e):e}class _{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new g,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const e of this._plugins)this._pluginStateMap.set(e,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let a=w(e);if("navigate"===a.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?a.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))a=await e({request:a.clone(),event:s})}catch(e){if(e instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:e.message})}const i=a.clone();try{let e;e=await fetch(a,"navigate"===a.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:i,response:e});return e}catch(e){throw n&&await this.runCallbacks("fetchDidFail",{error:e,event:s,originalRequest:n.clone(),request:i.clone()}),e}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=w(e);let s;const{cacheName:a,matchOptions:n}=this._strategy,i=await this.getCacheKey(t,"read"),r=Object.assign(Object.assign({},n),{cacheName:a});s=await caches.match(i,r);for(const e of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await e({cacheName:a,matchOptions:n,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(e,s){const a=w(e);var n;await(n=0,new Promise((e=>setTimeout(e,n))));const i=await this.getCacheKey(a,"write");if(!s)throw new t("cache-put-with-no-response",{url:(r=i.url,new URL(String(r),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var r;const c=await this._ensureResponseSafeToCache(s);if(!c)return!1;const{cacheName:o,matchOptions:h}=this._strategy,l=await self.caches.open(o),u=this.hasCallback("cacheDidUpdate"),f=u?await async function(e,t,s,a){const n=p(t.url,s);if(t.url===n)return e.match(t,a);const i=Object.assign(Object.assign({},a),{ignoreSearch:!0}),r=await e.keys(t,i);for(const t of r)if(n===p(t.url,s))return e.match(t,a)}(l,i.clone(),["__WB_REVISION__"],h):null;try{await l.put(i,u?c.clone():c)}catch(e){if(e instanceof Error)throw"QuotaExceededError"===e.name&&await async function(){for(const e of y)await e()}(),e}for(const e of this.iterateCallbacks("cacheDidUpdate"))await e({cacheName:o,oldResponse:f,newResponse:c.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let a=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))a=w(await e({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[s]=a}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"==typeof t[e]){const s=this._pluginStateMap.get(t),a=a=>{const n=Object.assign(Object.assign({},a),{state:s});return t[e](n)};yield a}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const e of this.iterateCallbacks("cacheWillUpdate"))if(t=await e({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class v{constructor(e={}){this.cacheName=r(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"==typeof e.request?new Request(e.request):e.request,a="params"in e?e.params:void 0,n=new _(this,{event:t,request:s,params:a}),i=this._getResponse(n,s,t);return[i,this._awaitComplete(i,n,s,t)]}async _getResponse(e,s,a){let n;await e.runCallbacks("handlerWillStart",{event:a,request:s});try{if(n=await this._handle(s,e),!n||"error"===n.type)throw new t("no-response",{url:s.url})}catch(t){if(t instanceof Error)for(const i of e.iterateCallbacks("handlerDidError"))if(n=await i({error:t,event:a,request:s}),n)break;if(!n)throw t}for(const t of e.iterateCallbacks("handlerWillRespond"))n=await t({event:a,request:s,response:n});return n}async _awaitComplete(e,t,s,a){let n,i;try{n=await e}catch(i){}try{await t.runCallbacks("handlerDidRespond",{event:a,request:s,response:n}),await t.doneWaiting()}catch(e){e instanceof Error&&(i=e)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:s,response:n,error:i}),t.destroy(),i)throw i}}class m extends v{constructor(e={}){e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(m.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let a;const n=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=n.integrity,i=e.integrity,r=!i||i===t;if(a=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?i||t:void 0})),t&&r&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await s.cachePut(e,a.clone());0}}return a}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const a=await s.fetch(e);if(!await s.cachePut(e,a.clone()))throw new t("bad-precaching-response",{url:e.url,status:a.status});return a}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,a]of this.plugins.entries())a!==m.copyRedirectedCacheableResponsesPlugin&&(a===m.defaultPrecacheCacheabilityPlugin&&(e=s),a.cacheWillUpdate&&t++);0===t?this.plugins.push(m.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}m.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},m.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await d(e):e};class R{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new m({cacheName:i(e),plugins:[...t,new u({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const a of e){"string"==typeof a?s.push(a):a&&void 0===a.revision&&s.push(a.url);const{cacheKey:e,url:n}=h(a),i="string"!=typeof a&&a.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:e});if("string"!=typeof a&&a.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==a.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(e,a.integrity)}if(this._urlsToCacheKeys.set(n,e),this._urlsToCacheModes.set(n,i),s.length>0){const e=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return c(e,(async()=>{const t=new l;this.strategy.plugins.push(t);for(const[t,s]of this._urlsToCacheKeys){const a=this._cacheKeysToIntegrities.get(s),n=this._urlsToCacheModes.get(t),i=new Request(t,{integrity:a,cache:n,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:i,event:e}))}const{updatedURLs:s,notUpdatedURLs:a}=t;return{updatedURLs:s,notUpdatedURLs:a}}))}activate(e){return c(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),a=[];for(const n of t)s.has(n.url)||(await e.delete(n),a.push(n.url));return{deletedURLs:a}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}s(80);(async()=>{const e=function(){const e=JSON.parse(new URLSearchParams(self.location.search).get("params"));return e.debug&&console.log("[Docusaurus-PWA][SW]: Service Worker params:",e),e}(),t=[{"revision":"7ecc36bd42522fd342085adf2802c97e","url":"-middleware/index.html"},{"revision":"2251c4239dba92fcd8f2ea5daeb61f83","url":"404.html"},{"revision":"79130120dcfe9c060ded3bc095e32e99","url":"api/app/index.html"},{"revision":"07d3f6c4ae92de645df93535bf5b4c1a","url":"api/client/index.html"},{"revision":"820149ac59766c3c617621ce7a4951df","url":"api/constants/index.html"},{"revision":"3a3e6b7390becf60606aba1606353255","url":"api/ctx/index.html"},{"revision":"71d6e50dc12705318ee5e61dbd08b246","url":"api/fiber/index.html"},{"revision":"c2d1cbbb423b1f954f645d38b7d3b576","url":"api/middleware/adaptor/index.html"},{"revision":"114d90741f04485183d13c8a4f643b3e","url":"api/middleware/basicauth/index.html"},{"revision":"294536c45e352350d8d8790dd713a6c8","url":"api/middleware/cache/index.html"},{"revision":"ae193aaded5cd7620aeb6f54c2abdcf3","url":"api/middleware/compress/index.html"},{"revision":"d2bf4c9f32afdd4bb51b6495be7b3bdc","url":"api/middleware/cors/index.html"},{"revision":"358b4b420fb39fb990e5888a95b5cd38","url":"api/middleware/csrf/index.html"},{"revision":"c556bbee29cc7caf9140c68abb64ef42","url":"api/middleware/earlydata/index.html"},{"revision":"a684b3cf06a424e15a29d75f08bdf4da","url":"api/middleware/encryptcookie/index.html"},{"revision":"f5aa7e10f60c41967571604acee731a2","url":"api/middleware/envvar/index.html"},{"revision":"a77cbd9f6362567f205127110f5cfe3c","url":"api/middleware/etag/index.html"},{"revision":"c9e6f7d5830b39ec4d78ef37e5219dd9","url":"api/middleware/expvar/index.html"},{"revision":"49b2b03e917972246303ed7a7e3c1e81","url":"api/middleware/favicon/index.html"},{"revision":"f3b41e470aa1d2ad10d95279820e9523","url":"api/middleware/filesystem/index.html"},{"revision":"2acd5734447f4ae201918887ebe04894","url":"api/middleware/helmet/index.html"},{"revision":"c23a178a9625806cdb5cc97637a15ea4","url":"api/middleware/idempotency/index.html"},{"revision":"0a7b9fc1262ea5ee4f8595586e76a761","url":"api/middleware/keyauth/index.html"},{"revision":"59b9260f87e33b96296dcd0cdc0bf3aa","url":"api/middleware/limiter/index.html"},{"revision":"1d0c2486cf11a7d5dabc2c45798e8645","url":"api/middleware/logger/index.html"},{"revision":"6f098499a5e1b871db1a1cf57e4316c1","url":"api/middleware/monitor/index.html"},{"revision":"ecfe75bad8229d5828c8c0ce5043d315","url":"api/middleware/pprof/index.html"},{"revision":"440c8df86dcb4c14775b499ca8a89a19","url":"api/middleware/proxy/index.html"},{"revision":"a2517bc549f9ac9d0d892b3ccd17c6c0","url":"api/middleware/recover/index.html"},{"revision":"7cba9a3fafe69813c8d77014f132cba9","url":"api/middleware/redirect/index.html"},{"revision":"6af2190d896275eeabb9151dde3b58a7","url":"api/middleware/requestid/index.html"},{"revision":"b2d42cc0593c8b294d03bbac483da7e6","url":"api/middleware/rewrite/index.html"},{"revision":"8eb0a1dc07a56823a3e1b54d9ed24423","url":"api/middleware/session/index.html"},{"revision":"6190873e26d8538701929e6d9c996a30","url":"api/middleware/skip/index.html"},{"revision":"2a5654e4fa7a4ae96d32f4ebabc3da7e","url":"api/middleware/timeout/index.html"},{"revision":"77b52446446c10575dfdd0da09869d5a","url":"assets/css/styles.28db50a2.css"},{"revision":"2f6e404baaec24b01c915463de91d763","url":"assets/js/044897a3.149dbfe7.js"},{"revision":"be63810165ad2d4c299b263f562d24c0","url":"assets/js/0451c1a5.9c9e7dd0.js"},{"revision":"afc8adb3c70c36da4d75714da8c8e214","url":"assets/js/04b03e77.61376a74.js"},{"revision":"2c573d5f2a5f2b8ed20f40c97cde32af","url":"assets/js/04ddcfba.1f2423a8.js"},{"revision":"63beeb651c82afc5de43d9a7a7979a4d","url":"assets/js/054c93da.c5e1362c.js"},{"revision":"f9cac4e407a3ded66ba861bdc0a58c2d","url":"assets/js/05a04cc8.38675c90.js"},{"revision":"09aa8edccc3ef44e432d18e7fdfc58a6","url":"assets/js/06122e25.a5d58f8d.js"},{"revision":"708d833dbdbcf77201bb1735852a9a18","url":"assets/js/068d482b.1438be64.js"},{"revision":"42ec5ff91a2a98d7082d4bf431ffaf4c","url":"assets/js/069c048f.9294eb92.js"},{"revision":"6d982efe0f98d99aa6956896869d2a16","url":"assets/js/072282c6.e8e9de8e.js"},{"revision":"7bfbffd0afbba7d90f928c728635f156","url":"assets/js/077bad16.caf9fd0c.js"},{"revision":"5495a4d2e3baf0451f5b26d42706c5a1","url":"assets/js/08224c27.cb8a8b8a.js"},{"revision":"6204258eef6935175bf0fb55f5d7abcc","url":"assets/js/09303bcf.5ebc424a.js"},{"revision":"8d465bc0ab946484781af707cc45b859","url":"assets/js/09fe6722.be5264e0.js"},{"revision":"62e3e010f0eb3d8ff50b9afe46c9998a","url":"assets/js/0b4ecf95.81bbc04d.js"},{"revision":"ef4a2a8cd39bc826a715ab40314753a8","url":"assets/js/0c35ae3f.822a640c.js"},{"revision":"1ffa3024dc06f8640b1fad8e547641eb","url":"assets/js/0eaa9332.2cb3290a.js"},{"revision":"a2c546ad0f7a532bee565f74f3978758","url":"assets/js/0ed78b03.ef837cb2.js"},{"revision":"a3943fec6406f3b610450b4be5639d9f","url":"assets/js/0f17a9fe.c72f1dfc.js"},{"revision":"1b6c75f89c8a8180b654615ad706f329","url":"assets/js/0faeb6cb.bc6553ab.js"},{"revision":"9bb10c15925db555f5f8e9a24fa21d62","url":"assets/js/0fb7e018.f43d6d01.js"},{"revision":"d993321a851024ec8453ff389477e20f","url":"assets/js/105f1242.b0639fad.js"},{"revision":"c58e24b1f45d967090d30f01477e0bc4","url":"assets/js/117bedbe.46bf307a.js"},{"revision":"2e82ff1b3729e93a01c6db2b270fd370","url":"assets/js/11ab8220.975ed907.js"},{"revision":"d2b933176114f81ef73ef1872fa54220","url":"assets/js/12c533ea.916b7568.js"},{"revision":"72e28fbedd7af5b73bdbde0055c9289a","url":"assets/js/13fb3f7d.9d9b5c26.js"},{"revision":"58493f5c60f0c2035cba9a2b895140a7","url":"assets/js/14a7e971.c5151565.js"},{"revision":"0d089ad85b44f0d0b86cdc690255ea06","url":"assets/js/14eb3368.624122a3.js"},{"revision":"ca4b4a28697c49f84d3db54e86ebd67c","url":"assets/js/1553f4e9.69d88aeb.js"},{"revision":"58db719516033faa60ab2a68e242fbd7","url":"assets/js/155ac106.866742b4.js"},{"revision":"aa5d4db54672d62fcee5cd74f00a4b66","url":"assets/js/15d8a732.6bbc03e4.js"},{"revision":"6e7027e12461871bc73c9a0eb6189ad7","url":"assets/js/15eed0c8.664bac74.js"},{"revision":"36a3d3ec7dad0915efb07c97bfca046b","url":"assets/js/168749b0.6a493a4d.js"},{"revision":"d65e758206f164c457a0ab9f18433df8","url":"assets/js/169061e7.bcd122e2.js"},{"revision":"7a30a934627a1a9059cad2e7388cdbec","url":"assets/js/16a87a21.bc85fd5a.js"},{"revision":"2b15756b7080bce5b8fdbb9bed28e905","url":"assets/js/176e278d.eb8c7c2a.js"},{"revision":"b627250fb1d060c248201bb86e596c01","url":"assets/js/17896441.d5d54bdb.js"},{"revision":"2c94c4ea822d0001212e57e8dcfb37fc","url":"assets/js/187263b9.4d27771a.js"},{"revision":"9888c2c0975dbd7e10c7505f4dc73dc7","url":"assets/js/18fc6999.052e2b80.js"},{"revision":"356b91ccb3c64a0a37da32ad612041a4","url":"assets/js/19323918.a51d8e36.js"},{"revision":"9463ad69b97c6ab22de77ba91ffa5e84","url":"assets/js/19e7c5f6.964dc6c3.js"},{"revision":"bc5307a16716bc232498673255dba147","url":"assets/js/1a1f40ab.04452c93.js"},{"revision":"82c35fda847ab646e8d1d2024b4677a1","url":"assets/js/1a4e3797.944b9380.js"},{"revision":"4fb6f8329152776d8e23e7d6b70d4d49","url":"assets/js/1a56c576.00685b60.js"},{"revision":"2a0496a77f73590965f4ba436a3d0b44","url":"assets/js/1a6451b0.b756d443.js"},{"revision":"bd4be84bfb9bfe98deed4b300c6c9980","url":"assets/js/1af20617.17e94fdc.js"},{"revision":"b0ab689e2ad6040efaa88b8234804d75","url":"assets/js/1b545511.ac98f5b5.js"},{"revision":"8f35cd7187e76eb8324ec979b0fb23a2","url":"assets/js/1be78505.6952f309.js"},{"revision":"b3adb2b8687f1fe57dfa9692fd963088","url":"assets/js/1db45628.882d9be7.js"},{"revision":"dba8bdc7316a48f3aaf89bf4fd688968","url":"assets/js/1ed4c90d.09f95fa3.js"},{"revision":"c7dadecdb97fbc0dd25d185d85ec635a","url":"assets/js/201075ae.b3578f02.js"},{"revision":"6369998def1736ea171f014a51def0b0","url":"assets/js/20b2a36a.5aa003d5.js"},{"revision":"191e1cb035c82512e2efb71006743232","url":"assets/js/20e81fa7.4b58ed16.js"},{"revision":"f626d80cd99ab05edecaaf02dfbc8d8d","url":"assets/js/21026dc8.6c02823c.js"},{"revision":"a26992d5822547e8331798775c6b2bd9","url":"assets/js/2155a006.7424b294.js"},{"revision":"b4203d7f47769a2746b789caa852df35","url":"assets/js/216c2ff0.e1ecea18.js"},{"revision":"9a1adf74ad3a87aee12fbedcb9b3ad27","url":"assets/js/21abdb0d.42d9bad4.js"},{"revision":"ac48c356b1c79157e8ede938f90b6fa0","url":"assets/js/21cbcfa4.12016889.js"},{"revision":"95c2156e9b348513d87b68bc5a4590e5","url":"assets/js/2244d875.f95759a7.js"},{"revision":"a58e4793e80fc340cdc83c080fd7af57","url":"assets/js/22e714a5.2eaa1352.js"},{"revision":"f3606112344738caf27543ecfcc88688","url":"assets/js/230.9382e116.js"},{"revision":"17d9059302cfd94361d31c7d7333dddb","url":"assets/js/2355813e.8e73d90b.js"},{"revision":"a52c51888a183b26b38a780fd6a29a58","url":"assets/js/247783bb.dd0316d8.js"},{"revision":"1e460d878e00a6ce582f63c1725f6f9e","url":"assets/js/24847ea2.6f344d66.js"},{"revision":"b163a9f5208ce5d2c9ac0b2b60cbf684","url":"assets/js/25e4f0d4.b78e3c44.js"},{"revision":"41e922706195ba1a53e99627a9cb95ee","url":"assets/js/26257c43.c73d191b.js"},{"revision":"8ebeac03a285480b137cf60d87a492f7","url":"assets/js/2675a52a.4b682ac3.js"},{"revision":"c51e8fc4e6817e0a15fc5588b1e2e5f1","url":"assets/js/27998293.139f1302.js"},{"revision":"0a89a63cd9d7325d8e0c4851e5af1357","url":"assets/js/2804f106.3b7091f2.js"},{"revision":"725904a6f7ff162de6515c481c0f7256","url":"assets/js/28f5790d.891fcb79.js"},{"revision":"05f0bfe0625d2c17327f84dce7719bd0","url":"assets/js/2930693d.a315e61d.js"},{"revision":"59e5162c912f7171b2f44f9104aafa68","url":"assets/js/29a5ee20.2b94e86d.js"},{"revision":"9791997881193a83840f45860ac9eaba","url":"assets/js/29b92cdb.fd195d9c.js"},{"revision":"2ff0df5df347fa7202251d2ecad71091","url":"assets/js/2a83b683.86fc5b30.js"},{"revision":"5a120b91701dc18c896c3ebcc4103446","url":"assets/js/2ab216cb.421971ea.js"},{"revision":"db08dc2d996f2a67277a8e7366be53ee","url":"assets/js/2b43107e.5a5fc1d4.js"},{"revision":"634d43b7d7f9569f43e85aa62251236c","url":"assets/js/2bc33efd.1b9c99f2.js"},{"revision":"076311f345ab68fc1f2fbacb7fc72543","url":"assets/js/2d339dcd.d0fb39d9.js"},{"revision":"8733094ecca7da7baa6490468ccdbdb6","url":"assets/js/2f0b5b6c.0419634e.js"},{"revision":"4f48d4fe12883c6ebafbed4c21e5e16b","url":"assets/js/2f70042d.92d16a70.js"},{"revision":"2a2d9d0b28d4db12d6fa3c79ad12fc2b","url":"assets/js/302308c6.230f7c58.js"},{"revision":"71349af462df375b14c33a9618ab0350","url":"assets/js/30f87c66.a8573b00.js"},{"revision":"b4216df3aedb1786293b6cc164c37d0f","url":"assets/js/3109af4c.396e8a3d.js"},{"revision":"1c67682b572c569deda936c88502b3a9","url":"assets/js/32a09f8c.24c23d3d.js"},{"revision":"afdd9e841d8f54986af590a0070eef36","url":"assets/js/32e68b93.28aac975.js"},{"revision":"839ded5ce6fb30fd84a0733103ef8bd9","url":"assets/js/351af030.2e7c60dd.js"},{"revision":"d38ee6d5aa6295b4a77d09523e5155cb","url":"assets/js/354823c1.97fb6789.js"},{"revision":"4d53ad4a57c25d510418df9ba44d24cf","url":"assets/js/354efaa7.462d42b6.js"},{"revision":"ff91f6eec98b34bf50aa350459f7d77e","url":"assets/js/3719c62c.355a8b76.js"},{"revision":"5997e48427cd9a8ef49106883cc72b03","url":"assets/js/3724ddc1.807eab62.js"},{"revision":"720aa040c4ba7935de8cf2115d8c8e2f","url":"assets/js/37662bdc.5f667ef4.js"},{"revision":"9cbcdea547a0d2b9bedcaa3483829d75","url":"assets/js/37744159.dc893b9a.js"},{"revision":"944109a930d7386c9509dfeabe2bef9b","url":"assets/js/3a6391d4.7687ac26.js"},{"revision":"d9394ac89c8e4ed48d847a06c87065d8","url":"assets/js/3b70e89f.31be6586.js"},{"revision":"42ac4fba40cae275ed942cf3eb1f7978","url":"assets/js/3d13e7fb.7eade6bf.js"},{"revision":"f25023d099fc4582f1a5190aa109da92","url":"assets/js/3d2c31c0.2e22df35.js"},{"revision":"31d7c8235155b9f91b26048371624d6f","url":"assets/js/4082c816.10cb6e6e.js"},{"revision":"fefe340d46222a83e15d5683ab80c200","url":"assets/js/4129286c.d3d20f8e.js"},{"revision":"253bc529066356d95df079cb7b55696c","url":"assets/js/41a4aef8.2635bdff.js"},{"revision":"980c9d822c750017aa9a71e7cae1eae7","url":"assets/js/41a8a410.f675ea4b.js"},{"revision":"f53d0996706e89deb9ef4d3abce406ba","url":"assets/js/420bbee2.06d1dbd7.js"},{"revision":"44fea4780d1fe684dd42bf6fbd89ff29","url":"assets/js/447fdb90.eed853fd.js"},{"revision":"69215378c0451cbd1d5e0dde0655a3d8","url":"assets/js/45741516.32f088d1.js"},{"revision":"1ac21399a421e3e3587ede600aaa663b","url":"assets/js/460afb67.5b9aabd7.js"},{"revision":"117d5be26470258fa7bef5808dc905f3","url":"assets/js/46e18ecb.579b7805.js"},{"revision":"228e35f7ae69e7c437d8a6c9d5e22d63","url":"assets/js/48aeac67.af2aa9ba.js"},{"revision":"a13929b45ebd9b37a6857159ac797040","url":"assets/js/48c6cc07.379fd254.js"},{"revision":"d403718383588257905dbfa67796083c","url":"assets/js/4972.283c30eb.js"},{"revision":"d5619c638f41a6e0937357dbb4df9c25","url":"assets/js/4a6d765c.e49d06ce.js"},{"revision":"a0c506947a4247835ca0ddfe5d1bc3c0","url":"assets/js/4b0c4837.a22d24c4.js"},{"revision":"33993f44f12336424dc574aeb2a4ba26","url":"assets/js/4b47f78b.6311813b.js"},{"revision":"38df04d217b1e45a6d1f95e98c20c300","url":"assets/js/4c57fea8.bc5813c5.js"},{"revision":"6cc0555bf7b21b781bf1310c64a1626b","url":"assets/js/4cd7d6c0.2c08e710.js"},{"revision":"0ae9158f4d4d72cae528af977ee700aa","url":"assets/js/4e1e38be.90b0b3eb.js"},{"revision":"7dc73f007efdc7fd5ee9ae944da8140d","url":"assets/js/4efb66e2.b12d3674.js"},{"revision":"5e44de4806aa478e7e7b52ee327af841","url":"assets/js/5086bf8b.01cf840c.js"},{"revision":"cbd65232594223bab238d7661eb41649","url":"assets/js/5131.b2f8c894.js"},{"revision":"608368c0e4d6783b170e8db9f6a8998e","url":"assets/js/52295632.eb4d5725.js"},{"revision":"6a0e7e0025530bc4ed49dfa20a64b1f1","url":"assets/js/5229ce75.99357a34.js"},{"revision":"6a1c268a4fd7ea0a372ffb33f906d7a4","url":"assets/js/5283.9645c32e.js"},{"revision":"6a22a19a28ed312cc5ce8fcdf3dc339e","url":"assets/js/5525.11292518.js"},{"revision":"38f1bef1aa75afa4d0a1aacc94903d25","url":"assets/js/56cc377d.54e7c637.js"},{"revision":"660513d719504d57b88e0e17952b61af","url":"assets/js/57eea674.e84bb09f.js"},{"revision":"218e05bc0ed26565ca53ff79a2822b56","url":"assets/js/59256a9c.46d3b834.js"},{"revision":"53ae655d34d0306d35290c07a4ec954f","url":"assets/js/5aebd6e8.31f4ec2e.js"},{"revision":"6e80610c629c2ae21c09fa603409d8fa","url":"assets/js/5f0d6a9f.5156ebbc.js"},{"revision":"a48e3eac3cf0b7b09390ea1cb78e81f7","url":"assets/js/5f49a855.cb6855e7.js"},{"revision":"6bdb011728d472d5e199b90e0b218962","url":"assets/js/60178aaa.af414b16.js"},{"revision":"09aa1af2c04bfb514e2df91be981a9b9","url":"assets/js/60c7cba8.8f874307.js"},{"revision":"1bff59aef144d5a7b786687062ac0b0f","url":"assets/js/61265387.8527a486.js"},{"revision":"e9f1b777e9c4309263aec9edc71f332b","url":"assets/js/615fd3de.9c409b23.js"},{"revision":"b8bf86726a6bf7402ea1002152d20c4a","url":"assets/js/61f05610.c71088b4.js"},{"revision":"fdc2634c5a54b32f19cdf4b3067c6584","url":"assets/js/6332.f2f1b997.js"},{"revision":"32909b13e9e5e95273ef969e446e08ca","url":"assets/js/65a2e3ff.95e801c4.js"},{"revision":"8a69ee318b2a7465b362621970711f50","url":"assets/js/67e6ce42.a6bca3bb.js"},{"revision":"f8520134bb6b8b4e7fe7acf25abc2a3c","url":"assets/js/683903ba.170e050f.js"},{"revision":"3c7e29e146acfe8b71c56423c73d5ad2","url":"assets/js/69615979.26c5be82.js"},{"revision":"3bb3a658a9aa0ef7cabc6e489437ff58","url":"assets/js/696b59c8.d440f685.js"},{"revision":"34b86e54b5182d5d6a3941ae57eda3f1","url":"assets/js/696e1f87.70642067.js"},{"revision":"abe08f85d5afae29fc6d1c12ae32f6d9","url":"assets/js/697acd1f.4a8ccf2e.js"},{"revision":"58f4681cdc98ea971e06585bfb1d0f46","url":"assets/js/6a673416.fd450d05.js"},{"revision":"e66990b45dceae1bcfb1160ef7272894","url":"assets/js/6a9ae4f0.c09a91fe.js"},{"revision":"1d6ffa4abab43abee6a8a7bc34595f35","url":"assets/js/6b69f1ff.1af63960.js"},{"revision":"37d5a2f997bc1e0643cc1452a44ddf94","url":"assets/js/6c633cee.ee0344d7.js"},{"revision":"968877ec02e73e9066aaefd47f2c9683","url":"assets/js/6d7ca528.34c93f68.js"},{"revision":"0fa677b5b568c45cc2f184cb1dbfbef7","url":"assets/js/6e0f0a87.5b95a3ea.js"},{"revision":"8bbccf27ee196887d815e156a899f875","url":"assets/js/6ed73382.ceb06375.js"},{"revision":"093531a6c3fa481c997c08af9b96bffb","url":"assets/js/6f9f0f49.632e1b1a.js"},{"revision":"1ef55444f7fd6cf967f9712b779ac381","url":"assets/js/6fd96d3e.53535b1c.js"},{"revision":"ac2e83a8c6fb255199a41573640cf51c","url":"assets/js/70908c7a.5afaaae3.js"},{"revision":"d445666b392f38c5cd8b00832b6ff8f4","url":"assets/js/70bddfb7.07b64a4b.js"},{"revision":"e56f31ba0c950d562b55acb55da89f05","url":"assets/js/70e71bef.9ad84559.js"},{"revision":"29c407b4773a37b0762d70e5c3fa980b","url":"assets/js/71353d04.3f3e1fc6.js"},{"revision":"150a2a8b5e98dab20c6c3b20f7d559cb","url":"assets/js/714b2cfa.dd76fe33.js"},{"revision":"43243c3b7a5473a2da1a367e514724e6","url":"assets/js/71ec47b0.071274b5.js"},{"revision":"93b0bd3b13ca520dc0557da2814f9c98","url":"assets/js/7242dd7d.cf15d5e9.js"},{"revision":"76a3a1a520122d44a4fef977b383b3af","url":"assets/js/7304b5d2.7ef2bbf8.js"},{"revision":"956b51ad24a695def5efba15fa714c72","url":"assets/js/7307607e.86ea5d55.js"},{"revision":"f6ea0e26c91d25dd9658f945df7c3756","url":"assets/js/73b0bf71.1ad3de8e.js"},{"revision":"396b0c7418a7fc9259b4184dae26fcf0","url":"assets/js/7449d9ed.56ffc42d.js"},{"revision":"4c204e6d04d1bc4581443b5f0edff727","url":"assets/js/746fc7bc.6ec5ba41.js"},{"revision":"c2522f514d994a4736a173426422159c","url":"assets/js/7494fa4d.b0c275d5.js"},{"revision":"f4d2f1e8959538e66c7fced7ca003a42","url":"assets/js/74efe321.1b311c15.js"},{"revision":"ec5bdd1c1ab8c3a00a663533ad345638","url":"assets/js/7506f0f5.f106f4e0.js"},{"revision":"2ba9d67df6d63856c3a5450eb58ca808","url":"assets/js/75542ae5.3589daba.js"},{"revision":"f2fb6229e1d385b9be1bf0add46decfc","url":"assets/js/7585ab27.9a6e21cc.js"},{"revision":"885733abcd6ccf3c992b280226703671","url":"assets/js/78d978a7.5ef588d3.js"},{"revision":"65f461a18b8895b28ddd314be3649d35","url":"assets/js/7902b5a9.f55de494.js"},{"revision":"5e9f474357bd8b03f2cbc4e0d7c8c3d0","url":"assets/js/79f166e2.98fe8f6c.js"},{"revision":"ed04d0e800c6c39bbc4af140c0ffbac6","url":"assets/js/7a13331e.750dca86.js"},{"revision":"e5045268afa879617b5fd460d2eda33a","url":"assets/js/7aea73af.4c744ea5.js"},{"revision":"cfc27b3e8759a2f1cdcea2ba0960071f","url":"assets/js/7b7083e7.b9fef6bb.js"},{"revision":"7a97c0e85eb14ad922d23e8c922e7372","url":"assets/js/7bb2c503.19da7962.js"},{"revision":"d737e8e0253c303f9b3e2b2b5636f1e8","url":"assets/js/7c14e583.f45e61f8.js"},{"revision":"6e0c24401d32221f7424b2735da27b9a","url":"assets/js/7c17db79.2d574632.js"},{"revision":"88e3d2249ac86eddeebb5337f9b3f542","url":"assets/js/7c3082c0.6072a051.js"},{"revision":"38e710eb5f00c8b1b4044cce2d4fe03c","url":"assets/js/7c4da66f.1d1f53f5.js"},{"revision":"d99f80e5d3515f5bd3fda57844138c29","url":"assets/js/7d5a5238.863d8e30.js"},{"revision":"8bf7b545985e51f2bcdffada50ed2867","url":"assets/js/7d7ae710.3dc8dd25.js"},{"revision":"fd93f1295a253a31fbbbc2a8d18279b3","url":"assets/js/7e307fec.9402bf84.js"},{"revision":"cd39a9a730b73f59af810dd87466744a","url":"assets/js/7e6c0027.76f17a6f.js"},{"revision":"e280da3dd1f178c6b3334930b11c17c1","url":"assets/js/8111424a.bef72314.js"},{"revision":"aa0a2bdd5a815949215daf604c4f9f5d","url":"assets/js/8231ac58.35af87b2.js"},{"revision":"55f64e5b56ac54edc8d2c81348a842e0","url":"assets/js/8285cac4.d1a98353.js"},{"revision":"82941c8c9fe4b65cf3ab29041b311b95","url":"assets/js/82a52177.df10d393.js"},{"revision":"25708b7f4b168593670b720b51f1b9b2","url":"assets/js/8443.fa030460.js"},{"revision":"63fe556d4dc13e6e40df3f32f0e48d95","url":"assets/js/8498b8c7.22705a4d.js"},{"revision":"6e78be663f9498bed81511451a3d535f","url":"assets/js/84b126b5.c973c8f5.js"},{"revision":"095cf8730e2aa241fe345a8a6dd51ab6","url":"assets/js/85481745.6bb72b6c.js"},{"revision":"3986b430389841a860a5cc5c18ba3d44","url":"assets/js/85ea1211.4e2d049b.js"},{"revision":"beb0a0e9635d11ebc0df32dccbf48d5d","url":"assets/js/8613e059.acf0b345.js"},{"revision":"fd49d28cb3b2a86a653dbcfaecaba58a","url":"assets/js/89af46e0.5a919712.js"},{"revision":"ba0473892158cb1609e1f3bfbe1b5b60","url":"assets/js/89cfd5bc.f7a43655.js"},{"revision":"162bcf8af8cfa0bf8939dedf8e64d0a6","url":"assets/js/8a0a7bb8.ae9c010d.js"},{"revision":"777541a0d2dc3d6d3a97279a34eb5df9","url":"assets/js/8a1c45d1.1f1ac73a.js"},{"revision":"b47f86bbabb622ef1ceed638e820ed16","url":"assets/js/8d22f410.a26cc741.js"},{"revision":"fc3036d8ea036a08d9787269573bb77e","url":"assets/js/8e11eaf8.0be8a13f.js"},{"revision":"ad1fb599cf4329afdaa648ba20062348","url":"assets/js/8ec8555c.0e3e0643.js"},{"revision":"3157235bdbca6dcdd27b8226eb5c4ca5","url":"assets/js/8f3fdbc6.44b73e84.js"},{"revision":"73d83b53ea77623bd23f4c2fc244b780","url":"assets/js/8ffdbf67.f972bb92.js"},{"revision":"b9368bd1b935c358691c4254add45e55","url":"assets/js/9120e160.4a5c7847.js"},{"revision":"accb120f06ac53715345783687e4bff4","url":"assets/js/9150d950.ae765bca.js"},{"revision":"a5196d1213a5e8dbd49b5fe6ac041894","url":"assets/js/9169002b.09188e5f.js"},{"revision":"b08d55ccbb745e420d7ad4e708115b44","url":"assets/js/9226f6dc.0966b01b.js"},{"revision":"70c28860c3d50b921d4c306b825b6cd9","url":"assets/js/924b993a.f158afe8.js"},{"revision":"d9227b6e44c215bd3af0a261bb5d1918","url":"assets/js/93224b68.5c72dba5.js"},{"revision":"1a3a90bd22788e3b414c065f3aa8ab6d","url":"assets/js/935f2afb.e6ae511e.js"},{"revision":"36b6162cc85e4c1d44bc9b136d34351d","url":"assets/js/947c06a8.d83277c7.js"},{"revision":"8372c31af3f97ebd1e93eff4946bded9","url":"assets/js/94f6e99d.23a63427.js"},{"revision":"8c4e42426f8c43967a3c7f2e87e7c95c","url":"assets/js/96b207bc.d578990c.js"},{"revision":"59b843f532303bb6287a7c4dc3267874","url":"assets/js/96cc6114.51f8eea9.js"},{"revision":"6240fc01e36a57eb79c9cecd271586fa","url":"assets/js/9717e045.0ee0816a.js"},{"revision":"2866a207137ce1bdd6e64337d12ca908","url":"assets/js/97633019.f1d2d497.js"},{"revision":"a3b0cedc31dfba5680e23640731b0ec9","url":"assets/js/9846b930.42706658.js"},{"revision":"71951e49ba3957301fcc0fde2296bb6a","url":"assets/js/98ce83f7.1872d7c1.js"},{"revision":"7d01b0bccdf8359788c994dffa0b44ba","url":"assets/js/99be78a4.c669c897.js"},{"revision":"30ab4d5641a5c19a3ff73ce80bac9056","url":"assets/js/99c84a64.a3be33e5.js"},{"revision":"3c6a9e966b74bf3416b8655b14e6487b","url":"assets/js/99d23504.8c4a0884.js"},{"revision":"bd348e19d13ce8636560fa337fdde9c5","url":"assets/js/9a4187db.53046b65.js"},{"revision":"daf65a081bd98a4a098d51afd0717751","url":"assets/js/9a57fc4d.4add6111.js"},{"revision":"3d2795d73d8f21c923a21b32513bd43d","url":"assets/js/9c153fbf.579b84ec.js"},{"revision":"6392b3cd960ee8c99e275baeabbda8b9","url":"assets/js/9e1458a6.37c5700d.js"},{"revision":"d7a3263f0e7947ce43e065234ebd89e3","url":"assets/js/9e834d3b.1370d5ae.js"},{"revision":"6b8cb00934b03f7a7180f11c2420bc20","url":"assets/js/9edbfc07.a6917f9e.js"},{"revision":"ae3862ba5964f2f9c47712736fcabce2","url":"assets/js/a1b139e6.875599b8.js"},{"revision":"3bd6393d85948ea0e061000442415c71","url":"assets/js/a4976c5b.bc2931a2.js"},{"revision":"9a7b30639bce6d9b9bed6bb0154a3cba","url":"assets/js/a4f7be8a.8e1365ac.js"},{"revision":"a1de3270772604a1880c9e6b7073f6e7","url":"assets/js/a56e433f.8f2d4533.js"},{"revision":"5d3eb5749c1720f09ab739054f974f30","url":"assets/js/a5750196.1e5900c3.js"},{"revision":"1e80227f84f0d83b47322cd89d16ff56","url":"assets/js/a623b5ef.a4e44d2e.js"},{"revision":"da640244167cdaf6878f6479ed972407","url":"assets/js/a6514993.a7dc13d5.js"},{"revision":"2da3e6f9ac96e140dd712b9895a68174","url":"assets/js/a7f3da21.a5f36b0f.js"},{"revision":"a0bd405f6441723f08630c3f5e64414d","url":"assets/js/a900ff2e.6420da6a.js"},{"revision":"a6f74c58c512c12afab2bbef0338ea01","url":"assets/js/a935c7a9.92734a5b.js"},{"revision":"4ef7beecbb1047c9045dca9b356f28e3","url":"assets/js/a947b58e.7805fae4.js"},{"revision":"003710e62b60d6db77c66cf982877887","url":"assets/js/a98ab587.5b1dea25.js"},{"revision":"ee93e93956a564020467ce56ab7c3d57","url":"assets/js/aa3c42c7.0ed1479f.js"},{"revision":"b43863a6b6544a831704981164ec17c3","url":"assets/js/aa5eb267.790443e7.js"},{"revision":"f3a74c00f7957c094e596c233f776f0c","url":"assets/js/ab3885d7.146cd365.js"},{"revision":"3f870d7091b51759308ab8b3e7f0ff7e","url":"assets/js/ab6e749e.075eac66.js"},{"revision":"9ec26a38c25d7887a5192f90b3650513","url":"assets/js/aba14099.5e056923.js"},{"revision":"dd09c017a58d3ea7e80ce190ec3a867d","url":"assets/js/ad1f3017.de25c69c.js"},{"revision":"c765b2d1ff9dc2914aa2cc33bee933ab","url":"assets/js/adc35084.f2df7bef.js"},{"revision":"b60e58b9de0a7625fa959bfdfc7bfd7e","url":"assets/js/b1922553.dec2a73f.js"},{"revision":"d850e1822b9458ce16fc0314fb42700a","url":"assets/js/b44bfc8e.ed43eeef.js"},{"revision":"058121ebe15f97b92e286923bec9dfa2","url":"assets/js/b4d2131d.d8898747.js"},{"revision":"64a4a1c572c4db9ea74eca9dd18fedbe","url":"assets/js/b52ca227.75650c74.js"},{"revision":"0271de0d03c63d3d8bf90a709e40ea70","url":"assets/js/b538e48b.96a134a0.js"},{"revision":"cdcd56e85ad8c468d82076a7f922c848","url":"assets/js/b63b0bf0.05e23a13.js"},{"revision":"1ed6e6be7345b3b793523c1dfd8a36c1","url":"assets/js/b7304a30.26ee1b72.js"},{"revision":"d4302f4cf8780e1fd35ce9e2dc401f18","url":"assets/js/b850f0cd.7e02d8c8.js"},{"revision":"9d40a4457b20d15ba575135779835f05","url":"assets/js/ba473e3c.96ec7dff.js"},{"revision":"00f731fbfa723564d9d88761a9bfa8be","url":"assets/js/ba862b2d.f7e51a1e.js"},{"revision":"84f83d2278e58ae4fdcd829f71059b77","url":"assets/js/bafae794.8bf86b63.js"},{"revision":"3b72c7be806d635614db4db7cddfeea2","url":"assets/js/bcaa1a93.f27de5c6.js"},{"revision":"146d9b8d6ed586cea207d38ee6ba97ff","url":"assets/js/bd4688e3.03a20850.js"},{"revision":"346d6495927d24c0af92d9f710f4f95b","url":"assets/js/bd6d307b.4b15c459.js"},{"revision":"b41bc83b7f7058744d44321592618c53","url":"assets/js/bddcf50a.b111a3f5.js"},{"revision":"1ff8b9ac6a42b31b3d45e85a8eae54b5","url":"assets/js/be998fc8.aecf509a.js"},{"revision":"51cd21c40df9298fee041a2ae20108a6","url":"assets/js/beb9009d.e1d1a465.js"},{"revision":"faf72549f8ede505c12c022a6657c711","url":"assets/js/bfd76e57.83382540.js"},{"revision":"6ec4be1f44399a77f01ae64e9a64cdf5","url":"assets/js/c1787ca8.a6e8a7ac.js"},{"revision":"23a86df7c8e77da350775d1557946e1e","url":"assets/js/c27716d9.adf8d761.js"},{"revision":"695282befe2db4cde997caa28f147277","url":"assets/js/c332dd74.f4f7b918.js"},{"revision":"fae083ed5f4420dfe95b247a911d06b8","url":"assets/js/c6147012.b3bf7acf.js"},{"revision":"f61d537f4e06890290236b4ed8e2a64f","url":"assets/js/c664382c.d34c1c4b.js"},{"revision":"9c165de36b63ecfc0fec1c954f83c360","url":"assets/js/c6d853a3.fe5da4fa.js"},{"revision":"59647d772aabb4fab8ea5f0ce3425b47","url":"assets/js/c756ed28.255869dd.js"},{"revision":"0434687bd4112cfab30509de97090ee8","url":"assets/js/c866fba5.246195c1.js"},{"revision":"db091a185a3a992994f0acbe50be5a60","url":"assets/js/c873f379.42e24bae.js"},{"revision":"c140d3837a3573d96f97f9c8a56facc7","url":"assets/js/c8fbcedd.0499b002.js"},{"revision":"48f4131740465f7d90f349ac1f0990cf","url":"assets/js/c921e1c5.5f83ad4e.js"},{"revision":"dea59babf2725ed2d0beeefa65cb517c","url":"assets/js/c932cba0.dfb444fe.js"},{"revision":"dd8f307ea06f0b9c3362030e8eb250cf","url":"assets/js/cb1fa44a.bf01e5fa.js"},{"revision":"4e39f739c3dda9d22de13d202a4973d1","url":"assets/js/cb364855.d1caae87.js"},{"revision":"0b8076a11c0087d2ac53208a12eb8913","url":"assets/js/cc119bd3.e8e02ad1.js"},{"revision":"1615e2bc105d1d6eef1f7574eed2e76a","url":"assets/js/cd01922d.9e3b85d5.js"},{"revision":"4b1f5aa39539b62e550f75a4e99c4b80","url":"assets/js/ceb3afff.35eeabf0.js"},{"revision":"30e4876cacabfa3abbeade9761d9c907","url":"assets/js/cef081d1.1851559b.js"},{"revision":"44f6d98b0ede8d704d3f48644e75edd6","url":"assets/js/cf63ef8e.67f0f5e0.js"},{"revision":"fce4cfe8543cf7b68b187067c9f51190","url":"assets/js/d0dc338f.233d6b26.js"},{"revision":"4b289885c9b267cbcd6a3d2e712de2e2","url":"assets/js/d0f011ad.697c1ba8.js"},{"revision":"fe6817b425d7d1b1bcc66010dd350c21","url":"assets/js/d13e591d.0301954d.js"},{"revision":"c3844bbd43be22a133411186905bf7c6","url":"assets/js/d32d6269.c9314db5.js"},{"revision":"09c88c915eea877b8d5942e583084c2c","url":"assets/js/d3f7bfd6.bf70bf8b.js"},{"revision":"f3f3db33c18f8260b60b64905c3b30e6","url":"assets/js/d43c9f93.51e98cb5.js"},{"revision":"d68e690de478b160e002f17aca1eedd5","url":"assets/js/d504ac29.24bd464f.js"},{"revision":"a5e7dea8b2272c093c3cef51826cfa18","url":"assets/js/d56ded4a.b1adc43d.js"},{"revision":"b80113a2d6baca4dc7f967949efa23dd","url":"assets/js/d572cd57.61390812.js"},{"revision":"b06a8e19059b1caa9423e754b6e9ded0","url":"assets/js/d615d254.c71ca5ea.js"},{"revision":"027a3d2c683b026f77b5c26f62cb5862","url":"assets/js/d8d851c4.e5aad280.js"},{"revision":"fb5d3957eb630834dcc6ca04551da350","url":"assets/js/d9c007a6.cef2aaae.js"},{"revision":"97667182c5aca9cb91cbd00622d48967","url":"assets/js/da764669.f67795a4.js"},{"revision":"721014677e82d1169025d57fdefc76fe","url":"assets/js/dae63fe7.61a87e7f.js"},{"revision":"1a63fd0e465144dc34edff2d1b65e5b5","url":"assets/js/dc18e77a.85f94780.js"},{"revision":"13e72c664e442c988fb74288e66cc173","url":"assets/js/dc5e43eb.524235d4.js"},{"revision":"cd8adfb058a29508e50e7c101271302c","url":"assets/js/dd6e99a2.0461119b.js"},{"revision":"b666fd19c24cfaa3e9598e6c93cd1c7c","url":"assets/js/de9bd5d8.04a9c592.js"},{"revision":"51a959849b2cafe1f45c1692248b942a","url":"assets/js/def1082f.8b106bd6.js"},{"revision":"d008335f975b14b8345671f0a661704c","url":"assets/js/df7efcc1.c325085f.js"},{"revision":"facd8e163a81b6d9fcc107f124ec65ac","url":"assets/js/dff2806d.76930d5a.js"},{"revision":"fba9eb4a90336bf9edc0bb776cd2b84e","url":"assets/js/e02ba15b.c36b1d1f.js"},{"revision":"73759d32efb4d9795b26a8727dc3dca9","url":"assets/js/e04c764f.3aecc16a.js"},{"revision":"ff2e3362500c974241890ce6b6fc005c","url":"assets/js/e1511284.391fdfa2.js"},{"revision":"c33a9670b546fc8904a759184d36fd0a","url":"assets/js/e2d36ca2.1363ff75.js"},{"revision":"659564de35e6940ebc274df3c58a8176","url":"assets/js/e359d859.42de5511.js"},{"revision":"626a5e94ff3e90f454a104bcc417e46c","url":"assets/js/e484f7f1.c0957bb2.js"},{"revision":"97fbc1c1a575899020a76cd8b120a7c0","url":"assets/js/e4fc886a.79a31a46.js"},{"revision":"68cf491f5e2d1e11d8ad3c15fe2173cf","url":"assets/js/e565f349.0c0cc16c.js"},{"revision":"b57c84ce985c12dded16fa08e303e69e","url":"assets/js/e5e7af3c.7f986c27.js"},{"revision":"16951dd358525c5c7d0ba808e90437a3","url":"assets/js/e60d8fac.530b1a2f.js"},{"revision":"a5fe773cdcae26d56c10ce92ba96f6c5","url":"assets/js/e75dbc73.de6ef5c9.js"},{"revision":"084999036cbc3b13c240ef88112f2b12","url":"assets/js/e77f4328.3c228a27.js"},{"revision":"2a8efcac3a9b666d7c2f367554c44da2","url":"assets/js/e7e568e4.09900943.js"},{"revision":"d74584fa88a93e579f5c467f8be4bc8c","url":"assets/js/e8d25167.66b89a45.js"},{"revision":"481b7c9d981a549cfd0e64c29e3af927","url":"assets/js/e983bddd.45093eab.js"},{"revision":"acd5d3c3d4a46be7007651777f5ae63b","url":"assets/js/e986d0bf.89b64e16.js"},{"revision":"87bb90d49fe8d91985a74978742ac444","url":"assets/js/eb10f950.31999cf2.js"},{"revision":"9aaf6246e2cc2592de3119e050f519fd","url":"assets/js/ec00c35b.1c95da0b.js"},{"revision":"cb25ca4315fd157de13bbfef3b81258a","url":"assets/js/ec1940fc.4a3f0bf6.js"},{"revision":"340c9a774af269273d22d98fa8e791b1","url":"assets/js/ec4d7ded.372e56f2.js"},{"revision":"2f0f7979d58bac608e7fec423c31806a","url":"assets/js/ecaa11c6.479d5245.js"},{"revision":"9a997578e021913fef4d7638a61f83fc","url":"assets/js/ee02910b.788457ee.js"},{"revision":"a3f15f042238bcfeca5bac6cf941445e","url":"assets/js/ee160897.46ef453e.js"},{"revision":"ea19f0794530bc34c8ee075708e58bd9","url":"assets/js/ee5b964b.c0806191.js"},{"revision":"0ef51a99de5e6dc71c493802290f26fc","url":"assets/js/ef9e84de.a74baca1.js"},{"revision":"5a07226a7b6f7a765f44a6123160b06b","url":"assets/js/f283da07.3b192dcb.js"},{"revision":"921c3b2e2d61487014edfda1d6cbcdb9","url":"assets/js/f2e3e8e7.1dc0eb36.js"},{"revision":"6a39b46b5f89ad9e6ed95cec8f482617","url":"assets/js/f36dee5a.db07543e.js"},{"revision":"a284ed2511870c01a4fe4ecff93fcb65","url":"assets/js/f3a8b621.ab6bd08a.js"},{"revision":"078eb6adda42165e7c6ba212fec1141a","url":"assets/js/f4c46260.06ea8b57.js"},{"revision":"e308b90eeae4b5b8063d06d561db6dd7","url":"assets/js/f615696e.be1cd014.js"},{"revision":"569255f0c0a6e49b0267fa3569255aeb","url":"assets/js/f64f61d9.60fea1f2.js"},{"revision":"1573b8bebc37782ad3b5537e3dbcd9f4","url":"assets/js/f6b14373.5c253b6f.js"},{"revision":"ae4e0ea005ecebbde7760caf1578eda9","url":"assets/js/f740b2ca.7013f851.js"},{"revision":"8be5d98cb0a1f511ea17901a0ced7f90","url":"assets/js/f75a7727.231c4107.js"},{"revision":"9fa52f76b4310e356743037fa6ae6431","url":"assets/js/f76c4255.0ad87f3d.js"},{"revision":"b151201903a992c567ca6221971872e6","url":"assets/js/f7cef55a.7eb86bd3.js"},{"revision":"416dcfabc6effe568976449b9ad67e7b","url":"assets/js/f848540b.736709a2.js"},{"revision":"a11b84cded832b0d04afdefaaa63992d","url":"assets/js/f89fe0d8.66b42055.js"},{"revision":"bf7ff2b996be3b7a160eca56cb3816cf","url":"assets/js/f8c23c5d.559a0899.js"},{"revision":"a44d2dedefbfd751ba448b5461b7bc9e","url":"assets/js/f9806908.62c2cdb1.js"},{"revision":"d140a3150f36b7bb189152bbc191eea0","url":"assets/js/f98ecc36.9c48b32f.js"},{"revision":"121f66fd047a658b2a1f6760fbdc4178","url":"assets/js/facb389b.7bd0c91d.js"},{"revision":"b60047ac464be7e6114392fffe83bec9","url":"assets/js/fb334fe2.05e73549.js"},{"revision":"eb1552be7d0a383d415156bb05db8409","url":"assets/js/fba67bfa.7426e7ba.js"},{"revision":"7fa91babeb4c4ea458e2f0e753237b60","url":"assets/js/fbe53b78.309b7848.js"},{"revision":"4c2530b14aa4fa442067cde2ad6717f6","url":"assets/js/fc2062ce.50fdb658.js"},{"revision":"4097879a88afb3928a69bd85b5dd73cb","url":"assets/js/fc970c7f.ce4cc629.js"},{"revision":"e3606ed5e42d60bb99ec1f990725b849","url":"assets/js/fc9ae7f5.33789967.js"},{"revision":"e7232634383b0d22e8a774fe444c0858","url":"assets/js/fdc7a41e.5eb6f2a4.js"},{"revision":"1bb6a828dd03c412bbb2e68c782bd92c","url":"assets/js/fe11e29a.25cd7915.js"},{"revision":"7a32ce5cb266548cda0eb3bd9671e61f","url":"assets/js/ff1d361f.ed1ad029.js"},{"revision":"71f1f5664a996c67d359335699115063","url":"assets/js/ffe0a0fd.19aca4b3.js"},{"revision":"4182ad771b4a25f117d92c9fc3cee0c6","url":"assets/js/main.14b46a3d.js"},{"revision":"9aa515c9a469c2457631ce535687597a","url":"assets/js/runtime~main.deaf3923.js"},{"revision":"3ce74115a9df7540c2ed993398f88b3b","url":"category/-middleware/index.html"},{"revision":"1088c1ef11ceec0d6038ae56862718f2","url":"category/api/index.html"},{"revision":"42d34f204fd9f56e646487b7544ceca0","url":"category/extra/index.html"},{"revision":"7dda853c33d0c7478336eeead93c5d31","url":"category/guide/index.html"},{"revision":"a366b49a3ee72ad3a4c02a99726b32ef","url":"contrib/casbin/index.html"},{"revision":"415164167fb770d47c8853dda8c4d0a1","url":"contrib/fiberi18n/index.html"},{"revision":"9a1f9fad63fb179abfbea8ef079656fd","url":"contrib/fibernewrelic/index.html"},{"revision":"63a5b5cc7d0a6e983aef97e422810124","url":"contrib/fibersentry_v1.x.x/casbin/index.html"},{"revision":"b7efff189e7a65e2153bc822281dd0fe","url":"contrib/fibersentry_v1.x.x/fiberi18n/index.html"},{"revision":"29c32d8b24b1b712e947ce731089af85","url":"contrib/fibersentry_v1.x.x/fibernewrelic/index.html"},{"revision":"3188bc662df4242365aea22918f554d2","url":"contrib/fibersentry_v1.x.x/fibersentry/index.html"},{"revision":"19191da8629b8ec8b21e492c58cd9619","url":"contrib/fibersentry_v1.x.x/fiberzap/index.html"},{"revision":"ad710ffefe9efdf21b7fc13302a17fcc","url":"contrib/fibersentry_v1.x.x/fiberzerolog/index.html"},{"revision":"0cd3ef771a6a4753a40e07314bc6bf5a","url":"contrib/fibersentry_v1.x.x/index.html"},{"revision":"171b41618832ed81d28bddb3695932ca","url":"contrib/fibersentry_v1.x.x/jwt/index.html"},{"revision":"49cb47d98d2eeab235d117bb21cb3d03","url":"contrib/fibersentry_v1.x.x/opafiber/index.html"},{"revision":"8a32f3fb7d17265463cbec785283b6a8","url":"contrib/fibersentry_v1.x.x/otelfiber/example/index.html"},{"revision":"5f6c776c7fb160a3dd1db8a1b71c9295","url":"contrib/fibersentry_v1.x.x/otelfiber/index.html"},{"revision":"c60cf04f579dab21ec606bf41ba70730","url":"contrib/fibersentry_v1.x.x/paseto/index.html"},{"revision":"d57edce212e27b3b70ccb17148ea7453","url":"contrib/fibersentry_v1.x.x/search-index.json"},{"revision":"013115aba9fdd845afd87f91dffcfa7e","url":"contrib/fibersentry_v1.x.x/swagger/index.html"},{"revision":"40a34e6bca863663734328307025c37e","url":"contrib/fibersentry_v1.x.x/websocket/index.html"},{"revision":"84caa7f9db8455e131f2630081dd33a8","url":"contrib/fibersentry/index.html"},{"revision":"89e2b8303c58d37cb5e803172e357951","url":"contrib/fiberzap/index.html"},{"revision":"10dbd04899391256d83f809adf8f037f","url":"contrib/fiberzerolog/index.html"},{"revision":"067921bb92d2dd2a40f3ae726609b14e","url":"contrib/index.html"},{"revision":"71fc12aff37041829a0e075a22bd3098","url":"contrib/jwt/index.html"},{"revision":"5bae87176a250379f273eb3f1689d7b4","url":"contrib/next/casbin/index.html"},{"revision":"6987bf23424f7ce6fdc63fcff22e48a7","url":"contrib/next/fiberi18n/index.html"},{"revision":"5f473a38d3551d8ae33bd6897cdbdb7c","url":"contrib/next/fibernewrelic/index.html"},{"revision":"94df47118cbd257a4749e32bb1eae068","url":"contrib/next/fibersentry/index.html"},{"revision":"bf538c86b5c2efac4e83d0af8b222376","url":"contrib/next/fiberzap/index.html"},{"revision":"ba0cf940074694fdb1e6d3fcc817c758","url":"contrib/next/fiberzerolog/index.html"},{"revision":"dc6acc09c4839536940d37e002bd6751","url":"contrib/next/index.html"},{"revision":"25eb707eae8ccae5708eb592d8e1bf17","url":"contrib/next/jwt/index.html"},{"revision":"2d3d68a9572b57f36b6fa5e03e05b390","url":"contrib/next/opafiber/index.html"},{"revision":"304ea9d22faaf46210f77c42a8ffd4ba","url":"contrib/next/otelfiber/example/index.html"},{"revision":"9fc06cbdc35b5b623b3d4954d342cc4f","url":"contrib/next/otelfiber/index.html"},{"revision":"52a44ec20380da3429e3934d124aa298","url":"contrib/next/paseto/index.html"},{"revision":"d8347d0bac8c107247315e9f7b177cf3","url":"contrib/next/search-index.json"},{"revision":"09f5626c73abb770283adfa31295c817","url":"contrib/next/swagger/index.html"},{"revision":"afbc6be7673b88cce37743122f525380","url":"contrib/next/websocket/index.html"},{"revision":"86247e79fddf2a10ff4239d0d214c45f","url":"contrib/opafiber/index.html"},{"revision":"77200e6df05a254bed552d534f2b4c2a","url":"contrib/otelfiber/example/index.html"},{"revision":"dda0d0bf5aabfe2846ac56e71f3063ec","url":"contrib/otelfiber/index.html"},{"revision":"897cc4c0ef2c0aad89682dabd73bbb9d","url":"contrib/paseto/index.html"},{"revision":"201adb0a4236e1d9c12d88910603f7ea","url":"contrib/swagger_v1.x.x/casbin/index.html"},{"revision":"1f952d3a178c7c23cd5eeeff356a87c6","url":"contrib/swagger_v1.x.x/fiberi18n/index.html"},{"revision":"3de11594346186b78b397a70be8ac463","url":"contrib/swagger_v1.x.x/fibernewrelic/index.html"},{"revision":"b98cef8583dd10cc6729d6378507427a","url":"contrib/swagger_v1.x.x/fibersentry/index.html"},{"revision":"25170909d1026232f268278ff3d5c515","url":"contrib/swagger_v1.x.x/fiberzap/index.html"},{"revision":"42200e0a566e9d77bd89a5a127a77b28","url":"contrib/swagger_v1.x.x/fiberzerolog/index.html"},{"revision":"af8174d2693024ab4b1e3f894415a51b","url":"contrib/swagger_v1.x.x/index.html"},{"revision":"9fa371a8c68ea448a1d7608f4bf0e89c","url":"contrib/swagger_v1.x.x/jwt/index.html"},{"revision":"dc56e783252b1380fb1f8065534b8cdc","url":"contrib/swagger_v1.x.x/opafiber/index.html"},{"revision":"405f22a9993c8570ba0537799576bb1d","url":"contrib/swagger_v1.x.x/otelfiber/example/index.html"},{"revision":"04d0ccae4573c3a3cbe5458c4a24f20f","url":"contrib/swagger_v1.x.x/otelfiber/index.html"},{"revision":"eff533375d918b946d6cf0b823076c26","url":"contrib/swagger_v1.x.x/paseto/index.html"},{"revision":"810dd09cda18a9860b3883e024dd65df","url":"contrib/swagger_v1.x.x/search-index.json"},{"revision":"d8ce138c880f24545459bb36f506473a","url":"contrib/swagger_v1.x.x/swagger/index.html"},{"revision":"7e7721b0155f17f692144f168055bd84","url":"contrib/swagger_v1.x.x/websocket/index.html"},{"revision":"d9d2b7d8de3ab06cb5cc05df77a36b7d","url":"contrib/swagger/index.html"},{"revision":"cd4273363098f67e92a1318f1333d481","url":"contrib/websocket/index.html"},{"revision":"b6e1edb92f0995eef46b84dc443d4bf4","url":"ctx/index.html"},{"revision":"80b8c6759442d3d0e180dd07e592fee8","url":"extra/benchmarks/index.html"},{"revision":"2da69d1dcc34db873d9837d927daf75a","url":"extra/faq/index.html"},{"revision":"bd29072045f42e26a72fd1678638bd83","url":"guide/error-handling/index.html"},{"revision":"228d10465fb48f06960a9ce8ed8b34d1","url":"guide/faster-fiber/index.html"},{"revision":"3a2ec75b6bf899fbd993a99ee8866196","url":"guide/grouping/index.html"},{"revision":"219b4357644cecf6b05e0f8ce29f1a1f","url":"guide/hooks/index.html"},{"revision":"1c7ef15a3b228e2a5b53d8c876f41d76","url":"guide/routing/index.html"},{"revision":"5fcfca9338bc49d15b9e8bae90723f77","url":"guide/templates/index.html"},{"revision":"9c4cae9de783746002086e11e086bcf2","url":"guide/validation/index.html"},{"revision":"bd46021a5ed197f3e38e0cadd784944d","url":"index.html"},{"revision":"f42d1aef9f7789a8723990f4843b6f7a","url":"manifest.json"},{"revision":"30d92ee0726b195fe6241f785de48e0f","url":"next/api/app/index.html"},{"revision":"8926bdfadb4f1b6f635116512f8be1d4","url":"next/api/client/index.html"},{"revision":"b2c415688c9ae4823c2f4b2d70f7d294","url":"next/api/constants/index.html"},{"revision":"787e62f95bc08b27e44e4114cfd8bfe4","url":"next/api/ctx/index.html"},{"revision":"3382ddff1d9a86cdc361f74e0d7e420c","url":"next/api/fiber/index.html"},{"revision":"73a1ea88d26961e9fddfda1188851b4d","url":"next/api/log/index.html"},{"revision":"16ba48b23748c1e6d75b9a594c8d8e77","url":"next/api/middleware/adaptor/index.html"},{"revision":"4071a515b8a652e6f93a21a38245c109","url":"next/api/middleware/basicauth/index.html"},{"revision":"eaf371f5e4a27aec8e52c1729fc56e15","url":"next/api/middleware/cache/index.html"},{"revision":"cc4665c6b2b6e4d79e5c96e6d8b8b8b2","url":"next/api/middleware/compress/index.html"},{"revision":"001f71356438a92358bfdeba143ef0b4","url":"next/api/middleware/cors/index.html"},{"revision":"4ae6b31b7e7c0cf510aa0d2b619b39a8","url":"next/api/middleware/csrf/index.html"},{"revision":"481a11fe2b6f0c40ef21c700b5976bde","url":"next/api/middleware/earlydata/index.html"},{"revision":"059e90a5b4e25eaac6d833d7732b0228","url":"next/api/middleware/encryptcookie/index.html"},{"revision":"348d152c880f788df6598eed7b67c93b","url":"next/api/middleware/envvar/index.html"},{"revision":"b5d34ab6638375300872cd590a772c23","url":"next/api/middleware/etag/index.html"},{"revision":"6420ce2f6de0fb4e10af4098b895dc4b","url":"next/api/middleware/expvar/index.html"},{"revision":"39cb67c421eea8a419618a5f6c3f2961","url":"next/api/middleware/favicon/index.html"},{"revision":"76a970dbeb30e8dcdd4aeadb613a151a","url":"next/api/middleware/filesystem/index.html"},{"revision":"ba6f4dc16021225a2781158c27e709f7","url":"next/api/middleware/helmet/index.html"},{"revision":"25dee2bd49b7802306f5f94ecbb50256","url":"next/api/middleware/idempotency/index.html"},{"revision":"83b68a5d67aead91fe12f5c0c90fa35f","url":"next/api/middleware/keyauth/index.html"},{"revision":"eb62502e95b386bc437e1a8715179b6f","url":"next/api/middleware/limiter/index.html"},{"revision":"1891646299b0f99648d7c77aeb83ed3e","url":"next/api/middleware/logger/index.html"},{"revision":"9bb0672e8cebeda0b2e6046227aee352","url":"next/api/middleware/monitor/index.html"},{"revision":"b14ff64abeb955721d98abe63741fd08","url":"next/api/middleware/pprof/index.html"},{"revision":"68ee5b33c9a250c4b3c076a2899c50cf","url":"next/api/middleware/proxy/index.html"},{"revision":"9d041f535906d3dfd729654b329a9d48","url":"next/api/middleware/recover/index.html"},{"revision":"293007ffef57a487d1c6321f51617af0","url":"next/api/middleware/redirect/index.html"},{"revision":"ff415b4729323d37ce4787fd5b1b1ecd","url":"next/api/middleware/requestid/index.html"},{"revision":"2fe7c7c766981e8c70356d64c49748b4","url":"next/api/middleware/rewrite/index.html"},{"revision":"f0c9e4fcae4dc1bcf1d9d9189d753146","url":"next/api/middleware/session/index.html"},{"revision":"851a9a1e5dfd9379638dbc47612ced3d","url":"next/api/middleware/skip/index.html"},{"revision":"386c4c23562b9d137c15ddd248e5ea26","url":"next/api/middleware/timeout/index.html"},{"revision":"690b06c8549b4877a52faa134f2793e7","url":"next/category/-middleware/index.html"},{"revision":"1d8ce2cadc6ba2fed58967d39449d182","url":"next/category/api/index.html"},{"revision":"792fe2a5e14dd546f3ec17875d1a9f2c","url":"next/category/extra/index.html"},{"revision":"68873fbe92711cb8168e7c8089d59045","url":"next/category/guide/index.html"},{"revision":"636c7c2fb5e9cac7685a15f4a2a75d43","url":"next/extra/benchmarks/index.html"},{"revision":"ed4e928b4d0f11ce6b43af6ffe8b0545","url":"next/extra/faq/index.html"},{"revision":"80bf20bd1438fb84597893481ac7cab7","url":"next/guide/error-handling/index.html"},{"revision":"bf6e0f31284dedb726c1d1fa95df3687","url":"next/guide/faster-fiber/index.html"},{"revision":"92b98f6f99c31696f934d48e8cd21dd4","url":"next/guide/grouping/index.html"},{"revision":"83a3c3cd3c7da5acb9f13aef1aedce7a","url":"next/guide/hooks/index.html"},{"revision":"f9db5c2568903eb455ec1900465d5712","url":"next/guide/routing/index.html"},{"revision":"46e81fbda25c5c5163f7ff48ba729727","url":"next/guide/templates/index.html"},{"revision":"53483676b1e281ae09d18a59e1ff55a6","url":"next/guide/validation/index.html"},{"revision":"1684d738680a5700b89f1349d347902c","url":"next/index.html"},{"revision":"6f02ef299d5b7b9d2180e23c019e4035","url":"next/partials/routing/route-handlers/index.html"},{"revision":"82ed9d74ad5029b89734387f7cb06d2d","url":"next/search-index.json"},{"revision":"2470a0f7e65e91b28a850946b285fe2f","url":"partials/routing/route-handlers/index.html"},{"revision":"356e031ffc88212f8de1807330821393","url":"routing/index.html"},{"revision":"829a1ddc819dad475617d5309409f6ee","url":"search-index.json"},{"revision":"2e78806009a9ea0592b6be43f575e9de","url":"search/index.html"},{"revision":"bb3c09dc1fc71f16486637730496a545","url":"storage/arangodb/index.html"},{"revision":"31ae28b66e6480a54fea791e17693eed","url":"storage/azureblob/index.html"},{"revision":"43a62df1b8f98fe25f11232bb19d5d17","url":"storage/badger/index.html"},{"revision":"9b7df6289106616bcd5f76f836cf6081","url":"storage/bbolt/index.html"},{"revision":"ec1c56e929f404599a6d3774d4a5b1b5","url":"storage/couchbase/index.html"},{"revision":"b4071bd9fd8c431500e91f7789e03fe8","url":"storage/dynamodb/index.html"},{"revision":"d23e39971019c3145a4e46d98488adf8","url":"storage/etcd_v1.x.x/arangodb/index.html"},{"revision":"4d8bb89b95ec7224aeab7bfaff0315f7","url":"storage/etcd_v1.x.x/azureblob/index.html"},{"revision":"d38444522aa6ccc5b0c48984ddcd323a","url":"storage/etcd_v1.x.x/badger/index.html"},{"revision":"2d58345459c14da1745649742ed2d8c2","url":"storage/etcd_v1.x.x/bbolt/index.html"},{"revision":"7057d9d0e86764a0adc2b59c7d19b357","url":"storage/etcd_v1.x.x/couchbase/index.html"},{"revision":"648cd8cbafb71008be388e8dc5e331b4","url":"storage/etcd_v1.x.x/dynamodb/index.html"},{"revision":"53df75b7f93cf38ceab2330e19e91d7c","url":"storage/etcd_v1.x.x/etcd/index.html"},{"revision":"9d4eefa649c8233c64a2abe52b0c7467","url":"storage/etcd_v1.x.x/index.html"},{"revision":"02bcb277c467fda7c00ad6ee601c31a0","url":"storage/etcd_v1.x.x/memcache/index.html"},{"revision":"55c91f09d0b93ba4ad270a56ff9f9f78","url":"storage/etcd_v1.x.x/memory/index.html"},{"revision":"c71f581589980abf2bf4dcaeb93587cc","url":"storage/etcd_v1.x.x/mongodb/index.html"},{"revision":"fd65d3b665dcd60a42ab15fd9f98dfad","url":"storage/etcd_v1.x.x/mssql/index.html"},{"revision":"bde45c296237a60bfec78180a6ff235d","url":"storage/etcd_v1.x.x/mysql/index.html"},{"revision":"8c7cf709c34d182e2bec4542376f18f6","url":"storage/etcd_v1.x.x/pebble/index.html"},{"revision":"befe18b6314f1c292bc733662c76d96f","url":"storage/etcd_v1.x.x/postgres/index.html"},{"revision":"5bba42507e536fb0ec98f0de9b24b349","url":"storage/etcd_v1.x.x/redis/index.html"},{"revision":"63d27f52e3336761837703d5c39550f7","url":"storage/etcd_v1.x.x/ristretto/index.html"},{"revision":"6d8c6389e8da92cd56668cba20b9dd9f","url":"storage/etcd_v1.x.x/s3/index.html"},{"revision":"e040511ea1894f09d4e26b58a897feab","url":"storage/etcd_v1.x.x/search-index.json"},{"revision":"490f56ed433ea2c48f64b171b6961524","url":"storage/etcd_v1.x.x/sqlite3/index.html"},{"revision":"39bb2a140481d639e17bd74ee33265d3","url":"storage/etcd/index.html"},{"revision":"87162522e6434f16fe11e22c344c1644","url":"storage/index.html"},{"revision":"a628e3d18107f45136b248652479f375","url":"storage/memcache_v1.x.x/arangodb/index.html"},{"revision":"c7c105d850fe9f6b0d10ee6759790ca0","url":"storage/memcache_v1.x.x/azureblob/index.html"},{"revision":"0eeb5a8c2ae031fec1beeb7eb8178340","url":"storage/memcache_v1.x.x/badger/index.html"},{"revision":"82532be089c7cfeceb04a832fc48b76a","url":"storage/memcache_v1.x.x/bbolt/index.html"},{"revision":"c216f5d482b0acd53d556bca98e5e039","url":"storage/memcache_v1.x.x/couchbase/index.html"},{"revision":"782223f955fc39345e5f9ddea4a6d231","url":"storage/memcache_v1.x.x/dynamodb/index.html"},{"revision":"35c3bf28e7260145a761ddb0ee67d587","url":"storage/memcache_v1.x.x/etcd/index.html"},{"revision":"9ffe3f69c37d672b9560cad18fdccb73","url":"storage/memcache_v1.x.x/index.html"},{"revision":"1283095d05207a8c914b86d53262ab4b","url":"storage/memcache_v1.x.x/memcache/index.html"},{"revision":"24b40a60ddba6bfdbb52bdf872181972","url":"storage/memcache_v1.x.x/memory/index.html"},{"revision":"d2bb875c1309e7dd0e9b276e036cb1b9","url":"storage/memcache_v1.x.x/mongodb/index.html"},{"revision":"82f76aa305d7382358f2d8e7c6faa0c9","url":"storage/memcache_v1.x.x/mssql/index.html"},{"revision":"45af7cc120be45a697ddfb5be0dbe32b","url":"storage/memcache_v1.x.x/mysql/index.html"},{"revision":"13b9938d562119ca4a0e72cddf94cd27","url":"storage/memcache_v1.x.x/pebble/index.html"},{"revision":"59e0cbf18d1de640bcdd43f948d6317b","url":"storage/memcache_v1.x.x/postgres/index.html"},{"revision":"cc6db47a3e51ec4853d3cb42d330120c","url":"storage/memcache_v1.x.x/redis/index.html"},{"revision":"17453bb1788296d28ac1babb812abeec","url":"storage/memcache_v1.x.x/ristretto/index.html"},{"revision":"882653a4660d7f82c8db781b2c2b2aa0","url":"storage/memcache_v1.x.x/s3/index.html"},{"revision":"6b85fefb8040767ed95e5437f9d57a04","url":"storage/memcache_v1.x.x/search-index.json"},{"revision":"418ec4214529573704a754eee084d950","url":"storage/memcache_v1.x.x/sqlite3/index.html"},{"revision":"3ca8a594457b46b1750fb169f66b8777","url":"storage/memcache/index.html"},{"revision":"389c5073b2648e9711cf875c80d25291","url":"storage/memory/index.html"},{"revision":"3a00e74067b588a0a781bbba0ff08ada","url":"storage/mongodb/index.html"},{"revision":"3ee205ffd544bc1dbb350062a08fb0a2","url":"storage/mssql/index.html"},{"revision":"25dd2a32402b4f1741c65be0cd14dcff","url":"storage/mysql_v1.x.x/arangodb/index.html"},{"revision":"1fcac8d08d457a7a8fbbb098d5d90125","url":"storage/mysql_v1.x.x/azureblob/index.html"},{"revision":"2628ddc404a74de08ff3870be1ce0282","url":"storage/mysql_v1.x.x/badger/index.html"},{"revision":"dc529a9b6eb0b3aa361bd88d196c33bf","url":"storage/mysql_v1.x.x/bbolt/index.html"},{"revision":"0359603e13f4f26d4c3dd58bc48bc86c","url":"storage/mysql_v1.x.x/couchbase/index.html"},{"revision":"7974f3a90fdf3147136df2b0c4b57424","url":"storage/mysql_v1.x.x/dynamodb/index.html"},{"revision":"a7597a8746a855c0fb2a3bcf6e8a1062","url":"storage/mysql_v1.x.x/etcd/index.html"},{"revision":"8df1584e6fcf4a2b6f2d970657e1c8fa","url":"storage/mysql_v1.x.x/index.html"},{"revision":"787a43e2fd886863a84151d6cbe59422","url":"storage/mysql_v1.x.x/memcache/index.html"},{"revision":"30e27ed2953aece338afa7dc421e0705","url":"storage/mysql_v1.x.x/memory/index.html"},{"revision":"85d486a6964cf3de1154ab809054caa5","url":"storage/mysql_v1.x.x/mongodb/index.html"},{"revision":"a8f0dc5b846e8c754eaf19b8c2f80078","url":"storage/mysql_v1.x.x/mssql/index.html"},{"revision":"bfdb1ccf598d3522077e0bfa80c0defc","url":"storage/mysql_v1.x.x/mysql/index.html"},{"revision":"306886d9bfa37a5f1304e08e558db6f1","url":"storage/mysql_v1.x.x/pebble/index.html"},{"revision":"64899d7cecd663aabc7b64ca080bb231","url":"storage/mysql_v1.x.x/postgres/index.html"},{"revision":"826abc96be7e7c4fa55a6292dd9b2ff3","url":"storage/mysql_v1.x.x/redis/index.html"},{"revision":"8c12b64df5e66fccaf0744b86173a29f","url":"storage/mysql_v1.x.x/ristretto/index.html"},{"revision":"5023d996e147102c658c2e1e1b4a707c","url":"storage/mysql_v1.x.x/s3/index.html"},{"revision":"d973cb44f7be0560da391c205c7be93c","url":"storage/mysql_v1.x.x/search-index.json"},{"revision":"c7f3d34134ff977d00967f08485234dd","url":"storage/mysql_v1.x.x/sqlite3/index.html"},{"revision":"46855535392de6660195abe203570118","url":"storage/mysql/index.html"},{"revision":"f795bf9233ddf2bc8a7dd51014cfb5ac","url":"storage/next/arangodb/index.html"},{"revision":"b29ae59bb4257295b6a797d3a0bcd970","url":"storage/next/azureblob/index.html"},{"revision":"3a7979d4502d5f39fdcf99ed040f93f0","url":"storage/next/badger/index.html"},{"revision":"334cf9eb832d54dd3f4988805973c531","url":"storage/next/bbolt/index.html"},{"revision":"bc1a26b56c245e5d3f9e4b5367d47464","url":"storage/next/couchbase/index.html"},{"revision":"294936b4fd211df3654c07f63242126a","url":"storage/next/dynamodb/index.html"},{"revision":"85f4a19b46125ec24e2566f0decbafd5","url":"storage/next/etcd/index.html"},{"revision":"901cf24260a2ce689b141fdc35078369","url":"storage/next/index.html"},{"revision":"5a38da8e3be73b6461e5231080762a58","url":"storage/next/memcache/index.html"},{"revision":"d2ef0f463597948c4247978224bda862","url":"storage/next/memory/index.html"},{"revision":"d1f2de7b507853a206b781c15453f5de","url":"storage/next/mongodb/index.html"},{"revision":"b8781fdf5d7100cbd2ed23a64e3f21fe","url":"storage/next/mssql/index.html"},{"revision":"8db996375472786fa0cececdff326342","url":"storage/next/mysql/index.html"},{"revision":"58376f24101998de9a2653c1240a024f","url":"storage/next/pebble/index.html"},{"revision":"c4798557e2f4b07a73207fcef24205bf","url":"storage/next/postgres/index.html"},{"revision":"2010841f07a847d36f1062e3cc50c521","url":"storage/next/redis/index.html"},{"revision":"217121f584c2fa9f43361067b2d4bcdb","url":"storage/next/ristretto/index.html"},{"revision":"1ae990e7edccace5f2eb47b9acb029c4","url":"storage/next/s3/index.html"},{"revision":"f4c7224781a470377b9644b95451b7dc","url":"storage/next/search-index.json"},{"revision":"f4302655497a9ee37c885e619c1cae88","url":"storage/next/sqlite3/index.html"},{"revision":"32ffe54daae4693fda0ca46100a43c99","url":"storage/pebble/index.html"},{"revision":"e3b4eea9722b295f393f3fdf3cfd3c6d","url":"storage/postgres/index.html"},{"revision":"e322ea9a6e10ee2205c84da61d9985bc","url":"storage/redis/index.html"},{"revision":"279d6acad283f9751334dd5b5110b03d","url":"storage/ristretto_v1.x.x/arangodb/index.html"},{"revision":"fa2ed71696ac6a3307054e6ac1a7d4fa","url":"storage/ristretto_v1.x.x/azureblob/index.html"},{"revision":"cb0057edc2478cc9e3dd57cfd297f49b","url":"storage/ristretto_v1.x.x/badger/index.html"},{"revision":"9076b68a7226b89ddc24fa00e8f7b0eb","url":"storage/ristretto_v1.x.x/bbolt/index.html"},{"revision":"585740832fab87e8fefa2a48c575955d","url":"storage/ristretto_v1.x.x/couchbase/index.html"},{"revision":"c088d7eca282411b97eec75f14939da1","url":"storage/ristretto_v1.x.x/dynamodb/index.html"},{"revision":"65e88881b2bdbbf3c891fc8f93ea4d04","url":"storage/ristretto_v1.x.x/etcd/index.html"},{"revision":"13e8a847802d1648e8ab02d6ddd4eaeb","url":"storage/ristretto_v1.x.x/index.html"},{"revision":"63ffb0a58baefee3cc132d64a94309a7","url":"storage/ristretto_v1.x.x/memcache/index.html"},{"revision":"d078b7803db11fe70da69c91c9f298d2","url":"storage/ristretto_v1.x.x/memory/index.html"},{"revision":"8cb6f4ba0e4182d55bac45ae760390b4","url":"storage/ristretto_v1.x.x/mongodb/index.html"},{"revision":"4633ce2dd602e1dc860e578c66b543a1","url":"storage/ristretto_v1.x.x/mssql/index.html"},{"revision":"07874b272898bd04caff3475c42d6754","url":"storage/ristretto_v1.x.x/mysql/index.html"},{"revision":"856374205f399dc948348559452a910f","url":"storage/ristretto_v1.x.x/pebble/index.html"},{"revision":"d30d1cf630fc376af72b84c39a772dfa","url":"storage/ristretto_v1.x.x/postgres/index.html"},{"revision":"de363a9bb5be35d26ff78195b06af2ad","url":"storage/ristretto_v1.x.x/redis/index.html"},{"revision":"3249293819ab71633045860fd5e6f6f0","url":"storage/ristretto_v1.x.x/ristretto/index.html"},{"revision":"1aa9aeab01c1c2663cd4d3370f2d31e3","url":"storage/ristretto_v1.x.x/s3/index.html"},{"revision":"738cd2b7e53c44a24f47ed3e867e1f95","url":"storage/ristretto_v1.x.x/search-index.json"},{"revision":"9a1d1da7963900ff71204f3d71d037ee","url":"storage/ristretto_v1.x.x/sqlite3/index.html"},{"revision":"7d0d6ee8ac28d08068e2e1cb12c73e34","url":"storage/ristretto/index.html"},{"revision":"e2dd4ea8828757b320c7aa1f6b5fddb2","url":"storage/s3/index.html"},{"revision":"c174244f9448dfeb957856ba704e616a","url":"storage/sqlite3_v1.x.x/arangodb/index.html"},{"revision":"bac28a62bd1ab11efc822a9b5e15c448","url":"storage/sqlite3_v1.x.x/azureblob/index.html"},{"revision":"e7b7b44c1d46d834614f58840dd5e8e2","url":"storage/sqlite3_v1.x.x/badger/index.html"},{"revision":"7ed9ab0c50ad3c3ee6f9da766133b7bc","url":"storage/sqlite3_v1.x.x/bbolt/index.html"},{"revision":"d8c3dc16553dd64fc750080721efddf7","url":"storage/sqlite3_v1.x.x/couchbase/index.html"},{"revision":"93e8d0e3d3b22f371745e703b2e2146c","url":"storage/sqlite3_v1.x.x/dynamodb/index.html"},{"revision":"5e1445a15386f855a6b805496f876605","url":"storage/sqlite3_v1.x.x/etcd/index.html"},{"revision":"8cf1cee339c762ba068f0c332a74e32d","url":"storage/sqlite3_v1.x.x/index.html"},{"revision":"d4442620fd6040e24227932dee12ab5c","url":"storage/sqlite3_v1.x.x/memcache/index.html"},{"revision":"6fb333ed2234652c6e638bef92b37ac3","url":"storage/sqlite3_v1.x.x/memory/index.html"},{"revision":"90d46af39c2d18bf0e1848217bb49d52","url":"storage/sqlite3_v1.x.x/mongodb/index.html"},{"revision":"d0359d1629d8e48db172ec9e1faf39a9","url":"storage/sqlite3_v1.x.x/mssql/index.html"},{"revision":"54370078b9d39ae7ac5d1f2475b08bb6","url":"storage/sqlite3_v1.x.x/mysql/index.html"},{"revision":"b8be3b9bf8c741c450dc32dfb4732ad2","url":"storage/sqlite3_v1.x.x/pebble/index.html"},{"revision":"b5bbbdff94b03d80735208ee420d3843","url":"storage/sqlite3_v1.x.x/postgres/index.html"},{"revision":"452f47653253caefaca96e8cade5afcc","url":"storage/sqlite3_v1.x.x/redis/index.html"},{"revision":"947ffff47df43689d043c95da9b6f69c","url":"storage/sqlite3_v1.x.x/ristretto/index.html"},{"revision":"522aaaf104e24c2dad9b8baa56948cb4","url":"storage/sqlite3_v1.x.x/s3/index.html"},{"revision":"f70b9dfa65931f2af9fff79ad3f9ecd1","url":"storage/sqlite3_v1.x.x/search-index.json"},{"revision":"775bedff365870b13232791188886071","url":"storage/sqlite3_v1.x.x/sqlite3/index.html"},{"revision":"41278c29aea8c653a26f1f6e58a7d509","url":"storage/sqlite3/index.html"},{"revision":"0c6b5782336771cd72292619f2fbe82b","url":"template/ace/index.html"},{"revision":"92c396ce056b6e6e2e85a46b326148e2","url":"template/amber/index.html"},{"revision":"17125eb1e37111f1ebc941df47857bb6","url":"template/django/index.html"},{"revision":"a06bbfd48464840e93738571702c4ce4","url":"template/handlebars/index.html"},{"revision":"66a0838894eb5b06da7cb46bd58ba039","url":"template/html/index.html"},{"revision":"331b76a04c157a372f032a2bdd8fea61","url":"template/html/TEMPLATES_CHEATSHEET/index.html"},{"revision":"f85e56b6bea0d0e288c4949ce74b6f96","url":"template/index.html"},{"revision":"d1d181a4143ccec28c54852b2b9d436c","url":"template/jet/index.html"},{"revision":"bc548ef654735dc7df170bf29515fd3a","url":"template/mustache/index.html"},{"revision":"b1bb3daef11acc1cfdcd8b072591ff40","url":"template/next/ace/index.html"},{"revision":"20d32626ec2d3dc99c9885501f38014d","url":"template/next/amber/index.html"},{"revision":"564cecb2b661db4fdd63e7c83a09cbfd","url":"template/next/django/index.html"},{"revision":"76944c32ece3eeec9b31be3277707d94","url":"template/next/handlebars/index.html"},{"revision":"eeff2f258316359701fac1156f08c3de","url":"template/next/html/index.html"},{"revision":"674c8b027fce26497cdb6ca2a2f580bc","url":"template/next/html/TEMPLATES_CHEATSHEET/index.html"},{"revision":"c9fef27f61638415219478b2963ab036","url":"template/next/index.html"},{"revision":"2712b76e976f7b915e74992949c43eda","url":"template/next/jet/index.html"},{"revision":"1c858daa546d1682908ab8e10b67cbb0","url":"template/next/mustache/index.html"},{"revision":"1c10c258c6a90dab586ba93cf85e62ea","url":"template/next/pug/index.html"},{"revision":"b1b2f6be9b93d39115f78f92155bd067","url":"template/next/search-index.json"},{"revision":"5e4d265325e481727f13bb051f1c41ee","url":"template/next/slim/index.html"},{"revision":"52f750f17f84fab715c9e680719573f3","url":"template/pug/index.html"},{"revision":"178768ba69f9d343c05571c64ebfe760","url":"template/slim/index.html"},{"revision":"8084f2f83a2f477735ed11e2bf0e8213","url":"v/1.x/api/app/index.html"},{"revision":"08b749d0b0d95853310eb8d8cb6106d8","url":"v/1.x/api/ctx/index.html"},{"revision":"b785b5746370eebb99f2ee0869bd7c1a","url":"v/1.x/api/middleware/index.html"},{"revision":"ea032e7aa0080b3a208b1f36dd4b3e42","url":"v/1.x/category/api/index.html"},{"revision":"05f4a343184e6860b0ff5ee3d300a985","url":"v/1.x/category/guide/index.html"},{"revision":"43020c9060b711302b75140744628b1b","url":"v/1.x/category/misc/index.html"},{"revision":"6ed7cc0b075f329589b4401d334837af","url":"v/1.x/guide/error-handling/index.html"},{"revision":"36bb8767aaf25e55f7243dfbce1f06d1","url":"v/1.x/guide/grouping/index.html"},{"revision":"270595eab09ebe6d8ea33a90976c9797","url":"v/1.x/guide/routing/index.html"},{"revision":"46f9f665213c2a17baa88d4fb42bad58","url":"v/1.x/guide/templates/index.html"},{"revision":"a87db992f4d13bf4aa792129f43a42d9","url":"v/1.x/guide/validating/index.html"},{"revision":"4d5bf161ff11ab65805a05e165db85c0","url":"v/1.x/index.html"},{"revision":"060cd4ea1beb6b3a8224a6e8b6692d10","url":"v/1.x/misc/benchmarks/index.html"},{"revision":"27fe56b7b2ab21f8d3e02c0e09958cef","url":"v/1.x/misc/faq/index.html"},{"revision":"fab2f7c49b610184f361ead92ccebfee","url":"v1.x/api/app/index.html"},{"revision":"406ca2258a343b6b4df74defa7543948","url":"v1.x/api/ctx/index.html"},{"revision":"f346f691bd1dbfaa32eac6a8cfbeb8d5","url":"v1.x/api/middleware/index.html"},{"revision":"c684d58923c1ad8e6a0ce91088fcfdff","url":"v1.x/category/api/index.html"},{"revision":"aa6313b57e0aa181a4dca4824b9bc0b3","url":"v1.x/category/guide/index.html"},{"revision":"e56752b767af7a1668cacfe17e8d3156","url":"v1.x/category/misc/index.html"},{"revision":"a2d9ce20d421e194e4de451bb2a18106","url":"v1.x/guide/error-handling/index.html"},{"revision":"fb0d8fb6cadd0d30588c0068e8a6b96a","url":"v1.x/guide/grouping/index.html"},{"revision":"d55b8a04082f726ddefe3fea35a1042f","url":"v1.x/guide/routing/index.html"},{"revision":"4260155289d5e26497e2124703311983","url":"v1.x/guide/templates/index.html"},{"revision":"497f6e2538f132bea6d141f08d72f022","url":"v1.x/guide/validating/index.html"},{"revision":"0d98746ddb7ad83f059dc76f67319339","url":"v1.x/index.html"},{"revision":"f5d860068aa91912b50ff58ee5e82d8f","url":"v1.x/misc/benchmarks/index.html"},{"revision":"f7ebad35537bd0083579e0d620eacb68","url":"v1.x/misc/faq/index.html"},{"revision":"847c2ed865fdde0d21b6b11011104a43","url":"v1.x/search-index.json"},{"revision":"a2d0b99576a1a51f46d2ee84ec167336","url":"assets/images/benchmark_alloc-dec96faa96e07bcec84f40a4dfc8d187.png"},{"revision":"a7a3e37e6499fcf3fa9d793fd24339b9","url":"assets/images/benchmark_latency-b67a470cf1b261c3092b80cbf42ef16b.png"},{"revision":"c5b05974efbe649f1fe9fcbf15a8ff82","url":"assets/images/benchmark-18e23fcf42afc7f5e12ea23aceb27885.png"},{"revision":"2cdc5220f6027f0106431ed9756ef0ff","url":"assets/images/benchmark-pipeline-b49cbb1db36293acdfb0e6c96d844e1a.png"},{"revision":"1276aea996275055bfbb406a62170931","url":"assets/images/concurrency_alloc-6f2d485576803f7de2fe0a1deca21a09.png"},{"revision":"56065bebf88e6d317d32fa056044ab49","url":"assets/images/concurrency_latency-5a223848a8bee8df21cc02451f0db2b6.png"},{"revision":"c16f8be0910b1d55e73abb3cf14fcc81","url":"assets/images/concurrency-1307e1d23c01a561a4b2a0f5bdd7e1bc.png"},{"revision":"52e02024a0fc9efdeb174fbd2cb5eaa8","url":"assets/images/concurrency-pipeline-b0d3c211d9c7cb5474fd191223a41241.png"},{"revision":"f8a5f57ca71eb1e0f38e676552ba8a0b","url":"assets/images/data_updates_express-2f55d1b0975ec391d29d823b48faf617.png"},{"revision":"ef41ee04899eb8d1a4a34acb4d7fc20a","url":"assets/images/data_updates-3be85c418d6971091854c5086af9ed10.png"},{"revision":"716cadd67372190364a5f07efbb477c2","url":"assets/images/graph-afbd400b1c3e1c6f137dae3cfc1890ce.svg"},{"revision":"7a707deb897d8b72d098d0ee46d3b44d","url":"assets/images/json_express-aa631b2de86808970aa4bb7c9c9d3edf.png"},{"revision":"0b57d54569e518d2112a0a515042ea63","url":"assets/images/json-62868f61b34e3790f3a8b3b52b1a3a3b.png"},{"revision":"316f574189fa0067fb53b53d020b193a","url":"assets/images/multiple_queries_express-ec4dc8013e85dc2a2fa4f5eeb55ce8dd.png"},{"revision":"b3beb07717c41c5e0f7561ae6c479fbf","url":"assets/images/multiple_queries-2c2e81674208b90b9aeb1cb791a3f0dc.png"},{"revision":"480e9b557cc822c532a998a2ed724bfc","url":"assets/images/plaintext_express-ef6522843412bb5b14b3c6b6a4f032de.png"},{"revision":"45bd9af55fba9dc062200831ac57c5e6","url":"assets/images/plaintext-e25d187f782d18fdd35b84e3d7c625eb.png"},{"revision":"5b4ee8112e04d79df5a0aa39acca791b","url":"assets/images/single_query_express-d8e41422b4f5c0a9496272e4a66a97c4.png"},{"revision":"8a5d82762f28eca9a722e75f3f12cff8","url":"assets/images/single_query-4f7782d3c3ff91e92ac27e382b09f6ac.png"},{"revision":"79a9ef885732dee2637157a4762faf7e","url":"assets/images/support-discord-baf5f38231088813dfbc3ccdc6966634.png"},{"revision":"a2d0b99576a1a51f46d2ee84ec167336","url":"img/benchmark_alloc.png"},{"revision":"a7a3e37e6499fcf3fa9d793fd24339b9","url":"img/benchmark_latency.png"},{"revision":"2cdc5220f6027f0106431ed9756ef0ff","url":"img/benchmark-pipeline.png"},{"revision":"c5b05974efbe649f1fe9fcbf15a8ff82","url":"img/benchmark.png"},{"revision":"1276aea996275055bfbb406a62170931","url":"img/concurrency_alloc.png"},{"revision":"56065bebf88e6d317d32fa056044ab49","url":"img/concurrency_latency.png"},{"revision":"52e02024a0fc9efdeb174fbd2cb5eaa8","url":"img/concurrency-pipeline.png"},{"revision":"c16f8be0910b1d55e73abb3cf14fcc81","url":"img/concurrency.png"},{"revision":"f8a5f57ca71eb1e0f38e676552ba8a0b","url":"img/data_updates_express.png"},{"revision":"ef41ee04899eb8d1a4a34acb4d7fc20a","url":"img/data_updates.png"},{"revision":"3b4420315b7baefee56d433e4c78f268","url":"img/favicon.png"},{"revision":"716cadd67372190364a5f07efbb477c2","url":"img/graph.svg"},{"revision":"354ea4a4bcaad920949e253d33683869","url":"img/icons/icon-192x192.png"},{"revision":"4039790fa05a5dc7e9259485b4324433","url":"img/icons/icon-256x256.png"},{"revision":"93b99bdaaad38831b46a296dfeab4863","url":"img/icons/icon-384x384.png"},{"revision":"096c82692efe3ec986ab2b4fc5d60aea","url":"img/icons/icon-512x512.png"},{"revision":"7a707deb897d8b72d098d0ee46d3b44d","url":"img/json_express.png"},{"revision":"0b57d54569e518d2112a0a515042ea63","url":"img/json.png"},{"revision":"171b53337ba05d4e62332e230f3c212b","url":"img/logo-dark.svg"},{"revision":"e2c2dc9b6b5f44183247f7c48d65ccef","url":"img/logo.svg"},{"revision":"316f574189fa0067fb53b53d020b193a","url":"img/multiple_queries_express.png"},{"revision":"b3beb07717c41c5e0f7561ae6c479fbf","url":"img/multiple_queries.png"},{"revision":"480e9b557cc822c532a998a2ed724bfc","url":"img/plaintext_express.png"},{"revision":"45bd9af55fba9dc062200831ac57c5e6","url":"img/plaintext.png"},{"revision":"5b4ee8112e04d79df5a0aa39acca791b","url":"img/single_query_express.png"},{"revision":"8a5d82762f28eca9a722e75f3f12cff8","url":"img/single_query.png"},{"revision":"79a9ef885732dee2637157a4762faf7e","url":"img/support-discord.png"}],s=new R({fallbackToNetwork:!0});e.offlineMode&&(s.addToCacheList(t),e.debug&&console.log("[Docusaurus-PWA][SW]: addToCacheList",{precacheManifest:t})),await async function(e){}(),self.addEventListener("install",(t=>{e.debug&&console.log("[Docusaurus-PWA][SW]: install event",{event:t}),t.waitUntil(s.install(t))})),self.addEventListener("activate",(t=>{e.debug&&console.log("[Docusaurus-PWA][SW]: activate event",{event:t}),t.waitUntil(s.activate(t))})),self.addEventListener("fetch",(async t=>{if(e.offlineMode){const a=t.request.url,n=function(e){const t=new URL(e,self.location.href);return t.origin!==self.location.origin?[]:(t.search="",t.hash="",[t.href,`${t.href}${t.pathname.endsWith("/")?"":"/"}index.html`])}(a);for(const i of n){const r=s.getCacheKeyForURL(i);if(r){const s=caches.match(r);e.debug&&console.log("[Docusaurus-PWA][SW]: serving cached asset",{requestURL:a,possibleURL:i,possibleURLs:n,cacheKey:r,cachedResponse:s}),t.respondWith(s);break}}}})),self.addEventListener("message",(async t=>{e.debug&&console.log("[Docusaurus-PWA][SW]: message event",{event:t});const s=t.data?.type;"SKIP_WAITING"===s&&self.skipWaiting()}))})()})()})(); \ No newline at end of file diff --git a/template/ace/index.html b/template/ace/index.html index 7fa239d4c69..4d054472100 100644 --- a/template/ace/index.html +++ b/template/ace/index.html @@ -6,8 +6,8 @@ Ace | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Ace is a template engine create by yossi, to see the original syntax documentation please click here

Basic Example

./views/index.ace

= include ./views/partials/header .

h1 {{.Title}}

= include ./views/partials/footer .

./views/partials/header.ace

h1 Header

./views/partials/footer.ace

h1 Footer

./views/layouts/main.ace

= doctype html
html
head
title Main
body
{{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/ace/v2"
)

func main() {
// Create a new engine
engine := ace.New("./views", ".ace")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".ace"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Ace is a template engine create by yossi, to see the original syntax documentation please click here

Basic Example

./views/index.ace

= include ./views/partials/header .

h1 {{.Title}}

= include ./views/partials/footer .

./views/partials/header.ace

h1 Header

./views/partials/footer.ace

h1 Footer

./views/layouts/main.ace

= doctype html
html
head
title Main
body
{{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/ace/v2"
)

func main() {
// Create a new engine
engine := ace.New("./views", ".ace")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".ace"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/amber/index.html b/template/amber/index.html index 96ecb198cb4..ae039d352f1 100644 --- a/template/amber/index.html +++ b/template/amber/index.html @@ -6,8 +6,8 @@ Amber | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Amber is a template engine create by eknkc, to see the original syntax documentation please click here

Basic Example

./views/index.amber

import ./views/partials/header

h1 #{Title}

import ./views/partials/footer

./views/partials/header.amber

h1 Header

./views/partials/footer.amber

h1 Footer

./views/layouts/main.amber

doctype html
html
head
title Main
body
#{embed()}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/amber/v2"
)

func main() {
// Create a new engine
engine := amber.New("./views", ".amber")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".amber"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Amber is a template engine create by eknkc, to see the original syntax documentation please click here

Basic Example

./views/index.amber

import ./views/partials/header

h1 #{Title}

import ./views/partials/footer

./views/partials/header.amber

h1 Header

./views/partials/footer.amber

h1 Footer

./views/layouts/main.amber

doctype html
html
head
title Main
body
#{embed()}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/amber/v2"
)

func main() {
// Create a new engine
engine := amber.New("./views", ".amber")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".amber"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/django/index.html b/template/django/index.html index 4b3b3ce7f22..f7fb5f10b02 100644 --- a/template/django/index.html +++ b/template/django/index.html @@ -6,8 +6,8 @@ Django | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Django is a template engine create by flosch, to see the original syntax documentation please click here

Basic Example

./views/index.django

{% include "partials/header.django" %}

<h1>{{ Title }}</h1>

{% include "partials/footer.django" %}

./views/partials/header.django

<h2>Header</h2>

./views/partials/footer.django

<h2>Footer</h2>

./views/layouts/main.django

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/django/v3"
)

func main() {
// Create a new engine
engine := django.New("./views", ".django")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".django"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

Using embedded file system (1.16+ only)

When using the // go:embed directive, resolution of inherited templates using django's {% extend '' %} keyword fails when instantiating the template engine with django.NewFileSystem(). In that case, use the django.NewPathForwardingFileSystem() function to instantiate the template engine.

This function provides the proper configuration for resolving inherited templates.

Assume you have the following files:

then

package main

import (
"log"
"embed"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/django/v3"
)

//go:embed views
var viewsAsssets embed.FS

func main() {
// Create a new engine
engine := NewPathForwardingFileSystem(http.FS(viewsAsssets), "/views", ".django")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render descendant
return c.Render("descendant", fiber.Map{
"greeting": "World",
})
})

log.Fatal(app.Listen(":3000"))
}

Register and use custom functions

// My custom function
func Nl2brHtml(value interface{}) string {
if str, ok := value.(string); ok {
return strings.Replace(str, "\n", "<br />", -1)
}
return ""
}

// Create a new engine
engine := django.New("./views", ".django")

// register functions
engine.AddFunc("nl2br", Nl2brHtml)

// Pass the engine to the Views
app := fiber.New(fiber.Config{Views: engine})

in the handler

c.Render("index", fiber.Map{
"Fiber": "Hello, World!\n\nGreetings from Fiber Team",
})

./views/index.django

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"></head>
<body>
{{ nl2br(Fiber) }}
</body>
</html>

Output:

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"></head>
<body>
Hello, World!<br /><br />Greetings from Fiber Team
</body>
</html>
- - +Linter

Django is a template engine create by flosch, to see the original syntax documentation please click here

Basic Example

./views/index.django

{% include "partials/header.django" %}

<h1>{{ Title }}</h1>

{% include "partials/footer.django" %}

./views/partials/header.django

<h2>Header</h2>

./views/partials/footer.django

<h2>Footer</h2>

./views/layouts/main.django

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/django/v3"
)

func main() {
// Create a new engine
engine := django.New("./views", ".django")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".django"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

Using embedded file system (1.16+ only)

When using the // go:embed directive, resolution of inherited templates using django's {% extend '' %} keyword fails when instantiating the template engine with django.NewFileSystem(). In that case, use the django.NewPathForwardingFileSystem() function to instantiate the template engine.

This function provides the proper configuration for resolving inherited templates.

Assume you have the following files:

then

package main

import (
"log"
"embed"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/django/v3"
)

//go:embed views
var viewsAsssets embed.FS

func main() {
// Create a new engine
engine := NewPathForwardingFileSystem(http.FS(viewsAsssets), "/views", ".django")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render descendant
return c.Render("descendant", fiber.Map{
"greeting": "World",
})
})

log.Fatal(app.Listen(":3000"))
}

Register and use custom functions

// My custom function
func Nl2brHtml(value interface{}) string {
if str, ok := value.(string); ok {
return strings.Replace(str, "\n", "<br />", -1)
}
return ""
}

// Create a new engine
engine := django.New("./views", ".django")

// register functions
engine.AddFunc("nl2br", Nl2brHtml)

// Pass the engine to the Views
app := fiber.New(fiber.Config{Views: engine})

in the handler

c.Render("index", fiber.Map{
"Fiber": "Hello, World!\n\nGreetings from Fiber Team",
})

./views/index.django

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"></head>
<body>
{{ nl2br(Fiber) }}
</body>
</html>

Output:

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"></head>
<body>
Hello, World!<br /><br />Greetings from Fiber Team
</body>
</html>
+ + \ No newline at end of file diff --git a/template/handlebars/index.html b/template/handlebars/index.html index 015b941cc1b..3df3235b188 100644 --- a/template/handlebars/index.html +++ b/template/handlebars/index.html @@ -6,8 +6,8 @@ Handlebars | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Handlebars is a template engine create by aymerick, to see the original syntax documentation please click here

Basic Example

./views/index.hbs

{{> 'partials/header' }}

<h1>{{Title}}</h1>

{{> 'partials/footer' }}

./views/partials/header.hbs

<h2>Header</h2>

./views/partials/footer.hbs

<h2>Footer</h2>

./views/layouts/main.hbs

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/handlebars/v2"
)

func main() {
// Create a new engine
engine := handlebars.New("./views", ".hbs")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".hbs"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Handlebars is a template engine create by aymerick, to see the original syntax documentation please click here

Basic Example

./views/index.hbs

{{> 'partials/header' }}

<h1>{{Title}}</h1>

{{> 'partials/footer' }}

./views/partials/header.hbs

<h2>Header</h2>

./views/partials/footer.hbs

<h2>Footer</h2>

./views/layouts/main.hbs

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/handlebars/v2"
)

func main() {
// Create a new engine
engine := handlebars.New("./views", ".hbs")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".hbs"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/html/TEMPLATES_CHEATSHEET/index.html b/template/html/TEMPLATES_CHEATSHEET/index.html index 84e10eccf99..95bd03fede3 100644 --- a/template/html/TEMPLATES_CHEATSHEET/index.html +++ b/template/html/TEMPLATES_CHEATSHEET/index.html @@ -6,13 +6,13 @@ Golang Templates Cheatsheet | Fiber - - + +
-
Version: slim_v2.x.x

Golang Templates Cheatsheet

The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.


Table of Contents


Parsing and Creating Templates

Naming Templates

There is no defined file extension for Go templates. One of the most popular is .tmpl supported by vim-go and referenced in the text/template godocs. The extension .gohtml supports syntax highlighting in both Atom and GoSublime editors. Finally analysis of large Go codebases finds that .tpl is often used by developers. While the extension is not important it is still good to be consistent within a project for clarity.


Creating a Template

tpl, err := template.Parse(filename) will get the template at filename and store it in tpl. tpl can then be executed to show the template.


Parsing Multiple Templates

template.ParseFiles(filenames) takes a list of filenames and stores all templates. template.ParseGlob(pattern) will find all templates matching the pattern and store the templates.


Executing Templates

Execute a Single Template

Once a template has been parsed there are two options to execute them. A single template tpl can be executed using tpl.Execute(io.Writer, data). The content of tpl will be written to the io.Writer. Data is an interface passed to the template that will be useable in the template.


Executing a Named Template

tpl.ExecuteTemplate(io.Writer, name, data) works the same as execute but allows for a string name of the template the user wants to execute.


Template Encoding and HTML

Contextual Encoding

Go’s html/template package does encoding based on the context of the code. As a result, html/template encodes any characters that need encoding to be rendered correctly.

For example the < and > in "<h1>A header!</h1>" will be encoded as &lt;h1&gt;A header!&lt;/h1&gt; .

Type template.HTML can be used to skip encoding by telling Go the string is safe. template.HTML("<h1>A Safe header</h1>") will then be <h1>A Safe header</h1> . Using this type with user input is dangerous and leaves the application vulnerable.

The go html/template package is aware of attributes within the template and will encode values differently based on the attribute.

Go templates can also be used with javascript. Structs and maps will be expanded into JSON objects and quotes will be added to strings for use in function parameters and as variable values.

    // Go
type Cat struct {
Name string
Age int
}

kitten := Cat{"Sam", 12}
// Template
<script>
var cat = {{.kitten}}
</script>
    // Javascript
var cat = {"Name":"Sam", "Age" 12}

Safe Strings and HTML Comments

The html/template package will remove any comments from a template by default. This can cause issues when comments are necessary such as detecting internet explorer.

<!--[if IE]>
Place content here to target all Internet Explorer users.
<![endif]-->

We can use the Custom Functions method (Globally) to create a function that returns html preserving comments. Define a function htmlSafe in the FuncMap of the template.

    testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"htmlSafe": func(html string) template.HTML {
return template.HTML(html)
},
}).ParseFiles("hello.gohtml")

This function takes a string and produces the unaltered HTML code. This function can be used in a template like so to preserve the comments <!--[if IE 6]> and <![endif]--> :

    {{htmlSafe "<!--[if IE 6]>" }}
<meta http-equiv="Content-Type" content="text/html; charset=Unicode">
{{ htmlSafe "<![endif]-->" }}

Template Variables

The dot character (.)

A template variable can be a boolean, string, character, integer, floating-point, imaginary, or complex constant in Go syntax. Data passed to the template can be accessed using dot {{ . }}.

If the data is a complex type then it’s fields can be accessed using the dot with the field name {{ .FieldName }}.

Dots can be chained together if the data contains multiple complex structures. {{ .Struct.StructTwo.Field }}


Variables in Templates

Data passed to the template can be saved in a variable and used throughout the template. {{$number := .}} We use the $number to create a variable then initialize it with the value passed to the template. To use the variable we call it in the template with {{$number}}.

    {{$number := .}}
<h1> It is day number {{$number}} of the month </h1>
    var tpl *template.Template

tpl = template.Must(template.ParseFiles("templateName"))

err := tpl.ExecuteTemplate(os.Stdout, "templateName", 23)

In this example we pass 23 to the template and stored in the $number variable which can be used anywhere in the template


Template Actions

If/Else Statements

Go templates support if/else statements like many programming languages. We can use the if statement to check for values, if it doesn’t exist we can use an else value. The empty values are false, 0, any nil pointer or interface value, and any array, slice, map, or string of length zero.

<h1>Hello, {{if .Name}} {{.Name}} {{else}} Anonymous {{end}}!</h1>

If .Name exists then Hello, Name will be printed (replaced with the name value) otherwise it will print Hello, Anonymous.

Templates also provide the else if statment {{else if .Name2 }} which can be used to evaluate other options after an if.


Removing Whitespace

Adding different values to a template can add various amounts of whitespace. We can either change our template to better handle it, by ignoring or minimizing effects, or we can use the minus sign - within out template.

<h1>Hello, {{if .Name}} {{.Name}} {{- else}} Anonymous {{- end}}!</h1>

Here we are telling the template to remove all spaces between the Name variable and whatever comes after it. We are doing the same with the end keyword. This allows us to have whitespace within the template for easier reading but remove it in production.


Range Blocks

Go templates have a range keyword to iterate over all objects in a structure. Suppose we had the Go structures:

    type Item struct {
Name string
Price int
}

type ViewData struct {
Name string
Items []Item
}

We have an Item, with a name and price, then a ViewData which is the structure sent to the template. Consider the template containing the following:

{{range .Items}}
<div class="item">
<h3 class="name">{{.Name}}</h3>
<span class="price">${{.Price}}</span>
</div>
{{end}}

For each Item in the range of Items (in the ViewData structure) get the Name and Price of that item and create html for each Item automatically. Within a range each Item becomes the {{.}} and the item properties therefore become {{.Name}} or {{.Price}} in this example.


Template Functions

The template package provides a list of predefined global functions. Below are some of the most used.


Indexing structures in Templates

If the data passed to the template is a map, slice, or array it can be indexed from the template. We use {{index x number}} where index is the keyword, x is the data and number is a integer for the index value. If we had {{index names 2}} it is equivalent to names[2]. We can add more integers to index deeper into data. {{index names 2 3 4}} is equivalent to names[2][3][4].

<body>
<h1>{{index .FavNums 2 }}</h1>
</body>
    type person struct {
Name string
FavNums []int
}

func main() {

tpl := template.Must(template.ParseGlob("*.gohtml"))
tpl.Execute(os.Stdout, &person{"Curtis", []int{7, 11, 94}})
}

This code example passes a person structure and gets the 3rd favourite number from the FavNums slice.


The and Function

The and function returns the boolean AND of its arguments by returning the first empty argument or the last argument. and x y behaves logically as if x then y else x . Consider the following go code

    type User struct {
Admin bool
}

type ViewData struct {
*User
}

Pass a ViewData with a User that has Admin set true to the following template


{{if and .User .User.Admin}}
You are an admin user!
{{else}}
Access denied!
{{end}}

The result will be You are an admin user!. However if the ViewData did not include a *User object or Admin was set as false then the result will be Access denied!.


The or Function

The or function operates similarly to the and function however will stop at the first true. or x y is equivalent to if x then x else y so y will never be evaluated if x is not empty.


The not Function

The not function returns the boolean negation of the argument.

    {{ if not .Authenticated}}
Access Denied!
{{ end }}

Template Comparison Functions

Comparisons

The html/template package provides a variety of functions to do comparisons between operators. The operators may only be basic types or named basic types such as type Temp float32 Remember that template functions take the form {{ function arg1 arg2 }}.

  • eq Returns the result of arg1 == arg2
  • ne Returns the result of arg1 != arg2
  • lt Returns the result of arg1 < arg2
  • le Returns the result of arg1 <= arg2
  • gt Returns the result of arg1 > arg2
  • ge Returns the result of arg1 >= arg2

Of special note eq can be used with two or more arguments by comparing all arguments to the first. {{ eq arg1 arg2 arg3 arg4}} will result in the following logical expression:

arg1==arg2 || arg1==arg3 || arg1==arg4


Nested Templates and Layouts

Nesting Templates

Nested templates can be used for parts of code frequently used across templates, a footer or header for example. Rather than updating each template separately we can use a nested template that all other templates can use. You can define a template as follows:

    {{define "footer"}}
<footer>
<p>Here is the footer</p>
</footer>
{{end}}

A template named “footer” is defined which can be used in other templates like so to add the footer template content into the other template:

    {{template "footer"}}

Passing Variables between Templates

The template action used to include nested templates also allows a second parameter to pass data to the nested template.

// Define a nested template called header 
{{define "header"}}
<h1>{{.}}</h1>
{{end}}

// Call template and pass a name parameter
{{range .Items}}
<div class="item">
{{template "header" .Name}}
<span class="price">${{.Price}}</span>
</div>
{{end}}

We use the same range to loop through Items as before but we pass the name to the header template each time in this simple example.


Creating Layouts

Glob patterns specify sets of filenames with wildcard characters. The template.ParseGlob(pattern string) function will parse all templates that match the string pattern. template.ParseFiles(files...) can also be used with a list of file names.

The templates are named by default based on the base names of the argument files. This mean views/layouts/hello.gohtml will have the name hello.gohtml . If the template has a `{{define “templateName”}} within it then that name will be usable.

A specific template can be executed using t.ExecuteTemplate(w, "templateName", nil) . t is an object of type Template, w is type io.Writer such as an http.ResponseWriter, Then there is the name of the template to execute, and finally passing any data to the template, in this case a nil value.

Example main.go file

    // Omitted imports & package

var LayoutDir string = "views/layouts"
var bootstrap *template.Template

func main() {
var err error
bootstrap, err = template.ParseGlob(LayoutDir + "/*.gohtml")
if err != nil {
panic(err)
}

http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
}

func handler(w http.ResponseWriter, r *http.Request) {
bootstrap.ExecuteTemplate(w, "bootstrap", nil)
}

All .gohtml files are parsed in main. When route / is reached the template defined as bootstrap is executed using the handler function.

Example views/layouts/bootstrap.gohtml file

    {{define "bootstrap"}}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Go Templates</title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<h1>Filler header</h1>
<p>Filler paragraph</p>
</div>
<!-- jquery & Bootstrap JS -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"
</script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
</script>
</body>
</html>
{{end}}

Templates Calling Functions

Function Variables (calling struct methods)

We can use templates to call the methods of objects in the template to return data. Consider the User struct with the following method.

    type User struct {
ID int
Email string
}

func (u User) HasPermission(feature string) bool {
if feature == "feature-a" {
return true
} else {
return false
}
}

When a type User has been passed to the template we can then call this method from the template.

{{if .User.HasPermission "feature-a"}}
<div class="feature">
<h3>Feature A</h3>
<p>Some other stuff here...</p>
</div>
{{else}}
<div class="feature disabled">
<h3>Feature A</h3>
<p>To enable Feature A please upgrade your plan</p>
</div>
{{end}}

The template checks if the User HasPermission for the feature and renders depending on the result.


Function Variables (call)

If the Method HasPermission has to change at times then the Function Variables (Methods) implementation may not fit the design. Instead a HasPermission func(string) bool attribute can be added on the User type. This can then have a function assigned to it at creation.

    // Structs
type ViewData struct {
User User
}

type User struct {
ID int
Email string
HasPermission func(string) bool
}

// Example of creating a ViewData
vd := ViewData{
User: User{
ID: 1,
Email: "curtis.vermeeren@gmail.com",
// Create the HasPermission function
HasPermission: func(feature string) bool {
if feature == "feature-b" {
return true
}
return false
},
},
}

// Executing the ViewData with the template
err := testTemplate.Execute(w, vd)

We need to tell the Go template that we want to call this function so we must change the template from the Function Variables (Methods) implementation to do this. We use the call keyword supplied by the go html/template package. Changing the previous template to use call results in:

{{if (call .User.HasPermission "feature-b")}}
<div class="feature">
<h3>Feature B</h3>
<p>Some other stuff here...</p>
</div>
{{else}}
<div class="feature disabled">
<h3>Feature B</h3>
<p>To enable Feature B please upgrade your plan</p>
</div>
{{end}}

Custom Functions

Another way to call functions is to create custom functions with template.FuncMap . This method creates global methods that can be used throughout the entire application. FuncMap has type map[string]interface{} mapping a string, the function name, to a function. The mapped functions must have either a single return value, or two return values where the second has type error.

    // Creating a template with function hasPermission
testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"hasPermission": func(user User, feature string) bool {
if user.ID == 1 && feature == "feature-a" {
return true
}
return false
},
}).ParseFiles("hello.gohtml")

Here the function to check if a user has permission for a feature is mapped to the string "hasPermission" and stored in the FuncMap. Note that the custom functions must be created before calling ParseFiles()

The function could be executed in the template as follows:

    {{ if hasPermission .User "feature-a" }}

The .User and string "feature-a" are both passed to hasPermission as arguments.


Custom Functions (Globally)

The previous two methods of custom functions rely on .User being passed to the template. This works in many cases but in a large application passing too many objects to a template can become difficult to maintain across many templates. We can change the implementation of the custom function to work without the .User being passed.

Using a similar feature example as the other 2 sections first you would have to create a default hasPermission function and define it in the template’s function map.

      testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"hasPermission": func(feature string) bool {
return false
},
}).ParseFiles("hello.gohtml")

This function could be placed in main() or somewhere that ensures the default hasPermission is created in the hello.gohtml function map. The default function just returns false but it defines the function and implementation that doesn’t require User .

Next a closure could be used to redefine the hasPermission function. It would use the User data available when it is created in a handler rather than having User data passed to it. Within the handler for the template you can redefine any functions to use the information available.

    func handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")

user := User{
ID: 1,
Email: "Curtis.vermeeren@gmail.com",
}
vd := ViewData{}
err := testTemplate.Funcs(template.FuncMap{
"hasPermission": func(feature string) bool {
if user.ID == 1 && feature == "feature-a" {
return true
}
return false
},
}).Execute(w, vd)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}

In this handler a User is created with ID and Email, Then a ViewData is created without passing the user to it. The hasPermission function is redefined using user.ID which is available when the function is created. {{if hasPermission "feature-a"}} can be used in a template without having to pass a User to the template as the User object in the handler is used instead.


- - +
Version: slim_v2.x.x

Golang Templates Cheatsheet

The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.


Table of Contents


Parsing and Creating Templates

Naming Templates

There is no defined file extension for Go templates. One of the most popular is .tmpl supported by vim-go and referenced in the text/template godocs. The extension .gohtml supports syntax highlighting in both Atom and GoSublime editors. Finally analysis of large Go codebases finds that .tpl is often used by developers. While the extension is not important it is still good to be consistent within a project for clarity.


Creating a Template

tpl, err := template.Parse(filename) will get the template at filename and store it in tpl. tpl can then be executed to show the template.


Parsing Multiple Templates

template.ParseFiles(filenames) takes a list of filenames and stores all templates. template.ParseGlob(pattern) will find all templates matching the pattern and store the templates.


Executing Templates

Execute a Single Template

Once a template has been parsed there are two options to execute them. A single template tpl can be executed using tpl.Execute(io.Writer, data). The content of tpl will be written to the io.Writer. Data is an interface passed to the template that will be useable in the template.


Executing a Named Template

tpl.ExecuteTemplate(io.Writer, name, data) works the same as execute but allows for a string name of the template the user wants to execute.


Template Encoding and HTML

Contextual Encoding

Go’s html/template package does encoding based on the context of the code. As a result, html/template encodes any characters that need encoding to be rendered correctly.

For example the < and > in "<h1>A header!</h1>" will be encoded as &lt;h1&gt;A header!&lt;/h1&gt; .

Type template.HTML can be used to skip encoding by telling Go the string is safe. template.HTML("<h1>A Safe header</h1>") will then be <h1>A Safe header</h1> . Using this type with user input is dangerous and leaves the application vulnerable.

The go html/template package is aware of attributes within the template and will encode values differently based on the attribute.

Go templates can also be used with javascript. Structs and maps will be expanded into JSON objects and quotes will be added to strings for use in function parameters and as variable values.

    // Go
type Cat struct {
Name string
Age int
}

kitten := Cat{"Sam", 12}
// Template
<script>
var cat = {{.kitten}}
</script>
    // Javascript
var cat = {"Name":"Sam", "Age" 12}

Safe Strings and HTML Comments

The html/template package will remove any comments from a template by default. This can cause issues when comments are necessary such as detecting internet explorer.

<!--[if IE]>
Place content here to target all Internet Explorer users.
<![endif]-->

We can use the Custom Functions method (Globally) to create a function that returns html preserving comments. Define a function htmlSafe in the FuncMap of the template.

    testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"htmlSafe": func(html string) template.HTML {
return template.HTML(html)
},
}).ParseFiles("hello.gohtml")

This function takes a string and produces the unaltered HTML code. This function can be used in a template like so to preserve the comments <!--[if IE 6]> and <![endif]--> :

    {{htmlSafe "<!--[if IE 6]>" }}
<meta http-equiv="Content-Type" content="text/html; charset=Unicode">
{{ htmlSafe "<![endif]-->" }}

Template Variables

The dot character (.)

A template variable can be a boolean, string, character, integer, floating-point, imaginary, or complex constant in Go syntax. Data passed to the template can be accessed using dot {{ . }}.

If the data is a complex type then it’s fields can be accessed using the dot with the field name {{ .FieldName }}.

Dots can be chained together if the data contains multiple complex structures. {{ .Struct.StructTwo.Field }}


Variables in Templates

Data passed to the template can be saved in a variable and used throughout the template. {{$number := .}} We use the $number to create a variable then initialize it with the value passed to the template. To use the variable we call it in the template with {{$number}}.

    {{$number := .}}
<h1> It is day number {{$number}} of the month </h1>
    var tpl *template.Template

tpl = template.Must(template.ParseFiles("templateName"))

err := tpl.ExecuteTemplate(os.Stdout, "templateName", 23)

In this example we pass 23 to the template and stored in the $number variable which can be used anywhere in the template


Template Actions

If/Else Statements

Go templates support if/else statements like many programming languages. We can use the if statement to check for values, if it doesn’t exist we can use an else value. The empty values are false, 0, any nil pointer or interface value, and any array, slice, map, or string of length zero.

<h1>Hello, {{if .Name}} {{.Name}} {{else}} Anonymous {{end}}!</h1>

If .Name exists then Hello, Name will be printed (replaced with the name value) otherwise it will print Hello, Anonymous.

Templates also provide the else if statment {{else if .Name2 }} which can be used to evaluate other options after an if.


Removing Whitespace

Adding different values to a template can add various amounts of whitespace. We can either change our template to better handle it, by ignoring or minimizing effects, or we can use the minus sign - within out template.

<h1>Hello, {{if .Name}} {{.Name}} {{- else}} Anonymous {{- end}}!</h1>

Here we are telling the template to remove all spaces between the Name variable and whatever comes after it. We are doing the same with the end keyword. This allows us to have whitespace within the template for easier reading but remove it in production.


Range Blocks

Go templates have a range keyword to iterate over all objects in a structure. Suppose we had the Go structures:

    type Item struct {
Name string
Price int
}

type ViewData struct {
Name string
Items []Item
}

We have an Item, with a name and price, then a ViewData which is the structure sent to the template. Consider the template containing the following:

{{range .Items}}
<div class="item">
<h3 class="name">{{.Name}}</h3>
<span class="price">${{.Price}}</span>
</div>
{{end}}

For each Item in the range of Items (in the ViewData structure) get the Name and Price of that item and create html for each Item automatically. Within a range each Item becomes the {{.}} and the item properties therefore become {{.Name}} or {{.Price}} in this example.


Template Functions

The template package provides a list of predefined global functions. Below are some of the most used.


Indexing structures in Templates

If the data passed to the template is a map, slice, or array it can be indexed from the template. We use {{index x number}} where index is the keyword, x is the data and number is a integer for the index value. If we had {{index names 2}} it is equivalent to names[2]. We can add more integers to index deeper into data. {{index names 2 3 4}} is equivalent to names[2][3][4].

<body>
<h1>{{index .FavNums 2 }}</h1>
</body>
    type person struct {
Name string
FavNums []int
}

func main() {

tpl := template.Must(template.ParseGlob("*.gohtml"))
tpl.Execute(os.Stdout, &person{"Curtis", []int{7, 11, 94}})
}

This code example passes a person structure and gets the 3rd favourite number from the FavNums slice.


The and Function

The and function returns the boolean AND of its arguments by returning the first empty argument or the last argument. and x y behaves logically as if x then y else x . Consider the following go code

    type User struct {
Admin bool
}

type ViewData struct {
*User
}

Pass a ViewData with a User that has Admin set true to the following template


{{if and .User .User.Admin}}
You are an admin user!
{{else}}
Access denied!
{{end}}

The result will be You are an admin user!. However if the ViewData did not include a *User object or Admin was set as false then the result will be Access denied!.


The or Function

The or function operates similarly to the and function however will stop at the first true. or x y is equivalent to if x then x else y so y will never be evaluated if x is not empty.


The not Function

The not function returns the boolean negation of the argument.

    {{ if not .Authenticated}}
Access Denied!
{{ end }}

Template Comparison Functions

Comparisons

The html/template package provides a variety of functions to do comparisons between operators. The operators may only be basic types or named basic types such as type Temp float32 Remember that template functions take the form {{ function arg1 arg2 }}.

  • eq Returns the result of arg1 == arg2
  • ne Returns the result of arg1 != arg2
  • lt Returns the result of arg1 < arg2
  • le Returns the result of arg1 <= arg2
  • gt Returns the result of arg1 > arg2
  • ge Returns the result of arg1 >= arg2

Of special note eq can be used with two or more arguments by comparing all arguments to the first. {{ eq arg1 arg2 arg3 arg4}} will result in the following logical expression:

arg1==arg2 || arg1==arg3 || arg1==arg4


Nested Templates and Layouts

Nesting Templates

Nested templates can be used for parts of code frequently used across templates, a footer or header for example. Rather than updating each template separately we can use a nested template that all other templates can use. You can define a template as follows:

    {{define "footer"}}
<footer>
<p>Here is the footer</p>
</footer>
{{end}}

A template named “footer” is defined which can be used in other templates like so to add the footer template content into the other template:

    {{template "footer"}}

Passing Variables between Templates

The template action used to include nested templates also allows a second parameter to pass data to the nested template.

// Define a nested template called header 
{{define "header"}}
<h1>{{.}}</h1>
{{end}}

// Call template and pass a name parameter
{{range .Items}}
<div class="item">
{{template "header" .Name}}
<span class="price">${{.Price}}</span>
</div>
{{end}}

We use the same range to loop through Items as before but we pass the name to the header template each time in this simple example.


Creating Layouts

Glob patterns specify sets of filenames with wildcard characters. The template.ParseGlob(pattern string) function will parse all templates that match the string pattern. template.ParseFiles(files...) can also be used with a list of file names.

The templates are named by default based on the base names of the argument files. This mean views/layouts/hello.gohtml will have the name hello.gohtml . If the template has a `{{define “templateName”}} within it then that name will be usable.

A specific template can be executed using t.ExecuteTemplate(w, "templateName", nil) . t is an object of type Template, w is type io.Writer such as an http.ResponseWriter, Then there is the name of the template to execute, and finally passing any data to the template, in this case a nil value.

Example main.go file

    // Omitted imports & package

var LayoutDir string = "views/layouts"
var bootstrap *template.Template

func main() {
var err error
bootstrap, err = template.ParseGlob(LayoutDir + "/*.gohtml")
if err != nil {
panic(err)
}

http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
}

func handler(w http.ResponseWriter, r *http.Request) {
bootstrap.ExecuteTemplate(w, "bootstrap", nil)
}

All .gohtml files are parsed in main. When route / is reached the template defined as bootstrap is executed using the handler function.

Example views/layouts/bootstrap.gohtml file

    {{define "bootstrap"}}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Go Templates</title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<h1>Filler header</h1>
<p>Filler paragraph</p>
</div>
<!-- jquery & Bootstrap JS -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"
</script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
</script>
</body>
</html>
{{end}}

Templates Calling Functions

Function Variables (calling struct methods)

We can use templates to call the methods of objects in the template to return data. Consider the User struct with the following method.

    type User struct {
ID int
Email string
}

func (u User) HasPermission(feature string) bool {
if feature == "feature-a" {
return true
} else {
return false
}
}

When a type User has been passed to the template we can then call this method from the template.

{{if .User.HasPermission "feature-a"}}
<div class="feature">
<h3>Feature A</h3>
<p>Some other stuff here...</p>
</div>
{{else}}
<div class="feature disabled">
<h3>Feature A</h3>
<p>To enable Feature A please upgrade your plan</p>
</div>
{{end}}

The template checks if the User HasPermission for the feature and renders depending on the result.


Function Variables (call)

If the Method HasPermission has to change at times then the Function Variables (Methods) implementation may not fit the design. Instead a HasPermission func(string) bool attribute can be added on the User type. This can then have a function assigned to it at creation.

    // Structs
type ViewData struct {
User User
}

type User struct {
ID int
Email string
HasPermission func(string) bool
}

// Example of creating a ViewData
vd := ViewData{
User: User{
ID: 1,
Email: "curtis.vermeeren@gmail.com",
// Create the HasPermission function
HasPermission: func(feature string) bool {
if feature == "feature-b" {
return true
}
return false
},
},
}

// Executing the ViewData with the template
err := testTemplate.Execute(w, vd)

We need to tell the Go template that we want to call this function so we must change the template from the Function Variables (Methods) implementation to do this. We use the call keyword supplied by the go html/template package. Changing the previous template to use call results in:

{{if (call .User.HasPermission "feature-b")}}
<div class="feature">
<h3>Feature B</h3>
<p>Some other stuff here...</p>
</div>
{{else}}
<div class="feature disabled">
<h3>Feature B</h3>
<p>To enable Feature B please upgrade your plan</p>
</div>
{{end}}

Custom Functions

Another way to call functions is to create custom functions with template.FuncMap . This method creates global methods that can be used throughout the entire application. FuncMap has type map[string]interface{} mapping a string, the function name, to a function. The mapped functions must have either a single return value, or two return values where the second has type error.

    // Creating a template with function hasPermission
testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"hasPermission": func(user User, feature string) bool {
if user.ID == 1 && feature == "feature-a" {
return true
}
return false
},
}).ParseFiles("hello.gohtml")

Here the function to check if a user has permission for a feature is mapped to the string "hasPermission" and stored in the FuncMap. Note that the custom functions must be created before calling ParseFiles()

The function could be executed in the template as follows:

    {{ if hasPermission .User "feature-a" }}

The .User and string "feature-a" are both passed to hasPermission as arguments.


Custom Functions (Globally)

The previous two methods of custom functions rely on .User being passed to the template. This works in many cases but in a large application passing too many objects to a template can become difficult to maintain across many templates. We can change the implementation of the custom function to work without the .User being passed.

Using a similar feature example as the other 2 sections first you would have to create a default hasPermission function and define it in the template’s function map.

      testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"hasPermission": func(feature string) bool {
return false
},
}).ParseFiles("hello.gohtml")

This function could be placed in main() or somewhere that ensures the default hasPermission is created in the hello.gohtml function map. The default function just returns false but it defines the function and implementation that doesn’t require User .

Next a closure could be used to redefine the hasPermission function. It would use the User data available when it is created in a handler rather than having User data passed to it. Within the handler for the template you can redefine any functions to use the information available.

    func handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")

user := User{
ID: 1,
Email: "Curtis.vermeeren@gmail.com",
}
vd := ViewData{}
err := testTemplate.Funcs(template.FuncMap{
"hasPermission": func(feature string) bool {
if user.ID == 1 && feature == "feature-a" {
return true
}
return false
},
}).Execute(w, vd)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}

In this handler a User is created with ID and Email, Then a ViewData is created without passing the user to it. The hasPermission function is redefined using user.ID which is available when the function is created. {{if hasPermission "feature-a"}} can be used in a template without having to pass a User to the template as the User object in the handler is used instead.


+ + \ No newline at end of file diff --git a/template/html/index.html b/template/html/index.html index 3449904f26c..ad885b65aef 100644 --- a/template/html/index.html +++ b/template/html/index.html @@ -6,8 +6,8 @@ HTML | Fiber - - + +
@@ -17,8 +17,8 @@ Security Linter

HTML is the official Go template engine html/template, to see the original syntax documentation please click here

Info:

All templates within the specified view directory are analyzed and compiled at the beginning to increase the performance when using them. Thus it should be noted that no definition with the same name should exist, otherwise they will overwrite each other. -For templating the {{embed}} tag should be used

Basic Example

./views/index.html

{{template "partials/header" .}}

<h1>{{.Title}}</h1>

{{template "partials/footer" .}}

./views/partials/header.html

<h2>Header</h2>

./views/partials/footer.html

<h2>Footer</h2>

./views/layouts/main.html

<!DOCTYPE html>
<html>
<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>
</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
)

func main() {
// Create a new engine
engine := html.New("./views", ".html")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".html"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

Example with embed.FS

package main

import (
"log"
"net/http"
"embed"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
)

//go:embed views/*
var viewsfs embed.FS

func main() {
engine := html.NewFileSystem(http.FS(viewsfs), ".html")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})


app.Get("/", func(c *fiber.Ctx) error {
// Render index - start with views directory
return c.Render("views/index", fiber.Map{
"Title": "Hello, World!",
})
})

log.Fatal(app.Listen(":3000"))
}

and change the starting point to the views directory

./views/index.html

{{template "views/partials/header" .}}

<h1>{{.Title}}</h1>

{{template "views/partials/footer" .}}

Example with innerHTML

package main

import (
"embed"
"html/template"
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
)

//go:embed views/*
var viewsfs embed.FS

func main() {
engine := html.NewFileSystem(http.FS(viewsfs), ".html")
engine.AddFunc(
// add unescape function
"unescape", func(s string) template.HTML {
return template.HTML(s)
},
)

// Pass the engine to the Views
app := fiber.New(fiber.Config{Views: engine})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("views/index", fiber.Map{
"Title": "Hello, <b>World</b>!",
})
})

log.Fatal(app.Listen(":3000"))
}

and change the starting point to the views directory

./views/index.html

<p>{{ unescape .Title}}</p>

html output

<p>Hello, <b>World</b>!</p>
- - +For templating the {{embed}} tag should be used

Basic Example

./views/index.html

{{template "partials/header" .}}

<h1>{{.Title}}</h1>

{{template "partials/footer" .}}

./views/partials/header.html

<h2>Header</h2>

./views/partials/footer.html

<h2>Footer</h2>

./views/layouts/main.html

<!DOCTYPE html>
<html>
<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>
</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
)

func main() {
// Create a new engine
engine := html.New("./views", ".html")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".html"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

Example with embed.FS

package main

import (
"log"
"net/http"
"embed"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
)

//go:embed views/*
var viewsfs embed.FS

func main() {
engine := html.NewFileSystem(http.FS(viewsfs), ".html")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})


app.Get("/", func(c *fiber.Ctx) error {
// Render index - start with views directory
return c.Render("views/index", fiber.Map{
"Title": "Hello, World!",
})
})

log.Fatal(app.Listen(":3000"))
}

and change the starting point to the views directory

./views/index.html

{{template "views/partials/header" .}}

<h1>{{.Title}}</h1>

{{template "views/partials/footer" .}}

Example with innerHTML

package main

import (
"embed"
"html/template"
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
)

//go:embed views/*
var viewsfs embed.FS

func main() {
engine := html.NewFileSystem(http.FS(viewsfs), ".html")
engine.AddFunc(
// add unescape function
"unescape", func(s string) template.HTML {
return template.HTML(s)
},
)

// Pass the engine to the Views
app := fiber.New(fiber.Config{Views: engine})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("views/index", fiber.Map{
"Title": "Hello, <b>World</b>!",
})
})

log.Fatal(app.Listen(":3000"))
}

and change the starting point to the views directory

./views/index.html

<p>{{ unescape .Title}}</p>

html output

<p>Hello, <b>World</b>!</p>
+ + \ No newline at end of file diff --git a/template/index.html b/template/index.html index 9d7d3353fc0..ebe3f84be79 100644 --- a/template/index.html +++ b/template/index.html @@ -6,13 +6,13 @@ 👋 Welcome | Fiber - - + +
-
Version: slim_v2.x.x

👋 Welcome

FiberFiber

This package provides universal methods to use multiple template engines with the Fiber web framework using the new Views interface that is available from > v1.11.1. Special thanks to @bdtomlin & @arsmn for helping!

9 template engines are supported:

Installation

Go version 1.17 or higher is required.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/template/any_template_engine/vX

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"

// To use a specific template engine, import as shown below:
// "github.com/gofiber/template/pug"
// "github.com/gofiber/template/mustache"
// etc..

// In this example we use the html template engine
"github.com/gofiber/template/html/v2"
)

func main() {
// Create a new engine by passing the template folder
// and template extension using <engine>.New(dir, ext string)
engine := html.New("./views", ".html")

// We also support the http.FileSystem interface
// See examples below to load templates from embedded files
engine := html.NewFileSystem(http.Dir("./views"), ".html")

// Reload the templates on each render, good for development
engine.Reload(true) // Optional. Default: false

// Debug will print each template that is parsed, good for debugging
engine.Debug(true) // Optional. Default: false

// Layout defines the variable name that is used to yield templates within layouts
engine.Layout("embed") // Optional. Default: "embed"

// Delims sets the action delimiters to the specified strings
engine.Delims("{{", "}}") // Optional. Default: engine delimiters

// AddFunc adds a function to the template's global function map.
engine.AddFunc("greet", func(name string) string {
return "Hello, " + name + "!"
})

// After you created your engine, you can pass it to Fiber's Views Engine
app := fiber.New(fiber.Config{
Views: engine,
})

// To render a template, you can call the ctx.Render function
// Render(tmpl string, values interface{}, layout ...string)
app.Get("/", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

// Render with layout example
app.Get("/layout", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

More Examples

To view more specific examples, you could visit each engine folder to learn more

embedded Systems

We support the http.FileSystem interface, so you can use different libraries to load the templates from embedded binaries.

pkger

Read documentation: https://github.com/markbates/pkger

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/markbates/pkger"
)

func main() {
engine := html.NewFileSystem(pkger.Dir("/views"), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run pkger && go build
}

packr

Read documentation: https://github.com/gobuffalo/packr

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/gobuffalo/packr/v2"
)

func main() {
engine := html.NewFileSystem(packr.New("Templates", "/views"), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run packr && go build
}

go.rice

Read documentation: https://github.com/GeertJohan/go.rice

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/GeertJohan/go.rice"
)

func main() {
engine := html.NewFileSystem(rice.MustFindBox("views").HTTPBox(), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run rice embed-go && go build
}

fileb0x

Read documentation: https://github.com/UnnoTed/fileb0x

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
// your generated package
"github.com/<user>/<repo>/static"
)

func main() {
engine := html.NewFileSystem(static.HTTP, ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// Read the documentation on how to use fileb0x
}

Benchmarks

Simple

Extended

Benchmarks were ran on Apple Macbook M1. Each engine was benchmarked 20 times and the results averaged into a single xlsx file. Mustache was excluded from the extended benchmark

- - +
Version: slim_v2.x.x

👋 Welcome

FiberFiber

This package provides universal methods to use multiple template engines with the Fiber web framework using the new Views interface that is available from > v1.11.1. Special thanks to @bdtomlin & @arsmn for helping!

9 template engines are supported:

Installation

Go version 1.17 or higher is required.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/template/any_template_engine/vX

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"

// To use a specific template engine, import as shown below:
// "github.com/gofiber/template/pug"
// "github.com/gofiber/template/mustache"
// etc..

// In this example we use the html template engine
"github.com/gofiber/template/html/v2"
)

func main() {
// Create a new engine by passing the template folder
// and template extension using <engine>.New(dir, ext string)
engine := html.New("./views", ".html")

// We also support the http.FileSystem interface
// See examples below to load templates from embedded files
engine := html.NewFileSystem(http.Dir("./views"), ".html")

// Reload the templates on each render, good for development
engine.Reload(true) // Optional. Default: false

// Debug will print each template that is parsed, good for debugging
engine.Debug(true) // Optional. Default: false

// Layout defines the variable name that is used to yield templates within layouts
engine.Layout("embed") // Optional. Default: "embed"

// Delims sets the action delimiters to the specified strings
engine.Delims("{{", "}}") // Optional. Default: engine delimiters

// AddFunc adds a function to the template's global function map.
engine.AddFunc("greet", func(name string) string {
return "Hello, " + name + "!"
})

// After you created your engine, you can pass it to Fiber's Views Engine
app := fiber.New(fiber.Config{
Views: engine,
})

// To render a template, you can call the ctx.Render function
// Render(tmpl string, values interface{}, layout ...string)
app.Get("/", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

// Render with layout example
app.Get("/layout", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

More Examples

To view more specific examples, you could visit each engine folder to learn more

embedded Systems

We support the http.FileSystem interface, so you can use different libraries to load the templates from embedded binaries.

pkger

Read documentation: https://github.com/markbates/pkger

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/markbates/pkger"
)

func main() {
engine := html.NewFileSystem(pkger.Dir("/views"), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run pkger && go build
}

packr

Read documentation: https://github.com/gobuffalo/packr

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/gobuffalo/packr/v2"
)

func main() {
engine := html.NewFileSystem(packr.New("Templates", "/views"), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run packr && go build
}

go.rice

Read documentation: https://github.com/GeertJohan/go.rice

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/GeertJohan/go.rice"
)

func main() {
engine := html.NewFileSystem(rice.MustFindBox("views").HTTPBox(), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run rice embed-go && go build
}

fileb0x

Read documentation: https://github.com/UnnoTed/fileb0x

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
// your generated package
"github.com/<user>/<repo>/static"
)

func main() {
engine := html.NewFileSystem(static.HTTP, ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// Read the documentation on how to use fileb0x
}

Benchmarks

Simple

Extended

Benchmarks were ran on Apple Macbook M1. Each engine was benchmarked 20 times and the results averaged into a single xlsx file. Mustache was excluded from the extended benchmark

+ + \ No newline at end of file diff --git a/template/jet/index.html b/template/jet/index.html index 2313fd4f90c..5769bafb033 100644 --- a/template/jet/index.html +++ b/template/jet/index.html @@ -6,8 +6,8 @@ Jet | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Jet is a template engine create by cloudykit, to see the original syntax documentation please click here

Basic Example

./views/index.jet

{{include "partials/header"}}

<h1>{{ Title }}</h1>

{{include "partials/footer"}}

./views/partials/header.jet

<h2>Header</h2>

./views/partials/footer.jet

<h2>Footer</h2>

./views/layouts/main.jet

<!DOCTYPE html>
<html>

<head>
<title>Title</title>
</head>

<body>
{{ embed() }}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/jet/v2"
)

func main() {
// Create a new engine
engine := jet.New("./views", ".jet")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := jet.NewFileSystem(http.Dir("./views", ".jet"))

// Pass the engine to the views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Jet is a template engine create by cloudykit, to see the original syntax documentation please click here

Basic Example

./views/index.jet

{{include "partials/header"}}

<h1>{{ Title }}</h1>

{{include "partials/footer"}}

./views/partials/header.jet

<h2>Header</h2>

./views/partials/footer.jet

<h2>Footer</h2>

./views/layouts/main.jet

<!DOCTYPE html>
<html>

<head>
<title>Title</title>
</head>

<body>
{{ embed() }}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/jet/v2"
)

func main() {
// Create a new engine
engine := jet.New("./views", ".jet")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := jet.NewFileSystem(http.Dir("./views", ".jet"))

// Pass the engine to the views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/mustache/index.html b/template/mustache/index.html index 968a51a3ace..45eeb7c52d1 100644 --- a/template/mustache/index.html +++ b/template/mustache/index.html @@ -6,8 +6,8 @@ Mustache | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Mustache is a template engine created by hoisie/cbroglie, to see the original syntax documentation please click here

Basic Example

./views/index.mustache

{{> views/partials/header }}

<h1>{{Title}}</h1>

{{> views/partials/footer }}

./views/partials/header.mustache

<h2>Header</h2>

./views/partials/footer.mustache

<h2>Footer</h2>

./views/layouts/main.mustache

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{{embed}}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/mustache/v2"
)

func main() {
// Create a new engine
engine := mustache.New("./views", ".mustache")

// Or from an embedded system
// Note that with an embedded system the partials included from template files must be
// specified relative to the filesystem's root, not the current working directory
// engine := mustache.NewFileSystem(http.Dir("./views", ".mustache"), ".mustache")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Mustache is a template engine created by hoisie/cbroglie, to see the original syntax documentation please click here

Basic Example

./views/index.mustache

{{> views/partials/header }}

<h1>{{Title}}</h1>

{{> views/partials/footer }}

./views/partials/header.mustache

<h2>Header</h2>

./views/partials/footer.mustache

<h2>Footer</h2>

./views/layouts/main.mustache

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{{embed}}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/mustache/v2"
)

func main() {
// Create a new engine
engine := mustache.New("./views", ".mustache")

// Or from an embedded system
// Note that with an embedded system the partials included from template files must be
// specified relative to the filesystem's root, not the current working directory
// engine := mustache.NewFileSystem(http.Dir("./views", ".mustache"), ".mustache")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/next/ace/index.html b/template/next/ace/index.html index 7a769359ac3..c3bcfaaafba 100644 --- a/template/next/ace/index.html +++ b/template/next/ace/index.html @@ -6,8 +6,8 @@ Ace | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Ace is a template engine create by yossi, to see the original syntax documentation please click here

Basic Example

./views/index.ace

= include ./views/partials/header .

h1 {{.Title}}

= include ./views/partials/footer .

./views/partials/header.ace

h1 Header

./views/partials/footer.ace

h1 Footer

./views/layouts/main.ace

= doctype html
html
head
title Main
body
{{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/ace/v2"
)

func main() {
// Create a new engine
engine := ace.New("./views", ".ace")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".ace"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Ace is a template engine create by yossi, to see the original syntax documentation please click here

Basic Example

./views/index.ace

= include ./views/partials/header .

h1 {{.Title}}

= include ./views/partials/footer .

./views/partials/header.ace

h1 Header

./views/partials/footer.ace

h1 Footer

./views/layouts/main.ace

= doctype html
html
head
title Main
body
{{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/ace/v2"
)

func main() {
// Create a new engine
engine := ace.New("./views", ".ace")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".ace"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/next/amber/index.html b/template/next/amber/index.html index 2e4ff9936c2..fe271de972e 100644 --- a/template/next/amber/index.html +++ b/template/next/amber/index.html @@ -6,8 +6,8 @@ Amber | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Amber is a template engine create by eknkc, to see the original syntax documentation please click here

Basic Example

./views/index.amber

import ./views/partials/header

h1 #{Title}

import ./views/partials/footer

./views/partials/header.amber

h1 Header

./views/partials/footer.amber

h1 Footer

./views/layouts/main.amber

doctype html
html
head
title Main
body
#{embed()}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/amber/v2"
)

func main() {
// Create a new engine
engine := amber.New("./views", ".amber")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".amber"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Amber is a template engine create by eknkc, to see the original syntax documentation please click here

Basic Example

./views/index.amber

import ./views/partials/header

h1 #{Title}

import ./views/partials/footer

./views/partials/header.amber

h1 Header

./views/partials/footer.amber

h1 Footer

./views/layouts/main.amber

doctype html
html
head
title Main
body
#{embed()}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/amber/v2"
)

func main() {
// Create a new engine
engine := amber.New("./views", ".amber")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".amber"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/next/django/index.html b/template/next/django/index.html index a240a96e186..5d1bc47ad96 100644 --- a/template/next/django/index.html +++ b/template/next/django/index.html @@ -6,8 +6,8 @@ Django | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Django is a template engine create by flosch, to see the original syntax documentation please click here

Basic Example

./views/index.django

{% include "partials/header.django" %}

<h1>{{ Title }}</h1>

{% include "partials/footer.django" %}

./views/partials/header.django

<h2>Header</h2>

./views/partials/footer.django

<h2>Footer</h2>

./views/layouts/main.django

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/django/v3"
)

func main() {
// Create a new engine
engine := django.New("./views", ".django")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".django"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

Using embedded file system (1.16+ only)

When using the // go:embed directive, resolution of inherited templates using django's {% extend '' %} keyword fails when instantiating the template engine with django.NewFileSystem(). In that case, use the django.NewPathForwardingFileSystem() function to instantiate the template engine.

This function provides the proper configuration for resolving inherited templates.

Assume you have the following files:

then

package main

import (
"log"
"embed"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/django/v3"
)

//go:embed views
var viewsAsssets embed.FS

func main() {
// Create a new engine
engine := NewPathForwardingFileSystem(http.FS(viewsAsssets), "/views", ".django")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render descendant
return c.Render("descendant", fiber.Map{
"greeting": "World",
})
})

log.Fatal(app.Listen(":3000"))
}

Register and use custom functions

// My custom function
func Nl2brHtml(value interface{}) string {
if str, ok := value.(string); ok {
return strings.Replace(str, "\n", "<br />", -1)
}
return ""
}

// Create a new engine
engine := django.New("./views", ".django")

// register functions
engine.AddFunc("nl2br", Nl2brHtml)

// Pass the engine to the Views
app := fiber.New(fiber.Config{Views: engine})

in the handler

c.Render("index", fiber.Map{
"Fiber": "Hello, World!\n\nGreetings from Fiber Team",
})

./views/index.django

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"></head>
<body>
{{ nl2br(Fiber) }}
</body>
</html>

Output:

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"></head>
<body>
Hello, World!<br /><br />Greetings from Fiber Team
</body>
</html>
- - +Linter

Django is a template engine create by flosch, to see the original syntax documentation please click here

Basic Example

./views/index.django

{% include "partials/header.django" %}

<h1>{{ Title }}</h1>

{% include "partials/footer.django" %}

./views/partials/header.django

<h2>Header</h2>

./views/partials/footer.django

<h2>Footer</h2>

./views/layouts/main.django

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/django/v3"
)

func main() {
// Create a new engine
engine := django.New("./views", ".django")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".django"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

Using embedded file system (1.16+ only)

When using the // go:embed directive, resolution of inherited templates using django's {% extend '' %} keyword fails when instantiating the template engine with django.NewFileSystem(). In that case, use the django.NewPathForwardingFileSystem() function to instantiate the template engine.

This function provides the proper configuration for resolving inherited templates.

Assume you have the following files:

then

package main

import (
"log"
"embed"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/django/v3"
)

//go:embed views
var viewsAsssets embed.FS

func main() {
// Create a new engine
engine := NewPathForwardingFileSystem(http.FS(viewsAsssets), "/views", ".django")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render descendant
return c.Render("descendant", fiber.Map{
"greeting": "World",
})
})

log.Fatal(app.Listen(":3000"))
}

Register and use custom functions

// My custom function
func Nl2brHtml(value interface{}) string {
if str, ok := value.(string); ok {
return strings.Replace(str, "\n", "<br />", -1)
}
return ""
}

// Create a new engine
engine := django.New("./views", ".django")

// register functions
engine.AddFunc("nl2br", Nl2brHtml)

// Pass the engine to the Views
app := fiber.New(fiber.Config{Views: engine})

in the handler

c.Render("index", fiber.Map{
"Fiber": "Hello, World!\n\nGreetings from Fiber Team",
})

./views/index.django

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"></head>
<body>
{{ nl2br(Fiber) }}
</body>
</html>

Output:

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"></head>
<body>
Hello, World!<br /><br />Greetings from Fiber Team
</body>
</html>
+ + \ No newline at end of file diff --git a/template/next/handlebars/index.html b/template/next/handlebars/index.html index dcc0e095bd1..116143ec96b 100644 --- a/template/next/handlebars/index.html +++ b/template/next/handlebars/index.html @@ -6,8 +6,8 @@ Handlebars | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Handlebars is a template engine create by aymerick, to see the original syntax documentation please click here

Basic Example

./views/index.hbs

{{> 'partials/header' }}

<h1>{{Title}}</h1>

{{> 'partials/footer' }}

./views/partials/header.hbs

<h2>Header</h2>

./views/partials/footer.hbs

<h2>Footer</h2>

./views/layouts/main.hbs

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/handlebars/v2"
)

func main() {
// Create a new engine
engine := handlebars.New("./views", ".hbs")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".hbs"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Handlebars is a template engine create by aymerick, to see the original syntax documentation please click here

Basic Example

./views/index.hbs

{{> 'partials/header' }}

<h1>{{Title}}</h1>

{{> 'partials/footer' }}

./views/partials/header.hbs

<h2>Header</h2>

./views/partials/footer.hbs

<h2>Footer</h2>

./views/layouts/main.hbs

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/handlebars/v2"
)

func main() {
// Create a new engine
engine := handlebars.New("./views", ".hbs")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".hbs"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/next/html/TEMPLATES_CHEATSHEET/index.html b/template/next/html/TEMPLATES_CHEATSHEET/index.html index afd506c5137..1f27e8ad2d1 100644 --- a/template/next/html/TEMPLATES_CHEATSHEET/index.html +++ b/template/next/html/TEMPLATES_CHEATSHEET/index.html @@ -6,13 +6,13 @@ Golang Templates Cheatsheet | Fiber - - + +
-
Version: Next

Golang Templates Cheatsheet

The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.


Table of Contents


Parsing and Creating Templates

Naming Templates

There is no defined file extension for Go templates. One of the most popular is .tmpl supported by vim-go and referenced in the text/template godocs. The extension .gohtml supports syntax highlighting in both Atom and GoSublime editors. Finally analysis of large Go codebases finds that .tpl is often used by developers. While the extension is not important it is still good to be consistent within a project for clarity.


Creating a Template

tpl, err := template.Parse(filename) will get the template at filename and store it in tpl. tpl can then be executed to show the template.


Parsing Multiple Templates

template.ParseFiles(filenames) takes a list of filenames and stores all templates. template.ParseGlob(pattern) will find all templates matching the pattern and store the templates.


Executing Templates

Execute a Single Template

Once a template has been parsed there are two options to execute them. A single template tpl can be executed using tpl.Execute(io.Writer, data). The content of tpl will be written to the io.Writer. Data is an interface passed to the template that will be useable in the template.


Executing a Named Template

tpl.ExecuteTemplate(io.Writer, name, data) works the same as execute but allows for a string name of the template the user wants to execute.


Template Encoding and HTML

Contextual Encoding

Go’s html/template package does encoding based on the context of the code. As a result, html/template encodes any characters that need encoding to be rendered correctly.

For example the < and > in "<h1>A header!</h1>" will be encoded as &lt;h1&gt;A header!&lt;/h1&gt; .

Type template.HTML can be used to skip encoding by telling Go the string is safe. template.HTML("<h1>A Safe header</h1>") will then be <h1>A Safe header</h1> . Using this type with user input is dangerous and leaves the application vulnerable.

The go html/template package is aware of attributes within the template and will encode values differently based on the attribute.

Go templates can also be used with javascript. Structs and maps will be expanded into JSON objects and quotes will be added to strings for use in function parameters and as variable values.

    // Go
type Cat struct {
Name string
Age int
}

kitten := Cat{"Sam", 12}
// Template
<script>
var cat = {{.kitten}}
</script>
    // Javascript
var cat = {"Name":"Sam", "Age" 12}

Safe Strings and HTML Comments

The html/template package will remove any comments from a template by default. This can cause issues when comments are necessary such as detecting internet explorer.

<!--[if IE]>
Place content here to target all Internet Explorer users.
<![endif]-->

We can use the Custom Functions method (Globally) to create a function that returns html preserving comments. Define a function htmlSafe in the FuncMap of the template.

    testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"htmlSafe": func(html string) template.HTML {
return template.HTML(html)
},
}).ParseFiles("hello.gohtml")

This function takes a string and produces the unaltered HTML code. This function can be used in a template like so to preserve the comments <!--[if IE 6]> and <![endif]--> :

    {{htmlSafe "<!--[if IE 6]>" }}
<meta http-equiv="Content-Type" content="text/html; charset=Unicode">
{{ htmlSafe "<![endif]-->" }}

Template Variables

The dot character (.)

A template variable can be a boolean, string, character, integer, floating-point, imaginary, or complex constant in Go syntax. Data passed to the template can be accessed using dot {{ . }}.

If the data is a complex type then it’s fields can be accessed using the dot with the field name {{ .FieldName }}.

Dots can be chained together if the data contains multiple complex structures. {{ .Struct.StructTwo.Field }}


Variables in Templates

Data passed to the template can be saved in a variable and used throughout the template. {{$number := .}} We use the $number to create a variable then initialize it with the value passed to the template. To use the variable we call it in the template with {{$number}}.

    {{$number := .}}
<h1> It is day number {{$number}} of the month </h1>
    var tpl *template.Template

tpl = template.Must(template.ParseFiles("templateName"))

err := tpl.ExecuteTemplate(os.Stdout, "templateName", 23)

In this example we pass 23 to the template and stored in the $number variable which can be used anywhere in the template


Template Actions

If/Else Statements

Go templates support if/else statements like many programming languages. We can use the if statement to check for values, if it doesn’t exist we can use an else value. The empty values are false, 0, any nil pointer or interface value, and any array, slice, map, or string of length zero.

<h1>Hello, {{if .Name}} {{.Name}} {{else}} Anonymous {{end}}!</h1>

If .Name exists then Hello, Name will be printed (replaced with the name value) otherwise it will print Hello, Anonymous.

Templates also provide the else if statment {{else if .Name2 }} which can be used to evaluate other options after an if.


Removing Whitespace

Adding different values to a template can add various amounts of whitespace. We can either change our template to better handle it, by ignoring or minimizing effects, or we can use the minus sign - within out template.

<h1>Hello, {{if .Name}} {{.Name}} {{- else}} Anonymous {{- end}}!</h1>

Here we are telling the template to remove all spaces between the Name variable and whatever comes after it. We are doing the same with the end keyword. This allows us to have whitespace within the template for easier reading but remove it in production.


Range Blocks

Go templates have a range keyword to iterate over all objects in a structure. Suppose we had the Go structures:

    type Item struct {
Name string
Price int
}

type ViewData struct {
Name string
Items []Item
}

We have an Item, with a name and price, then a ViewData which is the structure sent to the template. Consider the template containing the following:

{{range .Items}}
<div class="item">
<h3 class="name">{{.Name}}</h3>
<span class="price">${{.Price}}</span>
</div>
{{end}}

For each Item in the range of Items (in the ViewData structure) get the Name and Price of that item and create html for each Item automatically. Within a range each Item becomes the {{.}} and the item properties therefore become {{.Name}} or {{.Price}} in this example.


Template Functions

The template package provides a list of predefined global functions. Below are some of the most used.


Indexing structures in Templates

If the data passed to the template is a map, slice, or array it can be indexed from the template. We use {{index x number}} where index is the keyword, x is the data and number is a integer for the index value. If we had {{index names 2}} it is equivalent to names[2]. We can add more integers to index deeper into data. {{index names 2 3 4}} is equivalent to names[2][3][4].

<body>
<h1>{{index .FavNums 2 }}</h1>
</body>
    type person struct {
Name string
FavNums []int
}

func main() {

tpl := template.Must(template.ParseGlob("*.gohtml"))
tpl.Execute(os.Stdout, &person{"Curtis", []int{7, 11, 94}})
}

This code example passes a person structure and gets the 3rd favourite number from the FavNums slice.


The and Function

The and function returns the boolean AND of its arguments by returning the first empty argument or the last argument. and x y behaves logically as if x then y else x . Consider the following go code

    type User struct {
Admin bool
}

type ViewData struct {
*User
}

Pass a ViewData with a User that has Admin set true to the following template


{{if and .User .User.Admin}}
You are an admin user!
{{else}}
Access denied!
{{end}}

The result will be You are an admin user!. However if the ViewData did not include a *User object or Admin was set as false then the result will be Access denied!.


The or Function

The or function operates similarly to the and function however will stop at the first true. or x y is equivalent to if x then x else y so y will never be evaluated if x is not empty.


The not Function

The not function returns the boolean negation of the argument.

    {{ if not .Authenticated}}
Access Denied!
{{ end }}

Template Comparison Functions

Comparisons

The html/template package provides a variety of functions to do comparisons between operators. The operators may only be basic types or named basic types such as type Temp float32 Remember that template functions take the form {{ function arg1 arg2 }}.

  • eq Returns the result of arg1 == arg2
  • ne Returns the result of arg1 != arg2
  • lt Returns the result of arg1 < arg2
  • le Returns the result of arg1 <= arg2
  • gt Returns the result of arg1 > arg2
  • ge Returns the result of arg1 >= arg2

Of special note eq can be used with two or more arguments by comparing all arguments to the first. {{ eq arg1 arg2 arg3 arg4}} will result in the following logical expression:

arg1==arg2 || arg1==arg3 || arg1==arg4


Nested Templates and Layouts

Nesting Templates

Nested templates can be used for parts of code frequently used across templates, a footer or header for example. Rather than updating each template separately we can use a nested template that all other templates can use. You can define a template as follows:

    {{define "footer"}}
<footer>
<p>Here is the footer</p>
</footer>
{{end}}

A template named “footer” is defined which can be used in other templates like so to add the footer template content into the other template:

    {{template "footer"}}

Passing Variables between Templates

The template action used to include nested templates also allows a second parameter to pass data to the nested template.

// Define a nested template called header 
{{define "header"}}
<h1>{{.}}</h1>
{{end}}

// Call template and pass a name parameter
{{range .Items}}
<div class="item">
{{template "header" .Name}}
<span class="price">${{.Price}}</span>
</div>
{{end}}

We use the same range to loop through Items as before but we pass the name to the header template each time in this simple example.


Creating Layouts

Glob patterns specify sets of filenames with wildcard characters. The template.ParseGlob(pattern string) function will parse all templates that match the string pattern. template.ParseFiles(files...) can also be used with a list of file names.

The templates are named by default based on the base names of the argument files. This mean views/layouts/hello.gohtml will have the name hello.gohtml . If the template has a `{{define “templateName”}} within it then that name will be usable.

A specific template can be executed using t.ExecuteTemplate(w, "templateName", nil) . t is an object of type Template, w is type io.Writer such as an http.ResponseWriter, Then there is the name of the template to execute, and finally passing any data to the template, in this case a nil value.

Example main.go file

    // Omitted imports & package

var LayoutDir string = "views/layouts"
var bootstrap *template.Template

func main() {
var err error
bootstrap, err = template.ParseGlob(LayoutDir + "/*.gohtml")
if err != nil {
panic(err)
}

http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
}

func handler(w http.ResponseWriter, r *http.Request) {
bootstrap.ExecuteTemplate(w, "bootstrap", nil)
}

All .gohtml files are parsed in main. When route / is reached the template defined as bootstrap is executed using the handler function.

Example views/layouts/bootstrap.gohtml file

    {{define "bootstrap"}}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Go Templates</title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<h1>Filler header</h1>
<p>Filler paragraph</p>
</div>
<!-- jquery & Bootstrap JS -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"
</script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
</script>
</body>
</html>
{{end}}

Templates Calling Functions

Function Variables (calling struct methods)

We can use templates to call the methods of objects in the template to return data. Consider the User struct with the following method.

    type User struct {
ID int
Email string
}

func (u User) HasPermission(feature string) bool {
if feature == "feature-a" {
return true
} else {
return false
}
}

When a type User has been passed to the template we can then call this method from the template.

{{if .User.HasPermission "feature-a"}}
<div class="feature">
<h3>Feature A</h3>
<p>Some other stuff here...</p>
</div>
{{else}}
<div class="feature disabled">
<h3>Feature A</h3>
<p>To enable Feature A please upgrade your plan</p>
</div>
{{end}}

The template checks if the User HasPermission for the feature and renders depending on the result.


Function Variables (call)

If the Method HasPermission has to change at times then the Function Variables (Methods) implementation may not fit the design. Instead a HasPermission func(string) bool attribute can be added on the User type. This can then have a function assigned to it at creation.

    // Structs
type ViewData struct {
User User
}

type User struct {
ID int
Email string
HasPermission func(string) bool
}

// Example of creating a ViewData
vd := ViewData{
User: User{
ID: 1,
Email: "curtis.vermeeren@gmail.com",
// Create the HasPermission function
HasPermission: func(feature string) bool {
if feature == "feature-b" {
return true
}
return false
},
},
}

// Executing the ViewData with the template
err := testTemplate.Execute(w, vd)

We need to tell the Go template that we want to call this function so we must change the template from the Function Variables (Methods) implementation to do this. We use the call keyword supplied by the go html/template package. Changing the previous template to use call results in:

{{if (call .User.HasPermission "feature-b")}}
<div class="feature">
<h3>Feature B</h3>
<p>Some other stuff here...</p>
</div>
{{else}}
<div class="feature disabled">
<h3>Feature B</h3>
<p>To enable Feature B please upgrade your plan</p>
</div>
{{end}}

Custom Functions

Another way to call functions is to create custom functions with template.FuncMap . This method creates global methods that can be used throughout the entire application. FuncMap has type map[string]interface{} mapping a string, the function name, to a function. The mapped functions must have either a single return value, or two return values where the second has type error.

    // Creating a template with function hasPermission
testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"hasPermission": func(user User, feature string) bool {
if user.ID == 1 && feature == "feature-a" {
return true
}
return false
},
}).ParseFiles("hello.gohtml")

Here the function to check if a user has permission for a feature is mapped to the string "hasPermission" and stored in the FuncMap. Note that the custom functions must be created before calling ParseFiles()

The function could be executed in the template as follows:

    {{ if hasPermission .User "feature-a" }}

The .User and string "feature-a" are both passed to hasPermission as arguments.


Custom Functions (Globally)

The previous two methods of custom functions rely on .User being passed to the template. This works in many cases but in a large application passing too many objects to a template can become difficult to maintain across many templates. We can change the implementation of the custom function to work without the .User being passed.

Using a similar feature example as the other 2 sections first you would have to create a default hasPermission function and define it in the template’s function map.

      testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"hasPermission": func(feature string) bool {
return false
},
}).ParseFiles("hello.gohtml")

This function could be placed in main() or somewhere that ensures the default hasPermission is created in the hello.gohtml function map. The default function just returns false but it defines the function and implementation that doesn’t require User .

Next a closure could be used to redefine the hasPermission function. It would use the User data available when it is created in a handler rather than having User data passed to it. Within the handler for the template you can redefine any functions to use the information available.

    func handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")

user := User{
ID: 1,
Email: "Curtis.vermeeren@gmail.com",
}
vd := ViewData{}
err := testTemplate.Funcs(template.FuncMap{
"hasPermission": func(feature string) bool {
if user.ID == 1 && feature == "feature-a" {
return true
}
return false
},
}).Execute(w, vd)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}

In this handler a User is created with ID and Email, Then a ViewData is created without passing the user to it. The hasPermission function is redefined using user.ID which is available when the function is created. {{if hasPermission "feature-a"}} can be used in a template without having to pass a User to the template as the User object in the handler is used instead.


- - +
Version: Next

Golang Templates Cheatsheet

The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.


Table of Contents


Parsing and Creating Templates

Naming Templates

There is no defined file extension for Go templates. One of the most popular is .tmpl supported by vim-go and referenced in the text/template godocs. The extension .gohtml supports syntax highlighting in both Atom and GoSublime editors. Finally analysis of large Go codebases finds that .tpl is often used by developers. While the extension is not important it is still good to be consistent within a project for clarity.


Creating a Template

tpl, err := template.Parse(filename) will get the template at filename and store it in tpl. tpl can then be executed to show the template.


Parsing Multiple Templates

template.ParseFiles(filenames) takes a list of filenames and stores all templates. template.ParseGlob(pattern) will find all templates matching the pattern and store the templates.


Executing Templates

Execute a Single Template

Once a template has been parsed there are two options to execute them. A single template tpl can be executed using tpl.Execute(io.Writer, data). The content of tpl will be written to the io.Writer. Data is an interface passed to the template that will be useable in the template.


Executing a Named Template

tpl.ExecuteTemplate(io.Writer, name, data) works the same as execute but allows for a string name of the template the user wants to execute.


Template Encoding and HTML

Contextual Encoding

Go’s html/template package does encoding based on the context of the code. As a result, html/template encodes any characters that need encoding to be rendered correctly.

For example the < and > in "<h1>A header!</h1>" will be encoded as &lt;h1&gt;A header!&lt;/h1&gt; .

Type template.HTML can be used to skip encoding by telling Go the string is safe. template.HTML("<h1>A Safe header</h1>") will then be <h1>A Safe header</h1> . Using this type with user input is dangerous and leaves the application vulnerable.

The go html/template package is aware of attributes within the template and will encode values differently based on the attribute.

Go templates can also be used with javascript. Structs and maps will be expanded into JSON objects and quotes will be added to strings for use in function parameters and as variable values.

    // Go
type Cat struct {
Name string
Age int
}

kitten := Cat{"Sam", 12}
// Template
<script>
var cat = {{.kitten}}
</script>
    // Javascript
var cat = {"Name":"Sam", "Age" 12}

Safe Strings and HTML Comments

The html/template package will remove any comments from a template by default. This can cause issues when comments are necessary such as detecting internet explorer.

<!--[if IE]>
Place content here to target all Internet Explorer users.
<![endif]-->

We can use the Custom Functions method (Globally) to create a function that returns html preserving comments. Define a function htmlSafe in the FuncMap of the template.

    testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"htmlSafe": func(html string) template.HTML {
return template.HTML(html)
},
}).ParseFiles("hello.gohtml")

This function takes a string and produces the unaltered HTML code. This function can be used in a template like so to preserve the comments <!--[if IE 6]> and <![endif]--> :

    {{htmlSafe "<!--[if IE 6]>" }}
<meta http-equiv="Content-Type" content="text/html; charset=Unicode">
{{ htmlSafe "<![endif]-->" }}

Template Variables

The dot character (.)

A template variable can be a boolean, string, character, integer, floating-point, imaginary, or complex constant in Go syntax. Data passed to the template can be accessed using dot {{ . }}.

If the data is a complex type then it’s fields can be accessed using the dot with the field name {{ .FieldName }}.

Dots can be chained together if the data contains multiple complex structures. {{ .Struct.StructTwo.Field }}


Variables in Templates

Data passed to the template can be saved in a variable and used throughout the template. {{$number := .}} We use the $number to create a variable then initialize it with the value passed to the template. To use the variable we call it in the template with {{$number}}.

    {{$number := .}}
<h1> It is day number {{$number}} of the month </h1>
    var tpl *template.Template

tpl = template.Must(template.ParseFiles("templateName"))

err := tpl.ExecuteTemplate(os.Stdout, "templateName", 23)

In this example we pass 23 to the template and stored in the $number variable which can be used anywhere in the template


Template Actions

If/Else Statements

Go templates support if/else statements like many programming languages. We can use the if statement to check for values, if it doesn’t exist we can use an else value. The empty values are false, 0, any nil pointer or interface value, and any array, slice, map, or string of length zero.

<h1>Hello, {{if .Name}} {{.Name}} {{else}} Anonymous {{end}}!</h1>

If .Name exists then Hello, Name will be printed (replaced with the name value) otherwise it will print Hello, Anonymous.

Templates also provide the else if statment {{else if .Name2 }} which can be used to evaluate other options after an if.


Removing Whitespace

Adding different values to a template can add various amounts of whitespace. We can either change our template to better handle it, by ignoring or minimizing effects, or we can use the minus sign - within out template.

<h1>Hello, {{if .Name}} {{.Name}} {{- else}} Anonymous {{- end}}!</h1>

Here we are telling the template to remove all spaces between the Name variable and whatever comes after it. We are doing the same with the end keyword. This allows us to have whitespace within the template for easier reading but remove it in production.


Range Blocks

Go templates have a range keyword to iterate over all objects in a structure. Suppose we had the Go structures:

    type Item struct {
Name string
Price int
}

type ViewData struct {
Name string
Items []Item
}

We have an Item, with a name and price, then a ViewData which is the structure sent to the template. Consider the template containing the following:

{{range .Items}}
<div class="item">
<h3 class="name">{{.Name}}</h3>
<span class="price">${{.Price}}</span>
</div>
{{end}}

For each Item in the range of Items (in the ViewData structure) get the Name and Price of that item and create html for each Item automatically. Within a range each Item becomes the {{.}} and the item properties therefore become {{.Name}} or {{.Price}} in this example.


Template Functions

The template package provides a list of predefined global functions. Below are some of the most used.


Indexing structures in Templates

If the data passed to the template is a map, slice, or array it can be indexed from the template. We use {{index x number}} where index is the keyword, x is the data and number is a integer for the index value. If we had {{index names 2}} it is equivalent to names[2]. We can add more integers to index deeper into data. {{index names 2 3 4}} is equivalent to names[2][3][4].

<body>
<h1>{{index .FavNums 2 }}</h1>
</body>
    type person struct {
Name string
FavNums []int
}

func main() {

tpl := template.Must(template.ParseGlob("*.gohtml"))
tpl.Execute(os.Stdout, &person{"Curtis", []int{7, 11, 94}})
}

This code example passes a person structure and gets the 3rd favourite number from the FavNums slice.


The and Function

The and function returns the boolean AND of its arguments by returning the first empty argument or the last argument. and x y behaves logically as if x then y else x . Consider the following go code

    type User struct {
Admin bool
}

type ViewData struct {
*User
}

Pass a ViewData with a User that has Admin set true to the following template


{{if and .User .User.Admin}}
You are an admin user!
{{else}}
Access denied!
{{end}}

The result will be You are an admin user!. However if the ViewData did not include a *User object or Admin was set as false then the result will be Access denied!.


The or Function

The or function operates similarly to the and function however will stop at the first true. or x y is equivalent to if x then x else y so y will never be evaluated if x is not empty.


The not Function

The not function returns the boolean negation of the argument.

    {{ if not .Authenticated}}
Access Denied!
{{ end }}

Template Comparison Functions

Comparisons

The html/template package provides a variety of functions to do comparisons between operators. The operators may only be basic types or named basic types such as type Temp float32 Remember that template functions take the form {{ function arg1 arg2 }}.

  • eq Returns the result of arg1 == arg2
  • ne Returns the result of arg1 != arg2
  • lt Returns the result of arg1 < arg2
  • le Returns the result of arg1 <= arg2
  • gt Returns the result of arg1 > arg2
  • ge Returns the result of arg1 >= arg2

Of special note eq can be used with two or more arguments by comparing all arguments to the first. {{ eq arg1 arg2 arg3 arg4}} will result in the following logical expression:

arg1==arg2 || arg1==arg3 || arg1==arg4


Nested Templates and Layouts

Nesting Templates

Nested templates can be used for parts of code frequently used across templates, a footer or header for example. Rather than updating each template separately we can use a nested template that all other templates can use. You can define a template as follows:

    {{define "footer"}}
<footer>
<p>Here is the footer</p>
</footer>
{{end}}

A template named “footer” is defined which can be used in other templates like so to add the footer template content into the other template:

    {{template "footer"}}

Passing Variables between Templates

The template action used to include nested templates also allows a second parameter to pass data to the nested template.

// Define a nested template called header 
{{define "header"}}
<h1>{{.}}</h1>
{{end}}

// Call template and pass a name parameter
{{range .Items}}
<div class="item">
{{template "header" .Name}}
<span class="price">${{.Price}}</span>
</div>
{{end}}

We use the same range to loop through Items as before but we pass the name to the header template each time in this simple example.


Creating Layouts

Glob patterns specify sets of filenames with wildcard characters. The template.ParseGlob(pattern string) function will parse all templates that match the string pattern. template.ParseFiles(files...) can also be used with a list of file names.

The templates are named by default based on the base names of the argument files. This mean views/layouts/hello.gohtml will have the name hello.gohtml . If the template has a `{{define “templateName”}} within it then that name will be usable.

A specific template can be executed using t.ExecuteTemplate(w, "templateName", nil) . t is an object of type Template, w is type io.Writer such as an http.ResponseWriter, Then there is the name of the template to execute, and finally passing any data to the template, in this case a nil value.

Example main.go file

    // Omitted imports & package

var LayoutDir string = "views/layouts"
var bootstrap *template.Template

func main() {
var err error
bootstrap, err = template.ParseGlob(LayoutDir + "/*.gohtml")
if err != nil {
panic(err)
}

http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
}

func handler(w http.ResponseWriter, r *http.Request) {
bootstrap.ExecuteTemplate(w, "bootstrap", nil)
}

All .gohtml files are parsed in main. When route / is reached the template defined as bootstrap is executed using the handler function.

Example views/layouts/bootstrap.gohtml file

    {{define "bootstrap"}}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Go Templates</title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<h1>Filler header</h1>
<p>Filler paragraph</p>
</div>
<!-- jquery & Bootstrap JS -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"
</script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
</script>
</body>
</html>
{{end}}

Templates Calling Functions

Function Variables (calling struct methods)

We can use templates to call the methods of objects in the template to return data. Consider the User struct with the following method.

    type User struct {
ID int
Email string
}

func (u User) HasPermission(feature string) bool {
if feature == "feature-a" {
return true
} else {
return false
}
}

When a type User has been passed to the template we can then call this method from the template.

{{if .User.HasPermission "feature-a"}}
<div class="feature">
<h3>Feature A</h3>
<p>Some other stuff here...</p>
</div>
{{else}}
<div class="feature disabled">
<h3>Feature A</h3>
<p>To enable Feature A please upgrade your plan</p>
</div>
{{end}}

The template checks if the User HasPermission for the feature and renders depending on the result.


Function Variables (call)

If the Method HasPermission has to change at times then the Function Variables (Methods) implementation may not fit the design. Instead a HasPermission func(string) bool attribute can be added on the User type. This can then have a function assigned to it at creation.

    // Structs
type ViewData struct {
User User
}

type User struct {
ID int
Email string
HasPermission func(string) bool
}

// Example of creating a ViewData
vd := ViewData{
User: User{
ID: 1,
Email: "curtis.vermeeren@gmail.com",
// Create the HasPermission function
HasPermission: func(feature string) bool {
if feature == "feature-b" {
return true
}
return false
},
},
}

// Executing the ViewData with the template
err := testTemplate.Execute(w, vd)

We need to tell the Go template that we want to call this function so we must change the template from the Function Variables (Methods) implementation to do this. We use the call keyword supplied by the go html/template package. Changing the previous template to use call results in:

{{if (call .User.HasPermission "feature-b")}}
<div class="feature">
<h3>Feature B</h3>
<p>Some other stuff here...</p>
</div>
{{else}}
<div class="feature disabled">
<h3>Feature B</h3>
<p>To enable Feature B please upgrade your plan</p>
</div>
{{end}}

Custom Functions

Another way to call functions is to create custom functions with template.FuncMap . This method creates global methods that can be used throughout the entire application. FuncMap has type map[string]interface{} mapping a string, the function name, to a function. The mapped functions must have either a single return value, or two return values where the second has type error.

    // Creating a template with function hasPermission
testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"hasPermission": func(user User, feature string) bool {
if user.ID == 1 && feature == "feature-a" {
return true
}
return false
},
}).ParseFiles("hello.gohtml")

Here the function to check if a user has permission for a feature is mapped to the string "hasPermission" and stored in the FuncMap. Note that the custom functions must be created before calling ParseFiles()

The function could be executed in the template as follows:

    {{ if hasPermission .User "feature-a" }}

The .User and string "feature-a" are both passed to hasPermission as arguments.


Custom Functions (Globally)

The previous two methods of custom functions rely on .User being passed to the template. This works in many cases but in a large application passing too many objects to a template can become difficult to maintain across many templates. We can change the implementation of the custom function to work without the .User being passed.

Using a similar feature example as the other 2 sections first you would have to create a default hasPermission function and define it in the template’s function map.

      testTemplate, err = template.New("hello.gohtml").Funcs(template.FuncMap{
"hasPermission": func(feature string) bool {
return false
},
}).ParseFiles("hello.gohtml")

This function could be placed in main() or somewhere that ensures the default hasPermission is created in the hello.gohtml function map. The default function just returns false but it defines the function and implementation that doesn’t require User .

Next a closure could be used to redefine the hasPermission function. It would use the User data available when it is created in a handler rather than having User data passed to it. Within the handler for the template you can redefine any functions to use the information available.

    func handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")

user := User{
ID: 1,
Email: "Curtis.vermeeren@gmail.com",
}
vd := ViewData{}
err := testTemplate.Funcs(template.FuncMap{
"hasPermission": func(feature string) bool {
if user.ID == 1 && feature == "feature-a" {
return true
}
return false
},
}).Execute(w, vd)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}

In this handler a User is created with ID and Email, Then a ViewData is created without passing the user to it. The hasPermission function is redefined using user.ID which is available when the function is created. {{if hasPermission "feature-a"}} can be used in a template without having to pass a User to the template as the User object in the handler is used instead.


+ + \ No newline at end of file diff --git a/template/next/html/index.html b/template/next/html/index.html index 87dc8f581f1..41f1328977a 100644 --- a/template/next/html/index.html +++ b/template/next/html/index.html @@ -6,8 +6,8 @@ HTML | Fiber - - + +
@@ -17,8 +17,8 @@ Security Linter

HTML is the official Go template engine html/template, to see the original syntax documentation please click here

Info:

All templates within the specified view directory are analyzed and compiled at the beginning to increase the performance when using them. Thus it should be noted that no definition with the same name should exist, otherwise they will overwrite each other. -For templating the {{embed}} tag should be used

Basic Example

./views/index.html

{{template "partials/header" .}}

<h1>{{.Title}}</h1>

{{template "partials/footer" .}}

./views/partials/header.html

<h2>Header</h2>

./views/partials/footer.html

<h2>Footer</h2>

./views/layouts/main.html

<!DOCTYPE html>
<html>
<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>
</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
)

func main() {
// Create a new engine
engine := html.New("./views", ".html")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".html"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

Example with embed.FS

package main

import (
"log"
"net/http"
"embed"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
)

//go:embed views/*
var viewsfs embed.FS

func main() {
engine := html.NewFileSystem(http.FS(viewsfs), ".html")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})


app.Get("/", func(c *fiber.Ctx) error {
// Render index - start with views directory
return c.Render("views/index", fiber.Map{
"Title": "Hello, World!",
})
})

log.Fatal(app.Listen(":3000"))
}

and change the starting point to the views directory

./views/index.html

{{template "views/partials/header" .}}

<h1>{{.Title}}</h1>

{{template "views/partials/footer" .}}

Example with innerHTML

package main

import (
"embed"
"html/template"
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
)

//go:embed views/*
var viewsfs embed.FS

func main() {
engine := html.NewFileSystem(http.FS(viewsfs), ".html")
engine.AddFunc(
// add unescape function
"unescape", func(s string) template.HTML {
return template.HTML(s)
},
)

// Pass the engine to the Views
app := fiber.New(fiber.Config{Views: engine})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("views/index", fiber.Map{
"Title": "Hello, <b>World</b>!",
})
})

log.Fatal(app.Listen(":3000"))
}

and change the starting point to the views directory

./views/index.html

<p>{{ unescape .Title}}</p>

html output

<p>Hello, <b>World</b>!</p>
- - +For templating the {{embed}} tag should be used

Basic Example

./views/index.html

{{template "partials/header" .}}

<h1>{{.Title}}</h1>

{{template "partials/footer" .}}

./views/partials/header.html

<h2>Header</h2>

./views/partials/footer.html

<h2>Footer</h2>

./views/layouts/main.html

<!DOCTYPE html>
<html>
<head>
<title>Main</title>
</head>

<body>
{{embed}}
</body>
</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
)

func main() {
// Create a new engine
engine := html.New("./views", ".html")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := html.NewFileSystem(http.Dir("./views", ".html"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

Example with embed.FS

package main

import (
"log"
"net/http"
"embed"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
)

//go:embed views/*
var viewsfs embed.FS

func main() {
engine := html.NewFileSystem(http.FS(viewsfs), ".html")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})


app.Get("/", func(c *fiber.Ctx) error {
// Render index - start with views directory
return c.Render("views/index", fiber.Map{
"Title": "Hello, World!",
})
})

log.Fatal(app.Listen(":3000"))
}

and change the starting point to the views directory

./views/index.html

{{template "views/partials/header" .}}

<h1>{{.Title}}</h1>

{{template "views/partials/footer" .}}

Example with innerHTML

package main

import (
"embed"
"html/template"
"log"
"net/http"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
)

//go:embed views/*
var viewsfs embed.FS

func main() {
engine := html.NewFileSystem(http.FS(viewsfs), ".html")
engine.AddFunc(
// add unescape function
"unescape", func(s string) template.HTML {
return template.HTML(s)
},
)

// Pass the engine to the Views
app := fiber.New(fiber.Config{Views: engine})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("views/index", fiber.Map{
"Title": "Hello, <b>World</b>!",
})
})

log.Fatal(app.Listen(":3000"))
}

and change the starting point to the views directory

./views/index.html

<p>{{ unescape .Title}}</p>

html output

<p>Hello, <b>World</b>!</p>
+ + \ No newline at end of file diff --git a/template/next/index.html b/template/next/index.html index 6f17417d2b9..c2be785dfc7 100644 --- a/template/next/index.html +++ b/template/next/index.html @@ -6,13 +6,13 @@ 👋 Welcome | Fiber - - + +
-
Version: Next

👋 Welcome

FiberFiber

This package provides universal methods to use multiple template engines with the Fiber web framework using the new Views interface that is available from > v1.11.1. Special thanks to @bdtomlin & @arsmn for helping!

9 template engines are supported:

Installation

Go version 1.17 or higher is required.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/template/any_template_engine/vX

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"

// To use a specific template engine, import as shown below:
// "github.com/gofiber/template/pug"
// "github.com/gofiber/template/mustache"
// etc..

// In this example we use the html template engine
"github.com/gofiber/template/html/v2"
)

func main() {
// Create a new engine by passing the template folder
// and template extension using <engine>.New(dir, ext string)
engine := html.New("./views", ".html")

// We also support the http.FileSystem interface
// See examples below to load templates from embedded files
engine := html.NewFileSystem(http.Dir("./views"), ".html")

// Reload the templates on each render, good for development
engine.Reload(true) // Optional. Default: false

// Debug will print each template that is parsed, good for debugging
engine.Debug(true) // Optional. Default: false

// Layout defines the variable name that is used to yield templates within layouts
engine.Layout("embed") // Optional. Default: "embed"

// Delims sets the action delimiters to the specified strings
engine.Delims("{{", "}}") // Optional. Default: engine delimiters

// AddFunc adds a function to the template's global function map.
engine.AddFunc("greet", func(name string) string {
return "Hello, " + name + "!"
})

// After you created your engine, you can pass it to Fiber's Views Engine
app := fiber.New(fiber.Config{
Views: engine,
})

// To render a template, you can call the ctx.Render function
// Render(tmpl string, values interface{}, layout ...string)
app.Get("/", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

// Render with layout example
app.Get("/layout", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

More Examples

To view more specific examples, you could visit each engine folder to learn more

embedded Systems

We support the http.FileSystem interface, so you can use different libraries to load the templates from embedded binaries.

pkger

Read documentation: https://github.com/markbates/pkger

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/markbates/pkger"
)

func main() {
engine := html.NewFileSystem(pkger.Dir("/views"), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run pkger && go build
}

packr

Read documentation: https://github.com/gobuffalo/packr

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/gobuffalo/packr/v2"
)

func main() {
engine := html.NewFileSystem(packr.New("Templates", "/views"), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run packr && go build
}

go.rice

Read documentation: https://github.com/GeertJohan/go.rice

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/GeertJohan/go.rice"
)

func main() {
engine := html.NewFileSystem(rice.MustFindBox("views").HTTPBox(), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run rice embed-go && go build
}

fileb0x

Read documentation: https://github.com/UnnoTed/fileb0x

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
// your generated package
"github.com/<user>/<repo>/static"
)

func main() {
engine := html.NewFileSystem(static.HTTP, ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// Read the documentation on how to use fileb0x
}

Benchmarks

Simple

Extended

Benchmarks were ran on Apple Macbook M1. Each engine was benchmarked 20 times and the results averaged into a single xlsx file. Mustache was excluded from the extended benchmark

- - +
Version: Next

👋 Welcome

FiberFiber

This package provides universal methods to use multiple template engines with the Fiber web framework using the new Views interface that is available from > v1.11.1. Special thanks to @bdtomlin & @arsmn for helping!

9 template engines are supported:

Installation

Go version 1.17 or higher is required.

go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/template/any_template_engine/vX

Example

package main

import (
"log"

"github.com/gofiber/fiber/v2"

// To use a specific template engine, import as shown below:
// "github.com/gofiber/template/pug"
// "github.com/gofiber/template/mustache"
// etc..

// In this example we use the html template engine
"github.com/gofiber/template/html/v2"
)

func main() {
// Create a new engine by passing the template folder
// and template extension using <engine>.New(dir, ext string)
engine := html.New("./views", ".html")

// We also support the http.FileSystem interface
// See examples below to load templates from embedded files
engine := html.NewFileSystem(http.Dir("./views"), ".html")

// Reload the templates on each render, good for development
engine.Reload(true) // Optional. Default: false

// Debug will print each template that is parsed, good for debugging
engine.Debug(true) // Optional. Default: false

// Layout defines the variable name that is used to yield templates within layouts
engine.Layout("embed") // Optional. Default: "embed"

// Delims sets the action delimiters to the specified strings
engine.Delims("{{", "}}") // Optional. Default: engine delimiters

// AddFunc adds a function to the template's global function map.
engine.AddFunc("greet", func(name string) string {
return "Hello, " + name + "!"
})

// After you created your engine, you can pass it to Fiber's Views Engine
app := fiber.New(fiber.Config{
Views: engine,
})

// To render a template, you can call the ctx.Render function
// Render(tmpl string, values interface{}, layout ...string)
app.Get("/", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

// Render with layout example
app.Get("/layout", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

More Examples

To view more specific examples, you could visit each engine folder to learn more

embedded Systems

We support the http.FileSystem interface, so you can use different libraries to load the templates from embedded binaries.

pkger

Read documentation: https://github.com/markbates/pkger

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/markbates/pkger"
)

func main() {
engine := html.NewFileSystem(pkger.Dir("/views"), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run pkger && go build
}

packr

Read documentation: https://github.com/gobuffalo/packr

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/gobuffalo/packr/v2"
)

func main() {
engine := html.NewFileSystem(packr.New("Templates", "/views"), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run packr && go build
}

go.rice

Read documentation: https://github.com/GeertJohan/go.rice

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"

"github.com/GeertJohan/go.rice"
)

func main() {
engine := html.NewFileSystem(rice.MustFindBox("views").HTTPBox(), ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// run rice embed-go && go build
}

fileb0x

Read documentation: https://github.com/UnnoTed/fileb0x

package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html"
// your generated package
"github.com/<user>/<repo>/static"
)

func main() {
engine := html.NewFileSystem(static.HTTP, ".html")

app := fiber.New(fiber.Config{
Views: engine,
})

// Read the documentation on how to use fileb0x
}

Benchmarks

Simple

Extended

Benchmarks were ran on Apple Macbook M1. Each engine was benchmarked 20 times and the results averaged into a single xlsx file. Mustache was excluded from the extended benchmark

+ + \ No newline at end of file diff --git a/template/next/jet/index.html b/template/next/jet/index.html index 7c039e99120..94302a8eaba 100644 --- a/template/next/jet/index.html +++ b/template/next/jet/index.html @@ -6,8 +6,8 @@ Jet | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Jet is a template engine create by cloudykit, to see the original syntax documentation please click here

Basic Example

./views/index.jet

{{include "partials/header"}}

<h1>{{ Title }}</h1>

{{include "partials/footer"}}

./views/partials/header.jet

<h2>Header</h2>

./views/partials/footer.jet

<h2>Footer</h2>

./views/layouts/main.jet

<!DOCTYPE html>
<html>

<head>
<title>Title</title>
</head>

<body>
{{ embed() }}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/jet/v2"
)

func main() {
// Create a new engine
engine := jet.New("./views", ".jet")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := jet.NewFileSystem(http.Dir("./views", ".jet"))

// Pass the engine to the views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Jet is a template engine create by cloudykit, to see the original syntax documentation please click here

Basic Example

./views/index.jet

{{include "partials/header"}}

<h1>{{ Title }}</h1>

{{include "partials/footer"}}

./views/partials/header.jet

<h2>Header</h2>

./views/partials/footer.jet

<h2>Footer</h2>

./views/layouts/main.jet

<!DOCTYPE html>
<html>

<head>
<title>Title</title>
</head>

<body>
{{ embed() }}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/jet/v2"
)

func main() {
// Create a new engine
engine := jet.New("./views", ".jet")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := jet.NewFileSystem(http.Dir("./views", ".jet"))

// Pass the engine to the views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/next/mustache/index.html b/template/next/mustache/index.html index 33775ae446a..1533c91b2a8 100644 --- a/template/next/mustache/index.html +++ b/template/next/mustache/index.html @@ -6,8 +6,8 @@ Mustache | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Mustache is a template engine created by hoisie/cbroglie, to see the original syntax documentation please click here

Basic Example

./views/index.mustache

{{> views/partials/header }}

<h1>{{Title}}</h1>

{{> views/partials/footer }}

./views/partials/header.mustache

<h2>Header</h2>

./views/partials/footer.mustache

<h2>Footer</h2>

./views/layouts/main.mustache

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{{embed}}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/mustache/v2"
)

func main() {
// Create a new engine
engine := mustache.New("./views", ".mustache")

// Or from an embedded system
// Note that with an embedded system the partials included from template files must be
// specified relative to the filesystem's root, not the current working directory
// engine := mustache.NewFileSystem(http.Dir("./views", ".mustache"), ".mustache")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Mustache is a template engine created by hoisie/cbroglie, to see the original syntax documentation please click here

Basic Example

./views/index.mustache

{{> views/partials/header }}

<h1>{{Title}}</h1>

{{> views/partials/footer }}

./views/partials/header.mustache

<h2>Header</h2>

./views/partials/footer.mustache

<h2>Footer</h2>

./views/layouts/main.mustache

<!DOCTYPE html>
<html>

<head>
<title>Main</title>
</head>

<body>
{{{embed}}}
</body>

</html>
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/mustache/v2"
)

func main() {
// Create a new engine
engine := mustache.New("./views", ".mustache")

// Or from an embedded system
// Note that with an embedded system the partials included from template files must be
// specified relative to the filesystem's root, not the current working directory
// engine := mustache.NewFileSystem(http.Dir("./views", ".mustache"), ".mustache")

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/next/pug/index.html b/template/next/pug/index.html index 5cb96f12950..238d8cc7ce3 100644 --- a/template/next/pug/index.html +++ b/template/next/pug/index.html @@ -6,8 +6,8 @@ Pug | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Pug is a template engine create by joker, to see the original syntax documentation please click here

Basic Example

./views/index.pug

include partials/header.pug

h1 #{.Title}

include partials/footer.pug

./views/partials/header.pug

h2 Header

./views/partials/footer.pug

h2 Footer

./views/layouts/main.pug

doctype html
html
head
title Main
include ../partials/meta.pug
body
| {{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/pug/v2"

// "net/http" // embedded system
)

func main() {
// Create a new engine
engine := pug.New("./views", ".pug")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := pug.NewFileSystem(http.Dir("./views", ".pug"))

// Pass the engine to the views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Pug is a template engine create by joker, to see the original syntax documentation please click here

Basic Example

./views/index.pug

include partials/header.pug

h1 #{.Title}

include partials/footer.pug

./views/partials/header.pug

h2 Header

./views/partials/footer.pug

h2 Footer

./views/layouts/main.pug

doctype html
html
head
title Main
include ../partials/meta.pug
body
| {{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/pug/v2"

// "net/http" // embedded system
)

func main() {
// Create a new engine
engine := pug.New("./views", ".pug")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := pug.NewFileSystem(http.Dir("./views", ".pug"))

// Pass the engine to the views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/next/search-index.json b/template/next/search-index.json index bdf10ac1330..47c4ee18e80 100644 --- a/template/next/search-index.json +++ b/template/next/search-index.json @@ -1 +1 @@ -[{"documents":[{"i":3855,"t":"👋 Welcome","u":"/template/next/","b":[]},{"i":3867,"t":"Ace","u":"/template/next/ace/","b":[]},{"i":3871,"t":"Amber","u":"/template/next/amber/","b":[]},{"i":3875,"t":"Django","u":"/template/next/django/","b":[]},{"i":3883,"t":"Handlebars","u":"/template/next/handlebars/","b":[]},{"i":3887,"t":"HTML","u":"/template/next/html/","b":["HTML"]},{"i":3895,"t":"Golang Templates Cheatsheet","u":"/template/next/html/TEMPLATES_CHEATSHEET","b":["HTML"]},{"i":3917,"t":"Jet","u":"/template/next/jet/","b":[]},{"i":3921,"t":"Mustache","u":"/template/next/mustache/","b":[]},{"i":3925,"t":"Pug","u":"/template/next/pug/","b":[]},{"i":3929,"t":"Slim","u":"/template/next/slim/","b":[]}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3855",[0,1.685,1,1.685]],["t/3867",[2,2.279]],["t/3871",[3,2.279]],["t/3875",[4,2.279]],["t/3883",[5,2.279]],["t/3887",[6,2.279]],["t/3895",[7,1.337,8,1.337,9,1.337]],["t/3917",[10,2.279]],["t/3921",[11,2.279]],["t/3925",[12,2.279]],["t/3929",[13,2.279]]],"invertedIndex":[["",{"_index":0,"t":{"3855":{"position":[[0,2]]}}}],["ac",{"_index":2,"t":{"3867":{"position":[[0,3]]}}}],["amber",{"_index":3,"t":{"3871":{"position":[[0,5]]}}}],["cheatsheet",{"_index":9,"t":{"3895":{"position":[[17,10]]}}}],["django",{"_index":4,"t":{"3875":{"position":[[0,6]]}}}],["golang",{"_index":7,"t":{"3895":{"position":[[0,6]]}}}],["handlebar",{"_index":5,"t":{"3883":{"position":[[0,10]]}}}],["html",{"_index":6,"t":{"3887":{"position":[[0,4]]}}}],["jet",{"_index":10,"t":{"3917":{"position":[[0,3]]}}}],["mustach",{"_index":11,"t":{"3921":{"position":[[0,8]]}}}],["pug",{"_index":12,"t":{"3925":{"position":[[0,3]]}}}],["slim",{"_index":13,"t":{"3929":{"position":[[0,4]]}}}],["templat",{"_index":8,"t":{"3895":{"position":[[7,9]]}}}],["welcom",{"_index":1,"t":{"3855":{"position":[[3,7]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3857,"t":"Installation","u":"/template/next/","h":"#installation","p":3855},{"i":3859,"t":"Example","u":"/template/next/","h":"#example","p":3855},{"i":3861,"t":"More Examples","u":"/template/next/","h":"#more-examples","p":3855},{"i":3863,"t":"embedded Systems","u":"/template/next/","h":"#embedded-systems","p":3855},{"i":3865,"t":"Benchmarks","u":"/template/next/","h":"#benchmarks","p":3855},{"i":3869,"t":"Basic Example","u":"/template/next/ace/","h":"#basic-example","p":3867},{"i":3873,"t":"Basic Example","u":"/template/next/amber/","h":"#basic-example","p":3871},{"i":3877,"t":"Basic Example","u":"/template/next/django/","h":"#basic-example","p":3875},{"i":3879,"t":"Using embedded file system (1.16+ only)","u":"/template/next/django/","h":"#using-embedded-file-system-116-only","p":3875},{"i":3881,"t":"Register and use custom functions","u":"/template/next/django/","h":"#register-and-use-custom-functions","p":3875},{"i":3885,"t":"Basic Example","u":"/template/next/handlebars/","h":"#basic-example","p":3883},{"i":3889,"t":"Basic Example","u":"/template/next/html/","h":"#basic-example","p":3887},{"i":3891,"t":"Example with embed.FS","u":"/template/next/html/","h":"#example-with-embedfs","p":3887},{"i":3893,"t":"Example with innerHTML","u":"/template/next/html/","h":"#example-with-innerhtml","p":3887},{"i":3897,"t":"Table of Contents","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#table-of-contents","p":3895},{"i":3899,"t":"Parsing and Creating Templates","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#parsing-and-creating-templates","p":3895},{"i":3901,"t":"Executing Templates","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#executing-templates","p":3895},{"i":3903,"t":"Template Encoding and HTML","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-encoding-and-html","p":3895},{"i":3905,"t":"Template Variables","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-variables","p":3895},{"i":3907,"t":"Template Actions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-actions","p":3895},{"i":3909,"t":"Template Functions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-functions","p":3895},{"i":3911,"t":"Template Comparison Functions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-comparison-functions","p":3895},{"i":3913,"t":"Nested Templates and Layouts","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#nested-templates-and-layouts","p":3895},{"i":3915,"t":"Templates Calling Functions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#templates-calling-functions","p":3895},{"i":3919,"t":"Basic Example","u":"/template/next/jet/","h":"#basic-example","p":3917},{"i":3923,"t":"Basic Example","u":"/template/next/mustache/","h":"#basic-example","p":3921},{"i":3927,"t":"Basic Example","u":"/template/next/pug/","h":"#basic-example","p":3925},{"i":3931,"t":"Basic Example","u":"/template/next/slim/","h":"#basic-example","p":3929}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3857",[0,3.833]],["t/3859",[1,0.989]],["t/3861",[1,0.801,2,3.103]],["t/3863",[3,2.568,4,2.568]],["t/3865",[5,3.833]],["t/3869",[1,0.801,6,1.169]],["t/3873",[1,0.801,6,1.169]],["t/3877",[1,0.801,6,1.169]],["t/3879",[3,1.634,4,1.634,7,1.634,8,1.975,9,1.975]],["t/3881",[7,1.859,10,2.247,11,2.247,12,1.413]],["t/3885",[1,0.801,6,1.169]],["t/3889",[1,0.801,6,1.169]],["t/3891",[1,0.801,13,3.103]],["t/3893",[1,0.801,14,3.103]],["t/3897",[15,3.103,16,3.103]],["t/3899",[17,2.606,18,2.606,19,0.982]],["t/3901",[19,1.169,20,3.103]],["t/3903",[19,0.982,21,2.606,22,2.606]],["t/3905",[19,1.169,23,3.103]],["t/3907",[19,1.169,24,3.103]],["t/3909",[12,1.952,19,1.169]],["t/3911",[12,1.64,19,0.982,25,2.606]],["t/3913",[19,0.982,26,2.606,27,2.606]],["t/3915",[12,1.64,19,0.982,28,2.606]],["t/3919",[1,0.801,6,1.169]],["t/3923",[1,0.801,6,1.169]],["t/3927",[1,0.801,6,1.169]],["t/3931",[1,0.801,6,1.169]]],"invertedIndex":[["1.16",{"_index":9,"t":{"3879":{"position":[[27,6]]}}}],["action",{"_index":24,"t":{"3907":{"position":[[9,7]]}}}],["basic",{"_index":6,"t":{"3869":{"position":[[0,5]]},"3873":{"position":[[0,5]]},"3877":{"position":[[0,5]]},"3885":{"position":[[0,5]]},"3889":{"position":[[0,5]]},"3919":{"position":[[0,5]]},"3923":{"position":[[0,5]]},"3927":{"position":[[0,5]]},"3931":{"position":[[0,5]]}}}],["benchmark",{"_index":5,"t":{"3865":{"position":[[0,10]]}}}],["call",{"_index":28,"t":{"3915":{"position":[[10,7]]}}}],["comparison",{"_index":25,"t":{"3911":{"position":[[9,10]]}}}],["content",{"_index":16,"t":{"3897":{"position":[[9,8]]}}}],["creat",{"_index":18,"t":{"3899":{"position":[[12,8]]}}}],["custom",{"_index":11,"t":{"3881":{"position":[[17,6]]}}}],["embed",{"_index":3,"t":{"3863":{"position":[[0,8]]},"3879":{"position":[[6,8]]}}}],["embed.f",{"_index":13,"t":{"3891":{"position":[[13,8]]}}}],["encod",{"_index":21,"t":{"3903":{"position":[[9,8]]}}}],["exampl",{"_index":1,"t":{"3859":{"position":[[0,7]]},"3861":{"position":[[5,8]]},"3869":{"position":[[6,7]]},"3873":{"position":[[6,7]]},"3877":{"position":[[6,7]]},"3885":{"position":[[6,7]]},"3889":{"position":[[6,7]]},"3891":{"position":[[0,7]]},"3893":{"position":[[0,7]]},"3919":{"position":[[6,7]]},"3923":{"position":[[6,7]]},"3927":{"position":[[6,7]]},"3931":{"position":[[6,7]]}}}],["execut",{"_index":20,"t":{"3901":{"position":[[0,9]]}}}],["file",{"_index":8,"t":{"3879":{"position":[[15,4]]}}}],["function",{"_index":12,"t":{"3881":{"position":[[24,9]]},"3909":{"position":[[9,9]]},"3911":{"position":[[20,9]]},"3915":{"position":[[18,9]]}}}],["html",{"_index":22,"t":{"3903":{"position":[[22,4]]}}}],["innerhtml",{"_index":14,"t":{"3893":{"position":[[13,9]]}}}],["instal",{"_index":0,"t":{"3857":{"position":[[0,12]]}}}],["layout",{"_index":27,"t":{"3913":{"position":[[21,7]]}}}],["more",{"_index":2,"t":{"3861":{"position":[[0,4]]}}}],["nest",{"_index":26,"t":{"3913":{"position":[[0,6]]}}}],["pars",{"_index":17,"t":{"3899":{"position":[[0,7]]}}}],["regist",{"_index":10,"t":{"3881":{"position":[[0,8]]}}}],["system",{"_index":4,"t":{"3863":{"position":[[9,7]]},"3879":{"position":[[20,6]]}}}],["tabl",{"_index":15,"t":{"3897":{"position":[[0,5]]}}}],["templat",{"_index":19,"t":{"3899":{"position":[[21,9]]},"3901":{"position":[[10,9]]},"3903":{"position":[[0,8]]},"3905":{"position":[[0,8]]},"3907":{"position":[[0,8]]},"3909":{"position":[[0,8]]},"3911":{"position":[[0,8]]},"3913":{"position":[[7,9]]},"3915":{"position":[[0,9]]}}}],["us",{"_index":7,"t":{"3879":{"position":[[0,5]]},"3881":{"position":[[13,3]]}}}],["variabl",{"_index":23,"t":{"3905":{"position":[[9,9]]}}}]],"pipeline":["stemmer"]}},{"documents":[{"i":3856,"t":"This package provides universal methods to use multiple template engines with the Fiber web framework using the new Views interface that is available from > v1.11.1. Special thanks to @bdtomlin & @arsmn for helping! 9 template engines are supported: ace amber django handlebars html jet mustache pug slim","s":"👋 Welcome","u":"/template/next/","h":"","p":3855},{"i":3858,"t":"Go version 1.17 or higher is required. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/template/any_template_engine/vX","s":"Installation","u":"/template/next/","h":"#installation","p":3855},{"i":3860,"t":"package main import ( \"log\" \"github.com/gofiber/fiber/v2\" // To use a specific template engine, import as shown below: // \"github.com/gofiber/template/pug\" // \"github.com/gofiber/template/mustache\" // etc.. // In this example we use the html template engine \"github.com/gofiber/template/html/v2\" ) func main() { // Create a new engine by passing the template folder // and template extension using .New(dir, ext string) engine := html.New(\"./views\", \".html\") // We also support the http.FileSystem interface // See examples below to load templates from embedded files engine := html.NewFileSystem(http.Dir(\"./views\"), \".html\") // Reload the templates on each render, good for development engine.Reload(true) // Optional. Default: false // Debug will print each template that is parsed, good for debugging engine.Debug(true) // Optional. Default: false // Layout defines the variable name that is used to yield templates within layouts engine.Layout(\"embed\") // Optional. Default: \"embed\" // Delims sets the action delimiters to the specified strings engine.Delims(\"{{\", \"}}\") // Optional. Default: engine delimiters // AddFunc adds a function to the template's global function map. engine.AddFunc(\"greet\", func(name string) string { return \"Hello, \" + name + \"!\" }) // After you created your engine, you can pass it to Fiber's Views Engine app := fiber.New(fiber.Config{ Views: engine, }) // To render a template, you can call the ctx.Render function // Render(tmpl string, values interface{}, layout ...string) app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) // Render with layout example app.Get(\"/layout\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Example","u":"/template/next/","h":"#example","p":3855},{"i":3862,"t":"To view more specific examples, you could visit each engine folder to learn more ace amber django handlebars html jet mustache pug slim","s":"More Examples","u":"/template/next/","h":"#more-examples","p":3855},{"i":3864,"t":"We support the http.FileSystem interface, so you can use different libraries to load the templates from embedded binaries. pkger​ Read documentation: https://github.com/markbates/pkger package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/markbates/pkger\" ) func main() { engine := html.NewFileSystem(pkger.Dir(\"/views\"), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run pkger && go build } packr​ Read documentation: https://github.com/gobuffalo/packr package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/gobuffalo/packr/v2\" ) func main() { engine := html.NewFileSystem(packr.New(\"Templates\", \"/views\"), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run packr && go build } go.rice​ Read documentation: https://github.com/GeertJohan/go.rice package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/GeertJohan/go.rice\" ) func main() { engine := html.NewFileSystem(rice.MustFindBox(\"views\").HTTPBox(), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run rice embed-go && go build } fileb0x​ Read documentation: https://github.com/UnnoTed/fileb0x package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" // your generated package \"github.com///static\" ) func main() { engine := html.NewFileSystem(static.HTTP, \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // Read the documentation on how to use fileb0x }","s":"embedded Systems","u":"/template/next/","h":"#embedded-systems","p":3855},{"i":3866,"t":"Simple​ Extended​ Benchmarks were ran on Apple Macbook M1. Each engine was benchmarked 20 times and the results averaged into a single xlsx file. Mustache was excluded from the extended benchmark","s":"Benchmarks","u":"/template/next/","h":"#benchmarks","p":3855},{"i":3868,"t":"Ace is a template engine create by yossi, to see the original syntax documentation please click here","s":"Ace","u":"/template/next/ace/","h":"","p":3867},{"i":3870,"t":"./views/index.ace = include ./views/partials/header . h1 {{.Title}} = include ./views/partials/footer . ./views/partials/header.ace h1 Header ./views/partials/footer.ace h1 Footer ./views/layouts/main.ace = doctype html html head title Main body {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/ace/v2\" ) func main() { // Create a new engine engine := ace.New(\"./views\", \".ace\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".ace\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/ace/","h":"#basic-example","p":3867},{"i":3872,"t":"Amber is a template engine create by eknkc, to see the original syntax documentation please click here","s":"Amber","u":"/template/next/amber/","h":"","p":3871},{"i":3874,"t":"./views/index.amber import ./views/partials/header h1 #{Title} import ./views/partials/footer ./views/partials/header.amber h1 Header ./views/partials/footer.amber h1 Footer ./views/layouts/main.amber doctype html html head title Main body #{embed()} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/amber/v2\" ) func main() { // Create a new engine engine := amber.New(\"./views\", \".amber\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".amber\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/amber/","h":"#basic-example","p":3871},{"i":3876,"t":"Django is a template engine create by flosch, to see the original syntax documentation please click here","s":"Django","u":"/template/next/django/","h":"","p":3875},{"i":3878,"t":"./views/index.django {% include \"partials/header.django\" %}

{{ Title }}

{% include \"partials/footer.django\" %} ./views/partials/header.django

Header

./views/partials/footer.django

Footer

./views/layouts/main.django Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/django/v3\" ) func main() { // Create a new engine engine := django.New(\"./views\", \".django\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".django\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/django/","h":"#basic-example","p":3875},{"i":3880,"t":"When using the // go:embed directive, resolution of inherited templates using django's {% extend '' %} keyword fails when instantiating the template engine with django.NewFileSystem(). In that case, use the django.NewPathForwardingFileSystem() function to instantiate the template engine. This function provides the proper configuration for resolving inherited templates. Assume you have the following files: views/ancenstor.django views/descendant.djando then package main import ( \"log\" \"embed\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/django/v3\" ) //go:embed views var viewsAsssets embed.FS func main() { // Create a new engine engine := NewPathForwardingFileSystem(http.FS(viewsAsssets), \"/views\", \".django\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render descendant return c.Render(\"descendant\", fiber.Map{ \"greeting\": \"World\", }) }) log.Fatal(app.Listen(\":3000\")) }","s":"Using embedded file system (1.16+ only)","u":"/template/next/django/","h":"#using-embedded-file-system-116-only","p":3875},{"i":3882,"t":"// My custom function func Nl2brHtml(value interface{}) string { if str, ok := value.(string); ok { return strings.Replace(str, \"\\n\", \"
\", -1) } return \"\" } // Create a new engine engine := django.New(\"./views\", \".django\") // register functions engine.AddFunc(\"nl2br\", Nl2brHtml) // Pass the engine to the Views app := fiber.New(fiber.Config{Views: engine}) in the handler c.Render(\"index\", fiber.Map{ \"Fiber\": \"Hello, World!\\n\\nGreetings from Fiber Team\", }) ./views/index.django {{ nl2br(Fiber) }} Output: Hello, World!

Greetings from Fiber Team ","s":"Register and use custom functions","u":"/template/next/django/","h":"#register-and-use-custom-functions","p":3875},{"i":3884,"t":"Handlebars is a template engine create by aymerick, to see the original syntax documentation please click here","s":"Handlebars","u":"/template/next/handlebars/","h":"","p":3883},{"i":3886,"t":"./views/index.hbs {{> 'partials/header' }}

{{Title}}

{{> 'partials/footer' }} ./views/partials/header.hbs

Header

./views/partials/footer.hbs

Footer

./views/layouts/main.hbs Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/handlebars/v2\" ) func main() { // Create a new engine engine := handlebars.New(\"./views\", \".hbs\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".hbs\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/handlebars/","h":"#basic-example","p":3883},{"i":3888,"t":"HTML is the official Go template engine html/template, to see the original syntax documentation please click here Info: All templates within the specified view directory are analyzed and compiled at the beginning to increase the performance when using them. Thus it should be noted that no definition with the same name should exist, otherwise they will overwrite each other. For templating the {{embed}} tag should be used","s":"HTML","u":"/template/next/html/","h":"","p":3887},{"i":3890,"t":"./views/index.html {{template \"partials/header\" .}}

{{.Title}}

{{template \"partials/footer\" .}} ./views/partials/header.html

Header

./views/partials/footer.html

Footer

./views/layouts/main.html Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html/v2\" ) func main() { // Create a new engine engine := html.New(\"./views\", \".html\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".html\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/html/","h":"#basic-example","p":3887},{"i":3892,"t":"package main import ( \"log\" \"net/http\" \"embed\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" ) //go:embed views/* var viewsfs embed.FS func main() { engine := html.NewFileSystem(http.FS(viewsfs), \".html\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index - start with views directory return c.Render(\"views/index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) } and change the starting point to the views directory ./views/index.html {{template \"views/partials/header\" .}}

{{.Title}}

{{template \"views/partials/footer\" .}}","s":"Example with embed.FS","u":"/template/next/html/","h":"#example-with-embedfs","p":3887},{"i":3894,"t":"package main import ( \"embed\" \"html/template\" \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" ) //go:embed views/* var viewsfs embed.FS func main() { engine := html.NewFileSystem(http.FS(viewsfs), \".html\") engine.AddFunc( // add unescape function \"unescape\", func(s string) template.HTML { return template.HTML(s) }, ) // Pass the engine to the Views app := fiber.New(fiber.Config{Views: engine}) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"views/index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) } and change the starting point to the views directory ./views/index.html

{{ unescape .Title}}

html output

Hello, World!

","s":"Example with innerHTML","u":"/template/next/html/","h":"#example-with-innerhtml","p":3887},{"i":3896,"t":"The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.","s":"Golang Templates Cheatsheet","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"","p":3895},{"i":3898,"t":"Parsing and Creating Templates Executing Templates Template Encoding and HTML Template Variables Template Actions Template Functions Template Comparison Functions Nested Templates and Layouts Templates Calling Functions","s":"Table of Contents","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#table-of-contents","p":3895},{"i":3900,"t":"Naming Templates​ There is no defined file extension for Go templates. One of the most popular is .tmpl supported by vim-go and referenced in the text/template godocs. The extension .gohtml supports syntax highlighting in both Atom and GoSublime editors. Finally analysis of large Go codebases finds that .tpl is often used by developers. While the extension is not important it is still good to be consistent within a project for clarity. Creating a Template​ tpl, err := template.Parse(filename) will get the template at filename and store it in tpl. tpl can then be executed to show the template. Parsing Multiple Templates​ template.ParseFiles(filenames) takes a list of filenames and stores all templates. template.ParseGlob(pattern) will find all templates matching the pattern and store the templates.","s":"Parsing and Creating Templates","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#parsing-and-creating-templates","p":3895},{"i":3902,"t":"Execute a Single Template​ Once a template has been parsed there are two options to execute them. A single template tpl can be executed using tpl.Execute(io.Writer, data). The content of tpl will be written to the io.Writer. Data is an interface passed to the template that will be useable in the template. Executing a Named Template​ tpl.ExecuteTemplate(io.Writer, name, data) works the same as execute but allows for a string name of the template the user wants to execute.","s":"Executing Templates","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#executing-templates","p":3895},{"i":3904,"t":"Contextual Encoding​ Go’s html/template package does encoding based on the context of the code. As a result, html/template encodes any characters that need encoding to be rendered correctly. For example the < and > in \"

A header!

\" will be encoded as <h1>A header!</h1> . Type template.HTML can be used to skip encoding by telling Go the string is safe. template.HTML(\"

A Safe header

\") will then be

A Safe header

. Using this type with user input is dangerous and leaves the application vulnerable. The go html/template package is aware of attributes within the template and will encode values differently based on the attribute. Go templates can also be used with javascript. Structs and maps will be expanded into JSON objects and quotes will be added to strings for use in function parameters and as variable values. // Go type Cat struct { Name string Age int } kitten := Cat{\"Sam\", 12} // Template // Javascript var cat = {\"Name\":\"Sam\", \"Age\" 12} Safe Strings and HTML Comments​ The html/template package will remove any comments from a template by default. This can cause issues when comments are necessary such as detecting internet explorer. We can use the Custom Functions method (Globally) to create a function that returns html preserving comments. Define a function htmlSafe in the FuncMap of the template. testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"htmlSafe\": func(html string) template.HTML { return template.HTML(html) }, }).ParseFiles(\"hello.gohtml\") This function takes a string and produces the unaltered HTML code. This function can be used in a template like so to preserve the comments : {{htmlSafe \"\" }}","s":"Template Encoding and HTML","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-encoding-and-html","p":3895},{"i":3906,"t":"The dot character (.)​ A template variable can be a boolean, string, character, integer, floating-point, imaginary, or complex constant in Go syntax. Data passed to the template can be accessed using dot {{ . }}. If the data is a complex type then it’s fields can be accessed using the dot with the field name {{ .FieldName }}. Dots can be chained together if the data contains multiple complex structures. {{ .Struct.StructTwo.Field }} Variables in Templates​ Data passed to the template can be saved in a variable and used throughout the template. {{$number := .}} We use the $number to create a variable then initialize it with the value passed to the template. To use the variable we call it in the template with {{$number}}. {{$number := .}}

It is day number {{$number}} of the month

var tpl *template.Template tpl = template.Must(template.ParseFiles(\"templateName\")) err := tpl.ExecuteTemplate(os.Stdout, \"templateName\", 23) In this example we pass 23 to the template and stored in the $number variable which can be used anywhere in the template","s":"Template Variables","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-variables","p":3895},{"i":3908,"t":"If/Else Statements​ Go templates support if/else statements like many programming languages. We can use the if statement to check for values, if it doesn’t exist we can use an else value. The empty values are false, 0, any nil pointer or interface value, and any array, slice, map, or string of length zero.

Hello, {{if .Name}} {{.Name}} {{else}} Anonymous {{end}}!

If .Name exists then Hello, Name will be printed (replaced with the name value) otherwise it will print Hello, Anonymous. Templates also provide the else if statment {{else if .Name2 }} which can be used to evaluate other options after an if. Removing Whitespace​ Adding different values to a template can add various amounts of whitespace. We can either change our template to better handle it, by ignoring or minimizing effects, or we can use the minus sign - within out template.

Hello, {{if .Name}} {{.Name}} {{- else}} Anonymous {{- end}}!

Here we are telling the template to remove all spaces between the Name variable and whatever comes after it. We are doing the same with the end keyword. This allows us to have whitespace within the template for easier reading but remove it in production. Range Blocks​ Go templates have a range keyword to iterate over all objects in a structure. Suppose we had the Go structures: type Item struct { Name string Price int } type ViewData struct { Name string Items []Item } We have an Item, with a name and price, then a ViewData which is the structure sent to the template. Consider the template containing the following: {{range .Items}}

{{.Name}}

${{.Price}}
{{end}} For each Item in the range of Items (in the ViewData structure) get the Name and Price of that item and create html for each Item automatically. Within a range each Item becomes the {{.}} and the item properties therefore become {{.Name}} or {{.Price}} in this example.","s":"Template Actions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-actions","p":3895},{"i":3910,"t":"The template package provides a list of predefined global functions. Below are some of the most used. Indexing structures in Templates​ If the data passed to the template is a map, slice, or array it can be indexed from the template. We use {{index x number}} where index is the keyword, x is the data and number is a integer for the index value. If we had {{index names 2}} it is equivalent to names[2]. We can add more integers to index deeper into data. {{index names 2 3 4}} is equivalent to names[2][3][4].

{{index .FavNums 2 }}

type person struct { Name string FavNums []int } func main() { tpl := template.Must(template.ParseGlob(\"*.gohtml\")) tpl.Execute(os.Stdout, &person{\"Curtis\", []int{7, 11, 94}}) } This code example passes a person structure and gets the 3rd favourite number from the FavNums slice. The and Function​ The and function returns the boolean AND of its arguments by returning the first empty argument or the last argument. and x y behaves logically as if x then y else x . Consider the following go code type User struct { Admin bool } type ViewData struct { *User } Pass a ViewData with a User that has Admin set true to the following template {{if and .User .User.Admin}} You are an admin user! {{else}} Access denied! {{end}} The result will be You are an admin user!. However if the ViewData did not include a *User object or Admin was set as false then the result will be Access denied!. The or Function​ The or function operates similarly to the and function however will stop at the first true. or x y is equivalent to if x then x else y so y will never be evaluated if x is not empty. The not Function​ The not function returns the boolean negation of the argument. {{ if not .Authenticated}} Access Denied! {{ end }}","s":"Template Functions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-functions","p":3895},{"i":3912,"t":"Comparisons​ The html/template package provides a variety of functions to do comparisons between operators. The operators may only be basic types or named basic types such as type Temp float32 Remember that template functions take the form {{ function arg1 arg2 }}. eq Returns the result of arg1 == arg2 ne Returns the result of arg1 != arg2 lt Returns the result of arg1 < arg2 le Returns the result of arg1 <= arg2 gt Returns the result of arg1 > arg2 ge Returns the result of arg1 >= arg2 Of special note eq can be used with two or more arguments by comparing all arguments to the first. {{ eq arg1 arg2 arg3 arg4}} will result in the following logical expression: arg1==arg2 || arg1==arg3 || arg1==arg4","s":"Template Comparison Functions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-comparison-functions","p":3895},{"i":3914,"t":"Nesting Templates​ Nested templates can be used for parts of code frequently used across templates, a footer or header for example. Rather than updating each template separately we can use a nested template that all other templates can use. You can define a template as follows: {{define \"footer\"}}

Here is the footer

{{end}} A template named “footer” is defined which can be used in other templates like so to add the footer template content into the other template: {{template \"footer\"}} Passing Variables between Templates​ The template action used to include nested templates also allows a second parameter to pass data to the nested template. // Define a nested template called header {{define \"header\"}}

{{.}}

{{end}} // Call template and pass a name parameter {{range .Items}}
{{template \"header\" .Name}} ${{.Price}}
{{end}} We use the same range to loop through Items as before but we pass the name to the header template each time in this simple example. Creating Layouts​ Glob patterns specify sets of filenames with wildcard characters. The template.ParseGlob(pattern string) function will parse all templates that match the string pattern. template.ParseFiles(files...) can also be used with a list of file names. The templates are named by default based on the base names of the argument files. This mean views/layouts/hello.gohtml will have the name hello.gohtml . If the template has a `{{define “templateName”}} within it then that name will be usable. A specific template can be executed using t.ExecuteTemplate(w, \"templateName\", nil) . t is an object of type Template, w is type io.Writer such as an http.ResponseWriter, Then there is the name of the template to execute, and finally passing any data to the template, in this case a nil value. Example main.go file // Omitted imports & package var LayoutDir string = \"views/layouts\" var bootstrap *template.Template func main() { var err error bootstrap, err = template.ParseGlob(LayoutDir + \"/*.gohtml\") if err != nil { panic(err) } http.HandleFunc(\"/\", handler) http.ListenAndServe(\":8080\", nil) } func handler(w http.ResponseWriter, r *http.Request) { bootstrap.ExecuteTemplate(w, \"bootstrap\", nil) } All .gohtml files are parsed in main. When route / is reached the template defined as bootstrap is executed using the handler function. Example views/layouts/bootstrap.gohtml file {{define \"bootstrap\"}} Go Templates

Filler header

Filler paragraph

{{end}}","s":"Nested Templates and Layouts","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#nested-templates-and-layouts","p":3895},{"i":3916,"t":"Function Variables (calling struct methods)​ We can use templates to call the methods of objects in the template to return data. Consider the User struct with the following method. type User struct { ID int Email string } func (u User) HasPermission(feature string) bool { if feature == \"feature-a\" { return true } else { return false } } When a type User has been passed to the template we can then call this method from the template. {{if .User.HasPermission \"feature-a\"}}

Feature A

Some other stuff here...

{{else}}

Feature A

To enable Feature A please upgrade your plan

{{end}} The template checks if the User HasPermission for the feature and renders depending on the result. Function Variables (call)​ If the Method HasPermission has to change at times then the Function Variables (Methods) implementation may not fit the design. Instead a HasPermission func(string) bool attribute can be added on the User type. This can then have a function assigned to it at creation. // Structs type ViewData struct { User User } type User struct { ID int Email string HasPermission func(string) bool } // Example of creating a ViewData vd := ViewData{ User: User{ ID: 1, Email: \"curtis.vermeeren@gmail.com\", // Create the HasPermission function HasPermission: func(feature string) bool { if feature == \"feature-b\" { return true } return false }, }, } // Executing the ViewData with the template err := testTemplate.Execute(w, vd) We need to tell the Go template that we want to call this function so we must change the template from the Function Variables (Methods) implementation to do this. We use the call keyword supplied by the go html/template package. Changing the previous template to use call results in: {{if (call .User.HasPermission \"feature-b\")}}

Feature B

Some other stuff here...

{{else}}

Feature B

To enable Feature B please upgrade your plan

{{end}} Custom Functions​ Another way to call functions is to create custom functions with template.FuncMap . This method creates global methods that can be used throughout the entire application. FuncMap has type map[string]interface{} mapping a string, the function name, to a function. The mapped functions must have either a single return value, or two return values where the second has type error. // Creating a template with function hasPermission testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"hasPermission\": func(user User, feature string) bool { if user.ID == 1 && feature == \"feature-a\" { return true } return false }, }).ParseFiles(\"hello.gohtml\") Here the function to check if a user has permission for a feature is mapped to the string \"hasPermission\" and stored in the FuncMap. Note that the custom functions must be created before calling ParseFiles() The function could be executed in the template as follows: {{ if hasPermission .User \"feature-a\" }} The .User and string \"feature-a\" are both passed to hasPermission as arguments. Custom Functions (Globally)​ The previous two methods of custom functions rely on .User being passed to the template. This works in many cases but in a large application passing too many objects to a template can become difficult to maintain across many templates. We can change the implementation of the custom function to work without the .User being passed. Using a similar feature example as the other 2 sections first you would have to create a default hasPermission function and define it in the template’s function map. testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"hasPermission\": func(feature string) bool { return false }, }).ParseFiles(\"hello.gohtml\") This function could be placed in main() or somewhere that ensures the default hasPermission is created in the hello.gohtml function map. The default function just returns false but it defines the function and implementation that doesn’t require User . Next a closure could be used to redefine the hasPermission function. It would use the User data available when it is created in a handler rather than having User data passed to it. Within the handler for the template you can redefine any functions to use the information available. func handler(w http.ResponseWriter, r *http.Request) { w.Header().Set(\"Content-Type\", \"text/html\") user := User{ ID: 1, Email: \"Curtis.vermeeren@gmail.com\", } vd := ViewData{} err := testTemplate.Funcs(template.FuncMap{ \"hasPermission\": func(feature string) bool { if user.ID == 1 && feature == \"feature-a\" { return true } return false }, }).Execute(w, vd) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) } } In this handler a User is created with ID and Email, Then a ViewData is created without passing the user to it. The hasPermission function is redefined using user.ID which is available when the function is created. {{if hasPermission \"feature-a\"}} can be used in a template without having to pass a User to the template as the User object in the handler is used instead.","s":"Templates Calling Functions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#templates-calling-functions","p":3895},{"i":3918,"t":"Jet is a template engine create by cloudykit, to see the original syntax documentation please click here","s":"Jet","u":"/template/next/jet/","h":"","p":3917},{"i":3920,"t":"./views/index.jet {{include \"partials/header\"}}

{{ Title }}

{{include \"partials/footer\"}} ./views/partials/header.jet

Header

./views/partials/footer.jet

Footer

./views/layouts/main.jet Title {{ embed() }} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/jet/v2\" ) func main() { // Create a new engine engine := jet.New(\"./views\", \".jet\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := jet.NewFileSystem(http.Dir(\"./views\", \".jet\")) // Pass the engine to the views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/jet/","h":"#basic-example","p":3917},{"i":3922,"t":"Mustache is a template engine created by hoisie/cbroglie, to see the original syntax documentation please click here","s":"Mustache","u":"/template/next/mustache/","h":"","p":3921},{"i":3924,"t":"./views/index.mustache {{> views/partials/header }}

{{Title}}

{{> views/partials/footer }} ./views/partials/header.mustache

Header

./views/partials/footer.mustache

Footer

./views/layouts/main.mustache Main {{{embed}}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/mustache/v2\" ) func main() { // Create a new engine engine := mustache.New(\"./views\", \".mustache\") // Or from an embedded system // Note that with an embedded system the partials included from template files must be // specified relative to the filesystem's root, not the current working directory // engine := mustache.NewFileSystem(http.Dir(\"./views\", \".mustache\"), \".mustache\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/mustache/","h":"#basic-example","p":3921},{"i":3926,"t":"Pug is a template engine create by joker, to see the original syntax documentation please click here","s":"Pug","u":"/template/next/pug/","h":"","p":3925},{"i":3928,"t":"./views/index.pug include partials/header.pug h1 #{.Title} include partials/footer.pug ./views/partials/header.pug h2 Header ./views/partials/footer.pug h2 Footer ./views/layouts/main.pug doctype html html head title Main include ../partials/meta.pug body | {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/pug/v2\" // \"net/http\" // embedded system ) func main() { // Create a new engine engine := pug.New(\"./views\", \".pug\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := pug.NewFileSystem(http.Dir(\"./views\", \".pug\")) // Pass the engine to the views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/pug/","h":"#basic-example","p":3925},{"i":3930,"t":"Slim is a template engine created by mattn, to see the original syntax documentation please click here","s":"Slim","u":"/template/next/slim/","h":"","p":3929},{"i":3932,"t":"./views/index.slim == render(\"partials/header.slim\") h1 = Title == render(\"partials/footer.slim\") ./views/partials/header.slim h2 = Header ./views/partials/footer.slim h2 = Footer ./views/layouts/main.slim doctype html html head title Main include ../partials/meta.slim body | {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/slim/v2\" // \"net/http\" // embedded system ) func main() { // Create a new engine engine := slim.New(\"./views\", \".slim\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := slim.NewFileSystem(http.Dir(\"./views\", \".slim\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/slim/","h":"#basic-example","p":3929}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/3856",[0,0.821,1,2.404,2,4.343,3,3.222,4,1.566,5,3.222,6,0.619,7,0.619,8,3.668,9,4.343,10,4.343,11,1.437,12,1.02,13,2.214,14,3.668,15,0.81,16,4.343,17,3.668,18,4.343,19,4.343,20,4.343,21,4.343,22,4.343,23,2.625,24,2.89,25,2.89,26,2.404,27,3.222,28,0.761,29,2.89,30,2.625,31,2.89,32,2.89]],["t/3858",[33,2.59,34,5.13,35,5.13,36,5.13,37,4.332,38,5.066,39,1.481,40,5.13]],["t/3860",[0,0.42,4,1.334,6,0.659,7,0.659,11,0.735,12,0.798,13,1.732,15,1.025,23,1.342,28,0.723,39,0.641,41,0.855,42,0.916,43,0.686,44,1.647,45,2.22,46,2.868,47,2.22,48,2.22,49,2.22,50,1.039,51,1.875,52,0.521,53,0.388,54,0.743,55,1.875,56,1.875,57,2.22,58,2.22,59,2.139,60,1.875,61,1.875,62,0.521,63,1.875,64,0.843,65,1.229,66,1.229,67,2.22,68,1.88,69,1.191,70,2.868,71,1.875,72,2.22,73,3.428,74,3.075,75,2.26,76,3.397,77,1.875,78,1.342,79,2.22,80,3.428,81,1.342,82,1.132,83,1.29,84,2.22,85,0.599,86,2.22,87,0.641,88,2.22,89,1.477,90,1.647,91,3.397,92,1.477,93,2.22,94,2.22,95,1.342,96,1.68,97,2.22,98,1.477,99,1.342,100,2.22,101,2.22,102,0.969,103,1.275,104,2.22,105,0.641,106,0.735,107,1.342,108,2.22,109,2.22,110,1.132,111,0.735,112,1.124,113,1.124,114,0.981,115,1.29,116,1.05,117,1.203,118,1.203,119,0.904,120,0.904,121,0.735]],["t/3862",[7,0.555,12,1.141,24,3.233,25,3.233,26,2.689,27,3.605,28,0.852,29,3.233,30,2.937,31,3.233,32,3.233,44,3.605,50,1.223,55,4.103,68,2.689,122,4.311,123,4.859,124,4.859]],["t/3864",[0,1.013,4,1.114,6,0.301,7,0.677,12,1.258,13,1.343,15,1.029,23,1.591,28,0.882,33,2.05,39,1.453,41,1.493,42,1.357,43,1.555,52,1.182,61,2.224,63,2.224,64,1,87,0.76,105,1.453,106,1.664,125,1.954,126,2.224,127,2.634,128,3.86,129,4.523,130,2.182,131,2.634,132,3.733,133,2.634,134,2.634,135,4.569,136,4.569,137,3.86,138,2.634,139,2.634,140,2.634,141,2.634,142,2.634,143,2.634,144,2.634,145,2.634,146,3.86,147,2.634,148,2.224,149,2.634,150,2.634]],["t/3866",[7,0.547,30,2.898,65,2.654,68,2.654,151,4.05,152,4.868,153,6.181,154,4.796,155,4.796,156,4.796,157,4.796,158,4.796,159,3.558,160,2.898,161,4.796,162,3.558,163,4.796,164,4.796]],["t/3868",[6,0.581,7,0.581,24,3.39,53,0.581,62,1.197,130,2.075,165,5.095,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805]],["t/3870",[0,0.586,7,0.651,11,1.025,12,1.019,15,1.026,24,2.886,28,0.76,39,0.895,41,1.26,42,0.836,43,0.958,50,0.78,52,0.728,53,0.354,54,0.678,62,0.728,64,1.177,66,1.715,69,1.252,85,0.836,87,0.895,102,1.019,103,1.341,105,0.895,106,1.025,111,1.025,112,1.435,113,1.435,114,1.252,115,1.647,116,1.341,117,1.92,118,1.537,119,1.263,120,1.767,121,1.025,171,3.099,172,2.046,173,2.062,174,2.36,175,2.062,176,3.099,177,1.873,178,3.099,179,1.873,180,3.099,181,1.177,182,1.263,183,1.098,184,3.099,185,3.099,186,1.357,187,1.462,188,1.537]],["t/3872",[6,0.581,7,0.581,25,3.39,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,189,5.095]],["t/3874",[0,0.599,7,0.656,11,1.047,12,1.034,15,1.016,25,2.929,28,0.771,39,0.914,41,1.274,42,1.365,43,0.978,50,0.797,52,0.744,53,0.361,54,0.693,62,0.744,64,1.202,66,1.752,69,1.271,85,0.854,87,0.914,102,1.034,103,1.361,105,0.914,106,1.047,111,1.047,112,1.456,113,1.456,114,1.271,115,1.671,116,1.361,117,1.938,118,1.56,119,1.29,120,1.793,121,1.047,173,2.107,174,2.387,175,2.107,177,1.913,179,1.913,181,1.202,182,1.29,183,1.122,186,1.386,187,1.493,188,1.56,190,3.166,191,3.166,192,3.166,193,3.166,194,3.166,195,3.166]],["t/3876",[6,0.581,7,0.581,26,2.82,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,196,5.095]],["t/3878",[0,0.586,7,0.651,11,1.025,12,1.019,15,1.024,26,2.4,28,0.877,39,0.895,41,1.092,42,0.836,43,0.958,50,0.78,52,0.728,53,0.354,54,0.678,62,0.728,64,1.177,66,1.715,69,1.252,85,0.836,87,0.895,102,1.019,103,1.341,105,0.895,106,1.025,111,1.025,112,1.435,113,1.435,114,1.252,115,1.647,116,1.341,117,1.773,118,1.537,119,1.263,120,1.767,121,1.025,172,2.046,174,2.046,181,1.177,182,1.767,183,1.537,186,1.357,187,1.462,188,1.537,197,2.617,198,3.099,199,3.099,200,3.099,201,1.873,202,3.099,203,1.873,204,3.099,205,2.062,206,2.617,207,2.617]],["t/3880",[0,0.62,1,1.815,4,1.489,6,0.634,7,0.687,11,1.085,12,1.304,15,1.007,26,1.815,39,0.947,41,1.136,42,0.884,43,1.013,52,0.77,53,0.374,54,0.717,65,1.815,69,0.947,87,0.947,96,1.837,102,0.77,105,0.947,106,1.085,111,1.085,112,1.085,113,1.085,114,0.947,116,1.013,118,1.162,121,1.085,152,2.769,206,2.769,208,3.347,209,2.769,210,3.279,211,4.51,212,3.279,213,2.182,214,3.279,215,4.51,216,3.279,217,2.433,218,3.279,219,3.279,220,3.279,221,3.279,222,3.279,223,1.672,224,3.279,225,3.279,226,1.981,227,1.815,228,3.279,229,2.433,230,3.279,231,3.279,232,3.279,233,2.769]],["t/3882",[7,0.642,8,4.426,11,1.12,12,0.795,13,1.725,15,1.007,26,1.873,28,1.065,52,0.795,53,0.386,54,0.741,59,1.379,96,1.878,102,1.082,103,1.424,105,0.977,115,1.285,116,1.046,181,1.75,183,1.994,197,2.858,207,2.858,233,2.858,234,2.511,235,3.384,236,3.384,237,4.609,238,3.384,239,3.384,240,3.384,241,4.609,242,2.858,243,3.384,244,3.384,245,3.384,246,2.858,247,2.511,248,3.384,249,4.609,250,3.892,251,4.609,252,4.609,253,4.609,254,3.384,255,2.511,256,3.384]],["t/3884",[6,0.581,7,0.581,27,3.78,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,257,5.095]],["t/3886",[0,0.596,7,0.655,11,1.043,12,1.031,15,1.025,28,0.885,39,0.91,41,1.105,42,0.85,43,0.974,50,0.794,52,0.74,53,0.36,54,0.69,62,0.74,64,1.197,66,1.745,69,1.267,85,0.85,87,0.91,102,1.031,103,1.357,105,0.91,106,1.043,111,1.043,112,1.452,113,1.452,114,1.267,115,1.666,116,1.357,117,1.555,118,1.555,119,1.284,120,1.788,121,1.043,181,1.197,182,1.788,183,1.555,186,1.38,187,1.487,188,1.555,201,1.905,203,1.905,205,2.098,258,3.153,259,2.339,260,2.662,261,2.339,262,3.153,263,3.153,264,3.153,265,3.153,266,3.153,267,4.389]],["t/3888",[4,1.561,6,0.673,7,0.493,12,1.014,28,0.757,33,1.759,62,1.014,68,2.389,83,1.639,85,1.164,87,1.247,92,2.873,130,1.759,166,1.89,167,1.639,168,1.759,169,1.89,170,1.53,268,4.318,269,2.389,270,4.318,271,2.873,272,4.318,273,4.318,274,4.318,275,4.318,276,4.318,277,4.318,278,2.873,279,4.318,280,2.609,281,3.646,282,3.646,283,4.318,284,4.318]],["t/3890",[0,0.596,6,0.501,7,0.655,11,1.043,12,1.031,15,1.021,28,1.006,39,0.91,41,1.105,42,0.85,43,0.974,50,0.794,51,2.662,52,0.74,53,0.36,54,0.69,60,2.662,62,0.74,64,1.197,66,1.745,69,1.267,85,0.85,87,0.91,102,1.031,103,1.357,105,0.91,106,1.043,111,1.043,112,1.452,113,1.452,114,1.267,115,1.666,116,1.357,117,1.555,118,1.555,119,1.284,120,1.788,121,1.043,181,1.197,182,1.788,183,1.555,186,1.38,187,1.487,188,1.555,201,1.905,203,1.905,205,2.098,259,2.339,261,2.339,285,2.339,286,2.662,287,3.153,288,3.153,289,3.153]],["t/3892",[0,0.701,6,0.559,7,0.626,12,1.426,15,1.01,28,0.65,39,1.071,41,1.234,42,1,43,1.146,52,0.871,54,0.811,69,1.071,87,1.071,102,0.871,103,1.146,105,1.071,106,1.227,111,1.227,112,1.227,113,1.227,114,1.071,116,1.146,117,1.314,118,1.314,121,1.227,132,2.752,173,2.468,175,2.468,188,1.314,208,2.752,226,2.241,227,2.052,229,2.752,271,3.261,285,2.752,286,3.132,290,3.132,291,3.132,292,4.138,293,3.132,294,2.468,295,2.752]],["t/3894",[0,0.668,7,0.611,12,1.258,15,1.008,28,0.831,39,1.019,41,1.194,42,0.952,43,1.091,52,0.829,54,0.773,59,1.438,69,1.019,87,1.019,95,2.134,96,1.438,102,1.114,103,1.091,105,1.019,111,1.168,112,1.168,113,1.168,114,1.019,116,1.091,117,1.251,121,1.168,132,2.62,188,1.251,208,2.62,226,2.134,227,1.954,229,2.62,246,2.981,255,2.62,269,1.954,271,2.349,285,2.62,290,2.981,291,2.981,292,2.981,293,2.981,294,2.349,295,2.62,296,3.531,297,5.356,298,3.531,299,2.981,300,3.531,301,3.531,302,3.531,303,3.531,304,3.531,305,3.531]],["t/3896",[0,1.167,1,2.376,4,1.239,6,0.615,13,2.188,28,0.944,33,1.749,50,1.081,89,2.856,126,3.625,148,4.969,209,3.625,223,2.188,255,4.366,269,2.376,280,2.594,306,4.293,307,3.625,308,4.547,309,4.293,310,3.625,311,4.293,312,4.293,313,4.293,314,3.185,315,4.293,316,3.625,317,4.293,318,3.185]],["t/3898",[6,0.779,28,0.83,53,0.54,78,2.861,80,3.513,82,2.414,90,3.513,96,2.504,107,2.861,319,2.861,320,3.998,321,3.998,322,3.998]],["t/3900",[4,1.039,5,2.671,6,0.741,15,0.537,23,2.904,33,2.203,42,0.971,53,0.411,56,4.567,65,1.992,70,3.04,71,3.04,78,2.175,81,2.175,83,1.367,85,0.971,167,1.367,307,3.04,314,2.671,319,2.175,323,3.6,324,3.6,325,3.6,326,3.6,327,3.6,328,3.6,329,3.04,330,3.6,331,3.6,332,3.6,333,3.6,334,3.04,335,3.6,336,3.04,337,3.6,338,4.805,339,3.84,340,3.6,341,3.6,342,3.6,343,3.6,344,2.175,345,3.6,346,4.057,347,4.013,348,3.6,349,3.6,350,2.671,351,2.671,352,3.04,353,3.04,354,3.04]],["t/3902",[4,1.225,6,0.749,13,2.163,54,0.928,59,1.728,73,3.148,78,2.564,83,2.222,162,3.966,280,2.564,319,3.908,339,3.557,355,4.243,356,3.148,357,4.243,358,3.537,359,3.148,360,4.243,361,3.583,362,4.243,363,4.243,364,3.148,365,3.148,366,2.823]],["t/3904",[0,0.776,3,1.633,4,1.511,6,0.597,15,0.988,28,0.719,33,1.873,50,0.554,53,0.251,59,2.132,69,0.635,74,1.464,81,1.33,82,1.122,83,0.835,85,0.593,96,2.132,98,1.464,99,1.33,102,0.792,110,1.72,125,1.633,160,1.33,170,0.78,227,1.867,234,1.633,269,2.545,299,2.849,310,3.883,318,1.633,320,4.6,344,1.33,350,1.633,359,1.633,366,2.245,367,2.2,368,2.2,369,2.849,370,2.2,371,2.503,372,1.633,373,1.858,374,2.2,375,3.373,376,2.2,377,2.2,378,2.2,379,2.345,380,2.2,381,1.633,382,2.2,383,2.849,384,2.2,385,2.2,386,2.2,387,2.2,388,2.2,389,2.849,390,3.373,391,2.245,392,2.2,393,2.2,394,1.33,395,2.2,396,1.633,397,1.858,398,4.102,399,3.373,400,1.464,401,3.373,402,2.2,403,3.373,404,2.849,405,2.2,406,4.959,407,1.858,408,2.2,409,2.2,410,2.2,411,1.633,412,2.2,413,3.373,414,3.373,415,4.102,416,1.858,417,2.2,418,4.102,419,3.373,420,4.599,421,1.858,422,1.858,423,1.858,424,2.2,425,2.2,426,1.858,427,2.2,428,2.2,429,3.373,430,2.2,431,2.2,432,2.2,433,2.2,434,2.2]],["t/3906",[4,1.707,5,2.3,6,0.718,15,0.985,33,1.263,50,0.78,53,0.354,54,1.186,59,1.263,82,3.014,83,1.177,107,1.873,110,1.58,167,1.177,174,2.046,227,1.715,295,2.3,339,2.886,344,1.873,347,2.3,358,3.275,372,3.218,379,1.58,435,5.42,436,2.617,437,2.617,438,3.099,439,3.099,440,5.004,441,3.099,442,3.663,443,3.099,444,4.338,445,3.099,446,3.099,447,3.099,448,2.617,449,2.3,450,3.099,451,3.099,452,2.617,453,5.125,454,3.099,455,3.099,456,3.099,457,2.617,458,3.099,459,3.099,460,2.617,461,4.338,462,3.099]],["t/3908",[1,1.271,4,1.358,6,0.679,13,1.171,15,0.85,23,1.388,28,0.402,33,1.716,50,0.578,53,0.262,59,1.716,68,2.331,73,1.704,75,1.528,77,2.943,82,1.171,83,2.354,85,1.136,95,1.388,99,1.388,103,1.077,110,2.713,125,1.704,129,1.939,170,0.814,213,2.319,223,1.171,280,1.388,281,2.943,282,1.939,294,1.528,365,1.704,379,1.777,381,1.704,391,2.319,394,1.388,396,1.704,400,1.528,407,3.556,448,1.939,449,3.488,463,3.485,464,4.212,465,1.939,466,2.297,467,2.297,468,1.939,469,1.939,470,1.939,471,2.297,472,1.704,473,2.297,474,1.939,475,1.939,476,2.297,477,2.297,478,3.485,479,4.212,480,3.485,481,2.297,482,2.297,483,2.297,484,1.939,485,4.212,486,2.297,487,2.297,488,2.297,489,2.297,490,2.297,491,2.297,492,2.297,493,2.297,494,2.297,495,2.297,496,2.297,497,1.704,498,2.297,499,2.297,500,2.297,501,2.319,502,2.297,503,2.297,504,4.268,505,2.297,506,2.297,507,2.297,508,2.297,509,5.104,510,4.702,511,3.125,512,2.297,513,1.704,514,2.586,515,1.939,516,2.297,517,2.297,518,1.939,519,1.939,520,2.297,521,2.943,522,2.297,523,2.297]],["t/3910",[0,0.44,1,1.287,4,1.016,6,0.58,15,0.928,33,0.947,41,0.586,46,1.964,50,0.586,52,0.546,54,0.929,59,0.947,75,1.547,83,1.611,89,2.341,95,1.405,96,2.329,98,1.547,99,1.405,102,0.997,110,1.186,122,1.725,160,2.126,172,1.097,174,1.097,183,1.246,188,2.026,213,1.547,223,1.794,339,1.547,351,1.725,358,2.565,366,3.695,371,2.611,379,2.164,391,2.824,394,1.405,400,1.547,436,2.971,437,2.971,442,3.584,449,2.611,453,3.584,470,2.971,474,1.964,475,2.971,484,1.964,501,2.341,511,3.149,513,1.725,524,2.326,525,5.854,526,3.584,527,4.244,528,2.326,529,2.326,530,2.326,531,2.326,532,2.326,533,2.326,534,4.244,535,3.518,536,2.326,537,2.326,538,2.326,539,2.326,540,2.326,541,2.326,542,2.326,543,2.326,544,2.326,545,3.149,546,2.611,547,2.326,548,5.083,549,2.326,550,1.964,551,5.083,552,1.964,553,2.971,554,2.326,555,4.244,556,1.964,557,2.326,558,2.326,559,2.326,560,2.326,561,2.326]],["t/3912",[0,0.626,1,1.831,4,0.955,6,0.378,15,0.974,17,2.794,83,1.256,96,2.11,102,1.417,122,2.455,160,3.734,223,1.687,269,1.831,278,2.201,321,3.832,350,2.455,356,2.455,379,2.641,411,2.455,497,2.455,545,3.02,546,2.455,550,2.794,556,3.832,562,3.308,563,4.538,564,3.308,565,3.308,566,3.308,567,3.308,568,6.293,569,6.293,570,5.18,571,3.308,572,3.308,573,3.308,574,3.308,575,3.308,576,3.308,577,3.308,578,3.308,579,3.308,580,3.308,581,3.308,582,3.308]],["t/3914",[0,0.342,4,1.604,6,0.745,15,0.938,28,0.633,41,0.728,42,0.487,44,1.34,50,1.039,52,0.679,53,0.206,54,0.988,59,1.471,65,2.499,68,1.599,74,1.202,78,1.746,80,1.34,81,3.175,82,0.921,83,2.11,85,0.487,89,1.202,90,1.34,92,1.202,95,1.091,96,1.177,107,1.746,110,0.921,114,0.522,151,1.525,159,1.34,172,0.852,177,2.728,179,3.056,181,0.686,182,1.177,183,1.024,217,1.34,223,0.921,227,1.999,247,2.144,250,1.525,280,1.091,319,2.183,322,4.067,329,2.44,334,1.525,344,2.183,346,1.525,351,1.34,352,1.525,353,1.525,354,2.44,358,1.746,359,1.34,361,1.525,365,1.34,369,2.44,371,1.34,372,1.34,379,1.473,383,1.525,394,1.091,397,2.44,404,3.486,411,1.34,457,1.525,460,2.44,472,3.35,497,1.34,501,2.747,504,2.44,509,2.44,514,3.063,515,1.525,518,1.525,519,1.525,545,1.202,583,1.806,584,1.806,585,1.806,586,1.806,587,1.806,588,1.806,589,1.525,590,1.806,591,1.806,592,1.806,593,1.525,594,1.806,595,1.806,596,1.806,597,1.806,598,1.806,599,1.525,600,1.806,601,1.806,602,1.806,603,1.806,604,2.44,605,1.806,606,1.806,607,1.806,608,1.806,609,4.816,610,1.806,611,1.806,612,1.806,613,1.806,614,1.525,615,1.525,616,1.525,617,1.806,618,1.806,619,1.806,620,1.806,621,1.806,622,1.806,623,1.806,624,1.806,625,1.806,626,1.806,627,1.806,628,1.806,629,1.806,630,1.806,631,1.806,632,1.806,633,1.806,634,1.806]],["t/3916",[0,0.213,3,3.475,4,1.397,6,0.625,14,2.172,15,0.986,33,0.793,37,0.95,38,0.95,41,0.283,50,0.49,52,0.457,53,0.568,54,0.942,59,1.908,69,0.325,74,1.712,75,2.525,81,1.176,82,1.563,83,0.427,85,0.303,96,2.492,98,1.295,99,2.094,102,1.197,107,2.83,110,0.992,114,0.325,159,0.834,160,1.176,162,0.834,168,0.793,170,0.398,213,0.748,217,0.834,223,0.992,234,2.815,242,2.589,247,2.275,269,0.622,278,0.748,294,2.04,308,2.589,314,0.834,316,4.745,318,1.444,319,1.176,336,0.95,344,2.094,347,0.834,356,1.444,358,1.555,364,1.444,366,3.977,373,0.95,379,2.195,381,0.834,389,0.95,391,2.525,394,1.555,396,0.834,400,1.295,416,0.95,421,1.643,422,1.643,423,1.643,426,1.643,452,0.95,465,2.172,468,1.643,469,0.95,472,0.834,501,1.295,511,2.815,513,0.834,514,3.194,521,0.95,526,0.95,545,0.748,546,0.834,552,3.437,553,2.589,589,0.95,593,0.95,599,0.95,604,0.95,614,0.95,615,0.95,616,0.95,635,3.465,636,3.465,637,1.125,638,1.946,639,3.066,640,3.066,641,1.946,642,1.946,643,1.946,644,1.946,645,1.946,646,1.946,647,1.946,648,1.946,649,1.946,650,5.551,651,1.125,652,1.125,653,1.125,654,1.946,655,1.946,656,1.125,657,1.125,658,3.066,659,1.946,660,2.573,661,2.573,662,1.125,663,1.125,664,1.125,665,1.946,666,1.946,667,1.125,668,1.125,669,1.125,670,1.125,671,1.125,672,1.125,673,2.573,674,1.125,675,1.125,676,1.125,677,1.946,678,1.125,679,1.125,680,2.573,681,1.125,682,1.125,683,1.125,684,1.125,685,1.125,686,1.125,687,1.125,688,2.573,689,1.946,690,1.125,691,1.125,692,1.125,693,1.125,694,1.125,695,1.125,696,1.125,697,1.125]],["t/3918",[6,0.581,7,0.581,29,3.39,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,698,5.095]],["t/3920",[0,0.591,7,0.653,11,1.034,12,1.025,15,1.02,28,0.881,29,2.903,39,0.903,41,1.099,42,0.843,43,0.966,50,0.787,52,0.734,53,0.357,54,0.684,62,0.734,64,1.187,69,1.26,85,0.843,87,0.903,102,1.025,103,1.348,105,0.903,106,1.034,111,1.034,112,1.443,113,1.443,114,1.26,115,1.657,116,1.348,117,1.781,118,1.546,119,1.273,120,1.777,121,1.034,172,2.058,174,2.058,181,1.187,182,1.777,183,1.546,186,1.369,187,1.474,188,1.546,201,1.889,203,1.889,259,2.319,261,2.319,699,3.126,700,3.126,701,3.126,702,3.126,703,3.126,704,3.126,705,3.126,706,3.126]],["t/3922",[6,0.581,7,0.581,30,3.079,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,707,5.095]],["t/3924",[0,0.565,6,0.341,7,0.642,11,0.988,12,0.992,15,1.023,28,0.859,30,2.963,39,0.862,41,1.064,42,0.805,43,0.923,52,0.701,53,0.341,54,0.653,64,1.604,65,1.653,69,1.22,85,0.805,87,0.862,92,1.987,102,0.992,103,1.306,105,0.862,106,0.988,111,0.988,112,1.398,113,1.398,114,1.22,115,1.604,116,1.306,117,1.497,118,1.497,119,1.216,120,1.721,121,0.988,172,1.409,173,1.987,175,1.987,181,1.134,182,1.721,183,1.497,186,1.85,188,1.497,201,1.805,203,1.805,205,1.987,260,2.522,271,1.987,278,1.987,364,2.216,708,2.986,709,2.986,710,2.986,711,2.986,712,2.986,713,2.986,714,2.986,715,2.986,716,2.986,717,2.986,718,2.986,719,2.986]],["t/3926",[6,0.581,7,0.581,31,3.39,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,720,5.095]],["t/3928",[0,0.579,7,0.648,11,1.013,12,1.01,15,1.021,28,0.753,31,2.861,39,0.884,41,1.251,42,0.825,43,0.946,50,0.771,52,0.719,53,0.349,54,0.67,62,0.719,64,1.632,69,1.241,85,0.825,87,0.884,102,1.01,103,1.329,105,0.884,106,1.013,111,1.013,112,1.422,113,1.422,114,1.241,115,1.632,116,1.329,117,1.91,118,1.523,119,1.247,120,1.751,121,1.013,172,2.344,174,1.444,177,1.85,179,1.85,181,1.162,182,1.247,183,1.084,186,1.883,187,1.444,188,1.523,226,1.85,721,3.061,722,3.061,723,3.061,724,3.061,725,3.631,726,3.061,727,3.061,728,3.061,729,3.061,730,3.061,731,3.061]],["t/3930",[6,0.581,7,0.581,32,3.39,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,732,5.095]],["t/3932",[0,0.572,7,0.645,11,1,12,1.001,15,1.029,28,0.747,32,2.836,39,0.873,41,1.243,42,0.815,43,0.934,50,0.761,52,0.71,53,0.345,54,0.661,62,0.71,64,1.618,69,1.231,85,0.815,87,0.873,102,1.001,103,1.317,105,0.873,106,1,111,1,112,1.41,113,1.41,114,1.231,115,1.618,116,1.317,117,1.899,118,1.51,119,1.231,120,1.736,121,1,172,1.426,174,1.426,177,1.827,179,1.827,181,1.148,182,1.231,183,1.071,186,1.866,187,1.426,188,1.51,226,1.827,725,3.599,733,3.023,734,3.023,735,3.023,736,3.023,737,3.023,738,3.023,739,3.023,740,3.023,741,3.023,742,3.023]]],"invertedIndex":[["",{"_index":15,"t":{"3856":{"position":[[155,1],[194,1]]},"3860":{"position":[[20,1],[58,2],[119,2],[156,2],[198,2],[207,2],[296,1],[310,1],[312,2],[366,2],[435,2],[467,2],[516,2],[583,2],[635,2],[716,2],[744,2],[832,2],[860,2],[966,2],[996,2],[1078,5],[1084,2],[1124,2],[1239,1],[1256,1],[1258,1],[1265,1],[1267,3],[1271,2],[1274,2],[1352,2],[1394,2],[1397,2],[1459,2],[1558,1],[1622,2],[1625,2],[1628,2],[1702,1],[1766,2],[1785,2],[1819,1]]},"3864":{"position":[[205,1],[307,1],[321,1],[330,2],[386,2],[428,2],[431,2],[444,2],[456,1],[540,1],[645,1],[659,1],[668,2],[737,2],[779,2],[782,2],[795,2],[807,1],[896,1],[1001,1],[1015,1],[1024,2],[1096,2],[1138,2],[1141,2],[1162,2],[1174,1],[1260,1],[1333,2],[1393,1],[1407,1],[1416,2],[1464,2],[1506,2],[1509,2],[1557,1]]},"3870":{"position":[[18,1],[52,1],[68,1],[102,1],[205,1],[276,1],[351,1],[365,1],[367,2],[397,2],[427,2],[457,2],[502,2],[512,2],[563,2],[599,2],[641,2],[682,1],[684,2],[762,2],[765,2],[812,1],[814,2],[912,2],[931,2],[965,1]]},"3874":{"position":[[271,1],[348,1],[362,1],[364,2],[394,2],[428,2],[458,2],[503,2],[513,2],[566,2],[602,2],[644,2],[685,1],[687,2],[765,2],[768,2],[815,1],[817,2],[915,2],[934,2],[968,1]]},"3878":{"position":[[21,2],[57,2],[81,2],[117,2],[353,1],[431,1],[445,1],[447,2],[477,2],[513,2],[543,2],[588,2],[598,2],[652,2],[688,2],[730,2],[771,1],[773,2],[851,2],[854,2],[901,1],[903,2],[1001,2],[1020,2],[1054,1]]},"3880":{"position":[[15,2],[87,2],[97,2],[100,2],[481,1],[578,1],[635,1],[637,2],[667,2],[742,2],[778,2],[820,2],[861,1],[863,2],[946,2],[949,2],[983,1]]},"3882":{"position":[[0,2],[63,1],[76,2],[98,1],[139,4],[148,1],[157,2],[160,1],[162,2],[192,2],[228,2],[285,2],[321,2],[462,2],[562,2],[578,2]]},"3886":{"position":[[18,3],[40,2],[62,3],[84,2],[311,1],[393,1],[407,1],[409,2],[439,2],[476,2],[506,2],[551,2],[561,2],[612,2],[648,2],[690,2],[731,1],[733,2],[811,2],[814,2],[861,1],[863,2],[961,2],[980,2],[1014,1]]},"3890":{"position":[[48,3],[101,3],[332,1],[408,1],[422,1],[424,2],[454,2],[486,2],[516,2],[561,2],[571,2],[623,2],[659,2],[701,2],[742,1],[744,2],[822,2],[825,2],[872,1],[874,2],[972,2],[991,2],[1025,1]]},"3892":{"position":[[20,1],[112,1],[166,1],[175,2],[224,2],[260,2],[302,2],[343,1],[345,2],[458,2],[461,2],[495,1],[604,3],[663,3]]},"3894":{"position":[[20,1],[128,1],[182,1],[191,2],[256,2],[322,1],[348,2],[351,1],[353,2],[389,2],[469,1],[471,2],[562,2],[565,2],[599,1]]},"3900":{"position":[[470,2]]},"3904":{"position":[[207,1],[213,1],[289,1],[449,1],[856,2],[878,1],[900,1],[909,2],[927,2],[956,1],[980,2],[1002,1],[1227,2],[1309,1],[1498,1],[1597,1],[1626,2],[1799,2],[1829,1],[1831,1],[1844,3],[1861,2],[1934,2],[1958,2],[1961,2]]},"3906":{"position":[[18,4],[204,2],[207,1],[209,3],[310,2],[324,3],[407,2],[434,2],[560,2],[563,3],[740,2],[743,3],[831,1],[888,2]]},"3908":{"position":[[558,2],[892,2],[913,2],[1327,1],[1351,1],[1374,1],[1401,1],[1856,5]]},"3910":{"position":[[577,1],[605,1],[619,1],[625,2],[734,1],[1022,1],[1072,1],[1085,1],[1108,1],[1116,1],[1725,2],[1767,2],[1774,2]]},"3912":{"position":[[240,2],[262,3],[296,2],[334,2],[372,1],[409,2],[447,1],[484,2],[591,2],[679,2],[693,2]]},"3914":{"position":[[674,2],[759,2],[1465,1],[1641,1],[1872,2],[1891,1],[1922,1],[1985,1],[2016,1],[2047,1],[2069,2],[2076,1],[2089,1],[2155,1],[2210,1],[2259,1],[2310,1],[2726,2],[2738,1],[2755,1]]},"3916":{"position":[[198,1],[220,1],[271,1],[284,2],[299,1],[313,1],[320,1],[335,1],[337,1],[1076,2],[1108,1],[1120,1],[1139,1],[1193,1],[1195,2],[1232,2],[1301,2],[1379,1],[1392,2],[1407,1],[1421,1],[1436,2],[1439,2],[1442,1],[1444,2],[1492,2],[2159,1],[2455,2],[2524,1],[2633,1],[2646,2],[2651,2],[2662,2],[2677,1],[2691,1],[2706,2],[3006,2],[3044,2],[3672,1],[3770,1],[3785,2],[4068,1],[4405,1],[4456,2],[4509,1],[4514,2],[4532,2],[4615,1],[4628,2],[4633,2],[4644,2],[4659,1],[4673,1],[4688,2],[4716,2],[4723,1],[4784,1],[4786,1]]},"3920":{"position":[[278,2],[289,2],[328,1],[403,1],[417,1],[419,2],[449,2],[479,2],[509,2],[554,2],[564,2],[614,2],[650,2],[692,2],[733,1],[735,2],[813,2],[816,2],[863,1],[865,2],[963,2],[982,2],[1016,1]]},"3924":{"position":[[23,3],[49,2],[71,3],[97,2],[341,1],[421,1],[435,1],[437,2],[467,2],[507,2],[537,2],[624,2],[706,2],[716,2],[789,2],[825,2],[867,2],[908,1],[910,2],[988,2],[991,2],[1038,1],[1040,2],[1138,2],[1157,2],[1191,1]]},"3928":{"position":[[256,1],[288,1],[363,2],[377,2],[396,1],[410,1],[412,2],[442,2],[472,2],[502,2],[547,2],[557,2],[607,2],[643,2],[685,2],[726,1],[728,2],[806,2],[809,2],[856,1],[858,2],[956,2],[975,2],[1009,1]]},"3932":{"position":[[19,2],[56,1],[64,2],[130,1],[171,1],[275,1],[307,1],[383,2],[397,2],[416,1],[430,1],[432,2],[462,2],[494,2],[524,2],[569,2],[579,2],[631,2],[667,2],[709,2],[750,1],[752,2],[830,2],[833,2],[880,1],[882,2],[980,2],[999,2],[1033,1]]}}}],["0",{"_index":471,"t":{"3908":{"position":[[216,2]]}}}],["1",{"_index":242,"t":{"3882":{"position":[[145,2]]},"3916":{"position":[[1261,2],[2649,1],[4469,2],[4631,1]]}}}],["1.17",{"_index":35,"t":{"3858":{"position":[[11,4]]}}}],["11",{"_index":540,"t":{"3910":{"position":[[724,3]]}}}],["12",{"_index":403,"t":{"3904":{"position":[[923,3],[1025,3]]}}}],["2",{"_index":526,"t":{"3910":{"position":[[371,3],[471,1],[540,1]]},"3916":{"position":[[3533,1]]}}}],["20",{"_index":158,"t":{"3866":{"position":[[87,2]]}}}],["23",{"_index":461,"t":{"3906":{"position":[[938,3],[966,2]]}}}],["3",{"_index":530,"t":{"3910":{"position":[[473,1]]}}}],["3rd",{"_index":543,"t":{"3910":{"position":[[793,3]]}}}],["4",{"_index":531,"t":{"3910":{"position":[[475,3]]}}}],["6",{"_index":429,"t":{"3904":{"position":[[1810,3],[1856,4]]}}}],["8\">worldworld!{{.name}}${{.price}}.new(dir",{"_index":57,"t":{"3860":{"position":[[398,17]]}}}],["ensur",{"_index":685,"t":{"3916":{"position":[[3876,7]]}}}],["entir",{"_index":670,"t":{"3916":{"position":[[2228,6]]}}}],["eq",{"_index":570,"t":{"3912":{"position":[[266,2],[508,2],[594,2]]}}}],["equiv=\"cont",{"_index":432,"t":{"3904":{"position":[[1875,14]]}}}],["equival",{"_index":527,"t":{"3910":{"position":[[381,10],[482,10],[1563,10]]}}}],["err",{"_index":344,"t":{"3900":{"position":[[466,3]]},"3904":{"position":[[1494,3]]},"3906":{"position":[[884,3]]},"3914":{"position":[[1991,3],[2012,3],[2065,3]]},"3916":{"position":[[1488,3],[2520,3],[3668,3],[4528,3],[4712,3]]}}}],["err.error",{"_index":696,"t":{"3916":{"position":[[4739,12]]}}}],["error",{"_index":114,"t":{"3860":{"position":[[1552,5],[1696,5]]},"3870":{"position":[[676,5],[806,5]]},"3874":{"position":[[679,5],[809,5]]},"3878":{"position":[[765,5],[895,5]]},"3880":{"position":[[855,5]]},"3886":{"position":[[725,5],[855,5]]},"3890":{"position":[[736,5],[866,5]]},"3892":{"position":[[337,5]]},"3894":{"position":[[463,5]]},"3914":{"position":[[1995,5]]},"3916":{"position":[[2448,6]]},"3920":{"position":[[727,5],[857,5]]},"3924":{"position":[[902,5],[1032,5]]},"3928":{"position":[[720,5],[850,5]]},"3932":{"position":[[744,5],[874,5]]}}}],["etc",{"_index":49,"t":{"3860":{"position":[[201,5]]}}}],["evalu",{"_index":484,"t":{"3908":{"position":[[582,8]]},"3910":{"position":[[1615,9]]}}}],["exampl",{"_index":50,"t":{"3860":{"position":[[218,7],[523,8],[1650,7]]},"3862":{"position":[[22,9]]},"3870":{"position":[[493,8]]},"3874":{"position":[[494,8]]},"3878":{"position":[[579,8]]},"3886":{"position":[[542,8]]},"3890":{"position":[[552,8]]},"3896":{"position":[[319,8]]},"3904":{"position":[[195,7]]},"3906":{"position":[[950,7]]},"3908":{"position":[[1935,8]]},"3910":{"position":[[746,7]]},"3914":{"position":[[123,8],[1043,8],[1851,7],[2397,7]]},"3916":{"position":[[1198,7],[3512,7]]},"3920":{"position":[[545,8]]},"3928":{"position":[[538,8]]},"3932":{"position":[[560,8]]}}}],["exclud",{"_index":164,"t":{"3866":{"position":[[159,8]]}}}],["execut",{"_index":319,"t":{"3898":{"position":[[31,9]]},"3900":{"position":[[569,8]]},"3902":{"position":[[0,7],[84,7],[127,8],[307,9],[396,7],[467,8]]},"3914":{"position":[[1584,8],[1770,8],[2360,8]]},"3916":{"position":[[1447,9],[2969,8]]}}}],["execute(w",{"_index":694,"t":{"3916":{"position":[[4691,13]]}}}],["exist",{"_index":281,"t":{"3888":{"position":[[327,6]]},"3908":{"position":[[156,5],[384,6]]}}}],["expand",{"_index":392,"t":{"3904":{"position":[[738,8]]}}}],["explor",{"_index":414,"t":{"3904":{"position":[[1217,9],[1282,8]]}}}],["express",{"_index":579,"t":{"3912":{"position":[[656,11]]}}}],["ext",{"_index":58,"t":{"3860":{"position":[[416,3]]}}}],["extend",{"_index":152,"t":{"3866":{"position":[[8,9],[177,8]]},"3880":{"position":[[90,6]]}}}],["extens",{"_index":56,"t":{"3860":{"position":[[382,9]]},"3900":{"position":[[43,9],[172,9],[349,9]]}}}],["fail",{"_index":214,"t":{"3880":{"position":[[111,5]]}}}],["fals",{"_index":75,"t":{"3860":{"position":[[738,5],[854,5]]},"3908":{"position":[[209,6]]},"3910":{"position":[[1398,5]]},"3916":{"position":[[329,5],[1430,5],[2700,5],[3779,5],[3989,5],[4682,5]]}}}],["favnum",{"_index":534,"t":{"3910":{"position":[[531,8],[591,7],[823,7]]}}}],["favourit",{"_index":544,"t":{"3910":{"position":[[797,9]]}}}],["featur",{"_index":316,"t":{"3896":{"position":[[340,8]]},"3916":{"position":[[276,7],[287,8],[461,8],[627,7],[735,7],[1384,7],[1395,8],[1838,8],[2005,7],[2612,7],[2654,7],[2665,8],[2797,7],[3032,8],[3068,8],[3504,7],[4636,7],[4647,8],[5022,8]]}}}],["fiber",{"_index":8,"t":{"3856":{"position":[[82,5]]},"3882":{"position":[[407,8],[449,5],[721,5]]}}}],["fiber'",{"_index":104,"t":{"3860":{"position":[[1327,7]]}}}],["fiber.ctx",{"_index":113,"t":{"3860":{"position":[[1540,11],[1684,11]]},"3870":{"position":[[664,11],[794,11]]},"3874":{"position":[[667,11],[797,11]]},"3878":{"position":[[753,11],[883,11]]},"3880":{"position":[[843,11]]},"3886":{"position":[[713,11],[843,11]]},"3890":{"position":[[724,11],[854,11]]},"3892":{"position":[[325,11]]},"3894":{"position":[[451,11]]},"3920":{"position":[[715,11],[845,11]]},"3924":{"position":[[890,11],[1020,11]]},"3928":{"position":[[708,11],[838,11]]},"3932":{"position":[[732,11],[862,11]]}}}],["fiber.map",{"_index":116,"t":{"3860":{"position":[[1585,10],[1729,10]]},"3870":{"position":[[725,10],[875,10]]},"3874":{"position":[[728,10],[878,10]]},"3878":{"position":[[814,10],[964,10]]},"3880":{"position":[[914,10]]},"3882":{"position":[[396,10]]},"3886":{"position":[[774,10],[924,10]]},"3890":{"position":[[785,10],[935,10]]},"3892":{"position":[[421,10]]},"3894":{"position":[[518,10]]},"3920":{"position":[[776,10],[926,10]]},"3924":{"position":[[951,10],[1101,10]]},"3928":{"position":[[769,10],[919,10]]},"3932":{"position":[[793,10],[943,10]]}}}],["fiber.new(fiber.config",{"_index":106,"t":{"3860":{"position":[[1355,23]]},"3864":{"position":[[389,23],[740,23],[1099,23],[1467,23]]},"3870":{"position":[[602,23]]},"3874":{"position":[[605,23]]},"3878":{"position":[[691,23]]},"3880":{"position":[[781,23]]},"3886":{"position":[[651,23]]},"3890":{"position":[[662,23]]},"3892":{"position":[[263,23]]},"3920":{"position":[[653,23]]},"3924":{"position":[[828,23]]},"3928":{"position":[[646,23]]},"3932":{"position":[[670,23]]}}}],["fiber.new(fiber.config{view",{"_index":246,"t":{"3882":{"position":[[324,29]]},"3894":{"position":[[392,29]]}}}],["field",{"_index":444,"t":{"3906":{"position":[[253,6],[299,5]]}}}],["fieldnam",{"_index":445,"t":{"3906":{"position":[[313,10]]}}}],["file",{"_index":65,"t":{"3860":{"position":[[570,5]]},"3866":{"position":[[140,5]]},"3880":{"position":[[402,6]]},"3900":{"position":[[38,4]]},"3914":{"position":[[1302,4],[1389,6],[1867,4],[2273,5],[2436,4]]},"3924":{"position":[[610,5]]}}}],["fileb0x",{"_index":146,"t":{"3864":{"position":[[1176,8],[1549,7]]}}}],["filenam",{"_index":346,"t":{"3900":{"position":[[523,8],[675,9]]},"3914":{"position":[[1100,9]]}}}],["filesystem'",{"_index":716,"t":{"3924":{"position":[[653,12]]}}}],["final",{"_index":334,"t":{"3900":{"position":[[255,7]]},"3914":{"position":[[1783,7]]}}}],["find",{"_index":338,"t":{"3900":{"position":[[294,5],[744,4]]}}}],["first",{"_index":546,"t":{"3910":{"position":[[931,5],[1541,5]]},"3912":{"position":[[584,6]]},"3916":{"position":[[3544,5]]}}}],["fit",{"_index":652,"t":{"3916":{"position":[[919,3]]}}}],["float",{"_index":438,"t":{"3906":{"position":[[89,8]]}}}],["float32",{"_index":565,"t":{"3912":{"position":[[185,7]]}}}],["flosch",{"_index":196,"t":{"3876":{"position":[[38,7]]}}}],["fluid",{"_index":627,"t":{"3914":{"position":[[2664,7]]}}}],["folder",{"_index":55,"t":{"3860":{"position":[[359,6]]},"3862":{"position":[[60,6]]}}}],["follow",{"_index":223,"t":{"3880":{"position":[[392,9]]},"3896":{"position":[[309,9]]},"3908":{"position":[[1541,10]]},"3910":{"position":[[1037,9],[1177,9]]},"3912":{"position":[[638,9]]},"3914":{"position":[[270,8]]},"3916":{"position":[[163,9],[2997,8]]}}}],["footer",{"_index":179,"t":{"3870":{"position":[[173,6]]},"3874":{"position":[[167,6]]},"3914":{"position":[[102,6],[288,10],[299,8],[334,9],[369,8],[445,6],[505,10]]},"3928":{"position":[[156,6]]},"3932":{"position":[[173,6]]}}}],["footer//stat",{"_index":149,"t":{"3864":{"position":[[1359,33]]}}}],["github.com/geertjohan/go.ric",{"_index":143,"t":{"3864":{"position":[[969,31]]}}}],["github.com/gobuffalo/packr/v2",{"_index":139,"t":{"3864":{"position":[[613,31]]}}}],["github.com/gofiber/emb",{"_index":187,"t":{"3870":{"position":[[464,24]]},"3874":{"position":[[465,24]]},"3878":{"position":[[550,24]]},"3886":{"position":[[513,24]]},"3890":{"position":[[523,24]]},"3920":{"position":[[516,24]]},"3928":{"position":[[509,24]]},"3932":{"position":[[531,24]]}}}],["github.com/gofiber/fiber/v2",{"_index":39,"t":{"3858":{"position":[[49,27]]},"3860":{"position":[[28,29]]},"3864":{"position":[[213,29],[548,29],[904,29],[1268,29]]},"3870":{"position":[[284,29]]},"3874":{"position":[[279,29]]},"3878":{"position":[[361,29]]},"3880":{"position":[[508,29]]},"3886":{"position":[[319,29]]},"3890":{"position":[[340,29]]},"3892":{"position":[[47,29]]},"3894":{"position":[[63,29]]},"3920":{"position":[[336,29]]},"3924":{"position":[[349,29]]},"3928":{"position":[[296,29]]},"3932":{"position":[[315,29]]}}}],["github.com/gofiber/template/ace/v2",{"_index":184,"t":{"3870":{"position":[[314,36]]}}}],["github.com/gofiber/template/amber/v2",{"_index":194,"t":{"3874":{"position":[[309,38]]}}}],["github.com/gofiber/template/any_template_engine/vx",{"_index":40,"t":{"3858":{"position":[[87,50]]}}}],["github.com/gofiber/template/django/v3",{"_index":206,"t":{"3878":{"position":[[391,39]]},"3880":{"position":[[538,39]]}}}],["github.com/gofiber/template/handlebars/v2",{"_index":265,"t":{"3886":{"position":[[349,43]]}}}],["github.com/gofiber/template/html",{"_index":132,"t":{"3864":{"position":[[243,34],[578,34],[934,34],[1298,34]]},"3892":{"position":[[77,34]]},"3894":{"position":[[93,34]]}}}],["github.com/gofiber/template/html/v2",{"_index":51,"t":{"3860":{"position":[[258,37]]},"3890":{"position":[[370,37]]}}}],["github.com/gofiber/template/jet/v2",{"_index":704,"t":{"3920":{"position":[[366,36]]}}}],["github.com/gofiber/template/mustach",{"_index":48,"t":{"3860":{"position":[[159,38]]}}}],["github.com/gofiber/template/mustache/v2",{"_index":712,"t":{"3924":{"position":[[379,41]]}}}],["github.com/gofiber/template/pug",{"_index":47,"t":{"3860":{"position":[[122,33]]}}}],["github.com/gofiber/template/pug/v2",{"_index":729,"t":{"3928":{"position":[[326,36]]}}}],["github.com/gofiber/template/slim/v2",{"_index":740,"t":{"3932":{"position":[[345,37]]}}}],["github.com/markbates/pkg",{"_index":133,"t":{"3864":{"position":[[278,28]]}}}],["glob",{"_index":594,"t":{"3914":{"position":[[1070,4]]}}}],["global",{"_index":98,"t":{"3860":{"position":[[1169,6]]},"3904":{"position":[[1350,10]]},"3910":{"position":[[51,6]]},"3916":{"position":[[2181,6],[3144,11]]}}}],["go",{"_index":33,"t":{"3858":{"position":[[0,2],[39,2],[77,2]]},"3864":{"position":[[447,2],[798,2],[1159,2],[1165,2]]},"3888":{"position":[[21,2]]},"3896":{"position":[[4,2]]},"3900":{"position":[[57,2],[121,2],[281,2]]},"3904":{"position":[[350,2],[539,2],[666,2],[859,2]]},"3906":{"position":[[139,2]]},"3908":{"position":[[20,2],[1198,2],[1295,2]]},"3910":{"position":[[1047,2]]},"3916":{"position":[[1543,2],[1726,2]]}}}],["go.ric",{"_index":141,"t":{"3864":{"position":[[809,8]]}}}],["go:emb",{"_index":208,"t":{"3880":{"position":[[18,8],[580,10]]},"3892":{"position":[[114,10]]},"3894":{"position":[[130,10]]}}}],["godoc",{"_index":328,"t":{"3900":{"position":[[160,7]]}}}],["gohtml",{"_index":329,"t":{"3900":{"position":[[182,7]]},"3914":{"position":[[2049,12],[2265,7]]}}}],["good",{"_index":70,"t":{"3860":{"position":[[675,4],[794,4]]},"3900":{"position":[[388,4]]}}}],["gosublim",{"_index":332,"t":{"3900":{"position":[[236,9]]}}}],["go’",{"_index":368,"t":{"3904":{"position":[[21,4]]}}}],["greet",{"_index":233,"t":{"3880":{"position":[[925,11]]},"3882":{"position":[[704,11]]}}}],["gt",{"_index":574,"t":{"3912":{"position":[[417,2]]}}}],["h1",{"_index":174,"t":{"3870":{"position":[[54,2],[132,2],[170,2]]},"3874":{"position":[[51,2],[124,2],[164,2]]},"3878":{"position":[[60,6],[73,7]]},"3906":{"position":[[747,4],[794,5]]},"3910":{"position":[[542,7]]},"3920":{"position":[[48,6],[61,7]]},"3928":{"position":[[46,2]]},"3932":{"position":[[53,2]]}}}],["h1>a",{"_index":375,"t":{"3904":{"position":[[218,6],[426,5]]}}}],["h1>filler",{"_index":628,"t":{"3914":{"position":[[2672,10]]}}}],["h1>hello",{"_index":478,"t":{"3908":{"position":[[308,10],[858,10]]}}}],["h1>{{.title}}{{.}}{{index",{"_index":533,"t":{"3910":{"position":[[519,11]]}}}],["h1>{{title}}footerheaderfeatur",{"_index":640,"t":{"3916":{"position":[[497,11],[595,11],[1875,11],[1973,11]]}}}],["handl",{"_index":489,"t":{"3908":{"position":[[760,6]]}}}],["handlebar",{"_index":27,"t":{"3856":{"position":[[267,10]]},"3862":{"position":[[98,10]]},"3884":{"position":[[0,10]]}}}],["handlebars.new(\"./view",{"_index":266,"t":{"3886":{"position":[[442,25]]}}}],["handler",{"_index":247,"t":{"3882":{"position":[[370,7]]},"3914":{"position":[[2112,8],[2379,7]]},"3916":{"position":[[4200,7],[4262,7],[4796,7],[5134,7]]}}}],["handler(w",{"_index":614,"t":{"3914":{"position":[[2162,9]]},"3916":{"position":[[4357,9]]}}}],["haspermiss",{"_index":650,"t":{"3916":{"position":[[713,13],[821,13],[945,13],[1161,13],[1315,13],[1338,14],[2492,13],[2579,16],[2829,15],[3012,13],[3099,13],[3585,13],[3727,16],[3896,13],[4115,13],[4572,16],[4904,13],[5008,13]]}}}],["haspermission(featur",{"_index":637,"t":{"3916":{"position":[[236,21]]}}}],["have",{"_index":689,"t":{"3916":{"position":[[4220,6],[5070,6]]}}}],["hb",{"_index":267,"t":{"3886":{"position":[[468,7],[603,8]]}}}],["head",{"_index":182,"t":{"3870":{"position":[[225,4]]},"3874":{"position":[[219,4]]},"3878":{"position":[[265,6],[292,7]]},"3886":{"position":[[223,6],[250,7]]},"3890":{"position":[[244,6],[271,7]]},"3914":{"position":[[2497,6],[2627,7]]},"3920":{"position":[[235,6],[263,7]]},"3924":{"position":[[251,6],[278,7]]},"3928":{"position":[[206,4]]},"3932":{"position":[[224,4]]}}}],["head>filler",{"_index":629,"t":{"3914":{"position":[[2695,9]]}}}],["p>hello",{"_index":304,"t":{"3894":{"position":[[713,9]]}}}],["p>here",{"_index":587,"t":{"3914":{"position":[[308,7]]}}}],["p>some",{"_index":642,"t":{"3916":{"position":[[516,7],[1894,7]]}}}],["p>to",{"_index":646,"t":{"3916":{"position":[[614,5],[1992,5]]}}}],["packag",{"_index":0,"t":{"3856":{"position":[[5,7]]},"3860":{"position":[[0,7]]},"3864":{"position":[[185,7],[520,7],[876,7],[1240,7],[1351,7]]},"3870":{"position":[[256,7]]},"3874":{"position":[[251,7]]},"3878":{"position":[[333,7]]},"3880":{"position":[[461,7]]},"3886":{"position":[[291,7]]},"3890":{"position":[[312,7]]},"3892":{"position":[[0,7]]},"3894":{"position":[[0,7]]},"3896":{"position":[[42,8],[89,7],[170,7],[269,8]]},"3904":{"position":[[40,7],[556,7],[1079,7]]},"3910":{"position":[[13,7]]},"3912":{"position":[[31,7]]},"3914":{"position":[[1893,7]]},"3916":{"position":[[1743,8]]},"3920":{"position":[[308,7]]},"3924":{"position":[[321,7]]},"3928":{"position":[[268,7]]},"3932":{"position":[[287,7]]}}}],["packr",{"_index":137,"t":{"3864":{"position":[[458,6],[789,5]]}}}],["panic(err",{"_index":611,"t":{"3914":{"position":[[2078,10]]}}}],["paragrapha",{"_index":382,"t":{"3904":{"position":[[373,20]]}}}],["template.html(html",{"_index":425,"t":{"3904":{"position":[[1606,19]]}}}],["template.must(template.parsefiles(\"templatenam",{"_index":458,"t":{"3906":{"position":[[833,50]]}}}],["template.must(template.parseglob(\"*.gohtml",{"_index":536,"t":{"3910":{"position":[[628,45]]}}}],["template.new(\"hello.gohtml\").funcs(template.funcmap",{"_index":423,"t":{"3904":{"position":[[1500,52]]},"3916":{"position":[[2526,52],[3674,52]]}}}],["template.parse(filenam",{"_index":345,"t":{"3900":{"position":[[473,24]]}}}],["template.parsefiles(fil",{"_index":596,"t":{"3914":{"position":[[1240,29]]}}}],["template.parsefiles(filenam",{"_index":349,"t":{"3900":{"position":[[628,30]]}}}],["template.parseglob(layoutdir",{"_index":610,"t":{"3914":{"position":[[2018,28]]}}}],["template.parseglob(pattern",{"_index":352,"t":{"3900":{"position":[[711,27]]},"3914":{"position":[[1140,26]]}}}],["template.templ",{"_index":457,"t":{"3906":{"position":[[808,18]]},"3914":{"position":[[1954,18]]}}}],["templatenam",{"_index":460,"t":{"3906":{"position":[[922,15]]},"3914":{"position":[[1499,16],[1620,15]]}}}],["templatesgo",{"_index":621,"t":{"3914":{"position":[[2504,9]]}}}],["title>maintitle v1.11.1. Special thanks to @bdtomlin & @arsmn for helping! 9 template engines are supported: ace amber django handlebars html jet mustache pug slim","s":"👋 Welcome","u":"/template/next/","h":"","p":4112},{"i":4115,"t":"Go version 1.17 or higher is required. go get -u github.com/gofiber/fiber/v2 go get -u github.com/gofiber/template/any_template_engine/vX","s":"Installation","u":"/template/next/","h":"#installation","p":4112},{"i":4117,"t":"package main import ( \"log\" \"github.com/gofiber/fiber/v2\" // To use a specific template engine, import as shown below: // \"github.com/gofiber/template/pug\" // \"github.com/gofiber/template/mustache\" // etc.. // In this example we use the html template engine \"github.com/gofiber/template/html/v2\" ) func main() { // Create a new engine by passing the template folder // and template extension using .New(dir, ext string) engine := html.New(\"./views\", \".html\") // We also support the http.FileSystem interface // See examples below to load templates from embedded files engine := html.NewFileSystem(http.Dir(\"./views\"), \".html\") // Reload the templates on each render, good for development engine.Reload(true) // Optional. Default: false // Debug will print each template that is parsed, good for debugging engine.Debug(true) // Optional. Default: false // Layout defines the variable name that is used to yield templates within layouts engine.Layout(\"embed\") // Optional. Default: \"embed\" // Delims sets the action delimiters to the specified strings engine.Delims(\"{{\", \"}}\") // Optional. Default: engine delimiters // AddFunc adds a function to the template's global function map. engine.AddFunc(\"greet\", func(name string) string { return \"Hello, \" + name + \"!\" }) // After you created your engine, you can pass it to Fiber's Views Engine app := fiber.New(fiber.Config{ Views: engine, }) // To render a template, you can call the ctx.Render function // Render(tmpl string, values interface{}, layout ...string) app.Get(\"/\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) // Render with layout example app.Get(\"/layout\", func(c *fiber.Ctx) error { return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Example","u":"/template/next/","h":"#example","p":4112},{"i":4119,"t":"To view more specific examples, you could visit each engine folder to learn more ace amber django handlebars html jet mustache pug slim","s":"More Examples","u":"/template/next/","h":"#more-examples","p":4112},{"i":4121,"t":"We support the http.FileSystem interface, so you can use different libraries to load the templates from embedded binaries. pkger​ Read documentation: https://github.com/markbates/pkger package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/markbates/pkger\" ) func main() { engine := html.NewFileSystem(pkger.Dir(\"/views\"), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run pkger && go build } packr​ Read documentation: https://github.com/gobuffalo/packr package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/gobuffalo/packr/v2\" ) func main() { engine := html.NewFileSystem(packr.New(\"Templates\", \"/views\"), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run packr && go build } go.rice​ Read documentation: https://github.com/GeertJohan/go.rice package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" \"github.com/GeertJohan/go.rice\" ) func main() { engine := html.NewFileSystem(rice.MustFindBox(\"views\").HTTPBox(), \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // run rice embed-go && go build } fileb0x​ Read documentation: https://github.com/UnnoTed/fileb0x package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" // your generated package \"github.com///static\" ) func main() { engine := html.NewFileSystem(static.HTTP, \".html\") app := fiber.New(fiber.Config{ Views: engine, }) // Read the documentation on how to use fileb0x }","s":"embedded Systems","u":"/template/next/","h":"#embedded-systems","p":4112},{"i":4123,"t":"Simple​ Extended​ Benchmarks were ran on Apple Macbook M1. Each engine was benchmarked 20 times and the results averaged into a single xlsx file. Mustache was excluded from the extended benchmark","s":"Benchmarks","u":"/template/next/","h":"#benchmarks","p":4112},{"i":4125,"t":"Ace is a template engine create by yossi, to see the original syntax documentation please click here","s":"Ace","u":"/template/next/ace/","h":"","p":4124},{"i":4127,"t":"./views/index.ace = include ./views/partials/header . h1 {{.Title}} = include ./views/partials/footer . ./views/partials/header.ace h1 Header ./views/partials/footer.ace h1 Footer ./views/layouts/main.ace = doctype html html head title Main body {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/ace/v2\" ) func main() { // Create a new engine engine := ace.New(\"./views\", \".ace\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".ace\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/ace/","h":"#basic-example","p":4124},{"i":4129,"t":"Amber is a template engine create by eknkc, to see the original syntax documentation please click here","s":"Amber","u":"/template/next/amber/","h":"","p":4128},{"i":4131,"t":"./views/index.amber import ./views/partials/header h1 #{Title} import ./views/partials/footer ./views/partials/header.amber h1 Header ./views/partials/footer.amber h1 Footer ./views/layouts/main.amber doctype html html head title Main body #{embed()} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/amber/v2\" ) func main() { // Create a new engine engine := amber.New(\"./views\", \".amber\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".amber\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/amber/","h":"#basic-example","p":4128},{"i":4133,"t":"Django is a template engine create by flosch, to see the original syntax documentation please click here","s":"Django","u":"/template/next/django/","h":"","p":4132},{"i":4135,"t":"./views/index.django {% include \"partials/header.django\" %}

{{ Title }}

{% include \"partials/footer.django\" %} ./views/partials/header.django

Header

./views/partials/footer.django

Footer

./views/layouts/main.django Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/django/v3\" ) func main() { // Create a new engine engine := django.New(\"./views\", \".django\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".django\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/django/","h":"#basic-example","p":4132},{"i":4137,"t":"When using the // go:embed directive, resolution of inherited templates using django's {% extend '' %} keyword fails when instantiating the template engine with django.NewFileSystem(). In that case, use the django.NewPathForwardingFileSystem() function to instantiate the template engine. This function provides the proper configuration for resolving inherited templates. Assume you have the following files: views/ancenstor.django views/descendant.djando then package main import ( \"log\" \"embed\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/django/v3\" ) //go:embed views var viewsAsssets embed.FS func main() { // Create a new engine engine := NewPathForwardingFileSystem(http.FS(viewsAsssets), \"/views\", \".django\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render descendant return c.Render(\"descendant\", fiber.Map{ \"greeting\": \"World\", }) }) log.Fatal(app.Listen(\":3000\")) }","s":"Using embedded file system (1.16+ only)","u":"/template/next/django/","h":"#using-embedded-file-system-116-only","p":4132},{"i":4139,"t":"// My custom function func Nl2brHtml(value interface{}) string { if str, ok := value.(string); ok { return strings.Replace(str, \"\\n\", \"
\", -1) } return \"\" } // Create a new engine engine := django.New(\"./views\", \".django\") // register functions engine.AddFunc(\"nl2br\", Nl2brHtml) // Pass the engine to the Views app := fiber.New(fiber.Config{Views: engine}) in the handler c.Render(\"index\", fiber.Map{ \"Fiber\": \"Hello, World!\\n\\nGreetings from Fiber Team\", }) ./views/index.django {{ nl2br(Fiber) }} Output: Hello, World!

Greetings from Fiber Team ","s":"Register and use custom functions","u":"/template/next/django/","h":"#register-and-use-custom-functions","p":4132},{"i":4141,"t":"Handlebars is a template engine create by aymerick, to see the original syntax documentation please click here","s":"Handlebars","u":"/template/next/handlebars/","h":"","p":4140},{"i":4143,"t":"./views/index.hbs {{> 'partials/header' }}

{{Title}}

{{> 'partials/footer' }} ./views/partials/header.hbs

Header

./views/partials/footer.hbs

Footer

./views/layouts/main.hbs Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/handlebars/v2\" ) func main() { // Create a new engine engine := handlebars.New(\"./views\", \".hbs\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".hbs\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/handlebars/","h":"#basic-example","p":4140},{"i":4145,"t":"HTML is the official Go template engine html/template, to see the original syntax documentation please click here Info: All templates within the specified view directory are analyzed and compiled at the beginning to increase the performance when using them. Thus it should be noted that no definition with the same name should exist, otherwise they will overwrite each other. For templating the {{embed}} tag should be used","s":"HTML","u":"/template/next/html/","h":"","p":4144},{"i":4147,"t":"./views/index.html {{template \"partials/header\" .}}

{{.Title}}

{{template \"partials/footer\" .}} ./views/partials/header.html

Header

./views/partials/footer.html

Footer

./views/layouts/main.html Main {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html/v2\" ) func main() { // Create a new engine engine := html.New(\"./views\", \".html\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := html.NewFileSystem(http.Dir(\"./views\", \".html\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/html/","h":"#basic-example","p":4144},{"i":4149,"t":"package main import ( \"log\" \"net/http\" \"embed\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" ) //go:embed views/* var viewsfs embed.FS func main() { engine := html.NewFileSystem(http.FS(viewsfs), \".html\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index - start with views directory return c.Render(\"views/index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) } and change the starting point to the views directory ./views/index.html {{template \"views/partials/header\" .}}

{{.Title}}

{{template \"views/partials/footer\" .}}","s":"Example with embed.FS","u":"/template/next/html/","h":"#example-with-embedfs","p":4144},{"i":4151,"t":"package main import ( \"embed\" \"html/template\" \"log\" \"net/http\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/html\" ) //go:embed views/* var viewsfs embed.FS func main() { engine := html.NewFileSystem(http.FS(viewsfs), \".html\") engine.AddFunc( // add unescape function \"unescape\", func(s string) template.HTML { return template.HTML(s) }, ) // Pass the engine to the Views app := fiber.New(fiber.Config{Views: engine}) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"views/index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) log.Fatal(app.Listen(\":3000\")) } and change the starting point to the views directory ./views/index.html

{{ unescape .Title}}

html output

Hello, World!

","s":"Example with innerHTML","u":"/template/next/html/","h":"#example-with-innerhtml","p":4144},{"i":4153,"t":"The Go standard library provides a set of packages to generate output. The text/template package implements templates for generating text output, while the html/template package implements templates for generating HTML output that is safe against certain attacks. Both packages use the same interface but the following examples of the core features are directed towards HTML applications.","s":"Golang Templates Cheatsheet","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"","p":4152},{"i":4155,"t":"Parsing and Creating Templates Executing Templates Template Encoding and HTML Template Variables Template Actions Template Functions Template Comparison Functions Nested Templates and Layouts Templates Calling Functions","s":"Table of Contents","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#table-of-contents","p":4152},{"i":4157,"t":"Naming Templates​ There is no defined file extension for Go templates. One of the most popular is .tmpl supported by vim-go and referenced in the text/template godocs. The extension .gohtml supports syntax highlighting in both Atom and GoSublime editors. Finally analysis of large Go codebases finds that .tpl is often used by developers. While the extension is not important it is still good to be consistent within a project for clarity. Creating a Template​ tpl, err := template.Parse(filename) will get the template at filename and store it in tpl. tpl can then be executed to show the template. Parsing Multiple Templates​ template.ParseFiles(filenames) takes a list of filenames and stores all templates. template.ParseGlob(pattern) will find all templates matching the pattern and store the templates.","s":"Parsing and Creating Templates","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#parsing-and-creating-templates","p":4152},{"i":4159,"t":"Execute a Single Template​ Once a template has been parsed there are two options to execute them. A single template tpl can be executed using tpl.Execute(io.Writer, data). The content of tpl will be written to the io.Writer. Data is an interface passed to the template that will be useable in the template. Executing a Named Template​ tpl.ExecuteTemplate(io.Writer, name, data) works the same as execute but allows for a string name of the template the user wants to execute.","s":"Executing Templates","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#executing-templates","p":4152},{"i":4161,"t":"Contextual Encoding​ Go’s html/template package does encoding based on the context of the code. As a result, html/template encodes any characters that need encoding to be rendered correctly. For example the < and > in \"

A header!

\" will be encoded as <h1>A header!</h1> . Type template.HTML can be used to skip encoding by telling Go the string is safe. template.HTML(\"

A Safe header

\") will then be

A Safe header

. Using this type with user input is dangerous and leaves the application vulnerable. The go html/template package is aware of attributes within the template and will encode values differently based on the attribute. Go templates can also be used with javascript. Structs and maps will be expanded into JSON objects and quotes will be added to strings for use in function parameters and as variable values. // Go type Cat struct { Name string Age int } kitten := Cat{\"Sam\", 12} // Template // Javascript var cat = {\"Name\":\"Sam\", \"Age\" 12} Safe Strings and HTML Comments​ The html/template package will remove any comments from a template by default. This can cause issues when comments are necessary such as detecting internet explorer. We can use the Custom Functions method (Globally) to create a function that returns html preserving comments. Define a function htmlSafe in the FuncMap of the template. testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"htmlSafe\": func(html string) template.HTML { return template.HTML(html) }, }).ParseFiles(\"hello.gohtml\") This function takes a string and produces the unaltered HTML code. This function can be used in a template like so to preserve the comments : {{htmlSafe \"\" }}","s":"Template Encoding and HTML","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-encoding-and-html","p":4152},{"i":4163,"t":"The dot character (.)​ A template variable can be a boolean, string, character, integer, floating-point, imaginary, or complex constant in Go syntax. Data passed to the template can be accessed using dot {{ . }}. If the data is a complex type then it’s fields can be accessed using the dot with the field name {{ .FieldName }}. Dots can be chained together if the data contains multiple complex structures. {{ .Struct.StructTwo.Field }} Variables in Templates​ Data passed to the template can be saved in a variable and used throughout the template. {{$number := .}} We use the $number to create a variable then initialize it with the value passed to the template. To use the variable we call it in the template with {{$number}}. {{$number := .}}

It is day number {{$number}} of the month

var tpl *template.Template tpl = template.Must(template.ParseFiles(\"templateName\")) err := tpl.ExecuteTemplate(os.Stdout, \"templateName\", 23) In this example we pass 23 to the template and stored in the $number variable which can be used anywhere in the template","s":"Template Variables","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-variables","p":4152},{"i":4165,"t":"If/Else Statements​ Go templates support if/else statements like many programming languages. We can use the if statement to check for values, if it doesn’t exist we can use an else value. The empty values are false, 0, any nil pointer or interface value, and any array, slice, map, or string of length zero.

Hello, {{if .Name}} {{.Name}} {{else}} Anonymous {{end}}!

If .Name exists then Hello, Name will be printed (replaced with the name value) otherwise it will print Hello, Anonymous. Templates also provide the else if statment {{else if .Name2 }} which can be used to evaluate other options after an if. Removing Whitespace​ Adding different values to a template can add various amounts of whitespace. We can either change our template to better handle it, by ignoring or minimizing effects, or we can use the minus sign - within out template.

Hello, {{if .Name}} {{.Name}} {{- else}} Anonymous {{- end}}!

Here we are telling the template to remove all spaces between the Name variable and whatever comes after it. We are doing the same with the end keyword. This allows us to have whitespace within the template for easier reading but remove it in production. Range Blocks​ Go templates have a range keyword to iterate over all objects in a structure. Suppose we had the Go structures: type Item struct { Name string Price int } type ViewData struct { Name string Items []Item } We have an Item, with a name and price, then a ViewData which is the structure sent to the template. Consider the template containing the following: {{range .Items}}

{{.Name}}

${{.Price}}
{{end}} For each Item in the range of Items (in the ViewData structure) get the Name and Price of that item and create html for each Item automatically. Within a range each Item becomes the {{.}} and the item properties therefore become {{.Name}} or {{.Price}} in this example.","s":"Template Actions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-actions","p":4152},{"i":4167,"t":"The template package provides a list of predefined global functions. Below are some of the most used. Indexing structures in Templates​ If the data passed to the template is a map, slice, or array it can be indexed from the template. We use {{index x number}} where index is the keyword, x is the data and number is a integer for the index value. If we had {{index names 2}} it is equivalent to names[2]. We can add more integers to index deeper into data. {{index names 2 3 4}} is equivalent to names[2][3][4].

{{index .FavNums 2 }}

type person struct { Name string FavNums []int } func main() { tpl := template.Must(template.ParseGlob(\"*.gohtml\")) tpl.Execute(os.Stdout, &person{\"Curtis\", []int{7, 11, 94}}) } This code example passes a person structure and gets the 3rd favourite number from the FavNums slice. The and Function​ The and function returns the boolean AND of its arguments by returning the first empty argument or the last argument. and x y behaves logically as if x then y else x . Consider the following go code type User struct { Admin bool } type ViewData struct { *User } Pass a ViewData with a User that has Admin set true to the following template {{if and .User .User.Admin}} You are an admin user! {{else}} Access denied! {{end}} The result will be You are an admin user!. However if the ViewData did not include a *User object or Admin was set as false then the result will be Access denied!. The or Function​ The or function operates similarly to the and function however will stop at the first true. or x y is equivalent to if x then x else y so y will never be evaluated if x is not empty. The not Function​ The not function returns the boolean negation of the argument. {{ if not .Authenticated}} Access Denied! {{ end }}","s":"Template Functions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-functions","p":4152},{"i":4169,"t":"Comparisons​ The html/template package provides a variety of functions to do comparisons between operators. The operators may only be basic types or named basic types such as type Temp float32 Remember that template functions take the form {{ function arg1 arg2 }}. eq Returns the result of arg1 == arg2 ne Returns the result of arg1 != arg2 lt Returns the result of arg1 < arg2 le Returns the result of arg1 <= arg2 gt Returns the result of arg1 > arg2 ge Returns the result of arg1 >= arg2 Of special note eq can be used with two or more arguments by comparing all arguments to the first. {{ eq arg1 arg2 arg3 arg4}} will result in the following logical expression: arg1==arg2 || arg1==arg3 || arg1==arg4","s":"Template Comparison Functions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#template-comparison-functions","p":4152},{"i":4171,"t":"Nesting Templates​ Nested templates can be used for parts of code frequently used across templates, a footer or header for example. Rather than updating each template separately we can use a nested template that all other templates can use. You can define a template as follows: {{define \"footer\"}}

Here is the footer

{{end}} A template named “footer” is defined which can be used in other templates like so to add the footer template content into the other template: {{template \"footer\"}} Passing Variables between Templates​ The template action used to include nested templates also allows a second parameter to pass data to the nested template. // Define a nested template called header {{define \"header\"}}

{{.}}

{{end}} // Call template and pass a name parameter {{range .Items}}
{{template \"header\" .Name}} ${{.Price}}
{{end}} We use the same range to loop through Items as before but we pass the name to the header template each time in this simple example. Creating Layouts​ Glob patterns specify sets of filenames with wildcard characters. The template.ParseGlob(pattern string) function will parse all templates that match the string pattern. template.ParseFiles(files...) can also be used with a list of file names. The templates are named by default based on the base names of the argument files. This mean views/layouts/hello.gohtml will have the name hello.gohtml . If the template has a `{{define “templateName”}} within it then that name will be usable. A specific template can be executed using t.ExecuteTemplate(w, \"templateName\", nil) . t is an object of type Template, w is type io.Writer such as an http.ResponseWriter, Then there is the name of the template to execute, and finally passing any data to the template, in this case a nil value. Example main.go file // Omitted imports & package var LayoutDir string = \"views/layouts\" var bootstrap *template.Template func main() { var err error bootstrap, err = template.ParseGlob(LayoutDir + \"/*.gohtml\") if err != nil { panic(err) } http.HandleFunc(\"/\", handler) http.ListenAndServe(\":8080\", nil) } func handler(w http.ResponseWriter, r *http.Request) { bootstrap.ExecuteTemplate(w, \"bootstrap\", nil) } All .gohtml files are parsed in main. When route / is reached the template defined as bootstrap is executed using the handler function. Example views/layouts/bootstrap.gohtml file {{define \"bootstrap\"}} Go Templates

Filler header

Filler paragraph

{{end}}","s":"Nested Templates and Layouts","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#nested-templates-and-layouts","p":4152},{"i":4173,"t":"Function Variables (calling struct methods)​ We can use templates to call the methods of objects in the template to return data. Consider the User struct with the following method. type User struct { ID int Email string } func (u User) HasPermission(feature string) bool { if feature == \"feature-a\" { return true } else { return false } } When a type User has been passed to the template we can then call this method from the template. {{if .User.HasPermission \"feature-a\"}}

Feature A

Some other stuff here...

{{else}}

Feature A

To enable Feature A please upgrade your plan

{{end}} The template checks if the User HasPermission for the feature and renders depending on the result. Function Variables (call)​ If the Method HasPermission has to change at times then the Function Variables (Methods) implementation may not fit the design. Instead a HasPermission func(string) bool attribute can be added on the User type. This can then have a function assigned to it at creation. // Structs type ViewData struct { User User } type User struct { ID int Email string HasPermission func(string) bool } // Example of creating a ViewData vd := ViewData{ User: User{ ID: 1, Email: \"curtis.vermeeren@gmail.com\", // Create the HasPermission function HasPermission: func(feature string) bool { if feature == \"feature-b\" { return true } return false }, }, } // Executing the ViewData with the template err := testTemplate.Execute(w, vd) We need to tell the Go template that we want to call this function so we must change the template from the Function Variables (Methods) implementation to do this. We use the call keyword supplied by the go html/template package. Changing the previous template to use call results in: {{if (call .User.HasPermission \"feature-b\")}}

Feature B

Some other stuff here...

{{else}}

Feature B

To enable Feature B please upgrade your plan

{{end}} Custom Functions​ Another way to call functions is to create custom functions with template.FuncMap . This method creates global methods that can be used throughout the entire application. FuncMap has type map[string]interface{} mapping a string, the function name, to a function. The mapped functions must have either a single return value, or two return values where the second has type error. // Creating a template with function hasPermission testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"hasPermission\": func(user User, feature string) bool { if user.ID == 1 && feature == \"feature-a\" { return true } return false }, }).ParseFiles(\"hello.gohtml\") Here the function to check if a user has permission for a feature is mapped to the string \"hasPermission\" and stored in the FuncMap. Note that the custom functions must be created before calling ParseFiles() The function could be executed in the template as follows: {{ if hasPermission .User \"feature-a\" }} The .User and string \"feature-a\" are both passed to hasPermission as arguments. Custom Functions (Globally)​ The previous two methods of custom functions rely on .User being passed to the template. This works in many cases but in a large application passing too many objects to a template can become difficult to maintain across many templates. We can change the implementation of the custom function to work without the .User being passed. Using a similar feature example as the other 2 sections first you would have to create a default hasPermission function and define it in the template’s function map. testTemplate, err = template.New(\"hello.gohtml\").Funcs(template.FuncMap{ \"hasPermission\": func(feature string) bool { return false }, }).ParseFiles(\"hello.gohtml\") This function could be placed in main() or somewhere that ensures the default hasPermission is created in the hello.gohtml function map. The default function just returns false but it defines the function and implementation that doesn’t require User . Next a closure could be used to redefine the hasPermission function. It would use the User data available when it is created in a handler rather than having User data passed to it. Within the handler for the template you can redefine any functions to use the information available. func handler(w http.ResponseWriter, r *http.Request) { w.Header().Set(\"Content-Type\", \"text/html\") user := User{ ID: 1, Email: \"Curtis.vermeeren@gmail.com\", } vd := ViewData{} err := testTemplate.Funcs(template.FuncMap{ \"hasPermission\": func(feature string) bool { if user.ID == 1 && feature == \"feature-a\" { return true } return false }, }).Execute(w, vd) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) } } In this handler a User is created with ID and Email, Then a ViewData is created without passing the user to it. The hasPermission function is redefined using user.ID which is available when the function is created. {{if hasPermission \"feature-a\"}} can be used in a template without having to pass a User to the template as the User object in the handler is used instead.","s":"Templates Calling Functions","u":"/template/next/html/TEMPLATES_CHEATSHEET","h":"#templates-calling-functions","p":4152},{"i":4175,"t":"Jet is a template engine create by cloudykit, to see the original syntax documentation please click here","s":"Jet","u":"/template/next/jet/","h":"","p":4174},{"i":4177,"t":"./views/index.jet {{include \"partials/header\"}}

{{ Title }}

{{include \"partials/footer\"}} ./views/partials/header.jet

Header

./views/partials/footer.jet

Footer

./views/layouts/main.jet Title {{ embed() }} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/jet/v2\" ) func main() { // Create a new engine engine := jet.New(\"./views\", \".jet\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := jet.NewFileSystem(http.Dir(\"./views\", \".jet\")) // Pass the engine to the views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/jet/","h":"#basic-example","p":4174},{"i":4179,"t":"Mustache is a template engine created by hoisie/cbroglie, to see the original syntax documentation please click here","s":"Mustache","u":"/template/next/mustache/","h":"","p":4178},{"i":4181,"t":"./views/index.mustache {{> views/partials/header }}

{{Title}}

{{> views/partials/footer }} ./views/partials/header.mustache

Header

./views/partials/footer.mustache

Footer

./views/layouts/main.mustache Main {{{embed}}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/mustache/v2\" ) func main() { // Create a new engine engine := mustache.New(\"./views\", \".mustache\") // Or from an embedded system // Note that with an embedded system the partials included from template files must be // specified relative to the filesystem's root, not the current working directory // engine := mustache.NewFileSystem(http.Dir(\"./views\", \".mustache\"), \".mustache\") // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/mustache/","h":"#basic-example","p":4178},{"i":4183,"t":"Pug is a template engine create by joker, to see the original syntax documentation please click here","s":"Pug","u":"/template/next/pug/","h":"","p":4182},{"i":4185,"t":"./views/index.pug include partials/header.pug h1 #{.Title} include partials/footer.pug ./views/partials/header.pug h2 Header ./views/partials/footer.pug h2 Footer ./views/layouts/main.pug doctype html html head title Main include ../partials/meta.pug body | {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/pug/v2\" // \"net/http\" // embedded system ) func main() { // Create a new engine engine := pug.New(\"./views\", \".pug\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := pug.NewFileSystem(http.Dir(\"./views\", \".pug\")) // Pass the engine to the views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/pug/","h":"#basic-example","p":4182},{"i":4187,"t":"Slim is a template engine created by mattn, to see the original syntax documentation please click here","s":"Slim","u":"/template/next/slim/","h":"","p":4186},{"i":4189,"t":"./views/index.slim == render(\"partials/header.slim\") h1 = Title == render(\"partials/footer.slim\") ./views/partials/header.slim h2 = Header ./views/partials/footer.slim h2 = Footer ./views/layouts/main.slim doctype html html head title Main include ../partials/meta.slim body | {{embed}} package main import ( \"log\" \"github.com/gofiber/fiber/v2\" \"github.com/gofiber/template/slim/v2\" // \"net/http\" // embedded system ) func main() { // Create a new engine engine := slim.New(\"./views\", \".slim\") // Or from an embedded system // See github.com/gofiber/embed for examples // engine := slim.NewFileSystem(http.Dir(\"./views\", \".slim\")) // Pass the engine to the Views app := fiber.New(fiber.Config{ Views: engine, }) app.Get(\"/\", func(c *fiber.Ctx) error { // Render index return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }) }) app.Get(\"/layout\", func(c *fiber.Ctx) error { // Render index within layouts/main return c.Render(\"index\", fiber.Map{ \"Title\": \"Hello, World!\", }, \"layouts/main\") }) log.Fatal(app.Listen(\":3000\")) }","s":"Basic Example","u":"/template/next/slim/","h":"#basic-example","p":4186}],"index":{"version":"2.3.9","fields":["t"],"fieldVectors":[["t/4113",[0,0.821,1,2.404,2,4.343,3,3.222,4,1.566,5,3.222,6,0.619,7,0.619,8,3.668,9,4.343,10,4.343,11,1.437,12,1.02,13,2.214,14,3.668,15,0.81,16,4.343,17,3.668,18,4.343,19,4.343,20,4.343,21,4.343,22,4.343,23,2.625,24,2.89,25,2.89,26,2.404,27,3.222,28,0.761,29,2.89,30,2.625,31,2.89,32,2.89]],["t/4115",[33,2.59,34,5.13,35,5.13,36,5.13,37,4.332,38,5.066,39,1.481,40,5.13]],["t/4117",[0,0.42,4,1.334,6,0.659,7,0.659,11,0.735,12,0.798,13,1.732,15,1.025,23,1.342,28,0.723,39,0.641,41,0.855,42,0.916,43,0.686,44,1.647,45,2.22,46,2.868,47,2.22,48,2.22,49,2.22,50,1.039,51,1.875,52,0.521,53,0.388,54,0.743,55,1.875,56,1.875,57,2.22,58,2.22,59,2.139,60,1.875,61,1.875,62,0.521,63,1.875,64,0.843,65,1.229,66,1.229,67,2.22,68,1.88,69,1.191,70,2.868,71,1.875,72,2.22,73,3.428,74,3.075,75,2.26,76,3.397,77,1.875,78,1.342,79,2.22,80,3.428,81,1.342,82,1.132,83,1.29,84,2.22,85,0.599,86,2.22,87,0.641,88,2.22,89,1.477,90,1.647,91,3.397,92,1.477,93,2.22,94,2.22,95,1.342,96,1.68,97,2.22,98,1.477,99,1.342,100,2.22,101,2.22,102,0.969,103,1.275,104,2.22,105,0.641,106,0.735,107,1.342,108,2.22,109,2.22,110,1.132,111,0.735,112,1.124,113,1.124,114,0.981,115,1.29,116,1.05,117,1.203,118,1.203,119,0.904,120,0.904,121,0.735]],["t/4119",[7,0.555,12,1.141,24,3.233,25,3.233,26,2.689,27,3.605,28,0.852,29,3.233,30,2.937,31,3.233,32,3.233,44,3.605,50,1.223,55,4.103,68,2.689,122,4.311,123,4.859,124,4.859]],["t/4121",[0,1.013,4,1.114,6,0.301,7,0.677,12,1.258,13,1.343,15,1.029,23,1.591,28,0.882,33,2.05,39,1.453,41,1.493,42,1.357,43,1.555,52,1.182,61,2.224,63,2.224,64,1,87,0.76,105,1.453,106,1.664,125,1.954,126,2.224,127,2.634,128,3.86,129,4.523,130,2.182,131,2.634,132,3.733,133,2.634,134,2.634,135,4.569,136,4.569,137,3.86,138,2.634,139,2.634,140,2.634,141,2.634,142,2.634,143,2.634,144,2.634,145,2.634,146,3.86,147,2.634,148,2.224,149,2.634,150,2.634]],["t/4123",[7,0.547,30,2.898,65,2.654,68,2.654,151,4.05,152,4.868,153,6.181,154,4.796,155,4.796,156,4.796,157,4.796,158,4.796,159,3.558,160,2.898,161,4.796,162,3.558,163,4.796,164,4.796]],["t/4125",[6,0.581,7,0.581,24,3.39,53,0.581,62,1.197,130,2.075,165,5.095,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805]],["t/4127",[0,0.586,7,0.651,11,1.025,12,1.019,15,1.026,24,2.886,28,0.76,39,0.895,41,1.26,42,0.836,43,0.958,50,0.78,52,0.728,53,0.354,54,0.678,62,0.728,64,1.177,66,1.715,69,1.252,85,0.836,87,0.895,102,1.019,103,1.341,105,0.895,106,1.025,111,1.025,112,1.435,113,1.435,114,1.252,115,1.647,116,1.341,117,1.92,118,1.537,119,1.263,120,1.767,121,1.025,171,3.099,172,2.046,173,2.062,174,2.36,175,2.062,176,3.099,177,1.873,178,3.099,179,1.873,180,3.099,181,1.177,182,1.263,183,1.098,184,3.099,185,3.099,186,1.357,187,1.462,188,1.537]],["t/4129",[6,0.581,7,0.581,25,3.39,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,189,5.095]],["t/4131",[0,0.599,7,0.656,11,1.047,12,1.034,15,1.016,25,2.929,28,0.771,39,0.914,41,1.274,42,1.365,43,0.978,50,0.797,52,0.744,53,0.361,54,0.693,62,0.744,64,1.202,66,1.752,69,1.271,85,0.854,87,0.914,102,1.034,103,1.361,105,0.914,106,1.047,111,1.047,112,1.456,113,1.456,114,1.271,115,1.671,116,1.361,117,1.938,118,1.56,119,1.29,120,1.793,121,1.047,173,2.107,174,2.387,175,2.107,177,1.913,179,1.913,181,1.202,182,1.29,183,1.122,186,1.386,187,1.493,188,1.56,190,3.166,191,3.166,192,3.166,193,3.166,194,3.166,195,3.166]],["t/4133",[6,0.581,7,0.581,26,2.82,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,196,5.095]],["t/4135",[0,0.586,7,0.651,11,1.025,12,1.019,15,1.024,26,2.4,28,0.877,39,0.895,41,1.092,42,0.836,43,0.958,50,0.78,52,0.728,53,0.354,54,0.678,62,0.728,64,1.177,66,1.715,69,1.252,85,0.836,87,0.895,102,1.019,103,1.341,105,0.895,106,1.025,111,1.025,112,1.435,113,1.435,114,1.252,115,1.647,116,1.341,117,1.773,118,1.537,119,1.263,120,1.767,121,1.025,172,2.046,174,2.046,181,1.177,182,1.767,183,1.537,186,1.357,187,1.462,188,1.537,197,2.617,198,3.099,199,3.099,200,3.099,201,1.873,202,3.099,203,1.873,204,3.099,205,2.062,206,2.617,207,2.617]],["t/4137",[0,0.62,1,1.815,4,1.489,6,0.634,7,0.687,11,1.085,12,1.304,15,1.007,26,1.815,39,0.947,41,1.136,42,0.884,43,1.013,52,0.77,53,0.374,54,0.717,65,1.815,69,0.947,87,0.947,96,1.837,102,0.77,105,0.947,106,1.085,111,1.085,112,1.085,113,1.085,114,0.947,116,1.013,118,1.162,121,1.085,152,2.769,206,2.769,208,3.347,209,2.769,210,3.279,211,4.51,212,3.279,213,2.182,214,3.279,215,4.51,216,3.279,217,2.433,218,3.279,219,3.279,220,3.279,221,3.279,222,3.279,223,1.672,224,3.279,225,3.279,226,1.981,227,1.815,228,3.279,229,2.433,230,3.279,231,3.279,232,3.279,233,2.769]],["t/4139",[7,0.642,8,4.426,11,1.12,12,0.795,13,1.725,15,1.007,26,1.873,28,1.065,52,0.795,53,0.386,54,0.741,59,1.379,96,1.878,102,1.082,103,1.424,105,0.977,115,1.285,116,1.046,181,1.75,183,1.994,197,2.858,207,2.858,233,2.858,234,2.511,235,3.384,236,3.384,237,4.609,238,3.384,239,3.384,240,3.384,241,4.609,242,2.858,243,3.384,244,3.384,245,3.384,246,2.858,247,2.511,248,3.384,249,4.609,250,3.892,251,4.609,252,4.609,253,4.609,254,3.384,255,2.511,256,3.384]],["t/4141",[6,0.581,7,0.581,27,3.78,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,257,5.095]],["t/4143",[0,0.596,7,0.655,11,1.043,12,1.031,15,1.025,28,0.885,39,0.91,41,1.105,42,0.85,43,0.974,50,0.794,52,0.74,53,0.36,54,0.69,62,0.74,64,1.197,66,1.745,69,1.267,85,0.85,87,0.91,102,1.031,103,1.357,105,0.91,106,1.043,111,1.043,112,1.452,113,1.452,114,1.267,115,1.666,116,1.357,117,1.555,118,1.555,119,1.284,120,1.788,121,1.043,181,1.197,182,1.788,183,1.555,186,1.38,187,1.487,188,1.555,201,1.905,203,1.905,205,2.098,258,3.153,259,2.339,260,2.662,261,2.339,262,3.153,263,3.153,264,3.153,265,3.153,266,3.153,267,4.389]],["t/4145",[4,1.561,6,0.673,7,0.493,12,1.014,28,0.757,33,1.759,62,1.014,68,2.389,83,1.639,85,1.164,87,1.247,92,2.873,130,1.759,166,1.89,167,1.639,168,1.759,169,1.89,170,1.53,268,4.318,269,2.389,270,4.318,271,2.873,272,4.318,273,4.318,274,4.318,275,4.318,276,4.318,277,4.318,278,2.873,279,4.318,280,2.609,281,3.646,282,3.646,283,4.318,284,4.318]],["t/4147",[0,0.596,6,0.501,7,0.655,11,1.043,12,1.031,15,1.021,28,1.006,39,0.91,41,1.105,42,0.85,43,0.974,50,0.794,51,2.662,52,0.74,53,0.36,54,0.69,60,2.662,62,0.74,64,1.197,66,1.745,69,1.267,85,0.85,87,0.91,102,1.031,103,1.357,105,0.91,106,1.043,111,1.043,112,1.452,113,1.452,114,1.267,115,1.666,116,1.357,117,1.555,118,1.555,119,1.284,120,1.788,121,1.043,181,1.197,182,1.788,183,1.555,186,1.38,187,1.487,188,1.555,201,1.905,203,1.905,205,2.098,259,2.339,261,2.339,285,2.339,286,2.662,287,3.153,288,3.153,289,3.153]],["t/4149",[0,0.701,6,0.559,7,0.626,12,1.426,15,1.01,28,0.65,39,1.071,41,1.234,42,1,43,1.146,52,0.871,54,0.811,69,1.071,87,1.071,102,0.871,103,1.146,105,1.071,106,1.227,111,1.227,112,1.227,113,1.227,114,1.071,116,1.146,117,1.314,118,1.314,121,1.227,132,2.752,173,2.468,175,2.468,188,1.314,208,2.752,226,2.241,227,2.052,229,2.752,271,3.261,285,2.752,286,3.132,290,3.132,291,3.132,292,4.138,293,3.132,294,2.468,295,2.752]],["t/4151",[0,0.668,7,0.611,12,1.258,15,1.008,28,0.831,39,1.019,41,1.194,42,0.952,43,1.091,52,0.829,54,0.773,59,1.438,69,1.019,87,1.019,95,2.134,96,1.438,102,1.114,103,1.091,105,1.019,111,1.168,112,1.168,113,1.168,114,1.019,116,1.091,117,1.251,121,1.168,132,2.62,188,1.251,208,2.62,226,2.134,227,1.954,229,2.62,246,2.981,255,2.62,269,1.954,271,2.349,285,2.62,290,2.981,291,2.981,292,2.981,293,2.981,294,2.349,295,2.62,296,3.531,297,5.356,298,3.531,299,2.981,300,3.531,301,3.531,302,3.531,303,3.531,304,3.531,305,3.531]],["t/4153",[0,1.167,1,2.376,4,1.239,6,0.615,13,2.188,28,0.944,33,1.749,50,1.081,89,2.856,126,3.625,148,4.969,209,3.625,223,2.188,255,4.366,269,2.376,280,2.594,306,4.293,307,3.625,308,4.547,309,4.293,310,3.625,311,4.293,312,4.293,313,4.293,314,3.185,315,4.293,316,3.625,317,4.293,318,3.185]],["t/4155",[6,0.779,28,0.83,53,0.54,78,2.861,80,3.513,82,2.414,90,3.513,96,2.504,107,2.861,319,2.861,320,3.998,321,3.998,322,3.998]],["t/4157",[4,1.039,5,2.671,6,0.741,15,0.537,23,2.904,33,2.203,42,0.971,53,0.411,56,4.567,65,1.992,70,3.04,71,3.04,78,2.175,81,2.175,83,1.367,85,0.971,167,1.367,307,3.04,314,2.671,319,2.175,323,3.6,324,3.6,325,3.6,326,3.6,327,3.6,328,3.6,329,3.04,330,3.6,331,3.6,332,3.6,333,3.6,334,3.04,335,3.6,336,3.04,337,3.6,338,4.805,339,3.84,340,3.6,341,3.6,342,3.6,343,3.6,344,2.175,345,3.6,346,4.057,347,4.013,348,3.6,349,3.6,350,2.671,351,2.671,352,3.04,353,3.04,354,3.04]],["t/4159",[4,1.225,6,0.749,13,2.163,54,0.928,59,1.728,73,3.148,78,2.564,83,2.222,162,3.966,280,2.564,319,3.908,339,3.557,355,4.243,356,3.148,357,4.243,358,3.537,359,3.148,360,4.243,361,3.583,362,4.243,363,4.243,364,3.148,365,3.148,366,2.823]],["t/4161",[0,0.776,3,1.633,4,1.511,6,0.597,15,0.988,28,0.719,33,1.873,50,0.554,53,0.251,59,2.132,69,0.635,74,1.464,81,1.33,82,1.122,83,0.835,85,0.593,96,2.132,98,1.464,99,1.33,102,0.792,110,1.72,125,1.633,160,1.33,170,0.78,227,1.867,234,1.633,269,2.545,299,2.849,310,3.883,318,1.633,320,4.6,344,1.33,350,1.633,359,1.633,366,2.245,367,2.2,368,2.2,369,2.849,370,2.2,371,2.503,372,1.633,373,1.858,374,2.2,375,3.373,376,2.2,377,2.2,378,2.2,379,2.345,380,2.2,381,1.633,382,2.2,383,2.849,384,2.2,385,2.2,386,2.2,387,2.2,388,2.2,389,2.849,390,3.373,391,2.245,392,2.2,393,2.2,394,1.33,395,2.2,396,1.633,397,1.858,398,4.102,399,3.373,400,1.464,401,3.373,402,2.2,403,3.373,404,2.849,405,2.2,406,4.959,407,1.858,408,2.2,409,2.2,410,2.2,411,1.633,412,2.2,413,3.373,414,3.373,415,4.102,416,1.858,417,2.2,418,4.102,419,3.373,420,4.599,421,1.858,422,1.858,423,1.858,424,2.2,425,2.2,426,1.858,427,2.2,428,2.2,429,3.373,430,2.2,431,2.2,432,2.2,433,2.2,434,2.2]],["t/4163",[4,1.707,5,2.3,6,0.718,15,0.985,33,1.263,50,0.78,53,0.354,54,1.186,59,1.263,82,3.014,83,1.177,107,1.873,110,1.58,167,1.177,174,2.046,227,1.715,295,2.3,339,2.886,344,1.873,347,2.3,358,3.275,372,3.218,379,1.58,435,5.42,436,2.617,437,2.617,438,3.099,439,3.099,440,5.004,441,3.099,442,3.663,443,3.099,444,4.338,445,3.099,446,3.099,447,3.099,448,2.617,449,2.3,450,3.099,451,3.099,452,2.617,453,5.125,454,3.099,455,3.099,456,3.099,457,2.617,458,3.099,459,3.099,460,2.617,461,4.338,462,3.099]],["t/4165",[1,1.271,4,1.358,6,0.679,13,1.171,15,0.85,23,1.388,28,0.402,33,1.716,50,0.578,53,0.262,59,1.716,68,2.331,73,1.704,75,1.528,77,2.943,82,1.171,83,2.354,85,1.136,95,1.388,99,1.388,103,1.077,110,2.713,125,1.704,129,1.939,170,0.814,213,2.319,223,1.171,280,1.388,281,2.943,282,1.939,294,1.528,365,1.704,379,1.777,381,1.704,391,2.319,394,1.388,396,1.704,400,1.528,407,3.556,448,1.939,449,3.488,463,3.485,464,4.212,465,1.939,466,2.297,467,2.297,468,1.939,469,1.939,470,1.939,471,2.297,472,1.704,473,2.297,474,1.939,475,1.939,476,2.297,477,2.297,478,3.485,479,4.212,480,3.485,481,2.297,482,2.297,483,2.297,484,1.939,485,4.212,486,2.297,487,2.297,488,2.297,489,2.297,490,2.297,491,2.297,492,2.297,493,2.297,494,2.297,495,2.297,496,2.297,497,1.704,498,2.297,499,2.297,500,2.297,501,2.319,502,2.297,503,2.297,504,4.268,505,2.297,506,2.297,507,2.297,508,2.297,509,5.104,510,4.702,511,3.125,512,2.297,513,1.704,514,2.586,515,1.939,516,2.297,517,2.297,518,1.939,519,1.939,520,2.297,521,2.943,522,2.297,523,2.297]],["t/4167",[0,0.44,1,1.287,4,1.016,6,0.58,15,0.928,33,0.947,41,0.586,46,1.964,50,0.586,52,0.546,54,0.929,59,0.947,75,1.547,83,1.611,89,2.341,95,1.405,96,2.329,98,1.547,99,1.405,102,0.997,110,1.186,122,1.725,160,2.126,172,1.097,174,1.097,183,1.246,188,2.026,213,1.547,223,1.794,339,1.547,351,1.725,358,2.565,366,3.695,371,2.611,379,2.164,391,2.824,394,1.405,400,1.547,436,2.971,437,2.971,442,3.584,449,2.611,453,3.584,470,2.971,474,1.964,475,2.971,484,1.964,501,2.341,511,3.149,513,1.725,524,2.326,525,5.854,526,3.584,527,4.244,528,2.326,529,2.326,530,2.326,531,2.326,532,2.326,533,2.326,534,4.244,535,3.518,536,2.326,537,2.326,538,2.326,539,2.326,540,2.326,541,2.326,542,2.326,543,2.326,544,2.326,545,3.149,546,2.611,547,2.326,548,5.083,549,2.326,550,1.964,551,5.083,552,1.964,553,2.971,554,2.326,555,4.244,556,1.964,557,2.326,558,2.326,559,2.326,560,2.326,561,2.326]],["t/4169",[0,0.626,1,1.831,4,0.955,6,0.378,15,0.974,17,2.794,83,1.256,96,2.11,102,1.417,122,2.455,160,3.734,223,1.687,269,1.831,278,2.201,321,3.832,350,2.455,356,2.455,379,2.641,411,2.455,497,2.455,545,3.02,546,2.455,550,2.794,556,3.832,562,3.308,563,4.538,564,3.308,565,3.308,566,3.308,567,3.308,568,6.293,569,6.293,570,5.18,571,3.308,572,3.308,573,3.308,574,3.308,575,3.308,576,3.308,577,3.308,578,3.308,579,3.308,580,3.308,581,3.308,582,3.308]],["t/4171",[0,0.342,4,1.604,6,0.745,15,0.938,28,0.633,41,0.728,42,0.487,44,1.34,50,1.039,52,0.679,53,0.206,54,0.988,59,1.471,65,2.499,68,1.599,74,1.202,78,1.746,80,1.34,81,3.175,82,0.921,83,2.11,85,0.487,89,1.202,90,1.34,92,1.202,95,1.091,96,1.177,107,1.746,110,0.921,114,0.522,151,1.525,159,1.34,172,0.852,177,2.728,179,3.056,181,0.686,182,1.177,183,1.024,217,1.34,223,0.921,227,1.999,247,2.144,250,1.525,280,1.091,319,2.183,322,4.067,329,2.44,334,1.525,344,2.183,346,1.525,351,1.34,352,1.525,353,1.525,354,2.44,358,1.746,359,1.34,361,1.525,365,1.34,369,2.44,371,1.34,372,1.34,379,1.473,383,1.525,394,1.091,397,2.44,404,3.486,411,1.34,457,1.525,460,2.44,472,3.35,497,1.34,501,2.747,504,2.44,509,2.44,514,3.063,515,1.525,518,1.525,519,1.525,545,1.202,583,1.806,584,1.806,585,1.806,586,1.806,587,1.806,588,1.806,589,1.525,590,1.806,591,1.806,592,1.806,593,1.525,594,1.806,595,1.806,596,1.806,597,1.806,598,1.806,599,1.525,600,1.806,601,1.806,602,1.806,603,1.806,604,2.44,605,1.806,606,1.806,607,1.806,608,1.806,609,4.816,610,1.806,611,1.806,612,1.806,613,1.806,614,1.525,615,1.525,616,1.525,617,1.806,618,1.806,619,1.806,620,1.806,621,1.806,622,1.806,623,1.806,624,1.806,625,1.806,626,1.806,627,1.806,628,1.806,629,1.806,630,1.806,631,1.806,632,1.806,633,1.806,634,1.806]],["t/4173",[0,0.213,3,3.475,4,1.397,6,0.625,14,2.172,15,0.986,33,0.793,37,0.95,38,0.95,41,0.283,50,0.49,52,0.457,53,0.568,54,0.942,59,1.908,69,0.325,74,1.712,75,2.525,81,1.176,82,1.563,83,0.427,85,0.303,96,2.492,98,1.295,99,2.094,102,1.197,107,2.83,110,0.992,114,0.325,159,0.834,160,1.176,162,0.834,168,0.793,170,0.398,213,0.748,217,0.834,223,0.992,234,2.815,242,2.589,247,2.275,269,0.622,278,0.748,294,2.04,308,2.589,314,0.834,316,4.745,318,1.444,319,1.176,336,0.95,344,2.094,347,0.834,356,1.444,358,1.555,364,1.444,366,3.977,373,0.95,379,2.195,381,0.834,389,0.95,391,2.525,394,1.555,396,0.834,400,1.295,416,0.95,421,1.643,422,1.643,423,1.643,426,1.643,452,0.95,465,2.172,468,1.643,469,0.95,472,0.834,501,1.295,511,2.815,513,0.834,514,3.194,521,0.95,526,0.95,545,0.748,546,0.834,552,3.437,553,2.589,589,0.95,593,0.95,599,0.95,604,0.95,614,0.95,615,0.95,616,0.95,635,3.465,636,3.465,637,1.125,638,1.946,639,3.066,640,3.066,641,1.946,642,1.946,643,1.946,644,1.946,645,1.946,646,1.946,647,1.946,648,1.946,649,1.946,650,5.551,651,1.125,652,1.125,653,1.125,654,1.946,655,1.946,656,1.125,657,1.125,658,3.066,659,1.946,660,2.573,661,2.573,662,1.125,663,1.125,664,1.125,665,1.946,666,1.946,667,1.125,668,1.125,669,1.125,670,1.125,671,1.125,672,1.125,673,2.573,674,1.125,675,1.125,676,1.125,677,1.946,678,1.125,679,1.125,680,2.573,681,1.125,682,1.125,683,1.125,684,1.125,685,1.125,686,1.125,687,1.125,688,2.573,689,1.946,690,1.125,691,1.125,692,1.125,693,1.125,694,1.125,695,1.125,696,1.125,697,1.125]],["t/4175",[6,0.581,7,0.581,29,3.39,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,698,5.095]],["t/4177",[0,0.591,7,0.653,11,1.034,12,1.025,15,1.02,28,0.881,29,2.903,39,0.903,41,1.099,42,0.843,43,0.966,50,0.787,52,0.734,53,0.357,54,0.684,62,0.734,64,1.187,69,1.26,85,0.843,87,0.903,102,1.025,103,1.348,105,0.903,106,1.034,111,1.034,112,1.443,113,1.443,114,1.26,115,1.657,116,1.348,117,1.781,118,1.546,119,1.273,120,1.777,121,1.034,172,2.058,174,2.058,181,1.187,182,1.777,183,1.546,186,1.369,187,1.474,188,1.546,201,1.889,203,1.889,259,2.319,261,2.319,699,3.126,700,3.126,701,3.126,702,3.126,703,3.126,704,3.126,705,3.126,706,3.126]],["t/4179",[6,0.581,7,0.581,30,3.079,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,707,5.095]],["t/4181",[0,0.565,6,0.341,7,0.642,11,0.988,12,0.992,15,1.023,28,0.859,30,2.963,39,0.862,41,1.064,42,0.805,43,0.923,52,0.701,53,0.341,54,0.653,64,1.604,65,1.653,69,1.22,85,0.805,87,0.862,92,1.987,102,0.992,103,1.306,105,0.862,106,0.988,111,0.988,112,1.398,113,1.398,114,1.22,115,1.604,116,1.306,117,1.497,118,1.497,119,1.216,120,1.721,121,0.988,172,1.409,173,1.987,175,1.987,181,1.134,182,1.721,183,1.497,186,1.85,188,1.497,201,1.805,203,1.805,205,1.987,260,2.522,271,1.987,278,1.987,364,2.216,708,2.986,709,2.986,710,2.986,711,2.986,712,2.986,713,2.986,714,2.986,715,2.986,716,2.986,717,2.986,718,2.986,719,2.986]],["t/4183",[6,0.581,7,0.581,31,3.39,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,720,5.095]],["t/4185",[0,0.579,7,0.648,11,1.013,12,1.01,15,1.021,28,0.753,31,2.861,39,0.884,41,1.251,42,0.825,43,0.946,50,0.771,52,0.719,53,0.349,54,0.67,62,0.719,64,1.632,69,1.241,85,0.825,87,0.884,102,1.01,103,1.329,105,0.884,106,1.013,111,1.013,112,1.422,113,1.422,114,1.241,115,1.632,116,1.329,117,1.91,118,1.523,119,1.247,120,1.751,121,1.013,172,2.344,174,1.444,177,1.85,179,1.85,181,1.162,182,1.247,183,1.084,186,1.883,187,1.444,188,1.523,226,1.85,721,3.061,722,3.061,723,3.061,724,3.061,725,3.631,726,3.061,727,3.061,728,3.061,729,3.061,730,3.061,731,3.061]],["t/4187",[6,0.581,7,0.581,32,3.39,53,0.581,62,1.197,130,2.075,166,2.231,167,1.934,168,2.075,169,2.231,170,1.805,732,5.095]],["t/4189",[0,0.572,7,0.645,11,1,12,1.001,15,1.029,28,0.747,32,2.836,39,0.873,41,1.243,42,0.815,43,0.934,50,0.761,52,0.71,53,0.345,54,0.661,62,0.71,64,1.618,69,1.231,85,0.815,87,0.873,102,1.001,103,1.317,105,0.873,106,1,111,1,112,1.41,113,1.41,114,1.231,115,1.618,116,1.317,117,1.899,118,1.51,119,1.231,120,1.736,121,1,172,1.426,174,1.426,177,1.827,179,1.827,181,1.148,182,1.231,183,1.071,186,1.866,187,1.426,188,1.51,226,1.827,725,3.599,733,3.023,734,3.023,735,3.023,736,3.023,737,3.023,738,3.023,739,3.023,740,3.023,741,3.023,742,3.023]]],"invertedIndex":[["",{"_index":15,"t":{"4113":{"position":[[155,1],[194,1]]},"4117":{"position":[[20,1],[58,2],[119,2],[156,2],[198,2],[207,2],[296,1],[310,1],[312,2],[366,2],[435,2],[467,2],[516,2],[583,2],[635,2],[716,2],[744,2],[832,2],[860,2],[966,2],[996,2],[1078,5],[1084,2],[1124,2],[1239,1],[1256,1],[1258,1],[1265,1],[1267,3],[1271,2],[1274,2],[1352,2],[1394,2],[1397,2],[1459,2],[1558,1],[1622,2],[1625,2],[1628,2],[1702,1],[1766,2],[1785,2],[1819,1]]},"4121":{"position":[[205,1],[307,1],[321,1],[330,2],[386,2],[428,2],[431,2],[444,2],[456,1],[540,1],[645,1],[659,1],[668,2],[737,2],[779,2],[782,2],[795,2],[807,1],[896,1],[1001,1],[1015,1],[1024,2],[1096,2],[1138,2],[1141,2],[1162,2],[1174,1],[1260,1],[1333,2],[1393,1],[1407,1],[1416,2],[1464,2],[1506,2],[1509,2],[1557,1]]},"4127":{"position":[[18,1],[52,1],[68,1],[102,1],[205,1],[276,1],[351,1],[365,1],[367,2],[397,2],[427,2],[457,2],[502,2],[512,2],[563,2],[599,2],[641,2],[682,1],[684,2],[762,2],[765,2],[812,1],[814,2],[912,2],[931,2],[965,1]]},"4131":{"position":[[271,1],[348,1],[362,1],[364,2],[394,2],[428,2],[458,2],[503,2],[513,2],[566,2],[602,2],[644,2],[685,1],[687,2],[765,2],[768,2],[815,1],[817,2],[915,2],[934,2],[968,1]]},"4135":{"position":[[21,2],[57,2],[81,2],[117,2],[353,1],[431,1],[445,1],[447,2],[477,2],[513,2],[543,2],[588,2],[598,2],[652,2],[688,2],[730,2],[771,1],[773,2],[851,2],[854,2],[901,1],[903,2],[1001,2],[1020,2],[1054,1]]},"4137":{"position":[[15,2],[87,2],[97,2],[100,2],[481,1],[578,1],[635,1],[637,2],[667,2],[742,2],[778,2],[820,2],[861,1],[863,2],[946,2],[949,2],[983,1]]},"4139":{"position":[[0,2],[63,1],[76,2],[98,1],[139,4],[148,1],[157,2],[160,1],[162,2],[192,2],[228,2],[285,2],[321,2],[462,2],[562,2],[578,2]]},"4143":{"position":[[18,3],[40,2],[62,3],[84,2],[311,1],[393,1],[407,1],[409,2],[439,2],[476,2],[506,2],[551,2],[561,2],[612,2],[648,2],[690,2],[731,1],[733,2],[811,2],[814,2],[861,1],[863,2],[961,2],[980,2],[1014,1]]},"4147":{"position":[[48,3],[101,3],[332,1],[408,1],[422,1],[424,2],[454,2],[486,2],[516,2],[561,2],[571,2],[623,2],[659,2],[701,2],[742,1],[744,2],[822,2],[825,2],[872,1],[874,2],[972,2],[991,2],[1025,1]]},"4149":{"position":[[20,1],[112,1],[166,1],[175,2],[224,2],[260,2],[302,2],[343,1],[345,2],[458,2],[461,2],[495,1],[604,3],[663,3]]},"4151":{"position":[[20,1],[128,1],[182,1],[191,2],[256,2],[322,1],[348,2],[351,1],[353,2],[389,2],[469,1],[471,2],[562,2],[565,2],[599,1]]},"4157":{"position":[[470,2]]},"4161":{"position":[[207,1],[213,1],[289,1],[449,1],[856,2],[878,1],[900,1],[909,2],[927,2],[956,1],[980,2],[1002,1],[1227,2],[1309,1],[1498,1],[1597,1],[1626,2],[1799,2],[1829,1],[1831,1],[1844,3],[1861,2],[1934,2],[1958,2],[1961,2]]},"4163":{"position":[[18,4],[204,2],[207,1],[209,3],[310,2],[324,3],[407,2],[434,2],[560,2],[563,3],[740,2],[743,3],[831,1],[888,2]]},"4165":{"position":[[558,2],[892,2],[913,2],[1327,1],[1351,1],[1374,1],[1401,1],[1856,5]]},"4167":{"position":[[577,1],[605,1],[619,1],[625,2],[734,1],[1022,1],[1072,1],[1085,1],[1108,1],[1116,1],[1725,2],[1767,2],[1774,2]]},"4169":{"position":[[240,2],[262,3],[296,2],[334,2],[372,1],[409,2],[447,1],[484,2],[591,2],[679,2],[693,2]]},"4171":{"position":[[674,2],[759,2],[1465,1],[1641,1],[1872,2],[1891,1],[1922,1],[1985,1],[2016,1],[2047,1],[2069,2],[2076,1],[2089,1],[2155,1],[2210,1],[2259,1],[2310,1],[2726,2],[2738,1],[2755,1]]},"4173":{"position":[[198,1],[220,1],[271,1],[284,2],[299,1],[313,1],[320,1],[335,1],[337,1],[1076,2],[1108,1],[1120,1],[1139,1],[1193,1],[1195,2],[1232,2],[1301,2],[1379,1],[1392,2],[1407,1],[1421,1],[1436,2],[1439,2],[1442,1],[1444,2],[1492,2],[2159,1],[2455,2],[2524,1],[2633,1],[2646,2],[2651,2],[2662,2],[2677,1],[2691,1],[2706,2],[3006,2],[3044,2],[3672,1],[3770,1],[3785,2],[4068,1],[4405,1],[4456,2],[4509,1],[4514,2],[4532,2],[4615,1],[4628,2],[4633,2],[4644,2],[4659,1],[4673,1],[4688,2],[4716,2],[4723,1],[4784,1],[4786,1]]},"4177":{"position":[[278,2],[289,2],[328,1],[403,1],[417,1],[419,2],[449,2],[479,2],[509,2],[554,2],[564,2],[614,2],[650,2],[692,2],[733,1],[735,2],[813,2],[816,2],[863,1],[865,2],[963,2],[982,2],[1016,1]]},"4181":{"position":[[23,3],[49,2],[71,3],[97,2],[341,1],[421,1],[435,1],[437,2],[467,2],[507,2],[537,2],[624,2],[706,2],[716,2],[789,2],[825,2],[867,2],[908,1],[910,2],[988,2],[991,2],[1038,1],[1040,2],[1138,2],[1157,2],[1191,1]]},"4185":{"position":[[256,1],[288,1],[363,2],[377,2],[396,1],[410,1],[412,2],[442,2],[472,2],[502,2],[547,2],[557,2],[607,2],[643,2],[685,2],[726,1],[728,2],[806,2],[809,2],[856,1],[858,2],[956,2],[975,2],[1009,1]]},"4189":{"position":[[19,2],[56,1],[64,2],[130,1],[171,1],[275,1],[307,1],[383,2],[397,2],[416,1],[430,1],[432,2],[462,2],[494,2],[524,2],[569,2],[579,2],[631,2],[667,2],[709,2],[750,1],[752,2],[830,2],[833,2],[880,1],[882,2],[980,2],[999,2],[1033,1]]}}}],["0",{"_index":471,"t":{"4165":{"position":[[216,2]]}}}],["1",{"_index":242,"t":{"4139":{"position":[[145,2]]},"4173":{"position":[[1261,2],[2649,1],[4469,2],[4631,1]]}}}],["1.17",{"_index":35,"t":{"4115":{"position":[[11,4]]}}}],["11",{"_index":540,"t":{"4167":{"position":[[724,3]]}}}],["12",{"_index":403,"t":{"4161":{"position":[[923,3],[1025,3]]}}}],["2",{"_index":526,"t":{"4167":{"position":[[371,3],[471,1],[540,1]]},"4173":{"position":[[3533,1]]}}}],["20",{"_index":158,"t":{"4123":{"position":[[87,2]]}}}],["23",{"_index":461,"t":{"4163":{"position":[[938,3],[966,2]]}}}],["3",{"_index":530,"t":{"4167":{"position":[[473,1]]}}}],["3rd",{"_index":543,"t":{"4167":{"position":[[793,3]]}}}],["4",{"_index":531,"t":{"4167":{"position":[[475,3]]}}}],["6",{"_index":429,"t":{"4161":{"position":[[1810,3],[1856,4]]}}}],["8\">worldworld!{{.name}}${{.price}}.new(dir",{"_index":57,"t":{"4117":{"position":[[398,17]]}}}],["ensur",{"_index":685,"t":{"4173":{"position":[[3876,7]]}}}],["entir",{"_index":670,"t":{"4173":{"position":[[2228,6]]}}}],["eq",{"_index":570,"t":{"4169":{"position":[[266,2],[508,2],[594,2]]}}}],["equiv=\"cont",{"_index":432,"t":{"4161":{"position":[[1875,14]]}}}],["equival",{"_index":527,"t":{"4167":{"position":[[381,10],[482,10],[1563,10]]}}}],["err",{"_index":344,"t":{"4157":{"position":[[466,3]]},"4161":{"position":[[1494,3]]},"4163":{"position":[[884,3]]},"4171":{"position":[[1991,3],[2012,3],[2065,3]]},"4173":{"position":[[1488,3],[2520,3],[3668,3],[4528,3],[4712,3]]}}}],["err.error",{"_index":696,"t":{"4173":{"position":[[4739,12]]}}}],["error",{"_index":114,"t":{"4117":{"position":[[1552,5],[1696,5]]},"4127":{"position":[[676,5],[806,5]]},"4131":{"position":[[679,5],[809,5]]},"4135":{"position":[[765,5],[895,5]]},"4137":{"position":[[855,5]]},"4143":{"position":[[725,5],[855,5]]},"4147":{"position":[[736,5],[866,5]]},"4149":{"position":[[337,5]]},"4151":{"position":[[463,5]]},"4171":{"position":[[1995,5]]},"4173":{"position":[[2448,6]]},"4177":{"position":[[727,5],[857,5]]},"4181":{"position":[[902,5],[1032,5]]},"4185":{"position":[[720,5],[850,5]]},"4189":{"position":[[744,5],[874,5]]}}}],["etc",{"_index":49,"t":{"4117":{"position":[[201,5]]}}}],["evalu",{"_index":484,"t":{"4165":{"position":[[582,8]]},"4167":{"position":[[1615,9]]}}}],["exampl",{"_index":50,"t":{"4117":{"position":[[218,7],[523,8],[1650,7]]},"4119":{"position":[[22,9]]},"4127":{"position":[[493,8]]},"4131":{"position":[[494,8]]},"4135":{"position":[[579,8]]},"4143":{"position":[[542,8]]},"4147":{"position":[[552,8]]},"4153":{"position":[[319,8]]},"4161":{"position":[[195,7]]},"4163":{"position":[[950,7]]},"4165":{"position":[[1935,8]]},"4167":{"position":[[746,7]]},"4171":{"position":[[123,8],[1043,8],[1851,7],[2397,7]]},"4173":{"position":[[1198,7],[3512,7]]},"4177":{"position":[[545,8]]},"4185":{"position":[[538,8]]},"4189":{"position":[[560,8]]}}}],["exclud",{"_index":164,"t":{"4123":{"position":[[159,8]]}}}],["execut",{"_index":319,"t":{"4155":{"position":[[31,9]]},"4157":{"position":[[569,8]]},"4159":{"position":[[0,7],[84,7],[127,8],[307,9],[396,7],[467,8]]},"4171":{"position":[[1584,8],[1770,8],[2360,8]]},"4173":{"position":[[1447,9],[2969,8]]}}}],["execute(w",{"_index":694,"t":{"4173":{"position":[[4691,13]]}}}],["exist",{"_index":281,"t":{"4145":{"position":[[327,6]]},"4165":{"position":[[156,5],[384,6]]}}}],["expand",{"_index":392,"t":{"4161":{"position":[[738,8]]}}}],["explor",{"_index":414,"t":{"4161":{"position":[[1217,9],[1282,8]]}}}],["express",{"_index":579,"t":{"4169":{"position":[[656,11]]}}}],["ext",{"_index":58,"t":{"4117":{"position":[[416,3]]}}}],["extend",{"_index":152,"t":{"4123":{"position":[[8,9],[177,8]]},"4137":{"position":[[90,6]]}}}],["extens",{"_index":56,"t":{"4117":{"position":[[382,9]]},"4157":{"position":[[43,9],[172,9],[349,9]]}}}],["fail",{"_index":214,"t":{"4137":{"position":[[111,5]]}}}],["fals",{"_index":75,"t":{"4117":{"position":[[738,5],[854,5]]},"4165":{"position":[[209,6]]},"4167":{"position":[[1398,5]]},"4173":{"position":[[329,5],[1430,5],[2700,5],[3779,5],[3989,5],[4682,5]]}}}],["favnum",{"_index":534,"t":{"4167":{"position":[[531,8],[591,7],[823,7]]}}}],["favourit",{"_index":544,"t":{"4167":{"position":[[797,9]]}}}],["featur",{"_index":316,"t":{"4153":{"position":[[340,8]]},"4173":{"position":[[276,7],[287,8],[461,8],[627,7],[735,7],[1384,7],[1395,8],[1838,8],[2005,7],[2612,7],[2654,7],[2665,8],[2797,7],[3032,8],[3068,8],[3504,7],[4636,7],[4647,8],[5022,8]]}}}],["fiber",{"_index":8,"t":{"4113":{"position":[[82,5]]},"4139":{"position":[[407,8],[449,5],[721,5]]}}}],["fiber'",{"_index":104,"t":{"4117":{"position":[[1327,7]]}}}],["fiber.ctx",{"_index":113,"t":{"4117":{"position":[[1540,11],[1684,11]]},"4127":{"position":[[664,11],[794,11]]},"4131":{"position":[[667,11],[797,11]]},"4135":{"position":[[753,11],[883,11]]},"4137":{"position":[[843,11]]},"4143":{"position":[[713,11],[843,11]]},"4147":{"position":[[724,11],[854,11]]},"4149":{"position":[[325,11]]},"4151":{"position":[[451,11]]},"4177":{"position":[[715,11],[845,11]]},"4181":{"position":[[890,11],[1020,11]]},"4185":{"position":[[708,11],[838,11]]},"4189":{"position":[[732,11],[862,11]]}}}],["fiber.map",{"_index":116,"t":{"4117":{"position":[[1585,10],[1729,10]]},"4127":{"position":[[725,10],[875,10]]},"4131":{"position":[[728,10],[878,10]]},"4135":{"position":[[814,10],[964,10]]},"4137":{"position":[[914,10]]},"4139":{"position":[[396,10]]},"4143":{"position":[[774,10],[924,10]]},"4147":{"position":[[785,10],[935,10]]},"4149":{"position":[[421,10]]},"4151":{"position":[[518,10]]},"4177":{"position":[[776,10],[926,10]]},"4181":{"position":[[951,10],[1101,10]]},"4185":{"position":[[769,10],[919,10]]},"4189":{"position":[[793,10],[943,10]]}}}],["fiber.new(fiber.config",{"_index":106,"t":{"4117":{"position":[[1355,23]]},"4121":{"position":[[389,23],[740,23],[1099,23],[1467,23]]},"4127":{"position":[[602,23]]},"4131":{"position":[[605,23]]},"4135":{"position":[[691,23]]},"4137":{"position":[[781,23]]},"4143":{"position":[[651,23]]},"4147":{"position":[[662,23]]},"4149":{"position":[[263,23]]},"4177":{"position":[[653,23]]},"4181":{"position":[[828,23]]},"4185":{"position":[[646,23]]},"4189":{"position":[[670,23]]}}}],["fiber.new(fiber.config{view",{"_index":246,"t":{"4139":{"position":[[324,29]]},"4151":{"position":[[392,29]]}}}],["field",{"_index":444,"t":{"4163":{"position":[[253,6],[299,5]]}}}],["fieldnam",{"_index":445,"t":{"4163":{"position":[[313,10]]}}}],["file",{"_index":65,"t":{"4117":{"position":[[570,5]]},"4123":{"position":[[140,5]]},"4137":{"position":[[402,6]]},"4157":{"position":[[38,4]]},"4171":{"position":[[1302,4],[1389,6],[1867,4],[2273,5],[2436,4]]},"4181":{"position":[[610,5]]}}}],["fileb0x",{"_index":146,"t":{"4121":{"position":[[1176,8],[1549,7]]}}}],["filenam",{"_index":346,"t":{"4157":{"position":[[523,8],[675,9]]},"4171":{"position":[[1100,9]]}}}],["filesystem'",{"_index":716,"t":{"4181":{"position":[[653,12]]}}}],["final",{"_index":334,"t":{"4157":{"position":[[255,7]]},"4171":{"position":[[1783,7]]}}}],["find",{"_index":338,"t":{"4157":{"position":[[294,5],[744,4]]}}}],["first",{"_index":546,"t":{"4167":{"position":[[931,5],[1541,5]]},"4169":{"position":[[584,6]]},"4173":{"position":[[3544,5]]}}}],["fit",{"_index":652,"t":{"4173":{"position":[[919,3]]}}}],["float",{"_index":438,"t":{"4163":{"position":[[89,8]]}}}],["float32",{"_index":565,"t":{"4169":{"position":[[185,7]]}}}],["flosch",{"_index":196,"t":{"4133":{"position":[[38,7]]}}}],["fluid",{"_index":627,"t":{"4171":{"position":[[2664,7]]}}}],["folder",{"_index":55,"t":{"4117":{"position":[[359,6]]},"4119":{"position":[[60,6]]}}}],["follow",{"_index":223,"t":{"4137":{"position":[[392,9]]},"4153":{"position":[[309,9]]},"4165":{"position":[[1541,10]]},"4167":{"position":[[1037,9],[1177,9]]},"4169":{"position":[[638,9]]},"4171":{"position":[[270,8]]},"4173":{"position":[[163,9],[2997,8]]}}}],["footer",{"_index":179,"t":{"4127":{"position":[[173,6]]},"4131":{"position":[[167,6]]},"4171":{"position":[[102,6],[288,10],[299,8],[334,9],[369,8],[445,6],[505,10]]},"4185":{"position":[[156,6]]},"4189":{"position":[[173,6]]}}}],["footer//stat",{"_index":149,"t":{"4121":{"position":[[1359,33]]}}}],["github.com/geertjohan/go.ric",{"_index":143,"t":{"4121":{"position":[[969,31]]}}}],["github.com/gobuffalo/packr/v2",{"_index":139,"t":{"4121":{"position":[[613,31]]}}}],["github.com/gofiber/emb",{"_index":187,"t":{"4127":{"position":[[464,24]]},"4131":{"position":[[465,24]]},"4135":{"position":[[550,24]]},"4143":{"position":[[513,24]]},"4147":{"position":[[523,24]]},"4177":{"position":[[516,24]]},"4185":{"position":[[509,24]]},"4189":{"position":[[531,24]]}}}],["github.com/gofiber/fiber/v2",{"_index":39,"t":{"4115":{"position":[[49,27]]},"4117":{"position":[[28,29]]},"4121":{"position":[[213,29],[548,29],[904,29],[1268,29]]},"4127":{"position":[[284,29]]},"4131":{"position":[[279,29]]},"4135":{"position":[[361,29]]},"4137":{"position":[[508,29]]},"4143":{"position":[[319,29]]},"4147":{"position":[[340,29]]},"4149":{"position":[[47,29]]},"4151":{"position":[[63,29]]},"4177":{"position":[[336,29]]},"4181":{"position":[[349,29]]},"4185":{"position":[[296,29]]},"4189":{"position":[[315,29]]}}}],["github.com/gofiber/template/ace/v2",{"_index":184,"t":{"4127":{"position":[[314,36]]}}}],["github.com/gofiber/template/amber/v2",{"_index":194,"t":{"4131":{"position":[[309,38]]}}}],["github.com/gofiber/template/any_template_engine/vx",{"_index":40,"t":{"4115":{"position":[[87,50]]}}}],["github.com/gofiber/template/django/v3",{"_index":206,"t":{"4135":{"position":[[391,39]]},"4137":{"position":[[538,39]]}}}],["github.com/gofiber/template/handlebars/v2",{"_index":265,"t":{"4143":{"position":[[349,43]]}}}],["github.com/gofiber/template/html",{"_index":132,"t":{"4121":{"position":[[243,34],[578,34],[934,34],[1298,34]]},"4149":{"position":[[77,34]]},"4151":{"position":[[93,34]]}}}],["github.com/gofiber/template/html/v2",{"_index":51,"t":{"4117":{"position":[[258,37]]},"4147":{"position":[[370,37]]}}}],["github.com/gofiber/template/jet/v2",{"_index":704,"t":{"4177":{"position":[[366,36]]}}}],["github.com/gofiber/template/mustach",{"_index":48,"t":{"4117":{"position":[[159,38]]}}}],["github.com/gofiber/template/mustache/v2",{"_index":712,"t":{"4181":{"position":[[379,41]]}}}],["github.com/gofiber/template/pug",{"_index":47,"t":{"4117":{"position":[[122,33]]}}}],["github.com/gofiber/template/pug/v2",{"_index":729,"t":{"4185":{"position":[[326,36]]}}}],["github.com/gofiber/template/slim/v2",{"_index":740,"t":{"4189":{"position":[[345,37]]}}}],["github.com/markbates/pkg",{"_index":133,"t":{"4121":{"position":[[278,28]]}}}],["glob",{"_index":594,"t":{"4171":{"position":[[1070,4]]}}}],["global",{"_index":98,"t":{"4117":{"position":[[1169,6]]},"4161":{"position":[[1350,10]]},"4167":{"position":[[51,6]]},"4173":{"position":[[2181,6],[3144,11]]}}}],["go",{"_index":33,"t":{"4115":{"position":[[0,2],[39,2],[77,2]]},"4121":{"position":[[447,2],[798,2],[1159,2],[1165,2]]},"4145":{"position":[[21,2]]},"4153":{"position":[[4,2]]},"4157":{"position":[[57,2],[121,2],[281,2]]},"4161":{"position":[[350,2],[539,2],[666,2],[859,2]]},"4163":{"position":[[139,2]]},"4165":{"position":[[20,2],[1198,2],[1295,2]]},"4167":{"position":[[1047,2]]},"4173":{"position":[[1543,2],[1726,2]]}}}],["go.ric",{"_index":141,"t":{"4121":{"position":[[809,8]]}}}],["go:emb",{"_index":208,"t":{"4137":{"position":[[18,8],[580,10]]},"4149":{"position":[[114,10]]},"4151":{"position":[[130,10]]}}}],["godoc",{"_index":328,"t":{"4157":{"position":[[160,7]]}}}],["gohtml",{"_index":329,"t":{"4157":{"position":[[182,7]]},"4171":{"position":[[2049,12],[2265,7]]}}}],["good",{"_index":70,"t":{"4117":{"position":[[675,4],[794,4]]},"4157":{"position":[[388,4]]}}}],["gosublim",{"_index":332,"t":{"4157":{"position":[[236,9]]}}}],["go’",{"_index":368,"t":{"4161":{"position":[[21,4]]}}}],["greet",{"_index":233,"t":{"4137":{"position":[[925,11]]},"4139":{"position":[[704,11]]}}}],["gt",{"_index":574,"t":{"4169":{"position":[[417,2]]}}}],["h1",{"_index":174,"t":{"4127":{"position":[[54,2],[132,2],[170,2]]},"4131":{"position":[[51,2],[124,2],[164,2]]},"4135":{"position":[[60,6],[73,7]]},"4163":{"position":[[747,4],[794,5]]},"4167":{"position":[[542,7]]},"4177":{"position":[[48,6],[61,7]]},"4185":{"position":[[46,2]]},"4189":{"position":[[53,2]]}}}],["h1>a",{"_index":375,"t":{"4161":{"position":[[218,6],[426,5]]}}}],["h1>filler",{"_index":628,"t":{"4171":{"position":[[2672,10]]}}}],["h1>hello",{"_index":478,"t":{"4165":{"position":[[308,10],[858,10]]}}}],["h1>{{.title}}{{.}}{{index",{"_index":533,"t":{"4167":{"position":[[519,11]]}}}],["h1>{{title}}footerheaderfeatur",{"_index":640,"t":{"4173":{"position":[[497,11],[595,11],[1875,11],[1973,11]]}}}],["handl",{"_index":489,"t":{"4165":{"position":[[760,6]]}}}],["handlebar",{"_index":27,"t":{"4113":{"position":[[267,10]]},"4119":{"position":[[98,10]]},"4141":{"position":[[0,10]]}}}],["handlebars.new(\"./view",{"_index":266,"t":{"4143":{"position":[[442,25]]}}}],["handler",{"_index":247,"t":{"4139":{"position":[[370,7]]},"4171":{"position":[[2112,8],[2379,7]]},"4173":{"position":[[4200,7],[4262,7],[4796,7],[5134,7]]}}}],["handler(w",{"_index":614,"t":{"4171":{"position":[[2162,9]]},"4173":{"position":[[4357,9]]}}}],["haspermiss",{"_index":650,"t":{"4173":{"position":[[713,13],[821,13],[945,13],[1161,13],[1315,13],[1338,14],[2492,13],[2579,16],[2829,15],[3012,13],[3099,13],[3585,13],[3727,16],[3896,13],[4115,13],[4572,16],[4904,13],[5008,13]]}}}],["haspermission(featur",{"_index":637,"t":{"4173":{"position":[[236,21]]}}}],["have",{"_index":689,"t":{"4173":{"position":[[4220,6],[5070,6]]}}}],["hb",{"_index":267,"t":{"4143":{"position":[[468,7],[603,8]]}}}],["head",{"_index":182,"t":{"4127":{"position":[[225,4]]},"4131":{"position":[[219,4]]},"4135":{"position":[[265,6],[292,7]]},"4143":{"position":[[223,6],[250,7]]},"4147":{"position":[[244,6],[271,7]]},"4171":{"position":[[2497,6],[2627,7]]},"4177":{"position":[[235,6],[263,7]]},"4181":{"position":[[251,6],[278,7]]},"4185":{"position":[[206,4]]},"4189":{"position":[[224,4]]}}}],["head>filler",{"_index":629,"t":{"4171":{"position":[[2695,9]]}}}],["p>hello",{"_index":304,"t":{"4151":{"position":[[713,9]]}}}],["p>here",{"_index":587,"t":{"4171":{"position":[[308,7]]}}}],["p>some",{"_index":642,"t":{"4173":{"position":[[516,7],[1894,7]]}}}],["p>to",{"_index":646,"t":{"4173":{"position":[[614,5],[1992,5]]}}}],["packag",{"_index":0,"t":{"4113":{"position":[[5,7]]},"4117":{"position":[[0,7]]},"4121":{"position":[[185,7],[520,7],[876,7],[1240,7],[1351,7]]},"4127":{"position":[[256,7]]},"4131":{"position":[[251,7]]},"4135":{"position":[[333,7]]},"4137":{"position":[[461,7]]},"4143":{"position":[[291,7]]},"4147":{"position":[[312,7]]},"4149":{"position":[[0,7]]},"4151":{"position":[[0,7]]},"4153":{"position":[[42,8],[89,7],[170,7],[269,8]]},"4161":{"position":[[40,7],[556,7],[1079,7]]},"4167":{"position":[[13,7]]},"4169":{"position":[[31,7]]},"4171":{"position":[[1893,7]]},"4173":{"position":[[1743,8]]},"4177":{"position":[[308,7]]},"4181":{"position":[[321,7]]},"4185":{"position":[[268,7]]},"4189":{"position":[[287,7]]}}}],["packr",{"_index":137,"t":{"4121":{"position":[[458,6],[789,5]]}}}],["panic(err",{"_index":611,"t":{"4171":{"position":[[2078,10]]}}}],["paragrapha",{"_index":382,"t":{"4161":{"position":[[373,20]]}}}],["template.html(html",{"_index":425,"t":{"4161":{"position":[[1606,19]]}}}],["template.must(template.parsefiles(\"templatenam",{"_index":458,"t":{"4163":{"position":[[833,50]]}}}],["template.must(template.parseglob(\"*.gohtml",{"_index":536,"t":{"4167":{"position":[[628,45]]}}}],["template.new(\"hello.gohtml\").funcs(template.funcmap",{"_index":423,"t":{"4161":{"position":[[1500,52]]},"4173":{"position":[[2526,52],[3674,52]]}}}],["template.parse(filenam",{"_index":345,"t":{"4157":{"position":[[473,24]]}}}],["template.parsefiles(fil",{"_index":596,"t":{"4171":{"position":[[1240,29]]}}}],["template.parsefiles(filenam",{"_index":349,"t":{"4157":{"position":[[628,30]]}}}],["template.parseglob(layoutdir",{"_index":610,"t":{"4171":{"position":[[2018,28]]}}}],["template.parseglob(pattern",{"_index":352,"t":{"4157":{"position":[[711,27]]},"4171":{"position":[[1140,26]]}}}],["template.templ",{"_index":457,"t":{"4163":{"position":[[808,18]]},"4171":{"position":[[1954,18]]}}}],["templatenam",{"_index":460,"t":{"4163":{"position":[[922,15]]},"4171":{"position":[[1499,16],[1620,15]]}}}],["templatesgo",{"_index":621,"t":{"4171":{"position":[[2504,9]]}}}],["title>maintitleSlim | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Slim is a template engine created by mattn, to see the original syntax documentation please click here

Basic Example

./views/index.slim

== render("partials/header.slim")

h1 = Title

== render("partials/footer.slim")

./views/partials/header.slim

h2 = Header

./views/partials/footer.slim

h2 = Footer

./views/layouts/main.slim

doctype html
html
head
title Main
include ../partials/meta.slim
body
| {{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/slim/v2"

// "net/http" // embedded system
)

func main() {
// Create a new engine
engine := slim.New("./views", ".slim")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := slim.NewFileSystem(http.Dir("./views", ".slim"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Slim is a template engine created by mattn, to see the original syntax documentation please click here

Basic Example

./views/index.slim

== render("partials/header.slim")

h1 = Title

== render("partials/footer.slim")

./views/partials/header.slim

h2 = Header

./views/partials/footer.slim

h2 = Footer

./views/layouts/main.slim

doctype html
html
head
title Main
include ../partials/meta.slim
body
| {{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/slim/v2"

// "net/http" // embedded system
)

func main() {
// Create a new engine
engine := slim.New("./views", ".slim")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := slim.NewFileSystem(http.Dir("./views", ".slim"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/pug/index.html b/template/pug/index.html index cd300035c1a..aaed283027a 100644 --- a/template/pug/index.html +++ b/template/pug/index.html @@ -6,8 +6,8 @@ Pug | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Pug is a template engine create by joker, to see the original syntax documentation please click here

Basic Example

./views/index.pug

include partials/header.pug

h1 #{.Title}

include partials/footer.pug

./views/partials/header.pug

h2 Header

./views/partials/footer.pug

h2 Footer

./views/layouts/main.pug

doctype html
html
head
title Main
include ../partials/meta.pug
body
| {{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/pug/v2"

// "net/http" // embedded system
)

func main() {
// Create a new engine
engine := pug.New("./views", ".pug")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := pug.NewFileSystem(http.Dir("./views", ".pug"))

// Pass the engine to the views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Pug is a template engine create by joker, to see the original syntax documentation please click here

Basic Example

./views/index.pug

include partials/header.pug

h1 #{.Title}

include partials/footer.pug

./views/partials/header.pug

h2 Header

./views/partials/footer.pug

h2 Footer

./views/layouts/main.pug

doctype html
html
head
title Main
include ../partials/meta.pug
body
| {{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/pug/v2"

// "net/http" // embedded system
)

func main() {
// Create a new engine
engine := pug.New("./views", ".pug")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := pug.NewFileSystem(http.Dir("./views", ".pug"))

// Pass the engine to the views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/template/slim/index.html b/template/slim/index.html index 71f30ae92e0..c532155f790 100644 --- a/template/slim/index.html +++ b/template/slim/index.html @@ -6,8 +6,8 @@ Slim | Fiber - - + +
@@ -15,8 +15,8 @@ Discord Test Security -Linter

Slim is a template engine created by mattn, to see the original syntax documentation please click here

Basic Example

./views/index.slim

== render("partials/header.slim")

h1 = Title

== render("partials/footer.slim")

./views/partials/header.slim

h2 = Header

./views/partials/footer.slim

h2 = Footer

./views/layouts/main.slim

doctype html
html
head
title Main
include ../partials/meta.slim
body
| {{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/slim/v2"

// "net/http" // embedded system
)

func main() {
// Create a new engine
engine := slim.New("./views", ".slim")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := slim.NewFileSystem(http.Dir("./views", ".slim"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

- - +Linter

Slim is a template engine created by mattn, to see the original syntax documentation please click here

Basic Example

./views/index.slim

== render("partials/header.slim")

h1 = Title

== render("partials/footer.slim")

./views/partials/header.slim

h2 = Header

./views/partials/footer.slim

h2 = Footer

./views/layouts/main.slim

doctype html
html
head
title Main
include ../partials/meta.slim
body
| {{embed}}
package main

import (
"log"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/slim/v2"

// "net/http" // embedded system
)

func main() {
// Create a new engine
engine := slim.New("./views", ".slim")

// Or from an embedded system
// See github.com/gofiber/embed for examples
// engine := slim.NewFileSystem(http.Dir("./views", ".slim"))

// Pass the engine to the Views
app := fiber.New(fiber.Config{
Views: engine,
})

app.Get("/", func(c *fiber.Ctx) error {
// Render index
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Get("/layout", func(c *fiber.Ctx) error {
// Render index within layouts/main
return c.Render("index", fiber.Map{
"Title": "Hello, World!",
}, "layouts/main")
})

log.Fatal(app.Listen(":3000"))
}

+ + \ No newline at end of file diff --git a/v1.x/api/app/index.html b/v1.x/api/app/index.html index f0f7a1e80c1..eb3a6279844 100644 --- a/v1.x/api/app/index.html +++ b/v1.x/api/app/index.html @@ -6,13 +6,13 @@ 🚀 App | Fiber - - + +
-
Version: v1.x

🚀 App

New

This method creates a new App named instance. You can pass optional settings when creating a new instance

Signature
fiber.New(settings ...*Settings) *App
Example
package main

import "github.com/gofiber/fiber"

func main() {
app := fiber.New()

// ...

app.Listen(3000)
}

Settings

You can pass application settings when calling New.

Example
func main() {
// Pass Settings creating a new instance
app := fiber.New(&fiber.Settings{
Prefork: true,
CaseSensitive: true,
StrictRouting: true,
ServerHeader: "Fiber",
})

// ...

app.Listen(3000)
}

Or change the settings after initializing an app.

Example
func main() {
app := fiber.New()

// Or change Settings after creating an instance
app.Settings.Prefork = true
app.Settings.CaseSensitive = true
app.Settings.StrictRouting = true
app.Settings.ServerHeader = "Fiber"

// ...

app.Listen(3000)
}

Settings fields

PropertyTypeDescriptionDefault
PreforkboolEnables use of theSO_REUSEPORTsocket option. This will spawn multiple Go processes listening on the same port. learn more about socket sharding.false
ServerHeaderstringEnables the Server HTTP header with the given value.""
StrictRoutingboolWhen enabled, the router treats /foo and /foo/ as different. Otherwise, the router treats /foo and /foo/ as the same.false
CaseSensitiveboolWhen enabled, /Foo and /foo are different routes. When disabled, /Fooand /foo are treated the same.false
ImmutableboolWhen enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see the issue #185.false
UnescapePathboolConverts all encoded characters in the route back before setting the path for the context, so that the routing can also work with urlencoded special charactersfalse
BodyLimitintSets 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
CompressedFileSuffixstringAdds suffix to the original file name and tries saving the resulting compressed file under the new file name.".fiber.gz"
ConcurrencyintMaximum number of concurrent connections.256 * 1024
DisableKeepaliveboolDisable keep-alive connections, the server will close incoming connections after sending the first response to clientfalse
DisableDefaultDateboolWhen set to true causes the default date header to be excluded from the response.false
DisableDefaultContentTypeboolWhen set to true, causes the default Content-Type header to be excluded from the Response.false
DisableStartupMessageboolWhen set to true, it will not print out the fiber ASCII and "listening" on messagefalse
DisableHeaderNormalizingboolBy default all header names are normalized: conteNT-tYPE -> Content-Typefalse
ETagboolEnable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method (CRC-32). Weak ETags are the default when enabled.false
ViewsViewsViews is the interface that wraps the Render function. See our Template Middleware for supported engines.nil
ReadTimeouttime.DurationThe amount of time allowed to read the full request, including body. The default timeout is unlimited.nil
WriteTimeouttime.DurationThe maximum duration before timing out writes of the response. The default timeout is unlimited.nil
IdleTimeouttime.DurationThe 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
ReadBufferSizeintper-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies).4096
WriteBufferSizeintPer-connection buffer size for responses' writing.4096

Static

Use the Static method to serve static files such as images, CSS and JavaScript.

info

By default, Static will serve index.html files in response to a request on a directory.

Signature
app.Static(prefix, root string, config ...Static) // => with prefix

Use the following code to serve files in a directory named ./public

Example
app.Static("/", "./public")

// => http://localhost:3000/hello.html
// => http://localhost:3000/js/jquery.js
// => http://localhost:3000/css/style.css

To serve from multiple directories, you can use Static numerous times.

Example
// Serve files from "./public" directory:
app.Static("/", "./public")

// Serve files from "./files" directory:
app.Static("/", "./files")
info

Use a reverse proxy cache like NGINX to improve performance of serving static assets.

You can use any virtual path prefix (where the path does not actually exist in the file system) for files that are served by the Static method, specify a prefix path for the static directory, as shown below:

Example
app.Static("/static", "./public")

// => http://localhost:3000/static/hello.html
// => http://localhost:3000/static/js/jquery.js
// => http://localhost:3000/static/css/style.css

If you want to have a little bit more control regarding the settings for serving static files. You could use the fiber.Static struct to enable specific settings.

fiber.Static{}
// Static represents settings for serving static files
type Static struct {
// Transparently compresses responses if set to true
// This works differently than the github.com/gofiber/compression middleware
// The server tries minimizing CPU usage by caching compressed files.
// It adds ".fiber.gz" suffix to the original file name.
// Optional. Default value false
Compress bool
// Enables byte-range requests if set to true.
// Optional. Default value false
ByteRange bool
// Enable directory browsing.
// Optional. Default value false.
Browse bool
// File to serve when requesting a directory path.
// Optional. Default value "index.html".
Index string
}
Example
app.Static("/", "./public", fiber.Static{
Compress: true,
ByteRange: true,
Browse: true,
Index: "john.html"
})

HTTP Methods

Routes an HTTP request, where METHOD is the HTTP method of the request.

Signatures
// Add allows you to specifiy a method as value
app.Add(method, path string, handlers ...func(*Ctx)) Router

// All will register the route on all methods
app.All(path string, handlers ...func(*Ctx)) Router

// HTTP methods
app.Get(path string, handlers ...func(*Ctx)) Router
app.Put(path string, handlers ...func(*Ctx)) Router
app.Post(path string, handlers ...func(*Ctx)) Router
app.Head(path string, handlers ...func(*Ctx)) Router
app.Patch(path string, handlers ...func(*Ctx)) Router
app.Trace(path string, handlers ...func(*Ctx)) Router
app.Delete(path string, handlers ...func(*Ctx)) Router
app.Connect(path string, handlers ...func(*Ctx)) Router
app.Options(path string, handlers ...func(*Ctx)) Router

// Use is mostly used for middleware modules
// These routes will only match the beggining of each path
// i.e. "/john" will match "/john/doe", "/johnnnn"
app.Use(handlers ...func(*Ctx)) Router
app.Use(prefix string, handlers ...func(*Ctx)) Router
Example
app.Use("/api", func(c *fiber.Ctx) {
c.Set("X-Custom-Header", random.String(32))
c.Next()
})
app.Get("/api/list", func(c *fiber.Ctx) {
c.Send("I'm a GET request!")
})
app.Post("/api/register", func(c *fiber.Ctx) {
c.Send("I'm a POST request!")
})

Group

You can group routes by creating a *Group struct.

Signature

app.Group(prefix string, handlers ...func(*Ctx)) Router

Example

func main() {
app := fiber.New()

api := app.Group("/api", handler) // /api

v1 := api.Group("/v1", handler) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", handler) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

app.Listen(3000)
}

Stack

This method returns the original router stack

Signature
app.Stack() [][]*Route
Example
app := fiber.New()

app.Use(handler)
app.Get("/john", handler)
app.Post("/register", handler)
app.Get("/v1/users", handler)
app.Put("/user/:id", handler)
app.Head("/xhr", handler)

data, _ := json.MarshalIndent(app.Stack(), "", " ")
fmt.Println(string(data))

Listen

Binds and listens for connections on the specified address. This can be an int for port or string for address. This will listen either on tcp4 or tcp6 depending on the address input (i.e. :3000 / [::1]:3000 ).

Signature
app.Listen(address interface{}, tls ...*tls.Config) error
Examples
app.Listen(8080)
app.Listen("8080")
app.Listen(":8080")
app.Listen("127.0.0.1:8080")
app.Listen("[::1]:8080")

To enable TLS/HTTPS you can append a TLS config.

Example
cer, err := tls.LoadX509KeyPair("server.crt", "server.key")
if err != nil {
log.Fatal(err)
}
config := &tls.Config{Certificates: []tls.Certificate{cer}}

app.Listen(443, config)

Listener

You can pass your own net.Listener using the Listener method.

Signature
app.Listener(ln net.Listener, tls ...*tls.Config) error
caution

Listener does not support the Prefork feature.

Example
if ln, err = net.Listen("tcp", ":8080"); err != nil {
log.Fatal(err)
}

app.Listener(ln)

Test

Testing your application is done with the Test method. Use this method for creating _test.go files or when you need to debug your routing logic. The default timeout is 200ms if you want to disable a timeout altogether, pass -1 as a second argument.

Signature
app.Test(req *http.Request, msTimeout ...int) (*http.Response, error)
Example
// Create route with GET method for test:
app.Get("/", func(c *Ctx) {
fmt.Println(c.BaseURL()) // => http://google.com
fmt.Println(c.Get("X-Custom-Header")) // => hi

c.Send("hello, World!")
})

// http.Request
req := httptest.NewRequest("GET", "http://google.com", nil)
req.Header.Set("X-Custom-Header", "hi")

// http.Response
resp, _ := app.Test(req)

// Do something with results:
if resp.StatusCode == 200 {
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body)) // => Hello, World!
}
- - +
Version: v1.x

🚀 App

New

This method creates a new App named instance. You can pass optional settings when creating a new instance

Signature
fiber.New(settings ...*Settings) *App
Example
package main

import "github.com/gofiber/fiber"

func main() {
app := fiber.New()

// ...

app.Listen(3000)
}

Settings

You can pass application settings when calling New.

Example
func main() {
// Pass Settings creating a new instance
app := fiber.New(&fiber.Settings{
Prefork: true,
CaseSensitive: true,
StrictRouting: true,
ServerHeader: "Fiber",
})

// ...

app.Listen(3000)
}

Or change the settings after initializing an app.

Example
func main() {
app := fiber.New()

// Or change Settings after creating an instance
app.Settings.Prefork = true
app.Settings.CaseSensitive = true
app.Settings.StrictRouting = true
app.Settings.ServerHeader = "Fiber"

// ...

app.Listen(3000)
}

Settings fields

PropertyTypeDescriptionDefault
PreforkboolEnables use of theSO_REUSEPORTsocket option. This will spawn multiple Go processes listening on the same port. learn more about socket sharding.false
ServerHeaderstringEnables the Server HTTP header with the given value.""
StrictRoutingboolWhen enabled, the router treats /foo and /foo/ as different. Otherwise, the router treats /foo and /foo/ as the same.false
CaseSensitiveboolWhen enabled, /Foo and /foo are different routes. When disabled, /Fooand /foo are treated the same.false
ImmutableboolWhen enabled, all values returned by context methods are immutable. By default, they are valid until you return from the handler; see the issue #185.false
UnescapePathboolConverts all encoded characters in the route back before setting the path for the context, so that the routing can also work with urlencoded special charactersfalse
BodyLimitintSets 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
CompressedFileSuffixstringAdds suffix to the original file name and tries saving the resulting compressed file under the new file name.".fiber.gz"
ConcurrencyintMaximum number of concurrent connections.256 * 1024
DisableKeepaliveboolDisable keep-alive connections, the server will close incoming connections after sending the first response to clientfalse
DisableDefaultDateboolWhen set to true causes the default date header to be excluded from the response.false
DisableDefaultContentTypeboolWhen set to true, causes the default Content-Type header to be excluded from the Response.false
DisableStartupMessageboolWhen set to true, it will not print out the fiber ASCII and "listening" on messagefalse
DisableHeaderNormalizingboolBy default all header names are normalized: conteNT-tYPE -> Content-Typefalse
ETagboolEnable or disable ETag header generation, since both weak and strong etags are generated using the same hashing method (CRC-32). Weak ETags are the default when enabled.false
ViewsViewsViews is the interface that wraps the Render function. See our Template Middleware for supported engines.nil
ReadTimeouttime.DurationThe amount of time allowed to read the full request, including body. The default timeout is unlimited.nil
WriteTimeouttime.DurationThe maximum duration before timing out writes of the response. The default timeout is unlimited.nil
IdleTimeouttime.DurationThe 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
ReadBufferSizeintper-connection buffer size for requests' reading. This also limits the maximum header size. Increase this buffer if your clients send multi-KB RequestURIs and/or multi-KB headers (for example, BIG cookies).4096
WriteBufferSizeintPer-connection buffer size for responses' writing.4096

Static

Use the Static method to serve static files such as images, CSS and JavaScript.

info

By default, Static will serve index.html files in response to a request on a directory.

Signature
app.Static(prefix, root string, config ...Static) // => with prefix

Use the following code to serve files in a directory named ./public

Example
app.Static("/", "./public")

// => http://localhost:3000/hello.html
// => http://localhost:3000/js/jquery.js
// => http://localhost:3000/css/style.css

To serve from multiple directories, you can use Static numerous times.

Example
// Serve files from "./public" directory:
app.Static("/", "./public")

// Serve files from "./files" directory:
app.Static("/", "./files")
info

Use a reverse proxy cache like NGINX to improve performance of serving static assets.

You can use any virtual path prefix (where the path does not actually exist in the file system) for files that are served by the Static method, specify a prefix path for the static directory, as shown below:

Example
app.Static("/static", "./public")

// => http://localhost:3000/static/hello.html
// => http://localhost:3000/static/js/jquery.js
// => http://localhost:3000/static/css/style.css

If you want to have a little bit more control regarding the settings for serving static files. You could use the fiber.Static struct to enable specific settings.

fiber.Static{}
// Static represents settings for serving static files
type Static struct {
// Transparently compresses responses if set to true
// This works differently than the github.com/gofiber/compression middleware
// The server tries minimizing CPU usage by caching compressed files.
// It adds ".fiber.gz" suffix to the original file name.
// Optional. Default value false
Compress bool
// Enables byte-range requests if set to true.
// Optional. Default value false
ByteRange bool
// Enable directory browsing.
// Optional. Default value false.
Browse bool
// File to serve when requesting a directory path.
// Optional. Default value "index.html".
Index string
}
Example
app.Static("/", "./public", fiber.Static{
Compress: true,
ByteRange: true,
Browse: true,
Index: "john.html"
})

HTTP Methods

Routes an HTTP request, where METHOD is the HTTP method of the request.

Signatures
// Add allows you to specifiy a method as value
app.Add(method, path string, handlers ...func(*Ctx)) Router

// All will register the route on all methods
app.All(path string, handlers ...func(*Ctx)) Router

// HTTP methods
app.Get(path string, handlers ...func(*Ctx)) Router
app.Put(path string, handlers ...func(*Ctx)) Router
app.Post(path string, handlers ...func(*Ctx)) Router
app.Head(path string, handlers ...func(*Ctx)) Router
app.Patch(path string, handlers ...func(*Ctx)) Router
app.Trace(path string, handlers ...func(*Ctx)) Router
app.Delete(path string, handlers ...func(*Ctx)) Router
app.Connect(path string, handlers ...func(*Ctx)) Router
app.Options(path string, handlers ...func(*Ctx)) Router

// Use is mostly used for middleware modules
// These routes will only match the beggining of each path
// i.e. "/john" will match "/john/doe", "/johnnnn"
app.Use(handlers ...func(*Ctx)) Router
app.Use(prefix string, handlers ...func(*Ctx)) Router
Example
app.Use("/api", func(c *fiber.Ctx) {
c.Set("X-Custom-Header", random.String(32))
c.Next()
})
app.Get("/api/list", func(c *fiber.Ctx) {
c.Send("I'm a GET request!")
})
app.Post("/api/register", func(c *fiber.Ctx) {
c.Send("I'm a POST request!")
})

Group

You can group routes by creating a *Group struct.

Signature

app.Group(prefix string, handlers ...func(*Ctx)) Router

Example

func main() {
app := fiber.New()

api := app.Group("/api", handler) // /api

v1 := api.Group("/v1", handler) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", handler) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

app.Listen(3000)
}

Stack

This method returns the original router stack

Signature
app.Stack() [][]*Route
Example
app := fiber.New()

app.Use(handler)
app.Get("/john", handler)
app.Post("/register", handler)
app.Get("/v1/users", handler)
app.Put("/user/:id", handler)
app.Head("/xhr", handler)

data, _ := json.MarshalIndent(app.Stack(), "", " ")
fmt.Println(string(data))

Listen

Binds and listens for connections on the specified address. This can be an int for port or string for address. This will listen either on tcp4 or tcp6 depending on the address input (i.e. :3000 / [::1]:3000 ).

Signature
app.Listen(address interface{}, tls ...*tls.Config) error
Examples
app.Listen(8080)
app.Listen("8080")
app.Listen(":8080")
app.Listen("127.0.0.1:8080")
app.Listen("[::1]:8080")

To enable TLS/HTTPS you can append a TLS config.

Example
cer, err := tls.LoadX509KeyPair("server.crt", "server.key")
if err != nil {
log.Fatal(err)
}
config := &tls.Config{Certificates: []tls.Certificate{cer}}

app.Listen(443, config)

Listener

You can pass your own net.Listener using the Listener method.

Signature
app.Listener(ln net.Listener, tls ...*tls.Config) error
caution

Listener does not support the Prefork feature.

Example
if ln, err = net.Listen("tcp", ":8080"); err != nil {
log.Fatal(err)
}

app.Listener(ln)

Test

Testing your application is done with the Test method. Use this method for creating _test.go files or when you need to debug your routing logic. The default timeout is 200ms if you want to disable a timeout altogether, pass -1 as a second argument.

Signature
app.Test(req *http.Request, msTimeout ...int) (*http.Response, error)
Example
// Create route with GET method for test:
app.Get("/", func(c *Ctx) {
fmt.Println(c.BaseURL()) // => http://google.com
fmt.Println(c.Get("X-Custom-Header")) // => hi

c.Send("hello, World!")
})

// http.Request
req := httptest.NewRequest("GET", "http://google.com", nil)
req.Header.Set("X-Custom-Header", "hi")

// http.Response
resp, _ := app.Test(req)

// Do something with results:
if resp.StatusCode == 200 {
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body)) // => Hello, World!
}
+ + \ No newline at end of file diff --git a/v1.x/api/ctx/index.html b/v1.x/api/ctx/index.html index e78025256cf..2aac33c14b4 100644 --- a/v1.x/api/ctx/index.html +++ b/v1.x/api/ctx/index.html @@ -6,14 +6,14 @@ 🧠 Ctx | Fiber - - + +
Version: v1.x

🧠 Ctx

Accepts

Checks, if the specified extensions or content types are acceptable.

info

Based on the request’s Accept HTTP header.

Signature
c.Accepts(types ...string)                 string
c.AcceptsCharsets(charsets ...string) string
c.AcceptsEncodings(encodings ...string) string
c.AcceptsLanguages(langs ...string) string
Example
// Accept: text/*, application/json

app.Get("/", func(c *fiber.Ctx) {
c.Accepts("html") // "html"
c.Accepts("text/html") // "text/html"
c.Accepts("json", "text") // "json"
c.Accepts("application/json") // "application/json"
c.Accepts("image/png") // ""
c.Accepts("png") // ""
})

Fiber provides similar functions for the other accept headers.

// Accept-Charset: utf-8, iso-8859-1;q=0.2
// Accept-Encoding: gzip, compress;q=0.2
// Accept-Language: en;q=0.8, nl, ru

app.Get("/", func(c *fiber.Ctx) {
c.AcceptsCharsets("utf-16", "iso-8859-1")
// "iso-8859-1"

c.AcceptsEncodings("compress", "br")
// "compress"

c.AcceptsLanguages("pt", "nl", "ru")
// "nl"
})

Append

Appends the specified value to the HTTP response header field.

caution

If the header is not already set, it creates the header with the specified value.

Signature
c.Append(field, values ...string)
Example
app.Get("/", func(c *fiber.Ctx) {
c.Append("Link", "http://google.com", "http://localhost")
// => Link: http://localhost, http://google.com

c.Append("Link", "Test")
// => Link: http://localhost, http://google.com, Test
})

Attachment

Sets the HTTP response Content-Disposition header field to attachment.

Signature
c.Attachment(file ...string)
Example
app.Get("/", func(c *fiber.Ctx) {
c.Attachment()
// => Content-Disposition: attachment

c.Attachment("./upload/images/logo.png")
// => Content-Disposition: attachment; filename="logo.png"
// => Content-Type: image/png
})

App

Returns the *App reference so you could easily access all application settings.

Signature
c.App() *App
Example
app.Get("/bodylimit", func(c *fiber.Ctx) {
bodylimit := c.App().Settings.BodyLimit
c.Send(bodylimit)
})

BaseURL

Returns the base URL (protocol + host) as a string.

Signature
c.BaseURL() string
Example
// GET https://example.com/page#chapter-1

app.Get("/", func(c *fiber.Ctx) {
c.BaseURL() // https://example.com
})

Body

Returns the request body.

Signature
c.Body() string
Example
// curl -X POST http://localhost:8080 -d user=john

app.Post("/", func(c *fiber.Ctx) {
// Get raw body from POST request:
c.Body() // user=john
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...

BodyParser

Binds the request body to a struct. BodyParser supports decoding query parameters and the following content types based on the Content-Type header:

  • application/json
  • application/xml
  • application/x-www-form-urlencoded
  • multipart/form-data
Signature
c.BodyParser(out interface{}) error
Example
// Field names should start with an uppercase letter
type Person struct {
Name string `json:"name" xml:"name" form:"name"`
Pass string `json:"pass" xml:"pass" form:"pass"`
}

app.Post("/", func(c *fiber.Ctx) {
p := new(Person)

if err := c.BodyParser(p); err != nil {
log.Fatal(err)
}

log.Println(p.Name) // john
log.Println(p.Pass) // doe
})
// Run tests with the following curl commands

// curl -X POST -H "Content-Type: application/json" --data "{\"name\":\"john\",\"pass\":\"doe\"}" localhost:3000

// curl -X POST -H "Content-Type: application/xml" --data "<login><name>john</name><pass>doe</pass></login>" localhost:3000

// curl -X POST -H "Content-Type: application/x-www-form-urlencoded" --data "name=john&pass=doe" localhost:3000

// curl -X POST -F name=john -F pass=doe http://localhost:3000

// curl -X POST "http://localhost:3000/?name=john&pass=doe"

ClearCookie

Expire a client cookie (or all cookies if left empty)

Signature
c.ClearCookie(key ...string)
Example
app.Get("/", func(c *fiber.Ctx) {
// Clears all cookies:
c.ClearCookie()

// Expire specific cookie by name:
c.ClearCookie("user")

// Expire multiple cookies by names:
c.ClearCookie("token", "session", "track_id", "version")
})
caution

Web browsers and other compliant clients will only clear the cookie if the given options are identical to those when creating the cookie, excluding expires and maxAge. ClearCookie will not set these values for you - a technique similar to the one shown below should be used to ensure your cookie is deleted.

Example
app.Get("/set", func(c *fiber.Ctx) {
c.Cookie(&fiber.Cookie{
Name: "token",
Value: "randomvalue",
Expires: time.Now().Add(24 * time.Hour),
HTTPOnly: true,
SameSite: "lax",
})
})

app.Get("/delete", func(c *fiber.Ctx) {
c.Cookie(&fiber.Cookie{
Name: "token",
// Set expiry date to the past
Expires: time.Now().Add(-(time.Hour * 2)),
HTTPOnly: true,
SameSite: "lax",
})
})

Context

Returns context.Context that carries a deadline, a cancellation signal, and other values across API boundaries.

Signature

c.Context() context.Context

Set cookie

Signature

c.Cookie(*Cookie)
type Cookie struct {
Name string
Value string
Path string
Domain string
Expires time.Time
Secure bool
HTTPOnly bool
SameSite string // lax, strict, none
}
Example
app.Get("/", func(c *fiber.Ctx) {
// Create cookie
cookie := new(fiber.Cookie)
cookie.Name = "john"
cookie.Value = "doe"
cookie.Expires = time.Now().Add(24 * time.Hour)

// Set cookie
c.Cookie(cookie)
})

Cookies

Get cookie value by key, you could pass an optional default value that will be returned if the cookie key does not exist.

Signatures

c.Cookies(key string, defaultValue ...string) string
Example
app.Get("/", func(c *fiber.Ctx) {
// Get cookie by key:
c.Cookies("name") // "john"
c.Cookies("empty", "doe") // "doe"
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...

Download

Transfers the file from path as an attachment.

Typically, browsers will prompt the user to download. By default, the Content-Disposition header filename= parameter is the file path (this typically appears in the browser dialog).

Override this default with the filename parameter.

Signature
c.Download(path, filename ...string) error
Example
app.Get("/", func(c *fiber.Ctx) {
if err := c.Download("./files/report-12345.pdf"); err != nil {
c.Next(err) // Pass err to fiber
}
// => Download report-12345.pdf

if err := c.Download("./files/report-12345.pdf", "report.pdf"); err != nil {
c.Next(err) // Pass err to fiber
}
// => Download report.pdf
})

Fasthttp

You can still access and use all Fasthttp methods and properties.

Signature

info

Please read the Fasthttp Documentation for more information.

Example

app.Get("/", func(c *fiber.Ctx) {
c.Fasthttp.Request.Header.Method()
// => []byte("GET")

c.Fasthttp.Response.Write([]byte("Hello, World!"))
// => "Hello, World!"
})

Error

This contains the error information that thrown by a panic or passed via the Next(err) method.

Signature
c.Error() error
Example
func main() {
app := fiber.New()
app.Post("/api/register", func (c *fiber.Ctx) {
if err := c.JSON(&User); err != nil {
c.Next(err)
}
})
app.Get("/api/user", func (c *fiber.Ctx) {
if err := c.JSON(&User); err != nil {
c.Next(err)
}
})
app.Put("/api/update", func (c *fiber.Ctx) {
if err := c.JSON(&User); err != nil {
c.Next(err)
}
})
app.Use("/api", func(c *fiber.Ctx) {
c.Set("Content-Type", "application/json")
c.Status(500).Send(c.Error())
})
app.Listen(1337)
}

Format

Performs content-negotiation on the Accept HTTP header. It uses Accepts to select a proper format.

info

If the header is not specified or there is no proper format, text/plain is used.

Signature
c.Format(body interface{})
Example
app.Get("/", func(c *fiber.Ctx) {
// Accept: text/plain
c.Format("Hello, World!")
// => Hello, World!

// Accept: text/html
c.Format("Hello, World!")
// => <p>Hello, World!</p>

// Accept: application/json
c.Format("Hello, World!")
// => "Hello, World!"
})

FormFile

MultipartForm files can be retrieved by name, the first file from the given key is returned.

Signature
c.FormFile(name string) (*multipart.FileHeader, error)
Example
app.Post("/", func(c *fiber.Ctx) {
// Get first file from form field "document":
file, err := c.FormFile("document")

// Check for errors:
if err == nil {
// Save file to root directory:
c.SaveFile(file, fmt.Sprintf("./%s", file.Filename))
}
})

FormValue

Any form values can be retrieved by name, the first value from the given key is returned.

Signature
c.FormValue(name string) string
Example
app.Post("/", func(c *fiber.Ctx) {
// Get first value from form field "name":
c.FormValue("name")
// => "john" or "" if not exist
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...

Fresh

https://expressjs.com/en/4x/api.html#req.fresh

info

Not implemented yet, pull requests are welcome!

Get

Returns the HTTP request header specified by the field.

tip

The match is case-insensitive.

Signature
c.Get(field string) string
Example
app.Get("/", func(c *fiber.Ctx) {
c.Get("Content-Type") // "text/plain"
c.Get("CoNtEnT-TypE") // "text/plain"
c.Get("something") // ""
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...

Hostname

Returns the hostname derived from the Host HTTP header.

Signature
c.Hostname() string
Example
// GET http://google.com/search

app.Get("/", func(c *fiber.Ctx) {
c.Hostname() // "google.com"
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...

IP

Returns the remote IP address of the request.

Signature
c.IP() string
Example
app.Get("/", func(c *fiber.Ctx) {
c.IP() // "127.0.0.1"
})

IPs

Returns an array of IP addresses specified in the X-Forwarded-For request header.

Signature
c.IPs() []string
Example
// X-Forwarded-For: proxy1, 127.0.0.1, proxy3

app.Get("/", func(c *fiber.Ctx) {
c.IPs() // ["proxy1", "127.0.0.1", "proxy3"]
})

Is

Returns the matching content type, if the incoming request’s Content-Type HTTP header field matches the MIME type specified by the type parameter.

info

If the request has no body, it returns false.

Signature
c.Is(t string) bool
Example
// Content-Type: text/html; charset=utf-8

app.Get("/", func(c *fiber.Ctx) {
c.Is("html") // true
c.Is(".html") // true
c.Is("json") // false
})

JSON

Converts any interface or string to JSON using Jsoniter.

info

JSON also sets the content header to application/json.

Signature
c.JSON(v interface{}) error
Example
type SomeStruct struct {
Name string
Age uint8
}

app.Get("/json", func(c *fiber.Ctx) {
// Create data struct:
data := SomeStruct{
Name: "Grame",
Age: 20,
}

if err := c.JSON(data); err != nil {
c.Status(500).Send(err)
return
}
// => Content-Type: application/json
// => "{"Name": "Grame", "Age": 20}"

if err := c.JSON(fiber.Map{
"name": "Grame",
"age": 20,
}); err != nil {
c.Status(500).Send(err)
return
}
// => Content-Type: application/json
// => "{"name": "Grame", "age": 20}"
})

JSONP

Sends a JSON response with JSONP support. This method is identical to JSON, except that it opts-in to JSONP callback support. By default, the callback name is simply callback.

Override this by passing a named string in the method.

Signature
c.JSONP(v interface{}, callback ...string) error
Example
type SomeStruct struct {
name string
age uint8
}

app.Get("/", func(c *fiber.Ctx) {
// Create data struct:
data := SomeStruct{
name: "Grame",
age: 20,
}

c.JSONP(data)
// => callback({"name": "Grame", "age": 20})

c.JSONP(data, "customFunc")
// => customFunc({"name": "Grame", "age": 20})
})

Joins the links followed by the property to populate the response’s Link HTTP header field.

Signature
c.Links(link ...string)
Example
app.Get("/", func(c *fiber.Ctx) {
c.Link(
"http://api.example.com/users?page=2", "next",
"http://api.example.com/users?page=5", "last",
)
// Link: <http://api.example.com/users?page=2>; rel="next",
// <http://api.example.com/users?page=5>; rel="last"
})

Locals

A method that stores variables scoped to the request and, therefore, are available only to the routes that match the request.

tip

This is useful if you want to pass some specific data to the next middleware.

Signature
c.Locals(key string, value ...interface{}) interface{}
Example
app.Use(func(c *fiber.Ctx) {
c.Locals("user", "admin")
c.Next()
})

app.Get("/admin", func(c *fiber.Ctx) {
if c.Locals("user") == "admin" {
c.Status(200).Send("Welcome, admin!")
} else {
c.SendStatus(403) // => 403 Forbidden
}
})

Location

Sets the response Location HTTP header to the specified path parameter.

Signature
c.Location(path string)
Example
app.Post("/", func(c *fiber.Ctx) {
c.Location("http://example.com")
c.Location("/foo/bar")
})

Method

Returns a string corresponding to the HTTP method of the request: GET, POST, PUT, and so on.
-Optionally, you could override the method by passing a string.

Signature
c.Method(override ...string) string
Example
app.Post("/", func(c *fiber.Ctx) {
c.Method() // "POST"
})

MultipartForm

To access multipart form entries, you can parse the binary with MultipartForm(). This returns a map[string][]string, so given a key, the value will be a string slice.

Signature
c.MultipartForm() (*multipart.Form, error)
Example
app.Post("/", func(c *fiber.Ctx) {
// Parse the multipart form:
if form, err := c.MultipartForm(); err == nil {
// => *multipart.Form

if token := form.Value["token"]; len(token) > 0 {
// Get key value:
fmt.Println(token[0])
}

// Get all files from "documents" key:
files := form.File["documents"]
// => []*multipart.FileHeader

// Loop through files:
for _, file := range files {
fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])
// => "tutorial.pdf" 360641 "application/pdf"

// Save the files to disk:
c.SaveFile(file, fmt.Sprintf("./%s", file.Filename))
}
}
})

Next

When Next is called, it executes the next method in the stack that matches the current route. You can pass an error struct within the method that will end the chaining and call the error handler.

Signature
c.Next(err ...error)
Example
app.Get("/", func(c *fiber.Ctx) {
fmt.Println("1st route!")
c.Next()
})

app.Get("*", func(c *fiber.Ctx) {
fmt.Println("2nd route!")
c.Next()
})

app.Get("/", func(c *fiber.Ctx) {
fmt.Println("3rd route!")
c.Send("Hello, World!")
})

OriginalURL

Returns the original request URL.

Signature
c.OriginalURL() string
Example
// GET http://example.com/search?q=something

app.Get("/", func(c *fiber.Ctx) {
c.OriginalURL() // "/search?q=something"
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...

Params

Method can be used to get the route parameters, you could pass an optional default value that will be returned if the param key does not exist.

info

Defaults to empty string (""), if the param doesn't exist.

Signature
c.Params(param string, defaultValue ...string) string
Example
// GET http://example.com/user/fenny

app.Get("/user/:name", func(c *fiber.Ctx) {
c.Params("name") // "fenny"
c.Params("age", "21") // "21"
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...__

Path

Contains the path part of the request URL. Optionally, you could override the path by passing a string.

Signature
c.Path(override ...string) string
Example
// GET http://example.com/users?sort=desc

app.Get("/users", func(c *fiber.Ctx) {
c.Path() // "/users"
})

Protocol

Contains the request protocol string: http or https for TLS requests.

Signature
c.Protocol() string
Example
// GET http://example.com

app.Get("/", func(c *fiber.Ctx) {
c.Protocol() // "http"
})

Query

This property is an object containing a property for each query string parameter in the route, you could pass an optional default value that will be returned if the query key does not exist.

info

If there is no query string, it returns an empty string.

Signature
c.Query(parameter string, defaultValue ...string) string
Example
// GET http://example.com/shoes?order=desc&brand=nike

app.Get("/", func(c *fiber.Ctx) {
c.Query("order") // "desc"
c.Query("brand") // "nike"
c.Query("empty", "nike") // "nike"
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...

QueryParser

This method is similar to BodyParser, but for query parameters.

Signature
c.QueryParser(out interface{}) error
Example
// Field names should start with an uppercase letter
type Person struct {
Name string `query:"name"`
Pass string `query:"pass"`
Products []string `query:"products"`
}

app.Post("/", func(c *fiber.Ctx) {
p := new(Person)

if err := c.QueryParser(p); err != nil {
log.Fatal(err)
}

log.Println(p.Name) // john
log.Println(p.Pass) // doe
log.Println(p.Products) // [shoe, hat]
})
// Run tests with the following curl command

// curl -X POST "http://localhost:3000/?name=john&pass=doe&products=shoe,hat"

Range

A struct containing the type and a slice of ranges will be returned.

Signature
c.Range(int size)
Example
// Range: bytes=500-700, 700-900
app.Get("/", func(c *fiber.Ctx) {
b := c.Range(1000)
if b.Type == "bytes" {
for r := range r.Ranges {
fmt.Println(r)
// [500, 700]
}
}
})

Redirect

Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code.

info

If not specified, status defaults to 302 Found.

Signature
c.Redirect(path string, status ...int)
Example
app.Get("/coffee", func(c *fiber.Ctx) {
c.Redirect("/teapot")
})

app.Get("/teapot", func(c *fiber.Ctx) {
c.Status(fiber.StatusTeapot).Send("🍵 short and stout 🍵")
})
More examples
app.Get("/", func(c *fiber.Ctx) {
c.Redirect("/foo/bar")
c.Redirect("../login")
c.Redirect("http://example.com")
c.Redirect("http://example.com", 301)
})

Render

Renders a view with data and sends a text/html response. By default Render uses the default Go Template engine. If you want to use another View engine, please take a look at our Template middleware.

Signature
c.Render(file string, data interface{}, layout ...string) error

Route

Returns the matched Route struct.

Signature
c.Route() *Route
Example
// http://localhost:8080/hello

handler := func(c *fiber.Ctx) {
r := c.Route()
fmt.Println(r.Method, r.Path, r.Params, r.Handlers)
// GET /hello/:name handler [name]
}

app.Get("/hello/:name", handler )

SaveFile

Method is used to save any multipart file to disk.

Signature
c.SaveFile(fh *multipart.FileHeader, path string)
Example
app.Post("/", func(c *fiber.Ctx) {
// Parse the multipart form:
if form, err := c.MultipartForm(); err == nil {
// => *multipart.Form

// Get all files from "documents" key:
files := form.File["documents"]
// => []*multipart.FileHeader

// Loop through files:
for _, file := range files {
fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])
// => "tutorial.pdf" 360641 "application/pdf"

// Save the files to disk:
c.SaveFile(file, fmt.Sprintf("./%s", file.Filename))
}
}
})

Secure

A boolean property that is true , if a TLS connection is established.

Signature
c.Secure() bool
Example
// Secure() method is equivalent to:
c.Protocol() == "https"

Send

Sets the HTTP response body. The Send body can be of any type.

caution

Send doesn't append like the Write method.

Signature
c.Send(body ...interface{})
Example
app.Get("/", func(c *fiber.Ctx) {
c.Send("Hello, World!") // => "Hello, World!"
c.Send([]byte("Hello, World!")) // => "Hello, World!"
c.Send(123) // => 123
})

Fiber also provides SendBytes ,SendString and SendStream methods for raw inputs.

tip

Use this if you don't need type assertion, recommended for faster performance.

Signature
c.SendBytes(b []byte)
c.SendString(s string)
c.SendStream(r io.Reader, s ...int)
Example
app.Get("/", func(c *fiber.Ctx) {
c.SendByte([]byte("Hello, World!"))
// => "Hello, World!"

c.SendString("Hello, World!")
// => "Hello, World!"

c.SendStream(bytes.NewReader([]byte("Hello, World!")))
// => "Hello, World!"
})

SendFile

Transfers the file from the given path. Sets the Content-Type response HTTP header field based on the filenames extension.

caution

Method use gzipping by default, set it to true to disable.

Signature
c.SendFile(path string, compress ...bool) error
Example
app.Get("/not-found", func(c *fiber.Ctx) {
if err := c.SendFile("./public/404.html"); err != nil {
c.Next(err) // pass err to ErrorHandler
}

// Enable compression
if err := c.SendFile("./static/index.html", true); err != nil {
c.Next(err) // pass err to ErrorHandler
}
})

SendStatus

Sets the status code and the correct status message in the body, if the response body is empty.

tip

You can find all used status codes and messages here.

Signature
c.SendStatus(status int)
Example
app.Get("/not-found", func(c *fiber.Ctx) {
c.SendStatus(415)
// => 415 "Unsupported Media Type"

c.Send("Hello, World!")
c.SendStatus(415)
// => 415 "Hello, World!"
})

Set

Sets the response’s HTTP header field to the specified key, value.

Signature
c.Set(field, value string)
Example
app.Get("/", func(c *fiber.Ctx) {
c.Set("Content-Type", "text/plain")
// => "Content-type: text/plain"
})

Stale

https://expressjs.com/en/4x/api.html#req.fresh

info

Not implemented yet, pull requests are welcome!

Status

Sets the HTTP status for the response.

info

Method is a chainable.

Signature
c.Status(status int)
Example
app.Get("/", func(c *fiber.Ctx) {
c.Status(200)
c.Status(400).Send("Bad Request")
c.Status(404).SendFile("./public/gopher.png")
})

Subdomains

Returns a string slice of subdomains in the domain name of the request.

The application property subdomain offset, which defaults to 2, is used for determining the beginning of the subdomain segments.

Signature
c.Subdomains(offset ...int) []string
Example
// Host: "tobi.ferrets.example.com"

app.Get("/", func(c *fiber.Ctx) {
c.Subdomains() // ["ferrets", "tobi"]
c.Subdomains(1) // ["tobi"]
})

Type

Sets the Content-Type HTTP header to the MIME type listed here specified by the file extension.

Signature
c.Type(t string) string
Example
app.Get("/", func(c *fiber.Ctx) {
c.Type(".html") // => "text/html"
c.Type("html") // => "text/html"
c.Type("json") // => "application/json"
c.Type("png") // => "image/png"
})

Vary

Adds the given header field to the Vary response header. This will append the header, if not already listed, otherwise leaves it listed in the current location.

info

Multiple fields are allowed.

Signature
c.Vary(field ...string)
Example
app.Get("/", func(c *fiber.Ctx) {
c.Vary("Origin") // => Vary: Origin
c.Vary("User-Agent") // => Vary: Origin, User-Agent

// No duplicates
c.Vary("Origin") // => Vary: Origin, User-Agent

c.Vary("Accept-Encoding", "Accept")
// => Vary: Origin, User-Agent, Accept-Encoding, Accept
})

Write

Appends any input to the HTTP body response.

Signature
c.Write(body ...interface{})
Example
app.Get("/", func(c *fiber.Ctx) {
c.Write("Hello, ") // => "Hello, "
c.Write([]byte("World! ")) // => "Hello, World! "
c.Write(123) // => "Hello, World! 123"
})

XHR

A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery).

Signature
c.XHR() bool
Example
// X-Requested-With: XMLHttpRequest

app.Get("/", func(c *fiber.Ctx) {
c.XHR() // true
})
- - +Optionally, you could override the method by passing a string.

Signature
c.Method(override ...string) string
Example
app.Post("/", func(c *fiber.Ctx) {
c.Method() // "POST"
})

MultipartForm

To access multipart form entries, you can parse the binary with MultipartForm(). This returns a map[string][]string, so given a key, the value will be a string slice.

Signature
c.MultipartForm() (*multipart.Form, error)
Example
app.Post("/", func(c *fiber.Ctx) {
// Parse the multipart form:
if form, err := c.MultipartForm(); err == nil {
// => *multipart.Form

if token := form.Value["token"]; len(token) > 0 {
// Get key value:
fmt.Println(token[0])
}

// Get all files from "documents" key:
files := form.File["documents"]
// => []*multipart.FileHeader

// Loop through files:
for _, file := range files {
fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])
// => "tutorial.pdf" 360641 "application/pdf"

// Save the files to disk:
c.SaveFile(file, fmt.Sprintf("./%s", file.Filename))
}
}
})

Next

When Next is called, it executes the next method in the stack that matches the current route. You can pass an error struct within the method that will end the chaining and call the error handler.

Signature
c.Next(err ...error)
Example
app.Get("/", func(c *fiber.Ctx) {
fmt.Println("1st route!")
c.Next()
})

app.Get("*", func(c *fiber.Ctx) {
fmt.Println("2nd route!")
c.Next()
})

app.Get("/", func(c *fiber.Ctx) {
fmt.Println("3rd route!")
c.Send("Hello, World!")
})

OriginalURL

Returns the original request URL.

Signature
c.OriginalURL() string
Example
// GET http://example.com/search?q=something

app.Get("/", func(c *fiber.Ctx) {
c.OriginalURL() // "/search?q=something"
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...

Params

Method can be used to get the route parameters, you could pass an optional default value that will be returned if the param key does not exist.

info

Defaults to empty string (""), if the param doesn't exist.

Signature
c.Params(param string, defaultValue ...string) string
Example
// GET http://example.com/user/fenny

app.Get("/user/:name", func(c *fiber.Ctx) {
c.Params("name") // "fenny"
c.Params("age", "21") // "21"
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...__

Path

Contains the path part of the request URL. Optionally, you could override the path by passing a string.

Signature
c.Path(override ...string) string
Example
// GET http://example.com/users?sort=desc

app.Get("/users", func(c *fiber.Ctx) {
c.Path() // "/users"
})

Protocol

Contains the request protocol string: http or https for TLS requests.

Signature
c.Protocol() string
Example
// GET http://example.com

app.Get("/", func(c *fiber.Ctx) {
c.Protocol() // "http"
})

Query

This property is an object containing a property for each query string parameter in the route, you could pass an optional default value that will be returned if the query key does not exist.

info

If there is no query string, it returns an empty string.

Signature
c.Query(parameter string, defaultValue ...string) string
Example
// GET http://example.com/shoes?order=desc&brand=nike

app.Get("/", func(c *fiber.Ctx) {
c.Query("order") // "desc"
c.Query("brand") // "nike"
c.Query("empty", "nike") // "nike"
})

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more...

QueryParser

This method is similar to BodyParser, but for query parameters.

Signature
c.QueryParser(out interface{}) error
Example
// Field names should start with an uppercase letter
type Person struct {
Name string `query:"name"`
Pass string `query:"pass"`
Products []string `query:"products"`
}

app.Post("/", func(c *fiber.Ctx) {
p := new(Person)

if err := c.QueryParser(p); err != nil {
log.Fatal(err)
}

log.Println(p.Name) // john
log.Println(p.Pass) // doe
log.Println(p.Products) // [shoe, hat]
})
// Run tests with the following curl command

// curl -X POST "http://localhost:3000/?name=john&pass=doe&products=shoe,hat"

Range

A struct containing the type and a slice of ranges will be returned.

Signature
c.Range(int size)
Example
// Range: bytes=500-700, 700-900
app.Get("/", func(c *fiber.Ctx) {
b := c.Range(1000)
if b.Type == "bytes" {
for r := range r.Ranges {
fmt.Println(r)
// [500, 700]
}
}
})

Redirect

Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code.

info

If not specified, status defaults to 302 Found.

Signature
c.Redirect(path string, status ...int)
Example
app.Get("/coffee", func(c *fiber.Ctx) {
c.Redirect("/teapot")
})

app.Get("/teapot", func(c *fiber.Ctx) {
c.Status(fiber.StatusTeapot).Send("🍵 short and stout 🍵")
})
More examples
app.Get("/", func(c *fiber.Ctx) {
c.Redirect("/foo/bar")
c.Redirect("../login")
c.Redirect("http://example.com")
c.Redirect("http://example.com", 301)
})

Render

Renders a view with data and sends a text/html response. By default Render uses the default Go Template engine. If you want to use another View engine, please take a look at our Template middleware.

Signature
c.Render(file string, data interface{}, layout ...string) error

Route

Returns the matched Route struct.

Signature
c.Route() *Route
Example
// http://localhost:8080/hello

handler := func(c *fiber.Ctx) {
r := c.Route()
fmt.Println(r.Method, r.Path, r.Params, r.Handlers)
// GET /hello/:name handler [name]
}

app.Get("/hello/:name", handler )

SaveFile

Method is used to save any multipart file to disk.

Signature
c.SaveFile(fh *multipart.FileHeader, path string)
Example
app.Post("/", func(c *fiber.Ctx) {
// Parse the multipart form:
if form, err := c.MultipartForm(); err == nil {
// => *multipart.Form

// Get all files from "documents" key:
files := form.File["documents"]
// => []*multipart.FileHeader

// Loop through files:
for _, file := range files {
fmt.Println(file.Filename, file.Size, file.Header["Content-Type"][0])
// => "tutorial.pdf" 360641 "application/pdf"

// Save the files to disk:
c.SaveFile(file, fmt.Sprintf("./%s", file.Filename))
}
}
})

Secure

A boolean property that is true , if a TLS connection is established.

Signature
c.Secure() bool
Example
// Secure() method is equivalent to:
c.Protocol() == "https"

Send

Sets the HTTP response body. The Send body can be of any type.

caution

Send doesn't append like the Write method.

Signature
c.Send(body ...interface{})
Example
app.Get("/", func(c *fiber.Ctx) {
c.Send("Hello, World!") // => "Hello, World!"
c.Send([]byte("Hello, World!")) // => "Hello, World!"
c.Send(123) // => 123
})

Fiber also provides SendBytes ,SendString and SendStream methods for raw inputs.

tip

Use this if you don't need type assertion, recommended for faster performance.

Signature
c.SendBytes(b []byte)
c.SendString(s string)
c.SendStream(r io.Reader, s ...int)
Example
app.Get("/", func(c *fiber.Ctx) {
c.SendByte([]byte("Hello, World!"))
// => "Hello, World!"

c.SendString("Hello, World!")
// => "Hello, World!"

c.SendStream(bytes.NewReader([]byte("Hello, World!")))
// => "Hello, World!"
})

SendFile

Transfers the file from the given path. Sets the Content-Type response HTTP header field based on the filenames extension.

caution

Method use gzipping by default, set it to true to disable.

Signature
c.SendFile(path string, compress ...bool) error
Example
app.Get("/not-found", func(c *fiber.Ctx) {
if err := c.SendFile("./public/404.html"); err != nil {
c.Next(err) // pass err to ErrorHandler
}

// Enable compression
if err := c.SendFile("./static/index.html", true); err != nil {
c.Next(err) // pass err to ErrorHandler
}
})

SendStatus

Sets the status code and the correct status message in the body, if the response body is empty.

tip

You can find all used status codes and messages here.

Signature
c.SendStatus(status int)
Example
app.Get("/not-found", func(c *fiber.Ctx) {
c.SendStatus(415)
// => 415 "Unsupported Media Type"

c.Send("Hello, World!")
c.SendStatus(415)
// => 415 "Hello, World!"
})

Set

Sets the response’s HTTP header field to the specified key, value.

Signature
c.Set(field, value string)
Example
app.Get("/", func(c *fiber.Ctx) {
c.Set("Content-Type", "text/plain")
// => "Content-type: text/plain"
})

Stale

https://expressjs.com/en/4x/api.html#req.fresh

info

Not implemented yet, pull requests are welcome!

Status

Sets the HTTP status for the response.

info

Method is a chainable.

Signature
c.Status(status int)
Example
app.Get("/", func(c *fiber.Ctx) {
c.Status(200)
c.Status(400).Send("Bad Request")
c.Status(404).SendFile("./public/gopher.png")
})

Subdomains

Returns a string slice of subdomains in the domain name of the request.

The application property subdomain offset, which defaults to 2, is used for determining the beginning of the subdomain segments.

Signature
c.Subdomains(offset ...int) []string
Example
// Host: "tobi.ferrets.example.com"

app.Get("/", func(c *fiber.Ctx) {
c.Subdomains() // ["ferrets", "tobi"]
c.Subdomains(1) // ["tobi"]
})

Type

Sets the Content-Type HTTP header to the MIME type listed here specified by the file extension.

Signature
c.Type(t string) string
Example
app.Get("/", func(c *fiber.Ctx) {
c.Type(".html") // => "text/html"
c.Type("html") // => "text/html"
c.Type("json") // => "application/json"
c.Type("png") // => "image/png"
})

Vary

Adds the given header field to the Vary response header. This will append the header, if not already listed, otherwise leaves it listed in the current location.

info

Multiple fields are allowed.

Signature
c.Vary(field ...string)
Example
app.Get("/", func(c *fiber.Ctx) {
c.Vary("Origin") // => Vary: Origin
c.Vary("User-Agent") // => Vary: Origin, User-Agent

// No duplicates
c.Vary("Origin") // => Vary: Origin, User-Agent

c.Vary("Accept-Encoding", "Accept")
// => Vary: Origin, User-Agent, Accept-Encoding, Accept
})

Write

Appends any input to the HTTP body response.

Signature
c.Write(body ...interface{})
Example
app.Get("/", func(c *fiber.Ctx) {
c.Write("Hello, ") // => "Hello, "
c.Write([]byte("World! ")) // => "Hello, World! "
c.Write(123) // => "Hello, World! 123"
})

XHR

A Boolean property, that is true, if the request’s X-Requested-With header field is XMLHttpRequest, indicating that the request was issued by a client library (such as jQuery).

Signature
c.XHR() bool
Example
// X-Requested-With: XMLHttpRequest

app.Get("/", func(c *fiber.Ctx) {
c.XHR() // true
})
+ + \ No newline at end of file diff --git a/v1.x/api/middleware/index.html b/v1.x/api/middleware/index.html index 007ac25d22d..61bfb6c835e 100644 --- a/v1.x/api/middleware/index.html +++ b/v1.x/api/middleware/index.html @@ -6,14 +6,14 @@ 🧬 Middleware | Fiber - - + +
Version: v1.x

🧬 Middleware

Fiber ships with multiple middleware modules by default:

import (
"github.com/gofiber/fiber"
"github.com/gofiber/fiber/middleware"
)
  • ****Compress Compress middleware that supports deflate, gzip and brotli compression.
  • ****FileSystem FileSystem middleware for Fiber, special thanks and credits to Alireza Salary
  • Favicon Ignore favicon from logs or serve from memory if a file path is provided.
  • Logger HTTP request/response logger.
  • Pprof HTTP server runtime profiling
  • Recover Recover middleware recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.
  • RequestID Request ID middleware generates a unique id for a request.
  • Timeout A wrapper function for handlers which will raise an error if the handler takes longer than a set amount of time to return

Fiber also maintains external middleware modules, these have to be installed separately:

import (
"github.com/gofiber/fiber"
"github.com/gofiber/<module>"
)
  • gofiber/adaptor Converter for net/http handlers to/from Fiber request handlers.
  • gofiber/basicauth Basic auth middleware provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized for missing or invalid credentials.
  • gofiber/cors Enable cross-origin resource sharing (CORS) with various options.
  • gofiber/csrf Protect from CSRF exploits.
  • gofiber/helmet Helps secure your apps by setting various HTTP headers.
  • gofiber/jwt JWT returns a JSON Web Token (JWT) auth middleware.
  • gofiber/keyauth Key auth middleware provides a key-based authentication.
  • gofiber/limiter Rate-limiting middleware for Fiber. Use to limit repeated requests to public APIs and/or endpoints such as password reset.
  • gofiber/rewrite Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.
  • gofiber/session This session middleware is built on top of fasthttp/session by @savsgio MIT. Special thanks to
  • gofiber/template This package contains 8 template engines
  • gofiber/websocket Based on Gorilla WebSocket for Fiber

Compress

Compress middleware for with support for deflate, gzip and brotlicompression.
-It will use the fastest compression method depending on the request header Accept-Encodingvalue.

Signature
func Compress(options ...interface{}) fiber.Handler {}
Config
type CompressConfig struct {
// Next defines a function to skip this middleware.
// Default: nil
Next func(*fiber.Ctx) bool

// Compression level for brotli, gzip and deflate
// CompressLevelDisabled = -1
// CompressLevelDefault = 0
// CompressLevelBestSpeed = 1
// CompressLevelBestCompression = 2
// Default: CompressLevelDefault
Level int
}
Example
// Compression handler with default settings
app.Use(middleware.Compress())

// Provide a custom compression level
app.Use(middleware.Compress(2))

// Pass a next function to skip specific requests
app.Use(middleware.Compress(func(c *fiber.Ctx) bool {
return c.Path() == "/dontcompress"
}))

// Provide a full Config
app.Use(middleware.Compress(middleware.CompressConfig{
Next: func(c *fiber.Ctx) bool {
return c.Path() == "/dontcompress"
},
Level: CompressLevelDefault,
})

Skipping middleware execution

When adding middleware to your application, you can also specify when the middleware should be activated and when it should not through a function passed when initialising the middleware using a function passed in the configuration for the middleware.

Signature
func (*fiber.Ctx) bool

This function should return true if the middleware should be deactivated. For example, if you would like admin users to be exempt from rate-limiting, you could do something like this:

Example
app.Use(limiter.New(limiter.Config{
Timeout: 10,
Max: 3,
Filter: func (c *fiber.Ctx) bool {
var isUserAdmin bool
// Your logic here
return isUserAdmin
}
}))
caution

If you are using middleware that is included with Fiber by default (for example Compress or Logger), you should use the Next field instead of the Filter field. For example:

Example
app.Use(middleware.Logger(middleware.LoggerConfig{
Format: "${time} ${method} ${path}",
TimeFormat: "15:04:05",
TimeZone: "Asia/Chongqing",
Next: func (c *fiber.Ctx) bool {
var isUserAdmin bool
// Your logic here
return isUserAdmin
}
}))

FileSystem

Favicon

- - +It will use the fastest compression method depending on the request header Accept-Encodingvalue.

Signature
func Compress(options ...interface{}) fiber.Handler {}
Config
type CompressConfig struct {
// Next defines a function to skip this middleware.
// Default: nil
Next func(*fiber.Ctx) bool

// Compression level for brotli, gzip and deflate
// CompressLevelDisabled = -1
// CompressLevelDefault = 0
// CompressLevelBestSpeed = 1
// CompressLevelBestCompression = 2
// Default: CompressLevelDefault
Level int
}
Example
// Compression handler with default settings
app.Use(middleware.Compress())

// Provide a custom compression level
app.Use(middleware.Compress(2))

// Pass a next function to skip specific requests
app.Use(middleware.Compress(func(c *fiber.Ctx) bool {
return c.Path() == "/dontcompress"
}))

// Provide a full Config
app.Use(middleware.Compress(middleware.CompressConfig{
Next: func(c *fiber.Ctx) bool {
return c.Path() == "/dontcompress"
},
Level: CompressLevelDefault,
})

Skipping middleware execution

When adding middleware to your application, you can also specify when the middleware should be activated and when it should not through a function passed when initialising the middleware using a function passed in the configuration for the middleware.

Signature
func (*fiber.Ctx) bool

This function should return true if the middleware should be deactivated. For example, if you would like admin users to be exempt from rate-limiting, you could do something like this:

Example
app.Use(limiter.New(limiter.Config{
Timeout: 10,
Max: 3,
Filter: func (c *fiber.Ctx) bool {
var isUserAdmin bool
// Your logic here
return isUserAdmin
}
}))
caution

If you are using middleware that is included with Fiber by default (for example Compress or Logger), you should use the Next field instead of the Filter field. For example:

Example
app.Use(middleware.Logger(middleware.LoggerConfig{
Format: "${time} ${method} ${path}",
TimeFormat: "15:04:05",
TimeZone: "Asia/Chongqing",
Next: func (c *fiber.Ctx) bool {
var isUserAdmin bool
// Your logic here
return isUserAdmin
}
}))

FileSystem

Favicon

+ + \ No newline at end of file diff --git a/v1.x/category/api/index.html b/v1.x/category/api/index.html index ce79360e9e6..1a2adc58c12 100644 --- a/v1.x/category/api/index.html +++ b/v1.x/category/api/index.html @@ -6,13 +6,13 @@ API | Fiber - - + + - - + + \ No newline at end of file diff --git a/v1.x/category/guide/index.html b/v1.x/category/guide/index.html index 59d74da845a..13d5258707e 100644 --- a/v1.x/category/guide/index.html +++ b/v1.x/category/guide/index.html @@ -6,13 +6,13 @@ Guide | Fiber - - + + - - + + \ No newline at end of file diff --git a/v1.x/category/misc/index.html b/v1.x/category/misc/index.html index d01d18576d2..76ef3e2d10d 100644 --- a/v1.x/category/misc/index.html +++ b/v1.x/category/misc/index.html @@ -6,13 +6,13 @@ Misc | Fiber - - + + - - + + \ No newline at end of file diff --git a/v1.x/guide/error-handling/index.html b/v1.x/guide/error-handling/index.html index 400ce73d0ef..7a53f135980 100644 --- a/v1.x/guide/error-handling/index.html +++ b/v1.x/guide/error-handling/index.html @@ -6,13 +6,13 @@ 🐛 Error Handling | Fiber - - + +
-
Version: v1.x

🐛 Error Handling

Catching Errors

It’s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them.

app.Get("/", func(c *fiber.Ctx) {
err := c.SendFile("file-does-not-exist")

if err != nil {
c.Next(err) // Pass error to Fiber
}
})

Fiber does not handle panics by default. To recover from a panic thrown by any handler in the stack, you need to include the Recover middleware below:

Example
package main

import (
"github.com/gofiber/fiber"
"github.com/gofiber/fiber/middleware"
)

func main() {
app := fiber.New()

app.Use(middleware.Recover())

app.Get("/", func(c *fiber.Ctx) {
panic("This panic is catched by the ErrorHandler")
})

log.Fatal(app.Listen(3000))
}

Because ctx.Next() accepts an error interface, you could use Fiber's custom error struct to pass an additional status code using fiber.NewError(). It's optional to pass a message; if this is left empty, it will default to the status code message (404 equals Not Found).

Example
app.Get("/", func(c *fiber.Ctx) {
err := fiber.NewError(503)
c.Next(err) // 503 Service Unavailable

err := fiber.NewError(404, "Sorry, not found!")
c.Next(err) // 404 Sorry, not found!
})

Default Error Handler

Fiber provides an error handler by default. For a standard error, the response is sent as 500 Internal Server Error. If error is of type fiber*Error, response is sent with the provided status code and message.

Example
// Default error handler
app.Settings.ErrorHandler = func(ctx *fiber.Ctx, err error) {
// Statuscode defaults to 500
code := fiber.StatusInternalServerError

// Check if it's an fiber.Error type
if e, ok := err.(*fiber.Error); ok {
code = e.Code
}

// Return HTTP response
ctx.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)
ctx.Status(code).SendString(err.Error())
}

Custom Error Handler

A custom error handler can be set via app.Settings.ErrorHandler

In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response.

The following example shows how to display error pages for different types of errors.

Example
app := fiber.New()

// Custom error handler
app.Settings.ErrorHandler = func(ctx *fiber.Ctx, err error) {
// Statuscode defaults to 500
code := fiber.StatusInternalServerError

// Retrieve the custom statuscode if it's an fiber.*Error
if e, ok := err.(*fiber.Error); ok {
code = e.Code
}

// Send custom error page
err = ctx.Status(code).SendFile(fmt.Sprintf("./%d.html", code))
if err != nil {
ctx.Status(500).SendString("Internal Server Error")
}
}

Special thanks to the Echo & Express framework for inspiration regarding error handling.

- - +
Version: v1.x

🐛 Error Handling

Catching Errors

It’s essential to ensure that Fiber catches all errors that occur while running route handlers and middleware. You must return them to the handler function, where Fiber will catch and process them.

app.Get("/", func(c *fiber.Ctx) {
err := c.SendFile("file-does-not-exist")

if err != nil {
c.Next(err) // Pass error to Fiber
}
})

Fiber does not handle panics by default. To recover from a panic thrown by any handler in the stack, you need to include the Recover middleware below:

Example
package main

import (
"github.com/gofiber/fiber"
"github.com/gofiber/fiber/middleware"
)

func main() {
app := fiber.New()

app.Use(middleware.Recover())

app.Get("/", func(c *fiber.Ctx) {
panic("This panic is catched by the ErrorHandler")
})

log.Fatal(app.Listen(3000))
}

Because ctx.Next() accepts an error interface, you could use Fiber's custom error struct to pass an additional status code using fiber.NewError(). It's optional to pass a message; if this is left empty, it will default to the status code message (404 equals Not Found).

Example
app.Get("/", func(c *fiber.Ctx) {
err := fiber.NewError(503)
c.Next(err) // 503 Service Unavailable

err := fiber.NewError(404, "Sorry, not found!")
c.Next(err) // 404 Sorry, not found!
})

Default Error Handler

Fiber provides an error handler by default. For a standard error, the response is sent as 500 Internal Server Error. If error is of type fiber*Error, response is sent with the provided status code and message.

Example
// Default error handler
app.Settings.ErrorHandler = func(ctx *fiber.Ctx, err error) {
// Statuscode defaults to 500
code := fiber.StatusInternalServerError

// Check if it's an fiber.Error type
if e, ok := err.(*fiber.Error); ok {
code = e.Code
}

// Return HTTP response
ctx.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)
ctx.Status(code).SendString(err.Error())
}

Custom Error Handler

A custom error handler can be set via app.Settings.ErrorHandler

In most cases, the default error handler should be sufficient. However, a custom error handler can come in handy if you want to capture different types of errors and take action accordingly e.g., send a notification email or log an error to the centralized system. You can also send customized responses to the client e.g., error page or just a JSON response.

The following example shows how to display error pages for different types of errors.

Example
app := fiber.New()

// Custom error handler
app.Settings.ErrorHandler = func(ctx *fiber.Ctx, err error) {
// Statuscode defaults to 500
code := fiber.StatusInternalServerError

// Retrieve the custom statuscode if it's an fiber.*Error
if e, ok := err.(*fiber.Error); ok {
code = e.Code
}

// Send custom error page
err = ctx.Status(code).SendFile(fmt.Sprintf("./%d.html", code))
if err != nil {
ctx.Status(500).SendString("Internal Server Error")
}
}

Special thanks to the Echo & Express framework for inspiration regarding error handling.

+ + \ No newline at end of file diff --git a/v1.x/guide/grouping/index.html b/v1.x/guide/grouping/index.html index 9cdc3cf33c8..236d096c36e 100644 --- a/v1.x/guide/grouping/index.html +++ b/v1.x/guide/grouping/index.html @@ -6,13 +6,13 @@ 🎭 Grouping | Fiber - - + +
-
Version: v1.x

🎭 Grouping

Paths

Like Routing, groups can also have paths that belong to a cluster.

func main() {
app := fiber.New()

api := app.Group("/api", cors()) // /api

v1 := api.Group("/v1", mysql()) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", mongodb()) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

app.Listen(3000)
}

A Group of paths can have an optional handler.

func main() {
app := fiber.New()

api := app.Group("/api") // /api

v1 := api.Group("/v1") // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2") // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

app.Listen(3000)
}
caution

Running /api, /v1 or /v2 will result in 404 error, make sure you have the errors set.

Group Handlers

Group handlers can also be used as a routing path but they must have Next added to them so that the flow can continue.

func main() {
app := fiber.New()

api := app.Group("/api") // /api

v1 := api.Group("/v1", func(c *fiber.Ctx) {
c.JSON(fiber.Map{
"message": "v1",
})
c.Next()
}) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

app.Listen(3000)
}
- - +
Version: v1.x

🎭 Grouping

Paths

Like Routing, groups can also have paths that belong to a cluster.

func main() {
app := fiber.New()

api := app.Group("/api", cors()) // /api

v1 := api.Group("/v1", mysql()) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", mongodb()) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

app.Listen(3000)
}

A Group of paths can have an optional handler.

func main() {
app := fiber.New()

api := app.Group("/api") // /api

v1 := api.Group("/v1") // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2") // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

app.Listen(3000)
}
caution

Running /api, /v1 or /v2 will result in 404 error, make sure you have the errors set.

Group Handlers

Group handlers can also be used as a routing path but they must have Next added to them so that the flow can continue.

func main() {
app := fiber.New()

api := app.Group("/api") // /api

v1 := api.Group("/v1", func(c *fiber.Ctx) {
c.JSON(fiber.Map{
"message": "v1",
})
c.Next()
}) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

app.Listen(3000)
}
+ + \ No newline at end of file diff --git a/v1.x/guide/routing/index.html b/v1.x/guide/routing/index.html index 2166d70590b..6359268ca65 100644 --- a/v1.x/guide/routing/index.html +++ b/v1.x/guide/routing/index.html @@ -6,13 +6,13 @@ 🔌 Routing | Fiber - - + +
-
Version: v1.x

🔌 Routing

Paths

Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be strings or string patterns.

Examples of route paths based on strings

// This route path will match requests to the root route, "/":
app.Get("/", func(c *fiber.Ctx) {
c.Send("root")
})

// This route path will match requests to "/about":
app.Get("/about", func(c *fiber.Ctx) {
c.Send("about")
})

// This route path will match requests to "/random.txt":
app.Get("/random.txt", func(c *fiber.Ctx) {
c.Send("random.txt")
})

Parameters

Route parameters are named URL segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the Params function, with the name of the route parameter specified in the path as their respective keys.

info

The name of the route parameter must be made up of characters ([A-Za-z0-9_]).

Example of define routes with route parameters

// Parameters
app.Get("/user/:name/books/:title", func(c *fiber.Ctx) {
c.Write(c.Params("name"))
c.Write(c.Params("title"))
})
// Wildcard
app.Get("/user/*", func(c *fiber.Ctx) {
c.Send(c.Params("*"))
})
// Optional parameter
app.Get("/user/:name?", func(c *fiber.Ctx) {
c.Send(c.Params("name"))
})
info

Since the hyphen (-) and the dot (.) are interpreted literally, they can be used along with route parameters for useful purposes.

// http://localhost:3000/plantae/prunus.persica
app.Get("/plantae/:genus.:species", func(c *fiber.Ctx) {
c.Params("genus") // prunus
c.Params("species") // persica
})
// http://localhost:3000/flights/LAX-SFO
app.Get("/flights/:from-:to", func(c *fiber.Ctx) {
c.Params("from") // LAX
c.Params("to") // SFO
})

Middleware

Functions that are designed to make changes to the request or response are called middleware functions. The Next is a Fiber router function, when called, executes the next function that matches the current route.

Example of a middleware function

app.Use(func(c *fiber.Ctx) {
// Set some security headers:
c.Set("X-XSS-Protection", "1; mode=block")
c.Set("X-Content-Type-Options", "nosniff")
c.Set("X-Download-Options", "noopen")
c.Set("Strict-Transport-Security", "max-age=5184000")
c.Set("X-Frame-Options", "SAMEORIGIN")
c.Set("X-DNS-Prefetch-Control", "off")

// Go to next middleware:
c.Next()

// End of the chain
fmt.Println("Bye 👋!")
})

app.Get("/", func(c *fiber.Ctx) {
c.Send("Hello, World!")
})

Use method path is a mount, or prefix path, and limits middleware to only apply to any paths requested that begin with it.

Grouping

If you have many endpoints, you can organize your routes using Group.

func main() {
app := fiber.New()

api := app.Group("/api", cors()) // /api

v1 := api.Group("/v1", mysql()) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", mongodb()) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

app.Listen(3000)
}
- - +
Version: v1.x

🔌 Routing

Paths

Route paths, combined with a request method, define the endpoints at which requests can be made. Route paths can be strings or string patterns.

Examples of route paths based on strings

// This route path will match requests to the root route, "/":
app.Get("/", func(c *fiber.Ctx) {
c.Send("root")
})

// This route path will match requests to "/about":
app.Get("/about", func(c *fiber.Ctx) {
c.Send("about")
})

// This route path will match requests to "/random.txt":
app.Get("/random.txt", func(c *fiber.Ctx) {
c.Send("random.txt")
})

Parameters

Route parameters are named URL segments that are used to capture the values specified at their position in the URL. The obtained values can be retrieved using the Params function, with the name of the route parameter specified in the path as their respective keys.

info

The name of the route parameter must be made up of characters ([A-Za-z0-9_]).

Example of define routes with route parameters

// Parameters
app.Get("/user/:name/books/:title", func(c *fiber.Ctx) {
c.Write(c.Params("name"))
c.Write(c.Params("title"))
})
// Wildcard
app.Get("/user/*", func(c *fiber.Ctx) {
c.Send(c.Params("*"))
})
// Optional parameter
app.Get("/user/:name?", func(c *fiber.Ctx) {
c.Send(c.Params("name"))
})
info

Since the hyphen (-) and the dot (.) are interpreted literally, they can be used along with route parameters for useful purposes.

// http://localhost:3000/plantae/prunus.persica
app.Get("/plantae/:genus.:species", func(c *fiber.Ctx) {
c.Params("genus") // prunus
c.Params("species") // persica
})
// http://localhost:3000/flights/LAX-SFO
app.Get("/flights/:from-:to", func(c *fiber.Ctx) {
c.Params("from") // LAX
c.Params("to") // SFO
})

Middleware

Functions that are designed to make changes to the request or response are called middleware functions. The Next is a Fiber router function, when called, executes the next function that matches the current route.

Example of a middleware function

app.Use(func(c *fiber.Ctx) {
// Set some security headers:
c.Set("X-XSS-Protection", "1; mode=block")
c.Set("X-Content-Type-Options", "nosniff")
c.Set("X-Download-Options", "noopen")
c.Set("Strict-Transport-Security", "max-age=5184000")
c.Set("X-Frame-Options", "SAMEORIGIN")
c.Set("X-DNS-Prefetch-Control", "off")

// Go to next middleware:
c.Next()

// End of the chain
fmt.Println("Bye 👋!")
})

app.Get("/", func(c *fiber.Ctx) {
c.Send("Hello, World!")
})

Use method path is a mount, or prefix path, and limits middleware to only apply to any paths requested that begin with it.

Grouping

If you have many endpoints, you can organize your routes using Group.

func main() {
app := fiber.New()

api := app.Group("/api", cors()) // /api

v1 := api.Group("/v1", mysql()) // /api/v1
v1.Get("/list", handler) // /api/v1/list
v1.Get("/user", handler) // /api/v1/user

v2 := api.Group("/v2", mongodb()) // /api/v2
v2.Get("/list", handler) // /api/v2/list
v2.Get("/user", handler) // /api/v2/user

app.Listen(3000)
}
+ + \ No newline at end of file diff --git a/v1.x/guide/templates/index.html b/v1.x/guide/templates/index.html index 08652892dd8..7f037ff21c1 100644 --- a/v1.x/guide/templates/index.html +++ b/v1.x/guide/templates/index.html @@ -6,13 +6,13 @@ 📝 Templates | Fiber - - + +
-
Version: v1.x

📝 Templates

Template interfaces

Fiber provides a Views interface to provide your own template engine:

type Views interface {
Load() error
Render(io.Writer, string, interface{}, ...string) error
}

Views interface contains a Load and Render method, Load is executed by Fiber on app initialization to load/parse the templates.

// Pass engine to Fiber's Views Engine
app := fiber.New(&fiber.Settings{
Views: engine,
})

The Render method is linked to the ctx.Render() function that accepts a template name and binding data.

app.Get("/", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"hello": "world",
});
})

Engines

Fiber team maintains templates package that provides wrappers for multiple template engines:

package main

import (
"github.com/gofiber/fiber"
"github.com/gofiber/template/html"
)

func main() {
// Initialize standard Go html template engine
engine := html.New("./views", ".html")

app := fiber.New(&fiber.Settings{
Views: engine,
})
app.Get("/", func(c *fiber.Ctx) {
// Render index template
_ = c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Listen(3000)
}
- - +
Version: v1.x

📝 Templates

Template interfaces

Fiber provides a Views interface to provide your own template engine:

type Views interface {
Load() error
Render(io.Writer, string, interface{}, ...string) error
}

Views interface contains a Load and Render method, Load is executed by Fiber on app initialization to load/parse the templates.

// Pass engine to Fiber's Views Engine
app := fiber.New(&fiber.Settings{
Views: engine,
})

The Render method is linked to the ctx.Render() function that accepts a template name and binding data.

app.Get("/", func(c *fiber.Ctx) error {
return c.Render("index", fiber.Map{
"hello": "world",
});
})

Engines

Fiber team maintains templates package that provides wrappers for multiple template engines:

package main

import (
"github.com/gofiber/fiber"
"github.com/gofiber/template/html"
)

func main() {
// Initialize standard Go html template engine
engine := html.New("./views", ".html")

app := fiber.New(&fiber.Settings{
Views: engine,
})
app.Get("/", func(c *fiber.Ctx) {
// Render index template
_ = c.Render("index", fiber.Map{
"Title": "Hello, World!",
})
})

app.Listen(3000)
}
+ + \ No newline at end of file diff --git a/v1.x/guide/validating/index.html b/v1.x/guide/validating/index.html index 5ee1e1df31f..ad94cfa2757 100644 --- a/v1.x/guide/validating/index.html +++ b/v1.x/guide/validating/index.html @@ -6,13 +6,13 @@ 🔎 Validating | Fiber - - + +
-
Version: v1.x

🔎 Validating

Validator package

Fiber can make great use of the validator package to ensure correct validation of data to store.

You can find the detailed descriptions of the validations used in the fields contained on the structs below:

Validation Example
type Job struct{
Type string `validate:"required,min=3,max=32"`
Salary int `validate:"required,number"`
}

type User struct{
Name string `validate:"required,min=3,max=32"`
IsActive bool `validate:"required,eq=True|eq=False"`
Email string `validate:"required,email,min=6,max=32"`
Job Job `validate:"dive"`
}

type ErrorResponse struct {
FailedField string
Tag string
Value string
}

func ValidateStruct(user User) []*ErrorResponse {
var errors []*ErrorResponse
validate = validator.New()
err := validate.Struct(user)
if err != nil {
for _, err := range err.(validator.ValidationErrors) {
var element ErrorResponse
element.FailedField = err.StructNamespace()
element.Tag = err.Tag()
element.Value = err.Param()
errors = append(errors, &element)
}
}
return errors
}

func AddUser(c *fiber.Ctx) {
//Connect to database
user := new(User)
if err := c.BodyParser(user); err != nil {
errors := ValidateStruct()
if errors != nil {
c.JSON(errors)
return
}
}
//Do something else here

//Return user
c.JSON(user)
}

// Running a test with the following curl commands

// curl -X POST -H "Content-Type: application/json" --data "{\"name\":\"john\",\"isactive\":\"True\"}" http://localhost:8080/register/user

// Results in

// [{"FailedField":"User.Email","Tag":"required","Value":""},{"FailedField":"User.Job.Salary","Tag":"required","Value":""},{"FailedField":"User.Job.Type","Tag":"required","Value":""}]⏎
- - +
Version: v1.x

🔎 Validating

Validator package

Fiber can make great use of the validator package to ensure correct validation of data to store.

You can find the detailed descriptions of the validations used in the fields contained on the structs below:

Validation Example
type Job struct{
Type string `validate:"required,min=3,max=32"`
Salary int `validate:"required,number"`
}

type User struct{
Name string `validate:"required,min=3,max=32"`
IsActive bool `validate:"required,eq=True|eq=False"`
Email string `validate:"required,email,min=6,max=32"`
Job Job `validate:"dive"`
}

type ErrorResponse struct {
FailedField string
Tag string
Value string
}

func ValidateStruct(user User) []*ErrorResponse {
var errors []*ErrorResponse
validate = validator.New()
err := validate.Struct(user)
if err != nil {
for _, err := range err.(validator.ValidationErrors) {
var element ErrorResponse
element.FailedField = err.StructNamespace()
element.Tag = err.Tag()
element.Value = err.Param()
errors = append(errors, &element)
}
}
return errors
}

func AddUser(c *fiber.Ctx) {
//Connect to database
user := new(User)
if err := c.BodyParser(user); err != nil {
errors := ValidateStruct()
if errors != nil {
c.JSON(errors)
return
}
}
//Do something else here

//Return user
c.JSON(user)
}

// Running a test with the following curl commands

// curl -X POST -H "Content-Type: application/json" --data "{\"name\":\"john\",\"isactive\":\"True\"}" http://localhost:8080/register/user

// Results in

// [{"FailedField":"User.Email","Tag":"required","Value":""},{"FailedField":"User.Job.Salary","Tag":"required","Value":""},{"FailedField":"User.Job.Type","Tag":"required","Value":""}]⏎
+ + \ No newline at end of file diff --git a/v1.x/index.html b/v1.x/index.html index db7f9a0aea1..cb6dc2a74d1 100644 --- a/v1.x/index.html +++ b/v1.x/index.html @@ -6,14 +6,14 @@ 📖 Getting started | Fiber - - + +
Version: v1.x

📖 Getting started

Fiber is an Express inspired web framework build on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind.

caution

These docs are for the old Fiber v1, you can view the v2 docs here.
-v2.0.0 was released on September 15th, 2020, and contains numerous changes regarding performance and API design.

Installation

First of all, download and install Go. 1.11 or higher is required.

Installation is done using the go get command:

go get -u github.com/gofiber/fiber

Zero Allocation

caution

Some values returned from fiber.Ctx are not immutable by default

Because fiber is optimized for high-performance, values returned from fiber.Ctx are not immutable by default and will be re-used across requests. As a rule of thumb, you must only use context values within the handler, and you must not keep any references. As soon as you return from the handler, any values you have obtained from the context will be re-used in future requests and will change below your feet. Here is an example:

func handler(c *fiber.Ctx) {
result := c.Param("foo") // result is only valid within this method
}

If you need to persist such values outside the handler, make copies of their underlying buffer using the copy builtin. Here is an example for persisting a string:

func handler(c *fiber.Ctx) {
result := c.Param("foo") // result is only valid within this method
newBuffer := make([]byte, len(result))
copy(newBuffer, result)
newResult := string(newBuffer) // newResult is immutable and valid forever
}

We created a custom ImmutableString function that does the above and is available in the gofiber/utils package.

app.Get("/:foo", func(c *fiber.Ctx) {
result := utils.ImmutableString(c.Param("foo"))
// result is now immutable
})

Alternatively, you can also use the Immutable setting. It will make all values returned from the context immutable, allowing you to persist them anywhere. Of course, this comes at the cost of performance.

For more information, please check #426 and #185.

Hello, World!

Embedded below is essentially the most straightforward Fiber app, which you can create.

package main

import "github.com/gofiber/fiber"

func main() {
app := fiber.New()

app.Get("/", func(c *fiber.Ctx) {
c.Send("Hello, World!")
})

app.Listen(3000)
}
go run server.go

Browse to http://localhost:3000, and you should see Hello, World! on the page.

Basic routing

Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, PUT, POST and so on).

info

Each route can have multiple handler functions, that is executed when the route is matched.

Route definition takes the following structures:

// Function signature
app.Method(path string, ...func(*fiber.Ctx))
  • app is an instance of Fiber.
  • Method is an HTTP request method, in capitalization: Get, Put, Post, etc.
  • path is a virtual path on the server.
  • func(*fiber.Ctx) is a callback function containing the Context executed when the route is matched.

Simple route

// Respond with "Hello, World!" on root path, "/"
app.Get("/", func(c *fiber.Ctx) {
c.Send("Hello, World!")
})

Parameters

// GET http://localhost:8080/hello%20world

app.Get("/:value", func(c *fiber.Ctx) {
c.Send("Get request with value: " + c.Params("value"))
// => Get request with value: hello world
})

Optional parameter

// GET http://localhost:3000/john

app.Get("/:name?", func(c *fiber.Ctx) {
if c.Params("name") != "" {
c.Send("Hello " + c.Params("name"))
// => Hello john
} else {
c.Send("Where is john?")
}
})

Wildcards

// GET http://localhost:3000/api/user/john

app.Get("/api/*", func(c *fiber.Ctx) {
c.Send("API path: " + c.Params("*"))
// => API path: user/john
})

Static files

To serve static files such as images, CSS, and JavaScript files, replace your function handler with a file or directory string.

Function signature:

app.Static(prefix, root string)

Use the following code to serve files in a directory named ./public:

app := fiber.New()

app.Static("/", "./public")

app.Listen(8080)

Now, you can load the files that are in the ./public directory:

http://localhost:8080/hello.html
http://localhost:8080/js/jquery.js
http://localhost:8080/css/style.css

Note

For more information on how to build APIs in Go with Fiber, please check out this excellent article on building an express-style API in Go with Fiber

- - +v2.0.0 was released on September 15th, 2020, and contains numerous changes regarding performance and API design.

Installation

First of all, download and install Go. 1.11 or higher is required.

Installation is done using the go get command:

go get -u github.com/gofiber/fiber

Zero Allocation

caution

Some values returned from fiber.Ctx are not immutable by default

Because fiber is optimized for high-performance, values returned from fiber.Ctx are not immutable by default and will be re-used across requests. As a rule of thumb, you must only use context values within the handler, and you must not keep any references. As soon as you return from the handler, any values you have obtained from the context will be re-used in future requests and will change below your feet. Here is an example:

func handler(c *fiber.Ctx) {
result := c.Param("foo") // result is only valid within this method
}

If you need to persist such values outside the handler, make copies of their underlying buffer using the copy builtin. Here is an example for persisting a string:

func handler(c *fiber.Ctx) {
result := c.Param("foo") // result is only valid within this method
newBuffer := make([]byte, len(result))
copy(newBuffer, result)
newResult := string(newBuffer) // newResult is immutable and valid forever
}

We created a custom ImmutableString function that does the above and is available in the gofiber/utils package.

app.Get("/:foo", func(c *fiber.Ctx) {
result := utils.ImmutableString(c.Param("foo"))
// result is now immutable
})

Alternatively, you can also use the Immutable setting. It will make all values returned from the context immutable, allowing you to persist them anywhere. Of course, this comes at the cost of performance.

For more information, please check #426 and #185.

Hello, World!

Embedded below is essentially the most straightforward Fiber app, which you can create.

package main

import "github.com/gofiber/fiber"

func main() {
app := fiber.New()

app.Get("/", func(c *fiber.Ctx) {
c.Send("Hello, World!")
})

app.Listen(3000)
}
go run server.go

Browse to http://localhost:3000, and you should see Hello, World! on the page.

Basic routing

Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, PUT, POST and so on).

info

Each route can have multiple handler functions, that is executed when the route is matched.

Route definition takes the following structures:

// Function signature
app.Method(path string, ...func(*fiber.Ctx))
  • app is an instance of Fiber.
  • Method is an HTTP request method, in capitalization: Get, Put, Post, etc.
  • path is a virtual path on the server.
  • func(*fiber.Ctx) is a callback function containing the Context executed when the route is matched.

Simple route

// Respond with "Hello, World!" on root path, "/"
app.Get("/", func(c *fiber.Ctx) {
c.Send("Hello, World!")
})

Parameters

// GET http://localhost:8080/hello%20world

app.Get("/:value", func(c *fiber.Ctx) {
c.Send("Get request with value: " + c.Params("value"))
// => Get request with value: hello world
})

Optional parameter

// GET http://localhost:3000/john

app.Get("/:name?", func(c *fiber.Ctx) {
if c.Params("name") != "" {
c.Send("Hello " + c.Params("name"))
// => Hello john
} else {
c.Send("Where is john?")
}
})

Wildcards

// GET http://localhost:3000/api/user/john

app.Get("/api/*", func(c *fiber.Ctx) {
c.Send("API path: " + c.Params("*"))
// => API path: user/john
})

Static files

To serve static files such as images, CSS, and JavaScript files, replace your function handler with a file or directory string.

Function signature:

app.Static(prefix, root string)

Use the following code to serve files in a directory named ./public:

app := fiber.New()

app.Static("/", "./public")

app.Listen(8080)

Now, you can load the files that are in the ./public directory:

http://localhost:8080/hello.html
http://localhost:8080/js/jquery.js
http://localhost:8080/css/style.css

Note

For more information on how to build APIs in Go with Fiber, please check out this excellent article on building an express-style API in Go with Fiber

+ + \ No newline at end of file diff --git a/v1.x/misc/benchmarks/index.html b/v1.x/misc/benchmarks/index.html index d5f3142c810..ef709e10b44 100644 --- a/v1.x/misc/benchmarks/index.html +++ b/v1.x/misc/benchmarks/index.html @@ -6,8 +6,8 @@ 📊 Benchmarks | Fiber - - + +
@@ -16,8 +16,8 @@ Express handled 2,066 responses per second with an average latency of 390.44 ms.

Fiber vs Express

Multiple Queries

Fiber handled 19,664 responses per second with an average latency of 25.7 ms.
Express handled 4,302 responses per second with an average latency of 117.2 ms.

Fiber vs Express

Single Query

Fiber handled 368,647 responses per second with an average latency of 0.7 ms.
Express handled 57,880 responses per second with an average latency of 4.4 ms.

Fiber vs Express

JSON Serialization

Fiber handled 1,146,667 responses per second with an average latency of 0.4 ms.
-Express handled 244,847 responses per second with an average latency of 1.1 ms.

Fiber vs Express

Go web framework benchmark

🔗 https://github.com/smallnest/go-web-framework-benchmark

  • CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
  • MEM 4GB
  • GO go1.13.6 linux/amd64
  • OS Linux

The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers.

The concurrency clients are 5000.

Latency is the time of real processing time by web servers. The smaller is the better.

Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better.

If we enable http pipelining, test result as below:

Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is:

If we enable http pipelining, test result as below:

Dependency graph for v1.9.0

- - +Express handled 244,847 responses per second with an average latency of 1.1 ms.

Fiber vs Express

Go web framework benchmark

🔗 https://github.com/smallnest/go-web-framework-benchmark

  • CPU Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
  • MEM 4GB
  • GO go1.13.6 linux/amd64
  • OS Linux

The first test case is to mock 0 ms, 10 ms, 100 ms, 500 ms processing time in handlers.

The concurrency clients are 5000.

Latency is the time of real processing time by web servers. The smaller is the better.

Allocs is the heap allocations by web servers when test is running. The unit is MB. The smaller is the better.

If we enable http pipelining, test result as below:

Concurrency test in 30 ms processing time, the test result for 100, 1000, 5000 clients is:

If we enable http pipelining, test result as below:

Dependency graph for v1.9.0

+ + \ No newline at end of file diff --git a/v1.x/misc/faq/index.html b/v1.x/misc/faq/index.html index 2a6a6fad9d7..22545f3df0a 100644 --- a/v1.x/misc/faq/index.html +++ b/v1.x/misc/faq/index.html @@ -6,14 +6,14 @@ 🤔 FAQ | Fiber - - + +
Version: v1.x

🤔 FAQ

How should I structure my application?

There is no definitive answer to this question. The answer depends on the scale of your application and the team that is involved. To be as flexible as possible, Fiber makes no assumptions in terms of structure.

Routes and other application-specific logic can live in as many files as you wish, in any directory structure you prefer. View the following examples for inspiration:

How do I handle custom 404 responses?

In Fiber, 404 responses are not the result of an error, so the error handler will not capture them. This behavior is because a 404 response simply indicates the absence of additional work to do; in other words, Fiber has found no routes that match the request.

All you need to do is add a middleware function at the very bottom of the stack (below all other functions) to handle a 404 response:

Example
app.Use(func(c *fiber.Ctx) {
c.Status(fiber.StatusNotFound).SendString("Sorry can't find that!")
})

How do I set up an error handler?

To override the default error handler, provide a custom handler to the app.Settings.ErrorHandler

Example
app.Settings.ErrorHandler = func(c *fiber.Ctx, err error) {
c.Status(500).SendString(err.Error())
}

We have a dedicated page explaining how error handling works in Fiber, see Error Handling.

Which template engines does Fiber support?

Fiber currently supports 8 template engines in our gofiber/template middleware:

To learn more about using Templates in Fiber, see Templates.

Does Fiber have a community chat?

Yes, we have our own Discord server, where we hang out. We have different rooms for every subject.
-If you have questions or just want to have a chat, feel free to join us via this > invite link <.

- - +If you have questions or just want to have a chat, feel free to join us via this > invite link <.

+ + \ No newline at end of file